docs: add isolated dev command and usage [skip ci]

This commit is contained in:
Erik Kotsiuba
2026-04-25 21:29:08 +02:00
parent f3c02532a3
commit 42f7092899
3 changed files with 21 additions and 0 deletions
+9
View File
@@ -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
+11
View File
@@ -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.
+1
View File
@@ -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 .",