{"_id":"@arvoretech/pi-plan-mode","_rev":"4-951e866a4b14a3e21e264eca3812252e","name":"@arvoretech/pi-plan-mode","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@arvoretech/pi-plan-mode","version":"1.0.0","keywords":["pi","extension","plan-mode","planning","read-only"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-plan-mode@1.0.0","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"5228beb4df97510ddac5f6523a236a14ce395ed5","tarball":"https://registry.npmjs.org/@arvoretech/pi-plan-mode/-/pi-plan-mode-1.0.0.tgz","fileCount":14,"integrity":"sha512-5Jt4sdDYUhQbQr/TXD/fN3uQhFFmucdcOEeNueDVLYlXMoT2U9yBfUKnQ1AvwKntCSP0eTO93TzKFeRngk7EvQ==","signatures":[{"sig":"MEYCIQDq4akm6vqfk6q3WG5jaJQht09LFPpOqhiyHGLoln7D+gIhAL8Ev8CHkal43tJx8ewD7pipHJotfEW62Ylky474t1+m","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":85550},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"2c15f0aeaacd69c8cf59bdc8e044d2abf972d867","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},"repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/plan-mode"},"_npmVersion":"10.9.4","description":"PI extension providing a Cursor-style plan mode with a hard tool gate: read-only exploration, plan generation, manual /build approval, and execution tracking","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"latest","@earendil-works/pi-tui":"latest","@earendil-works/pi-agent-core":"latest","@earendil-works/pi-coding-agent":"latest"},"peerDependencies":{"@earendil-works/pi-ai":">=0.74.0","@earendil-works/pi-tui":">=0.74.0","@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-plan-mode_1.0.0_1781554586273_0.8531232869195196","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arvoretech/pi-plan-mode","version":"1.0.1","description":"PI extension providing a Cursor-style plan mode with a hard tool gate: read-only exploration, plan generation, manual /build approval, and execution tracking","main":"dist/index.js","types":"dist/index.d.ts","type":"module","peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0","@earendil-works/pi-ai":">=0.74.0","@earendil-works/pi-tui":">=0.74.0"},"devDependencies":{"@earendil-works/pi-coding-agent":"latest","@earendil-works/pi-ai":"latest","@earendil-works/pi-tui":"latest","@earendil-works/pi-agent-core":"latest","@types/node":"^20.10.0","typescript":"^5.3.0"},"pi":{"extensions":["./dist/index.js"]},"keywords":["pi-package","pi","extension","plan-mode","planning","read-only"],"repository":{"type":"git","url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","directory":"packages/plan-mode"},"author":{"name":"Arvore"},"license":"MIT","scripts":{"build":"tsc","dev":"tsc --watch","lint":"tsc --noEmit"},"_id":"@arvoretech/pi-plan-mode@1.0.1","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","_integrity":"sha512-ArN75oHBYHI13kge6pelZDQJ0APlNStRFT17jbXFQdOqoVIiO+ehLhzhImYs+Sy8tKad/1Pb23t5lWDbWy8fnw==","_resolved":"/tmp/arvoretech-pi-plan-mode-1.0.1.tgz","_from":"file:/tmp/arvoretech-pi-plan-mode-1.0.1.tgz","_nodeVersion":"22.22.3","_npmVersion":"11.17.0","dist":{"integrity":"sha512-ArN75oHBYHI13kge6pelZDQJ0APlNStRFT17jbXFQdOqoVIiO+ehLhzhImYs+Sy8tKad/1Pb23t5lWDbWy8fnw==","shasum":"c24490f4b3feb3db8f55250ebea716bb417bcab5","tarball":"https://registry.npmjs.org/@arvoretech/pi-plan-mode/-/pi-plan-mode-1.0.1.tgz","fileCount":14,"unpackedSize":85567,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-plan-mode@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE1P/truIcHucl0Ja7fgxGwZA3ccMuN59HYxvXscE9ZeAiEA1Fib4G9DVISyaQDDNfAHg9v6nGQOfTneRei5O3zBGzE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9e3f3fd8-fca0-40a0-87c3-d40d6696157d"}},"directories":{},"maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-plan-mode_1.0.1_1782217149218_0.22608374284288724"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-15T20:16:26.065Z","modified":"2026-06-23T12:19:09.825Z","1.0.0":"2026-06-15T20:16:26.426Z","1.0.1":"2026-06-23T12:19:09.362Z"},"bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"author":{"name":"Arvore"},"license":"MIT","homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","keywords":["pi-package","pi","extension","plan-mode","planning","read-only"],"repository":{"type":"git","url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","directory":"packages/plan-mode"},"description":"PI extension providing a Cursor-style plan mode with a hard tool gate: read-only exploration, plan generation, manual /build approval, and execution tracking","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"readme":"# @arvoretech/pi-plan-mode\n\nCursor-style **plan mode** for PI with a real **hard tool gate**.\n\nWhile plan mode is active the agent is locked into read-only exploration:\n`edit` and `write` are blocked and `bash` is restricted to a read-only\nallowlist — not by prompt discipline, but by the `tool_call` gate. The agent\nphysically cannot touch code until you approve the plan with `/build`.\n\n## Features\n\n- **Hard gate**: hides `edit`/`write` via `setActiveTools` AND blocks them in\n  `tool_call` (defense in depth). `bash` is allowlisted (blocks `rm`,\n  `git commit`, `kubectl apply`, `aws ... delete`, `mix ecto`, redirects, etc.).\n- **Business + pedagogical refinement**: the plan prompt drives clarifying\n  questions across business, users/pedagogy (edtech), and technical concerns,\n  asked through a bundled `questionnaire` tool that renders selectable options\n  (single = option list, multiple = tabbed), with a \"type something\" fallback\n  instead of free text.\n- **Auto-suggest**: when a prompt looks complex (implement, refactor, migrate,\n  architecture, etc.) the extension offers to enter plan mode via a select dialog.\n- **Plan generation**: the agent researches the codebase and produces a numbered\n  plan under a `Plan:` header.\n- **Workspace storage + editor**: the plan is saved to `.pi/plans/{date}-{slug}.md`\n  as soon as it is generated. `/plan-open` opens it in Warp (or `$EDITOR`) so you\n  can review and edit it directly.\n- **Manual handoff**: nothing executes until you run `/build`.\n- **Progress tracking**: numbered steps become a todo list; completed steps are\n  marked with `[DONE:n]` and shown in a tree-style overlay widget during\n  execution (`● Plano (n/total)` heading, `├─`/`└─` connectors, `○` pending /\n  `◐` current / `✓` done glyphs, inspired by rpiv-todo).\n- **Session persistence**: state survives `/resume`.\n\n## Commands\n\n- `/plan` — toggle plan mode (read-only, edits blocked). `Ctrl+Alt+P` too.\n- `/plan-open` — open the current plan `.md` in Warp / `$EDITOR` to review and edit.\n- `/build` — approve the current plan, save it to `.pi/plans/`, exit plan mode and execute.\n- `/todos` — show plan progress.\n- `--plan` — flag to start directly in plan mode.\n\n## Flow\n\n1. `/plan` → agent asks questions, explores, and outputs a `Plan:` block.\n2. Numbered steps become a todo list. Review/edit the plan (still locked).\n3. `/build` → saves the `.md`, restores tools, executes in order with `[DONE:n]` tracking.\n4. When every step completes, execution mode ends and normal access is restored.\n\n## Usage\n\n### Global (all projects)\n\n```bash\nln -s $(pwd)/packages/plan-mode/dist ~/.pi/agent/extensions/plan-mode\n```\n\n### Project-local\n\n```json\n{\n  \"extensions\": [\"./path/to/arvore-pi-extensions/packages/plan-mode/dist\"]\n}\n```\n\n## Development\n\n```bash\npnpm install\npnpm --filter @arvoretech/pi-plan-mode build\npnpm --filter @arvoretech/pi-plan-mode lint\n```\n","readmeFilename":"README.md"}