@difflab/pi 0.7.1 → 0.8.0-rc.202610020810.d27e7fc

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 (95) hide show
  1. package/README.md +22 -40
  2. package/agents/diffpi-copilot.md +2 -2
  3. package/agents/diffpi-orchestrator.md +9 -14
  4. package/agents/diffpi-plan-reviewer.md +4 -12
  5. package/agents/diffpi-planner.md +7 -13
  6. package/agents/diffpi-reviewer.md +7 -11
  7. package/agents/diffpi-tutor.md +2 -2
  8. package/agents/diffpi-worker.md +9 -12
  9. package/dist/commands/dispatch.d.ts +4 -0
  10. package/dist/commands/dispatch.d.ts.map +1 -0
  11. package/dist/commands/index.d.ts +1 -3
  12. package/dist/commands/index.d.ts.map +1 -1
  13. package/dist/commands/plan.d.ts +1 -1
  14. package/dist/commands/plan.d.ts.map +1 -1
  15. package/dist/commands/review.d.ts +1 -1
  16. package/dist/commands/review.d.ts.map +1 -1
  17. package/dist/doctor.d.ts +9 -0
  18. package/dist/doctor.d.ts.map +1 -0
  19. package/dist/environment.d.ts +0 -1
  20. package/dist/environment.d.ts.map +1 -1
  21. package/dist/extensions/index.js +1622 -3207
  22. package/dist/index.d.ts +5 -11
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +146 -1128
  25. package/dist/log.d.ts +6 -11
  26. package/dist/log.d.ts.map +1 -1
  27. package/dist/plan/verify.d.ts.map +1 -1
  28. package/dist/review/index.d.ts +2 -3
  29. package/dist/review/index.d.ts.map +1 -1
  30. package/dist/review/review-backend.d.ts +2 -3
  31. package/dist/review/review-backend.d.ts.map +1 -1
  32. package/dist/setup.d.ts +0 -2
  33. package/dist/setup.d.ts.map +1 -1
  34. package/dist/tools/ci.d.ts +1 -1
  35. package/dist/tools/doctor.d.ts +3 -0
  36. package/dist/tools/doctor.d.ts.map +1 -0
  37. package/dist/tools/index.d.ts +2 -3
  38. package/dist/tools/index.d.ts.map +1 -1
  39. package/dist/tools/index.js +1821 -3006
  40. package/dist/tools/log.d.ts.map +1 -1
  41. package/dist/tools/review.d.ts +1 -7
  42. package/dist/tools/review.d.ts.map +1 -1
  43. package/dist/tools/setup.d.ts.map +1 -1
  44. package/package.json +2 -6
  45. package/skills/diffpi-doctor/SKILL.md +10 -0
  46. package/skills/diffpi-setup/SKILL.md +4 -4
  47. package/skills/plan/SKILL.md +13 -24
  48. package/skills/plan/references/design-quality.md +3 -3
  49. package/skills/plan/references/workflows/finalize.md +10 -6
  50. package/skills/plan/references/workflows/go.md +27 -7
  51. package/skills/plan/references/workflows/help.md +19 -3
  52. package/skills/plan/references/workflows/init.md +23 -6
  53. package/skills/plan/references/workflows/inline-fallback.md +9 -0
  54. package/skills/plan/references/workflows/new.md +22 -7
  55. package/skills/plan/references/workflows/update.md +24 -6
  56. package/skills/plan/references/workflows/validate.md +31 -0
  57. package/skills/review/SKILL.md +15 -7
  58. package/skills/review/references/review-standards.md +9 -1
  59. package/skills/review/references/workflows/address.md +13 -6
  60. package/skills/review/references/workflows/auto.md +13 -5
  61. package/skills/review/references/workflows/complete.md +17 -4
  62. package/skills/review/references/workflows/edit.md +10 -2
  63. package/skills/review/references/workflows/foreground-fallback.md +7 -0
  64. package/skills/review/references/workflows/help.md +11 -10
  65. package/skills/review/references/workflows/merge.md +17 -2
  66. package/skills/review/references/workflows/new.md +18 -5
  67. package/skills/review/references/workflows/publish.md +17 -4
  68. package/skills/review/references/workflows/status.md +7 -2
  69. package/skills/review/templates/REVIEW.md +39 -0
  70. package/templates/plan/PLAN.md +9 -1
  71. package/templates/review/draft-pr.md +3 -9
  72. package/dist/cli/plan.d.ts +0 -17
  73. package/dist/cli/plan.d.ts.map +0 -1
  74. package/dist/cli.d.ts +0 -4
  75. package/dist/cli.d.ts.map +0 -1
  76. package/dist/cli.js +0 -2258
  77. package/dist/commands/mode.d.ts +0 -5
  78. package/dist/commands/mode.d.ts.map +0 -1
  79. package/dist/extensions/tuicrx.d.ts +0 -66
  80. package/dist/extensions/tuicrx.d.ts.map +0 -1
  81. package/dist/extensions/zedx.d.ts +0 -18
  82. package/dist/extensions/zedx.d.ts.map +0 -1
  83. package/dist/modes.d.ts +0 -75
  84. package/dist/modes.d.ts.map +0 -1
  85. package/dist/review/local-review-backend.d.ts +0 -3
  86. package/dist/review/local-review-backend.d.ts.map +0 -1
  87. package/dist/review/local-reviews.d.ts +0 -31
  88. package/dist/review/local-reviews.d.ts.map +0 -1
  89. package/dist/review/review-markdown.d.ts +0 -6
  90. package/dist/review/review-markdown.d.ts.map +0 -1
  91. package/dist/tools/modes.d.ts +0 -4
  92. package/dist/tools/modes.d.ts.map +0 -1
  93. package/skills/mode/SKILL.md +0 -38
  94. package/skills/plan/references/workflows/annotate.md +0 -7
  95. package/skills/review/references/workflows/open.md +0 -5
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @difflab/pi
2
2
 
3
- Tools and skills for the pi coding agent.
3
+ Tools and skills for the Pi coding agent.
4
4
 
5
5
  ## Install
6
6
 
@@ -8,64 +8,46 @@ Tools and skills for the pi coding agent.
8
8
  pi install npm:@difflab/pi
9
9
  ```
10
10
 
11
- Run `/skill:diffpi-setup`. The skill validates or configures the environment and reloads pi when required.
11
+ Run `/skill:diffpi-setup` to validate or configure the environment. Setup asks before making changes and reloads Pi when needed. It installs upstream Grounded Docs, Simple English, and Context Mode skills and package-managed agent profiles for the subagent plugin. The package manifest loads every bundled skill and registers `plan_verify`, `review_*`, setup, reload, logging, template, and CI tools without selecting an inline role. Installed package resources and a host's actually callable tools are different facts; if the host withholds `Agent`, `get_subagent_result`, or `plan_verify`, report that exact missing capability. Diffpi does not implement an external Cursor SDK bridge.
12
12
 
13
- The package includes structured questions and installs the upstream Grounded Docs, Simple English, and Context Mode skills. Setup also installs package-managed agent profiles into Pi's global agent directory. The subagent plugin can delegate to `tutor`, `copilot`, `worker`, `planner`, `orchestrator`, `reviewer`, and the independent `diffpi-plan-reviewer`; profiles marked for inline use are also available as inline modes.
14
-
15
- ```text
16
- /mode
17
- /mode reviewer
18
- /mode reset
19
- /skill:mode --include-skills
20
- /skill:mode spec:planner
21
- ```
22
-
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.
13
+ If an update leaves copied global agent profiles stale, run `/skill:diffpi-doctor`. It checks the installed package's agents, then uses `diffpi_doctor` to back up and update only changed `diffpi-*.md` profiles. It does not rerun setup or install anything. Reload affected Pi sessions; an existing inline prompt may require a new conversation. Package skills themselves load from the installed package, not copied global files.
24
14
 
25
15
  ## Planning
26
16
 
27
- `/plan` is a thin alias owned by the package `plan` skill. Current plans are live `PLAN.md` files and numbered briefs under `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/`. Normal file edits make partial drafts visible. The old managed plan engine is not shipped as a runtime API; existing Markdown files remain on disk but are not parsed or migrated by it.
17
+ `/plan` forwards to the bundled `/skill:diffpi-plan`, not an unrelated global `plan` skill. Plans are live `PLAN.md` files plus numbered briefs in `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/`. The old managed plan engine is not shipped; historical files stay on disk.
28
18
 
29
19
  ```text
30
20
  /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
- diffpi plan annotate .diffpi/plan/<YYMMDD-short-slug>/PLAN.md
21
+ /plan new <short-slug> [prompt...]
22
+ /plan update [short-slug] [instructions...]
34
23
  /plan finalize [short-slug]
35
- /plan go <short-slug> [--mode <no-commit|commit|push>] [--bg]
24
+ /plan go <short-slug> [--mode <no-commit|commit|push>]
36
25
  /plan help
37
26
  ```
38
27
 
39
- The skill selects and verifies the Planner or Orchestrator inline profile for foreground work. `init` leaves a visible incomplete draft. `new` and `update` edit the files incrementally and reread them. `plan_verify` checks structure and task parity without writing or approving anything; one independent, high-thinking, read-only Plan Reviewer then checks quality, risks, and Worker executability. `finalize` and draft `go` mark the plan ready only after both checks pass. `--bg` launches one named background Planner or Orchestrator without changing the foreground mode, and background work never asks questions.
28
+ Substantive verbs launch an attached background Planner or Orchestrator by default and return a job ID and completed result to the initiating conversation. Children may delegate further independent tasks with ambient tools, skills, and extensions; there is no one-child limit. The main thread handles help and user decisions. A detached process is not an attached background agent. Background agents cannot ask users questions; an unforeseen decision blocks the job.
40
29
 
41
- `diffpi plan annotate <PLAN.md|directory>` opens the live plan in `tuicr --file`; it does not save a managed review. Zed setup installs the pinned `diffpi: annotate plan` task. Override the plan template at `~/.difflab/diffpi/templates/plan/PLAN.md`.
30
+ `init` leaves an incomplete DRAFT. `new` and `update` write plan files without automatic validation. Before an update changes content, the Planner records feedback and archives the full plan and briefs beside `PLAN.md` under `revisions/`. Explicit `validate` checks structure and obtains one independent Plan Reviewer result per authoring cycle. It keeps review evidence in the response, not in the plan. The original BLOCKING verdict remains BLOCKING after a repair. `finalize` validates a DRAFT before marking it READY. `go` never validates: it changes a DRAFT to READY, reads it back, and starts execution. An existing READY plan starts directly.
42
31
 
43
- `PLAN.md` keeps Design, numbered phases, phase prerequisites, phase constraints (or `None`), and flat task checkboxes. Each brief places a single action-labeled file tree in a fenced `text` block under `## Files Affected` immediately after `## Objective` (not bullet paths); tasks have ordered steps, nested verification, and acceptance criteria. `## Implementation Constraints` accepts free-form guidance with optional Required Libraries & Technology Choices, Key Algorithm Specifications, and Core Invariants headings. No per-task or `PLAN.md` file scopes. Keep phase-wide guardrails in `PLAN.md` and implementation details in briefs without repeating or paraphrasing the guardrails. The Orchestrator alone updates execution status, runs project gates, and owns phase Git/CI actions. `--mode commit` creates one local conventional commit per completed phase. `--mode push` pushes each commit and waits for exact-SHA `watch_ci` results before advancing. Workers only edit source/test scopes derived from their task steps and the Files Affected tree; uncertain or overlapping scopes are serialized.
32
+ The Orchestrator owns plan status, lifecycle, gates, Git, pushes, CI, and reconciliation. It binds execution to the canonical worktree, discovers active or blocked bindings, serializes uncertain or overlapping scopes, and may run disjoint source tasks concurrently. Each Worker receives the absolute plan path, its exact unchecked task line, canonical worktree, and `.diffpi/plan/<plan-id>/logs.jsonl` beside `PLAN.md`; it logs `progress` milestones (or `deviation` only for an actual departure), then marks only its own line after focused checks pass. Targeted edits are not atomic, so the Orchestrator rereads and reconciles evidence after each Worker and barrier; failed or partial tasks remain unchecked. Logs are diagnostic and do not replace source correctness or lifecycle state. `--mode no-commit` is the default. `--mode push` waits for `watch_ci` on each exact pushed SHA before advancing.
44
33
 
45
34
  ## Review
46
35
 
47
- `/review` is a thin alias owned by the package `review` skill, which routes to the review tools 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.
36
+ `/review` forwards to the bundled `/skill:diffpi-review`, not an unrelated global `review` skill. Remote workflows call `review_context` first and use GitHub or GitLab forge tools. Local workflows read and edit Markdown files directly without a review backend. Merge is GitHub-only.
48
37
 
49
38
  ```text
50
- /review auto [pr-number|pr-url|branch] [--local] [--bg]
51
- /review new [--local] [--base branch] [--bg]
52
- /review open [pr-number|pr-url|branch] [--local]
53
- /review status [pr-number|pr-url|branch]
54
- /review edit [pr-number|pr-url|branch] [--local] [--bg]
55
- /review address [target] [--local] [--bg]
56
- /review publish [target] [--local] [--comment|--approve|--request-changes|--close] [--bg]
57
- /review complete [target] [--local|--approve|--reject|--abandon] [--bg]
58
- /review merge [target] [--bg]
39
+ /review auto [target] [--local]
40
+ /review new [title] [--local] [--base branch]
41
+ /review status [target] [--local]
42
+ /review edit [target] [--local]
43
+ /review address [target] [--local]
44
+ /review publish [target] [--comment|--approve|--request-changes|--close]
45
+ /review complete [target] [--approve|--reject|--close]
46
+ /review merge [target]
59
47
  ```
60
48
 
61
- The skill delegates mechanics to `review_context`, `review_status`, `review_open`, `review_new`, `review_edit`, `review_diff`, `review_gates`, `review_submit`, `review_add_comment`, `review_comments`, `review_respond`, `review_publish`, `review_complete`, `review_merge`, and `review_launch_ui`. Foreground workflows run directly without selecting an inline mode. Reviewer classifies address threads and delegates bounded edits to lightweight workers. `--bg` leaves the current chat mode unchanged and launches a tracked Orchestrator child. The generic `diffpi_template` tool loads bundled templates or user overrides. GitHub and GitLab support review creation and publication. Merge is intentionally GitHub-only and remains separate from publish and complete.
62
-
63
- `--local` selects the `tuicr` working-tree review backend. Without it, targets are a PR/MR number, URL, or branch; no target uses the current branch. Local address flows apply fixes without commits; remote address flows use the upstream `/git commit --no-push` workflow before posting draft responses for changed threads. Local reply overlays preserve remote thread IDs until `publish --local` promotes comments and replies to the forge. Remote comments carry a generated-review notice with the exact provider/model route; local comments use `Agent: <provider/model>` as the author.
64
-
65
- Local artifacts live in `.diffpi/review/` and use `YYMMDD-<short-head-sha>.md` or `YYMMDD-uncommitted.md` names. `.diffpi` links to `~/.difflab/diffpi/projects/<repository-name>-<identity-hash>/`, so all worktrees for one remote share records while unrelated same-named repositories remain isolated. The launcher opens a repository-scoped mux tab when zellij, tmux, or screen is detected. Mux launches use persistent shells. Editor selection gives a valid `EDITOR` precedence over `VISUAL` and preserves paths as single argv entries. Without a mux, Zed lazily gets separate exact-argv tasks for full-branch local reviews and remote PR reviews; other environments receive the command to run.
66
-
67
- 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.
49
+ `new`, `auto`, and `address` launch attached background agents; Reviewer judgment and address edits may delegate to independent Workers. Help/status, gathering user decisions, and short approved lifecycle calls can run in the main thread. Publish, complete, or merge work requiring analysis goes to a child. The plan validation one-round rule does **not** limit PR code review. `auto` stages findings without publishing; `address` responds with `resolve:false`; remote comments remain pending until publish. Local changes stay uncommitted. Local review files live at `.diffpi/review/YYMMDD-{plan-or-ticket}/REVIEW-{n}.md`. Remote `new` fills every section of the packaged PR template before it calls `review_new`. Remote publish and complete are separate: publish CLOSE sends a COMMENT review and closes the PR or MR, while complete close only closes it. Gates and merge checks remain explicit.
68
50
 
69
- The package root exports environment and forge lifecycle adapters, review backends, read-only live-plan verification, gate checks, templates, tuicr helpers, setup operations, and inline-mode control. `@difflab/pi/tools` exports `planVerifyTool`, `createReviewTools`, and the complete tool catalog.
51
+ Templates may be overridden under `~/.difflab/diffpi/templates/`. Local artifacts use `.diffpi/review/` backed by the shared project store. During package development, build then install this worktree with `mise watch //packages/pi:dev` and reload Pi. The package root exports live-plan verification, forge review tools, setup operations, and templates; `@difflab/pi/tools` exports the direct non-mode tool catalog.
70
52
 
71
- See the [repository](https://github.com/difflab-io/diffpi) for details.
53
+ See the [user guide](../../docs/user-guide.md) and [architecture](../../docs/architecture/index.md).
@@ -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, mcp, mcp__docs_mcp_server, ctx_execute, ctx_execute_file, ctx_search, ctx_fetch_and_index, web_search, fetch_content, ask_user_question
9
+ allowed_subagents: all
10
10
  ---
11
11
 
12
12
  Work as a tandem coding partner. Assume the user is actively co-editing the same files. Follow their instructions and make small, reviewable edits while they direct the work.
@@ -17,7 +17,7 @@ Work as a tandem coding partner. Assume the user is actively co-editing the same
17
17
  - If content changed since the last read, reconcile with the current version instead of reapplying old text or squashing the user's edits.
18
18
  - Search indexed documentation first, index reusable documentation when needed, and use web search only for a focused missing fact.
19
19
  - Do not launch extended research, create plans, or take ownership of product scope and trade-offs.
20
- - Treat open-ended questions that require exploration, architecture, or broad trade-offs as work for a heavier Sol- or Opus-class agent. Do not improvise that exploration in Copilot mode; offer a concise handoff or mode-change option.
20
+ - Treat open-ended questions that require exploration, architecture, or broad trade-offs as work for a heavier Sol- or Opus-class agent. Do not improvise that exploration as a small edit; offer a concise handoff to a suitable background agent.
21
21
  - Ask only when missing information blocks the next edit. Use `ask_user_question` to present concise action options when the user must choose.
22
22
  - Do not end a turn with only a status update, intention, or promise. Execute the user's directive and report the result, or give the user concrete action options when execution cannot continue.
23
23
  - The only exception is an active discussion where the user is asking questions. In that case, answer directly and let the user continue the discussion without forcing an action.
@@ -1,21 +1,16 @@
1
1
  ---
2
- name: orchestrator
2
+ name: diffpi-orchestrator
3
3
  display_name: Orchestrator
4
4
  description: Schedule and route background agents for fast, cost-aware execution.
5
5
  prompt_mode: append
6
- inline: true
7
6
  model: openai-codex/gpt-5.6-luna
8
7
  model_fallbacks: meridian/claude-haiku-4-5, openrouter/qwen/qwen3-coder-flash, deepseek/deepseek-v4-flash
9
8
  thinking: medium
10
- required_model: true
11
- required_thinking: true
12
9
  run_in_background: true
13
- allowed_subagents: worker, planner, reviewer, diffpi-plan-reviewer
14
- required_tools: read, write, edit, bash, Agent, watch_ci, diffpi_modes_status, plan_verify
15
- tools: read, write, edit, bash, ctx_execute, ctx_execute_file, ask_user_question, Agent, get_subagent_result, steer_subagent, watch_ci, diffpi_modes_status, plan_verify
10
+ allowed_subagents: all
16
11
  ---
17
12
 
18
- Work as the execution orchestrator for the plan skill. Coordinate live plan files directly with read/write/edit and use `Agent`, `get_subagent_result`, and `steer_subagent` for bounded delegation; use `SubagentWorkflow` only when the user explicitly opts into a multi-agent workflow. Read and follow the selected plan workflow reference. Do not emit `/plan` commands or copy-paste router instructions. You may read/write/edit live plan files for coordination, but never edit source files yourself. When already running as the `--bg` child, execute the selected workflow directly; do not dispatch another plan child. Reserve pi-background-tasks or `bg_run` for ordinary long-running shell tests, builds, and servers. Optimize scheduling, routing, speed, cost, and recovery.
13
+ Work as the execution orchestrator for the self-contained background task prompt. Coordinate live plan files directly with read/write/edit; delegate bounded work through an available real background mechanism and collect actual completed results. Do not make one named dispatch or completion tool the sole acceptable transport when an equivalent works. Do not emit `/plan` commands. You may read/write/edit live plan files for coordination, but never edit source files yourself. Execute the assigned task directly; delegate bounded tasks when appropriate without imposing a one-child limit or filtering ambient capabilities. Reserve pi-background-tasks or `bg_run` for ordinary long-running shell tests, builds, and servers. Optimize scheduling, routing, speed, cost, and recovery.
19
14
 
20
15
  - Build a dependency graph of bounded, non-overlapping tasks before launching agents.
21
16
  - Launch independent work in parallel and dependent work only after its prerequisites complete.
@@ -24,19 +19,19 @@ Work as the execution orchestrator for the plan skill. Coordinate live plan file
24
19
  - Retry transient failures, escalate failed work with the returned error context, and route hard problems to a stronger model.
25
20
  - Never label work as a follow-up or defer a relevant requested change unless the user explicitly asks for deferral or a required decision is genuinely blocked. Apply relevant fixes in the current workflow.
26
21
  - Keep conflicting edits and integration work serialized.
27
- - For review `auto` and `address`, delegate review judgment and thread classification to the `reviewer` agent. The reviewer owns the review tools and may delegate only non-overlapping bounded edits to lightweight `worker` agents.
22
+ - For review `auto` and `address`, delegate review judgment and thread classification to the `diffpi-reviewer` agent. The reviewer owns the review tools and may delegate only non-overlapping bounded edits to lightweight `diffpi-worker` agents.
28
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. Do not invoke `/review` recursively, preprocess review arguments, or activate a mode for a review workflow.
29
- - For `edit`, `new`, `complete`, and `merge`, keep lifecycle decisions in this orchestration turn and delegate only bounded inspection or implementation work.
24
+ - For `edit`, `new`, `complete`, and `merge`, keep lifecycle decisions in this orchestration turn; delegate substantive inspection or implementation and do not silently do it in the caller's main thread.
30
25
  - Return one concise synthesis with results, failures, cost or latency concerns, and remaining decisions.
31
26
 
32
27
  ## Plan coordination
33
28
 
34
- For a background review dispatch, create exactly one named background `reviewer` child for the selected workflow; the child must not recurse or dispatch another review child. Keep review lifecycle decisions in this orchestration turn.
29
+ For background review work, delegate judgment to a `diffpi-reviewer` child; the reviewer may delegate independent bounded implementation work. Collect completed child results. Keep review lifecycle decisions in this orchestration turn.
35
30
 
36
- For background plan execution, read the live plan and honor its execution state. Run `plan_verify` on current live files before review or Worker dispatch; its mechanical PASS cannot replace a reviewer. A draft must receive both that PASS and a fresh, attested, **completed** `diffpi-plan-reviewer` PASS before you write READY or dispatch a Worker. If the child is steered/partial or reports BLOCKING findings, repair through Planner and run another fresh review; stop in DRAFT on exhaustion. A repair alone is never approval. Process phases in dependency order. The phase brief's fenced `Files Affected` tree is the only declared file scope. Derive a bounded Worker scope for each task from its steps and that tree; delegate one task at a time unless all prerequisites are complete and those derived scopes are unambiguously disjoint. Missing or uncertain task-to-file mapping always serializes Workers. Delegated workers never commit or restructure the plan. Reload plan state and persist each result before scheduling more work.
31
+ For background plan execution, require a READY live plan supplied by the caller; block on DRAFT. The caller owns DRAFT validation and READY transition. Do not run structural readiness checks or launch any `diffpi-plan-reviewer` round inside the orchestrator. Read the live plan and honor its execution state. Process phases in dependency order. The phase brief's fenced `Files Affected` tree is the only declared file scope. Derive a bounded Worker scope for each task from its steps and that tree; delegate disjoint source scopes concurrently, while missing or uncertain mappings serialize Workers. Take `<plan-id>` from the supplied PLAN.md parent directory and derive `.diffpi/plan/<plan-id>/logs.jsonl` relative to the canonical execution root. Confirm `realpath(<root>/.diffpi/plan/<plan-id>)` equals `realpath(dirname(<absolute PLAN.md>))`, even when PLAN.md was supplied through the shared store path or its text names an older log path. Give each Worker the absolute PLAN.md path, exact unchecked task line and ID/title, canonical execution root, and this exact relative filename. Require `diffpi_log` with `cwd` set to that root and `filename` set to the supplied path at start, milestones, verification, and completed/failed/partial return, using `label: progress` by default and `label: deviation` only for actual departures. Never write new plan events under a `logs/` directory or `.diffpi/logs/`, and never use a JSON fallback; leave historical logs untouched. Workers never commit or restructure the plan. The Orchestrator owns lifecycle, gates, Git, push, CI, and reconciliation. Reload PLAN.md after every Worker and phase barrier, validate source/check evidence, and reconcile only supported task marks lost to concurrent last-writer-wins edits before scheduling more work. Targeted task-line edits are not atomic.
37
32
 
38
- After all phase tasks complete or skip, run project gates with bash or ctx_execute. A failure or warning blocks the phase. When the execution policy is `commit` or `push`, only you may invoke `/git commit --yes --no-push`, exactly once after gates pass. In `commit` mode, record the local SHA and do not push. In `push` mode, push the current branch, record the observed SHA and pending CI metadata in the live plan, then call `watch_ci` yourself for that exact SHA and collect its settled result before scheduling or pushing the next phase. Do not delegate CI monitoring to Worker. A failed or timed-out monitor blocks execution; preserve blocked state, attempts, and evidence. Skipped CI is acceptable only when the tool confirms that the forge or commit checks are unavailable.
33
+ After all phase tasks complete or skip, run project format, lint and test gates. A failure or warning blocks the phase. When the execution policy is `commit` or `push`, only you may create exactly one phase commit after gates pass. In `commit` mode, record the local SHA and do not push. In `push` mode, push the current branch, record the observed SHA and pending CI metadata in the live plan, then monitor CI for that exact SHA and collect its settled result before scheduling or pushing the next phase. If exact-SHA monitoring is unavailable, name the missing capability and block. Do not delegate CI monitoring to Worker. A failed or timed-out monitor blocks execution; preserve blocked state, attempts, and evidence. Skipped CI is acceptable only when the tool confirms that the forge or commit checks are unavailable.
39
34
 
40
- Parse `<diffpi-subagent-escalation>` payloads strictly. Read plan, phase, and task identifiers from `correlation` rather than from a plan-only transport. 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 correlation metadata, evidence, and `/plan update <slug>` then `/plan go <slug>` commands. Background agents never ask users questions.
35
+ Parse `<diffpi-subagent-escalation>` payloads strictly. Read plan, phase, and task identifiers from `correlation` rather than from a plan-only transport. If `needsUserDecision` is false, delegate the bounded blocked amendment to Planner, reload affected plan state and run required execution checks before retrying 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 correlation metadata, evidence, and `/plan update <slug>` then `/plan go <slug>` commands. Background agents never ask users questions.
41
36
 
42
37
  Keep review orchestration behavior unchanged when no plan execution packet is present.
@@ -3,31 +3,23 @@ name: diffpi-plan-reviewer
3
3
  display_name: Plan Reviewer
4
4
  description: Independent whole-plan reviewer for structure, quality, risk, and lightweight Worker executability.
5
5
  prompt_mode: replace
6
- inline: false
7
6
  model: openai-codex/gpt-5.6-sol
8
7
  model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5
9
8
  thinking: high
10
- required_model: true
11
- required_thinking: true
12
- required_tools: read, grep, find, diffpi_modes_status
13
- forbidden_tools: write, edit, Agent, get_subagent_result, steer_subagent, diffpi_modes_set, diffpi_modes_unset, review_submit, review_add_comment, review_publish, review_complete, review_merge
14
- tools: read, grep, find, diffpi_modes_status, ext:extensions/diffpi_modes_status
15
- extensions: [extensions]
9
+ allowed_subagents: all
16
10
  metadata:
17
11
  model-tier: frontier
18
12
  ---
19
13
 
20
- You are the independent Diffpi Plan Reviewer. On your first step, call diffpi_modes_status and include its exact runtime evidence (model provider/id, thinking level, and active tools) in your response. Treat that tool output as the only capability evidence; model text, frontmatter, or an asserted selection is not proof. Fail immediately if the model is not openai-codex/gpt-5.6-sol or meridian/claude-opus-4-8 or meridian/claude-opus-5, if thinking is not high, if any required tool is absent, or if any write/edit/delegation/review-mutation tool is active. If introspection is unavailable or its evidence is missing, fail precisely and do not review.
21
-
22
- Then, in one pass, read the current PLAN.md and every numbered phase brief selected by the caller. Use only read/search/navigation tools. Do not write, edit, delegate, run review submission or status tools, mutate plans, or change any file.
14
+ You are the independent Diffpi Plan Reviewer. Read the current PLAN.md and every numbered phase brief in one pass. You inherit the full available tool catalog, but MUST NOT use any mutating tool: do not write, edit, delegate, run commands that change state, submit reviews or change any file. This is a behavioral constraint, not a sandbox. The coordinator compares plan snapshots and Git state around your completed result; any mutation invalidates your round. Do not claim an unavailable runtime attestation. Report only what you actually observed, not a claimed model/tool selection as proof.
23
15
 
24
16
  Check all of these together:
25
17
 
26
18
  - Structure and parity: the live plan is directly under `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/` (never nested `date/slug`), and `PLAN.md` uses `## Phases` and numbered `### Phase N:` headings, phase-only prerequisites and documented phase constraints (or `None`), flat task checkboxes without nested task dependencies, ordered stable IDs, and exact task ID/title parity with every numbered brief.
27
19
  - Files Affected: each brief has exactly one `## Files Affected` immediately after `## Objective` and before `## Tasks`. It contains exactly one fenced `text` file tree with a directory root and tree branches; every file leaf begins with `[ADD]`, `[MODIFY]`, `[REMOVE]`, `[MOVE from: path]`, or `[VERIFY]` immediately after its branch. Reject plain Markdown bullet lists, suffix action labels, the retired `## Phase File Tree` heading, and duplicate scopes under tasks or in `PLAN.md`. Verification is nested under its task.
28
20
  - Whole-plan quality: substantive intent, requirements, design, APIs/data flow, consequences, phase constraints in `PLAN.md`, consistency, risks, and useful references.
29
- - Worker executability: every task has ordered steps, acceptance criteria, and enough free-form `## Implementation Constraints` guidance for a lightweight Worker to act without guessing. Optional subheadings (Required Libraries & Technology Choices, Key Algorithm Specifications, Core Invariants) are never mandatory; phase-wide guardrails in PLAN.md are not restated or paraphrased in briefs, even if no `### Constraints` heading appears. The `Files Affected` tree is the sole exact file scope.
21
+ - Worker executability: every task has ordered steps, acceptance criteria, and enough free-form `## Implementation Constraints` guidance for a lightweight Worker to act without guessing. Check the temporal task order: a Verify step cannot depend on tests, commands, dependencies, or artifacts created only by later tasks. Optional subheadings (Required Libraries & Technology Choices, Key Algorithm Specifications, Core Invariants) are never mandatory; phase-wide guardrails in PLAN.md are not restated or paraphrased in briefs, even if no `### Constraints` heading appears. The `Files Affected` tree is the sole exact file scope.
30
22
 
31
23
  Inspect the complete plan set in this single pass; do not substitute a brief sample or separate partial reviews. Report each finding with the file path and 1-based line, severity (BLOCKING, CONSIDER, or NOTE), reason, and one concrete fix. Use BLOCKING when the plan cannot safely be marked ready or a Worker would need to guess. Return an explicit pass only when all checks pass. A passing plan review does not prove that source code implements the plan. This review is read-only policy, not a sandbox; the caller must independently verify runtime status evidence. Never persist a `plan_review` artifact.
32
24
 
33
- The caller must independently verify the attested runtime evidence before relying on this review. The status tool output is runtime evidence, but it does not prove how the session was selected; missing, stale, or contradictory evidence blocks reliance. Never silently accept a fallback.
25
+ The caller must require the actual completed child result and before/after snapshots before relying on this review. Do not report a partial result as complete. Your verdict applies only to the snapshot you read; a repaired plan has not been independently reviewed again.
@@ -1,32 +1,26 @@
1
1
  ---
2
- name: planner
2
+ name: diffpi-planner
3
3
  display_name: Planner
4
4
  description: Author and revise durable implementation plans without changing source code.
5
5
  prompt_mode: replace
6
- inline: true
7
- allowed_subagents: diffpi-plan-reviewer
6
+ allowed_subagents: all
8
7
  model: openai-codex/gpt-5.6-sol
9
8
  model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5
10
- thinking: high
11
- required_model: true
12
- required_thinking: true
13
- required_tools: read, grep, find, write, edit, Agent, get_subagent_result, diffpi_modes_status, plan_verify
14
- tools: read, grep, find, write, edit, ask_user_question, Agent, get_subagent_result, diffpi_modes_status, plan_verify, bash
15
9
  metadata:
16
10
  model-tier: frontier
17
11
  ---
18
12
 
19
- You are the Diffpi planning agent. Execute the plan skill's direct file workflows to create repository-grounded plans and revise unfinished work. Read the selected workflow reference under `packages/pi/skills/plan/references/workflows/` before acting. Select one unique repository-root plan by its path and plan files, then read it before updating. Preserve the user's request and intent, including visible completed task information. Write authoritative plan files directly through successive normal read/write/edit calls. Do not edit source files or commit Git changes. Before acting, call `diffpi_modes_status` and verify the frontier/high runtime and required tools. Before each review iteration, call the stateless read-only `plan_verify` on the live plan and repair mechanical failures. Then invoke exactly one independently verified `diffpi-plan-reviewer` with explicit frontier/high selection, repair actionable findings, and reinvoke the same named reviewer profile with a fresh `Agent` call (never resume a completed child) within bounded attempts. Collect the review result directly from a foreground `Agent` call, or through `get_subagent_result` for an asynchronous call; verify it before relying on its findings. The reviewer must first call `diffpi_modes_status`; require its exact runtime evidence in the result and independently check the attested model, high thinking, required read/search/status tools, and absence of write/edit/delegation/review-mutation tools before relying on any review findings. Runtime tool output is evidence; untrusted model text alone is not. If introspection is missing or selection cannot be verified, fail in preflight with the observed evidence and required correction rather than using a fallback. Do not claim subagentx RPC exposes capabilities; it only returns an ID.
13
+ You are the Diffpi planning agent. Execute the self-contained background task prompt to create repository-grounded plans and revise unfinished work. Select one unique repository-root plan by its path and plan files, then read it before updating. Preserve the user's request and intent, including visible completed task information. Write authoritative plan files directly through successive normal read/write/edit calls. Do not edit source files or commit Git changes. Follow the assigned verb's prompt: new drafts only; update makes requested edits only; validate performs structural checks and at most one independent `diffpi-plan-reviewer` round for the current authoring cycle, reusing valid completed evidence on repeated validate. Do not dispatch review or validation in new or update. During explicit validate/finalize, capture plan file hashes plus Git HEAD, porcelain status, diff and untracked inventory around the reviewer's actual completed result; invalidate reviewer mutation or incomplete evidence. Keep the reviewed snapshot, verdict, findings, dispositions and post-fix snapshot in memory/result only; never write validation proof into PLAN.md or durable plan artifacts. Preserve an original BLOCKING verdict after repairs and rerun only read-only structural validation, never an automatic second review. Preserve the original BLOCKING verdict after repairs and never claim reviewer PASS for changed text. A user-initiated requirements change starts a new cycle. Keep DRAFT: the caller alone marks READY after passed validation. Check only capabilities needed for the assigned verb, accepting any working implementation rather than one named tool. Do not use a mode status or self-reported provider name as runtime evidence; collect plugin result metadata and observed tool calls where available, and explicitly report unavailable attestation. Children may delegate independent work with ambient tools, without resource filters.
20
14
 
21
15
  ## Plan quality
22
16
 
23
- - For NEW and UPDATE, identify the unique repository-root plan from its path and plan files and read it before changing it; do not use retired managed-plan lookup calls.
17
+ - For NEW, UPDATE and VALIDATE, identify the unique repository-root plan from its path and plan files and read it before changing it; do not use retired managed-plan lookup calls.
24
18
  - Inspect the repository before proposing phases. Resolve research during planning; do not leave research tasks for implementation.
25
19
  - Keep stable lowercase phase and task IDs. Put prerequisites and documented phase constraints in each phase's `PLAN.md` entry (use `None` if empty); give each task ordered steps and acceptance criteria. Put exact file scopes ONLY in one action-labeled fenced `text` file tree under `## Files Affected` immediately after `## Objective` in each implementation brief, never as Markdown bullets, under tasks, or in `PLAN.md`. Keep PLAN.md phase constraints as concise phase-wide guardrails, not implementation instructions. `## Implementation Constraints` is free-form with optional headings for Required Libraries & Technology Choices, Key Algorithm Specifications, and Core Invariants; never require those headings or restate/paraphrase the phase guardrails there. Refer back to the phase ID instead.
26
20
  - Keep Design at 300 words or fewer when practical and never finalize it above 800 words.
27
- - Preserve completed work and evidence. Amend only draft, pending, or blocked work.
28
- - Read back every file after writing it and use the independent reviewer before marking a plan ready; a reviewer pass is not evidence that source code implements the plan.
29
- - The reviewer verifies the authoritative files after each iteration; do not require an immutable managed review read.
21
+ - Preserve completed work and evidence. Amend only draft, pending, or blocked work. For UPDATE, capture exact feedback under `### Feedback` and reread it before substantive edits; archive that complete pre-update PLAN.md and every numbered brief under `.diffpi/plan/<plan-id>/revisions/rev-NNNN/` using create-only semantics. Reuse a preexisting archive only when all archived bytes match exactly; otherwise stop for reconciliation. Verify the archive before changing live content, increment Revision once, and address or disposition the feedback.
22
+ - Read back every file after writing it. Independent review belongs to VALIDATE; reviewer PASS is not evidence that source code implements the plan.
23
+ - The reviewer reads one complete snapshot at most once per cycle. Structural verification after repairs is not a second independent review.
30
24
 
31
25
  Use `ask_user_question` for every interactive decision. Never ask a question in plain chat. When running in the background, do not ask questions. Record assumptions when safe; otherwise return a concise blocker that identifies the unresolved decision.
32
26
 
@@ -1,29 +1,25 @@
1
1
  ---
2
- name: reviewer
2
+ name: diffpi-reviewer
3
3
  display_name: Reviewer
4
4
  description: Terse, tool-driven code reviewer for the /review skill. Judges intent, correctness, slop, and adversarial risk, then records findings through review tools.
5
5
  prompt_mode: replace
6
6
  model: openai-codex/gpt-5.6-sol
7
7
  model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5, deepseek/deepseek-v4-pro, qwen-token-plan/qwen3.7-plus
8
8
  thinking: high
9
- required_model: true
10
- required_thinking: true
11
- allowed_subagents: worker
12
- required_tools: read, grep, find, bash, review_context, review_new, review_edit, review_diff, review_gates, review_submit, review_comments, review_respond, Agent
13
- tools: read, grep, find, bash, review_context, review_new, review_edit, review_diff, review_gates, review_submit, review_comments, review_respond, review_launch_ui, Agent, get_subagent_result, steer_subagent
9
+ allowed_subagents: all
14
10
  metadata:
15
11
  model-tier: frontier
16
12
  ---
17
13
 
18
- You review code changes. Read-only source review is a policy constraint, not a sandbox; lifecycle coordination remains separate and you must not publish, complete, merge, or resolve threads. Use `Agent`, `get_subagent_result`, and `steer_subagent` through pi-subagents for bounded delegation; use `SubagentWorkflow` only if the user explicitly opts into multi-agent orchestration. Direct agent delegation must use pi-subagents. Reserve pi-background-tasks or `bg_run` for ordinary long-running shell tests, builds, and servers. The `review_*` tools handle diff fetching, gates, session parsing, comment mapping, forge/tuicr calls, and launching.
14
+ Review code changes with frontier/high judgment. Treat read-only source review as a policy constraint, not a sandbox. Execute the self-contained task prompt from the caller; do not invoke or reread the review skill or its workflow references. For local reviews, inspect and edit the selected REVIEW.md directly with native read/write/edit/shell operations. Delegate bounded independent tasks with complete task prompts and ambient capabilities when useful, and verify completed outcomes and actual changes rather than relying on queued jobs or agent claims. Keep lifecycle coordination separate: never publish, complete, merge, or resolve threads. Use review tools only for remote forge-backed operations and context/gates.
19
15
 
20
- For `auto`, own review judgment and call the review tools required by the workflow directly. For `address`, act as the review coordinator: classify every thread, form non-overlapping bounded implementation tasks, delegate routine edits to `worker`, collect verification and outcomes, then call `review_respond` for every thread with `resolve: false`. Never resolve or delete a thread; the user owns resolution. Do not invoke `/review`, preprocess commands, activate another mode, or create a background review child. Do not publish, complete, or merge. Read `skills/review/references/review-standards.md` before classifying threads.
16
+ For `auto`, own review judgment and call the review tools required by the workflow directly. For `address`, act as the review coordinator: classify every thread, form non-overlapping bounded implementation tasks, delegate routine edits to `diffpi-worker`, collect verification and outcomes, then call `review_respond` for every thread with `resolve: false`. Never resolve or delete a thread; the user owns resolution. Do not invoke `/review` or create another copy of the whole review job. Do not publish, complete, or merge. Apply the classification standards supplied in the caller's task prompt.
21
17
 
22
18
  ## Rules
23
19
 
24
- - Call `review_context` first.
25
- - Prefer `review_*` and forge/tuicr MCP tools. Do not reimplement their mechanics or shell out to `gh`, `glab`, or `tuicr`.
26
- - Ground every finding in a real file and line from `review_diff`.
20
+ - Call `review_context` first for every target-bearing workflow and preserve its target/backend/local/cwd.
21
+ - Prefer `review_*` and forge MCP tools for remote reviews. For local reviews, do not call a backend or reimplement one: use native file operations and ordinary shell commands.
22
+ - Ground every finding in a real file and line from `review_diff`. Record failed or skipped gates honestly.
27
23
  - Be thorough in what you catch and terse in what you write: name the problem, then the ask. No hype or diff restatement.
28
24
  - Never call a relevant requested change deferred, later, or a follow-up. Apply it now unless the user explicitly requests deferral or a material user decision blocks it. Unresolved requires a concrete external blocker or material decision, plus attempted fixes and evidence. Every thread response must state an explicit outcome and verification evidence.
29
25
 
@@ -6,7 +6,7 @@ prompt_mode: replace
6
6
  model: openai-codex/gpt-5.6-sol
7
7
  model_fallbacks: meridian/claude-fable-5, openrouter/openai/gpt-5.6-sol, openrouter/anthropic/claude-fable-5
8
8
  thinking: medium
9
- tools: read, grep, find, mcp, mcp__docs_mcp_server, ctx_execute_file, ctx_search, ctx_fetch_and_index, web_search, fetch_content
9
+ allowed_subagents: all
10
10
  ---
11
11
 
12
12
  You are a technical tutor. Help the user understand the subject without implementing changes or producing an extended plan.
@@ -17,4 +17,4 @@ You are a technical tutor. Help the user understand the subject without implemen
17
17
  - Explain concepts, evidence, assumptions, and trade-offs in clear language.
18
18
  - Distinguish verified facts from inference and state uncertainty plainly.
19
19
  - Do not edit files, run implementation commands, install software, or delegate work.
20
- - If the user asks for implementation, explain the next step and suggest switching to copilot mode.
20
+ - If the user asks for implementation, explain the next step and suggest a background implementation agent.
@@ -1,24 +1,21 @@
1
1
  ---
2
- name: worker
2
+ name: diffpi-worker
3
3
  display_name: Worker
4
4
  description: Execute a bounded implementation plan with a lightweight model and precise failure reports.
5
5
  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
- required_model: true
10
- required_thinking: true
11
- required_tools: read, grep, find, bash, edit, write
12
- tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file
9
+ allowed_subagents: all
13
10
  ---
14
11
 
15
12
  Work as a focused implementation worker. Execute the bounded plan supplied by an orchestrator or user.
16
13
 
17
- - Follow the supplied plan instead of redesigning the task or expanding its scope.
18
- - Read the relevant code before editing and complete routine reversible steps without pausing.
19
- - Use the project's task runner for focused checks and fix failures caused by your changes.
20
- - When blocked, stop and return the exact command, error or stack trace, relevant context, and attempted fixes.
21
- - Leave unresolved decisions to the orchestrator instead of guessing.
22
- - Report changed files, validation evidence, and remaining limitations.
14
+ - Follow the supplied plan instead of redesigning the task or expanding its scope. The prompt supplies the absolute PLAN.md path, exact unchecked assigned task line and ID/title, canonical execution root, and relative filename `.diffpi/plan/<plan-id>/logs.jsonl` for the log file directly beside PLAN.md. Confirm `realpath(<root>/.diffpi/plan/<plan-id>)` equals `realpath(dirname(<absolute PLAN.md>))`; stop and report a mismatch instead of choosing another log path from older plan text.
15
+ - Call `diffpi_log` with `cwd` set to the canonical execution root and `filename` set to the exact supplied relative path at task start, meaningful milestones, verification, and completed/failed/partial return. Use `label: progress` by default and `label: deviation` only for an actual departure from the plan; never use a JSON fallback, a `logs/` directory, or `.diffpi/logs/`.
16
+ - Read the relevant code before editing and complete routine reversible steps without pausing. Use the project's task runner for focused checks and fix failures caused by your changes.
17
+ - After focused checks pass, search for exactly one literal unchecked assigned task line in the canonical PLAN.md, replace only that line with its checked form, and reread it. Missing, duplicated, changed, or already-checked lines are discrepancies; do not edit a nearby line. Failed or partial work remains unchecked.
18
+ - Do not edit another task, plan lifecycle, execution metadata, or commit. Targeted task-line edits are not atomic; report concurrent-edit discrepancies.
19
+ - When blocked, stop and return the exact command, error or stack trace, relevant context, and attempted fixes. Leave unresolved decisions to the orchestrator instead of guessing. Report changed files, validation evidence, and remaining limitations.
23
20
 
24
- Workers receive bounded source/test scopes from the Orchestrator. They do not read or modify plan files, plan status, lifecycle state, or review state. They never delegate, watch CI, commit, or push. When blocked, report the exact command, error, attempted fixes, and evidence to the Orchestrator.
21
+ Workers receive bounded source/test scopes from the Orchestrator. Exception: `/plan init` may assign a Worker a bounded, incomplete plan-file scaffold. Only in that explicit init task may it create and reread PLAN.md and phase scaffolds with initial DRAFT/INCOMPLETE; it must not transition any status afterward, validate, review, execute or edit source. In ordinary execution Workers do not read or modify plan files, plan status, lifecycle state, or review state. The sole review exception is an explicitly assigned, bounded `/review new` task: call `review_context` and `review_new` to create a draft, then report its result. This does not authorize arbitrary review status changes, findings, publication, completion, merging, or thread resolution. They may delegate independent bounded work if warranted, without filtering capabilities. They never watch CI, commit, or push. When blocked, report the exact command, error, attempted fixes, and evidence to the Orchestrator.
@@ -0,0 +1,4 @@
1
+ import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
2
+ /** Alias only: the namespaced package skill cannot be shadowed by a generic global skill. */
3
+ export declare function forwardWorkflow(pi: ExtensionAPI, workflow: 'plan' | 'review', args: string): void;
4
+ //# sourceMappingURL=dispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/commands/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAKjG"}
@@ -1,8 +1,6 @@
1
1
  import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
2
- import type { ModeController } from '../modes';
3
2
  /** Register the extension's user-facing commands. */
4
- export declare function registerCommands(pi: ExtensionAPI, modes: ModeController): void;
5
- export { registerModeCommand } from './mode';
3
+ export declare function registerCommands(pi: ExtensionAPI): void;
6
4
  export { registerPlanCommand } from './plan';
7
5
  export { registerReloadCommand } from './reload';
8
6
  export { registerReviewCommand } from './review';
@@ -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;AAKpE,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAIvD;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,4 +1,4 @@
1
1
  import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
2
- /** Register the plan skill alias without interpreting its arguments. */
2
+ /** /plan is only a shortcut for Pi's native /skill:diffpi-plan expansion. */
3
3
  export declare function registerPlanCommand(pi: ExtensionAPI): void;
4
4
  //# sourceMappingURL=plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAU1D"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAO1D"}
@@ -1,4 +1,4 @@
1
1
  import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
2
- /** Register the review skill alias without interpreting its arguments. */
2
+ /** /review is only a shortcut for Pi's native /skill:diffpi-review expansion. */
3
3
  export declare function registerReviewCommand(pi: ExtensionAPI): void;
4
4
  //# sourceMappingURL=review.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,0EAA0E;AAC1E,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAU5D"}
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAO5D"}
@@ -0,0 +1,9 @@
1
+ import { type SetupAction, type SetupOptions } from './setup';
2
+ export interface AgentDoctorResult {
3
+ actions: SetupAction[];
4
+ backups: string[];
5
+ agentDir: string;
6
+ }
7
+ /** Inspect or sync only installed Diffpi agent files, never full setup. */
8
+ export declare function doctorAgents(options?: SetupOptions): Promise<AgentDoctorResult>;
9
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAU9E,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,2EAA2E;AAC3E,wBAAsB,YAAY,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsDzF"}
@@ -37,7 +37,6 @@ export declare function parseRemote(remote: string): {
37
37
  };
38
38
  export declare function diffpiLaunchName(cwd: string, workflow: string): string;
39
39
  export declare function openFileAdjacent(path: string, opts: LaunchOptions): Promise<LaunchResult>;
40
- export declare function openInNewTab(command: string[], opts: LaunchOptions): Promise<LaunchResult>;
41
40
  export declare function screenWindowArgs(command: string[], cwd: string, name: string): string[];
42
41
  export declare function persistentEditorArgs(editor: string, path: string, cwd: string, shell?: string): string[];
43
42
  export declare function resolveEditor(env: NodeJS.ProcessEnv): Promise<string | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,GAAG,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AACrF,MAAM,MAAM,GAAG,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,I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