@difflab/pi 0.4.0 → 0.5.0-rc.202609231313.eaf7fa0

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 (128) hide show
  1. package/README.md +9 -9
  2. package/agents/diffpi-copilot.md +6 -3
  3. package/agents/diffpi-orchestrator.md +1 -1
  4. package/agents/diffpi-planner.md +3 -3
  5. package/agents/diffpi-reviewer.md +3 -3
  6. package/agents/diffpi-worker.md +2 -2
  7. package/dist/assets.d.ts +1 -0
  8. package/dist/assets.d.ts.map +1 -1
  9. package/dist/cli/plan.d.ts +7 -3
  10. package/dist/cli/plan.d.ts.map +1 -1
  11. package/dist/cli.js +306 -811
  12. package/dist/commands/plan.d.ts +0 -1
  13. package/dist/commands/plan.d.ts.map +1 -1
  14. package/dist/commands/review.d.ts +0 -1
  15. package/dist/commands/review.d.ts.map +1 -1
  16. package/dist/commands.d.ts +22 -0
  17. package/dist/commands.d.ts.map +1 -0
  18. package/dist/config.d.ts.map +1 -1
  19. package/dist/environment.d.ts +2 -1
  20. package/dist/environment.d.ts.map +1 -1
  21. package/dist/extensions/cmdtsx.d.ts +2 -0
  22. package/dist/extensions/cmdtsx.d.ts.map +1 -0
  23. package/dist/extensions/fsx.d.ts +8 -0
  24. package/dist/extensions/fsx.d.ts.map +1 -0
  25. package/dist/extensions/index.js +5057 -3069
  26. package/dist/extensions/processx.d.ts +1 -0
  27. package/dist/extensions/processx.d.ts.map +1 -1
  28. package/dist/extensions/subagentx.d.ts +1 -1
  29. package/dist/extensions/subagentx.d.ts.map +1 -1
  30. package/dist/extensions/tuicrx.d.ts +1 -8
  31. package/dist/extensions/tuicrx.d.ts.map +1 -1
  32. package/dist/extensions/zodx.d.ts +8 -0
  33. package/dist/extensions/zodx.d.ts.map +1 -0
  34. package/dist/index.d.ts +10 -11
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +352 -1149
  37. package/dist/plan/index.d.ts +2 -5
  38. package/dist/plan/index.d.ts.map +1 -1
  39. package/dist/plan/markdown.d.ts.map +1 -1
  40. package/dist/plan/operations.d.ts +43 -0
  41. package/dist/plan/operations.d.ts.map +1 -0
  42. package/dist/plan/reviews.d.ts +28 -0
  43. package/dist/plan/reviews.d.ts.map +1 -0
  44. package/dist/plan/store.d.ts +6 -3
  45. package/dist/plan/store.d.ts.map +1 -1
  46. package/dist/plan/types.d.ts +3 -22
  47. package/dist/plan/types.d.ts.map +1 -1
  48. package/dist/review/github-review-backend.d.ts.map +1 -1
  49. package/dist/review/gitlab-review-backend.d.ts.map +1 -1
  50. package/dist/review/index.d.ts +6 -6
  51. package/dist/review/index.d.ts.map +1 -1
  52. package/dist/review/local-reviews.d.ts +31 -0
  53. package/dist/review/local-reviews.d.ts.map +1 -0
  54. package/dist/review/review-backend.d.ts +2 -3
  55. package/dist/review/review-backend.d.ts.map +1 -1
  56. package/dist/review/review-markdown.d.ts +1 -4
  57. package/dist/review/review-markdown.d.ts.map +1 -1
  58. package/dist/review/types.d.ts +0 -28
  59. package/dist/review/types.d.ts.map +1 -1
  60. package/dist/store.d.ts +0 -2
  61. package/dist/store.d.ts.map +1 -1
  62. package/dist/tools/ci.d.ts +6 -0
  63. package/dist/tools/ci.d.ts.map +1 -0
  64. package/dist/tools/index.d.ts +1 -0
  65. package/dist/tools/index.d.ts.map +1 -1
  66. package/dist/tools/index.js +1887 -2805
  67. package/dist/tools/log.d.ts.map +1 -1
  68. package/dist/tools/modes.d.ts.map +1 -1
  69. package/dist/tools/plan-schema.d.ts +211 -0
  70. package/dist/tools/plan-schema.d.ts.map +1 -0
  71. package/dist/tools/plan.d.ts +2 -2
  72. package/dist/tools/plan.d.ts.map +1 -1
  73. package/dist/tools/review.d.ts +0 -30
  74. package/dist/tools/review.d.ts.map +1 -1
  75. package/dist/workflow.d.ts +80 -0
  76. package/dist/workflow.d.ts.map +1 -0
  77. package/package.json +4 -2
  78. package/skills/plan/SKILL.md +15 -7
  79. package/skills/review/SKILL.md +6 -8
  80. package/templates/plan/PLAN.md +2 -0
  81. package/workflows/plan/annotate.md +13 -0
  82. package/workflows/plan/finalize.md +15 -0
  83. package/workflows/plan/go.md +20 -0
  84. package/{skills/plan/references/workflows → workflows/plan}/help.md +11 -4
  85. package/workflows/plan/init.md +13 -0
  86. package/workflows/plan/new.md +20 -0
  87. package/workflows/plan/update.md +18 -0
  88. package/workflows/review/address.md +8 -0
  89. package/workflows/review/auto.md +8 -0
  90. package/workflows/review/complete.md +7 -0
  91. package/workflows/review/edit.md +7 -0
  92. package/workflows/review/help.md +14 -0
  93. package/workflows/review/merge.md +6 -0
  94. package/workflows/review/new.md +7 -0
  95. package/workflows/review/publish.md +6 -0
  96. package/dist/plan/annotations.d.ts +0 -25
  97. package/dist/plan/annotations.d.ts.map +0 -1
  98. package/dist/plan/controller.d.ts +0 -65
  99. package/dist/plan/controller.d.ts.map +0 -1
  100. package/dist/plan/execution.d.ts +0 -13
  101. package/dist/plan/execution.d.ts.map +0 -1
  102. package/dist/plan/ids.d.ts +0 -5
  103. package/dist/plan/ids.d.ts.map +0 -1
  104. package/dist/plan/lock.d.ts +0 -11
  105. package/dist/plan/lock.d.ts.map +0 -1
  106. package/dist/plan/log.d.ts +0 -6
  107. package/dist/plan/log.d.ts.map +0 -1
  108. package/dist/plan/parser.d.ts +0 -18
  109. package/dist/plan/parser.d.ts.map +0 -1
  110. package/dist/review/local-review-backend.d.ts +0 -3
  111. package/dist/review/local-review-backend.d.ts.map +0 -1
  112. package/dist/review/review-state.d.ts +0 -20
  113. package/dist/review/review-state.d.ts.map +0 -1
  114. package/skills/plan/references/workflows/annotate.md +0 -6
  115. package/skills/plan/references/workflows/finalize.md +0 -7
  116. package/skills/plan/references/workflows/go.md +0 -8
  117. package/skills/plan/references/workflows/init.md +0 -6
  118. package/skills/plan/references/workflows/new.md +0 -8
  119. package/skills/plan/references/workflows/update.md +0 -7
  120. package/skills/review/references/workflows/address.md +0 -11
  121. package/skills/review/references/workflows/auto.md +0 -18
  122. package/skills/review/references/workflows/complete.md +0 -7
  123. package/skills/review/references/workflows/edit.md +0 -7
  124. package/skills/review/references/workflows/help.md +0 -30
  125. package/skills/review/references/workflows/merge.md +0 -6
  126. package/skills/review/references/workflows/new.md +0 -19
  127. package/skills/review/references/workflows/open.md +0 -3
  128. package/skills/review/references/workflows/publish.md +0 -8
package/README.md CHANGED
@@ -32,15 +32,15 @@ Standard agents come from the same global and trusted-project directories used b
32
32
  /plan update [short-slug] [--branch name] [--bg] [instructions...]
33
33
  /plan annotate [short-slug]
34
34
  /plan finalize [short-slug]
35
- /plan go <short-slug> [--commit|--no-commit] [--bg]
35
+ /plan go <short-slug> [--mode <no-commit|commit|push>] [--bg]
36
36
  /plan help
37
37
  ```
38
38
 
39
- Foreground `init`, `new`, and `update` select Planner. Foreground `annotate`, `finalize`, `go`, and `help` select Worker. Deferring implementation during finalize restores the default mode, as does completing an inline plan execution. Orchestrator owns background coordination and phase commits. Background work does not change the foreground mode and does not ask questions.
39
+ Foreground `init`, `new`, and `update` select Planner. Foreground `annotate`, `finalize`, and `help` select Worker. Foreground `go` selects Orchestrator, which launches and coordinates implementation Workers. Deferring implementation during finalize restores the default mode, as does completing an inline plan execution. Orchestrator owns background coordination and phase commits. Background work does not change the foreground mode and does not ask questions.
40
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`.
41
+ `/plan annotate` uses `tuicr --file <plan-directory>` and saves an immutable plan review when tuicr closes. 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
42
 
43
- Plan tools cover context, initialization, overview and phase changes, validation, annotations, progress, status, gates, hosted CI monitoring, and execution dispatch. Phase gates run `format:check`, `lint`, and `test`. `--commit` creates and pushes one conventional commit per completed phase, then a bounded background Worker monitors CI for that SHA while the next phase executes. Plan completion waits for every monitor.
43
+ Plan tools cover context, initialization, overview and phase changes, validation, immutable reviews, progress, status, gates, hosted CI monitoring, and durable execution state. Phase gates run `format:check`, `lint`, and `test`. `--mode commit` creates one local conventional commit per completed phase. `--mode push` also pushes each commit, then a bounded background Worker monitors CI for that SHA while the next phase executes. Plan completion waits for every monitor.
44
44
 
45
45
  ## Review
46
46
 
@@ -51,19 +51,19 @@ Plan tools cover context, initialization, overview and phase changes, validation
51
51
  /review new [--local] [--base branch] [--bg]
52
52
  /review edit [pr-number|pr-url|branch] [--local] [--bg]
53
53
  /review address [target] [--local] [--bg]
54
- /review publish [target] [--local] [--comment|--approve|--request-changes|--close] [--bg]
54
+ /review publish [target] [--comment|--approve|--request-changes|--close] [--bg]
55
55
  /review complete [target] [--local|--approve|--reject|--abandon] [--bg]
56
56
  /review merge [target] [--bg]
57
57
  ```
58
58
 
59
- The skill delegates mechanics to `review_context`, `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`. Inline `auto` and `address` activate Reviewer on Sol; lifecycle verbs activate Orchestrator on Luna. 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.
59
+ The package-owned workflows delegate mechanics to `review_context`, `review_new`, `review_edit`, `review_diff`, `review_gates`, `review_submit`, `review_add_comment`, `review_comments`, `review_dump`, `review_respond`, `review_publish`, `review_complete`, `review_merge`, and `review_launch_ui`. Inline `auto` and `address` activate Reviewer on Sol; lifecycle verbs activate Orchestrator on Luna. 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.
60
60
 
61
- `--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.
61
+ `--local` selects a `tuicr` working-tree review. Addressing it saves one immutable dump, applies the feedback, and opens a new review revision. Local reviews have no replies, resolution state, publication, or remote promotion. Dumps live at `.diffpi/review/<branch-slug>/<revision>.json`. Without `--local`, GitHub or GitLab owns comments, replies, publication, and lifecycle state directly. Remote address flows use the upstream `/git commit --no-push` workflow when code changes.
62
62
 
63
- 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. 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.
63
+ Remote review artifacts 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. 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.
64
64
 
65
65
  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
66
 
67
- The package root exports environment and forge lifecycle adapters, review backends, the plan controller and consumer contracts, gate checks, template helpers, tuicr helpers, setup operations, and inline-mode control. Plan storage, Markdown codecs, locks, and transitions remain internal behind the controller. `@difflab/pi/tools` exports `createPlanTools`, `createReviewTools`, and the complete tool catalog.
67
+ The package root exports environment and forge lifecycle adapters, remote review backends, immutable local review dumps, plan storage contracts, gate checks, template helpers, tuicr helpers, setup operations, and inline-mode control. `@difflab/pi/tools` exports `createPlanTools`, `createReviewTools`, and the complete tool catalog.
68
68
 
69
69
  See the [repository](https://github.com/difflab-io/diffpi) for details.
@@ -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
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
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.
@@ -16,7 +16,10 @@ Work as a tandem coding partner. Assume the user is actively co-editing the same
16
16
  - Never overwrite or rewrite a file from a stale copy. Preserve user changes and prefer targeted edits over full-file writes.
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
- - Do not launch extended research, delegate work, create plans, or take ownership of product scope and trade-offs.
20
- - Ask only when missing information blocks the next edit.
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.
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
+ - 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
+ - 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.
21
24
  - Run focused checks after changes and review the resulting diff for accidental overwrites.
22
25
  - Keep explanations short so the user can stay in the editing loop.
@@ -29,7 +29,7 @@ Work only as an execution orchestrator through the pi-subagents tools. Use `Agen
29
29
 
30
30
  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.
31
31
 
32
- 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 immediately push the current branch. Complete the phase with the observed SHA, push timestamp, and pending CI metadata. Launch one bounded background Worker with `Agent` to call `plan_watch_ci` for that exact phase and SHA, then begin executing the next phase while it watches. Collect the monitor before committing or pushing the next phase, and collect every outstanding monitor before completing the plan. A failed or timed-out monitor blocks execution; skipped CI is acceptable only when the tool confirms that the forge or commit checks are unavailable.
32
+ 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 immediately push the current branch. Complete the phase with the observed SHA, push timestamp, and pending CI metadata. Launch one bounded background Worker with `Agent` to call `watch_ci` for the exact SHA and then `plan_record_ci` for that phase, then begin executing the next phase while it watches. Collect the monitor before committing or pushing the next phase, and collect every outstanding monitor before completing the plan. A failed or timed-out monitor blocks execution; skipped CI is acceptable only when the tool confirms that the forge or commit checks are unavailable.
33
33
 
34
34
  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
35
 
@@ -8,12 +8,12 @@ run_in_background: true
8
8
  model: openai-codex/gpt-5.6-sol
9
9
  model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5, deepseek/deepseek-v4-pro, qwen-token-plan/qwen3.7-plus
10
10
  thinking: high
11
- tools: read, grep, find, ask_user_question, plan_context, plan_init, plan_update_overview, plan_add_phase, plan_remove_phase, plan_update_phase, plan_validate, plan_annotations, plan_ack_annotations, diffpi_modes_set, diffpi_modes_unset
11
+ tools: read, grep, find, write, Agent, get_subagent_result, steer_subagent, ask_user_question, plan_context, plan_init, plan_update_overview, plan_add_phase, plan_remove_phase, plan_update_phase, plan_validate, plan_review, diffpi_modes_set, diffpi_modes_unset
12
12
  metadata:
13
13
  model-tier: frontier
14
14
  ---
15
15
 
16
- You are the Diffpi planning agent. Create repository-grounded plans and revise unfinished work. Do not edit source files, write implementation files, or commit Git changes.
16
+ You are the Diffpi planning agent. Create repository-grounded plans and revise unfinished work. Do not edit source files or commit Git changes. You may write only the per-phase implementation files required by the plan workflow.
17
17
 
18
18
  ## Plan quality
19
19
 
@@ -23,7 +23,7 @@ You are the Diffpi planning agent. Create repository-grounded plans and revise u
23
23
  - Keep Design at 300 words or fewer when practical and never finalize it above 800 words.
24
24
  - Preserve completed work and evidence. Amend only draft, pending, or blocked work.
25
25
  - Call `plan_validate` after authoring and use strict validation before marking a plan ready.
26
- - Read pending annotations before applying update instructions. Acknowledge only comments that were applied.
26
+ - Read the immutable plan review for the current plan revision before applying update instructions.
27
27
 
28
28
  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.
29
29
 
@@ -12,9 +12,9 @@ metadata:
12
12
  model-tier: frontier
13
13
  ---
14
14
 
15
- You review code changes. Use `Agent`, `get_subagent_result`, and `steer_subagent` through pi-subagents for bounded delegation; use `SubagentWorkflow` for deterministic multi-stage 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.
15
+ You review code changes. Use `Agent`, `get_subagent_result`, and `steer_subagent` through pi-subagents for bounded delegation; use `SubagentWorkflow` for deterministic multi-stage 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, immutable local review dumps, forge calls, tuicr sessions, and launching.
16
16
 
17
- For `auto`, own review judgment and use the review tools required by the workflow. For `address`, act as the review coordinator: classify threads, 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 publish, complete, or merge. Read `skills/review/references/review-standards.md` before classifying threads.
17
+ For `auto`, own review judgment and use the review tools required by the workflow. For remote `address`, classify threads, delegate bounded edits, collect outcomes, then call `review_respond` with `resolve: false`. For local `address`, call `review_dump`, apply that immutable revision's feedback, and launch the next tuicr revision. Local reviews have no replies or resolution state. Never resolve or delete a remote thread; the user owns resolution. Do not publish, complete, or merge. Read `skills/review/references/review-standards.md` before classifying threads.
18
18
 
19
19
  ## Rules
20
20
 
@@ -34,4 +34,4 @@ For `auto`, own review judgment and use the review tools required by the workflo
34
34
 
35
35
  For `auto`, return findings for `review_submit` as `{ file, line, severity, body, reference }`, with severity `BLOCKING`, `CONSIDER`, or `NOTE`. Put un-anchorable BLOCKING issues in `overallIssues`. Return `[]` when clean.
36
36
 
37
- For `address`, return one outcome per source thread: `fixed`, `answered`, `unresolved`, or `deferred`; include its exact response text and verification evidence. Questions and all addressed threads stay open because the user owns resolution. Never report a thread as resolved during address.
37
+ For remote `address`, return one outcome per source thread: `fixed`, `answered`, `unresolved`, or `deferred`; include response text and verification evidence. For local `address`, report the saved revision, applied changes, checks, and next review launch.
@@ -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, Agent, get_subagent_result, steer_subagent, ask_user_question, diffpi_log, diffpi_modes_unset, plan_context, plan_update_overview, plan_add_phase, plan_remove_phase, plan_update_phase, plan_validate, plan_log_progress, plan_update_status, plan_run_gates, plan_watch_ci, plan_annotate, plan_annotations, plan_ack_annotations, plan_start_execution
9
+ tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file, Agent, get_subagent_result, steer_subagent, ask_user_question, diffpi_log, diffpi_modes_unset, plan_context, plan_update_overview, plan_add_phase, plan_remove_phase, plan_update_phase, plan_validate, plan_log_progress, plan_update_status, plan_run_gates, watch_ci, plan_record_ci, plan_annotate, plan_review, plan_start_execution
10
10
  ---
11
11
 
12
12
  Work as a focused implementation worker. Execute the bounded plan supplied by an orchestrator or user.
@@ -22,6 +22,6 @@ Work as a focused implementation worker. Execute the bounded plan supplied by an
22
22
 
23
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
24
 
25
- An inline coordinator may process sequential tasks and run phase gates after every task is complete or skipped. With commit-per-phase policy, it invokes `/git commit --yes --no-push` once after gates pass, immediately pushes the current branch, and completes the phase with pending CI metadata. It then launches one bounded background Worker with `Agent` to call `plan_watch_ci` for that phase and SHA while it executes the next phase. Collect the monitor before committing or pushing the next phase and collect every monitor before completing the plan; failed or timed-out CI blocks execution. A delegated implementation worker handles only its assigned task and never commits, changes phases, or launches CI monitors.
25
+ The Orchestrator runs phase gates after every task is complete or skipped. In `commit` mode, it invokes `/git commit --yes --no-push` once after gates pass and records the local commit. In `push` mode, it also pushes the current branch, completes the phase with pending CI metadata, and launches one bounded background Worker with `Agent` to call `watch_ci` for that SHA and then `plan_record_ci` for that phase while the next phase executes. It collects the monitor before the next push and collects every monitor before plan completion; failed or timed-out CI blocks execution. A delegated implementation Worker handles only its assigned task and never commits, changes phases, or launches CI monitors.
26
26
 
27
27
  When blocked, persist the blocked status with attempted fixes and evidence. Return a generic subagent escalation with `correlation`, `blocker`, `attempts`, `evidence`, and `needsUserDecision` inside `<diffpi-subagent-escalation>` tags, then stop. Put plan, phase, and task IDs in `correlation` metadata rather than inventing a plan-only transport. Never invent a replacement design or erase completed evidence.
package/dist/assets.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare function resolveBundledAssetDir(name: string, moduleUrl?: string): string;
2
2
  export declare function resolveBundledAgentsDir(moduleUrl?: string): string;
3
3
  export declare function resolveBundledTemplatesDir(moduleUrl?: string): string;
4
+ export declare function resolveBundledWorkflowsDir(moduleUrl?: string): string;
4
5
  //# sourceMappingURL=assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAMA,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAkB,GAAG,MAAM,CAIxF;AAED,wBAAgB,uBAAuB,CAAC,SAAS,SAAkB,GAAG,MAAM,CAE3E;AAED,wBAAgB,0BAA0B,CAAC,SAAS,SAAkB,GAAG,MAAM,CAE9E"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAMA,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAkB,GAAG,MAAM,CAIxF;AAED,wBAAgB,uBAAuB,CAAC,SAAS,SAAkB,GAAG,MAAM,CAE3E;AAED,wBAAgB,0BAA0B,CAAC,SAAS,SAAkB,GAAG,MAAM,CAE9E;AAED,wBAAgB,0BAA0B,CAAC,SAAS,SAAkB,GAAG,MAAM,CAE9E"}
@@ -1,11 +1,15 @@
1
1
  import { Command } from 'commander';
2
- import { type PlanController } from '../plan';
2
+ import { type PlanStore } from '../plan';
3
+ import { createPlanReview } from '../plan/reviews';
3
4
  export interface PlanCliIO {
4
5
  stdout: Pick<NodeJS.WriteStream, 'write'>;
5
6
  stderr: Pick<NodeJS.WriteStream, 'write'>;
6
7
  }
7
- type PlanCliController = Pick<PlanController, 'context' | 'annotate' | 'annotations'>;
8
- export declare function createPlanCliCommand(io?: PlanCliIO, controller?: PlanCliController): Command;
8
+ interface PlanCliRuntime {
9
+ context: PlanStore['context'];
10
+ createPlanReview: typeof createPlanReview;
11
+ }
12
+ export declare function createPlanCliCommand(io?: PlanCliIO, planRuntime?: PlanCliRuntime): Command;
9
13
  export declare function runPlanCli(args: string[], io?: PlanCliIO): Promise<number>;
10
14
  export declare function planCliHelp(): string;
11
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/cli/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAC;AAGpD,OAAO,EAAwB,KAAK,cAAc,EAAmB,MAAM,SAAS,CAAC;AAIrF,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,KAAK,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC,CAAC;AAEtF,wBAAgB,oBAAoB,CAAC,EAAE,GAAE,SAAmB,EAAE,UAAU,GAAE,iBAAyB,GAAG,OAAO,CAc5G;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,SAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CASzF;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/cli/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAC;AAGpD,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;CAC3C;AAID,wBAAgB,oBAAoB,CAAC,EAAE,GAAE,SAAmB,EAAE,WAAW,GAAE,cAAwB,GAAG,OAAO,CAa5G;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,SAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CASzF;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC"}