diff --git a/README.md b/README.md index 190c3fc..9d31436 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,15 @@ For exact input/output and UX guarantees, see [`docs/contract.md`](docs/contract pi -e ./src/index.ts ``` +### Run in isolated test mode (extension + bundled skill only) + +```bash +pnpm dev +pnpm dev ../test +``` + +`pnpm dev [path]` runs pi with `--no-extensions --no-skills --no-prompt-templates --no-themes --no-context-files`, loads this repo’s extension and `skills/ask-user`, and sets the working directory to `[path]` (defaults to `.`). + ### Install dependencies ```bash diff --git a/docs/README.md b/docs/README.md index 1f5d327..06876eb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,6 +13,17 @@ This folder keeps only the documentation needed to understand and maintain the e - start with `contract.md` for behavior - read `architecture.md` for code layout +## Local test run + +From repo root, run: + +```bash +pnpm dev +pnpm dev ../some-target-folder +``` + +This starts pi in isolated mode, loads only this extension and bundled `ask-user` skill, and uses the optional folder as `--cd` target. + ## Rule of thumb If a detail is about implementation mechanics, it should usually live in `src/` or `tests/`, not here. diff --git a/package.json b/package.json index 6d9ea4e..c41a0bf 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "CHANGELOG.md" ], "scripts": { + "dev": "sh -c 'pi --no-extensions --no-skills --no-prompt-templates --no-themes --no-context-files -e ./src/index.ts --skill ./skills/ask-user --cd \"${1:-.}\"' --", "test": "node --test tests/*.test.ts", "typecheck": "tsc -p tsconfig.json", "format": "biome format --write .",