@difflab/pi 0.4.0-rc.202609231106.845dbe5 → 0.4.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 (78) hide show
  1. package/README.md +4 -4
  2. package/agents/diffpi-orchestrator.md +1 -1
  3. package/agents/diffpi-planner.md +3 -3
  4. package/agents/diffpi-worker.md +2 -2
  5. package/dist/assets.d.ts +0 -1
  6. package/dist/assets.d.ts.map +1 -1
  7. package/dist/cli/plan.d.ts +3 -7
  8. package/dist/cli/plan.d.ts.map +1 -1
  9. package/dist/cli.js +816 -314
  10. package/dist/commands/plan.d.ts +1 -0
  11. package/dist/commands/plan.d.ts.map +1 -1
  12. package/dist/config.d.ts.map +1 -1
  13. package/dist/environment.d.ts +1 -2
  14. package/dist/environment.d.ts.map +1 -1
  15. package/dist/extensions/index.js +2509 -6152
  16. package/dist/extensions/processx.d.ts +0 -1
  17. package/dist/extensions/processx.d.ts.map +1 -1
  18. package/dist/extensions/subagentx.d.ts +1 -1
  19. package/dist/extensions/subagentx.d.ts.map +1 -1
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +728 -195
  23. package/dist/plan/annotations.d.ts +25 -0
  24. package/dist/plan/annotations.d.ts.map +1 -0
  25. package/dist/plan/controller.d.ts +65 -0
  26. package/dist/plan/controller.d.ts.map +1 -0
  27. package/dist/plan/execution.d.ts +13 -0
  28. package/dist/plan/execution.d.ts.map +1 -0
  29. package/dist/plan/ids.d.ts +5 -0
  30. package/dist/plan/ids.d.ts.map +1 -0
  31. package/dist/plan/index.d.ts +4 -2
  32. package/dist/plan/index.d.ts.map +1 -1
  33. package/dist/plan/lock.d.ts +7 -2
  34. package/dist/plan/lock.d.ts.map +1 -1
  35. package/dist/plan/markdown.d.ts.map +1 -1
  36. package/dist/plan/parser.d.ts +18 -0
  37. package/dist/plan/parser.d.ts.map +1 -0
  38. package/dist/plan/store.d.ts +0 -2
  39. package/dist/plan/store.d.ts.map +1 -1
  40. package/dist/plan/types.d.ts +22 -3
  41. package/dist/plan/types.d.ts.map +1 -1
  42. package/dist/tools/index.d.ts +0 -1
  43. package/dist/tools/index.d.ts.map +1 -1
  44. package/dist/tools/index.js +2086 -1769
  45. package/dist/tools/log.d.ts.map +1 -1
  46. package/dist/tools/modes.d.ts.map +1 -1
  47. package/dist/tools/plan.d.ts +2 -2
  48. package/dist/tools/plan.d.ts.map +1 -1
  49. package/package.json +2 -4
  50. package/skills/plan/SKILL.md +7 -15
  51. package/skills/plan/references/workflows/annotate.md +6 -0
  52. package/skills/plan/references/workflows/finalize.md +7 -0
  53. package/skills/plan/references/workflows/go.md +8 -0
  54. package/{workflows/plan → skills/plan/references/workflows}/help.md +4 -11
  55. package/skills/plan/references/workflows/init.md +6 -0
  56. package/skills/plan/references/workflows/new.md +8 -0
  57. package/skills/plan/references/workflows/update.md +7 -0
  58. package/templates/plan/PLAN.md +0 -2
  59. package/dist/commands.d.ts +0 -22
  60. package/dist/commands.d.ts.map +0 -1
  61. package/dist/extensions/zodx.d.ts +0 -8
  62. package/dist/extensions/zodx.d.ts.map +0 -1
  63. package/dist/plan/operations.d.ts +0 -43
  64. package/dist/plan/operations.d.ts.map +0 -1
  65. package/dist/plan/reviews.d.ts +0 -28
  66. package/dist/plan/reviews.d.ts.map +0 -1
  67. package/dist/tools/ci.d.ts +0 -6
  68. package/dist/tools/ci.d.ts.map +0 -1
  69. package/dist/tools/plan-schema.d.ts +0 -211
  70. package/dist/tools/plan-schema.d.ts.map +0 -1
  71. package/dist/workflow.d.ts +0 -33
  72. package/dist/workflow.d.ts.map +0 -1
  73. package/workflows/plan/annotate.md +0 -13
  74. package/workflows/plan/finalize.md +0 -15
  75. package/workflows/plan/go.md +0 -20
  76. package/workflows/plan/init.md +0 -13
  77. package/workflows/plan/new.md +0 -20
  78. package/workflows/plan/update.md +0 -18
@@ -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;AAoBlF,eAAO,MAAM,aAAa,EAAE,cA0B1B,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;AAsBlF,eAAO,MAAM,aAAa,EAAE,cA0B1B,CAAC"}
@@ -1 +1 @@
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,CAiErF"}
1
+ {"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../../src/tools/modes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAElF,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAiB5D,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,CAiErF"}
@@ -1,6 +1,6 @@
1
1
  import type { ExtensionAPI, ToolDefinition } from '@earendil-works/pi-coding-agent';
2
2
  import type { ModeController } from '../modes';
3
- import { type PlanStore } from '../plan/store';
3
+ import { type PlanController } from '../plan';
4
4
  export type PlanToolRuntime = Pick<ExtensionAPI, 'events' | 'sendUserMessage'> & Partial<Pick<ExtensionAPI, 'sendMessage'>>;
5
- export declare function createPlanTools(_pi: PlanToolRuntime, _modes: ModeController, store?: PlanStore): readonly ToolDefinition[];
5
+ export declare function createPlanTools(pi: PlanToolRuntime, modes: ModeController, store?: PlanController): readonly ToolDefinition[];
6
6
  //# sourceMappingURL=plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/tools/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAQpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM/C,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAmBhE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,iBAAiB,CAAC,GAC5E,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;AAE7C,wBAAgB,eAAe,CAC7B,GAAG,EAAE,eAAe,EACpB,MAAM,EAAE,cAAc,EACtB,KAAK,GAAE,SAA6B,GACnC,SAAS,cAAc,EAAE,CA6W3B"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/tools/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAQtG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAML,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAC;AAiCjB,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,iBAAiB,CAAC,GAC5E,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;AAE7C,wBAAgB,eAAe,CAC7B,EAAE,EAAE,eAAe,EACnB,KAAK,EAAE,cAAc,EACrB,KAAK,GAAE,cAAuC,GAC7C,SAAS,cAAc,EAAE,CAimB3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difflab/pi",
3
- "version": "0.4.0-rc.202609231106.845dbe5",
3
+ "version": "0.4.0",
4
4
  "description": "Tools and skills for the pi coding agent",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,8 +34,7 @@
34
34
  "agents/",
35
35
  "dist/",
36
36
  "skills/",
37
- "templates/",
38
- "workflows/"
37
+ "templates/"
39
38
  ],
40
39
  "pi": {
41
40
  "extensions": [
@@ -58,7 +57,6 @@
58
57
  },
59
58
  "dependencies": {
60
59
  "@juicesharp/rpiv-ask-user-question": "^2.10.1",
61
- "cmd-ts": "^0.15.0",
62
60
  "commander": "^14.0.0",
63
61
  "mdast-builder": "1.1.1",
64
62
  "pi-mcp-adapter": "^2.33.0",
@@ -1,23 +1,15 @@
1
1
  ---
2
2
  name: plan
3
- description: Route natural-language planning requests to Diffpi's /plan commands. Use when a user wants to create, revise, annotate, finalize, or execute a durable plan, or asks which /plan command to run.
4
- allowed-tools: ask_user_question
3
+ description: Create, annotate, validate, update, and execute durable Diffpi plans. Use for /plan workflows, implementation planning, plan annotations, and resumable plan execution.
4
+ allowed-tools: Agent get_subagent_result steer_subagent ask_user_question plan_context plan_init plan_update_overview plan_add_phase plan_remove_phase plan_update_phase plan_validate plan_annotate plan_annotations plan_ack_annotations plan_log_progress plan_update_status plan_run_gates plan_watch_ci plan_start_execution diffpi_modes_set diffpi_modes_unset
5
5
  ---
6
6
 
7
- # Plan Command Guide
7
+ # plan
8
8
 
9
- Use `/plan` commands as the execution boundary. Do not reproduce their workflows, call `plan_*` tools directly, or edit managed plan files.
9
+ Parse the first argument as `init`, `new`, `update`, `annotate`, `finalize`, `go`, or `help`. An empty or unknown verb uses [help](references/workflows/help.md). Read and follow `references/workflows/<verb>.md`.
10
10
 
11
- ## Natural-language routing
11
+ Foreground `init`, `new`, and `update` run in Planner mode. Foreground `annotate`, `finalize`, `go`, and `help` run in Worker mode. Finalize exits to the default mode when implementation is deferred, and completed inline execution exits to the default mode automatically.
12
12
 
13
- Map the user's intent to one command:
13
+ `--bg` is handled and removed by the `/plan` extension command. A simple background `new`, `update`, or `go` dispatch starts one named planner/orchestrator through the pi-subagents cross-extension RPC; do not add an extra model turn, invoke recursive Pi, or use `/bg --agent`. Background workflows never ask questions. They record safe assumptions and return an actionable blocker for unresolved decisions. For additional delegation, use `Agent`, `get_subagent_result`, and `steer_subagent`; use `SubagentWorkflow` when orchestration must be deterministic and multi-stage. Reserve pi-background-tasks for ordinary long-running shell commands, tests, builds, and servers. Foreground workflows use `ask_user_question` for every choice that cannot be derived from the request; never ask in plain chat.
14
14
 
15
- - Create an empty plan shell: `/plan init <short-slug> [--branch <name>]`
16
- - Research and author a complete plan: `/plan new <short-slug> [--branch <name>] [--bg] [prompt...]`
17
- - Revise a plan from chat instructions or its current plan review: `/plan update [short-slug] [--branch <name>] [--bg] [instructions...]`
18
- - Review a plan in tuicr and save the result: `/plan annotate [short-slug]`
19
- - Validate and mark a plan ready: `/plan finalize [short-slug]`
20
- - Execute a plan: `/plan go <short-slug> [--mode <no-commit|commit|push>] [--bg]`
21
- - Show command help: `/plan help`
22
-
23
- Infer the command, slug, branch, and free-text arguments from recent conversation when they are clear. If a required value cannot be inferred, use `ask_user_question`; do not ask in plain chat. Then give the user one exact, copyable `/plan` command. Explain defaults only when relevant: `go` uses `--mode no-commit` when `--mode` is omitted.
15
+ Use plan tools for every `PLAN.md`, status, log, gate, and annotation mutation. Do not edit managed plan files directly. Validate after authoring. Preserve stable IDs, user prose, completed evidence, and annotation acknowledgement order.
@@ -0,0 +1,6 @@
1
+ # annotate
2
+
3
+ 1. Call `plan_context` and require an exact selection.
4
+ 2. Call `plan_annotate`; it uses `tuicr --file PLAN.md`, never `-p` or `--path`.
5
+ 3. Report the selected plan, session slug, launch result, and copyable fallback command.
6
+ 4. Tell the user to run `/plan update <plan-id>` when comments are ready.
@@ -0,0 +1,7 @@
1
+ # finalize
2
+
3
+ 1. Call `plan_context` and use the current persisted plan, including changes authored through chat. Call `plan_annotations` only to check for optional annotation feedback. If `pending` is non-empty, run the update workflow to apply and acknowledge those comments. If no annotation session exists or no comments are pending, skip update and continue directly.
4
+ 2. Call `plan_validate` with `strict: true`. Stop on errors, pending annotations, or Design above 800 words.
5
+ 3. Mark the draft ready with `plan_update_status`.
6
+ 4. Use one `ask_user_question` call to choose the next action and, when executing now, commit policy. Choices are inline execution, background execution, execute later, or continue planning; commit policy is commit per phase or no commits.
7
+ 5. For execute later or continue planning, do not ask for or apply a commit policy. Call `diffpi_modes_unset` before returning so finalization exits to the default inline mode. Otherwise call `plan_start_execution` with the selected mode and policy.
@@ -0,0 +1,8 @@
1
+ # go
2
+
3
+ 1. Require a plan slug and call `plan_context`.
4
+ 2. Read explicit `--bg`, `--commit`, and `--no-commit` choices already parsed by the command.
5
+ 3. If mode or commit policy is missing in foreground mode, use one `ask_user_question` call for only the missing choices. Never silently default.
6
+ 4. Background mode never asks. If a required preference is missing, return a blocker with the exact complete command.
7
+ 5. Foreground execution runs in `WORKER` mode. Background execution uses Orchestrator and must preserve the foreground mode.
8
+ 6. Call `plan_start_execution` with inline/background mode and commit-per-phase/no-commit policy. For `/plan go --bg`, the already-spawned orchestrator must pass `coordinator: current`; normal callers omit it (default `spawn`). Commit-per-phase execution pushes each phase commit, records pending CI, and launches a bounded background Worker to call `plan_watch_ci` while the next phase executes. Collect that monitor before the next push and collect all monitors before completion; failed or timed-out CI blocks execution. When an inline execution marks the plan completed, `plan_update_status` exits to the default mode automatically. Report the execution ID and whether the foreground mode changed.
@@ -1,20 +1,13 @@
1
1
  # help
2
2
 
3
- ## Arguments
4
-
5
- - **Invocation:** `/plan help`
6
- - This workflow accepts no arguments.
7
-
8
- ## Instructions
9
-
10
- Show these commands:
3
+ Use these commands:
11
4
 
12
5
  - `/plan init <short-slug> [--branch <name>]` creates a phase-less draft.
13
6
  - `/plan new <short-slug> [--branch <name>] [--bg] [prompt...]` creates and populates a plan.
14
- - `/plan update [short-slug] [--branch <name>] [--bg] [instructions...]` applies the current plan review before other instructions.
15
- - `/plan annotate [short-slug]` reviews the plan with tuicr and saves an immutable review dump when tuicr closes.
7
+ - `/plan update [short-slug] [--branch <name>] [--bg] [instructions...]` applies pending annotations before other instructions.
8
+ - `/plan annotate [short-slug]` opens `PLAN.md` with `tuicr --file`.
16
9
  - `/plan finalize [short-slug]` validates and marks a plan ready.
17
- - `/plan go <short-slug> [--mode <no-commit|commit|push>] [--bg]` starts execution.
10
+ - `/plan go <short-slug> [--commit|--no-commit] [--bg]` starts execution.
18
11
  - `/plan help` shows this reference.
19
12
 
20
13
  `--branch` records or filters a branch. It does not create or switch branches. Background workflows do not ask questions.
@@ -0,0 +1,6 @@
1
+ # init
2
+
3
+ 1. Require one short slug and accept an optional `--branch`.
4
+ 2. Call `plan_init` with the explicit intent and title when supplied. The tool creates only `PLAN.md` and `logs.txt`.
5
+ 3. Call `plan_annotate` when the annotation launcher is available. Otherwise show its exact fallback command.
6
+ 4. Report the plan ID and explain that `/plan update <id>` imports annotations and populates the draft.
@@ -0,0 +1,8 @@
1
+ # new
2
+
3
+ 1. Require a short slug. Call `plan_context`, then `plan_init` if the plan does not exist.
4
+ 2. Ground the plan in repository files and the explicit prompt. If no prompt was supplied, use the inherited conversation context supplied by the named Planner RPC dispatch.
5
+ 3. In foreground mode, use `ask_user_question` only for decisions that materially change scope. In background mode, never ask; record safe assumptions and stop with a blocker if ambiguity cannot be resolved.
6
+ 4. Use `plan_update_overview`, `plan_add_phase`, and `plan_update_phase` to create the plan. Use the planning tools to enforce the declared requirements, references, phase dependencies, file scopes, steps, and acceptance criteria; do not write PLAN.md by hand when a tool can make the change.
7
+ 5. Create one implementation file per phase at `.diffpi/plan/<plan-id>/implementation/phase-<phase-id>.md`. Fill in the implementation template with the phase summary, file tree, public APIs and data contracts, required libraries or algorithms, and implementation constraints. Keep each phase focused on one or two modules or libraries unless it is scaffolding.
8
+ 6. Keep Design near 300 words and call `plan_validate`. Leave the result as a draft for annotation or finalization.
@@ -0,0 +1,7 @@
1
+ # update
2
+
3
+ 1. Call `plan_context`. Omit the slug only when exactly one candidate is selected.
4
+ 2. Call `plan_annotations` before interpreting prompt instructions. A missing annotation session means there is no annotation work.
5
+ 3. Apply each unambiguous pending comment, then the explicit instructions, through `plan_update_overview`, `plan_add_phase`, `plan_remove_phase`, or `plan_update_phase`. Preserve stable IDs and completed evidence.
6
+ 4. In foreground mode, use `ask_user_question` for unresolved product decisions. In background mode, do not ask; persist and return a blocker.
7
+ 5. Call `plan_validate`. Only after successful application, call `plan_ack_annotations` with exactly the applied comment IDs and a concise summary. Failed or partial updates leave unhandled IDs pending.
@@ -4,8 +4,6 @@
4
4
 
5
5
  - **Plan ID:** {{id}}
6
6
  - **Branch:** {{branch}}
7
- - **Issue:** {{issue_id}}
8
- - **Issue URL:** {{issue_url}}
9
7
  - **Status:** draft
10
8
  - **Revision:** 0
11
9
 
@@ -1,22 +0,0 @@
1
- import type { ExtensionAPI, ExtensionContext } from '@earendil-works/pi-coding-agent';
2
- import { type Runner } from 'cmd-ts';
3
- import type { ModeController } from './modes';
4
- import { type PlanWorkflowArguments, type PlanWorkflowName } from './workflow';
5
- export type WorkflowAgent = 'planner' | 'orchestrator' | 'reviewer' | 'worker';
6
- export type WorkflowRuntime = {
7
- pi: ExtensionAPI;
8
- ctx: ExtensionContext;
9
- modes: ModeController;
10
- };
11
- export type WorkflowInvocation = {
12
- [Name in PlanWorkflowName]: {
13
- workflow: Name;
14
- arguments: PlanWorkflowArguments[Name];
15
- agent?: WorkflowAgent;
16
- isBackground?: boolean;
17
- };
18
- }[PlanWorkflowName];
19
- export declare function tokenizeCommandArgs(raw: string): string[];
20
- export declare function generateCommandHelp<Args, Result>(command: Runner<Args, Result>): Promise<string>;
21
- export declare function createWorkflowInvoker(runtime: WorkflowRuntime): (invocation: WorkflowInvocation) => Promise<void>;
22
- //# sourceMappingURL=commands.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAoB,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAIjG,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE/E,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,YAAY,CAAC;IACjB,GAAG,EAAE,gBAAgB,CAAC;IACtB,KAAK,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;KAC9B,IAAI,IAAI,gBAAgB,GAAG;QAC1B,QAAQ,EAAE,IAAI,CAAC;QACf,SAAS,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACvC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB;CACF,CAAC,gBAAgB,CAAC,CAAC;AAIpB,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBzD;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAItG;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,eAAe,IACvB,YAAY,kBAAkB,KAAG,OAAO,CAAC,IAAI,CAAC,CAwBpF"}
@@ -1,8 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const zx: {
3
- cwd: z.ZodOptional<z.ZodString>;
4
- id: z.ZodString;
5
- revision: z.ZodNumber;
6
- text: z.ZodString;
7
- };
8
- //# sourceMappingURL=zodx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zodx.d.ts","sourceRoot":"","sources":["../../src/extensions/zodx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,EAAE;;;;;CASd,CAAC"}
@@ -1,43 +0,0 @@
1
- import type { SubagentEscalation } from '../extensions/subagentx';
2
- import type { PlanStore } from './store';
3
- import type { PlanCiStatus, PlanCommit, PlanDocument, PlanPhaseStatus, PlanRecord, PlanStatus } from './types';
4
- export interface PlanStatusUpdate {
5
- target: {
6
- type: 'plan' | 'phase' | 'task';
7
- id?: string;
8
- };
9
- expectedStatus: PlanStatus | PlanPhaseStatus;
10
- status: PlanStatus | PlanPhaseStatus;
11
- actor: string;
12
- message: string;
13
- executionId?: string;
14
- evidence?: string[];
15
- blockedReason?: string;
16
- attempts?: string[];
17
- needsUserDecision?: boolean;
18
- commit?: PlanCommit;
19
- }
20
- export interface PlanStatusUpdateResult {
21
- record: PlanRecord;
22
- escalation?: SubagentEscalation;
23
- }
24
- export interface PlanCiUpdate {
25
- phaseId: string;
26
- sha: string;
27
- status: Exclude<PlanCiStatus, 'pending'>;
28
- actor: string;
29
- executionId: string;
30
- detail: string;
31
- }
32
- export interface PlanCiRetry {
33
- phaseId: string;
34
- sha: string;
35
- actor: string;
36
- executionId: string;
37
- reason: string;
38
- }
39
- export declare function updatePlanStatus(store: PlanStore, cwd: string, query: string, input: PlanStatusUpdate): Promise<PlanStatusUpdateResult>;
40
- export declare function updatePlanCi(store: PlanStore, cwd: string, query: string, input: PlanCiUpdate): Promise<PlanRecord>;
41
- export declare function retryPlanCi(store: PlanStore, cwd: string, query: string, input: PlanCiRetry): Promise<PlanRecord>;
42
- export declare function assertPhasePushEligible(plan: PlanDocument, phaseId: string, executionId: string): void;
43
- //# sourceMappingURL=operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/plan/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAEV,YAAY,EACZ,UAAU,EACV,YAAY,EAEZ,eAAe,EACf,UAAU,EACV,UAAU,EAGX,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,cAAc,EAAE,UAAU,GAAG,eAAe,CAAC;IAC7C,MAAM,EAAE,UAAU,GAAG,eAAe,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,sBAAsB,CAAC,CAkIjC;AAED,wBAAsB,YAAY,CAChC,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,UAAU,CAAC,CAwCrB;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC,UAAU,CAAC,CAoCrB;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAiBtG"}
@@ -1,28 +0,0 @@
1
- import type { PlanRecord } from './types';
2
- interface PlanReviewDump {
3
- schemaVersion: 1;
4
- planId: string;
5
- planRevision: number;
6
- source: 'tuicr';
7
- sourceId: string;
8
- planSource: string;
9
- content: string;
10
- }
11
- interface PlanReview {
12
- path: string;
13
- dump: PlanReviewDump;
14
- }
15
- interface PlanReviewRuntime {
16
- execute?: (command: string, args: string[], cwd: string, interactive: boolean) => Promise<{
17
- code: number;
18
- stdout: string;
19
- stderr: string;
20
- }>;
21
- }
22
- export declare function createPlanReview(record: PlanRecord, runtime?: PlanReviewRuntime): Promise<{
23
- code: number;
24
- review: PlanReview;
25
- }>;
26
- export declare function readPlanReview(record: PlanRecord): Promise<PlanReview | undefined>;
27
- export {};
28
- //# sourceMappingURL=reviews.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../src/plan/reviews.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,UAAU,cAAc;IACtB,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,CACR,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,KACjB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChE;AAID,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC,CA4B/C;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAiBxF"}
@@ -1,6 +0,0 @@
1
- import type { ToolDefinition } from '@earendil-works/pi-coding-agent';
2
- export declare const watchCiTool: ToolDefinition<import("typebox").TSchema, {
3
- status: "skipped" | "passed" | "failed";
4
- detail: string;
5
- }, any> & ToolDefinition<any, any, any>;
6
- //# sourceMappingURL=ci.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/tools/ci.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAgBtE,eAAO,MAAM,WAAW;;;uCAmCtB,CAAC"}
@@ -1,211 +0,0 @@
1
- import { z } from 'zod';
2
- declare const planTaskDraftSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- title: z.ZodString;
5
- steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
7
- fileScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
- acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
- }, z.core.$strict>;
10
- declare const planPhaseDraftSchema: z.ZodObject<{
11
- id: z.ZodString;
12
- title: z.ZodString;
13
- objective: z.ZodString;
14
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
- tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
16
- id: z.ZodString;
17
- title: z.ZodString;
18
- steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
- fileScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
- acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
- }, z.core.$strict>>>;
23
- }, z.core.$strict>;
24
- export declare const planContextParametersSchema: z.ZodObject<{
25
- cwd: z.ZodOptional<z.ZodString>;
26
- plan: z.ZodOptional<z.ZodString>;
27
- branch: z.ZodOptional<z.ZodString>;
28
- statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
29
- draft: "draft";
30
- ready: "ready";
31
- in_progress: "in_progress";
32
- blocked: "blocked";
33
- completed: "completed";
34
- }>>>;
35
- }, z.core.$strict>;
36
- export declare const planInitParametersSchema: z.ZodObject<{
37
- cwd: z.ZodOptional<z.ZodString>;
38
- shortSlug: z.ZodString;
39
- branch: z.ZodOptional<z.ZodString>;
40
- title: z.ZodOptional<z.ZodString>;
41
- intent: z.ZodOptional<z.ZodString>;
42
- issueId: z.ZodOptional<z.ZodString>;
43
- issueUrl: z.ZodOptional<z.ZodString>;
44
- open: z.ZodOptional<z.ZodBoolean>;
45
- }, z.core.$strict>;
46
- export declare const planUpdateOverviewParametersSchema: z.ZodObject<{
47
- cwd: z.ZodOptional<z.ZodString>;
48
- plan: z.ZodString;
49
- expectedPlanRevision: z.ZodNumber;
50
- intent: z.ZodOptional<z.ZodString>;
51
- requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
- design: z.ZodOptional<z.ZodObject<{
53
- bigIdeas: z.ZodString;
54
- keyApiUpdates: z.ZodString;
55
- consequences: z.ZodString;
56
- }, z.core.$strict>>;
57
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
- id: z.ZodString;
59
- value: z.ZodString;
60
- }, z.core.$strict>>>;
61
- }, z.core.$strict>;
62
- export declare const planAddPhaseParametersSchema: z.ZodObject<{
63
- cwd: z.ZodOptional<z.ZodString>;
64
- plan: z.ZodString;
65
- expectedPlanRevision: z.ZodNumber;
66
- afterPhaseId: z.ZodOptional<z.ZodString>;
67
- phase: z.ZodObject<{
68
- id: z.ZodString;
69
- title: z.ZodString;
70
- objective: z.ZodString;
71
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
- tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
73
- id: z.ZodString;
74
- title: z.ZodString;
75
- steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
76
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
- fileScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
- acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
- }, z.core.$strict>>>;
80
- }, z.core.$strict>;
81
- }, z.core.$strict>;
82
- export declare const planRemovePhaseParametersSchema: z.ZodObject<{
83
- cwd: z.ZodOptional<z.ZodString>;
84
- plan: z.ZodString;
85
- expectedPlanRevision: z.ZodNumber;
86
- phaseId: z.ZodString;
87
- reason: z.ZodString;
88
- }, z.core.$strict>;
89
- export declare const planUpdatePhaseParametersSchema: z.ZodObject<{
90
- cwd: z.ZodOptional<z.ZodString>;
91
- plan: z.ZodString;
92
- expectedPlanRevision: z.ZodNumber;
93
- phaseId: z.ZodString;
94
- patch: z.ZodObject<{
95
- title: z.ZodOptional<z.ZodString>;
96
- objective: z.ZodOptional<z.ZodString>;
97
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
98
- tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
99
- id: z.ZodString;
100
- title: z.ZodString;
101
- steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
102
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
- fileScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
- acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
- }, z.core.$strict>>>;
106
- }, z.core.$strict>;
107
- }, z.core.$strict>;
108
- export declare const planValidateParametersSchema: z.ZodObject<{
109
- cwd: z.ZodOptional<z.ZodString>;
110
- plan: z.ZodString;
111
- strict: z.ZodOptional<z.ZodBoolean>;
112
- }, z.core.$strict>;
113
- export declare const planLogProgressParametersSchema: z.ZodObject<{
114
- cwd: z.ZodOptional<z.ZodString>;
115
- plan: z.ZodString;
116
- actor: z.ZodString;
117
- message: z.ZodString;
118
- executionId: z.ZodOptional<z.ZodString>;
119
- phaseId: z.ZodOptional<z.ZodString>;
120
- taskId: z.ZodOptional<z.ZodString>;
121
- evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
123
- }, z.core.$strict>;
124
- export declare const planRunGatesParametersSchema: z.ZodObject<{
125
- cwd: z.ZodOptional<z.ZodString>;
126
- plan: z.ZodString;
127
- phaseId: z.ZodString;
128
- expectedPhaseRevision: z.ZodNumber;
129
- executionId: z.ZodString;
130
- actor: z.ZodString;
131
- }, z.core.$strict>;
132
- export declare const planRecordCiParametersSchema: z.ZodObject<{
133
- cwd: z.ZodOptional<z.ZodString>;
134
- plan: z.ZodString;
135
- phaseId: z.ZodString;
136
- sha: z.ZodString;
137
- executionId: z.ZodString;
138
- actor: z.ZodString;
139
- status: z.ZodEnum<{
140
- skipped: "skipped";
141
- passed: "passed";
142
- failed: "failed";
143
- }>;
144
- detail: z.ZodString;
145
- retryReason: z.ZodOptional<z.ZodString>;
146
- }, z.core.$strict>;
147
- export declare const planLookupParametersSchema: z.ZodObject<{
148
- cwd: z.ZodOptional<z.ZodString>;
149
- plan: z.ZodOptional<z.ZodString>;
150
- }, z.core.$strict>;
151
- export declare const planStartExecutionParametersSchema: z.ZodObject<{
152
- cwd: z.ZodOptional<z.ZodString>;
153
- plan: z.ZodString;
154
- commitMode: z.ZodEnum<{
155
- push: "push";
156
- "no-commit": "no-commit";
157
- commit: "commit";
158
- }>;
159
- actor: z.ZodString;
160
- }, z.core.$strict>;
161
- export declare const planUpdateStatusParametersSchema: z.ZodObject<{
162
- cwd: z.ZodOptional<z.ZodString>;
163
- plan: z.ZodString;
164
- target: z.ZodObject<{
165
- type: z.ZodEnum<{
166
- phase: "phase";
167
- task: "task";
168
- plan: "plan";
169
- }>;
170
- id: z.ZodOptional<z.ZodString>;
171
- }, z.core.$strict>;
172
- expectedStatus: z.ZodEnum<{
173
- draft: "draft";
174
- ready: "ready";
175
- in_progress: "in_progress";
176
- blocked: "blocked";
177
- completed: "completed";
178
- pending: "pending";
179
- skipped: "skipped";
180
- }>;
181
- status: z.ZodEnum<{
182
- draft: "draft";
183
- ready: "ready";
184
- in_progress: "in_progress";
185
- blocked: "blocked";
186
- completed: "completed";
187
- pending: "pending";
188
- skipped: "skipped";
189
- }>;
190
- actor: z.ZodString;
191
- message: z.ZodString;
192
- executionId: z.ZodOptional<z.ZodString>;
193
- evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
194
- blockedReason: z.ZodOptional<z.ZodString>;
195
- attempts: z.ZodOptional<z.ZodArray<z.ZodString>>;
196
- needsUserDecision: z.ZodOptional<z.ZodBoolean>;
197
- commit: z.ZodOptional<z.ZodObject<{
198
- sha: z.ZodString;
199
- subject: z.ZodString;
200
- completedAt: z.ZodString;
201
- pushedAt: z.ZodOptional<z.ZodString>;
202
- ci: z.ZodOptional<z.ZodObject<{
203
- status: z.ZodLiteral<"pending">;
204
- startedAt: z.ZodString;
205
- }, z.core.$strict>>;
206
- }, z.core.$strict>>;
207
- }, z.core.$strict>;
208
- export type PlanTaskDraft = z.infer<typeof planTaskDraftSchema>;
209
- export type PlanPhaseDraft = z.infer<typeof planPhaseDraftSchema>;
210
- export {};
211
- //# sourceMappingURL=plan-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan-schema.d.ts","sourceRoot":"","sources":["../../src/tools/plan-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,QAAA,MAAM,mBAAmB;;;;;;;kBASd,CAAC;AAEZ,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;kBAQf,CAAC;AAYZ,eAAO,MAAM,2BAA2B;;;;;;;;;;;kBAO7B,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;;;;kBAW1B,CAAC;AAEZ,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;kBAa3C,CAAC;AAEL,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;kBAQ9B,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;;;kBAQjC,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;kBAejC,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;kBAE9B,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;;;;;;;kBAYjC,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;;kBAS9B,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;kBAY9B,CAAC;AAEZ,eAAO,MAAM,0BAA0B;;;kBAAkE,CAAC;AAE1G,eAAO,MAAM,kCAAkC;;;;;;;;;kBAOpC,CAAC;AAEZ,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA+BlC,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,33 +0,0 @@
1
- export type PlanWorkflowName = 'init' | 'new' | 'update' | 'annotate' | 'finalize' | 'go' | 'help';
2
- export type PlanWorkflowArguments = {
3
- init: {
4
- plan: string;
5
- branch?: string;
6
- };
7
- new: {
8
- plan: string;
9
- branch?: string;
10
- background: boolean;
11
- prompt?: string;
12
- };
13
- update: {
14
- plan?: string;
15
- branch?: string;
16
- background: boolean;
17
- instructions?: string;
18
- };
19
- annotate: {
20
- plan?: string;
21
- };
22
- finalize: {
23
- plan?: string;
24
- };
25
- go: {
26
- plan: string;
27
- commitMode: 'no-commit' | 'commit' | 'push';
28
- background: boolean;
29
- };
30
- help: Record<string, never>;
31
- };
32
- export declare function loadPlanWorkflow<Name extends PlanWorkflowName>(name: Name, args: PlanWorkflowArguments[Name]): Promise<string>;
33
- //# sourceMappingURL=workflow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../src/workflow.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,MAAM,CAAC;AAEnG,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7E,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvF,QAAQ,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,QAAQ,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IACvF,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAC7B,CAAC;AAIF,wBAAsB,gBAAgB,CAAC,IAAI,SAAS,gBAAgB,EAClE,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,MAAM,CAAC,CAMjB"}
@@ -1,13 +0,0 @@
1
- # annotate
2
-
3
- ## Arguments
4
-
5
- - **Invocation:** `/plan annotate [short-slug]`
6
- - `[short-slug]` (optional): Plan to annotate. Omit it only when context resolves exactly one plan.
7
-
8
- ## Instructions
9
-
10
- 1. Call `plan_context` and infer planId from the provided short slug/conversation context. Fall back to looking at available active plan candidates, and ask user which to annotate listing available options.
11
- 2. Call `plan_annotate`; it uses `tuicr --file .diffpi/plan/{planId}`, never `-p` or `--path`.
12
- 3. Report the selected plan, launch result, and copyable fallback command. Closing tuicr saves one immutable plan review for the current plan revision.
13
- 4. Tell the user to run `/plan update <plan-id>` after closing tuicr.
@@ -1,15 +0,0 @@
1
- # finalize
2
-
3
- ## Arguments
4
-
5
- - **Invocation:** `/plan finalize [short-slug]`
6
- - `[short-slug]` (optional): Plan to validate and mark ready. Omit it only when context resolves exactly one plan.
7
-
8
- ## Instructions
9
-
10
- 1. Call `plan_context` and use the current persisted plan, including changes authored through chat.
11
- 2. Call `plan_review` once. If a review exists for the current plan revision, apply its feedback using the update workflow's mutation rules. If no review exists, continue directly.
12
- 3. Call `plan_validate` with `strict: true`. Address validation issues and stop on unresolved errors or Design above 800 words.
13
- 4. Mark the draft ready with `plan_update_status`.
14
- 5. Use one `ask_user_question` call to choose the next action. Choices are foreground execution, background execution, execute later, or continue planning. When execution is selected, also ask for `no-commit`, `commit`, or `push` mode.
15
- 6. Call `diffpi_modes_unset` before returning so finalization exits to the default inline mode. For execution, return the exact `/plan go <short-slug> --mode <mode>` command, adding `--bg` for background execution. Do not call `plan_start_execution`; `/plan go` routes execution to Orchestrator.
@@ -1,20 +0,0 @@
1
- # go
2
-
3
- ## Arguments
4
-
5
- - **Invocation:** `/plan go <short-slug> [--mode <no-commit|commit|push>] [--bg]`
6
- - `<short-slug>` (required): Plan to execute.
7
- - `--mode no-commit` (optional, default): Execute without creating commits.
8
- - `--mode commit` (optional): Create one local commit after each completed phase. Do not push or monitor remote CI.
9
- - `--mode push` (optional): Create and push one commit after each completed phase, then monitor remote CI before completion.
10
- - `--bg` (optional): Launch the execution Orchestrator in the background and preserve the current foreground mode.
11
-
12
- ## Instructions
13
-
14
- 1. Call `plan_context` with the supplied slug.
15
- 2. Read the requested commit mode from `--mode`. Use `no-commit` when the flag is omitted. Do not ask the user to select a commit mode.
16
- 3. Reject values other than `no-commit`, `commit`, or `push`. The command parser normally performs this validation before invoking the workflow.
17
- 4. The command has already selected the foreground Orchestrator or launched the background Orchestrator. Continue as the current Orchestrator and launch implementation Workers as needed.
18
- 5. Call `plan_start_execution` with the selected commit mode. This tool initializes durable execution state and returns the execution packet. It does not select a mode, send another turn, or launch an agent.
19
- 6. In `no-commit` mode, do not create or push commits. In `commit` mode, create one local commit after each phase passes its gates, but do not push or monitor remote CI. In `push` mode, commit and push each phase, record pending CI, and launch a bounded background Worker to call `watch_ci` for the exact commit and then `plan_record_ci` for the phase while the next phase executes. Collect that monitor before the next push and collect all monitors before completion; failed or timed-out CI blocks execution.
20
- 7. For foreground execution, call `diffpi_modes_unset` after the plan is completed. Background execution must not change the foreground mode. Report the execution ID and selected commit mode.