@difflab/pi 0.2.0 → 0.3.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 +28 -4
- package/agents/diffpi-orchestrator.md +7 -5
- package/agents/diffpi-reviewer.md +36 -0
- package/dist/assets.d.ts +2 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/commands/index.d.ts +8 -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/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 +2732 -189
- 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 +59 -0
- package/dist/extensions/tuicrx.d.ts.map +1 -0
- package/dist/extensions/zedx.d.ts +16 -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 +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1799 -137
- package/dist/modes.d.ts +1 -0
- package/dist/modes.d.ts.map +1 -1
- 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 +15 -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 +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2722 -299
- 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 +3 -2
- package/skills/diffpi-setup/SKILL.md +3 -1
- 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/review/draft-pr.md +25 -0
- package/dist/mise.d.ts.map +0 -1
- package/dist/process.d.ts.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import { type ReviewComment, type ReviewThreadRecord } from '../review';
|
|
3
|
+
export declare function hasReviewDraft(comments: readonly ReviewComment[], body: string): boolean;
|
|
4
|
+
export declare function workingTreeDiff(cwd: string): Promise<string>;
|
|
5
|
+
export declare function createReviewTools(): readonly ToolDefinition[];
|
|
6
|
+
export declare function syncLocalThreadArtifact(path: string, title: string, sessionSlug: string, threads: readonly ReviewThreadRecord[]): Promise<ReviewThreadRecord[]>;
|
|
7
|
+
//# sourceMappingURL=review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/tools/review.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAMzG,OAAO,EAuBL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAiEnB,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAExF;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAalE;AAID,wBAAgB,iBAAiB,IAAI,SAAS,cAAc,EAAE,CAyb7D;AAID,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAwB/B"}
|
|
@@ -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;AAyBlF,eAAO,MAAM,eAAe,EAAE,cA8B5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,cA0B/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/tools/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAUlF,eAAO,MAAM,kBAAkB,EAAE,cAiB/B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VcsInfo } from '../environment';
|
|
2
|
+
import type { VcsBackend } from './types';
|
|
3
|
+
export declare function createForgeBackend(vcs: VcsInfo): VcsBackend;
|
|
4
|
+
/** Compatibility names retained for consumers of the former forge API. */
|
|
5
|
+
export declare const createVcsBackend: typeof createForgeBackend;
|
|
6
|
+
export declare const createForge: typeof createForgeBackend;
|
|
7
|
+
//# sourceMappingURL=forge-backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forge-backend.d.ts","sourceRoot":"","sources":["../../src/vcs/forge-backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,CAI3D;AAED,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,2BAAqB,CAAC;AACnD,eAAO,MAAM,WAAW,2BAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/vcs/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAYjD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,CAuGzD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CA6B1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.d.ts","sourceRoot":"","sources":["../../src/vcs/gitlab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,KAAK,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAajD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,CAgFzD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ForgeProvider } from '../environment';
|
|
2
|
+
import type { CommandResult } from '../extensions/processx';
|
|
3
|
+
export declare function isConfirmedMissingChange(provider: ForgeProvider, output: string): boolean;
|
|
4
|
+
export declare function parseJson<T>(value: string, name: string): T;
|
|
5
|
+
export declare function commandFailure(command: string, args: string[], result: CommandResult): Error;
|
|
6
|
+
export declare function requireBranchName(output: string, provider: string): string;
|
|
7
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/vcs/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAUzF;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAM3D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,GAAG,KAAK,CAI5F;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI1E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createForge, createForgeBackend, createVcsBackend } from './forge-backend';
|
|
2
|
+
export { GitHubVcsBackend, assertGitHubMergeReady } from './github';
|
|
3
|
+
export { GitLabVcsBackend } from './gitlab';
|
|
4
|
+
export { isConfirmedMissingChange } from './helpers';
|
|
5
|
+
export type { Forge, OpenPrOptions, PrRef, VcsBackend } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vcs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ForgeProvider } from '../environment';
|
|
2
|
+
export interface PrRef {
|
|
3
|
+
number: number;
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
isDraft: boolean;
|
|
7
|
+
baseRef: string;
|
|
8
|
+
headRef: string;
|
|
9
|
+
headSha?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface OpenPrOptions {
|
|
12
|
+
title: string;
|
|
13
|
+
body: string;
|
|
14
|
+
base: string;
|
|
15
|
+
head: string;
|
|
16
|
+
draft?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Hosted VCS lifecycle operations. CLI execution is isolated in extensions/*x. */
|
|
19
|
+
export interface VcsBackend {
|
|
20
|
+
readonly provider: Exclude<ForgeProvider, 'none'>;
|
|
21
|
+
createDraftPr(options: OpenPrOptions): Promise<PrRef>;
|
|
22
|
+
viewPr(idOrBranch: string): Promise<PrRef | undefined>;
|
|
23
|
+
defaultBranch(): Promise<string>;
|
|
24
|
+
prDiff(id: number): Promise<string>;
|
|
25
|
+
prChecks(id: number): Promise<string>;
|
|
26
|
+
markReady(id: number): Promise<void>;
|
|
27
|
+
closePr(id: number, comment?: string): Promise<void>;
|
|
28
|
+
mergePr(id: number, subject: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/** Compatibility name retained for consumers of the former forge API. */
|
|
31
|
+
export type Forge = VcsBackend;
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vcs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAClD,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACvD,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD;AAED,yEAAyE;AACzE,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difflab/pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Tools and skills for the pi coding agent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"files": [
|
|
31
31
|
"agents/",
|
|
32
32
|
"dist/",
|
|
33
|
-
"skills/"
|
|
33
|
+
"skills/",
|
|
34
|
+
"templates/"
|
|
34
35
|
],
|
|
35
36
|
"pi": {
|
|
36
37
|
"extensions": [
|
|
@@ -43,6 +43,8 @@ ask_user_question({
|
|
|
43
43
|
});
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Map `None`, `Linear`, and `Jira` to `none`, `linear`, and `jira`. 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.
|
|
46
|
+
Map `None`, `Linear`, and `Jira` to `none`, `linear`, and `jira`. Infer the review forge from the current repository remote; do not ask about tuicr or 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
|
+
|
|
48
|
+
When the user is using Zed, ask separately whether to bind `cmd-alt-r` to the `diffpi: tuicr review` task. Only pass `bindZedKey: true` when the user opts in; otherwise pass `false`.
|
|
47
49
|
|
|
48
50
|
Setup installs Diffpi's bundled agent Markdown into Pi's standard global agent directory. Explain that each default can run through the subagent plugin or as the current inline prompt. `/skill:mode` opens the structured picker. It also accepts `--include-skills`, one agent id, a qualified `skill:agent` id, or `clear`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Code review workflows over GitHub, GitLab, or the local tuicr backend. Use for auto reviews, review opening and editing, addressing, publishing, completing, merging, or local review requests.
|
|
4
|
+
allowed-tools: ask_user_question 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 review_launch_ui diffpi_template
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# review
|
|
8
|
+
|
|
9
|
+
Treat `--local` as a backend selector. It always uses the local `tuicr` working-tree backend; without it, the detected GitHub or GitLab forge owns the remote target. Treat `--bg` as an execution selector handled by the `/review` command; it is removed before workflow parsing. Target selection, storage, provenance, templates, comment staging, replies, publication, and forge calls belong to the tools.
|
|
10
|
+
|
|
11
|
+
Parse the first non-flag argument as VERB and preserve remaining flags. Normalize `open`, `create`, and `draft` to `new`; normalize `launch` to `auto`, `ready` to `publish`, `close` to `complete`, and `land` to `merge`. An empty or unknown verb uses `references/workflows/help.md`.
|
|
12
|
+
|
|
13
|
+
Read and follow `references/workflows/{VERB}.md`. Call `review_context` first in every workflow. Use `ask_user_question` for choices that cannot be derived from the request. Never ask those questions as plain chat text.
|
|
14
|
+
|
|
15
|
+
For inline execution, `/review auto` and `/review address` activate the reviewer profile on Sol; lifecycle verbs activate the orchestrator profile on Luna. The reviewer coordinates `address`, classifies every thread, and delegates bounded implementation to lightweight worker agents. With `--bg`, the command leaves the current chat mode unchanged and launches a tracked background orchestrator, which routes `auto` and `address` through the reviewer.
|
|
16
|
+
|
|
17
|
+
Workflow index: `auto` generates findings and leaves remote comments pending; `new` creates a local review or remote draft PR/MR; `edit` opens an existing local or remote review for the user; `address` fixes local or remote comments, commits remote fixes through `/git`, and records or posts replies; `publish` promotes pending review work; `complete` approves, rejects, abandons, or archives a review without merging; `merge` is the separate GitHub-only merge action; `help` prints the reference.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# address
|
|
2
|
+
|
|
3
|
+
1. Parse an optional PR/MR id or URL and `--local`. The `/review` command has already removed `--bg`.
|
|
4
|
+
2. Run this workflow as the reviewer coordinator. Call `review_context` with the target and backend selection.
|
|
5
|
+
3. Call `review_comments`. With `--local`, it synchronizes every comment in the selected tuicr session to `.diffpi/review/<session-slug>.md`. Existing replies and statuses remain; source comments removed by the user become resolved ledger entries.
|
|
6
|
+
4. Classify every thread, group justified code changes into bounded non-overlapping tasks, and delegate those tasks to lightweight worker agents. Keep questions, outcome decisions, integration, and response text in the reviewer coordinator. With `--local`, workers modify the current working tree without committing. Without `--local`, apply a fix only when the comment requests a change.
|
|
7
|
+
5. Respond to every thread with its outcome. Answer questions and leave them open. For substantive requests, state what changed and whether it is resolved, but leave the thread open for reviewer confirmation. For a trivial request, reply `Resolved`; remote threads may close, while the user must delete the local tuicr source comment before the next sync marks it resolved.
|
|
8
|
+
6. When a remote address flow changes code, invoke the upstream `/git commit --no-push` workflow after checks pass and before drafting responses. Use `--atomic` when the fixes form separate logical commits.
|
|
9
|
+
7. Call `review_respond` for each thread. With `--local`, every response is posted to tuicr and recorded in the session ledger. Without `--local`, replies post to the forge immediately.
|
|
10
|
+
8. With `--local`, call `review_launch_ui` with `local: true` after replies are recorded so the user can inspect the working-tree review in tuicr.
|
|
11
|
+
9. Report fixed, committed, answered, addressed, resolved, and unresolved counts. Do not publish, complete, or merge in this workflow.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# auto
|
|
2
|
+
|
|
3
|
+
1. Parse an optional PR/MR id or URL and `--local`. The `/review` command has already removed `--bg`. `launch` is an alias for this workflow.
|
|
4
|
+
2. Call `review_context` with the same target and backend selection.
|
|
5
|
+
3. Call `review_new` to create the local tuicr review or remote draft PR/MR and open its tuicr UI. A remote branch must be clean and pushed. If the review already exists, use `review_edit` to open it.
|
|
6
|
+
4. Before reviewing, run `review_gates` so the project's discovered format-check and lint tasks run first, followed by its other gates. Preserve and report failures; do not substitute visual inspection for failed or skipped checks.
|
|
7
|
+
5. Run review judgment as the reviewer agent. Inline, the reviewer performs the workflow tool calls directly. In background execution, the orchestrator delegates judgment to the reviewer and retains lifecycle calls. The reviewer fetches the diff with `review_diff` and may launch parallel lightweight subagents for independent areas when useful.
|
|
8
|
+
6. Review the change for:
|
|
9
|
+
- whether it accomplishes the stated intent;
|
|
10
|
+
- whether the technical approach is the best practical way to accomplish that intent;
|
|
11
|
+
- correctness, including failure paths and edge cases;
|
|
12
|
+
- code quality, readability, and maintainability;
|
|
13
|
+
- minimality and conciseness, including unnecessary agent-generated changes;
|
|
14
|
+
- documentation accuracy and completeness; and
|
|
15
|
+
- reviewer coordination, including keeping lifecycle ownership clear and avoiding duplicate or conflicting findings.
|
|
16
|
+
Use parallel lightweight workers for independent review areas when useful, then reconcile their results before submission.
|
|
17
|
+
7. Produce only grounded findings, then call `review_submit`. Pass `local: true` for local findings; remote findings remain pending for `publish` or `complete`.
|
|
18
|
+
8. Report the artifact or pending-review state, finding count, gate results, backend, and any launch instruction. Do not complete or merge the review.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# complete
|
|
2
|
+
|
|
3
|
+
1. Parse an optional PR/MR id or URL, `--local`, and exactly one remote action: `--approve`, `--reject`, or `--abandon`. `close` is an alias for this workflow.
|
|
4
|
+
2. Call `review_context` with the same target and backend selection.
|
|
5
|
+
3. With `--local`, call `review_complete` with `local: true`. It archives the reply overlay to `.diffpi/reviews/<session-slug>.md`, then deletes the exact persisted tuicr session. This is destructive and prevents its comments from appearing in future tuicr sessions.
|
|
6
|
+
4. Without `--local`, map `--approve`, `--reject`, or `--abandon` to the `review_complete` action `approve`, `reject`, or `abandon`. The tool applies the remote lifecycle action but does not merge.
|
|
7
|
+
5. Report the archive path or remote result. Do not call `review_merge`.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# edit
|
|
2
|
+
|
|
3
|
+
1. Parse an optional PR/MR number, URL, or branch target and `--local`.
|
|
4
|
+
2. Call `review_context` with the same target and backend selection.
|
|
5
|
+
3. Call `review_edit`. With `--local`, it opens an existing local tuicr session. Without `--local`, it opens an existing PR/MR in tuicr, including a non-draft PR/MR for continued work on its comments.
|
|
6
|
+
4. If no matching local session or remote PR/MR exists, report the error and direct the user to `new`. Do not create a review, generate findings, publish, complete, or merge.
|
|
7
|
+
5. Report whether tuicr opened in a mux, prepared a Zed task, or returned a command.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# help
|
|
2
|
+
|
|
3
|
+
Print the following help text:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Workflows for PRs and local review. Use:
|
|
7
|
+
|
|
8
|
+
Create a review and generate findings:
|
|
9
|
+
/review auto [pr-or-branch] [--local] [--bg]
|
|
10
|
+
|
|
11
|
+
Create a local review or remote draft PR/MR:
|
|
12
|
+
/review new [title] [--intent text] [--base branch] [--local] [--bg]
|
|
13
|
+
|
|
14
|
+
Open an existing review without generating findings:
|
|
15
|
+
/review edit [pr-number|pr-url|branch] [--local] [--bg]
|
|
16
|
+
|
|
17
|
+
Address review comments:
|
|
18
|
+
/review address [pr-number|pr-url|branch] [--local] [--bg]
|
|
19
|
+
|
|
20
|
+
Publish comments and a review status:
|
|
21
|
+
/review publish [pr-number|pr-url|branch] [--local] [--comment|--approve|--request-changes|--close] [--bg]
|
|
22
|
+
|
|
23
|
+
Complete a review without merging:
|
|
24
|
+
/review complete [pr-number|pr-url|branch] [--local|--approve|--reject|--abandon] [--bg]
|
|
25
|
+
|
|
26
|
+
Merge an approved remote review:
|
|
27
|
+
/review merge [pr-number|pr-url|branch] [--bg]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`--local` selects the working-tree tuicr backend. Otherwise, a target is a PR/MR number, URL, or branch; no target means the current branch. `--bg` launches a tracked background Orchestrator and leaves the current chat mode unchanged. `new` creates a review. `edit` only opens an existing local session or remote PR/MR. `auto` creates a review, then delegates findings to the reviewer agent. `open`, `create`, and `draft` alias `new`; `launch` aliases `auto`; `close` aliases `complete`. `publish` publishes remote draft PR/MR review comments and status or promotes local comments. `complete` makes a lifecycle decision without merging, or archives the local overlay and deletes its tuicr session.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# new
|
|
2
|
+
|
|
3
|
+
## Arguments
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
/review new [title] [--intent text] [--base branch] [--local]
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- `title` is the optional first positional argument; quote a title containing spaces.
|
|
10
|
+
- `--intent` and `--base` each consume the following value. `--local` is a boolean flag.
|
|
11
|
+
- Flags may appear in any order. Reject unknown or duplicate flags, missing flag values, and extra positional arguments. Stating this grammar before the procedure is intentional: an explicit argument contract is the best practice for making workflow behavior predictable and preventing ambiguous execution.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. Parse the arguments using the grammar above. A remote target is the current branch; `new` creates a new review rather than opening an existing one.
|
|
16
|
+
2. Call `review_context` with the same backend selection.
|
|
17
|
+
3. Call `review_new` with the parsed title, intent, base branch, and backend selection. With `--local`, it creates and opens a local tuicr working-tree review. Without `--local`, it requires a clean, pushed branch, creates a draft PR/MR, and opens that PR/MR in tuicr.
|
|
18
|
+
4. If a local session or remote PR/MR already exists, direct the user to `edit` instead.
|
|
19
|
+
5. Report the PR/MR URL and whether tuicr opened in a mux, prepared a Zed task, or returned a command. Do not generate findings, publish, complete, or merge.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# publish
|
|
2
|
+
|
|
3
|
+
1. Parse an optional PR/MR id or URL, `--local`, and one status: `--comment`, `--approve`, `--request-changes`, or `--close`. The default is comment.
|
|
4
|
+
2. Call `review_context` with the target and backend selection.
|
|
5
|
+
3. For `--local`, call `review_publish` with `local: true`. The tool reads the exact tuicr session, promotes its unpublished line comments to a pending forge review, follows the stored local overlay path, posts unpublished replies to their remote threads, and then publishes the selected status. Question replies remain open. The tool does not post an overall review comment.
|
|
6
|
+
4. For a remote review, call `review_publish` without `local`. The existing pending forge comments already contain provenance, so the tool only publishes them with the selected status and no overall comment.
|
|
7
|
+
5. Comment, approve, and request-changes mark a draft PR/MR ready before publication. Close publishes pending work as comment status and then closes the PR/MR. GitLab rejects request-changes because it has no equivalent review state.
|
|
8
|
+
6. Report promoted comment and reply counts, the public status, and the final PR/MR state. Publishing never merges.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## Intent
|
|
2
|
+
|
|
3
|
+
{{intent}}
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
<!-- List the user-visible or architectural changes. -->
|
|
8
|
+
|
|
9
|
+
## Validation
|
|
10
|
+
|
|
11
|
+
<!-- List the checks that were run. -->
|
|
12
|
+
|
|
13
|
+
- [ ] Existing tests pass
|
|
14
|
+
|
|
15
|
+
## References
|
|
16
|
+
|
|
17
|
+
<!-- Link the issue that defines this task. Add related project, epic, and public documentation links when available. -->
|
|
18
|
+
|
|
19
|
+
- Issue: {{issue_url}}
|
|
20
|
+
|
|
21
|
+
## Further Work
|
|
22
|
+
|
|
23
|
+
<!-- Optional: list intentionally deferred follow-up work as bullets, or remove this section. -->
|
|
24
|
+
|
|
25
|
+
-
|
package/dist/mise.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mise.d.ts","sourceRoot":"","sources":["../src/mise.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,eAAO,MAAM,IAAI;oCACuB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;sBAI1C,kBAAkB,GAAQ,OAAO,CAAC,MAAM,CAAC;2BAcnC,MAAM,YAAW,eAAe,GAAQ,OAAO,CAAC,cAAc,CAAC;gCAc1D,MAAM,QAAQ,MAAM,mBAAmB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;kCAK9D,MAAM,iBAAiB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;+BAIhD,MAAM,QAAQ,MAAM,iBAAwB,OAAO,CAAC,OAAO,CAAC;iCAK1D,MAAM,iBAAiB,MAAM,iBAAwB,OAAO,CAAC,IAAI,CAAC;oCAI/D,MAAM,qBAAwB,OAAO,CAAC,IAAI,CAAC;CAGlF,CAAC"}
|
package/dist/process.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../src/process.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAID,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAsB9E;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAmBzG;AAED,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAMxB"}
|