agentplane 0.2.6 → 0.2.13

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 (166) hide show
  1. package/README.md +11 -0
  2. package/assets/AGENTS.md +35 -0
  3. package/assets/agents/CODER.json +0 -1
  4. package/assets/agents/INTEGRATOR.json +0 -1
  5. package/assets/agents/ORCHESTRATOR.json +1 -2
  6. package/assets/agents/PLANNER.json +1 -3
  7. package/assets/agents/TESTER.json +0 -1
  8. package/assets/agents/UPGRADER.json +17 -15
  9. package/dist/cli/archive.d.ts.map +1 -1
  10. package/dist/cli/archive.js +61 -36
  11. package/dist/cli/command-guide.d.ts.map +1 -1
  12. package/dist/cli/command-guide.js +5 -3
  13. package/dist/cli/run-cli/command-catalog.d.ts +4 -1
  14. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  15. package/dist/cli/run-cli/command-catalog.js +44 -26
  16. package/dist/cli/run-cli/commands/config.d.ts +5 -4
  17. package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
  18. package/dist/cli/run-cli/commands/config.js +47 -58
  19. package/dist/cli/run-cli/commands/core.d.ts +2 -1
  20. package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
  21. package/dist/cli/run-cli/commands/core.js +187 -51
  22. package/dist/cli/run-cli/commands/ide.d.ts +3 -1
  23. package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
  24. package/dist/cli/run-cli/commands/ide.js +7 -12
  25. package/dist/cli/run-cli/commands/init/ide-sync.d.ts.map +1 -1
  26. package/dist/cli/run-cli/commands/init/ide-sync.js +10 -1
  27. package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
  28. package/dist/cli/run-cli/commands/init/write-agents.js +4 -24
  29. package/dist/cli/run-cli/commands/init/write-gitignore.d.ts +5 -0
  30. package/dist/cli/run-cli/commands/init/write-gitignore.d.ts.map +1 -0
  31. package/dist/cli/run-cli/commands/init/write-gitignore.js +48 -0
  32. package/dist/cli/run-cli/commands/init.d.ts +1 -0
  33. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  34. package/dist/cli/run-cli/commands/init.js +34 -8
  35. package/dist/cli/run-cli/commands/wrap-command.d.ts +6 -0
  36. package/dist/cli/run-cli/commands/wrap-command.d.ts.map +1 -0
  37. package/dist/cli/run-cli/commands/wrap-command.js +17 -0
  38. package/dist/cli/run-cli/registry.run.d.ts +6 -2
  39. package/dist/cli/run-cli/registry.run.d.ts.map +1 -1
  40. package/dist/cli/run-cli/registry.run.js +7 -2
  41. package/dist/cli/run-cli.d.ts.map +1 -1
  42. package/dist/cli/run-cli.js +96 -75
  43. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  44. package/dist/cli/run-cli.test-helpers.js +99 -3
  45. package/dist/cli/spec/parse-utils.d.ts +11 -0
  46. package/dist/cli/spec/parse-utils.d.ts.map +1 -0
  47. package/dist/cli/spec/parse-utils.js +28 -0
  48. package/dist/commands/block.command.d.ts +3 -18
  49. package/dist/commands/block.command.d.ts.map +1 -1
  50. package/dist/commands/block.command.js +2 -143
  51. package/dist/commands/block.run.d.ts +5 -0
  52. package/dist/commands/block.run.d.ts.map +1 -0
  53. package/dist/commands/block.run.js +22 -0
  54. package/dist/commands/block.spec.d.ts +17 -0
  55. package/dist/commands/block.spec.d.ts.map +1 -0
  56. package/dist/commands/block.spec.js +115 -0
  57. package/dist/commands/doctor.command.d.ts +2 -7
  58. package/dist/commands/doctor.command.d.ts.map +1 -1
  59. package/dist/commands/doctor.command.js +2 -137
  60. package/dist/commands/doctor.run.d.ts +4 -0
  61. package/dist/commands/doctor.run.d.ts.map +1 -0
  62. package/dist/commands/doctor.run.js +174 -0
  63. package/dist/commands/doctor.spec.d.ts +7 -0
  64. package/dist/commands/doctor.spec.d.ts.map +1 -0
  65. package/dist/commands/doctor.spec.js +20 -0
  66. package/dist/commands/finish.command.d.ts +3 -27
  67. package/dist/commands/finish.command.d.ts.map +1 -1
  68. package/dist/commands/finish.command.js +2 -237
  69. package/dist/commands/finish.run.d.ts +5 -0
  70. package/dist/commands/finish.run.d.ts.map +1 -0
  71. package/dist/commands/finish.run.js +40 -0
  72. package/dist/commands/finish.spec.d.ts +26 -0
  73. package/dist/commands/finish.spec.d.ts.map +1 -0
  74. package/dist/commands/finish.spec.js +193 -0
  75. package/dist/commands/recipes/install.command.d.ts +2 -11
  76. package/dist/commands/recipes/install.command.d.ts.map +1 -1
  77. package/dist/commands/recipes/install.command.js +2 -161
  78. package/dist/commands/recipes/install.run.d.ts +4 -0
  79. package/dist/commands/recipes/install.run.d.ts.map +1 -0
  80. package/dist/commands/recipes/install.run.js +23 -0
  81. package/dist/commands/recipes/install.spec.d.ts +11 -0
  82. package/dist/commands/recipes/install.spec.d.ts.map +1 -0
  83. package/dist/commands/recipes/install.spec.js +140 -0
  84. package/dist/commands/release/apply.command.d.ts +11 -0
  85. package/dist/commands/release/apply.command.d.ts.map +1 -0
  86. package/dist/commands/release/apply.command.js +343 -0
  87. package/dist/commands/release/plan.command.d.ts +12 -0
  88. package/dist/commands/release/plan.command.d.ts.map +1 -0
  89. package/dist/commands/release/plan.command.js +206 -0
  90. package/dist/commands/release/release.command.d.ts +5 -0
  91. package/dist/commands/release/release.command.d.ts.map +1 -0
  92. package/dist/commands/release/release.command.js +18 -0
  93. package/dist/commands/shared/git-context.d.ts +3 -0
  94. package/dist/commands/shared/git-context.d.ts.map +1 -1
  95. package/dist/commands/shared/git-context.js +10 -0
  96. package/dist/commands/shared/task-backend.d.ts +1 -0
  97. package/dist/commands/shared/task-backend.d.ts.map +1 -1
  98. package/dist/commands/start.command.d.ts +3 -18
  99. package/dist/commands/start.command.d.ts.map +1 -1
  100. package/dist/commands/start.command.js +2 -143
  101. package/dist/commands/start.run.d.ts +5 -0
  102. package/dist/commands/start.run.d.ts.map +1 -0
  103. package/dist/commands/start.run.js +22 -0
  104. package/dist/commands/start.spec.d.ts +17 -0
  105. package/dist/commands/start.spec.d.ts.map +1 -0
  106. package/dist/commands/start.spec.js +115 -0
  107. package/dist/commands/task/add.command.d.ts.map +1 -1
  108. package/dist/commands/task/add.command.js +1 -7
  109. package/dist/commands/task/derive.command.d.ts.map +1 -1
  110. package/dist/commands/task/derive.command.js +1 -7
  111. package/dist/commands/task/finish.d.ts.map +1 -1
  112. package/dist/commands/task/finish.js +34 -2
  113. package/dist/commands/task/list.command.d.ts +3 -8
  114. package/dist/commands/task/list.command.d.ts.map +1 -1
  115. package/dist/commands/task/list.command.js +2 -67
  116. package/dist/commands/task/list.run.d.ts +5 -0
  117. package/dist/commands/task/list.run.d.ts.map +1 -0
  118. package/dist/commands/task/list.run.js +10 -0
  119. package/dist/commands/task/list.spec.d.ts +7 -0
  120. package/dist/commands/task/list.spec.d.ts.map +1 -0
  121. package/dist/commands/task/list.spec.js +51 -0
  122. package/dist/commands/task/next.command.d.ts +3 -8
  123. package/dist/commands/task/next.command.d.ts.map +1 -1
  124. package/dist/commands/task/next.command.js +2 -89
  125. package/dist/commands/task/next.run.d.ts +5 -0
  126. package/dist/commands/task/next.run.d.ts.map +1 -0
  127. package/dist/commands/task/next.run.js +11 -0
  128. package/dist/commands/task/next.spec.d.ts +7 -0
  129. package/dist/commands/task/next.spec.d.ts.map +1 -0
  130. package/dist/commands/task/next.spec.js +69 -0
  131. package/dist/commands/task/search.command.d.ts +3 -10
  132. package/dist/commands/task/search.command.d.ts.map +1 -1
  133. package/dist/commands/task/search.command.js +2 -101
  134. package/dist/commands/task/search.run.d.ts +5 -0
  135. package/dist/commands/task/search.run.d.ts.map +1 -0
  136. package/dist/commands/task/search.run.js +13 -0
  137. package/dist/commands/task/search.spec.d.ts +9 -0
  138. package/dist/commands/task/search.spec.d.ts.map +1 -0
  139. package/dist/commands/task/search.spec.js +79 -0
  140. package/dist/commands/task/set-status.command.d.ts.map +1 -1
  141. package/dist/commands/task/set-status.command.js +1 -7
  142. package/dist/commands/task/shared.d.ts.map +1 -1
  143. package/dist/commands/task/shared.js +15 -8
  144. package/dist/commands/task/show.command.d.ts +3 -7
  145. package/dist/commands/task/show.command.d.ts.map +1 -1
  146. package/dist/commands/task/show.command.js +2 -19
  147. package/dist/commands/task/show.run.d.ts +5 -0
  148. package/dist/commands/task/show.run.d.ts.map +1 -0
  149. package/dist/commands/task/show.run.js +11 -0
  150. package/dist/commands/task/show.spec.d.ts +6 -0
  151. package/dist/commands/task/show.spec.d.ts.map +1 -0
  152. package/dist/commands/task/show.spec.js +8 -0
  153. package/dist/commands/task/update.command.d.ts.map +1 -1
  154. package/dist/commands/task/update.command.js +1 -7
  155. package/dist/commands/upgrade.d.ts.map +1 -1
  156. package/dist/commands/upgrade.js +171 -32
  157. package/dist/commands/verify.command.d.ts +3 -15
  158. package/dist/commands/verify.command.d.ts.map +1 -1
  159. package/dist/commands/verify.command.js +2 -113
  160. package/dist/commands/verify.run.d.ts +5 -0
  161. package/dist/commands/verify.run.d.ts.map +1 -0
  162. package/dist/commands/verify.run.js +17 -0
  163. package/dist/commands/verify.spec.d.ts +14 -0
  164. package/dist/commands/verify.spec.d.ts.map +1 -0
  165. package/dist/commands/verify.spec.js +96 -0
  166. package/package.json +1 -1
package/README.md CHANGED
@@ -46,6 +46,15 @@ npx agentplane quickstart
46
46
  - Built-in agent definitions are copied into `.agentplane/agents/`.
47
47
  - Optional recipes can install additional agents when you run `agentplane recipes install ...`.
48
48
 
49
+ ## Upgrade review reports
50
+
51
+ After `agentplane upgrade` (auto or agent-assisted mode), a machine-readable review report is written under `.agentplane/.upgrade/`:
52
+
53
+ - Agent mode: `.agentplane/.upgrade/agent/<runId>/review.json`
54
+ - Auto mode: `.agentplane/.upgrade/last-review.json`
55
+
56
+ If any entry has `needsSemanticReview: true`, treat it as a signal to create an `UPGRADER` task to perform a semantic prompt merge.
57
+
49
58
  ## Guardrails and artifacts
50
59
 
51
60
  - Approval gates for plans and network access (configured in `.agentplane/config.json`).
@@ -87,6 +96,8 @@ npx agentplane --help
87
96
  ```bash
88
97
  agentplane --help
89
98
  agentplane quickstart
99
+ agentplane role ORCHESTRATOR
100
+ agentplane role UPGRADER
90
101
  agentplane config show
91
102
  agentplane task list
92
103
  agentplane task new --title "..." --description "..." --priority med --owner ORCHESTRATOR --tag docs
package/assets/AGENTS.md CHANGED
@@ -72,11 +72,13 @@ If unsure whether an action mutates state, treat it as mutating.
72
72
  - Never invent facts about repo state. Prefer inspection over guessing.
73
73
  - Never modify `.agentplane/tasks.json` manually. It is an **export-only snapshot** generated via `agentplane task export`.
74
74
  - Never expose raw internal chain-of-thought. Use structured artifacts instead (see OUTPUT CONTRACTS).
75
+ - Timestamps are recorded in task metadata fields (for example `plan_approval.updated_at` and `verification.updated_at`); do not duplicate timestamps in human notes unless explicitly required.
75
76
 
76
77
  ## Cleanliness & untracked files
77
78
 
78
79
  - Ignore pre-existing untracked files you did not create.
79
80
  - Only stage/commit files intentionally modified for the current task.
81
+ - Any tracked code changes must be recorded in a git commit before finishing the task (do not leave `packages/**` diffs uncommitted).
80
82
  - “Clean” means: **no tracked changes** (`git status --short --untracked-files=no` is empty).
81
83
  - If untracked files interfere with verify/guardrails or fall inside the task scope paths, surface them as a risk and request approval before acting.
82
84
 
@@ -105,6 +107,39 @@ Outside-repo includes (non-exhaustive):
105
107
  - modifying keychains, ssh keys, credential stores
106
108
  - any tool that mutates outside-repo state
107
109
 
110
+ ## Framework Upgrade / Prompt Merge
111
+
112
+ `agentplane upgrade` is responsible for mechanical upgrades and safe merges. When an upgrade run indicates a potential semantic conflict (for example, both local and incoming changes exist relative to a baseline, or a baseline is missing but files differ), treat the result as requiring a meaning-level review.
113
+
114
+ Trigger:
115
+
116
+ - After running `agentplane upgrade`, check the latest upgrade review report:
117
+ - Agent mode: `.agentplane/.upgrade/agent/<runId>/review.json`
118
+ - Auto mode: `.agentplane/.upgrade/last-review.json`
119
+ - If any record has `needsSemanticReview: true`, prompt merge is required.
120
+
121
+ Protocol:
122
+
123
+ 1. ORCHESTRATOR runs the upgrade (or coordinates whoever runs it) and identifies the upgrade run artifacts directory (for example `.agentplane/.upgrade/agent/<runId>/`).
124
+ 2. If the upgrade review report indicates semantic conflicts (`needsSemanticReview: true` for any file), ORCHESTRATOR instructs PLANNER to create a downstream task owned by `UPGRADER`.
125
+ 3. UPGRADER performs semantic reconciliation of `AGENTS.md` and `.agentplane/agents/*.json`:
126
+ - `AGENTS.md` remains the canonical policy source (highest priority).
127
+ - Preserve local customizations via the Local Overrides block (`<!-- AGENTPLANE:LOCAL-START/END -->`) where feasible.
128
+ - Minimize unrelated churn in agent JSON profiles; remove contradictions with `AGENTS.md`.
129
+
130
+ Task creation requirements (PLANNER):
131
+
132
+ - Owner: `UPGRADER`
133
+ - Description must include:
134
+ - the upgrade run directory path (for example `.agentplane/.upgrade/agent/<runId>/`)
135
+ - the list of `relPath` entries with `needsSemanticReview: true` from `review.json`
136
+
137
+ Done when:
138
+
139
+ - No contradictions remain between `AGENTS.md` and agent profiles.
140
+ - Local overrides are preserved (or explicitly removed with a documented decision).
141
+ - Relevant lint/tests pass.
142
+
108
143
  ---
109
144
 
110
145
  # NON-NEGOTIABLE PIPELINE
@@ -21,7 +21,6 @@
21
21
  "Confirm task context and readiness before editing; keep diffs minimal and task-scoped.",
22
22
  "Document edits with before/after snippets and cite the exact files touched.",
23
23
  "Run necessary commands (tests/linters/formatters) and summarize key output lines only.",
24
- "When writing verification notes (and any other approval/verification notes that include timestamps), use an ISO 8601 UTC timestamp with time, e.g. 2026-02-07T16:20:02.717Z; avoid date-only values like 2026-02-07.",
25
24
  "Prefer declared verify commands; record ad-hoc results via PR notes or request PLANNER to update verify lists.",
26
25
  "Coordinate handoffs to TESTER/REVIEWER/DOCS with task ID, changed files, and expected behavior.",
27
26
  "Avoid task closure in branch_pr; keep commits task-scoped and update status via agentplane."
@@ -21,7 +21,6 @@
21
21
  "Operate from the repo root on the pinned base branch; run pr check -> integrate -> finish via agentplane.",
22
22
  "Use configured base branch and task branch prefix when referencing branches; check config if uncertain.",
23
23
  "Ensure verify commands are run/recorded; update PR artifacts and task README as needed.",
24
- "When writing verification notes (and any other approval/verification notes that include timestamps), use an ISO 8601 UTC timestamp with time, e.g. 2026-02-07T16:20:02.717Z; avoid date-only values like 2026-02-07.",
25
24
  "When closing multiple tasks, use batch finish so the same commit metadata and verification note apply.",
26
25
  "Check `closure_commit_requires_approval` in .agentplane/config.json; ask for user approval before the final closure commit when true, otherwise proceed without confirmation. Optionally clean task branches/worktrees after closure."
27
26
  ]
@@ -15,7 +15,6 @@
15
15
  "workflow": [
16
16
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
17
17
  "Before planning or execution, load .agentplane/config.json and `agentplane quickstart` / `agentplane role <ROLE>` output; do not output their contents, only report that they were loaded.",
18
- "When writing plan approval notes (and any other approval/verification notes), use an ISO 8601 UTC timestamp with time, e.g. 2026-02-07T16:20:02.717Z; avoid date-only values like 2026-02-07.",
19
18
  "Use `agentplane config show|set` for config changes (workflow_mode, branch/task settings); avoid manual edits.",
20
19
  "Convert the first user message into a top-level plan; do not create tasks until the user approves it.",
21
20
  "Restate the user goal and constraints, then draft a numbered top-level plan with agent assignments and expected outcomes.",
@@ -24,7 +23,7 @@
24
23
  "If the user explicitly requests agent optimization, invoke UPDATER and pause until its analysis is complete.",
25
24
  "Await plan approval before executing steps, then proceed autonomously unless new scope, risks, or constraints require another check-in.",
26
25
  "After plan approval, if recipes are in scope, request confirmation to refresh the recipe index via `agentplane recipes list-remote --refresh`, then use `agentplane recipes list` / `agentplane recipes explain <id>` to select recipes. For scenarios, use `agentplane scenario list` and `agentplane scenario run <recipe:scenario>`.",
27
- "After approval, create a top-level tracking task via agentplane unless the user explicitly opts out; include at least one tag and create any additional tasks from the approved decomposition.",
26
+ "After approval, create exactly one top-level tracking task via agentplane unless the user explicitly opts out; do not create downstream tasks (PLANNER owns downstream task creation).",
28
27
  "Execute step by step and summarize task IDs plus commit hashes after each major step.",
29
28
  "If the user opts out of task creation, track progress against the approved plan in replies.",
30
29
  "Before any final task-closing commit, check `closure_commit_requires_approval` in .agentplane/config.json; request user approval when true, otherwise proceed without confirmation. Finalize with a concise summary and next steps."
@@ -8,7 +8,6 @@
8
8
  ],
9
9
  "outputs": [
10
10
  "Updated tasks in the canonical backend reflecting priorities and statuses.",
11
- "A single top-level task per user request when the user approves task creation (unless they opt out).",
12
11
  "A clear backlog view so humans can review current state quickly.",
13
12
  "Structured reply listing every touched task ID, its new status, and rationale."
14
13
  ],
@@ -18,8 +17,7 @@
18
17
  "workflow": [
19
18
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
20
19
  "Review the backlog before changes to avoid duplicates or conflicts.",
21
- "When writing plan approval notes, use an ISO 8601 UTC timestamp with time, e.g. 2026-02-07T16:20:02.717Z; avoid date-only values like 2026-02-07.",
22
- "For each top-level user request, after the user approves task creation, create exactly one top-level task via agentplane unless the user explicitly opts out; reference plan items or downstream task IDs in its description or comments.",
20
+ "After overall plan approval, create downstream tasks for the approved decomposition (top-level tracking task creation is owned by ORCHESTRATOR).",
23
21
  "Decompose goals into atomic tasks with a single owner; set depends_on explicitly (use [] for none).",
24
22
  "Assign each task to an existing agent ID or schedule CREATOR if no suitable agent exists.",
25
23
  "Create new tasks via task new (reserve task add for pre-existing IDs); include at least one tag and keep tags minimal.",
@@ -22,7 +22,6 @@
22
22
  "Add the smallest set of high-value tests (happy path + edge/regression).",
23
23
  "Keep tests deterministic and fast; avoid network calls and time-based flakiness.",
24
24
  "Run targeted tests first and summarize only the key output lines.",
25
- "When writing verification notes (and any other approval/verification notes that include timestamps), use an ISO 8601 UTC timestamp with time, e.g. 2026-02-07T16:20:02.717Z; avoid date-only values like 2026-02-07.",
26
25
  "If test infrastructure is missing, document the blocker and request a PLANNER task."
27
26
  ]
28
27
  }
@@ -1,27 +1,29 @@
1
1
  {
2
2
  "id": "UPGRADER",
3
- "role": "Keep the Agent Plane framework fresh by syncing with the upstream release.",
4
- "description": "Monitors the recorded framework update timestamp, triggers an upgrade when the cache is stale (10+ days) or on explicit demand, and ensures the config metadata reflects the refresh.",
3
+ "role": "Resolve semantic conflicts after `agentplane upgrade` (prompt/policy merge).",
4
+ "description": "Performs meaning-level reconciliation when `agentplane upgrade` completed a mechanical merge but there is risk of semantic conflict between local prompt/policy edits and upstream framework changes.",
5
5
  "inputs": [
6
- "The owning task id that documents when to run the upgrade.",
7
- "The `framework` section of `.agentplane/config.json`, especially `last_update` and `source`.",
8
- "Any upstream release context (e.g., user request, automation schedule, or linked task note)."
6
+ "An upgrade run directory (typically `.agentplane/.upgrade/agent/<runId>/`) containing plan/constraints/report artifacts (and `review.json` when available).",
7
+ "The list of files flagged for semantic review by the upgrade report (or a manually provided list of changed prompt/policy files).",
8
+ "The current workspace versions of `AGENTS.md` and `.agentplane/agents/*.json` (and the packaged defaults under `packages/agentplane/assets/`)."
9
9
  ],
10
10
  "outputs": [
11
- "An updated `.agentplane/config.json` capturing the new `framework.last_update` (ISO 8601 date).",
12
- "A short report describing whether the upgrade ran because of staleness or a forced request.",
13
- "Logs/PR notes referencing `agentplane upgrade` runs and git fetch/pull results."
11
+ "A reconciled `AGENTS.md` and `.agentplane/agents/*.json` with no contradictions against the canonical policy priority order.",
12
+ "A short semantic-merge report listing the conflicts found, decisions made, and where any local customizations were preserved.",
13
+ "A commit (direct mode) or PR note/patch (branch_pr) referencing the upgrade run directory used as input."
14
14
  ],
15
15
  "permissions": [
16
- "Project files: read/write access to `.agentplane/config.json` plus any git-controlled files touched by the upgrade.",
17
- "Git: inspect status, run fetch/pull, and record results via agentplane commands.",
18
- "Terminal: execute `agentplane upgrade` and related helper commands."
16
+ "Project files: read/write access to `AGENTS.md` and `.agentplane/agents/*.json` plus the packaged assets under `packages/agentplane/assets/`.",
17
+ "Git: inspect status and create commits via `agentplane commit` (or PR artifacts in branch_pr).",
18
+ "Terminal: run local tests/lint for changed areas and summarize evidence."
19
19
  ],
20
20
  "workflow": [
21
21
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
22
- "Check the `framework.last_update` date from `.agentplane/config.json`; compare it to UTC today and detect when 10+ days have passed.",
23
- "Invoke `agentplane upgrade --force` when a user explicitly requests an update, or rely on the stale-date logic otherwise.",
24
- "Require a clean working tree and run the upgrade from the pinned base branch (or current branch when unpinned in branch_pr).",
25
- "After a successful upgrade, update `framework.last_update` to `datetime.now(UTC).date()` and document the run in the owning task/pr artifacts."
22
+ "Treat `AGENTS.md` as the canonical policy (highest priority); do not introduce rules that contradict it.",
23
+ "Load the upgrade run artifacts (runDir) and extract the list of files that need semantic review.",
24
+ "Reconcile `AGENTS.md` changes by preserving local customizations inside the Local Overrides block (`<!-- AGENTPLANE:LOCAL-START/END -->`) where feasible.",
25
+ "Reconcile `.agentplane/agents/*.json` by removing contradictions with `AGENTS.md` and minimizing unrelated churn; keep non-conflicting local improvements.",
26
+ "Run local checks appropriate for the touched surfaces (lint and relevant tests) and record evidence in the task verification log.",
27
+ "Produce a concise report: conflicts, decisions, and resulting file list; reference the runDir for traceability."
26
28
  ]
27
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/cli/archive.ts"],"names":[],"mappings":"AAWA,KAAK,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AAOjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAU9B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAKtE;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBhB;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CA2BjG"}
1
+ {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/cli/archive.ts"],"names":[],"mappings":"AAaA,KAAK,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AAOjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAS9B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAKtE;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBhB;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CA2BjG"}
@@ -1,6 +1,8 @@
1
1
  import { execFile } from "node:child_process";
2
+ import { readFile } from "node:fs/promises";
2
3
  import { promisify } from "node:util";
3
4
  import path from "node:path";
5
+ import { gunzipSync } from "node:zlib";
4
6
  import yauzl from "yauzl";
5
7
  import { CliError } from "../shared/errors.js";
6
8
  import { exitCodeForError } from "./exit-codes.js";
@@ -12,8 +14,7 @@ export async function validateArchive(archivePath, type) {
12
14
  const symlinks = entries.filter((entry) => entry.isSymlink).map((entry) => entry.name);
13
15
  return validateArchiveEntries(entryNames, symlinks);
14
16
  }
15
- const entries = await listArchiveEntries(archivePath, type);
16
- const symlinks = await listArchiveSymlinks(archivePath, type);
17
+ const { entries, symlinks } = await listTarGzEntries(archivePath);
17
18
  return validateArchiveEntries(entries, symlinks);
18
19
  }
19
20
  export function detectArchiveType(filePath) {
@@ -77,42 +78,66 @@ export function validateArchiveEntries(entries, symlinks) {
77
78
  }
78
79
  return issues;
79
80
  }
80
- async function listArchiveEntries(archivePath, type) {
81
- if (type === "tar") {
82
- const { stdout } = await execFileAsync("tar", ["-tzf", archivePath]);
83
- return stdout
84
- .split("\n")
85
- .map((line) => line.trim())
86
- .filter((line) => line.length > 0);
87
- }
88
- const { stdout } = await execFileAsync("unzip", ["-Z1", archivePath]);
89
- return stdout
90
- .split("\n")
91
- .map((line) => line.trim())
92
- .filter((line) => line.length > 0);
81
+ function parseTarOctal(field) {
82
+ const text = field.toString("utf8").replace(/\0.*$/u, "").trim();
83
+ if (!text)
84
+ return 0;
85
+ const n = Number.parseInt(text, 8);
86
+ return Number.isFinite(n) && n >= 0 ? n : 0;
87
+ }
88
+ function isAllZeroBlock(block) {
89
+ for (const b of block)
90
+ if (b !== 0)
91
+ return false;
92
+ return true;
93
93
  }
94
- async function listArchiveSymlinks(archivePath, type) {
95
- if (type === "tar") {
96
- const { stdout } = await execFileAsync("tar", ["-tvzf", archivePath]);
97
- return stdout
98
- .split("\n")
99
- .map((line) => line.trim())
100
- .filter((line) => line.startsWith("l"))
101
- .map((line) => {
102
- const arrowIndex = line.indexOf(" -> ");
103
- const left = arrowIndex === -1 ? line : line.slice(0, arrowIndex);
104
- const tokens = left.trim().split(/\s+/);
105
- return tokens.at(-1) ?? "";
106
- })
107
- .filter((entry) => entry.length > 0);
94
+ async function listTarGzEntries(archivePath) {
95
+ let gz;
96
+ try {
97
+ gz = await readFile(archivePath);
98
+ }
99
+ catch (err) {
100
+ const e = err;
101
+ throw new CliError({
102
+ exitCode: exitCodeForError("E_IO"),
103
+ code: "E_IO",
104
+ message: `Failed to read archive: ${archivePath}${e?.message ? `\n${e.message}` : ""}`,
105
+ });
106
+ }
107
+ let tar;
108
+ try {
109
+ tar = gunzipSync(gz);
110
+ }
111
+ catch (err) {
112
+ const e = err;
113
+ throw new CliError({
114
+ exitCode: exitCodeForError("E_IO"),
115
+ code: "E_IO",
116
+ message: `Failed to gunzip tar archive: ${archivePath}` + (e?.message ? `\n${e.message}` : ""),
117
+ });
118
+ }
119
+ const entries = [];
120
+ const symlinks = [];
121
+ let offset = 0;
122
+ while (offset + 512 <= tar.length) {
123
+ const header = tar.subarray(offset, offset + 512);
124
+ offset += 512;
125
+ if (isAllZeroBlock(header))
126
+ break;
127
+ const nameRaw = header.subarray(0, 100).toString("utf8").replace(/\0.*$/u, "");
128
+ const prefixRaw = header.subarray(345, 500).toString("utf8").replace(/\0.*$/u, "");
129
+ const name = prefixRaw ? `${prefixRaw}/${nameRaw}` : nameRaw;
130
+ const size = parseTarOctal(header.subarray(124, 136));
131
+ const typeflag = header.subarray(156, 157).toString("utf8");
132
+ if (name) {
133
+ entries.push(name);
134
+ if (typeflag === "2")
135
+ symlinks.push(name);
136
+ }
137
+ const blocks = Math.ceil(size / 512);
138
+ offset += blocks * 512;
108
139
  }
109
- const { stdout } = await execFileAsync("unzip", ["-Z", "-v", archivePath]);
110
- return stdout
111
- .split("\n")
112
- .map((line) => line.trim())
113
- .filter((line) => /\bsymlink\b/i.test(line) || /\blrwx/.test(line))
114
- .map((line) => line.split(/\s+/).at(-1) ?? "")
115
- .filter((entry) => entry.length > 0);
140
+ return { entries, symlinks };
116
141
  }
117
142
  function listZipEntries(archivePath) {
118
143
  return new Promise((resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"command-guide.d.ts","sourceRoot":"","sources":["../../src/cli/command-guide.ts"],"names":[],"mappings":"AA+LA,wBAAgB,SAAS,IAAI,MAAM,EAAE,CAEpC;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOzD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CA2EzC"}
1
+ {"version":3,"file":"command-guide.d.ts","sourceRoot":"","sources":["../../src/cli/command-guide.ts"],"names":[],"mappings":"AA+LA,wBAAgB,SAAS,IAAI,MAAM,EAAE,CAEpC;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOzD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CA6EzC"}
@@ -69,7 +69,7 @@ const ROLE_GUIDES = [
69
69
  role: "ORCHESTRATOR",
70
70
  lines: [
71
71
  "- Plan intake: `agentplane task list` / `agentplane task show <task-id>`",
72
- '- After plan approval (unless the user opts out): `agentplane task new --title "..." --description "..." --priority med --owner ORCHESTRATOR --depends-on "[]" --tag <tag>`',
72
+ '- After plan approval (unless the user opts out): create exactly one tracking task: `agentplane task new --title "..." --description "..." --priority med --owner ORCHESTRATOR --depends-on "[]" --tag <tag>`',
73
73
  "- Optional scaffold: `agentplane task scaffold <task-id>`",
74
74
  "- Two-stage verification: `## Verify Steps` is the ex-ante contract; `agentplane verify ...` appends an ex-post entry into `## Verification`.",
75
75
  ],
@@ -187,9 +187,11 @@ export function renderQuickstart() {
187
187
  return [
188
188
  "# agentplane quickstart",
189
189
  "",
190
- "agentplane CLI is the source of truth for task, PR, verify, and commit commands.",
190
+ "AGENTS.md is the source of truth for the workflow/process policy; quickstart and role output are the source of truth for CLI syntax and artifacts.",
191
191
  "Do not edit `.agentplane/tasks.json` by hand.",
192
192
  "",
193
+ "- See AGENTS.md for the canonical workflow policy and approval gates.",
194
+ "",
193
195
  "## Project setup",
194
196
  "",
195
197
  "- `agentplane init` (bootstrap `.agentplane/`)",
@@ -242,7 +244,7 @@ export function renderQuickstart() {
242
244
  "## Global flags",
243
245
  "",
244
246
  "- `--root <path>`: treat <path> as project root",
245
- "- `--json`: emit JSON-formatted errors",
247
+ "- `--json-errors`: emit JSON-formatted errors",
246
248
  "- `--help` / `-h`: show help",
247
249
  "- `--version`: show version",
248
250
  "- `--no-update-check`: skip checking npm for a newer CLI version",
@@ -1,8 +1,11 @@
1
1
  import type { CommandHandler, CommandSpec } from "../spec/spec.js";
2
2
  import type { HelpJson } from "../spec/help-render.js";
3
3
  import type { CommandContext } from "../../commands/shared/task-backend.js";
4
+ import type { LoadedConfig, ResolvedProject } from "@agentplaneorg/core";
4
5
  export type RunDeps = {
5
6
  getCtx: (commandForErrorContext: string) => Promise<CommandContext>;
7
+ getResolvedProject: (commandForErrorContext: string) => Promise<ResolvedProject>;
8
+ getLoadedConfig: (commandForErrorContext: string) => Promise<LoadedConfig>;
6
9
  getHelpJsonForDocs: () => readonly HelpJson[];
7
10
  };
8
11
  export type CommandEntry = {
@@ -12,5 +15,5 @@ export type CommandEntry = {
12
15
  needsConfig: boolean;
13
16
  needsTaskContext: boolean;
14
17
  };
15
- export declare const COMMANDS: readonly [CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry];
18
+ export declare const COMMANDS: readonly [CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry, CommandEntry];
16
19
  //# sourceMappingURL=command-catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../../src/cli/run-cli/command-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA8FvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,CAAC,sBAAsB,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACpE,kBAAkB,EAAE,MAAM,SAAS,QAAQ,EAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAA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AC;CAC3B,CAAC;AAgBF,eAAO,MAAM,QAAQ,yuCAuYuB,CAAC"}
@@ -3,10 +3,10 @@ import { agentsSpec, quickstartSpec, roleSpec } from "./commands/core.js";
3
3
  import { configSetSpec, configShowSpec, modeGetSpec, modeSetSpec } from "./commands/config.js";
4
4
  import { ideSyncSpec } from "./commands/ide.js";
5
5
  import { taskNewSpec } from "../../commands/task/new.spec.js";
6
- import { taskListSpec } from "../../commands/task/list.command.js";
7
- import { taskNextSpec } from "../../commands/task/next.command.js";
8
- import { taskSearchSpec } from "../../commands/task/search.command.js";
9
- import { taskShowSpec } from "../../commands/task/show.command.js";
6
+ import { taskListSpec } from "../../commands/task/list.spec.js";
7
+ import { taskNextSpec } from "../../commands/task/next.spec.js";
8
+ import { taskSearchSpec } from "../../commands/task/search.spec.js";
9
+ import { taskShowSpec } from "../../commands/task/show.spec.js";
10
10
  import { taskAddSpec } from "../../commands/task/add.command.js";
11
11
  import { taskUpdateSpec } from "../../commands/task/update.command.js";
12
12
  import { taskCommentSpec } from "../../commands/task/comment.command.js";
@@ -34,7 +34,7 @@ import { workStartSpec } from "../../commands/branch/work-start.command.js";
34
34
  import { branchBaseClearSpec, branchBaseExplainSpec, branchBaseGetSpec, branchBaseSetSpec, branchBaseSpec, } from "../../commands/branch/base.command.js";
35
35
  import { branchStatusSpec } from "../../commands/branch/status.command.js";
36
36
  import { branchRemoveSpec } from "../../commands/branch/remove.command.js";
37
- import { recipesInstallSpec } from "../../commands/recipes/install.command.js";
37
+ import { recipesInstallSpec } from "../../commands/recipes/install.spec.js";
38
38
  import { recipesListSpec } from "../../commands/recipes/list.command.js";
39
39
  import { recipesListRemoteSpec } from "../../commands/recipes/list-remote.command.js";
40
40
  import { recipesInfoSpec } from "../../commands/recipes/info.command.js";
@@ -53,12 +53,12 @@ import { scenarioSpec } from "../../commands/scenario/scenario.command.js";
53
53
  import { prCheckSpec, prNoteSpec, prOpenSpec, prSpec, prUpdateSpec, } from "../../commands/pr/pr.command.js";
54
54
  import { integrateSpec } from "../../commands/integrate.command.js";
55
55
  import { commitSpec } from "../../commands/commit.spec.js";
56
- import { startSpec } from "../../commands/start.command.js";
57
- import { blockSpec } from "../../commands/block.command.js";
58
- import { verifySpec } from "../../commands/verify.command.js";
59
- import { finishSpec } from "../../commands/finish.command.js";
56
+ import { startSpec } from "../../commands/start.spec.js";
57
+ import { blockSpec } from "../../commands/block.spec.js";
58
+ import { verifySpec } from "../../commands/verify.spec.js";
59
+ import { finishSpec } from "../../commands/finish.spec.js";
60
60
  import { readySpec } from "../../commands/ready.command.js";
61
- import { doctorSpec } from "../../commands/doctor.command.js";
61
+ import { doctorSpec } from "../../commands/doctor.spec.js";
62
62
  import { docsCliSpec } from "../../commands/docs/cli.command.js";
63
63
  import { hooksSpec } from "../../commands/hooks/hooks.command.js";
64
64
  import { hooksInstallSpec } from "../../commands/hooks/install.command.js";
@@ -69,6 +69,9 @@ import { guardSpec } from "../../commands/guard/guard.command.js";
69
69
  import { guardCleanSpec } from "../../commands/guard/clean.command.js";
70
70
  import { guardSuggestAllowSpec } from "../../commands/guard/suggest-allow.command.js";
71
71
  import { guardCommitSpec } from "../../commands/guard/commit.command.js";
72
+ import { releaseSpec } from "../../commands/release/release.command.js";
73
+ import { releasePlanSpec } from "../../commands/release/plan.command.js";
74
+ import { releaseApplySpec } from "../../commands/release/apply.command.js";
72
75
  function entry(spec, load, meta) {
73
76
  return {
74
77
  spec: spec,
@@ -89,6 +92,21 @@ export const COMMANDS = [
89
92
  needsConfig: false,
90
93
  needsTaskContext: false,
91
94
  }),
95
+ entry(releaseSpec, () => import("../../commands/release/release.command.js").then((m) => m.runRelease), {
96
+ needsProject: false,
97
+ needsConfig: false,
98
+ needsTaskContext: false,
99
+ }),
100
+ entry(releasePlanSpec, () => import("../../commands/release/plan.command.js").then((m) => m.runReleasePlan), {
101
+ needsProject: true,
102
+ needsConfig: false,
103
+ needsTaskContext: false,
104
+ }),
105
+ entry(releaseApplySpec, () => import("../../commands/release/apply.command.js").then((m) => m.runReleaseApply), {
106
+ needsProject: true,
107
+ needsConfig: false,
108
+ needsTaskContext: false,
109
+ }),
92
110
  entry(quickstartSpec, () => import("./commands/core.js").then((m) => m.runQuickstart), {
93
111
  needsProject: false,
94
112
  needsConfig: false,
@@ -99,45 +117,45 @@ export const COMMANDS = [
99
117
  needsConfig: false,
100
118
  needsTaskContext: false,
101
119
  }),
102
- entry(agentsSpec, () => import("./commands/core.js").then((m) => m.runAgents), {
120
+ entry(agentsSpec, (deps) => import("./commands/core.js").then((m) => m.makeRunAgentsHandler(deps)), {
103
121
  needsProject: true,
104
122
  needsConfig: false,
105
123
  needsTaskContext: false,
106
124
  }),
107
- entry(configShowSpec, () => import("./commands/config.js").then((m) => m.runConfigShow), {
125
+ entry(configShowSpec, (deps) => import("./commands/config.js").then((m) => m.makeRunConfigShowHandler(deps)), {
108
126
  needsProject: true,
109
127
  needsConfig: true,
110
128
  needsTaskContext: false,
111
129
  }),
112
- entry(configSetSpec, () => import("./commands/config.js").then((m) => m.runConfigSet), {
130
+ entry(configSetSpec, (deps) => import("./commands/config.js").then((m) => m.makeRunConfigSetHandler(deps)), {
113
131
  needsProject: true,
114
132
  needsConfig: true,
115
133
  needsTaskContext: false,
116
134
  }),
117
- entry(modeGetSpec, () => import("./commands/config.js").then((m) => m.runModeGet), {
135
+ entry(modeGetSpec, (deps) => import("./commands/config.js").then((m) => m.makeRunModeGetHandler(deps)), {
118
136
  needsProject: true,
119
137
  needsConfig: true,
120
138
  needsTaskContext: false,
121
139
  }),
122
- entry(modeSetSpec, () => import("./commands/config.js").then((m) => m.runModeSet), {
140
+ entry(modeSetSpec, (deps) => import("./commands/config.js").then((m) => m.makeRunModeSetHandler(deps)), {
123
141
  needsProject: true,
124
142
  needsConfig: true,
125
143
  needsTaskContext: false,
126
144
  }),
127
- entry(ideSyncSpec, () => import("./commands/ide.js").then((m) => m.runIdeSync), {
145
+ entry(ideSyncSpec, (deps) => import("./commands/ide.js").then((m) => m.makeRunIdeSyncHandler(deps)), {
128
146
  needsProject: true,
129
147
  needsConfig: true,
130
148
  needsTaskContext: false,
131
149
  }),
132
- entry(doctorSpec, () => import("../../commands/doctor.command.js").then((m) => m.runDoctor), {
150
+ entry(doctorSpec, () => import("../../commands/doctor.run.js").then((m) => m.runDoctor), {
133
151
  needsProject: true,
134
152
  needsConfig: false,
135
153
  needsTaskContext: false,
136
154
  }),
137
- entry(taskListSpec, (deps) => import("../../commands/task/list.command.js").then((m) => m.makeRunTaskListHandler(deps.getCtx))),
138
- entry(taskNextSpec, (deps) => import("../../commands/task/next.command.js").then((m) => m.makeRunTaskNextHandler(deps.getCtx))),
139
- entry(taskSearchSpec, (deps) => import("../../commands/task/search.command.js").then((m) => m.makeRunTaskSearchHandler(deps.getCtx))),
140
- entry(taskShowSpec, (deps) => import("../../commands/task/show.command.js").then((m) => m.makeRunTaskShowHandler(deps.getCtx))),
155
+ entry(taskListSpec, (deps) => import("../../commands/task/list.run.js").then((m) => m.makeRunTaskListHandler(deps.getCtx))),
156
+ entry(taskNextSpec, (deps) => import("../../commands/task/next.run.js").then((m) => m.makeRunTaskNextHandler(deps.getCtx))),
157
+ entry(taskSearchSpec, (deps) => import("../../commands/task/search.run.js").then((m) => m.makeRunTaskSearchHandler(deps.getCtx))),
158
+ entry(taskShowSpec, (deps) => import("../../commands/task/show.run.js").then((m) => m.makeRunTaskShowHandler(deps.getCtx))),
141
159
  entry(taskNewSpec, (deps) => import("../../commands/task/new.command.js").then((m) => m.makeRunTaskNewHandler(deps.getCtx))),
142
160
  entry(taskDeriveSpec, (deps) => import("../../commands/task/derive.command.js").then((m) => m.makeRunTaskDeriveHandler(deps.getCtx))),
143
161
  entry(taskAddSpec, (deps) => import("../../commands/task/add.command.js").then((m) => m.makeRunTaskAddHandler(deps.getCtx))),
@@ -171,7 +189,7 @@ export const COMMANDS = [
171
189
  entry(recipesExplainSpec, () => import("../../commands/recipes/explain.command.js").then((m) => m.runRecipesExplain)),
172
190
  entry(recipesRemoveSpec, () => import("../../commands/recipes/remove.command.js").then((m) => m.runRecipesRemove)),
173
191
  entry(recipesCachePruneSpec, () => import("../../commands/recipes/cache-prune.command.js").then((m) => m.runRecipesCachePrune)),
174
- entry(recipesInstallSpec, () => import("../../commands/recipes/install.command.js").then((m) => m.runRecipesInstall)),
192
+ entry(recipesInstallSpec, () => import("../../commands/recipes/install.run.js").then((m) => m.runRecipesInstall)),
175
193
  entry(scenarioSpec, () => import("../../commands/scenario/scenario.command.js").then((m) => m.runScenario)),
176
194
  entry(scenarioListSpec, () => import("../../commands/scenario/list.command.js").then((m) => m.runScenarioList)),
177
195
  entry(scenarioInfoSpec, () => import("../../commands/scenario/info.command.js").then((m) => m.runScenarioInfo)),
@@ -193,10 +211,10 @@ export const COMMANDS = [
193
211
  entry(prNoteSpec, (deps) => import("../../commands/pr/pr.command.js").then((m) => m.makeRunPrNoteHandler(deps.getCtx))),
194
212
  entry(integrateSpec, (deps) => import("../../commands/integrate.command.js").then((m) => m.makeRunIntegrateHandler(deps.getCtx))),
195
213
  entry(commitSpec, (deps) => import("../../commands/commit.command.js").then((m) => m.makeRunCommitHandler(deps.getCtx))),
196
- entry(startSpec, (deps) => import("../../commands/start.command.js").then((m) => m.makeRunStartHandler(deps.getCtx))),
197
- entry(blockSpec, (deps) => import("../../commands/block.command.js").then((m) => m.makeRunBlockHandler(deps.getCtx))),
198
- entry(verifySpec, (deps) => import("../../commands/verify.command.js").then((m) => m.makeRunVerifyHandler(deps.getCtx))),
199
- entry(finishSpec, (deps) => import("../../commands/finish.command.js").then((m) => m.makeRunFinishHandler(deps.getCtx))),
214
+ entry(startSpec, (deps) => import("../../commands/start.run.js").then((m) => m.makeRunStartHandler(deps.getCtx))),
215
+ entry(blockSpec, (deps) => import("../../commands/block.run.js").then((m) => m.makeRunBlockHandler(deps.getCtx))),
216
+ entry(verifySpec, (deps) => import("../../commands/verify.run.js").then((m) => m.makeRunVerifyHandler(deps.getCtx))),
217
+ entry(finishSpec, (deps) => import("../../commands/finish.run.js").then((m) => m.makeRunFinishHandler(deps.getCtx))),
200
218
  entry(readySpec, (deps) => import("../../commands/ready.command.js").then((m) => m.makeRunReadyHandler(deps.getCtx))),
201
219
  entry(docsCliSpec, (deps) => import("../../commands/docs/cli.command.js").then((m) => m.makeRunDocsCliHandler(deps.getHelpJsonForDocs))),
202
220
  entry(hooksSpec, () => import("../../commands/hooks/hooks.command.js").then((m) => m.runHooks)),
@@ -1,20 +1,21 @@
1
1
  import type { CommandHandler, CommandSpec } from "../../spec/spec.js";
2
+ import type { RunDeps } from "../command-catalog.js";
2
3
  type ConfigShowParsed = Record<string, never>;
3
4
  export declare const configShowSpec: CommandSpec<ConfigShowParsed>;
4
- export declare const runConfigShow: CommandHandler<ConfigShowParsed>;
5
+ export declare function makeRunConfigShowHandler(deps: RunDeps): CommandHandler<ConfigShowParsed>;
5
6
  type ConfigSetParsed = {
6
7
  key: string;
7
8
  value: string;
8
9
  };
9
10
  export declare const configSetSpec: CommandSpec<ConfigSetParsed>;
10
- export declare const runConfigSet: CommandHandler<ConfigSetParsed>;
11
+ export declare function makeRunConfigSetHandler(deps: RunDeps): CommandHandler<ConfigSetParsed>;
11
12
  type ModeGetParsed = Record<string, never>;
12
13
  export declare const modeGetSpec: CommandSpec<ModeGetParsed>;
13
- export declare const runModeGet: CommandHandler<ModeGetParsed>;
14
+ export declare function makeRunModeGetHandler(deps: RunDeps): CommandHandler<ModeGetParsed>;
14
15
  type ModeSetParsed = {
15
16
  mode: string;
16
17
  };
17
18
  export declare const modeSetSpec: CommandSpec<ModeSetParsed>;
18
- export declare const runModeSet: CommandHandler<ModeSetParsed>;
19
+ export declare function makeRunModeSetHandler(deps: RunDeps): CommandHandler<ModeSetParsed>;
19
20
  export {};
20
21
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/cli/run-cli/commands/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,c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