@difflab/pi 0.3.0-rc.202609200047.ac3661a → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +2 -22
  2. package/agents/diffpi-orchestrator.md +0 -10
  3. package/agents/diffpi-worker.md +1 -9
  4. package/dist/commands/index.d.ts +0 -1
  5. package/dist/commands/index.d.ts.map +1 -1
  6. package/dist/commands/review.d.ts.map +1 -1
  7. package/dist/environment.d.ts.map +1 -1
  8. package/dist/extensions/index.js +844 -2773
  9. package/dist/extensions/zedx.d.ts +0 -2
  10. package/dist/extensions/zedx.d.ts.map +1 -1
  11. package/dist/index.d.ts +2 -5
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +128 -1140
  14. package/dist/setup.d.ts.map +1 -1
  15. package/dist/store.d.ts +0 -1
  16. package/dist/store.d.ts.map +1 -1
  17. package/dist/tools/index.d.ts +0 -1
  18. package/dist/tools/index.d.ts.map +1 -1
  19. package/dist/tools/index.js +678 -2400
  20. package/package.json +1 -4
  21. package/agents/diffpi-planner.md +0 -30
  22. package/dist/cli/plan.d.ts +0 -7
  23. package/dist/cli/plan.d.ts.map +0 -1
  24. package/dist/cli.d.ts +0 -3
  25. package/dist/cli.d.ts.map +0 -1
  26. package/dist/cli.js +0 -729
  27. package/dist/commands/background.d.ts +0 -39
  28. package/dist/commands/background.d.ts.map +0 -1
  29. package/dist/commands/plan.d.ts +0 -21
  30. package/dist/commands/plan.d.ts.map +0 -1
  31. package/dist/plan/annotations.d.ts +0 -25
  32. package/dist/plan/annotations.d.ts.map +0 -1
  33. package/dist/plan/escalation.d.ts +0 -4
  34. package/dist/plan/escalation.d.ts.map +0 -1
  35. package/dist/plan/execution.d.ts +0 -19
  36. package/dist/plan/execution.d.ts.map +0 -1
  37. package/dist/plan/index.d.ts +0 -15
  38. package/dist/plan/index.d.ts.map +0 -1
  39. package/dist/plan/lock.d.ts +0 -7
  40. package/dist/plan/lock.d.ts.map +0 -1
  41. package/dist/plan/log.d.ts +0 -5
  42. package/dist/plan/log.d.ts.map +0 -1
  43. package/dist/plan/markdown.d.ts +0 -6
  44. package/dist/plan/markdown.d.ts.map +0 -1
  45. package/dist/plan/store.d.ts +0 -34
  46. package/dist/plan/store.d.ts.map +0 -1
  47. package/dist/plan/transitions.d.ts +0 -9
  48. package/dist/plan/transitions.d.ts.map +0 -1
  49. package/dist/plan/types.d.ts +0 -146
  50. package/dist/plan/types.d.ts.map +0 -1
  51. package/dist/tools/plan.d.ts +0 -6
  52. package/dist/tools/plan.d.ts.map +0 -1
  53. package/skills/plan/SKILL.md +0 -13
  54. package/skills/plan/references/workflows/annotate.md +0 -6
  55. package/skills/plan/references/workflows/finalize.md +0 -7
  56. package/skills/plan/references/workflows/go.md +0 -7
  57. package/skills/plan/references/workflows/help.md +0 -13
  58. package/skills/plan/references/workflows/init.md +0 -6
  59. package/skills/plan/references/workflows/new.md +0 -7
  60. package/skills/plan/references/workflows/update.md +0 -7
  61. package/templates/plan/PLAN.md +0 -38
package/README.md CHANGED
@@ -10,7 +10,7 @@ pi install npm:@difflab/pi
10
10
 
11
11
  Run `/skill:diffpi-setup`. The skill validates or configures the environment and reloads pi when required.
12
12
 
13
- The package includes structured questions and installs the upstream Grounded Docs, Simple English, and Context Mode skills. Setup also installs six package-managed agent files into Pi's global agent directory. The subagent plugin can delegate to `tutor`, `copilot`, `worker`, `planner`, `orchestrator`, and `reviewer`; profiles marked for inline use are also available as inline modes.
13
+ The package includes structured questions and installs the upstream Grounded Docs, Simple English, and Context Mode skills. Setup also installs five package-managed agent files into Pi's global agent directory. The subagent plugin can delegate to `tutor`, `copilot`, `worker`, `orchestrator`, and `reviewer`; profiles marked for inline use are also available as inline modes.
14
14
 
15
15
  ```text
16
16
  /mode
@@ -22,26 +22,6 @@ The package includes structured questions and installs the upstream Grounded Doc
22
22
 
23
23
  Standard agents come from the same global and trusted-project directories used by `@tintinweb/pi-subagents`. Skill-owned agents are opt-in for listing and use `skill:agent` ids. Inline selection applies the profile prompt, first available preferred model, thinking level, and available tool set. Clearing restores the previous runtime. Override ordered model preferences with `agents.<id>.models` in `~/.difflab/diffpi/config.yaml` or `config.json`, then rerun setup for delegated agents. Inline modes are not a security boundary.
24
24
 
25
- ## Planning
26
-
27
- `/plan` creates and runs durable implementation plans. Records live under `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/` and are shared across worktrees.
28
-
29
- ```text
30
- /plan init <short-slug> [--branch name]
31
- /plan new <short-slug> [--branch name] [--bg] [prompt...]
32
- /plan update [short-slug] [--branch name] [--bg] [instructions...]
33
- /plan annotate [short-slug]
34
- /plan finalize [short-slug]
35
- /plan go <short-slug> [--commit|--no-commit] [--bg]
36
- /plan help
37
- ```
38
-
39
- Planner owns authoring and cannot edit source files. Worker owns inline implementation. Orchestrator owns background coordination and phase commits. Background work does not change the foreground mode and does not ask questions.
40
-
41
- `/plan annotate` uses `tuicr --file PLAN.md`. Run `npx --yes @difflab/pi@<version> plan annotate --cwd <repo>` for direct use. Zed setup installs the pinned `diffpi: annotate plan` task. Override the plan template at `~/.difflab/diffpi/templates/plan/PLAN.md`.
42
-
43
- Plan tools cover context, initialization, overview and phase changes, validation, annotations, progress, status, gates, and execution dispatch. Phase gates run `format:check`, `lint`, and `test`. `--commit` creates one local conventional commit per completed phase and never pushes.
44
-
45
25
  ## Review
46
26
 
47
27
  `/review` drives code review over GitHub, GitLab, or the local `tuicr` TUI. The repository remote selects the review forge. When requested, `/skill:diffpi-setup` can install GitHub and/or GitLab CLIs and MCP servers.
@@ -64,6 +44,6 @@ Local artifacts live in `.diffpi/review/` and use `YYMMDD-<short-head-sha>.md` o
64
44
 
65
45
  Draft PR bodies use the bundled `review/draft-pr.md` template. Override it at `~/.difflab/diffpi/templates/review/draft-pr.md`. Setup installs the upstream Codevoyant `/git` skill for conventional commit and safe rebase workflows. During package development, run `mise watch //packages/pi:dev`; the task builds and installs the package when its sources change. Run `/reload` in Pi after each successful install.
66
46
 
67
- The package root exports environment and forge lifecycle adapters, review backends, plan contracts and storage, gate checks, template helpers, tuicr helpers, setup operations, and inline-mode control. `@difflab/pi/tools` exports `createPlanTools`, `createReviewTools`, and the complete tool catalog.
47
+ The package root exports environment and forge lifecycle adapters, review backends, gate checks, review schemas and artifact helpers, template helpers, store helpers, tuicr helpers, setup operations, and inline-mode control. `@difflab/pi/tools` exports `createReviewTools` and the complete tool catalog.
68
48
 
69
49
  See the [repository](https://github.com/difflab-io/diffpi) for details.
@@ -23,13 +23,3 @@ Work only as an execution orchestrator through the pi-subagents tools. Optimize
23
23
  - Do not bypass the reviewer by launching Sol workers directly. The reviewer runs on Sol; implementation workers use their configured Luna/Haiku/Qwen Flash/DeepSeek Flash preferences.
24
24
  - For `edit`, `new`, `complete`, and `merge`, keep lifecycle decisions in this orchestration turn and delegate only bounded inspection or implementation work.
25
25
  - Return one concise synthesis with results, failures, cost or latency concerns, and remaining decisions.
26
-
27
- ## Plan coordination
28
-
29
- For background plan execution, call `plan_context` and honor the active execution ID. Process phases in dependency order. Delegate one bounded task at a time to Worker unless all dependencies are complete and declared file scopes are disjoint; missing or uncertain scopes serialize. Delegated workers never commit or restructure the plan. Reload plan state and persist each result before scheduling more work.
30
-
31
- After all phase tasks complete or skip, run `plan_run_gates`. A failure or warning blocks the phase. When the execution policy requires commits, only you may invoke `/git commit --yes --no-push`, exactly once after gates pass, then record the observed SHA before completing the phase. Never push.
32
-
33
- Parse `<diffpi-planner-escalation>` payloads strictly. If `needsUserDecision` is false, delegate the blocked amendment to Planner, reload and validate the plan, and retry at most twice for that task. Planner may revise only pending or blocked work. If a human decision is needed, the payload is malformed, or retries are exhausted, preserve blocked state and return the plan ID, task ID, evidence, and `/plan update <slug>` then `/plan go <slug>` commands. Detached agents never ask users questions.
34
-
35
- Keep review orchestration behavior unchanged when no plan execution packet is present.
@@ -6,7 +6,7 @@ prompt_mode: append
6
6
  model: openai-codex/gpt-5.6-luna
7
7
  model_fallbacks: meridian/claude-haiku-4-5, openrouter/qwen/qwen3-coder-flash, deepseek/deepseek-v4-flash
8
8
  thinking: low
9
- tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file, plan_context, plan_log_progress, plan_update_status, plan_run_gates
9
+ tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file
10
10
  ---
11
11
 
12
12
  Work as a focused implementation worker. Execute the bounded plan supplied by an orchestrator or user.
@@ -17,11 +17,3 @@ Work as a focused implementation worker. Execute the bounded plan supplied by an
17
17
  - When blocked, stop and return the exact command, error or stack trace, relevant context, and attempted fixes.
18
18
  - Leave unresolved decisions to the orchestrator instead of guessing.
19
19
  - Report changed files, validation evidence, and remaining limitations.
20
-
21
- ## Plan execution
22
-
23
- When given a plan execution packet, use plan tools instead of editing `PLAN.md` directly. Claim an eligible task with `plan_update_status`, implement only its declared scope, validate it, log progress immediately, and complete or block the task before selecting more work. Reload `plan_context` after every delegated result.
24
-
25
- An inline coordinator may process sequential tasks and run phase gates after every task is complete or skipped. It may request one phase commit from the coordinator path after gates pass. A delegated worker handles only its assigned task and never commits, changes phases, or calls plan authoring tools.
26
-
27
- When blocked, persist the blocked status with attempted fixes and evidence. Emit the returned `PlannerEscalation` inside `<diffpi-planner-escalation>` tags and stop. Never invent a replacement design or erase completed evidence.
@@ -3,7 +3,6 @@ import type { ModeController } from '../modes';
3
3
  /** Register the extension's user-facing commands. */
4
4
  export declare function registerCommands(pi: ExtensionAPI, modes: ModeController): void;
5
5
  export { registerModeCommand } from './mode';
6
- export { registerPlanCommand } from './plan';
7
6
  export { registerReloadCommand } from './reload';
8
7
  export { registerReviewCommand } from './review';
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM/C,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAK9E;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAI9E;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AAGtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM/C,4CAA4C;AAC5C,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAKnF"}
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AAGtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,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