@difflab/pi 0.2.0 → 0.3.0-rc.202609201609.21ba1d2
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 +48 -4
- package/agents/diffpi-orchestrator.md +17 -5
- package/agents/diffpi-planner.md +30 -0
- package/agents/diffpi-reviewer.md +36 -0
- package/agents/diffpi-worker.md +9 -1
- package/dist/assets.d.ts +2 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/cli/plan.d.ts +7 -0
- package/dist/cli/plan.d.ts.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2855 -0
- package/dist/commands/background.d.ts +39 -0
- package/dist/commands/background.d.ts.map +1 -0
- package/dist/commands/index.d.ts +9 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/mode.d.ts +5 -0
- package/dist/commands/mode.d.ts.map +1 -0
- package/dist/commands/plan-parser.d.ts +18 -0
- package/dist/commands/plan-parser.d.ts.map +1 -0
- package/dist/commands/plan.d.ts +21 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/reload.d.ts +4 -0
- package/dist/commands/reload.d.ts.map +1 -0
- package/dist/commands/review.d.ts +5 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/environment.d.ts +41 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/extensions/ghx.d.ts +5 -0
- package/dist/extensions/ghx.d.ts.map +1 -0
- package/dist/extensions/gitx.d.ts +10 -0
- package/dist/extensions/gitx.d.ts.map +1 -0
- package/dist/extensions/glabx.d.ts +5 -0
- package/dist/extensions/glabx.d.ts.map +1 -0
- package/dist/extensions/index.js +4788 -301
- package/dist/{mise.d.ts → extensions/misex.d.ts} +3 -1
- package/dist/extensions/misex.d.ts.map +1 -0
- package/dist/{process.d.ts → extensions/processx.d.ts} +3 -1
- package/dist/extensions/processx.d.ts.map +1 -0
- package/dist/extensions/tuicrx.d.ts +66 -0
- package/dist/extensions/tuicrx.d.ts.map +1 -0
- package/dist/extensions/zedx.d.ts +18 -0
- package/dist/extensions/zedx.d.ts.map +1 -0
- package/dist/gates.d.ts +12 -0
- package/dist/gates.d.ts.map +1 -0
- package/dist/index.d.ts +27 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2817 -142
- package/dist/modes.d.ts +1 -0
- package/dist/modes.d.ts.map +1 -1
- package/dist/plan/annotations.d.ts +25 -0
- package/dist/plan/annotations.d.ts.map +1 -0
- package/dist/plan/escalation.d.ts +4 -0
- package/dist/plan/escalation.d.ts.map +1 -0
- package/dist/plan/execution.d.ts +19 -0
- package/dist/plan/execution.d.ts.map +1 -0
- package/dist/plan/index.d.ts +15 -0
- package/dist/plan/index.d.ts.map +1 -0
- package/dist/plan/lock.d.ts +7 -0
- package/dist/plan/lock.d.ts.map +1 -0
- package/dist/plan/log.d.ts +5 -0
- package/dist/plan/log.d.ts.map +1 -0
- package/dist/plan/markdown.d.ts +6 -0
- package/dist/plan/markdown.d.ts.map +1 -0
- package/dist/plan/store.d.ts +34 -0
- package/dist/plan/store.d.ts.map +1 -0
- package/dist/plan/transitions.d.ts +9 -0
- package/dist/plan/transitions.d.ts.map +1 -0
- package/dist/plan/types.d.ts +146 -0
- package/dist/plan/types.d.ts.map +1 -0
- package/dist/review/github-review-backend.d.ts +5 -0
- package/dist/review/github-review-backend.d.ts.map +1 -0
- package/dist/review/gitlab-review-backend.d.ts +12 -0
- package/dist/review/gitlab-review-backend.d.ts.map +1 -0
- package/dist/review/index.d.ts +8 -0
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/local-review-backend.d.ts +3 -0
- package/dist/review/local-review-backend.d.ts.map +1 -0
- package/dist/review/review-backend.d.ts +8 -0
- package/dist/review/review-backend.d.ts.map +1 -0
- package/dist/review/review-markdown.d.ts +6 -0
- package/dist/review/review-markdown.d.ts.map +1 -0
- package/dist/review/review-state.d.ts +19 -0
- package/dist/review/review-state.d.ts.map +1 -0
- package/dist/review/types.d.ts +107 -0
- package/dist/review/types.d.ts.map +1 -0
- package/dist/setup.d.ts +7 -0
- package/dist/setup.d.ts.map +1 -1
- package/dist/store.d.ts +16 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/templates.d.ts +14 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4459 -299
- package/dist/tools/plan.d.ts +6 -0
- package/dist/tools/plan.d.ts.map +1 -0
- package/dist/tools/review.d.ts +7 -0
- package/dist/tools/review.d.ts.map +1 -0
- package/dist/tools/setup.d.ts.map +1 -1
- package/dist/tools/templates.d.ts +3 -0
- package/dist/tools/templates.d.ts.map +1 -0
- package/dist/vcs/forge-backend.d.ts +7 -0
- package/dist/vcs/forge-backend.d.ts.map +1 -0
- package/dist/vcs/github.d.ts +5 -0
- package/dist/vcs/github.d.ts.map +1 -0
- package/dist/vcs/gitlab.d.ts +4 -0
- package/dist/vcs/gitlab.d.ts.map +1 -0
- package/dist/vcs/helpers.d.ts +7 -0
- package/dist/vcs/helpers.d.ts.map +1 -0
- package/dist/vcs/index.d.ts +6 -0
- package/dist/vcs/index.d.ts.map +1 -0
- package/dist/vcs/types.d.ts +32 -0
- package/dist/vcs/types.d.ts.map +1 -0
- package/package.json +7 -2
- package/skills/diffpi-setup/SKILL.md +3 -1
- package/skills/plan/SKILL.md +13 -0
- package/skills/plan/references/workflows/annotate.md +6 -0
- package/skills/plan/references/workflows/finalize.md +7 -0
- package/skills/plan/references/workflows/go.md +7 -0
- package/skills/plan/references/workflows/help.md +13 -0
- package/skills/plan/references/workflows/init.md +6 -0
- package/skills/plan/references/workflows/new.md +7 -0
- package/skills/plan/references/workflows/update.md +7 -0
- package/skills/review/SKILL.md +17 -0
- package/skills/review/references/workflows/address.md +11 -0
- package/skills/review/references/workflows/auto.md +18 -0
- package/skills/review/references/workflows/complete.md +7 -0
- package/skills/review/references/workflows/edit.md +7 -0
- package/skills/review/references/workflows/help.md +30 -0
- package/skills/review/references/workflows/merge.md +6 -0
- package/skills/review/references/workflows/new.md +19 -0
- package/skills/review/references/workflows/open.md +3 -0
- package/skills/review/references/workflows/publish.md +8 -0
- package/templates/plan/PLAN.md +38 -0
- package/templates/review/draft-pr.md +25 -0
- package/dist/mise.d.ts.map +0 -1
- package/dist/process.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -10,16 +10,60 @@ 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 six package-managed agent files into Pi's global agent directory. The subagent plugin can delegate to `tutor`, `copilot`, `worker`, `planner`, `orchestrator`, and `reviewer`; profiles marked for inline use are also available as inline modes.
|
|
14
14
|
|
|
15
15
|
```text
|
|
16
|
-
/
|
|
16
|
+
/mode
|
|
17
|
+
/mode reviewer
|
|
18
|
+
/mode reset
|
|
17
19
|
/skill:mode --include-skills
|
|
18
|
-
/skill:mode tutor
|
|
19
20
|
/skill:mode spec:planner
|
|
20
|
-
/skill:mode clear
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Standard agents come from the same global and trusted-project directories used by `@tintinweb/pi-subagents`. Skill-owned agents are opt-in for listing and use `skill:agent` ids. Inline selection applies the profile prompt, first available preferred model, thinking level, and available tool set. Clearing restores the previous runtime. Override ordered model preferences with `agents.<id>.models` in `~/.difflab/diffpi/config.yaml` or `config.json`, then rerun setup for delegated agents. Inline modes are not a security boundary.
|
|
24
24
|
|
|
25
|
+
## Planning
|
|
26
|
+
|
|
27
|
+
`/plan` creates and runs durable implementation plans. Records live under `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/` and are shared across worktrees.
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
/plan init <short-slug> [--branch name]
|
|
31
|
+
/plan new <short-slug> [--branch name] [--bg] [prompt...]
|
|
32
|
+
/plan update [short-slug] [--branch name] [--bg] [instructions...]
|
|
33
|
+
/plan annotate [short-slug]
|
|
34
|
+
/plan finalize [short-slug]
|
|
35
|
+
/plan go <short-slug> [--commit|--no-commit] [--bg]
|
|
36
|
+
/plan help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Planner owns authoring and cannot edit source files. Worker owns inline implementation. Orchestrator owns background coordination and phase commits. Background work does not change the foreground mode and does not ask questions.
|
|
40
|
+
|
|
41
|
+
`/plan annotate` uses `tuicr --file PLAN.md`. Run `npx --yes @difflab/pi@<version> plan annotate --cwd <repo>` for direct use. Zed setup installs the pinned `diffpi: annotate plan` task. Override the plan template at `~/.difflab/diffpi/templates/plan/PLAN.md`.
|
|
42
|
+
|
|
43
|
+
Plan tools cover context, initialization, overview and phase changes, validation, annotations, progress, status, gates, and execution dispatch. Phase gates run `format:check`, `lint`, and `test`. `--commit` creates one local conventional commit per completed phase and never pushes.
|
|
44
|
+
|
|
45
|
+
## Review
|
|
46
|
+
|
|
47
|
+
`/review` drives code review over GitHub, GitLab, or the local `tuicr` TUI. The repository remote selects the review forge. When requested, `/skill:diffpi-setup` can install GitHub and/or GitLab CLIs and MCP servers.
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
/review auto [pr-number|pr-url|branch] [--local] [--bg]
|
|
51
|
+
/review new [--local] [--base branch] [--bg]
|
|
52
|
+
/review edit [pr-number|pr-url|branch] [--local] [--bg]
|
|
53
|
+
/review address [target] [--local] [--bg]
|
|
54
|
+
/review publish [target] [--local] [--comment|--approve|--request-changes|--close] [--bg]
|
|
55
|
+
/review complete [target] [--local|--approve|--reject|--abandon] [--bg]
|
|
56
|
+
/review merge [target] [--bg]
|
|
57
|
+
```
|
|
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.
|
|
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.
|
|
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.
|
|
64
|
+
|
|
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
|
+
|
|
67
|
+
The package root exports environment and forge lifecycle adapters, review backends, plan contracts and storage, gate checks, template helpers, tuicr helpers, setup operations, and inline-mode control. `@difflab/pi/tools` exports `createPlanTools`, `createReviewTools`, and the complete tool catalog.
|
|
68
|
+
|
|
25
69
|
See the [repository](https://github.com/difflab-io/diffpi) for details.
|
|
@@ -3,11 +3,10 @@ name: 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:
|
|
7
|
-
model: openai-codex/gpt-5.6-
|
|
8
|
-
model_fallbacks: meridian/claude-
|
|
9
|
-
thinking:
|
|
10
|
-
tools: read, grep, find
|
|
6
|
+
inline: true
|
|
7
|
+
model: openai-codex/gpt-5.6-luna
|
|
8
|
+
model_fallbacks: meridian/claude-haiku-4-5, openrouter/qwen/qwen3-coder-flash, deepseek/deepseek-v4-flash
|
|
9
|
+
thinking: medium
|
|
11
10
|
run_in_background: true
|
|
12
11
|
allowed_subagents: all
|
|
13
12
|
---
|
|
@@ -20,4 +19,17 @@ Work only as an execution orchestrator through the pi-subagents tools. Optimize
|
|
|
20
19
|
- Use background agents by default, collect every required result, and steer running agents when priorities change.
|
|
21
20
|
- Retry transient failures, escalate failed work with the returned error context, and route hard problems to a stronger model.
|
|
22
21
|
- Keep conflicting edits and integration work serialized.
|
|
22
|
+
- For `auto` and `address`, delegate coordination to the `reviewer` agent. The reviewer owns review judgment and thread classification, then delegates non-overlapping bounded edits to lightweight `worker` agents.
|
|
23
|
+
- Do not bypass the reviewer by launching Sol workers directly. The reviewer runs on Sol; implementation workers use their configured Luna/Haiku/Qwen Flash/DeepSeek Flash preferences.
|
|
24
|
+
- For `edit`, `new`, `complete`, and `merge`, keep lifecycle decisions in this orchestration turn and delegate only bounded inspection or implementation work.
|
|
23
25
|
- Return one concise synthesis with results, failures, cost or latency concerns, and remaining decisions.
|
|
26
|
+
|
|
27
|
+
## Plan coordination
|
|
28
|
+
|
|
29
|
+
For background plan execution, call `plan_context` and honor the active execution ID. Process phases in dependency order. Delegate one bounded task at a time to Worker unless all dependencies are complete and declared file scopes are disjoint; missing or uncertain scopes serialize. Delegated workers never commit or restructure the plan. Reload plan state and persist each result before scheduling more work.
|
|
30
|
+
|
|
31
|
+
After all phase tasks complete or skip, run `plan_run_gates`. A failure or warning blocks the phase. When the execution policy requires commits, only you may invoke `/git commit --yes --no-push`, exactly once after gates pass, then record the observed SHA before completing the phase. Never push.
|
|
32
|
+
|
|
33
|
+
Parse `<diffpi-planner-escalation>` payloads strictly. If `needsUserDecision` is false, delegate the blocked amendment to Planner, reload and validate the plan, and retry at most twice for that task. Planner may revise only pending or blocked work. If a human decision is needed, the payload is malformed, or retries are exhausted, preserve blocked state and return the plan ID, task ID, evidence, and `/plan update <slug>` then `/plan go <slug>` commands. Detached agents never ask users questions.
|
|
34
|
+
|
|
35
|
+
Keep review orchestration behavior unchanged when no plan execution packet is present.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
display_name: Planner
|
|
4
|
+
description: Author and revise durable implementation plans without changing source code.
|
|
5
|
+
prompt_mode: replace
|
|
6
|
+
inline: true
|
|
7
|
+
run_in_background: true
|
|
8
|
+
model: openai-codex/gpt-5.6-sol
|
|
9
|
+
model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5, deepseek/deepseek-v4-pro, qwen-token-plan/qwen3.7-plus
|
|
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
|
|
12
|
+
metadata:
|
|
13
|
+
model-tier: frontier
|
|
14
|
+
---
|
|
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.
|
|
17
|
+
|
|
18
|
+
## Plan quality
|
|
19
|
+
|
|
20
|
+
- Call `plan_context` before changing a plan.
|
|
21
|
+
- Inspect the repository before proposing phases. Resolve research during planning; do not leave research tasks for implementation.
|
|
22
|
+
- Keep stable lowercase phase and task IDs. Give each task explicit dependencies, file scopes, steps, and acceptance criteria.
|
|
23
|
+
- Keep Design at 300 words or fewer when practical and never finalize it above 800 words.
|
|
24
|
+
- Preserve completed work and evidence. Amend only draft, pending, or blocked work.
|
|
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.
|
|
27
|
+
|
|
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
|
+
|
|
30
|
+
For a worker blocker, use its validated escalation payload and evidence. Revise only the affected pending or blocked entity. Do not implement the fix yourself or erase prior execution history.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
display_name: Reviewer
|
|
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
|
+
prompt_mode: replace
|
|
6
|
+
model: openai-codex/gpt-5.6-sol
|
|
7
|
+
model_fallbacks: meridian/claude-opus-4-8, meridian/claude-opus-5, deepseek/deepseek-v4-pro, qwen-token-plan/qwen3.7-plus
|
|
8
|
+
thinking: high
|
|
9
|
+
run_in_background: true
|
|
10
|
+
allowed_subagents: worker
|
|
11
|
+
metadata:
|
|
12
|
+
model-tier: frontier
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
You review code changes. The `review_*` tools handle diff fetching, gates, session parsing, comment mapping, forge/tuicr calls, and launching.
|
|
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. Do not publish, complete, or merge.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Call `review_context` first.
|
|
22
|
+
- Prefer `review_*` and forge/tuicr MCP tools. Do not reimplement their mechanics or shell out to `gh`, `glab`, or `tuicr`.
|
|
23
|
+
- Ground every finding in a real file and line from `review_diff`.
|
|
24
|
+
- Be thorough in what you catch and terse in what you write: name the problem, then the ask. No hype or diff restatement.
|
|
25
|
+
|
|
26
|
+
## Judge
|
|
27
|
+
|
|
28
|
+
- **Intent and correctness:** trace the headline path end to end; a failure of intent is BLOCKING.
|
|
29
|
+
- **Slop:** out-of-scope edits, stray churn, dead/debug leftovers, accidental reverts.
|
|
30
|
+
- **Adversarial:** failure modes, edge cases, negative paths, and security scenarios.
|
|
31
|
+
|
|
32
|
+
## Output
|
|
33
|
+
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
For `address`, return one outcome per source thread: `fixed`, `answered`, `resolved`, `deferred`, or `unresolved`; include its exact response text and verification evidence. Questions are answered and stay open. Only trivial accepted requests use `Resolved` and may close; substantive fixes stay open for reviewer confirmation.
|
package/agents/diffpi-worker.md
CHANGED
|
@@ -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
|
|
9
|
+
tools: read, grep, find, bash, edit, write, ctx_execute, ctx_execute_file, plan_context, plan_log_progress, plan_update_status, plan_run_gates
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
Work as a focused implementation worker. Execute the bounded plan supplied by an orchestrator or user.
|
|
@@ -17,3 +17,11 @@ Work as a focused implementation worker. Execute the bounded plan supplied by an
|
|
|
17
17
|
- When blocked, stop and return the exact command, error or stack trace, relevant context, and attempted fixes.
|
|
18
18
|
- Leave unresolved decisions to the orchestrator instead of guessing.
|
|
19
19
|
- Report changed files, validation evidence, and remaining limitations.
|
|
20
|
+
|
|
21
|
+
## Plan execution
|
|
22
|
+
|
|
23
|
+
When given a plan execution packet, use plan tools instead of editing `PLAN.md` directly. Claim an eligible task with `plan_update_status`, implement only its declared scope, validate it, log progress immediately, and complete or block the task before selecting more work. Reload `plan_context` after every delegated result.
|
|
24
|
+
|
|
25
|
+
An inline coordinator may process sequential tasks and run phase gates after every task is complete or skipped. It may request one phase commit from the coordinator path after gates pass. A delegated worker handles only its assigned task and never commits, changes phases, or calls plan authoring tools.
|
|
26
|
+
|
|
27
|
+
When blocked, persist the blocked status with attempted fixes and evidence. Emit the returned `PlannerEscalation` inside `<diffpi-planner-escalation>` tags and stop. Never invent a replacement design or erase completed evidence.
|
package/dist/assets.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
export declare function resolveBundledAssetDir(name: string, moduleUrl?: string): string;
|
|
1
2
|
export declare function resolveBundledAgentsDir(moduleUrl?: string): string;
|
|
3
|
+
export declare function resolveBundledTemplatesDir(moduleUrl?: string): string;
|
|
2
4
|
//# sourceMappingURL=assets.d.ts.map
|
package/dist/assets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAMA,wBAAgB,uBAAuB,CAAC,SAAS,SAAkB,GAAG,MAAM,
|
|
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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface PlanCliIO {
|
|
2
|
+
stdout: Pick<NodeJS.WriteStream, 'write'>;
|
|
3
|
+
stderr: Pick<NodeJS.WriteStream, 'write'>;
|
|
4
|
+
}
|
|
5
|
+
export declare function runPlanCli(args: string[], io?: PlanCliIO): Promise<number>;
|
|
6
|
+
export declare function planCliHelp(): string;
|
|
7
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/cli/plan.ts"],"names":[],"mappings":"AAKA,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,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,SAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBzF;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAIA,wBAAsB,IAAI,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQxE"}
|