@difflab/pi 0.5.0-rc.202609231305.97666c2 → 0.5.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.
Files changed (52) hide show
  1. package/README.md +5 -5
  2. package/agents/diffpi-reviewer.md +3 -3
  3. package/dist/commands/review.d.ts +1 -0
  4. package/dist/commands/review.d.ts.map +1 -1
  5. package/dist/extensions/index.js +804 -296
  6. package/dist/extensions/tuicrx.d.ts +8 -1
  7. package/dist/extensions/tuicrx.d.ts.map +1 -1
  8. package/dist/index.d.ts +8 -7
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +458 -197
  11. package/dist/review/github-review-backend.d.ts.map +1 -1
  12. package/dist/review/gitlab-review-backend.d.ts.map +1 -1
  13. package/dist/review/index.d.ts +6 -6
  14. package/dist/review/index.d.ts.map +1 -1
  15. package/dist/review/local-review-backend.d.ts +3 -0
  16. package/dist/review/local-review-backend.d.ts.map +1 -0
  17. package/dist/review/review-backend.d.ts +3 -2
  18. package/dist/review/review-backend.d.ts.map +1 -1
  19. package/dist/review/review-markdown.d.ts +4 -1
  20. package/dist/review/review-markdown.d.ts.map +1 -1
  21. package/dist/review/review-state.d.ts +20 -0
  22. package/dist/review/review-state.d.ts.map +1 -0
  23. package/dist/review/types.d.ts +28 -0
  24. package/dist/review/types.d.ts.map +1 -1
  25. package/dist/store.d.ts +2 -0
  26. package/dist/store.d.ts.map +1 -1
  27. package/dist/tools/index.js +783 -185
  28. package/dist/tools/review.d.ts +30 -0
  29. package/dist/tools/review.d.ts.map +1 -1
  30. package/dist/workflow.d.ts +0 -6
  31. package/dist/workflow.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/skills/review/SKILL.md +8 -6
  34. package/skills/review/references/workflows/address.md +11 -0
  35. package/skills/review/references/workflows/auto.md +18 -0
  36. package/skills/review/references/workflows/complete.md +7 -0
  37. package/skills/review/references/workflows/edit.md +7 -0
  38. package/skills/review/references/workflows/help.md +30 -0
  39. package/skills/review/references/workflows/merge.md +6 -0
  40. package/skills/review/references/workflows/new.md +19 -0
  41. package/skills/review/references/workflows/open.md +3 -0
  42. package/skills/review/references/workflows/publish.md +8 -0
  43. package/dist/review/local-reviews.d.ts +0 -31
  44. package/dist/review/local-reviews.d.ts.map +0 -1
  45. package/workflows/review/address.md +0 -8
  46. package/workflows/review/auto.md +0 -8
  47. package/workflows/review/complete.md +0 -7
  48. package/workflows/review/edit.md +0 -7
  49. package/workflows/review/help.md +0 -14
  50. package/workflows/review/merge.md +0 -6
  51. package/workflows/review/new.md +0 -7
  52. package/workflows/review/publish.md +0 -6
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] [--comment|--approve|--request-changes|--close] [--bg]
54
+ /review publish [target] [--local] [--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 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.
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
60
 
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.
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
62
 
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.
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
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, 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.
67
+ The package root exports environment and forge lifecycle adapters, review backends, the plan controller and consumer contracts, gate checks, template helpers, tuicr helpers, setup operations, and inline-mode control. Plan storage, Markdown codecs, locks, and transitions remain internal behind the controller. `@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.
@@ -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, immutable local review dumps, forge calls, tuicr sessions, and launching.
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, session parsing, comment mapping, forge/tuicr calls, and launching.
16
16
 
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.
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 with `resolve: false`. Never resolve or delete a 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 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.
37
+ For `address`, return one outcome per source thread: `fixed`, `answered`, `unresolved`, or `deferred`; include its exact response text and verification evidence. Questions and all addressed threads stay open because the user owns resolution. Never report a thread as resolved during address.
@@ -1,4 +1,5 @@
1
1
  import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
2
2
  import type { ModeController } from '../modes';
3
+ /** Register the review workflow command. */
3
4
  export declare function registerReviewCommand(pi: ExtensionAPI, modes: ModeController): void;
4
5
  //# 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,EAAoB,MAAM,iCAAiC,CAAC;AAGtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAY/C,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAKnF"}
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,4CAA4C;AAC5C,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAKnF"}