@difflab/pi 0.7.0-rc.202609272007.2cd3a63 → 0.7.0-rc.202609272158.c0d5b8c
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.
- package/README.md +7 -7
- package/agents/diffpi-orchestrator.md +4 -4
- package/agents/diffpi-plan-reviewer.md +5 -5
- package/agents/diffpi-planner.md +5 -5
- package/agents/diffpi-reviewer.md +0 -1
- package/agents/diffpi-worker.md +1 -1
- package/dist/extensions/index.js +414 -169
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +211 -5816
- package/dist/plan/verify.d.ts +15 -0
- package/dist/plan/verify.d.ts.map +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +424 -178
- package/dist/tools/plan.d.ts +4 -0
- package/dist/tools/plan.d.ts.map +1 -0
- package/package.json +1 -1
- package/skills/plan/SKILL.md +3 -3
- package/skills/plan/references/workflows/finalize.md +3 -3
- package/skills/plan/references/workflows/go.md +2 -2
- package/skills/plan/references/workflows/new.md +2 -2
- package/skills/plan/references/workflows/update.md +2 -2
- package/dist/plan/index.d.ts +0 -4
- package/dist/plan/index.d.ts.map +0 -1
- package/dist/plan/markdown.d.ts +0 -9
- package/dist/plan/markdown.d.ts.map +0 -1
- package/dist/plan/operations.d.ts +0 -43
- package/dist/plan/operations.d.ts.map +0 -1
- package/dist/plan/reviews.d.ts +0 -28
- package/dist/plan/reviews.d.ts.map +0 -1
- package/dist/plan/schema.d.ts +0 -249
- package/dist/plan/schema.d.ts.map +0 -1
- package/dist/plan/store.d.ts +0 -75
- package/dist/plan/store.d.ts.map +0 -1
- package/dist/plan/types.d.ts +0 -151
- package/dist/plan/types.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ pi install npm:@difflab/pi
|
|
|
10
10
|
|
|
11
11
|
Run `/skill:diffpi-setup`. The skill validates or configures the environment and reloads pi when required.
|
|
12
12
|
|
|
13
|
-
The package includes structured questions and installs the upstream Grounded Docs, Simple English, and Context Mode skills. Setup also installs
|
|
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
14
|
|
|
15
15
|
```text
|
|
16
16
|
/mode
|
|
@@ -24,23 +24,23 @@ Standard agents come from the same global and trusted-project directories used b
|
|
|
24
24
|
|
|
25
25
|
## Planning
|
|
26
26
|
|
|
27
|
-
`/plan` is a thin alias owned by the package `plan` skill.
|
|
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.
|
|
28
28
|
|
|
29
29
|
```text
|
|
30
30
|
/plan init <short-slug> [--branch name]
|
|
31
31
|
/plan new <short-slug> [--branch name] [--bg] [prompt...]
|
|
32
32
|
/plan update [short-slug] [--branch name] [--bg] [instructions...]
|
|
33
|
-
|
|
33
|
+
diffpi plan annotate .diffpi/plan/<slug>/PLAN.md
|
|
34
34
|
/plan finalize [short-slug]
|
|
35
35
|
/plan go <short-slug> [--mode <no-commit|commit|push>] [--bg]
|
|
36
36
|
/plan help
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
The skill
|
|
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.
|
|
40
40
|
|
|
41
|
-
|
|
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`.
|
|
42
42
|
|
|
43
|
-
`PLAN.md` keeps
|
|
43
|
+
`PLAN.md` keeps Design, numbered phases, phase prerequisites, and flat task checkboxes. Each brief contains ordered steps, nested verification, exact scopes, acceptance criteria, and one action-labeled phase file tree. 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 their declared source/test scopes.
|
|
44
44
|
|
|
45
45
|
## Review
|
|
46
46
|
|
|
@@ -66,6 +66,6 @@ Local artifacts live in `.diffpi/review/` and use `YYMMDD-<short-head-sha>.md` o
|
|
|
66
66
|
|
|
67
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.
|
|
68
68
|
|
|
69
|
-
The package root exports environment and forge lifecycle adapters, review backends,
|
|
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.
|
|
70
70
|
|
|
71
71
|
See the [repository](https://github.com/difflab-io/diffpi) for details.
|
|
@@ -10,9 +10,9 @@ 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,
|
|
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
|
|
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
|
|
16
16
|
---
|
|
17
17
|
|
|
18
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.
|
|
@@ -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. 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. 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,
|
|
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:
|
|
27
|
-
- Action-labeled trees: exactly one
|
|
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
|
|
package/agents/diffpi-planner.md
CHANGED
|
@@ -4,25 +4,25 @@ 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
|
-
|
|
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,
|
|
14
|
-
tools: read, grep, find, write, edit, ask_user_question, Agent, get_subagent_result, diffpi_modes_status, bash
|
|
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
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.
|
|
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.
|
|
20
20
|
|
|
21
21
|
## Plan quality
|
|
22
22
|
|
|
23
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.
|
|
24
24
|
- Inspect the repository before proposing phases. Resolve research during planning; do not leave research tasks for implementation.
|
|
25
|
-
- Keep stable lowercase phase and task IDs.
|
|
25
|
+
- Keep stable lowercase phase and task IDs. Put prerequisites on phases only; give each task exact file scopes, ordered steps, and acceptance criteria.
|
|
26
26
|
- Keep Design at 300 words or fewer when practical and never finalize it above 800 words.
|
|
27
27
|
- Preserve completed work and evidence. Amend only draft, pending, or blocked work.
|
|
28
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.
|
|
@@ -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
|
package/agents/diffpi-worker.md
CHANGED
|
@@ -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
|
|
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
|
|