@difflab/pi 0.7.1 → 0.8.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 +23 -39
- package/agents/diffpi-copilot.md +2 -2
- package/agents/diffpi-orchestrator.md +9 -14
- package/agents/diffpi-plan-reviewer.md +4 -12
- package/agents/diffpi-planner.md +6 -12
- package/agents/diffpi-reviewer.md +6 -10
- package/agents/diffpi-tutor.md +2 -2
- package/agents/diffpi-worker.md +3 -6
- package/dist/commands/dispatch.d.ts +4 -0
- package/dist/commands/dispatch.d.ts.map +1 -0
- package/dist/commands/index.d.ts +1 -3
- package/dist/commands/index.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/extensions/index.js +2705 -3114
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -403
- 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 +2 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2601 -2610
- package/package.json +2 -2
- package/skills/diffpi-doctor/SKILL.md +10 -0
- package/skills/diffpi-setup/SKILL.md +1 -1
- package/skills/plan/SKILL.md +13 -23
- package/skills/plan/references/design-quality.md +3 -3
- package/skills/plan/references/workflows/annotate.md +9 -3
- package/skills/plan/references/workflows/finalize.md +10 -6
- package/skills/plan/references/workflows/go.md +25 -7
- package/skills/plan/references/workflows/help.md +20 -3
- package/skills/plan/references/workflows/init.md +23 -6
- package/skills/plan/references/workflows/inline-fallback.md +9 -0
- package/skills/plan/references/workflows/new.md +22 -7
- package/skills/plan/references/workflows/update.md +22 -6
- package/skills/plan/references/workflows/validate.md +31 -0
- package/skills/review/SKILL.md +15 -7
- package/skills/review/references/workflows/address.md +19 -6
- package/skills/review/references/workflows/auto.md +21 -5
- package/skills/review/references/workflows/complete.md +17 -4
- package/skills/review/references/workflows/edit.md +8 -2
- package/skills/review/references/workflows/foreground-fallback.md +7 -0
- package/skills/review/references/workflows/help.md +22 -13
- package/skills/review/references/workflows/merge.md +17 -2
- package/skills/review/references/workflows/new.md +17 -5
- package/skills/review/references/workflows/open.md +8 -2
- package/skills/review/references/workflows/publish.md +17 -4
- package/skills/review/references/workflows/status.md +7 -2
- package/templates/plan/PLAN.md +1 -1
- package/dist/commands/mode.d.ts +0 -5
- package/dist/commands/mode.d.ts.map +0 -1
- package/dist/modes.d.ts +0 -75
- package/dist/modes.d.ts.map +0 -1
- package/dist/tools/modes.d.ts +0 -4
- package/dist/tools/modes.d.ts.map +0 -1
- package/skills/mode/SKILL.md +0 -38
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
# help
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/review
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
## Parse arguments
|
|
4
|
+
|
|
5
|
+
Accept `help` or a request with no recognizable review verb; no positional arguments or flags. Prefer an explicit verb, then safely inferred natural-language intent, then help. Ask only if a material ambiguity prevents routing to a workflow.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
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`.
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# merge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Parse arguments
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Accept `merge [target]` and an optional conventional squash subject in the request. Fuzzy-match GitHub PR target from the request and repository. Prefer explicit target/subject, then safe inference, then current PR. Reject `--local`; do not infer it. Call `ask_user_question` only for material target or subject ambiguity before launch; return a precise blocker if a new decision arises later.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Call `review_context` first with `local:false` and the selected target. Reject non-GitHub or local reviews without switching backend. For a short, explicitly approved merge requiring no substantive analysis, call `review_merge` directly with its resolved target and conventional squash subject if needed. The tool rechecks open, ready, clean PR status and settled CI; branch protection is authoritative, and current-user approval is not required unless protection requires it. Report the actual merge or exact readiness/CI/subject failure. Do not publish or complete in its place.
|
|
10
|
+
2. If merge-readiness requires substantive inspection or judgment beyond the tool's checks, 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
|
+
|
|
12
|
+
```text
|
|
13
|
+
Inspect GitHub PR merge readiness without merging.
|
|
14
|
+
- Repository: {absolute repo cwd}; exact request: {exact request}.
|
|
15
|
+
- Resolved target: {target}; backend: remote GitHub; local: false; issue URL: {issue URL or none}; proposed conventional squash subject: {subject or none}.
|
|
16
|
+
- Call review_context first with local:false; reuse its target/backend/cwd. Inspect PR readiness, subject and settled CI using review_status and available checks. Treat branch protection as authoritative; do not demand current-user approval unless protection requires it.
|
|
17
|
+
- Return completed evidence and a go/no-go recommendation or precise blocker. Do not merge, publish, complete or resolve threads.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
3. If no native subagents are available for step 2, follow [foreground fallback](foreground-fallback.md) before inspection; only after explicit confirmation inspect inline and report actual evidence without claiming an Orchestrator result. Otherwise require the completed result, not a queued job or claim. Resolve material decisions with the user, then call `review_merge` in the initiating thread only if approval still applies. Report the actual result.
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
# new
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Parse arguments
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
2. Call `review_new` with the same target/backend/local values. This creates a local tuicr review or remote draft PR/MR and opens it; use `review_launch_ui` only when needed.
|
|
7
|
-
3. Report the created target and draft state. Do not run findings, publish, complete, or merge.
|
|
5
|
+
Accept `new [title] [--intent text] [--base branch] [--local]` and a target named in the request. Fuzzy-match draft intent. Prefer explicit arguments/flags, then safe natural-language or repository title/intent/target/base/backend, then available defaults. Select local for an explicit working-tree request. Call `ask_user_question` only for material ambiguity before launch; return a precise blocker if a new decision arises later.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Resolve the concrete target/backend/local and base with `review_context`. Substitute actual values for every placeholder, including the exact request and issue URL if applicable; never send raw `{placeholders}`. When native subagents are available, launch a lightweight/low `diffpi-worker` background subagent for this bounded draft-creation task. Pass the following self-contained prompt with ambient capabilities:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Create a review draft.
|
|
13
|
+
- Repository: {absolute repo cwd}; exact request: {exact request}.
|
|
14
|
+
- Resolved target: {target}; backend: {backend}; local: {local}; title: {title}; intent: {intent}; base: {base}; issue URL: {issue URL or none}; approved policy: {policy}.
|
|
15
|
+
- This explicitly assigned review-draft creation is the only review lifecycle mutation authorized here. Call review_context first. Reuse its target/backend/local/cwd for all subsequent calls; never switch backend silently.
|
|
16
|
+
- Reject unsupported forge, dirty remote branch or unavailable local base/default with exact evidence.
|
|
17
|
+
- Call review_new to create the local tuicr review or remote draft PR/MR. Call review_launch_ui only if needed; report a returned launch command if automatic launch fails.
|
|
18
|
+
- Verify and report the actual created target and draft state or exact failure. Do not stage findings, publish, complete or merge.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
2. If no native subagents are available, follow [foreground fallback](foreground-fallback.md) before creation. Only after explicit confirmation, perform the draft-creation steps above inline and verify with `review_status`; do not claim a Worker result. Otherwise require the completed child result and verify the created target/draft with `review_status`. Stop on failure; report the actual result, not merely a queued ID or claim. Do not assign the Worker publication, merge, findings judgment or substantive inspection.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# open
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Parse arguments
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Accept `open [target] [--local]`. Fuzzy-match the existing PR/MR or tuicr session from the request and repository. Prefer explicit arguments/flags, then safe inference, then the current-review target. Select local for an explicit working-tree request. Call `ask_user_question` only for material ambiguity.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Call `review_context` first with the selected target/backend/local; reuse its target/backend/local/cwd. Reject unsupported selections without switching backend.
|
|
10
|
+
2. Call `review_open` for an existing remote PR/MR in the browser. For `--local`, call `review_edit` to open only the matching existing tuicr session.
|
|
11
|
+
3. Report the opened target or exact missing-session/browser/launch failure. Do not create a review, generate findings or mutate review state.
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
# publish
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Parse arguments
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Accept `publish [target] [--local] [--comment|--approve|--request-changes|--close]`. Fuzzy-match target/backend/status from the request and repository. Prefer explicit arguments/flags, then safe inference, then current-review target and comment status. Call `ask_user_question` only for material ambiguity before launch; return a precise blocker if a new decision arises later.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Call `review_context` first with the selected target/backend/local. For a short, explicitly approved publication with no substantive inspection, call `review_publish` directly using its resolved values and selected status (`COMMENT` by default, `APPROVE`, `REQUEST_CHANGES`, or `CLOSE`). Remote findings and replies stay pending until this call. Promote only drafts matching the remote PR/MR; preserve `local:true` for a working-tree session. Report unmatched promotion, GitLab request-changes rejection, and exact failures; verify the final status. Do not merge or resolve threads.
|
|
10
|
+
2. If the request instead needs substantive inspection or judgment before publication, 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
|
+
|
|
12
|
+
```text
|
|
13
|
+
Inspect publication readiness without publishing.
|
|
14
|
+
- Repository: {absolute repo cwd}; exact request: {exact request}.
|
|
15
|
+
- Resolved target: {target}; backend: {backend}; local: {local}; selected status: {status}; issue URL: {issue URL or none}; approved policy: {policy}.
|
|
16
|
+
- Call review_context first; reuse its target/backend/local/cwd. Inspect the matching session and pending findings/replies; identify unmatched drafts, failed checks and material decisions. Do not silently switch backends.
|
|
17
|
+
- Return actual completed evidence and a go/no-go recommendation or precise blocker. Do not publish, complete, merge or resolve threads.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
3. If no native subagents are available for step 2, follow [foreground fallback](foreground-fallback.md) before inspection; only after explicit confirmation inspect inline and report actual evidence without claiming an Orchestrator result. Otherwise require the completed inspection result, not a queued job or claim. Resolve material decisions with the user, then call `review_publish` in the initiating thread only if approval still applies. Report the actual published or blocked outcome.
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# status
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Parse arguments
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Accept `status [target] [--local]`. Fuzzy-match the status target/backend from the request and repository. Prefer explicit arguments/flags, then safe inference, then the current-review target. Select local for an explicit working-tree request. Call `ask_user_question` only for material ambiguity.
|
|
6
|
+
|
|
7
|
+
## Steps
|
|
8
|
+
|
|
9
|
+
1. Call `review_context` first with the selected target/backend/local; reuse its target/backend/local/cwd. Reject unsupported selections without switching backend.
|
|
10
|
+
2. Call `review_status` with those same values. Report branch, worktree, local or remote review, URLs, tuicr session, pending/draft state and exact errors. Do not create a review or mutate source, comments or lifecycle state.
|
package/templates/plan/PLAN.md
CHANGED
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
|
|
45
45
|
## References
|
|
46
46
|
|
|
47
|
-
<!-- Add repository or external references. -->
|
|
47
|
+
<!-- Add repository or external references. Record one completed Plan Reviewer round per authoring cycle: reviewed file hashes, Git state, verdict and findings; each finding's disposition; post-fix structural verification and current snapshot. A repaired BLOCKING verdict is not a reviewer PASS. Keep DRAFT until explicit finalize/go. -->
|
package/dist/commands/mode.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
2
|
-
import type { ModeController } from '../modes';
|
|
3
|
-
/** Register the inline agent mode command. */
|
|
4
|
-
export declare function registerModeCommand(pi: ExtensionAPI, modes: ModeController): void;
|
|
5
|
-
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../src/commands/mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,8CAA8C;AAC9C,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAKjF"}
|
package/dist/modes.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { type ExtensionAPI, type ExtensionContext } from '@earendil-works/pi-coding-agent';
|
|
2
|
-
export type ModePromptStrategy = 'append' | 'replace';
|
|
3
|
-
export type ModeThinkingLevel = 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
4
|
-
export interface AgentMode {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
description: string;
|
|
8
|
-
systemPrompt: string;
|
|
9
|
-
promptStrategy: ModePromptStrategy;
|
|
10
|
-
modelPreferences: string[];
|
|
11
|
-
thinkingLevel?: ModeThinkingLevel;
|
|
12
|
-
requiredTools: string[];
|
|
13
|
-
forbiddenTools: string[];
|
|
14
|
-
requireModel: boolean;
|
|
15
|
-
requireThinking: boolean;
|
|
16
|
-
tools: string[];
|
|
17
|
-
source: string;
|
|
18
|
-
sourcePath: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ModeCatalog {
|
|
21
|
-
modes: AgentMode[];
|
|
22
|
-
diagnostics: string[];
|
|
23
|
-
}
|
|
24
|
-
export interface ModeListOptions {
|
|
25
|
-
includeSkills?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export interface ModeController {
|
|
28
|
-
list(ctx: ExtensionContext, options?: ModeListOptions): Promise<ModeCatalog>;
|
|
29
|
-
set(agent: string, ctx: ExtensionContext): Promise<ModeSelectionResult>;
|
|
30
|
-
unset(ctx: ExtensionContext): Promise<ModeSelectionResult>;
|
|
31
|
-
restore(ctx: ExtensionContext): Promise<void>;
|
|
32
|
-
refresh(ctx: ExtensionContext): void;
|
|
33
|
-
apply(systemPrompt: string): string;
|
|
34
|
-
getActive(): AgentMode | undefined;
|
|
35
|
-
getStatus(ctx: ExtensionContext): ModeRuntimeStatus;
|
|
36
|
-
}
|
|
37
|
-
export interface ModeRuntimeStatus {
|
|
38
|
-
active?: string;
|
|
39
|
-
model?: {
|
|
40
|
-
provider: string;
|
|
41
|
-
id: string;
|
|
42
|
-
};
|
|
43
|
-
thinkingLevel: ModeThinkingLevel;
|
|
44
|
-
activeTools: string[];
|
|
45
|
-
capabilityError?: string;
|
|
46
|
-
}
|
|
47
|
-
export type ModeSelectionResult = {
|
|
48
|
-
ok: true;
|
|
49
|
-
active?: AgentMode;
|
|
50
|
-
message: string;
|
|
51
|
-
} | {
|
|
52
|
-
ok: false;
|
|
53
|
-
message: string;
|
|
54
|
-
};
|
|
55
|
-
export interface ModeDiscoveryOptions extends ModeListOptions {
|
|
56
|
-
cwd: string;
|
|
57
|
-
agentDir?: string;
|
|
58
|
-
bundledAgentsDir?: string;
|
|
59
|
-
homeDir?: string;
|
|
60
|
-
projectTrusted: boolean;
|
|
61
|
-
}
|
|
62
|
-
export interface ModeControllerOptions {
|
|
63
|
-
agentDir?: string;
|
|
64
|
-
bundledAgentsDir?: string;
|
|
65
|
-
homeDir?: string;
|
|
66
|
-
}
|
|
67
|
-
type ModeRuntime = Pick<ExtensionAPI, 'appendEntry' | 'getActiveTools' | 'getAllTools' | 'getThinkingLevel' | 'setActiveTools' | 'setModel' | 'setThinkingLevel'>;
|
|
68
|
-
/** Discover standard agents and, when requested, qualified skill agents. */
|
|
69
|
-
export declare function discoverAgentModes(options: ModeDiscoveryOptions): Promise<ModeCatalog>;
|
|
70
|
-
/** Resolve an agent id without guessing an unqualified skill-agent name. */
|
|
71
|
-
export declare function resolveAgentMode(modes: readonly AgentMode[], requested: string): ModeSelectionResult;
|
|
72
|
-
/** Create the session-scoped controller that applies and restores complete mode profiles. */
|
|
73
|
-
export declare function createModeController(pi: ModeRuntime, options?: ModeControllerOptions): ModeController;
|
|
74
|
-
export {};
|
|
75
|
-
//# sourceMappingURL=modes.d.ts.map
|
package/dist/modes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../src/modes.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAUzC,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAE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BpG;AAED,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,GAAE,qBAA0B,GAAG,cAAc,CAgIzG"}
|
package/dist/tools/modes.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../../src/tools/modes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGlF,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAiB5D,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,CAiFrF"}
|
package/skills/mode/SKILL.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mode
|
|
3
|
-
description: List, select, or clear an inline agent profile. Use when the user invokes /skill:mode or asks to change the current Diffpi mode.
|
|
4
|
-
allowed-tools: ask_user_question diffpi_modes_list diffpi_modes_set diffpi_modes_unset diffpi_modes_status
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Mode
|
|
8
|
-
|
|
9
|
-
Pi appends `/skill:mode` arguments as `User: <arguments>`. Route those arguments without manual command parsing in the extension.
|
|
10
|
-
|
|
11
|
-
## Direct requests
|
|
12
|
-
|
|
13
|
-
- If the argument is `help`, `-h`, or `--help`, print the usage and examples below. Do not call a tool.
|
|
14
|
-
- If the argument is `clear`, call `diffpi_modes_unset` and stop.
|
|
15
|
-
- If the argument is one agent id, call `diffpi_modes_set` with that exact id. On the next model turn, call `diffpi_modes_status` to verify the selected model, thinking level, and active tools; if preflight or verification fails, report the exact capability error and do not claim an active mode.
|
|
16
|
-
- A qualified id such as `spec:planner` is one agent id. The tool enables skill-agent discovery for it.
|
|
17
|
-
- If the request contains multiple agent ids or an unsupported flag, print the usage and stop.
|
|
18
|
-
|
|
19
|
-
```text
|
|
20
|
-
/skill:mode [--include-skills] [agent|clear]
|
|
21
|
-
/skill:mode
|
|
22
|
-
/skill:mode --include-skills
|
|
23
|
-
/skill:mode worker
|
|
24
|
-
/skill:mode spec:planner
|
|
25
|
-
/skill:mode clear
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Picker
|
|
29
|
-
|
|
30
|
-
Use the picker when there are no arguments or when the only argument is `--include-skills`.
|
|
31
|
-
|
|
32
|
-
1. Call `diffpi_modes_list`. Set `includeSkills` to true only for `--include-skills`.
|
|
33
|
-
2. Call `ask_user_question` with one single-select question. Do not ask as plain chat text.
|
|
34
|
-
3. Put the complete list of valid ids in the question text. Offer Default plus at most three relevant agents as structured options. The custom-answer row lets the user enter any other valid id.
|
|
35
|
-
4. If the user selects Default or enters `clear`, call `diffpi_modes_unset`.
|
|
36
|
-
5. Otherwise, call `diffpi_modes_set` with the selected or entered id. On the next model turn, call `diffpi_modes_status` and verify the selected model, thinking level, and active tools. If selection or post-turn verification fails, report the exact capability error and ensure no ghost active mode is claimed.
|
|
37
|
-
|
|
38
|
-
Do not perform unrelated work. Explain that the selected prompt, preferred available model, thinking level, and tool set start on the next turn. Mode selection is not a security boundary.
|