@difflab/pi 0.7.2 → 0.8.0-rc.202610020810.d27e7fc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/agents/diffpi-orchestrator.md +1 -1
- package/agents/diffpi-planner.md +2 -2
- package/agents/diffpi-reviewer.md +2 -2
- package/agents/diffpi-worker.md +6 -6
- package/dist/commands/dispatch.d.ts +1 -1
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/plan.d.ts +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/review.d.ts +1 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/doctor.d.ts +9 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/environment.d.ts +0 -1
- package/dist/environment.d.ts.map +1 -1
- package/dist/extensions/index.js +1830 -2899
- package/dist/index.d.ts +5 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +140 -759
- package/dist/log.d.ts +6 -11
- package/dist/log.d.ts.map +1 -1
- package/dist/plan/verify.d.ts.map +1 -1
- package/dist/review/index.d.ts +2 -3
- package/dist/review/index.d.ts.map +1 -1
- package/dist/review/review-backend.d.ts +2 -3
- package/dist/review/review-backend.d.ts.map +1 -1
- package/dist/setup.d.ts +0 -2
- package/dist/setup.d.ts.map +1 -1
- package/dist/tools/ci.d.ts +1 -1
- package/dist/tools/doctor.d.ts +3 -0
- package/dist/tools/doctor.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 +1824 -2892
- package/dist/tools/log.d.ts.map +1 -1
- package/dist/tools/review.d.ts +1 -7
- package/dist/tools/review.d.ts.map +1 -1
- package/dist/tools/setup.d.ts.map +1 -1
- package/package.json +1 -5
- package/skills/diffpi-doctor/SKILL.md +10 -0
- package/skills/diffpi-setup/SKILL.md +3 -3
- package/skills/plan/SKILL.md +4 -5
- package/skills/plan/references/design-quality.md +1 -1
- package/skills/plan/references/workflows/finalize.md +2 -2
- package/skills/plan/references/workflows/go.md +7 -5
- package/skills/plan/references/workflows/help.md +1 -2
- package/skills/plan/references/workflows/init.md +2 -2
- package/skills/plan/references/workflows/inline-fallback.md +3 -3
- package/skills/plan/references/workflows/new.md +3 -3
- package/skills/plan/references/workflows/update.md +6 -4
- package/skills/plan/references/workflows/validate.md +5 -5
- package/skills/review/SKILL.md +6 -6
- package/skills/review/references/review-standards.md +9 -1
- package/skills/review/references/workflows/address.md +9 -15
- package/skills/review/references/workflows/auto.md +9 -17
- package/skills/review/references/workflows/complete.md +2 -2
- package/skills/review/references/workflows/edit.md +7 -5
- package/skills/review/references/workflows/help.md +12 -20
- package/skills/review/references/workflows/new.md +14 -13
- package/skills/review/references/workflows/publish.md +2 -2
- package/skills/review/references/workflows/status.md +1 -1
- package/skills/review/templates/REVIEW.md +39 -0
- package/templates/plan/PLAN.md +9 -1
- package/templates/review/draft-pr.md +3 -9
- package/dist/cli/plan.d.ts +0 -17
- package/dist/cli/plan.d.ts.map +0 -1
- package/dist/cli.d.ts +0 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -2258
- package/dist/extensions/tuicrx.d.ts +0 -66
- package/dist/extensions/tuicrx.d.ts.map +0 -1
- package/dist/extensions/zedx.d.ts +0 -18
- package/dist/extensions/zedx.d.ts.map +0 -1
- package/dist/review/local-review-backend.d.ts +0 -3
- package/dist/review/local-review-backend.d.ts.map +0 -1
- package/dist/review/local-reviews.d.ts +0 -31
- package/dist/review/local-reviews.d.ts.map +0 -1
- package/dist/review/review-markdown.d.ts +0 -6
- package/dist/review/review-markdown.d.ts.map +0 -1
- package/skills/plan/references/workflows/annotate.md +0 -13
- package/skills/review/references/workflows/open.md +0 -11
package/dist/tools/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/tools/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/tools/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAclF,eAAO,MAAM,aAAa,EAAE,cAmB1B,CAAC"}
|
package/dist/tools/review.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { type ToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
2
|
-
import { run } from '../extensions/processx';
|
|
3
2
|
import { type ReviewComment, type ReviewDraft, type ReviewThreadRecord } from '../review';
|
|
4
3
|
export declare function hasReviewDraft(comments: readonly ReviewComment[], body: string): boolean;
|
|
5
|
-
export declare function reviewBrowserCommand(url: string, platform?: NodeJS.Platform): {
|
|
6
|
-
command: string;
|
|
7
|
-
args: string[];
|
|
8
|
-
};
|
|
9
|
-
export declare function openReviewUrl(url: string, execute?: typeof run, platform?: NodeJS.Platform): Promise<boolean>;
|
|
10
4
|
export declare function partitionReviewComments(comments: readonly ReviewComment[], knownFingerprints: ReadonlySet<string>, model: string): {
|
|
11
5
|
checkpointed: {
|
|
12
6
|
source: ReviewComment;
|
|
@@ -36,7 +30,7 @@ export declare function partitionReviewComments(comments: readonly ReviewComment
|
|
|
36
30
|
export declare function reviewResponseResolution(question: boolean, requested?: boolean): boolean;
|
|
37
31
|
export declare function workingTreeReplyDraft(thread: ReviewThreadRecord, body: string): ReviewDraft;
|
|
38
32
|
export declare function resolveReviewThread(comment: ReviewComment, threads: readonly ReviewThreadRecord[]): ReviewThreadRecord | undefined;
|
|
33
|
+
export declare function assertRenderedReviewBody(body: string): void;
|
|
39
34
|
export declare function workingTreeDiff(cwd: string): Promise<string>;
|
|
40
35
|
export declare function createReviewTools(): readonly ToolDefinition[];
|
|
41
|
-
export declare function syncLocalThreadArtifact(path: string, title: string, sessionSlug: string, threads: readonly ReviewThreadRecord[]): Promise<ReviewThreadRecord[]>;
|
|
42
36
|
//# sourceMappingURL=review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/tools/review.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/tools/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAMzG,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAwDnB,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAExF;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,EACtC,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EAUd;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,CAExF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAY3F;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,kBAAkB,GAAG,SAAS,CAmBhC;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAW3D;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAalE;AAID,wBAAgB,iBAAiB,IAAI,SAAS,cAAc,EAAE,CAkV7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/tools/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/tools/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAwBlF,eAAO,MAAM,eAAe,EAAE,cA6B5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,cAyB/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difflab/pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-rc.202610020810.d27e7fc",
|
|
4
4
|
"description": "Tools and skills for the pi coding agent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
"type": "module",
|
|
18
18
|
"main": "./dist/index.js",
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
|
-
"bin": {
|
|
21
|
-
"diffpi": "./dist/cli.js"
|
|
22
|
-
},
|
|
23
20
|
"exports": {
|
|
24
21
|
".": {
|
|
25
22
|
"types": "./dist/index.d.ts",
|
|
@@ -57,7 +54,6 @@
|
|
|
57
54
|
},
|
|
58
55
|
"dependencies": {
|
|
59
56
|
"@juicesharp/rpiv-ask-user-question": "^2.10.1",
|
|
60
|
-
"commander": "^14.0.0",
|
|
61
57
|
"mdast-builder": "1.1.1",
|
|
62
58
|
"pi-mcp-adapter": "^2.38.0",
|
|
63
59
|
"remark-stringify": "11.0.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diffpi-doctor
|
|
3
|
+
description: Check and repair stale global Diffpi agent profiles after a Pi package update. Use when plan or review agents request removed diffpi_modes_* tools or their installed profiles differ from @difflab/pi.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Diffpi Doctor
|
|
7
|
+
|
|
8
|
+
1. Call `diffpi_doctor` with `apply: false` to inspect the bundled agent profiles against Pi's global agent directory. This check does not install packages, run full setup, or change settings.
|
|
9
|
+
2. If any profile needs repair, call `diffpi_doctor` with `apply: true`. It updates only bundled `diffpi-*.md` agent profiles from the installed @difflab/pi package and backs up each replaced file. If the package or target cannot be read safely, stop and report the blocker.
|
|
10
|
+
3. Report changed paths and backup location. In each affected Pi session, reload resources or start a new conversation if an old inline system prompt persists. Do not claim this repair validates, marks READY, or executes any plan.
|
|
@@ -30,7 +30,7 @@ ask_user_question({
|
|
|
30
30
|
options: [
|
|
31
31
|
{
|
|
32
32
|
label: 'Allow',
|
|
33
|
-
description: 'Install mise, Node.js, Zellij, Helix,
|
|
33
|
+
description: 'Install mise, Node.js, Zellij, Helix, and Context Mode when missing.',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
label: 'Skip',
|
|
@@ -43,8 +43,8 @@ ask_user_question({
|
|
|
43
43
|
});
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Map `None`, `Linear`, and `Jira` to `none`, `linear`, and `jira`. Infer the review forge from the current repository remote; do not ask about
|
|
46
|
+
Map `None`, `Linear`, and `Jira` to `none`, `linear`, and `jira`. Infer the review forge from the current repository remote; do not ask about a single forge during ordinary setup. Only when the user explicitly asks to install hosted VCS MCP integrations, ask a multi-select question for GitHub and GitLab and pass the selected values as `forges`; zero selections means no VCS MCP installation. If the user selects `Skip` or declines the questionnaire, stop without calling `diffpi_setup`. After successful setup, call `diffpi_reload` when the setup result says pi must restart.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Do not configure Diffpi-managed Zed review keybindings; preserve manually owned editor configuration.
|
|
49
49
|
|
|
50
50
|
Setup installs Diffpi's bundled agent Markdown into Pi's standard global agent directory. The agents run through the subagent plugin; no inline profile selection is required for plan or review workflows.
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plan
|
|
3
|
-
description: Create, revise,
|
|
2
|
+
name: diffpi-plan
|
|
3
|
+
description: Create, revise, validate, finalize, and execute live Diffpi plans. Use for natural-language requests to change an existing plan, apply feedback, or update plan tasks; inspect the named plan before editing and do not claim routing guarantees.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Plan
|
|
7
7
|
|
|
8
|
-
Route the verb and remaining request to its workflow. Fuzzy-match recognizable natural language; treat argument shapes as hints, not rigid gates.
|
|
8
|
+
Route the verb and remaining request to its workflow. Fuzzy-match recognizable natural language; treat argument shapes as hints, not rigid gates. Requests such as “update the cache plan with this feedback”, “revise PLAN.md”, and “apply review notes to the existing plan” should route to `update` when a unique existing plan can be identified. Metadata and examples improve discovery, but do not guarantee host routing; preserve the explicit `/skill:diffpi-plan` form when deterministic selection matters.
|
|
9
9
|
|
|
10
10
|
| Input | Workflow |
|
|
11
11
|
| -------------------------------------------- | -------------------------------------------- |
|
|
12
12
|
| `init <slug> [--branch <branch>]` | [init](references/workflows/init.md) |
|
|
13
13
|
| `new <slug> <request>` | [new](references/workflows/new.md) |
|
|
14
14
|
| `update <slug> <request>` | [update](references/workflows/update.md) |
|
|
15
|
-
| `annotate <plan-path>` | [annotate](references/workflows/annotate.md) |
|
|
16
15
|
| `validate <slug>` | [validate](references/workflows/validate.md) |
|
|
17
16
|
| `finalize <slug>` | [finalize](references/workflows/finalize.md) |
|
|
18
17
|
| `go <slug> [--mode no-commit\|commit\|push]` | [go](references/workflows/go.md) |
|
|
19
18
|
| `help`, missing or unrecognizable request | [help](references/workflows/help.md) |
|
|
20
19
|
|
|
21
|
-
Follow the selected workflow.
|
|
20
|
+
Follow the selected workflow. `new`, `update`, and `go` do not auto-validate; `finalize` validates before readiness, and `validate` is explicit and memory-only. For `init`, DRAFT `validate`, `finalize`, or `go` when no native subagents are available, follow [the explicit inline exception](references/workflows/inline-fallback.md) only after the caller obtains confirmation; never silently fall back.
|
|
@@ -22,7 +22,7 @@ Template metadata such as managed revisions or snapshots is not part of the live
|
|
|
22
22
|
|
|
23
23
|
After writing the current `PLAN.md` and all numbered briefs, perform observed read-only structural verification, then invoke the independent `diffpi-plan-reviewer` exactly once per authoring cycle over the complete snapshot. Require the actual completed independent `diffpi-plan-reviewer` result, record its verdict and findings, and compare plan hashes and Git state around it; a reviewer mutation invalidates the round. The reviewer is instructed not to mutate but inherits ambient capabilities, so read-only behavior is a policy, not a sandbox.
|
|
24
24
|
|
|
25
|
-
The Planner documents each actionable finding and its disposition, repairs it, rereads changed files, and reruns only observed read-only structural verification. Do not automatically rerun the reviewer. Keep the plan DRAFT until explicit finalize/go checks completed review evidence and dispositions. A BLOCKING verdict remains BLOCKING even when repaired; a passing review does not prove source implementation.
|
|
25
|
+
The Planner documents each actionable finding and its disposition, repairs it, rereads changed files, and reruns only observed read-only structural verification. Do not automatically rerun the reviewer. Keep the plan DRAFT until explicit finalize/go checks completed review evidence and dispositions. A BLOCKING verdict remains BLOCKING even when repaired; a passing review does not prove source implementation. Human review is optional and is not a replacement for the automated round.
|
|
26
26
|
|
|
27
27
|
## Contracts and consequences
|
|
28
28
|
|
|
@@ -8,7 +8,7 @@ Syntax: `finalize <slug>` (optional `--plan <plan-path>` or `--target <plan-path
|
|
|
8
8
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
|
-
If DRAFT and no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md); a passing inline structural and review/disposition validation under that recorded exception permits READY. Otherwise stop with a blocker.
|
|
11
|
+
If DRAFT and no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md); a passing inline structural and review/disposition validation under that recorded exception permits READY. Otherwise stop with a blocker. Finalize is the only automatic validation entry point.
|
|
12
12
|
|
|
13
13
|
1. Resolve the initiating Git root, absolute PLAN.md and numbered briefs. If DRAFT, invoke [validate](validate.md) through its **one** separate frontier/high `diffpi-planner` background child with the resolved path, filling the self-contained fenced `text` prompt in validate.md before launch and collecting the completed result. Do not launch a second child or another reviewer. If validation is incomplete or blocked, leave DRAFT and report the blocker.
|
|
14
|
-
2. The **calling agent** (not the child) checks the completed validation result
|
|
14
|
+
2. The **calling agent** (not the child) checks the completed validation result against the current files, then makes the short DRAFT → READY transition and reads it back. If the plan is already READY, read it back without revalidation. Do not execute tasks. Report status and memory-only proof or exact blocker.
|
|
@@ -8,10 +8,10 @@ Syntax: `go <slug> [--mode no-commit|commit|push]` (optional `--plan <plan-path>
|
|
|
8
8
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
|
-
If no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md) for DRAFT readiness and/or READY execution; otherwise stop with a blocker. Never silently execute inline.
|
|
11
|
+
If no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md) for DRAFT readiness and/or READY execution; otherwise stop with a blocker. Never silently execute inline. `/plan go` never invokes validation or a reviewer.
|
|
12
12
|
|
|
13
|
-
1. Resolve the initiating Git root, absolute PLAN.md and all numbered briefs.
|
|
14
|
-
2. Fill every placeholder with actual request, paths and chosen mode before launch (no literal placeholders). Launch a medium `diffpi-orchestrator` background agent with ambient capabilities and this prompt:
|
|
13
|
+
1. Resolve the initiating Git root, the unique absolute PLAN.md and all numbered briefs. Scan shared plans for active or blocked canonical-worktree bindings before changing status; ask the caller to resolve an ambiguous target, another worktree's ownership, rebind, restart, or abandonment. If DRAFT, change only `**Status:** DRAFT` to `**Status:** READY`, reread it, and begin execution without `/plan validate`, structural checks, or a reviewer. If already READY, **skip validate** and skip readiness checks; a separate `finalize` is not required. Reread status. Bind the selected READY plan to the canonical worktree before dispatch. Do not send DRAFT to the orchestrator. Take `<plan-id>` from the selected PLAN.md parent directory, not from old log references in its text. Derive the relative filename `.diffpi/plan/<plan-id>/logs.jsonl`. Confirm that `realpath(<repo-root>/.diffpi/plan/<plan-id>)` equals `realpath(dirname(<absolute PLAN.md>))`, even if PLAN.md was selected through the shared store path; block if they differ. This makes the filename relative to the canonical Git root and places `logs.jsonl` directly beside PLAN.md. Do not create a `logs/` directory.
|
|
14
|
+
2. Fill every placeholder with actual request, paths, derived log filename, and chosen mode before launch (no literal placeholders). Launch a medium `diffpi-orchestrator` background agent with ambient capabilities and this prompt:
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
17
|
Execute this READY live plan under the user-approved policy. Do not run a plan reviewer or revalidate READY for readiness.
|
|
@@ -19,9 +19,11 @@ Execute this READY live plan under the user-approved policy. Do not run a plan r
|
|
|
19
19
|
- Initiating Git root: {repo-root}
|
|
20
20
|
- Absolute READY PLAN.md path: {plan-path}
|
|
21
21
|
- Absolute numbered brief paths: {brief-paths}
|
|
22
|
+
- Relative log filename: {derived-log-filename} (the `logs.jsonl` sibling of the selected PLAN.md, relative to the canonical Git root)
|
|
22
23
|
- Mode: {mode} (no-commit|commit|push)
|
|
23
|
-
- Read PLAN.md and every brief; require READY. Own execution
|
|
24
|
-
- Derive bounded task scopes from steps and each brief's sole action-labeled fenced `text` Files Affected tree; serialize uncertain/overlapping scopes
|
|
24
|
+
- Read PLAN.md and every brief; require READY. Own execution metadata and lifecycle, schedule phases after prerequisites, and persist actual results before more work.
|
|
25
|
+
- Derive bounded task scopes from steps and each brief's sole action-labeled fenced `text` Files Affected tree; serialize uncertain/overlapping scopes, while disjoint source tasks may run concurrently. Targeted task-line edits are not atomic. Delegate each Worker the absolute PLAN.md path, exact unchecked task line and task ID/title, canonical execution root, and the exact derived relative `logs.jsonl` filename. Require `diffpi_log` calls with `cwd` set to the canonical execution root and `filename` set to that supplied relative path at start, meaningful milestones, verification, and completed/failed/partial return, using `label: progress` by default and `label: deviation` only for an actual departure. Never write new plan events under `logs/` or `.diffpi/logs/`; leave historical logs untouched. Workers edit only assigned source/test files plus their one exact task line; they must search for exactly one literal unchecked line, replace only that line after focused checks pass, reread it, and report a discrepancy for missing, duplicated, changed, or already-checked lines. Failed or partial work remains unchecked.
|
|
26
|
+
- After each Worker, and at every phase barrier, reread PLAN.md, validate source and check evidence, and restore only supported completion marks lost to concurrent last-writer-wins edits. Logs and checkboxes alone never advance a phase.
|
|
25
27
|
- Run project format, lint and tests after phase work; preserve failures, warnings and attempts; block on failed gates. In no-commit, do not commit or push. In commit, create exactly one phase commit after gates, do not push. In push, commit and push, then wait for settled CI on the exact observed SHA before the next phase. Block on unavailable exact-SHA monitoring, timeout, partial or failed CI. Local gates cannot be replaced by CI.
|
|
26
28
|
- Return actual completed results or precise blockers, without background questions.
|
|
27
29
|
```
|
|
@@ -14,11 +14,10 @@ Syntax: `help` (no flags or positional arguments required).
|
|
|
14
14
|
/plan init <slug> [--branch <branch>]
|
|
15
15
|
/plan new <slug> <request>
|
|
16
16
|
/plan update <slug> <request>
|
|
17
|
-
/plan annotate <plan-path>
|
|
18
17
|
/plan validate <slug> [--plan <plan-path>]
|
|
19
18
|
/plan finalize <slug>
|
|
20
19
|
/plan go <slug> [--mode no-commit|commit|push]
|
|
21
20
|
/plan help
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
2. Describe these argument shapes as guidance rather than rigid gates; send a recognizable request to its verb for inference. Make no plan changes.
|
|
23
|
+
2. Describe these argument shapes as guidance rather than rigid gates; send a recognizable request to its verb for inference. Include examples: “update the existing API plan with this feedback” and “apply review notes to PLAN.md” route to `update` when the target is unique. Explain that metadata and examples improve discovery but cannot guarantee host routing; use `/skill:diffpi-plan update <slug> <request>` when exact routing is needed. Make no plan changes.
|
|
@@ -8,7 +8,7 @@ Syntax: `init <slug> [--branch <branch>]` (optional target/issue inferred from r
|
|
|
8
8
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
|
-
If no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md); otherwise stop with a blocker. Do not silently scaffold inline.
|
|
11
|
+
If no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md); otherwise stop with a blocker. Do not silently scaffold inline. The scaffold may include sibling `revisions/`, but must not create a `logs/` directory. `/plan go` creates `logs.jsonl` beside PLAN.md on its first log append.
|
|
12
12
|
|
|
13
13
|
1. Resolve the unique initiating Git root and absolute PLAN.md target. Replace every placeholder below with actual values (use `none` for absent issue/branch); never pass literal placeholders. Launch a low `diffpi-worker` background agent with this bounded prompt and ambient capabilities:
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ Scaffold an incomplete live plan, and do nothing else.
|
|
|
19
19
|
- Absolute PLAN.md target: {plan-path}
|
|
20
20
|
- Branch and issue: {branch-and-issue}
|
|
21
21
|
- Check collisions before writing. Use one flat `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/` directory, never `date/slug`.
|
|
22
|
-
- Create PLAN.md and phase scaffolds with ordinary writes, DRAFT and a visible INCOMPLETE marker (not a status). This init-only exception permits plan-file creation, but not status transitions beyond the initial DRAFT scaffold, source edits, execution or review.
|
|
22
|
+
- Create PLAN.md and phase scaffolds with ordinary writes, DRAFT and a visible INCOMPLETE marker (not a status). Do not create a `logs/` directory or an empty log file; execution later appends to `logs.jsonl` beside PLAN.md. This init-only exception permits plan-file creation, but not status transitions beyond the initial DRAFT scaffold, source edits, execution or review.
|
|
23
23
|
- Reread created files. Do not validate or launch a reviewer for the incomplete scaffold.
|
|
24
24
|
- Return created paths or the exact failed operation/path/error; return unresolved decisions as blockers without interactive questions.
|
|
25
25
|
```
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Apply this policy only to `init`, `new`, `update`, DRAFT `validate`, `finalize`, or `go` when **no native subagent mechanism is available** to the initiating conversation. Try any available attached subagent dispatch/completion transport before treating native subagents as unavailable; a missing named tool alone is not proof. A failed reviewer, gate, implementation, structural check, CI check, or unavailable particular model is **not** an excuse to switch inline. Do not silently fall back after a child is queued, stopped, incomplete, or fails; return its actual blocker.
|
|
4
4
|
|
|
5
|
-
Before substantive inline work, the **calling agent** must ask `ask_user_question` and receive explicit confirmation for the inline exception. State that this is a last resort with reduced isolation/model-tier guarantees and that review in the same thread is **not independent**. Offer a choice to proceed inline or stop; a declined, abandoned, or unavailable questionnaire (including in a background child or noninteractive eval) means **stop and report the blocker to the initiating thread**. Do not infer consent from the request, a prior unrelated approval, or silence. Record the confirmation and its scope with the authoring-cycle evidence; one confirmation can cover the named operation and its
|
|
5
|
+
Before substantive inline work, the **calling agent** must ask `ask_user_question` and receive explicit confirmation for the inline exception. State that this is a last resort with reduced isolation/model-tier guarantees and that review in the same thread is **not independent**. Offer a choice to proceed inline or stop; a declined, abandoned, or unavailable questionnaire (including in a background child or noninteractive eval) means **stop and report the blocker to the initiating thread**. Do not infer consent from the request, a prior unrelated approval, or silence. Record the confirmation and its scope with the authoring-cycle evidence; one confirmation can cover the named operation and its required steps, but a later user-initiated update requires confirmation again. Noninteractive evals still require an actual completed child; they cannot opt into inline fallback.
|
|
6
6
|
|
|
7
|
-
After confirmation, perform the **same selected workflow** in the caller, with the same paths, collision checks, statuses, role boundaries, snapshots, Git evidence, findings, repairs, one-round budget, gates, CI and commit/push authorization. For `init`, create only an incomplete DRAFT scaffold. For `new` and `update`, make requested draft edits
|
|
7
|
+
After confirmation, perform the **same selected workflow** in the caller, with the same paths, collision checks, statuses, role boundaries, snapshots, Git evidence, findings, repairs, one-round budget, gates, CI and commit/push authorization. For `init`, create only an incomplete DRAFT scaffold. For `new` and `update`, make requested draft edits without automatic validation; `update` must preserve completed work and earlier evidence. For DRAFT `validate`, first run a working read-only structural check and repair structural defects as in the normal workflow. Capture every plan path/hash and Git HEAD, porcelain status, diff and untracked inventory before the review and again immediately afterward. Perform **one distinct read-only inline Plan Reviewer checklist pass** on the whole draft per authoring cycle, checking structure and parity, phase prerequisites/constraints, tree placement, ordered steps and temporally runnable Verify commands, intent/design consistency, risks and Worker executability. Keep provenance as **INLINE reviewer (same thread, not independent)**, the actual verdict and line-specific BLOCKING/CONSIDER/NOTE findings (or explicit empty list), reviewed and post-review snapshots, Git evidence, and concrete dispositions in the validation response/memory only; never write validation proof into PLAN.md or another durable plan artifact. Never fabricate a child ID, completed subagent, independent verdict or independent PASS. Reuse a valid completed round from the cycle rather than automatically reviewing a second time. Reviewer pass is read-only: if the pass mutates files or evidence changes unexplained, invalidate it. Repair actionable findings outside that pass, preserve an original BLOCKING verdict, reread and rerun **only** the structural check; do not call repaired content reviewer-approved. Failed structural checks, unresolved BLOCKING findings or unexplained changes block readiness.
|
|
8
8
|
|
|
9
|
-
For `finalize
|
|
9
|
+
For `finalize`, after **passing inline structural verification and inline review/disposition validation under the recorded approved exception**, the caller may mark DRAFT → READY and reread it. This exception does not waive any failed check. For DRAFT `go`, mark only DRAFT → READY and reread it before execution; do not run validation, structural readiness checks, or a reviewer. Already-READY `go` skips readiness validation too. If no native subagents remain for execution, the confirmed caller performs Orchestrator and bounded Worker steps inline with serialized uncertain/overlapping scopes and the same phase gates, no-commit/commit/push policy and exact-SHA CI requirements. Derive `.diffpi/plan/<plan-id>/logs.jsonl` from the selected PLAN.md parent directory; confirm that `realpath(<root>/.diffpi/plan/<plan-id>)` equals `realpath(dirname(<absolute PLAN.md>))`, so the file is its sibling through the managed `.diffpi` link. Call `diffpi_log` with `cwd` set to the canonical execution root and `filename` set to this relative path at each required milestone. Do not write new events under a `logs/` directory, even if old plan text names one. Do not claim inline work was delegated or independently reviewed. If the user declines or cannot be asked, return the blocker rather than modifying the plan or executing work.
|
|
@@ -8,7 +8,7 @@ Syntax: `new <slug> <request>` (optional `--target <plan-path>`, `--issue <id>`,
|
|
|
8
8
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
|
-
If no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md)
|
|
11
|
+
If no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md); otherwise stop with a blocker. Never silently draft inline. The draft may include sibling `revisions/`, but must not create a `logs/` directory. `/plan go` creates `logs.jsonl` beside PLAN.md on its first log append.
|
|
12
12
|
|
|
13
13
|
1. Resolve the initiating Git root and unique absolute PLAN.md target. Fill every placeholder with actual values before launch (use `none` for absent context). Launch a frontier/high `diffpi-planner` background agent with ambient capabilities:
|
|
14
14
|
|
|
@@ -19,8 +19,8 @@ Draft a complete live plan; do not dispatch a reviewer or mark READY.
|
|
|
19
19
|
- Absolute PLAN.md target, branch and issue: {plan-path-and-context}
|
|
20
20
|
- Reject collisions; use a flat `.diffpi/plan/<YYMMDD[-ticket]-short-slug>/` directory.
|
|
21
21
|
- Inspect the repository and resolve design questions. Write PLAN.md with intent, requirements, design, references, stable phase/task IDs, phase prerequisites and constraints (or None), and flat task checkboxes.
|
|
22
|
-
- Write every numbered brief. Put exactly one action-labeled fenced `text` Files Affected tree immediately after Objective. Include ordered task steps, Verify commands runnable before later tasks, acceptance criteria and free-form Implementation Constraints.
|
|
22
|
+
- Write every numbered brief. Put exactly one action-labeled fenced `text` Files Affected tree immediately after Objective. Include ordered task steps, Verify commands runnable before later tasks, acceptance criteria and free-form Implementation Constraints. Do not create `logs/` or an empty log file; execution later appends to `logs.jsonl` beside PLAN.md.
|
|
23
23
|
- Reread all files. Leave DRAFT. Return paths and completed result or exact blocker; do not ask background questions.
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
2. Collect the completed draft result.
|
|
26
|
+
2. Collect the completed draft result. Do not run structural validation or dispatch a reviewer automatically. Leave DRAFT and report the created paths and actual result; the user may request [validate](validate.md) or [finalize](finalize.md) explicitly.
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Syntax: `update <slug> <request>` (optional `--plan <plan-path>` or `--target <plan-path>`).
|
|
6
6
|
|
|
7
|
-
1. Infer revision intent, unique target and requested edits from explicit args/flags first, then natural language and repository context.
|
|
7
|
+
1. Infer revision intent, unique target and requested edits from explicit args/flags first, then natural language and repository context. Recognize requests such as “update the existing plan with this feedback”, “revise PLAN.md”, and “apply these review notes to the cache plan” as update intent. Resolve a unique plan by slug, explicit path, branch, or repository context; do not require inferable positionals. Treat metadata and natural-language examples as routing guidance, not a guarantee. Ask `ask_user_question` in the caller for material ambiguity; send insufficient intent to [help](help.md).
|
|
8
8
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
When the request names an existing plan but omits a slug, inspect repository plan directories and use the only unambiguous match. Do not silently choose among multiple plans; ask the caller to select one.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
If no native subagents are available, ask for explicit confirmation in the caller **before edits** and follow [the inline exception](inline-fallback.md); otherwise stop with a blocker. Never silently revise inline.
|
|
14
|
+
|
|
15
|
+
1. Resolve the initiating Git root, absolute PLAN.md and numbered brief paths. Fill all placeholders with actual values before launch. Before substantive edits, the planner must append the exact supplied feedback under `### Feedback`, reread PLAN.md, and archive the complete feedback-bearing PLAN.md plus every numbered brief under `.diffpi/plan/<plan-id>/revisions/rev-NNNN/`. The archive is create-only inside the live plan directory: reuse an existing directory only after byte-for-byte verification of PLAN.md and the complete brief set; otherwise stop for reconciliation. Never overwrite an archive. Launch `diffpi-planner` on its configured frontier model with explicit **low** thinking and `inherit_context: true` (fork the parent conversation at launch), in the background with ambient capabilities:
|
|
14
16
|
|
|
15
17
|
```text
|
|
16
18
|
Revise only the requested unfinished plan work in a new user-initiated authoring cycle. Do not validate or dispatch a reviewer.
|
|
@@ -23,4 +25,4 @@ Revise only the requested unfinished plan work in a new user-initiated authoring
|
|
|
23
25
|
- Reread files, leave DRAFT, return changed paths and exact result or blocker. Do not ask background questions.
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
2. Collect the completed edit result.
|
|
28
|
+
2. Collect the completed edit result. Do not launch validation or a reviewer automatically. Leave DRAFT and report changed paths and the exact result; the user may request [validate](validate.md) or [finalize](finalize.md) explicitly. Do not discard earlier evidence.
|
|
@@ -10,7 +10,7 @@ Syntax: `validate <slug>` (optional `--plan <plan-path>` or `--target <plan-path
|
|
|
10
10
|
|
|
11
11
|
If DRAFT and no native subagents are available, ask for explicit confirmation in the caller and follow [the inline exception](inline-fallback.md), including a distinct read-only inline Plan Reviewer pass; otherwise stop with a blocker. Never claim an independent review for inline work.
|
|
12
12
|
|
|
13
|
-
1. Resolve the initiating Git root, absolute PLAN.md and every numbered brief path. If READY,
|
|
13
|
+
1. Resolve the initiating Git root, absolute PLAN.md and every numbered brief path. If the plan is inactive READY, perform the manual validation below; do not return early. READY does not require revalidation for go. For DRAFT, fill all placeholders with real values before launch (use `none` where appropriate). Validation is explicit and memory-only. Do not write validation proof, snapshots, findings, dispositions, or verdicts to PLAN.md or any plan artifact. Launch a separate frontier/high `diffpi-planner` background agent with ambient capabilities:
|
|
14
14
|
|
|
15
15
|
```text
|
|
16
16
|
Validate this DRAFT without marking it READY or executing tasks.
|
|
@@ -18,14 +18,14 @@ Validate this DRAFT without marking it READY or executing tasks.
|
|
|
18
18
|
- Initiating Git root: {repo-root}
|
|
19
19
|
- Absolute PLAN.md path: {plan-path}
|
|
20
20
|
- Absolute numbered brief paths: {brief-paths}
|
|
21
|
-
- Read PLAN.md
|
|
22
|
-
- Identify this authoring cycle. If one independent completed whole-plan diffpi-plan-reviewer round already exists for the cycle with valid before/after
|
|
21
|
+
- Read PLAN.md and all numbered briefs. Run a working read-only structural check of the whole current draft; name the capability used or block if none works. Check task ID/title parity, prerequisites/constraints, sole action-labeled fenced `text` Files Affected tree immediately after Objective, ordered tasks and temporally runnable Verify commands. Repair structural errors only within the plan and rerun the structural check.
|
|
22
|
+
- Identify this authoring cycle. If one independent completed whole-plan diffpi-plan-reviewer round already exists for the cycle with valid before/after memory-only proof, reuse it; never dispatch a second reviewer on repeated validate or after repairs. Otherwise capture every plan file path/hash plus Git HEAD, porcelain status, diff and untracked inventory in memory, then launch at most ONE independent frontier/high diffpi-plan-reviewer background agent. Fill its prompt with the actual absolute plan/brief paths, hashes and Git evidence before dispatch:
|
|
23
23
|
|
|
24
24
|
Reviewer task: Read PLAN.md and every numbered brief at {reviewed-plan-paths-and-hashes} with Git evidence {git-head-status-diff-untracked}. Make no mutations. Review structure, parity, phase prerequisites/constraints, Files Affected tree placement, ordered steps, temporally runnable Verify commands, intent/design consistency, risks and lightweight Worker executability. Return completed verdict and findings; each finding includes file, line, BLOCKING/CONSIDER/NOTE severity, reason and concrete fix. Return an explicit empty findings list for PASS. Do not claim source implementation is verified.
|
|
25
25
|
|
|
26
26
|
- Require the reviewer's actual completed result, not queued/partial/stopped output or self-reported identity. Compare plan hashes and Git HEAD/status/diff/untracked inventory immediately after review. Invalidate the round on reviewer mutation, incomplete evidence or unexplained change. Use any real available dispatch/completion implementation, not one named tool prerequisite.
|
|
27
|
-
-
|
|
28
|
-
- Return validation PASS only when structural checks pass, the one completed review round and
|
|
27
|
+
- Keep the reviewed snapshot, Git evidence, completed verdict, findings and dispositions in the validation result's response/memory only. Keep proof in memory only; do not write it into PLAN.md, References, revisions, or logs. Repair actionable findings only when explicitly requested by the validation workflow, reread changed files and rerun ONLY the read-only structural check. Preserve the original BLOCKING verdict; never claim reviewer PASS for repaired content. A later user-initiated change starts a new authoring cycle, but repeated validation does not.
|
|
28
|
+
- Return validation PASS only when structural checks pass, the one completed review round and memory-only proof are valid, every BLOCKING finding has a resolved disposition, and all post-review changes are explained. Otherwise return precise blockers. Leave DRAFT; no background questions.
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
2. Collect the actual completed result, not only a job ID. Report validation verdict, reviewed and current snapshots, dispositions or blockers. Do not mark READY.
|
package/skills/review/SKILL.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: review
|
|
3
|
-
description: Create, edit, review, address, publish, complete, and merge GitHub/GitLab or local
|
|
2
|
+
name: diffpi-review
|
|
3
|
+
description: Create, edit, review, address, publish, complete, and merge GitHub/GitLab or local Markdown reviews.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Review
|
|
7
7
|
|
|
8
|
+
Local reviews are ordinary Markdown files. For local work, read [the packaged template](templates/REVIEW.md) and [review conventions](references/review-standards.md), then use the native `read`, `write`, `edit`, and shell operations. Resolve a unique plan or ticket, ask on ambiguity, inspect existing files before best-effort numbering, and preserve existing finding IDs, replies, and checkbox state. Remote reviews use forge-backed tools and templates. Do not introduce a parser, backend, allocator, lock, sidecar, or database.
|
|
9
|
+
|
|
8
10
|
Infer the verb from the request. Route it with its arguments to the selected workflow:
|
|
9
11
|
|
|
10
12
|
| Command | Reference |
|
|
@@ -13,11 +15,9 @@ Infer the verb from the request. Route it with its arguments to the selected wor
|
|
|
13
15
|
| `auto [target] [--local]` | [auto](references/workflows/auto.md) |
|
|
14
16
|
| `address [target] [--local]` | [address](references/workflows/address.md) |
|
|
15
17
|
| `publish [target] [--local] [--comment\|--approve\|--request-changes\|--close]` | [publish](references/workflows/publish.md) |
|
|
16
|
-
| `complete [target] [--local\|--approve\|--reject\|--
|
|
18
|
+
| `complete [target] [--local\|--approve\|--reject\|--close]` | [complete](references/workflows/complete.md) |
|
|
17
19
|
| `merge [target]` | [merge](references/workflows/merge.md) |
|
|
18
|
-
| `status [target] [--local]` | [status](references/workflows/status.md) |
|
|
19
|
-
| `open [target] [--local]` | [open](references/workflows/open.md) |
|
|
20
20
|
| `edit [target] [--local]` | [edit](references/workflows/edit.md) |
|
|
21
21
|
| `help` | [help](references/workflows/help.md) |
|
|
22
22
|
|
|
23
|
-
Map `create`/`draft` → `new`, `launch` → `auto`, `ready` → `publish`, `close` → `complete`, `land` → `merge`. Route missing or unrecognizable intent → [help](references/workflows/help.md). For substantive work without native subagents, use the selected workflow's [foreground fallback](references/workflows/foreground-fallback.md) only after explicit confirmation.
|
|
23
|
+
Map `create`/`draft` → `new`, `launch` → `auto`, `ready` → `publish`, `close` → `complete`, `land` → `merge`. Local `publish` and `complete` are unsupported; reject them explicitly. Remote edit reports the URL and never launches a browser. Route missing or unrecognizable intent → [help](references/workflows/help.md). For substantive work without native subagents, use the selected workflow's [foreground fallback](references/workflows/foreground-fallback.md) only after explicit confirmation.
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Review standards
|
|
2
2
|
|
|
3
|
-
Use these rules for review and address workflows.
|
|
3
|
+
Use these rules for review and address workflows. Local reviews use the packaged `templates/REVIEW.md` file as a starting point and remain human-readable Markdown; remote reviews continue to use forge-backed tools.
|
|
4
|
+
|
|
5
|
+
## Local Markdown conventions
|
|
6
|
+
|
|
7
|
+
- Create or select one `.diffpi/review/YYMMDD-{slug}/REVIEW-{n}.md` file after inspecting existing files. Numbering is best effort, not an atomic allocator; ask when the plan or ticket match is ambiguous.
|
|
8
|
+
- Keep the plain `Status` field and stable finding IDs (`F-001`, `F-002`, ...). Use `[ ]` for open findings and `[x]` only after focused verification proves the resolution.
|
|
9
|
+
- Record pasted review text directly in the file. Preserve existing replies, evidence, IDs, and finding state. Add replies instead of rewriting history.
|
|
10
|
+
- Leave blocked or partial findings open and explain the blocker in `Status Notes`. Local publish and complete are unsupported.
|
|
11
|
+
- Do not claim that static tests prove agent execution semantics; use a manual temporary-directory exercise when a workflow needs behavioral confirmation.
|
|
4
12
|
|
|
5
13
|
## Operational workflow rules
|
|
6
14
|
|
|
@@ -2,22 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Parse arguments
|
|
4
4
|
|
|
5
|
-
Accept `address [target] [--local]`.
|
|
5
|
+
Accept `address [target] [--local]`. Resolve one unaddressed local file by explicit path or unique plan/ticket match; ask `ask_user_question` when matching is ambiguous. If no file exists but review text is pasted, create a file from `templates/REVIEW.md` and immediately address its findings.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Local steps
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Launch a background `diffpi-reviewer` for classification when native subagents are available; it delegates bounded source edits to `diffpi-worker` and keeps lifecycle state untouched.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Resolved review-context target: {target}; backend: {backend}; local: {local}; review scope: {review scope}; issue URL: {issue URL or none}; approved commit policy: {policy}.
|
|
15
|
-
- Review standards: {standards}.
|
|
16
|
-
- Call review_context first; reuse its target/backend/local/cwd. Call review_comments; classify every thread, preserve IDs and report unmatched threads. Apply every relevant requested change now unless explicitly deferred by the user or concretely blocked.
|
|
17
|
-
- Delegate independent, bounded non-overlapping source/test edits to lightweight/low diffpi-worker agents with ambient capabilities. Each self-contained fenced text task prompt must supply the actual repository, target/backend/local, thread IDs and exact requests, assigned file scope, acceptance checks and no-lifecycle-mutation policy; fill real values before launch, never raw placeholders. Serialize uncertain or overlapping scopes. Keep your source review read-only. Collect completed worker results, inspect actual edits and verification; escalate hard or ambiguous work instead of silently deferring it. Workers must not commit, reply, publish, complete, merge, resolve or mutate review state.
|
|
18
|
-
- Run review_gates after edits; record failed and skipped checks. For remote source changes, commit after checks and before replies through the user-approved upstream /git commit --no-push workflow (--atomic for separate logical commits). Do not commit without approval. Leave local source edits uncommitted.
|
|
19
|
-
- Call review_respond for every thread with resolve:false, explicit fixed/answered/unresolved outcome and verification evidence. Do not claim blocked work was delivered. Keep questions and all threads open for user resolution. Optionally call review_launch_ui for local replies.
|
|
20
|
-
- Never delete or resolve threads, publish, complete or merge. Report fixed, committed, answered, unresolved, skipped and failed counts, unmatched replies, gate evidence and blockers; resolved count is zero. Preserve local replies and thread state between runs.
|
|
21
|
-
```
|
|
11
|
+
1. Read the selected REVIEW.md and preserve existing replies, IDs, evidence, and checkbox state.
|
|
12
|
+
2. For each finding, inspect the source and run focused verification. Mark `[x]` only when verified; leave blocked or partial findings `[ ]` and explain the blocker in `Status Notes`.
|
|
13
|
+
3. Append an explicit reply/outcome and evidence to the Markdown file. Do not resolve or delete findings, publish, complete, invoke a backend, or use a parser.
|
|
22
14
|
|
|
23
|
-
|
|
15
|
+
## Remote steps
|
|
16
|
+
|
|
17
|
+
Call `review_context`, delegate review judgment to `diffpi-reviewer`, then use existing remote comments and gates. Keep threads open and do not publish, complete, merge, or resolve.
|
|
@@ -2,24 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Parse arguments
|
|
4
4
|
|
|
5
|
-
Accept `auto [target] [--local]`.
|
|
5
|
+
Accept `auto [target] [--local]`. Resolve the target explicitly; ask when local plan/ticket matches are ambiguous.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Local steps
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Launch a background `diffpi-reviewer` for judgment when native subagents are available; it edits only the selected local Markdown file and never changes lifecycle state.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Resolved review-context target: {target}; backend: {backend}; local: {local}; diff scope: {diff scope}; issue URL: {issue URL or none}; approved policy: {policy}.
|
|
15
|
-
- Review standards: {standards}.
|
|
16
|
-
- Call review_context first; reuse its target/backend/local/cwd. Reject unsupported forge, missing integration or unavailable local base without switching backend.
|
|
17
|
-
- Use review_status if needed to distinguish an existing review. Call review_new for a new local session or remote draft PR/MR; call review_edit for an existing review.
|
|
18
|
-
- Run review_gates, then review_diff. Judge intent, correctness, negative/security paths, scope and duplicate findings. Record failed and skipped format/lint/test/subject/CI checks; stop with evidence if the diff is unavailable.
|
|
19
|
-
- Stage changed-file-and-line-grounded BLOCKING, CONSIDER or NOTE findings with review_submit; submit [] if clean. Include overall issues and not-verified checks where needed. Keep remote findings pending and local findings in draft.
|
|
20
|
-
- Do not edit source, publish, complete, merge or resolve threads.
|
|
21
|
-
- Delegate bounded independent checks when useful, with self-contained task prompts and ambient capabilities. The plan's exactly-one independent review limit does not apply to PR/MR code review.
|
|
22
|
-
- Verify and report artifact, backend, gates, finding count and blockers.
|
|
23
|
-
```
|
|
11
|
+
1. Inspect existing `.diffpi/review/**/REVIEW-*.md` files and select the matching file without fuzzy merging. If none exists, create one using the `new --local` procedure and `templates/REVIEW.md`.
|
|
12
|
+
2. Read the diff and review standards. Write findings directly into the selected Markdown file with stable IDs and `[ ]` checkboxes. Preserve existing findings, replies, evidence, and state; never overwrite history or merge similar findings automatically.
|
|
13
|
+
3. Record skipped gates and blockers honestly, then report the exact file path. Local review files remain uncommitted unless the caller requests otherwise.
|
|
24
14
|
|
|
25
|
-
|
|
15
|
+
## Remote steps
|
|
16
|
+
|
|
17
|
+
Call `review_context`, use `review_new` or `review_edit` as appropriate, run gates and diff review, and stage findings through the existing remote review tools. Do not use local file behavior for a remote target.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Parse arguments
|
|
4
4
|
|
|
5
|
-
Accept `complete [target] [--
|
|
5
|
+
Accept `complete [target] [--approve|--reject|--close]`. Local complete is unsupported; reject stale `--local` or working-tree selectors. Fuzzy-match target/backend/action from the request and repository. Prefer explicit arguments/flags, then safe inference, then current-review target; do not invent a remote action. Call `ask_user_question` only for material ambiguity before launch; return a precise blocker if a new decision arises later.
|
|
6
6
|
|
|
7
7
|
## Steps
|
|
8
8
|
|
|
9
|
-
1. Call `review_context` first with the selected target/backend
|
|
9
|
+
1. Call `review_context` first with the selected remote target/backend and `local:false`. For a short, explicitly approved completion with no substantive inspection, call `review_complete` directly using its resolved values. A remote review needs an explicit `approve`, `reject`, or `close` action. `approve` and `reject` publish their decisions; `close` closes the remote PR/MR without publishing first. Verify and report the actual result or exact failure. Do not merge or resolve threads.
|
|
10
10
|
2. If substantive inspection or judgment is required, when native subagents are available, delegate only that analysis to medium `diffpi-orchestrator` in the background with ambient capabilities. Fill every field in this self-contained prompt with actual values (or `none`), including the exact request; never send raw placeholders:
|
|
11
11
|
|
|
12
12
|
```text
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Parse arguments
|
|
4
4
|
|
|
5
|
-
Accept `edit [target] [--local]`.
|
|
5
|
+
Accept `edit [target] [--local]`. Resolve the existing local review by explicit path or unique plan/ticket match; ask on ambiguity.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Local steps
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Print the selected `.diffpi/review/**/REVIEW-*.md` path. Read it before any edit, preserve all finding IDs, replies, evidence, and checkbox state, and use native `read`, `write`, `edit`, or shell operations only. Do not create a session, parser, backend, or browser launch.
|
|
10
|
+
|
|
11
|
+
## Remote steps
|
|
12
|
+
|
|
13
|
+
Call `review_context` and `review_edit`; report the PR/MR URL or selected local Markdown path. Never launch a browser.
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
# help
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Show:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```text
|
|
6
|
+
/review new [title] [--intent text] [--base branch] [--local]
|
|
7
|
+
/review auto [target] [--local]
|
|
8
|
+
/review edit [target] [--local]
|
|
9
|
+
/review address [target] [--local]
|
|
10
|
+
/review publish [target] [--comment|--approve|--request-changes|--close]
|
|
11
|
+
/review complete [target] [--approve|--reject|--close]
|
|
12
|
+
/review merge [target]
|
|
13
|
+
/review help
|
|
14
|
+
```
|
|
6
15
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
1. Show the complete subcommand list:
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
/review new [title] [--intent text] [--base branch] [--local]
|
|
13
|
-
/review auto [target] [--local]
|
|
14
|
-
/review open [target] [--local]
|
|
15
|
-
/review status [target] [--local]
|
|
16
|
-
/review edit [target] [--local]
|
|
17
|
-
/review address [target] [--local]
|
|
18
|
-
/review publish [target] [--local] [--comment|--approve|--request-changes|--close]
|
|
19
|
-
/review complete [target] [--local|--approve|--reject|--abandon]
|
|
20
|
-
/review merge [target]
|
|
21
|
-
/review help
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
2. Show aliases: `create`/`draft` → `new`, `launch` → `auto`, `ready` → `publish`, `close` → `complete`, `land` → `merge`.
|
|
16
|
+
Local `publish` and `complete` are unsupported. Local workflows use direct Markdown files; remote workflows use forge-backed tools. Aliases: `create`/`draft` → `new`, `launch` → `auto`, `ready` → `publish`, `close` → `complete`, `land` → `merge`.
|