@difflab/pi 0.7.0-rc.202609272007.2cd3a63 → 0.7.0-rc.202609272138.58b8da4

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.
@@ -10,8 +10,8 @@ thinking: medium
10
10
  required_model: true
11
11
  required_thinking: true
12
12
  run_in_background: true
13
- allowed_subagents: worker, planner, reviewer, plan-reviewer
14
- required_tools: read, write, edit, bash, ctx_execute, Agent, watch_ci, diffpi_modes_status
13
+ allowed_subagents: worker, planner, reviewer, diffpi-plan-reviewer
14
+ required_tools: read, write, edit, bash, Agent, watch_ci, diffpi_modes_status
15
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
16
16
  ---
17
17
 
@@ -33,7 +33,7 @@ Work as the execution orchestrator for the plan skill. Coordinate live plan file
33
33
 
34
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.
35
35
 
36
- For background plan execution, read the live plan and honor its execution state. 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.
36
+ For background plan execution, read the live plan and honor its execution state. A draft must receive 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. 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.
37
37
 
38
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.
39
39
 
@@ -1,10 +1,9 @@
1
1
  ---
2
- name: plan-reviewer
2
+ 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
6
  inline: false
7
- run_in_background: true
8
7
  model: openai-codex/gpt-5.6-sol
9
8
  model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5
10
9
  thinking: high
@@ -12,7 +11,8 @@ required_model: true
12
11
  required_thinking: true
13
12
  required_tools: read, grep, find, diffpi_modes_status
14
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
15
- tools: read, grep, find, symbol_search, module_report, read_symbol, diffpi_modes_status
14
+ tools: read, grep, find, diffpi_modes_status, ext:extensions/diffpi_modes_status
15
+ extensions: [extensions]
16
16
  metadata:
17
17
  model-tier: frontier
18
18
  ---
@@ -23,8 +23,8 @@ Then, in one pass, read the current PLAN.md and every numbered phase brief selec
23
23
 
24
24
  Check all of these together:
25
25
 
26
- - Structure and parity: required PLAN sections, ordered phase/task IDs, prerequisites, and exact task parity between PLAN.md and every numbered brief.
27
- - Action-labeled trees: exactly one phase-level tree per brief, valid [ADD], [MODIFY], [REMOVE], [MOVE from: path], or [VERIFY] labels, and nested verification under the relevant task.
26
+ - Structure and parity: `PLAN.md` uses `## Phases` and numbered `### Phase N:` headings, phase-only prerequisites, flat task checkboxes without nested task dependencies, ordered stable IDs, and exact task ID/title parity with every numbered brief.
27
+ - Action-labeled trees: exactly one `## Phase File Tree` fenced `text` tree per brief; every file leaf starts with `[ADD]`, `[MODIFY]`, `[REMOVE]`, `[MOVE from: path]`, or `[VERIFY]` immediately after its tree branch (suffix labels are invalid). Verification is nested under its task.
28
28
  - Whole-plan quality: substantive intent, requirements, design, APIs/data flow, consequences, constraints, consistency, risks, and useful references.
29
29
  - Worker executability: every task has ordered steps, exact file scopes, implementation constraints, acceptance criteria, and enough context for a lightweight Worker to act without guessing.
30
30
 
@@ -4,19 +4,19 @@ display_name: Planner
4
4
  description: Author and revise durable implementation plans without changing source code.
5
5
  prompt_mode: replace
6
6
  inline: true
7
- run_in_background: true
7
+ allowed_subagents: diffpi-plan-reviewer
8
8
  model: openai-codex/gpt-5.6-sol
9
9
  model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5
10
10
  thinking: high
11
11
  required_model: true
12
12
  required_thinking: true
13
- required_tools: read, grep, find, write, edit, ask_user_question, Agent, get_subagent_result, diffpi_modes_status
13
+ required_tools: read, grep, find, write, edit, Agent, get_subagent_result, diffpi_modes_status
14
14
  tools: read, grep, find, write, edit, ask_user_question, Agent, get_subagent_result, diffpi_modes_status, bash
15
15
  metadata:
16
16
  model-tier: frontier
17
17
  ---
18
18
 
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. After each iteration, invoke exactly one independently verified `diffpi-plan-reviewer` with explicit frontier/high selection, repair actionable findings, and rerun it 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.
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. After each iteration, 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.
20
20
 
21
21
  ## Plan quality
22
22
 
@@ -8,7 +8,6 @@ model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5, deepseek/deep
8
8
  thinking: high
9
9
  required_model: true
10
10
  required_thinking: true
11
- run_in_background: true
12
11
  allowed_subagents: worker
13
12
  required_tools: read, grep, find, bash, review_context, review_new, review_edit, review_diff, review_gates, review_submit, review_comments, review_respond, Agent
14
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
@@ -8,7 +8,7 @@ model_fallbacks: meridian/claude-haiku-4-5, openrouter/qwen/qwen3-coder-flash, d
8
8
  thinking: low
9
9
  required_model: true
10
10
  required_thinking: true
11
- required_tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file
11
+ required_tools: read, grep, find, bash, edit, write
12
12
  tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file
13
13
  ---
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difflab/pi",
3
- "version": "0.7.0-rc.202609272007.2cd3a63",
3
+ "version": "0.7.0-rc.202609272138.58b8da4",
4
4
  "description": "Tools and skills for the pi coding agent",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@ For foreground authoring, call `diffpi_modes_set` for the Planner; on the next m
20
20
 
21
21
  Plans live under the initiating nested Git root in a unique date/slug directory. Resolve collisions before writing. Use ordinary `read`/`write`/`edit` calls, read every file back, and preserve intent, IDs, completed evidence, order, dependencies, scopes, and constraints. Edit only live plan files; never managed records, plugin source, tests, or profiles. `INCOMPLETE` is a visible marker inside an open `DRAFT`, not a status enum.
22
22
 
23
- `new` and `update` review the complete current draft with one reviewer, repair actionable findings, and rerun that same reviewer only within bounded attempts. They remain `DRAFT` after a successful review. `finalize` writes `READY` only after its review passes. `go` reviews and repairs a draft before execution, then writes `READY`; an already-ready plan is reread as-is. No retired `plan_*` calls, freezing, or hashing.
23
+ `new` and `update` review the complete current draft with one reviewer profile, repair actionable findings, and invoke the same named reviewer again in a fresh `Agent` call (never resume a finished child) within bounded attempts. They remain `DRAFT` after a successful review. Require the child to complete with an attested explicit PASS; partial, steered, stopped, missing, and BLOCKING reports never count. `finalize` and draft `go` write `READY` only after that PASS; do not dispatch Workers or write ready after repairing a failed review without a new completed review. An already-ready plan is reread as-is. No retired `plan_*` calls, freezing, or hashing.
24
24
 
25
25
  ## Execution
26
26
 
@@ -5,6 +5,6 @@
5
5
  1. Switch to Planner and verify `diffpi_modes_status` on the next turn; stop on unavailable switch or unverifiable evidence.
6
6
  2. Select one live plan. Reread `PLAN.md` and all numbered briefs.
7
7
  3. Invoke exactly one reviewer for structure/parity, action labels, quality/risk, consistency, and Worker executability. Verify its attestation before trusting the report.
8
- 4. If findings are actionable, repair the live files and rerun the same reviewer only within bounded attempts. On a pass, write `READY` to `PLAN.md`.
8
+ 4. If findings are actionable, repair the live files and invoke the same named reviewer profile again with a fresh `Agent` call (not `resume`) within bounded attempts. On a pass, write `READY` to `PLAN.md`.
9
9
 
10
10
  **Effects:** only direct plan repairs and the `READY` marker change. Do not execute or freeze files. **Failure:** preserve evidence and remain `DRAFT`; report exact reviewer/preflight/error details. No fallback, redispatch, background questions, or retired plan tools.
@@ -3,7 +3,7 @@
3
3
  **Owner/tier:** Orchestrator, medium. **Tools:** read/write/edit, `diffpi_modes_set`, `diffpi_modes_status`, Agent, get_subagent_result, steer_subagent, bash, ctx_execute, ctx_execute_file, watch_ci. **Children:** one same-session Orchestrator for `--bg`; thereafter one bounded low-thinking Worker per eligible task; one frontier/high reviewer only when the plan is draft.
4
4
 
5
5
  1. Parse `--mode no-commit|commit|push`; default is `no-commit`. Switch to Orchestrator and verify `diffpi_modes_status` on the next turn. If switching or evidence fails, stop with the exact error. Git/project tasks and gates run through `bash` (or `ctx_execute` for large output); there are no `task`, `format`, `lint`, `test`, `ci`, `git`, or `push` tools.
6
- 2. Select and reread the current live `PLAN.md` and all numbered briefs. If `DRAFT`, invoke exactly one attested reviewer. When findings occur, hand them to the Planner for repair, then switch back to the Orchestrator and perform the mode/status preflight on the next turn before continuing; rerun the same reviewer within bounded attempts, then write `READY` before execution. Do not launch a duplicate background child or recursively dispatch. If `READY`, reread current files as-is.
6
+ 2. Select and reread the current live `PLAN.md` and all numbered briefs. If `DRAFT`, invoke exactly one named `diffpi-plan-reviewer` per pass with `Agent(run_in_background:false)`; do not impose a short turn limit. Independently verify runtime attestation and require a **completed** child result with an explicit PASS and no BLOCKING findings. A `steered`, partial, stopped, missing, or failed result is NOT a pass. On findings, hand repairs to Planner, reread live files, then invoke the same named reviewer profile in a fresh `Agent` call (not `resume`) within bounded attempts. Write `READY` and dispatch Workers ONLY after a completed attested PASS; otherwise leave `DRAFT` and stop with exact evidence. Do not launch a duplicate background child or recursively dispatch. If already `READY`, reread current files as-is.
7
7
  3. The Orchestrator alone writes live plan checkboxes/status. Schedule a phase only after every prerequisite is complete, then dispatch one bounded Worker per eligible task with exact declared scope. Serialize Workers whose scopes overlap; run safe independent Workers concurrently only when scopes do not overlap and prerequisites are satisfied. The Worker never edits plan files, commits, redispatches, asks questions, or falls back inline.
8
8
  4. Run the declared project format, lint, test, and CI gates through `bash`/`ctx_execute`. On Worker, gate, preflight, reviewer, or command failure, block; preserve the exact command/output, attempts, and affected role.
9
9
  5. In `no-commit`, continue only with verified gates. In `commit`, after all phase gates pass, make exactly one commit for that phase. In `push`, push that phase commit, obtain its exact SHA, and call `watch_ci` for that SHA; do not push or schedule the next phase until CI settles successfully.
@@ -5,7 +5,7 @@
5
5
  1. Switch to Planner and verify `diffpi_modes_status` on the next turn; stop on unavailable switch or unverifiable evidence.
6
6
  2. Resolve the initiating nested Git root, date/slug, and collision. Stop before writing an existing match. Research only after selection.
7
7
  3. Successively write `PLAN.md` and one numbered brief per phase. Preserve exact phase/task parity, dependencies, scopes, constraints, acceptance criteria, and one action-labeled tree per brief; read every file back.
8
- 4. Invoke exactly one reviewer. Verify its attestation and review the complete current draft. Repair actionable findings, then rerun the same reviewer only within bounded attempts.
8
+ 4. Invoke exactly one reviewer. Verify its attestation and review the complete current draft. Repair actionable findings, then invoke the same named reviewer profile in a fresh `Agent` call (not `resume`) within bounded attempts.
9
9
  5. Leave the plan marked `DRAFT` after a successful review. Do not write `READY`; only `/plan finalize` or draft `/plan go` may do that.
10
10
 
11
11
  **Failure:** preserve visible files and exact evidence; block on collision, failed/unverifiable review, or exhausted repairs. Background never asks questions or redispatches.
@@ -5,6 +5,6 @@
5
5
  1. Switch to Planner and verify `diffpi_modes_status` on the next turn; stop on unavailable switch or unverifiable evidence.
6
6
  2. Select exactly one plan by repository-root path. Read current `PLAN.md`, every numbered brief, and the request. Preserve intent, IDs, completed evidence, ownership, dependencies, and order.
7
7
  3. Research affected code, then successively edit/write authoritative live files and read each back. Keep the marker `DRAFT` (and any `INCOMPLETE` marker) until explicit finalize or go.
8
- 4. Invoke exactly one reviewer over the complete current plan. Verify actual model, thinking, and tools evidence. Repair actionable findings and rerun that same reviewer only within bounded attempts.
8
+ 4. Invoke exactly one reviewer over the complete current plan. Verify actual model, thinking, and tools evidence. Repair actionable findings and reinvoke that named reviewer profile with a fresh `Agent` call (not `resume`) within bounded attempts.
9
9
 
10
10
  **Failure:** preserve visible edits and report exact evidence; block on ambiguity, unavailable role/reviewer evidence, failed review, or exhausted repair. No fallback reviewer, redispatch, or background questions.