@difflab/pi 0.5.0 → 0.6.0
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 +5 -5
- package/agents/diffpi-copilot.md +6 -3
- package/agents/diffpi-reviewer.md +3 -3
- package/dist/commands/review.d.ts +0 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/extensions/index.js +344 -810
- package/dist/extensions/tuicrx.d.ts +1 -8
- package/dist/extensions/tuicrx.d.ts.map +1 -1
- package/dist/index.d.ts +7 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +197 -458
- package/dist/review/github-review-backend.d.ts.map +1 -1
- package/dist/review/gitlab-review-backend.d.ts.map +1 -1
- package/dist/review/index.d.ts +6 -6
- package/dist/review/index.d.ts.map +1 -1
- package/dist/review/local-reviews.d.ts +31 -0
- package/dist/review/local-reviews.d.ts.map +1 -0
- package/dist/review/review-backend.d.ts +2 -3
- package/dist/review/review-backend.d.ts.map +1 -1
- package/dist/review/review-markdown.d.ts +1 -4
- package/dist/review/review-markdown.d.ts.map +1 -1
- package/dist/review/types.d.ts +0 -28
- package/dist/review/types.d.ts.map +1 -1
- package/dist/store.d.ts +0 -2
- package/dist/store.d.ts.map +1 -1
- package/dist/tools/index.js +185 -783
- package/dist/tools/review.d.ts +0 -30
- package/dist/tools/review.d.ts.map +1 -1
- package/dist/workflow.d.ts +47 -0
- package/dist/workflow.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/review/SKILL.md +6 -8
- package/workflows/review/address.md +8 -0
- package/workflows/review/auto.md +8 -0
- package/workflows/review/complete.md +7 -0
- package/workflows/review/edit.md +7 -0
- package/workflows/review/help.md +14 -0
- package/workflows/review/merge.md +6 -0
- package/workflows/review/new.md +7 -0
- package/workflows/review/publish.md +6 -0
- package/dist/review/local-review-backend.d.ts +0 -3
- package/dist/review/local-review-backend.d.ts.map +0 -1
- package/dist/review/review-state.d.ts +0 -20
- package/dist/review/review-state.d.ts.map +0 -1
- package/skills/review/references/workflows/address.md +0 -11
- package/skills/review/references/workflows/auto.md +0 -18
- package/skills/review/references/workflows/complete.md +0 -7
- package/skills/review/references/workflows/edit.md +0 -7
- package/skills/review/references/workflows/help.md +0 -30
- package/skills/review/references/workflows/merge.md +0 -6
- package/skills/review/references/workflows/new.md +0 -19
- package/skills/review/references/workflows/open.md +0 -3
- package/skills/review/references/workflows/publish.md +0 -8
package/README.md
CHANGED
|
@@ -51,19 +51,19 @@ Plan tools cover context, initialization, overview and phase changes, validation
|
|
|
51
51
|
/review new [--local] [--base branch] [--bg]
|
|
52
52
|
/review edit [pr-number|pr-url|branch] [--local] [--bg]
|
|
53
53
|
/review address [target] [--local] [--bg]
|
|
54
|
-
/review publish [target] [--
|
|
54
|
+
/review publish [target] [--comment|--approve|--request-changes|--close] [--bg]
|
|
55
55
|
/review complete [target] [--local|--approve|--reject|--abandon] [--bg]
|
|
56
56
|
/review merge [target] [--bg]
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
The
|
|
59
|
+
The package-owned workflows delegate mechanics to `review_context`, `review_new`, `review_edit`, `review_diff`, `review_gates`, `review_submit`, `review_add_comment`, `review_comments`, `review_dump`, `review_respond`, `review_publish`, `review_complete`, `review_merge`, and `review_launch_ui`. Inline `auto` and `address` activate Reviewer on Sol; lifecycle verbs activate Orchestrator on Luna. Reviewer classifies address threads and delegates bounded edits to lightweight workers. `--bg` leaves the current chat mode unchanged and launches a tracked Orchestrator child. The generic `diffpi_template` tool loads bundled templates or user overrides. GitHub and GitLab support review creation and publication. Merge is intentionally GitHub-only and remains separate from publish and complete.
|
|
60
60
|
|
|
61
|
-
`--local` selects
|
|
61
|
+
`--local` selects a `tuicr` working-tree review. Addressing it saves one immutable dump, applies the feedback, and opens a new review revision. Local reviews have no replies, resolution state, publication, or remote promotion. Dumps live at `.diffpi/review/<branch-slug>/<revision>.json`. Without `--local`, GitHub or GitLab owns comments, replies, publication, and lifecycle state directly. Remote address flows use the upstream `/git commit --no-push` workflow when code changes.
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Remote review artifacts use `YYMMDD-<short-head-sha>.md` or `YYMMDD-uncommitted.md` names. `.diffpi` links to `~/.difflab/diffpi/projects/<repository-name>-<identity-hash>/`, so all worktrees for one remote share records while unrelated same-named repositories remain isolated. The launcher opens a repository-scoped mux tab when zellij, tmux, or screen is detected. Without a mux, Zed lazily gets separate exact-argv tasks for full-branch local reviews and remote PR reviews; other environments receive the command to run.
|
|
64
64
|
|
|
65
65
|
Draft PR bodies use the bundled `review/draft-pr.md` template. Override it at `~/.difflab/diffpi/templates/review/draft-pr.md`. Setup installs the upstream Codevoyant `/git` skill for conventional commit and safe rebase workflows. During package development, run `mise watch //packages/pi:dev`; the task builds and installs the package when its sources change. Run `/reload` in Pi after each successful install.
|
|
66
66
|
|
|
67
|
-
The package root exports environment and forge lifecycle adapters, review backends,
|
|
67
|
+
The package root exports environment and forge lifecycle adapters, remote review backends, immutable local review dumps, plan storage contracts, gate checks, template helpers, tuicr helpers, setup operations, and inline-mode control. `@difflab/pi/tools` exports `createPlanTools`, `createReviewTools`, and the complete tool catalog.
|
|
68
68
|
|
|
69
69
|
See the [repository](https://github.com/difflab-io/diffpi) for details.
|
package/agents/diffpi-copilot.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, mcp, mcp__docs_mcp_server, ctx_execute, ctx_execute_file, ctx_search, ctx_fetch_and_index, web_search, fetch_content
|
|
9
|
+
tools: read, grep, find, bash, edit, write, mcp, mcp__docs_mcp_server, ctx_execute, ctx_execute_file, ctx_search, ctx_fetch_and_index, web_search, fetch_content, ask_user_question
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
Work as a tandem coding partner. Assume the user is actively co-editing the same files. Follow their instructions and make small, reviewable edits while they direct the work.
|
|
@@ -16,7 +16,10 @@ Work as a tandem coding partner. Assume the user is actively co-editing the same
|
|
|
16
16
|
- Never overwrite or rewrite a file from a stale copy. Preserve user changes and prefer targeted edits over full-file writes.
|
|
17
17
|
- If content changed since the last read, reconcile with the current version instead of reapplying old text or squashing the user's edits.
|
|
18
18
|
- Search indexed documentation first, index reusable documentation when needed, and use web search only for a focused missing fact.
|
|
19
|
-
- Do not launch extended research,
|
|
20
|
-
-
|
|
19
|
+
- Do not launch extended research, create plans, or take ownership of product scope and trade-offs.
|
|
20
|
+
- Treat open-ended questions that require exploration, architecture, or broad trade-offs as work for a heavier Sol- or Opus-class agent. Do not improvise that exploration in Copilot mode; offer a concise handoff or mode-change option.
|
|
21
|
+
- Ask only when missing information blocks the next edit. Use `ask_user_question` to present concise action options when the user must choose.
|
|
22
|
+
- Do not end a turn with only a status update, intention, or promise. Execute the user's directive and report the result, or give the user concrete action options when execution cannot continue.
|
|
23
|
+
- The only exception is an active discussion where the user is asking questions. In that case, answer directly and let the user continue the discussion without forcing an action.
|
|
21
24
|
- Run focused checks after changes and review the resulting diff for accidental overwrites.
|
|
22
25
|
- Keep explanations short so the user can stay in the editing loop.
|
|
@@ -12,9 +12,9 @@ metadata:
|
|
|
12
12
|
model-tier: frontier
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
You review code changes. Use `Agent`, `get_subagent_result`, and `steer_subagent` through pi-subagents for bounded delegation; use `SubagentWorkflow` for deterministic multi-stage orchestration. Direct agent delegation must use pi-subagents. Reserve pi-background-tasks or `bg_run` for ordinary long-running shell tests, builds, and servers. The `review_*` tools handle diff fetching, gates,
|
|
15
|
+
You review code changes. Use `Agent`, `get_subagent_result`, and `steer_subagent` through pi-subagents for bounded delegation; use `SubagentWorkflow` for deterministic multi-stage orchestration. Direct agent delegation must use pi-subagents. Reserve pi-background-tasks or `bg_run` for ordinary long-running shell tests, builds, and servers. The `review_*` tools handle diff fetching, gates, immutable local review dumps, forge calls, tuicr sessions, and launching.
|
|
16
16
|
|
|
17
|
-
For `auto`, own review judgment and use the review tools required by the workflow. For `address`,
|
|
17
|
+
For `auto`, own review judgment and use the review tools required by the workflow. For remote `address`, classify threads, delegate bounded edits, collect outcomes, then call `review_respond` with `resolve: false`. For local `address`, call `review_dump`, apply that immutable revision's feedback, and launch the next tuicr revision. Local reviews have no replies or resolution state. Never resolve or delete a remote thread; the user owns resolution. Do not publish, complete, or merge. Read `skills/review/references/review-standards.md` before classifying threads.
|
|
18
18
|
|
|
19
19
|
## Rules
|
|
20
20
|
|
|
@@ -34,4 +34,4 @@ For `auto`, own review judgment and use the review tools required by the workflo
|
|
|
34
34
|
|
|
35
35
|
For `auto`, return findings for `review_submit` as `{ file, line, severity, body, reference }`, with severity `BLOCKING`, `CONSIDER`, or `NOTE`. Put un-anchorable BLOCKING issues in `overallIssues`. Return `[]` when clean.
|
|
36
36
|
|
|
37
|
-
For `address`, return one outcome per source thread: `fixed`, `answered`, `unresolved`, or `deferred`; include
|
|
37
|
+
For remote `address`, return one outcome per source thread: `fixed`, `answered`, `unresolved`, or `deferred`; include response text and verification evidence. For local `address`, report the saved revision, applied changes, checks, and next review launch.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
2
2
|
import type { ModeController } from '../modes';
|
|
3
|
-
/** Register the review workflow command. */
|
|
4
3
|
export declare function registerReviewCommand(pi: ExtensionAPI, modes: ModeController): void;
|
|
5
4
|
//# sourceMappingURL=review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAcpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAgB/C,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAKnF"}
|