agentplane 0.3.11 → 0.3.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 (259) hide show
  1. package/assets/AGENTS.md +2 -2
  2. package/assets/RUNNER.md +1 -1
  3. package/assets/agents/CODER.json +4 -0
  4. package/assets/agents/CREATOR.json +1 -0
  5. package/assets/agents/DOCS.json +2 -1
  6. package/assets/agents/INTEGRATOR.json +2 -1
  7. package/assets/agents/ORCHESTRATOR.json +3 -1
  8. package/assets/agents/PLANNER.json +3 -1
  9. package/assets/agents/REVIEWER.json +1 -0
  10. package/assets/agents/TESTER.json +2 -2
  11. package/assets/agents/UPDATER.json +1 -0
  12. package/assets/agents/UPGRADER.json +1 -1
  13. package/assets/codex-plugin/assets/header.png +0 -0
  14. package/assets/codex-plugin/assets/icon.svg +1 -0
  15. package/assets/codex-plugin/assets/logo.svg +1 -0
  16. package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
  17. package/assets/policy/governance.md +4 -2
  18. package/assets/policy/incidents.md +3 -19
  19. package/assets/policy/workflow.release.md +5 -2
  20. package/bin/agentplane.js +58 -3
  21. package/bin/stale-dist-policy.js +6 -1
  22. package/dist/.build-manifest.json +271 -161
  23. package/dist/cli/exit-codes.d.ts.map +1 -1
  24. package/dist/cli/exit-codes.js +1 -0
  25. package/dist/cli/reason-codes.d.ts +1 -1
  26. package/dist/cli/reason-codes.d.ts.map +1 -1
  27. package/dist/cli/reason-codes.js +12 -0
  28. package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
  29. package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
  30. package/dist/cli/run-cli/command-catalog/core.js +22 -1
  31. package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
  32. package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
  33. package/dist/cli/run-cli/command-catalog/project.js +21 -3
  34. package/dist/cli/run-cli/command-catalog.d.ts +1 -1
  35. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  36. package/dist/cli/run-cli/commands/codex.d.ts +14 -0
  37. package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
  38. package/dist/cli/run-cli/commands/codex.js +100 -0
  39. package/dist/cli/run-cli/commands/core.d.ts +1 -0
  40. package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
  41. package/dist/cli/run-cli/commands/core.js +1 -0
  42. package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
  43. package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
  44. package/dist/cli/run-cli/commands/init/recipes.js +32 -22
  45. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  46. package/dist/cli/run-cli/commands/init.js +26 -21
  47. package/dist/cli/run-cli/error-guidance.js +20 -0
  48. package/dist/cli/run-cli.test-helpers.d.ts +1 -0
  49. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  50. package/dist/cli/run-cli.test-helpers.js +36 -19
  51. package/dist/commands/branch/cleanup-merged.d.ts +1 -0
  52. package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
  53. package/dist/commands/branch/cleanup-merged.js +18 -9
  54. package/dist/commands/branch/work-start.d.ts.map +1 -1
  55. package/dist/commands/branch/work-start.js +82 -5
  56. package/dist/commands/codex/plugin-install.d.ts +26 -0
  57. package/dist/commands/codex/plugin-install.d.ts.map +1 -0
  58. package/dist/commands/codex/plugin-install.js +209 -0
  59. package/dist/commands/doctor/branch-pr.js +2 -2
  60. package/dist/commands/guard/impl/commands.d.ts +1 -0
  61. package/dist/commands/guard/impl/commands.d.ts.map +1 -1
  62. package/dist/commands/guard/impl/commands.js +78 -8
  63. package/dist/commands/hooks/index.d.ts +1 -1
  64. package/dist/commands/hooks/index.d.ts.map +1 -1
  65. package/dist/commands/hooks/index.js +48 -12
  66. package/dist/commands/pr/check.d.ts.map +1 -1
  67. package/dist/commands/pr/check.js +3 -0
  68. package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
  69. package/dist/commands/pr/integrate/cmd.js +103 -2
  70. package/dist/commands/pr/integrate/internal/cleanup.d.ts +1 -11
  71. package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -1
  72. package/dist/commands/pr/integrate/internal/cleanup.js +1 -46
  73. package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
  74. package/dist/commands/pr/integrate/internal/finalize.js +3 -0
  75. package/dist/commands/pr/integrate/internal/github-protection.d.ts +5 -0
  76. package/dist/commands/pr/integrate/internal/github-protection.d.ts.map +1 -0
  77. package/dist/commands/pr/integrate/internal/github-protection.js +13 -0
  78. package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts +15 -0
  79. package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts.map +1 -0
  80. package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.js +35 -0
  81. package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
  82. package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
  83. package/dist/commands/pr/integrate/internal/prepare.js +46 -7
  84. package/dist/commands/pr/internal/auto-commit.d.ts +7 -0
  85. package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -0
  86. package/dist/commands/pr/internal/auto-commit.js +69 -0
  87. package/dist/commands/pr/internal/freshness.d.ts +1 -0
  88. package/dist/commands/pr/internal/freshness.d.ts.map +1 -1
  89. package/dist/commands/pr/internal/freshness.js +2 -0
  90. package/dist/commands/pr/internal/sync.d.ts.map +1 -1
  91. package/dist/commands/pr/internal/sync.js +98 -27
  92. package/dist/commands/pr/open.d.ts.map +1 -1
  93. package/dist/commands/pr/open.js +52 -3
  94. package/dist/commands/pr/update.d.ts.map +1 -1
  95. package/dist/commands/pr/update.js +13 -2
  96. package/dist/commands/recipes/active.command.d.ts +7 -0
  97. package/dist/commands/recipes/active.command.d.ts.map +1 -0
  98. package/dist/commands/recipes/active.command.js +12 -0
  99. package/dist/commands/recipes/add.command.d.ts +8 -0
  100. package/dist/commands/recipes/add.command.d.ts.map +1 -0
  101. package/dist/commands/recipes/add.command.js +33 -0
  102. package/dist/commands/recipes/detach.command.d.ts +7 -0
  103. package/dist/commands/recipes/detach.command.d.ts.map +1 -0
  104. package/dist/commands/recipes/detach.command.js +19 -0
  105. package/dist/commands/recipes/disable.command.d.ts +7 -0
  106. package/dist/commands/recipes/disable.command.d.ts.map +1 -0
  107. package/dist/commands/recipes/disable.command.js +10 -0
  108. package/dist/commands/recipes/enable.command.d.ts +7 -0
  109. package/dist/commands/recipes/enable.command.d.ts.map +1 -0
  110. package/dist/commands/recipes/enable.command.js +10 -0
  111. package/dist/commands/recipes/explain-active.command.d.ts +5 -0
  112. package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
  113. package/dist/commands/recipes/explain-active.command.js +11 -0
  114. package/dist/commands/recipes/explain.command.d.ts.map +1 -1
  115. package/dist/commands/recipes/explain.command.js +4 -2
  116. package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
  117. package/dist/commands/recipes/impl/apply.js +33 -14
  118. package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
  119. package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
  120. package/dist/commands/recipes/impl/commands/active.js +46 -0
  121. package/dist/commands/recipes/impl/commands/add.d.ts +7 -0
  122. package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
  123. package/dist/commands/recipes/impl/commands/add.js +100 -0
  124. package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
  125. package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
  126. package/dist/commands/recipes/impl/commands/detach.js +85 -0
  127. package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
  128. package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
  129. package/dist/commands/recipes/impl/commands/disable.js +21 -0
  130. package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
  131. package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
  132. package/dist/commands/recipes/impl/commands/enable.js +39 -0
  133. package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
  134. package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
  135. package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
  136. package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
  137. package/dist/commands/recipes/impl/commands/explain.js +40 -3
  138. package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
  139. package/dist/commands/recipes/impl/commands/info.js +21 -8
  140. package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
  141. package/dist/commands/recipes/impl/commands/install.js +32 -29
  142. package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
  143. package/dist/commands/recipes/impl/commands/list.js +11 -11
  144. package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
  145. package/dist/commands/recipes/impl/commands/remove.js +5 -0
  146. package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
  147. package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
  148. package/dist/commands/recipes/impl/commands/update.js +93 -0
  149. package/dist/commands/recipes/impl/commands.d.ts +7 -0
  150. package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
  151. package/dist/commands/recipes/impl/commands.js +7 -0
  152. package/dist/commands/recipes/impl/constants.d.ts +1 -14
  153. package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
  154. package/dist/commands/recipes/impl/constants.js +1 -18
  155. package/dist/commands/recipes/impl/manifest.d.ts +2 -2
  156. package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
  157. package/dist/commands/recipes/impl/manifest.js +4 -226
  158. package/dist/commands/recipes/impl/overlay-project.d.ts +32 -0
  159. package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
  160. package/dist/commands/recipes/impl/overlay-project.js +282 -0
  161. package/dist/commands/recipes/impl/paths.d.ts +20 -2
  162. package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
  163. package/dist/commands/recipes/impl/paths.js +23 -5
  164. package/dist/commands/recipes/impl/project-installed-recipes.d.ts +2 -4
  165. package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
  166. package/dist/commands/recipes/impl/project-installed-recipes.js +30 -74
  167. package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
  168. package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
  169. package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
  170. package/dist/commands/recipes/impl/project-registry.d.ts +20 -0
  171. package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
  172. package/dist/commands/recipes/impl/project-registry.js +104 -0
  173. package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
  174. package/dist/commands/recipes/impl/resolver.js +5 -3
  175. package/dist/commands/recipes/impl/types.d.ts +1 -240
  176. package/dist/commands/recipes/impl/types.d.ts.map +1 -1
  177. package/dist/commands/recipes/info.command.js +2 -2
  178. package/dist/commands/recipes/install.spec.js +4 -4
  179. package/dist/commands/recipes/list.command.js +4 -4
  180. package/dist/commands/recipes/remove.command.js +2 -2
  181. package/dist/commands/recipes/update.command.d.ts +8 -0
  182. package/dist/commands/recipes/update.command.d.ts.map +1 -0
  183. package/dist/commands/recipes/update.command.js +35 -0
  184. package/dist/commands/recipes.d.ts +7 -4
  185. package/dist/commands/recipes.d.ts.map +1 -1
  186. package/dist/commands/recipes.js +6 -3
  187. package/dist/commands/recipes.test-helpers.d.ts +3 -3
  188. package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
  189. package/dist/commands/recipes.test-helpers.js +105 -15
  190. package/dist/commands/release/apply.command.d.ts +3 -1
  191. package/dist/commands/release/apply.command.d.ts.map +1 -1
  192. package/dist/commands/release/apply.command.js +354 -18
  193. package/dist/commands/release/apply.mutation.d.ts.map +1 -1
  194. package/dist/commands/release/apply.mutation.js +1 -0
  195. package/dist/commands/release/apply.reporting.d.ts +1 -0
  196. package/dist/commands/release/apply.reporting.d.ts.map +1 -1
  197. package/dist/commands/release/apply.reporting.js +12 -8
  198. package/dist/commands/release/apply.types.d.ts +13 -0
  199. package/dist/commands/release/apply.types.d.ts.map +1 -1
  200. package/dist/commands/release/plan.command.d.ts.map +1 -1
  201. package/dist/commands/release/plan.command.js +48 -0
  202. package/dist/commands/scenario/execute.command.js +4 -4
  203. package/dist/commands/scenario/impl/commands.js +4 -4
  204. package/dist/commands/scenario/info.command.js +4 -4
  205. package/dist/commands/scenario/list.command.js +3 -3
  206. package/dist/commands/scenario/run.command.js +5 -5
  207. package/dist/commands/scenario/scenario.command.js +7 -7
  208. package/dist/commands/shared/merged-branch-cleanup.d.ts +12 -0
  209. package/dist/commands/shared/merged-branch-cleanup.d.ts.map +1 -0
  210. package/dist/commands/shared/merged-branch-cleanup.js +46 -0
  211. package/dist/commands/shared/post-commit-pr-artifacts.d.ts.map +1 -1
  212. package/dist/commands/shared/post-commit-pr-artifacts.js +35 -0
  213. package/dist/commands/shared/task-backend.d.ts.map +1 -1
  214. package/dist/commands/shared/task-backend.js +37 -5
  215. package/dist/commands/shared/task-handoff.d.ts +2 -1
  216. package/dist/commands/shared/task-handoff.d.ts.map +1 -1
  217. package/dist/commands/shared/task-handoff.js +15 -0
  218. package/dist/commands/shared/task-local-freshness.d.ts +2 -0
  219. package/dist/commands/shared/task-local-freshness.d.ts.map +1 -1
  220. package/dist/commands/shared/task-local-freshness.js +7 -1
  221. package/dist/commands/task/finish-shared.d.ts +1 -0
  222. package/dist/commands/task/finish-shared.d.ts.map +1 -1
  223. package/dist/commands/task/finish-shared.js +1 -0
  224. package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
  225. package/dist/commands/task/handoff-show.command.js +24 -0
  226. package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -1
  227. package/dist/commands/task/hosted-close-pr.command.js +35 -0
  228. package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
  229. package/dist/commands/task/hosted-close.command.js +185 -18
  230. package/dist/commands/task/hosted-merge-sync.d.ts +4 -1
  231. package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
  232. package/dist/commands/task/hosted-merge-sync.js +52 -10
  233. package/dist/commands/task/start-ready.d.ts.map +1 -1
  234. package/dist/commands/task/start-ready.js +0 -86
  235. package/dist/runner/context/base-prompts.d.ts +2 -1
  236. package/dist/runner/context/base-prompts.d.ts.map +1 -1
  237. package/dist/runner/context/base-prompts.js +109 -13
  238. package/dist/runner/context/recipe-context.d.ts.map +1 -1
  239. package/dist/runner/context/recipe-context.js +40 -8
  240. package/dist/runner/types.d.ts +4 -0
  241. package/dist/runner/types.d.ts.map +1 -1
  242. package/dist/runner/usecases/task-run.d.ts.map +1 -1
  243. package/dist/runner/usecases/task-run.js +2 -1
  244. package/dist/runtime/behavior/resolve.d.ts +2 -1
  245. package/dist/runtime/behavior/resolve.d.ts.map +1 -1
  246. package/dist/runtime/behavior/resolve.js +25 -5
  247. package/dist/runtime/behavior/types.d.ts +1 -0
  248. package/dist/runtime/behavior/types.d.ts.map +1 -1
  249. package/dist/runtime/capabilities/recipe.d.ts +2 -1
  250. package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
  251. package/dist/runtime/capabilities/recipe.js +88 -28
  252. package/dist/shared/errors.d.ts +1 -1
  253. package/dist/shared/errors.d.ts.map +1 -1
  254. package/dist/shared/runtime-source.d.ts.map +1 -1
  255. package/dist/shared/runtime-source.js +8 -3
  256. package/package.json +3 -2
  257. package/dist/cli/recipes-bundled.d.ts +0 -10
  258. package/dist/cli/recipes-bundled.d.ts.map +0 -1
  259. package/dist/cli/recipes-bundled.js +0 -36
package/assets/AGENTS.md CHANGED
@@ -65,7 +65,7 @@ agentplane task new --title "..." --description "..." --priority med --owner <RO
65
65
  agentplane task plan set <task-id> --text "..." --updated-by <ROLE>
66
66
  agentplane task plan approve <task-id> --by ORCHESTRATOR
67
67
  agentplane task start-ready <task-id> --author <ROLE> --body "Start: ..."
68
- agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
68
+ agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
69
69
  agentplane finish <task-id> --author <ROLE> --body "Verified: ..." --result "..." --commit <git-rev>
70
70
  ```
71
71
 
@@ -83,7 +83,7 @@ agentplane finish <task-id> --author INTEGRATOR --body "Verified: ..." --result
83
83
 
84
84
  ```bash
85
85
  agentplane task verify-show <task-id>
86
- agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..."
86
+ agentplane verify <task-id> --ok|--rework --by <ROLE> --note "..." [--observation "..." --impact "..." --resolution "..."] [--local-only]
87
87
  agentplane incidents advise <task-id>
88
88
  agentplane incidents collect <task-id> --check
89
89
  agentplane doctor
package/assets/RUNNER.md CHANGED
@@ -6,7 +6,7 @@ Operate as the agentplane execution runner.
6
6
  - This invocation already passed repository preflight, plan approval, and task start lifecycle gates.
7
7
  - Do not run repository startup commands such as `agentplane config show`, `agentplane quickstart`, `agentplane task list`, `git status`, or `git rev-parse` unless the bundle explicitly requires them as task work.
8
8
  - Do not create, approve, start, verify, finish, block, or rerun tasks unless the bundle explicitly requires task-metadata edits as part of the requested work.
9
- - Do not recursively invoke `agentplane task run`, `agentplane scenario execute`, or similar runner entrypoints from inside the runner.
9
+ - Do not recursively invoke `agentplane task run`, `agentplane recipes scenario execute`, or similar runner entrypoints from inside the runner.
10
10
  - Apply prompt blocks in ascending `priority` order.
11
11
  - Framework and repository policy blocks override owner, task, and recipe context.
12
12
  - Do not reconstruct missing context from CLI argv.
@@ -19,10 +19,14 @@
19
19
  "workflow": [
20
20
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
21
21
  "Restate the active task scope, target behavior, and any blocking unknowns before editing; inspect the repository first instead of guessing.",
22
+ "State assumptions and ambiguities explicitly; if multiple interpretations or a simpler viable approach exist, say so before editing instead of choosing silently.",
22
23
  "Keep diffs minimal, task-scoped, and easy to review; if the root cause or blast radius expands materially, stop and route drift back through ORCHESTRATOR or PLANNER.",
23
24
  "Prefer existing patterns, helpers, and tests over new abstractions; explain deliberate deviations rather than silently introducing them.",
25
+ "Do not add speculative features, configurability, abstractions, or impossible-scenario handling beyond the approved task.",
26
+ "Keep changes surgical: touch only files and lines that trace directly to the request, and remove only the unused code your own edits create.",
24
27
  "Document edits with exact file paths and concise before/after rationale.",
25
28
  "Run the smallest sufficient local commands (tests/linters/formatters) and summarize only the output lines that change a decision.",
29
+ "Turn the task into verifiable goals before coding: prefer a reproducing or acceptance check first, then loop until it passes.",
26
30
  "Prefer declared verify commands; treat `Verify Steps` as the acceptance contract and request PLANNER updates when the contract itself drifts.",
27
31
  "Record local deviations, follow-ups, and incident candidates in the task-local observation section (`Notes` for v2, `Findings` for v3); use structured `incident-candidate` blocks for external/unfixable-in-repo incidents and let `finish` or `agentplane incidents collect` promote them.",
28
32
  "Separate confirmed facts, inferred risks, and open questions in handoff summaries.",
@@ -18,6 +18,7 @@
18
18
  "workflow": [
19
19
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
20
20
  "Confirm that no existing agent or smaller prompt adjustment cleanly covers the requested specialty; restate the intended capability and decision boundary.",
21
+ "State assumptions and unresolved boundary questions explicitly; prefer the smallest prompt change to an existing role over creating a new agent for speculative flexibility.",
21
22
  "Create the new agent JSON with uppercase snake case ID and crisp IO/permissions/workflow that do not overlap existing roles.",
22
23
  "Keep the new prompt explicit, minimal, and workflow-compatible with AGENTS.md precedence.",
23
24
  "Update AGENTS.md registry guidance as needed and refresh any derived lists per spec.",
@@ -18,8 +18,9 @@
18
18
  "workflow": [
19
19
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
20
20
  "Confirm behavior from code, help output, tests, or verification evidence before editing docs; do not document intended behavior as if it already ships.",
21
+ "State any documentation assumptions explicitly; if behavior is ambiguous, stop at the evidence boundary instead of filling the gap with plausible prose.",
21
22
  "Create/update task README content via agentplane task doc set; keep the active doc_version contract explicit and treat v3 `Findings` as task-local observation memory, not policy incidents.",
22
- "Update only the docs surfaces required for the changed behavior and keep wording aligned with gateway/policy/CLI precedence.",
23
+ "Update only the docs surfaces required for the changed behavior and keep wording aligned with gateway/policy/CLI precedence; keep edits surgical and task-scoped.",
23
24
  "When generated or mirrored docs exist, update the canonical source or generation path instead of hand-editing downstream artifacts.",
24
25
  "Keep PR artifact docs and notes current when required; add handoff notes for INTEGRATOR.",
25
26
  "Separate confirmed behavior, known caveats, and deferred follow-up in summaries.",
@@ -19,10 +19,11 @@
19
19
  "workflow": [
20
20
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
21
21
  "Operate from the repo root on the pinned base branch; treat integration as a state machine: confirm preconditions -> run pr check -> integrate -> finish via agentplane.",
22
+ "State branch, metadata, and verification assumptions explicitly before mutating base; if they are not satisfied, stop instead of inferring missing state.",
22
23
  "Stop on dirty base state, stale PR artifacts, missing verification evidence, or branch/task mismatch; do not paper over inconsistent state.",
23
24
  "Use configured base branch and task branch prefix when referencing branches; check config if uncertain.",
24
25
  "Ensure verify commands are run/recorded against the declared Verify Steps contract; update PR artifacts and task README findings as needed.",
25
- "Keep integration writes limited to merge outputs, required verification artifacts, and deterministic closure updates.",
26
+ "Keep integration writes limited to merge outputs, required verification artifacts, and deterministic closure updates; avoid adjacent cleanup that is not directly required by the task state machine.",
26
27
  "When closing multiple tasks, use batch finish only when the same verification evidence and commit metadata genuinely apply.",
27
28
  "Summaries should distinguish merged commit(s), verification evidence, and any remaining cleanup.",
28
29
  "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."
@@ -18,6 +18,8 @@
18
18
  "Use `agentplane config show|set` for config changes (workflow_mode, branch/task settings); avoid manual edits.",
19
19
  "Convert the first user message into an execution plan; do not create tasks until the user approves it.",
20
20
  "Restate the user goal, constraints, assumptions, and re-approval triggers, then draft a numbered execution plan with agent assignments and expected outcomes.",
21
+ "State assumptions explicitly, surface competing interpretations instead of choosing silently, and prefer the simplest viable plan over speculative flexibility.",
22
+ "Make each plan step goal-driven with a concrete verification check or observable pass condition whenever the repository already has an enforcement surface.",
21
23
  "Build a task graph from the approved plan: split into atomic tasks, each with one specific owner from existing agent IDs; schedule CREATOR if a required agent is missing.",
22
24
  "When task artifacts are part of scope, keep the active README contract explicit: Verify Steps define acceptance, and task-local observations stay in Notes/Findings rather than policy incidents.",
23
25
  "For development work, select the minimal role set needed for risk and workflow mode; do not split work by role labels alone.",
@@ -25,7 +27,7 @@
25
27
  "If the user explicitly requests agent optimization, invoke UPDATER and pause until its analysis is complete.",
26
28
  "Ask one blocking question only when execution would otherwise be guesswork; otherwise state assumptions explicitly and proceed under them.",
27
29
  "Await plan approval before executing steps, then proceed autonomously unless new scope, risks, or constraints require another check-in.",
28
- "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>`.",
30
+ "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 info <id>` to inspect cached recipes and `agentplane recipes add <id>` to vendor selected ones into the project. Use `agentplane recipes active` / `agentplane recipes explain <id>` for project-local state. For recipe-owned scenarios, use `agentplane recipes scenario list` and `agentplane recipes scenario run <recipe:scenario>`.",
29
31
  "After approval, PLANNER creates executable tasks directly from the approved task graph plan.",
30
32
  "Execute step by step and summarize task IDs plus commit hashes after each major step.",
31
33
  "If task creation is explicitly waived via approved override, keep traceability in run summaries.",
@@ -19,10 +19,12 @@
19
19
  "Review the backlog before changes to avoid duplicates or conflicts.",
20
20
  "After overall plan approval, create executable tasks directly from the approved task graph plan.",
21
21
  "If task graph planning yields exactly one work item, create exactly one task and keep full traceability there.",
22
+ "State planning assumptions explicitly; if scope is ambiguous, resolve that ambiguity before multiplying tasks.",
23
+ "Prefer the smallest task graph that preserves ownership and verification; do not split work for hypothetical future flexibility.",
22
24
  "Split goals into atomic tasks only at real deliverable, owner, or dependency boundaries; set depends_on explicitly (use [] for none).",
23
25
  "Create tasks with valid parameters: non-empty title/description/owner, at least one meaningful tag, deduped depends_on/verify.",
24
26
  "Write titles, descriptions, and Plans as observable work, not implementation poetry.",
25
- "Treat Verify Steps as concrete acceptance checks; encode uncertainty as explicit scope notes or follow-up tasks, not vague README prose.",
27
+ "Treat Verify Steps as concrete acceptance checks; translate goals into verifiable checks or commands when possible, and encode uncertainty as explicit scope notes or follow-up tasks instead of vague README prose.",
26
28
  "Keep task-local observations in Notes/Findings rather than policy incidents.",
27
29
  "Before creating a new task, check open tasks (`TODO|DOING|BLOCKED`) and reuse/update a matching task when scope and owner align.",
28
30
  "Do not create separate tasks for role handoffs unless there is an independent deliverable, a different required owner, or an explicit dependency boundary.",
@@ -16,6 +16,7 @@
16
16
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
17
17
  "Review changes against approved scope, changed behavior, and declared verification contract before forming conclusions.",
18
18
  "Prioritize confirmed defects first, then plausible risks, then open questions; label uncertainty explicitly.",
19
+ "Flag unnecessary complexity explicitly: speculative flexibility, avoidable abstractions, and scope creep are review defects when they do not serve the approved task.",
19
20
  "Prefer PR artifact review when present (README completeness, diffstat, verify log).",
20
21
  "Report findings ordered by severity with exact file/line references and concise testing notes.",
21
22
  "Focus on regressions, hidden scope expansion, lifecycle drift, and missing evidence rather than style-only commentary.",
@@ -20,9 +20,9 @@
20
20
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
21
21
  "Restate the behavior under test, the declared acceptance contract, and the likely regression surface before adding tests or running checks.",
22
22
  "Identify existing test tooling and reuse it; do not add new frameworks unless requested.",
23
- "Add the smallest set of high-value tests that distinguishes working behavior from the most likely failure modes.",
23
+ "Add the smallest set of high-value tests that distinguishes working behavior from the most likely failure modes; prefer the narrowest reproducer or acceptance check first.",
24
24
  "Keep tests deterministic and fast; avoid network calls and time-based flakiness.",
25
- "If behavior is ambiguous, escalate instead of encoding guesses into tests.",
25
+ "If behavior or success criteria are ambiguous, escalate instead of encoding guesses into tests.",
26
26
  "Run targeted tests first and summarize only the key output lines.",
27
27
  "Check results against `Verify Steps` as the acceptance contract, not just against ad-hoc commands.",
28
28
  "Record residual gaps in the task-local observation section (`Notes` for v2, `Findings` for v3) rather than escalating them directly into policy incidents.",
@@ -19,6 +19,7 @@
19
19
  "Confirm the user explicitly summoned UPDATER; otherwise hand control back to ORCHESTRATOR.",
20
20
  "Audit AGENTS.md and .agentplane/agents/*.json plus relevant repo files, citing exact paths.",
21
21
  "Distinguish correctness issues, ambiguity/UX friction, and structural overlap; prioritize by blast radius and recurrence risk.",
22
+ "State assumptions, tradeoffs, and the simplest effective change before recommending broader prompt or workflow rewrites.",
22
23
  "Recommend the smallest prompt/system changes that improve behavior; avoid broad rewrites without evidence.",
23
24
  "Return a prioritized optimization plan and any required validation commands."
24
25
  ]
@@ -21,7 +21,7 @@
21
21
  "Follow shared workflow rules in AGENTS.md and `agentplane quickstart` / `agentplane role <ROLE>` output.",
22
22
  "Treat `AGENTS.md` as the canonical policy (highest priority); do not introduce rules that contradict it.",
23
23
  "Load the upgrade run artifacts (runDir) and inspect changed files from `files.json` / `review.json` before editing anything.",
24
- "Treat managed files as replace-first outputs from upgrade; do not re-introduce manual merge paths.",
24
+ "Treat managed files as replace-first outputs from upgrade; do not re-introduce manual merge paths or speculative prompt rewrites beyond what the contract requires.",
25
25
  "For `.agentplane/policy/incidents.md`, ensure local history is append-only and not overwritten.",
26
26
  "Reconcile `.agentplane/agents/*.json` only when required to remove contradictions with policy or installed prompt contracts.",
27
27
  "Stop and report when upgrade output conflicts with current enforcement, generated artifacts, or the installed agent contract.",
@@ -0,0 +1 @@
1
+ <svg fill="none" height="64" viewBox="0 0 320 64" width="320" xmlns="http://www.w3.org/2000/svg"><g fill="#000"><path d="m18.2234 47.8367c-3.009 0-5.4742-.6893-7.3957-2.068-1.88512-1.415-2.8277-3.3741-2.8277-5.8775 0-2.576.79757-4.5533 2.3927-5.932 1.6314-1.415 4.0241-2.449 7.1781-3.1021l9.4077-1.8503c0-1.8866-.4351-3.3016-1.3051-4.2449-.8338-.9796-2.0483-1.4694-3.6435-1.4694-1.5588 0-2.7733.3628-3.6434 1.0885-.8701.6893-1.432 1.7233-1.6858 3.102l-8.21128-.381c.54379-3.1927 1.97578-5.6054 4.29598-7.2381 2.3565-1.6689 5.438-2.5034 9.2445-2.5034 4.3504 0 7.6132 1.0341 9.7884 3.1021 2.2114 2.068 3.3171 5.0975 3.3171 9.0884v9.9592c0 .8345.1269 1.3968.3807 1.6871.29.2539.7069.3809 1.2507.3809h.8157v5.6055c-.2538.0725-.6707.1451-1.2507.2177-.5438.0725-1.0876.1088-1.6314.1088-1.1601 0-2.2477-.1995-3.2628-.5986-.9788-.3991-1.7764-1.0703-2.3927-2.0136-.6163-.9796-.9244-2.3583-.9244-4.1361l.7069.5442c-.3625 1.3061-1.0151 2.449-1.9577 3.4286-.9063.9796-2.1026 1.7415-3.589 2.2857-1.4501.5442-3.1359.8163-5.0573.8163zm1.9576-5.6054c1.3414 0 2.5196-.254 3.5347-.7619 1.0151-.5442 1.8127-1.3243 2.3927-2.3401.5801-1.0159.8701-2.2132.8701-3.5919v-1.415l-6.6343 1.415c-1.3051.254-2.3021.6894-2.9909 1.3061-.6526.5805-.9788 1.3424-.9788 2.2858 0 .9795.3262 1.7414.9788 2.2857.6526.5442 1.5951.8163 2.8277.8163z"/><path d="m53.2974 56c-2.7915 0-5.1298-.3447-7.015-1.034-1.8489-.6894-3.3353-1.6508-4.4591-2.8844-1.0876-1.2335-1.8489-2.6485-2.284-4.2449l8.3745-.5986c.29.9433.8338 1.6871 1.6314 2.2313.8338.5442 2.0845.8163 3.7522.8163 1.9576 0 3.444-.4716 4.4591-1.415 1.0513-.907 1.577-2.3764 1.577-4.4081v-3.1021c-.6888 1.3424-1.7945 2.4309-3.3171 3.2653-1.5227.7982-3.2266 1.1973-5.1117 1.1973-2.3927 0-4.5135-.5805-6.3624-1.7415-1.849-1.1972-3.2991-2.848-4.3504-4.9523-1.0151-2.1406-1.5226-4.644-1.5226-7.5103 0-2.7936.5075-5.2607 1.5226-7.4013 1.0513-2.1406 2.4833-3.8095 4.296-5.0068 1.8489-1.2336 3.9516-1.8504 6.308-1.8504 2.1389 0 3.9335.4717 5.3836 1.415 1.4864.9433 2.6102 2.195 3.3715 3.7551v-4.517h7.9938v26.2857c0 2.6123-.5981 4.771-1.7945 6.4762-1.1963 1.7415-2.864 3.0476-5.0029 3.9184-2.139.8707-4.6223 1.3061-7.45 1.3061zm-.0544-16.2177c1.8852 0 3.3715-.7256 4.4591-2.1769 1.1239-1.4512 1.6858-3.4648 1.6858-6.0408 0-1.7052-.2538-3.1746-.7613-4.4081-.4713-1.2336-1.1782-2.1769-2.1208-2.83-.9064-.653-1.994-.9796-3.2628-.9796-1.9577 0-3.4803.7438-4.5679 2.2313-1.0876 1.4876-1.6314 3.483-1.6314 5.9864 0 2.5397.5619 4.5533 1.6858 6.0408 1.1238 1.4513 2.6283 2.1769 4.5135 2.1769z"/><path d="m86.1983 47.8367c-2.9727 0-5.5648-.6167-7.7763-1.8503-2.1752-1.2698-3.879-3.0476-5.1117-5.3333-1.1963-2.2858-1.7945-4.9706-1.7945-8.0545s.5982-5.7505 1.7945-8c1.2327-2.2857 2.9365-4.0635 5.1117-5.3333s4.7492-1.9048 7.7219-1.9048c2.9003 0 5.4199.635 7.5588 1.9048s3.7885 3.0839 4.9486 5.4422c1.1963 2.3583 1.7947 5.1701 1.7947 8.4354v1.6326h-20.5013c.1087 2.322.725 4.0454 1.8489 5.1701 1.1601 1.1247 2.6827 1.6871 4.5679 1.6871 1.3776 0 2.5195-.2903 3.4259-.8708.9425-.5805 1.6132-1.4694 2.012-2.6667l8.2116.4898c-.7616 2.9025-2.3748 5.1701-4.84 6.8028-2.4653 1.6326-5.4561 2.4489-8.9727 2.4489zm-6.2536-18.068h12.1266c-.1087-2.1406-.7069-3.737-1.7945-4.7891-1.0514-1.0522-2.429-1.5782-4.1329-1.5782s-3.1177.5623-4.2416 1.687c-1.0876 1.0885-1.7401 2.6486-1.9576 4.6803z"/><path d="m104.399 47.1837v-29.1701h7.342l.326 8.5442-1.033-.2721c.29-2.1769.87-3.9184 1.74-5.2245.906-1.3061 2.03-2.2494 3.371-2.8299 1.342-.5805 2.81-.8708 4.405-.8708 2.103 0 3.879.4536 5.329 1.3606 1.487.907 2.611 2.195 3.372 3.8639.797 1.6327 1.196 3.5737 1.196 5.8232v18.7755h-8.157v-16.0544c0-1.5601-.127-2.8844-.38-3.9728-.254-1.0885-.707-1.9048-1.36-2.449-.652-.5805-1.559-.8708-2.719-.8708-1.704 0-3.009.635-3.915 1.9048-.907 1.2336-1.36 3.0295-1.36 5.3878v16.0544z"/><path d="m146.716 47.1837c-3.009 0-5.22-.6894-6.634-2.0681-1.414-1.4149-2.121-3.6462-2.121-6.6938v-27.2653h8.157v26.2857c0 1.4149.29 2.3764.87 2.8843.616.508 1.523.7619 2.719.7619h4.078v6.0953zm-13.432-23.0749v-6.0952h20.501v6.0952z"/><path d="m169.384 8h6.58l-10.441 39.1837h-6.58z"/><path d="m182.197 55.3469v-37.1156h5.438l.163 6.2041-.652-.3266c.725-2.1405 1.921-3.7551 3.589-4.8435 1.667-1.1247 3.589-1.6871 5.764-1.6871 2.828 0 5.148.7075 6.96 2.1225 1.849 1.3787 3.209 3.2109 4.079 5.4966.906 2.2857 1.359 4.7891 1.359 7.5102s-.453 5.2245-1.359 7.5102c-.87 2.2857-2.23 4.136-4.079 5.551-1.812 1.3787-4.132 2.068-6.96 2.068-1.45 0-2.81-.2539-4.079-.7619-1.268-.5079-2.356-1.2154-3.262-2.1224-.87-.9433-1.487-2.0499-1.849-3.3197l.652-.6531v14.3673zm13.269-12.517c2.32 0 4.133-.8889 5.438-2.6666 1.341-1.7778 2.012-4.2631 2.012-7.4558 0-3.1928-.671-5.678-2.012-7.4558-1.305-1.7778-3.118-2.6667-5.438-2.6667-1.523 0-2.846.381-3.97 1.1429-1.124.7256-1.994 1.8503-2.61 3.3741-.617 1.5238-.925 3.3923-.925 5.6055 0 2.2131.29 4.0816.87 5.6054.617 1.5238 1.487 2.6667 2.611 3.4286 1.16.7256 2.501 1.0884 4.024 1.0884z"/><path d="m220.236 47.1837c-1.885 0-3.407-.4898-4.567-1.4694-1.161-.9796-1.741-2.5397-1.741-4.6803v-32.48978h5.765v31.94558c0 .6531.163 1.1429.489 1.4694.363.3265.87.4898 1.523.4898h2.284v4.7347z"/><path d="m236.238 47.8367c-3.009 0-5.42-.6893-7.233-2.068-1.776-1.3787-2.664-3.3197-2.664-5.8231s.743-4.4445 2.229-5.8232c1.523-1.4149 3.861-2.4308 7.015-3.0476l9.952-1.9047c0-2.2495-.526-3.9184-1.577-5.0068-1.052-1.1248-2.611-1.6871-4.677-1.6871-1.849 0-3.299.4172-4.35 1.2517-1.052.7982-1.777 1.9955-2.176 3.5918l-5.927-.3809c.544-2.9025 1.885-5.1882 4.024-6.8572 2.175-1.6689 4.985-2.5034 8.429-2.5034 3.915 0 6.888 1.0522 8.918 3.1565 2.067 2.068 3.1 4.9887 3.1 8.7619v11.2653c0 .6893.109 1.1791.326 1.4694.254.254.653.3809 1.196.3809h1.034v4.5715c-.182.0363-.472.0725-.87.1088-.399.0363-.816.0544-1.251.0544-1.233 0-2.302-.1995-3.209-.5986-.87-.3991-1.522-1.0522-1.957-1.9592-.435-.9433-.653-2.195-.653-3.7551l.598.2721c-.29 1.2699-.924 2.3946-1.903 3.3742-.942.9796-2.157 1.7596-3.643 2.3401-1.45.5442-3.027.8163-4.731.8163zm.924-4.5714c1.74 0 3.227-.3265 4.459-.9796 1.233-.6893 2.194-1.6326 2.882-2.8299.689-1.1973 1.034-2.5578 1.034-4.0817v-1.8503l-8.484 1.6327c-1.74.3265-2.972.8526-3.697 1.5782-.689.6893-1.034 1.5782-1.034 2.6667 0 1.2335.417 2.195 1.251 2.8843.87.6531 2.066.9796 3.589.9796z"/><path d="m257.636 47.1837v-28.9524h5.275l.217 7.7279-.707-.381c.327-1.8866.943-3.4104 1.849-4.5714.907-1.161 2.012-2.0136 3.317-2.5578 1.306-.5805 2.719-.8708 4.242-.8708 2.175 0 3.97.4898 5.384 1.4694 1.45.9433 2.537 2.2495 3.262 3.9184.762 1.6326 1.142 3.5011 1.142 5.6054v18.6123h-5.764v-16.8708c0-1.7052-.181-3.1383-.544-4.2993-.362-1.161-.96-2.0499-1.794-2.6667-.834-.6167-1.922-.9251-3.263-.9251-2.03 0-3.68.6712-4.948 2.0136-1.269 1.3424-1.904 3.3016-1.904 5.8775v16.8708z"/><path d="m299.949 47.8367c-2.828 0-5.275-.6167-7.341-1.8503-2.031-1.2336-3.608-2.9932-4.731-5.2789-1.088-2.2857-1.632-4.9524-1.632-8s.544-5.6962 1.632-7.9456c1.123-2.2857 2.7-4.0453 4.731-5.2789 2.03-1.2698 4.423-1.9048 7.178-1.9048 2.61 0 4.912.6168 6.906 1.8504 1.994 1.1972 3.535 2.9387 4.622 5.2245 1.124 2.2857 1.686 5.043 1.686 8.2721v1.4694h-20.773c.145 2.8299.888 4.9523 2.23 6.3673 1.377 1.415 3.226 2.1225 5.546 2.1225 1.704 0 3.118-.3991 4.242-1.1973s1.903-1.8685 2.338-3.2109l5.982.3809c-.761 2.6849-2.266 4.8617-4.514 6.5307-2.211 1.6326-4.912 2.4489-8.102 2.4489zm-7.722-17.7959h14.682c-.181-2.5759-.924-4.4807-2.229-5.7143-1.269-1.2335-2.9-1.8503-4.894-1.8503-2.067 0-3.771.6531-5.112 1.9592-1.305 1.2698-2.121 3.1383-2.447 5.6054z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" height="64" viewBox="0 0 320 64" width="320" xmlns="http://www.w3.org/2000/svg"><g fill="#000"><path d="m18.2234 47.8367c-3.009 0-5.4742-.6893-7.3957-2.068-1.88512-1.415-2.8277-3.3741-2.8277-5.8775 0-2.576.79757-4.5533 2.3927-5.932 1.6314-1.415 4.0241-2.449 7.1781-3.1021l9.4077-1.8503c0-1.8866-.4351-3.3016-1.3051-4.2449-.8338-.9796-2.0483-1.4694-3.6435-1.4694-1.5588 0-2.7733.3628-3.6434 1.0885-.8701.6893-1.432 1.7233-1.6858 3.102l-8.21128-.381c.54379-3.1927 1.97578-5.6054 4.29598-7.2381 2.3565-1.6689 5.438-2.5034 9.2445-2.5034 4.3504 0 7.6132 1.0341 9.7884 3.1021 2.2114 2.068 3.3171 5.0975 3.3171 9.0884v9.9592c0 .8345.1269 1.3968.3807 1.6871.29.2539.7069.3809 1.2507.3809h.8157v5.6055c-.2538.0725-.6707.1451-1.2507.2177-.5438.0725-1.0876.1088-1.6314.1088-1.1601 0-2.2477-.1995-3.2628-.5986-.9788-.3991-1.7764-1.0703-2.3927-2.0136-.6163-.9796-.9244-2.3583-.9244-4.1361l.7069.5442c-.3625 1.3061-1.0151 2.449-1.9577 3.4286-.9063.9796-2.1026 1.7415-3.589 2.2857-1.4501.5442-3.1359.8163-5.0573.8163zm1.9576-5.6054c1.3414 0 2.5196-.254 3.5347-.7619 1.0151-.5442 1.8127-1.3243 2.3927-2.3401.5801-1.0159.8701-2.2132.8701-3.5919v-1.415l-6.6343 1.415c-1.3051.254-2.3021.6894-2.9909 1.3061-.6526.5805-.9788 1.3424-.9788 2.2858 0 .9795.3262 1.7414.9788 2.2857.6526.5442 1.5951.8163 2.8277.8163z"/><path d="m53.2974 56c-2.7915 0-5.1298-.3447-7.015-1.034-1.8489-.6894-3.3353-1.6508-4.4591-2.8844-1.0876-1.2335-1.8489-2.6485-2.284-4.2449l8.3745-.5986c.29.9433.8338 1.6871 1.6314 2.2313.8338.5442 2.0845.8163 3.7522.8163 1.9576 0 3.444-.4716 4.4591-1.415 1.0513-.907 1.577-2.3764 1.577-4.4081v-3.1021c-.6888 1.3424-1.7945 2.4309-3.3171 3.2653-1.5227.7982-3.2266 1.1973-5.1117 1.1973-2.3927 0-4.5135-.5805-6.3624-1.7415-1.849-1.1972-3.2991-2.848-4.3504-4.9523-1.0151-2.1406-1.5226-4.644-1.5226-7.5103 0-2.7936.5075-5.2607 1.5226-7.4013 1.0513-2.1406 2.4833-3.8095 4.296-5.0068 1.8489-1.2336 3.9516-1.8504 6.308-1.8504 2.1389 0 3.9335.4717 5.3836 1.415 1.4864.9433 2.6102 2.195 3.3715 3.7551v-4.517h7.9938v26.2857c0 2.6123-.5981 4.771-1.7945 6.4762-1.1963 1.7415-2.864 3.0476-5.0029 3.9184-2.139.8707-4.6223 1.3061-7.45 1.3061zm-.0544-16.2177c1.8852 0 3.3715-.7256 4.4591-2.1769 1.1239-1.4512 1.6858-3.4648 1.6858-6.0408 0-1.7052-.2538-3.1746-.7613-4.4081-.4713-1.2336-1.1782-2.1769-2.1208-2.83-.9064-.653-1.994-.9796-3.2628-.9796-1.9577 0-3.4803.7438-4.5679 2.2313-1.0876 1.4876-1.6314 3.483-1.6314 5.9864 0 2.5397.5619 4.5533 1.6858 6.0408 1.1238 1.4513 2.6283 2.1769 4.5135 2.1769z"/><path d="m86.1983 47.8367c-2.9727 0-5.5648-.6167-7.7763-1.8503-2.1752-1.2698-3.879-3.0476-5.1117-5.3333-1.1963-2.2858-1.7945-4.9706-1.7945-8.0545s.5982-5.7505 1.7945-8c1.2327-2.2857 2.9365-4.0635 5.1117-5.3333s4.7492-1.9048 7.7219-1.9048c2.9003 0 5.4199.635 7.5588 1.9048s3.7885 3.0839 4.9486 5.4422c1.1963 2.3583 1.7947 5.1701 1.7947 8.4354v1.6326h-20.5013c.1087 2.322.725 4.0454 1.8489 5.1701 1.1601 1.1247 2.6827 1.6871 4.5679 1.6871 1.3776 0 2.5195-.2903 3.4259-.8708.9425-.5805 1.6132-1.4694 2.012-2.6667l8.2116.4898c-.7616 2.9025-2.3748 5.1701-4.84 6.8028-2.4653 1.6326-5.4561 2.4489-8.9727 2.4489zm-6.2536-18.068h12.1266c-.1087-2.1406-.7069-3.737-1.7945-4.7891-1.0514-1.0522-2.429-1.5782-4.1329-1.5782s-3.1177.5623-4.2416 1.687c-1.0876 1.0885-1.7401 2.6486-1.9576 4.6803z"/><path d="m104.399 47.1837v-29.1701h7.342l.326 8.5442-1.033-.2721c.29-2.1769.87-3.9184 1.74-5.2245.906-1.3061 2.03-2.2494 3.371-2.8299 1.342-.5805 2.81-.8708 4.405-.8708 2.103 0 3.879.4536 5.329 1.3606 1.487.907 2.611 2.195 3.372 3.8639.797 1.6327 1.196 3.5737 1.196 5.8232v18.7755h-8.157v-16.0544c0-1.5601-.127-2.8844-.38-3.9728-.254-1.0885-.707-1.9048-1.36-2.449-.652-.5805-1.559-.8708-2.719-.8708-1.704 0-3.009.635-3.915 1.9048-.907 1.2336-1.36 3.0295-1.36 5.3878v16.0544z"/><path d="m146.716 47.1837c-3.009 0-5.22-.6894-6.634-2.0681-1.414-1.4149-2.121-3.6462-2.121-6.6938v-27.2653h8.157v26.2857c0 1.4149.29 2.3764.87 2.8843.616.508 1.523.7619 2.719.7619h4.078v6.0953zm-13.432-23.0749v-6.0952h20.501v6.0952z"/><path d="m169.384 8h6.58l-10.441 39.1837h-6.58z"/><path d="m182.197 55.3469v-37.1156h5.438l.163 6.2041-.652-.3266c.725-2.1405 1.921-3.7551 3.589-4.8435 1.667-1.1247 3.589-1.6871 5.764-1.6871 2.828 0 5.148.7075 6.96 2.1225 1.849 1.3787 3.209 3.2109 4.079 5.4966.906 2.2857 1.359 4.7891 1.359 7.5102s-.453 5.2245-1.359 7.5102c-.87 2.2857-2.23 4.136-4.079 5.551-1.812 1.3787-4.132 2.068-6.96 2.068-1.45 0-2.81-.2539-4.079-.7619-1.268-.5079-2.356-1.2154-3.262-2.1224-.87-.9433-1.487-2.0499-1.849-3.3197l.652-.6531v14.3673zm13.269-12.517c2.32 0 4.133-.8889 5.438-2.6666 1.341-1.7778 2.012-4.2631 2.012-7.4558 0-3.1928-.671-5.678-2.012-7.4558-1.305-1.7778-3.118-2.6667-5.438-2.6667-1.523 0-2.846.381-3.97 1.1429-1.124.7256-1.994 1.8503-2.61 3.3741-.617 1.5238-.925 3.3923-.925 5.6055 0 2.2131.29 4.0816.87 5.6054.617 1.5238 1.487 2.6667 2.611 3.4286 1.16.7256 2.501 1.0884 4.024 1.0884z"/><path d="m220.236 47.1837c-1.885 0-3.407-.4898-4.567-1.4694-1.161-.9796-1.741-2.5397-1.741-4.6803v-32.48978h5.765v31.94558c0 .6531.163 1.1429.489 1.4694.363.3265.87.4898 1.523.4898h2.284v4.7347z"/><path d="m236.238 47.8367c-3.009 0-5.42-.6893-7.233-2.068-1.776-1.3787-2.664-3.3197-2.664-5.8231s.743-4.4445 2.229-5.8232c1.523-1.4149 3.861-2.4308 7.015-3.0476l9.952-1.9047c0-2.2495-.526-3.9184-1.577-5.0068-1.052-1.1248-2.611-1.6871-4.677-1.6871-1.849 0-3.299.4172-4.35 1.2517-1.052.7982-1.777 1.9955-2.176 3.5918l-5.927-.3809c.544-2.9025 1.885-5.1882 4.024-6.8572 2.175-1.6689 4.985-2.5034 8.429-2.5034 3.915 0 6.888 1.0522 8.918 3.1565 2.067 2.068 3.1 4.9887 3.1 8.7619v11.2653c0 .6893.109 1.1791.326 1.4694.254.254.653.3809 1.196.3809h1.034v4.5715c-.182.0363-.472.0725-.87.1088-.399.0363-.816.0544-1.251.0544-1.233 0-2.302-.1995-3.209-.5986-.87-.3991-1.522-1.0522-1.957-1.9592-.435-.9433-.653-2.195-.653-3.7551l.598.2721c-.29 1.2699-.924 2.3946-1.903 3.3742-.942.9796-2.157 1.7596-3.643 2.3401-1.45.5442-3.027.8163-4.731.8163zm.924-4.5714c1.74 0 3.227-.3265 4.459-.9796 1.233-.6893 2.194-1.6326 2.882-2.8299.689-1.1973 1.034-2.5578 1.034-4.0817v-1.8503l-8.484 1.6327c-1.74.3265-2.972.8526-3.697 1.5782-.689.6893-1.034 1.5782-1.034 2.6667 0 1.2335.417 2.195 1.251 2.8843.87.6531 2.066.9796 3.589.9796z"/><path d="m257.636 47.1837v-28.9524h5.275l.217 7.7279-.707-.381c.327-1.8866.943-3.4104 1.849-4.5714.907-1.161 2.012-2.0136 3.317-2.5578 1.306-.5805 2.719-.8708 4.242-.8708 2.175 0 3.97.4898 5.384 1.4694 1.45.9433 2.537 2.2495 3.262 3.9184.762 1.6326 1.142 3.5011 1.142 5.6054v18.6123h-5.764v-16.8708c0-1.7052-.181-3.1383-.544-4.2993-.362-1.161-.96-2.0499-1.794-2.6667-.834-.6167-1.922-.9251-3.263-.9251-2.03 0-3.68.6712-4.948 2.0136-1.269 1.3424-1.904 3.3016-1.904 5.8775v16.8708z"/><path d="m299.949 47.8367c-2.828 0-5.275-.6167-7.341-1.8503-2.031-1.2336-3.608-2.9932-4.731-5.2789-1.088-2.2857-1.632-4.9524-1.632-8s.544-5.6962 1.632-7.9456c1.123-2.2857 2.7-4.0453 4.731-5.2789 2.03-1.2698 4.423-1.9048 7.178-1.9048 2.61 0 4.912.6168 6.906 1.8504 1.994 1.1972 3.535 2.9387 4.622 5.2245 1.124 2.2857 1.686 5.043 1.686 8.2721v1.4694h-20.773c.145 2.8299.888 4.9523 2.23 6.3673 1.377 1.415 3.226 2.1225 5.546 2.1225 1.704 0 3.118-.3991 4.242-1.1973s1.903-1.8685 2.338-3.2109l5.982.3809c-.761 2.6849-2.266 4.8617-4.514 6.5307-2.211 1.6326-4.912 2.4489-8.102 2.4489zm-7.722-17.7959h14.682c-.181-2.5759-.924-4.4807-2.229-5.7143-1.269-1.2335-2.9-1.8503-4.894-1.8503-2.067 0-3.771.6531-5.112 1.9592-1.305 1.2698-2.121 3.1383-2.447 5.6054z"/></g></svg>
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: agentplane
3
+ description: Use when a repository uses AgentPlane or the user wants a governed git-native workflow for planning, task execution, verification, and closure.
4
+ ---
5
+
6
+ # AgentPlane
7
+
8
+ Use AgentPlane through its CLI instead of editing `.agentplane/` state directly.
9
+
10
+ ## When to use
11
+
12
+ - The repository already contains `AGENTS.md` or `.agentplane/`.
13
+ - The user wants to initialize AgentPlane in a repository.
14
+ - The user wants explicit planning, task IDs, verification evidence, or `branch_pr` worktrees.
15
+
16
+ ## Startup
17
+
18
+ 1. If the repository is not initialized, run `agentplane init`.
19
+ 2. Run `agentplane quickstart`.
20
+ 3. Inspect `AGENTS.md`, `agentplane task list`, `git status --short --untracked-files=no`, and `git rev-parse --abbrev-ref HEAD`.
21
+ 4. Use `agentplane role ORCHESTRATOR` while planning and approvals are active.
22
+ 5. Switch to `agentplane role <ROLE>` before owner-scoped execution or verification.
23
+
24
+ ## Rules
25
+
26
+ - Treat `AGENTS.md`, `agentplane quickstart`, and `agentplane role <ROLE>` as the policy surface.
27
+ - Use `agentplane task ...`, `agentplane work ...`, `agentplane verify ...`, and `agentplane finish ...`; do not edit `.agentplane/tasks.json` manually.
28
+ - In `branch_pr`, start from `agentplane work start <task-id> --agent <ROLE> --slug <slug> --worktree`.
29
+ - Keep repository artifacts in English unless the user explicitly requests another language for a specific artifact.
30
+ - Record verification evidence in the task README and through `agentplane verify`.
31
+
32
+ ## Limits
33
+
34
+ - This plugin bundles workflow guidance only. It does not install the `agentplane` binary for you.
35
+ - If `agentplane` is missing from `PATH`, install it first, then use the workflow commands above.
@@ -2,12 +2,14 @@
2
2
 
3
3
  ## Incident source of truth
4
4
 
5
- - `.agentplane/policy/incidents.md` is the single incident registry.
6
- - Incident-derived and situational rules MUST be added only to `incidents.md`.
5
+ - `.agentplane/policy/incidents.md` is the active incident registry for unresolved incidents that still need operator attention or follow-up engineering work.
6
+ - `docs/developer/incident-archive.mdx` is the historical archive for stabilized or externally mitigated incidents that no longer belong in the active registry.
7
+ - Incident-derived and situational rules MUST be added to `incidents.md` first while the incident remains active; once it is no longer active, move the entry to the archive instead of keeping it in the active file.
7
8
  - MUST NOT create additional incident policy files under `.agentplane/policy/`.
8
9
  - New reusable operational incidents SHOULD be promoted from task `Findings` via `agentplane finish` or `agentplane incidents collect <task-id>`.
9
10
  - Auto-promotion is reserved for resolved reusable findings marked `Fixability: external` or `Fixability: repo-fixable` (or the compatibility markers `IncidentExternal: true` / `IncidentInternal: true`); optional `IncidentScope`, `IncidentAdvice`, `IncidentRule`, `IncidentTags`, and `IncidentMatch` fields override the inferred registry entry when needed.
10
11
  - Normal startup MUST NOT bulk-load `incidents.md`; targeted lookup for analogous work is allowed through `task start-ready` and `agentplane incidents advise`.
12
+ - Closed incidents MAY be removed from `.agentplane/policy/incidents.md`, but only after their final state and evidence have been preserved in `docs/developer/incident-archive.mdx`.
11
13
 
12
14
  ## Stabilization criteria
13
15
 
@@ -1,21 +1,5 @@
1
1
  # Policy Incidents Log
2
2
 
3
- - Append-only. Required fields: `id`, `date`, `scope`, `failure`, `rule`, `evidence`, `enforcement`, `state`; optional: `tags`, `match`, `advice`, `source_task`, `fixability`.
4
- - id: INC-20260308-01 | date: 2026-03-08 | scope: release apply internal push path | failure: release apply re-entered local pre-push hooks and could stall after creating the local release commit and tag | rule: Release orchestration MUST push its own release refs without recursively re-entering local pre-push hooks. | evidence: task 202603061532-9Y41NM; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 4 | enforcement: test + command implementation | state: stabilized
5
- - id: INC-20260308-02 | date: 2026-03-08 | scope: stale-dist guard in framework checkout | failure: stale-dist enforcement treated git dirtiness as stale runtime and blocked diagnostics or rebuilt checkouts incorrectly | rule: Stale-dist freshness MUST compare current runtime inputs against the recorded build snapshot, and read-only diagnostics MUST warn-and-run instead of hard-failing on dirty runtime trees. | evidence: tasks 202603072032-2M0V8V, 202603072032-1BC7VQ, 202603072032-V9VGT2, 202603072032-4D9ASG | enforcement: test + runtime guard | state: stabilized
6
- - id: INC-20260308-03 | date: 2026-03-08 | scope: framework checkout PATH resolution | failure: contributors inside the framework repo could execute an older global agentplane binary instead of the checkout they were editing | rule: Inside the framework checkout, agentplane resolved from PATH MUST hand off to the repo-local runtime by default unless an explicit global opt-out is set. | evidence: tasks 202603071647-M0Q79C, 202603071647-Y4BZ1T, 202603071647-25WS52 | enforcement: test + wrapper logic | state: stabilized
7
- - id: INC-20260308-04 | date: 2026-03-08 | scope: release mutation generated surfaces | failure: release apply could leave version-sensitive generated docs stale until later parity checks failed | rule: Release mutation MUST regenerate and stage generated docs that encode released package versions as part of the release commit itself. | evidence: task 202603071745-T3QE04; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 5 | enforcement: test + release mutation | state: stabilized
8
- - id: INC-20260308-05 | date: 2026-03-08 | scope: release mutation repository CLI expectation | failure: repository-owned framework.cli.expected_version could drift behind the actual released version because release apply did not persist it | rule: Release mutation MUST keep framework.cli.expected_version aligned with the released package version whenever repository config is present. | evidence: tasks 202603081315-Y4D6AE, 202603081538-GF7P9C; docs/developer/cli-bug-ledger-v0-3-x.mdx entry 3 | enforcement: test + release mutation | state: stabilized
9
- - id: INC-20260407-01 | date: 2026-04-07 | scope: branch_pr GitHub transport helpers | failure: GitHub transport intermittently failed with GraphQL EOF, TLS handshake errors, and SSL_ERROR_SYSCALL during PR creation, remote-check waiting, and reconcile helpers | advice: treat transient GitHub transport failures as retriable, prefer bounded polling or REST fallbacks over single-shot watch flows, and surface auth or usage failures immediately | rule: GitHub-dependent workflow helpers MUST classify EOF/TLS/SSL transport failures as transient and retry with bounded backoff; they MUST surface auth and usage failures immediately instead of looping or failing opaquely. | evidence: tasks 202604062101-XYXG7Y, 202604062309-QE4CX6, 202604050745-18JJ5E | enforcement: test + workflow helper | state: open
10
- - id: INC-20260407-02 | date: 2026-04-07 | scope: protected-main branch_pr closure permissions | failure: hosted branch_pr closure could not create follow-up PRs when the GitHub App or Actions token lacked PR creation rights, leaving manual closure tails after the task PR was already merged | advice: preserve deterministic closure metadata in task artifacts and complete the closure PR from an authenticated local session when hosted automation lacks create-PR permission | rule: Protected-main branch_pr closure MUST preserve enough task metadata for deterministic manual reconciliation when hosted automation cannot create the closure PR due to external GitHub permission limits. | evidence: tasks 202604032235-G375FB, 202604050745-18JJ5E, 202604062153-RSJFC2 | enforcement: manual + workflow | state: open
11
- - id: INC-20260407-03 | date: 2026-04-07 | scope: task findings incident promotion | failure: Structured findings needed hidden promote/external flags before incidents collection could see them. | advice: Use task findings add defaults for reusable incident candidates; use --local-only only for task-scoped notes. | rule: Structured findings intended as reusable workflow advice MUST promote by default; task-local-only notes MUST opt out explicitly with --local-only. | evidence: task 202604070754-ZD0ZAZ | enforcement: manual | state: open
12
- - id: INC-20260407-04 | date: 2026-04-07 | scope: task normalize hosted reconcile target selection | failure: GitHub EOF or TLS transport failures during hosted branch_pr reconcile could abort task normalize before it reached the known stale task because the command scanned every candidate task. | advice: When GitHub transport is flaky, reconcile only the known task ids instead of scanning the full branch_pr history. | rule: Hosted reconcile commands MUST support explicit task-id scoping so known drift can be resolved without depending on unrelated GitHub lookups. | evidence: task 202604071853-XGX2YJ; commit 5fd312cceb20 | enforcement: manual | state: open
13
- - id: INC-20260409-01 | date: 2026-04-09 | scope: branch_pr work-start base task README cleanup | failure: work start --worktree left untracked .agentplane/tasks/<task-id>/README.md copies in the base checkout and later git pull could block once upstream tracked the same paths | rule: branch_pr work start MUST remove base-checkout task README copies that were only materialized for the worktree, while keeping the worktree-local copies intact. | evidence: task 202604081931-77V6J5 | enforcement: test + command implementation | state: stabilized
14
- - id: INC-20260409-02 | date: 2026-04-09 | scope: branch_pr follow-up orchestration helpers | match: branch_pr, integrate, pr artifacts, pr meta, wait-remote-checks, remote checks, multi pr | failure: integrate recovery assumed PR artifacts already existed and the remote-check wait helper only accepted one PR target, forcing manual base-side hydration and serial closure-wave waiting. | advice: keep integrate able to recover PR metadata without a pre-hydrated base checkout and let remote-check waiting accept explicit PR batches during closure waves. | rule: branch_pr follow-up helpers MUST recover missing PR artifacts from available branch or hosted metadata and MUST accept explicit multi-PR batches so integrate and remote-check waiting stay runnable during closure waves. | evidence: tasks 202604091136-SR7Z25, 202604091136-V5N3P8; fixes 202604091218-WWSX2G, 202604091218-8S07FZ | enforcement: test + command implementation | state: open
15
- - id: INC-20260409-03 | date: 2026-04-09 | scope: Make branch_pr hosted-merge reconcile and task normalize resolve GitHub auth from the user's existing gh login, without requiring a manual GH_TOKEN export in the shell. | tags: code, github, workflow | match: code, github, workflow, make, branch, hosted, merge, reconcile, and, task, normalize, resolve, auth, from, the, user | failure: Repo dotenv loading could inject GITHUB_TOKEN into gh subprocesses and override a valid gh keyring session during hosted merge sync. | advice: Track auth vars loaded only from repo dotenv and strip them from gh child env, while preserving explicit shell or CI auth tokens and HOME-based gh sessions. | rule: Analogous Make branch_pr hosted-merge reconcile and task normalize resolve GitHub auth from the user's existing gh login, without requiring a manual GH_TOKEN export in the shell. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604091841-2ZX1MQ; commit 3f71884dad3e | enforcement: manual | fixability: external | state: open
16
- - id: INC-20260409-04 | date: 2026-04-09 | scope: Make merged branch_pr tasks land in tracked main history as DONE with reconciled PR metadata, so pulling origin/main does not reopen them as DOING or require local normalize dirt. | tags: code, tasks, workflow | match: code, tasks, workflow, make, merged, branch, land, tracked, main, history, done, with, reconciled, metadata, pulling, origin | failure: Hosted-close recovery had to be driven one task at a time even when multiple remote task-close branches were already waiting, so merged tasks stayed DOING on main longer than necessary. | advice: Allow task hosted-close-pr to accept multiple task ids in one invocation so closure PR batches can be materialized deterministically from the existing remote task-close branches. | rule: Analogous Make merged branch_pr tasks land in tracked main history as DONE with reconciled PR metadata, so pulling origin/main does not reopen them as DOING or require local normalize dirt. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604091841-PX5WAV | enforcement: manual | fixability: external | state: open
17
- - id: INC-20260409-05 | date: 2026-04-09 | scope: branch_pr verify/finish incident no-op messaging | tags: incidents, workflow, ux | match: incidents, workflow, ux, branch, verify, finish, incident, messaging, explain, registry, outcome, explicitly, and, operators, still, misread | failure: Lifecycle no-op output for verify and finish looked indistinguishable from a broken incidents pipeline, so operators could not tell when incidents.md stayed unchanged only because the note/body was plain text. | advice: Print context-specific verify and finish messages that explicitly name incidents.md, explain that plain notes stay task-local, and point operators at observation/impact/resolution fields or explicit collection on base. | rule: Analogous branch_pr verify/finish incident no-op messaging work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604092105-RF8TWW | enforcement: manual | fixability: repo-fixable | state: open
18
- - id: INC-20260410-01 | date: 2026-04-10 | scope: Preflight hides cross-task workflow artifact drift when tracked status looks clean. | tags: workflow, git, ux, code | match: workflow, git, ux, code, preflight, hides, cross, task, artifact, drift, when, tracked, status, looks, clean, expose | failure: Preflight could report a tracked-clean working tree while untracked .agentplane/tasks artifacts from other task ids were still present and capable of breaking later integrate or close flows. | advice: Preflight now inspects full changed paths under the workflow task directory, reports task artifact drift explicitly in JSON/text output, and points operators at git status --short --untracked-files=all -- .agentplane/tasks. | rule: Analogous Preflight hides cross-task workflow artifact drift when tracked status looks clean. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100023-MFGFK9; commit a2b9ccf1e12e | enforcement: manual | fixability: repo-fixable | state: open
19
- - id: INC-20260410-02 | date: 2026-04-10 | scope: Integrate leaves framework runtime stale after watched-source merges. | tags: workflow, runtime, git, code | match: workflow, runtime, git, code, integrate, leaves, framework, stale, after, watched, source, merges, auto, bootstrap, touches, sources | failure: Base-side integrate could land watched runtime source changes in the framework checkout, but the repo-local runtime stayed stale until the operator manually ran framework bootstrap before finish closeout. | advice: Integrate now auto-runs bun run framework:dev:bootstrap in framework checkouts when watched runtime sources changed, and falls back to explicit manual guidance only if the refresh fails. | rule: Analogous Integrate leaves framework runtime stale after watched-source merges. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100023-EVJWDM; commit 0f4d2f9a92e0 | enforcement: manual | fixability: repo-fixable | state: open
20
- - id: INC-20260410-03 | date: 2026-04-10 | scope: Integrate currently can apply task code onto the base branch and only then discover that the task branch never committed .agentplane/tasks/<task-id>/pr artifacts. Validate the branch-backed task/PR artifact set before any merge-side mutation so base never advances when closeout metadata is absent. | tags: code, workflow | match: code, workflow, integrate, currently, can, apply, task, onto, the, base, branch, and, only, then, discover, that | failure: Integrate validated task/PR metadata too late: a task branch could omit committed .agentplane/tasks/<task-id>/pr artifacts and still reach merge-side mutation before failing. | advice: Added committed-artifact validation before merge-side mutation, covered the missing-artifact and post-merge-removal regressions, and updated prepare.test mocks for the new contract. | rule: Analogous Integrate currently can apply task code onto the base branch and only then discover that the task branch never committed .agentplane/tasks/<task-id>/pr artifacts. Validate the branch-backed task/PR artifact set before any merge-side mutation so base never advances when closeout metadata is absent. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100213-MVAGSD | enforcement: manual | fixability: external | state: open
21
- - id: INC-20260410-04 | date: 2026-04-10 | scope: Verify-required task scaffolds currently seed a placeholder Verify Steps block that immediately fails plan approval. Generate concrete acceptance steps from the primary tag and any explicit verify commands so a freshly scaffolded task is reviewable without manual README surgery. | tags: code, workflow | match: code, workflow, verify, required, task, scaffolds, currently, seed, placeholder, steps, block, that, immediately, fails, plan, approval | failure: Verify-required task scaffolds could seed a placeholder Verify Steps block when no explicit verify command was supplied, so plan approval failed on a fresh task before any human refinement. | advice: Removed the placeholder path for verify-required scaffolds without explicit verify commands, updated warning text to reflect concrete seeded acceptance steps, and added regression coverage for task new, task derive, and plan approve. | rule: Analogous Verify-required task scaffolds currently seed a placeholder Verify Steps block that immediately fails plan approval. Generate concrete acceptance steps from the primary tag and any explicit verify commands so a freshly scaffolded task is reviewable without manual README surgery. work MUST review and apply the recorded external incident advice before retrying. | evidence: task 202604100213-1AAPW1 | enforcement: manual | fixability: external | state: open
3
+ - Active-only registry. Keep here only unresolved incidents that still need operator attention or follow-up engineering work.
4
+ - Move stabilized or externally mitigated incidents to `docs/developer/incident-archive.mdx`.
5
+ - Required fields: `id`, `date`, `scope`, `failure`, `rule`, `evidence`, `enforcement`, `state`; optional: `tags`, `match`, `advice`, `source_task`, `fixability`.
@@ -8,7 +8,7 @@ Use this module when task touches release/version/publish flows.
8
8
  2. CHECKPOINT B: generate release plan and freeze version/tag target.
9
9
  3. Generate release notes with complete human-readable coverage of all task-level changes.
10
10
  4. Run release prepublish checks.
11
- 5. CHECKPOINT C: apply release and push/tag only after all gates pass.
11
+ 5. CHECKPOINT C: choose the workflow-specific publication route after all gates pass.
12
12
  6. Record release evidence (commands, outputs, resulting version/tag).
13
13
 
14
14
  ## Command contract
@@ -18,7 +18,8 @@ git status --short --untracked-files=no
18
18
  agentplane task plan set <task-id> --text "Release plan: version=<v>, tag=<t>, scope=<...>" --updated-by <ROLE>
19
19
  agentplane task plan approve <task-id> --by ORCHESTRATOR
20
20
  agentplane release plan --patch
21
- agentplane release apply --push --yes
21
+ agentplane release apply --push --yes # direct mode only
22
+ agentplane release candidate --push --yes # branch_pr mode only
22
23
  agentplane verify <task-id> --ok|--rework --by <ROLE> --note "Release checks: ..."
23
24
  agentplane finish <task-id> --author <ROLE> --body "Verified: release" --result "Release <v> published" --commit <git-rev> --close-commit
24
25
  ```
@@ -29,3 +30,5 @@ agentplane finish <task-id> --author <ROLE> --body "Verified: release" --result
29
30
  - MUST NOT skip parity/version checks.
30
31
  - MUST NOT bypass required notes validation.
31
32
  - MUST stop and request re-approval if release scope/tag/version changes.
33
+ - In `direct`, `release apply --push --yes` is the publication route and may create/push the release tag.
34
+ - In `branch_pr`, `release apply` is not the publication route; use `release candidate --push --yes`, merge the candidate into the protected base branch, then let hosted publish run from `main`.
package/bin/agentplane.js CHANGED
@@ -26,7 +26,17 @@ async function exists(p) {
26
26
  async function maybeWarnGlobalBinaryInRepoCheckout() {
27
27
  const thisBin = fileURLToPath(import.meta.url);
28
28
  const context = resolveFrameworkBinaryContext({ cwd: process.cwd(), thisBin });
29
- if (!context.inFrameworkCheckout || context.isRepoLocalBinary) return;
29
+ const currentBinaryContext = resolveFrameworkBinaryContext({
30
+ cwd: path.dirname(thisBin),
31
+ thisBin,
32
+ });
33
+ if (
34
+ !context.inFrameworkCheckout ||
35
+ context.isRepoLocalBinary ||
36
+ context.isRepoLocalRuntime ||
37
+ currentBinaryContext.isRepoLocalRuntime
38
+ )
39
+ return;
30
40
 
31
41
  const normalizedThis = path.resolve(thisBin);
32
42
  const normalizedRepo = path.resolve(context.checkout.repoBin);
@@ -102,7 +112,21 @@ function handoffToRepoLocalBinary(context) {
102
112
  return true;
103
113
  }
104
114
 
105
- function maybeHandoffToRepoLocalBinary() {
115
+ async function repoLocalRuntimeReady(repoBin) {
116
+ if (!repoBin) return false;
117
+ const agentplaneRoot = path.resolve(path.dirname(repoBin), "..");
118
+ if (!(await distExists(agentplaneRoot))) return false;
119
+ return missingRepoRuntimeDependencies(agentplaneRoot).length === 0;
120
+ }
121
+
122
+ function resolveCurrentBinaryFrameworkContext(thisBin) {
123
+ return resolveFrameworkBinaryContext({
124
+ cwd: path.dirname(thisBin),
125
+ thisBin,
126
+ });
127
+ }
128
+
129
+ async function maybeHandoffToRepoLocalBinary() {
106
130
  if (shouldUseGlobalBinaryInFramework() || isRepoLocalHandoffInvocation()) return false;
107
131
 
108
132
  const context = resolveFrameworkBinaryContext({
@@ -111,6 +135,37 @@ function maybeHandoffToRepoLocalBinary() {
111
135
  });
112
136
  if (!context.inFrameworkCheckout || context.isRepoLocalBinary) return false;
113
137
 
138
+ if (!(await repoLocalRuntimeReady(context.checkout?.repoBin ?? ""))) {
139
+ const currentBinaryContext = resolveCurrentBinaryFrameworkContext(context.thisBin);
140
+ const canStayOnCurrentRepoLocalBinary =
141
+ currentBinaryContext.inFrameworkCheckout &&
142
+ currentBinaryContext.isRepoLocalRuntime &&
143
+ currentBinaryContext.checkout?.repoRoot !== context.checkout?.repoRoot;
144
+ if (canStayOnCurrentRepoLocalBinary) {
145
+ process.stderr.write(
146
+ "warning: target framework checkout repo-local runtime is not bootstrapped; " +
147
+ `staying on current repo-local binary: ${context.thisBin}\n` +
148
+ `unbootstrapped checkout binary: ${context.checkout?.repoBin ?? "<missing>"}\n` +
149
+ `fix target checkout with: ${FRAMEWORK_DEV_BOOTSTRAP_COMMAND}\n`,
150
+ );
151
+ return false;
152
+ }
153
+
154
+ const canStayOnCurrentInstalledBinary =
155
+ !currentBinaryContext.inFrameworkCheckout &&
156
+ !currentBinaryContext.isRepoLocalBinary &&
157
+ !currentBinaryContext.isRepoLocalRuntime;
158
+ if (canStayOnCurrentInstalledBinary) {
159
+ process.stderr.write(
160
+ "warning: target framework checkout repo-local runtime is not bootstrapped; " +
161
+ `staying on current installed binary: ${context.thisBin}\n` +
162
+ `unbootstrapped checkout binary: ${context.checkout?.repoBin ?? "<missing>"}\n` +
163
+ `fix target checkout with: ${FRAMEWORK_DEV_BOOTSTRAP_COMMAND}\n`,
164
+ );
165
+ return false;
166
+ }
167
+ }
168
+
114
169
  return handoffToRepoLocalBinary(context);
115
170
  }
116
171
 
@@ -279,7 +334,7 @@ const runtimeContext = resolveFrameworkBinaryContext({
279
334
  });
280
335
  primeRuntimeEnv(runtimeContext);
281
336
 
282
- if (!maybeHandoffToRepoLocalBinary()) {
337
+ if (!(await maybeHandoffToRepoLocalBinary())) {
283
338
  await maybeWarnGlobalBinaryInRepoCheckout();
284
339
  const ok = isHooksRunCommitMsgInvocation(process.argv) ? true : await assertDistUpToDate();
285
340
  if (ok) await import("../dist/cli.js");
@@ -38,6 +38,10 @@ function isPreflightCommand(args) {
38
38
  return args[0] === "preflight";
39
39
  }
40
40
 
41
+ function isPostMergeHookCommand(args) {
42
+ return args[0] === "hooks" && args[1] === "run" && args[2] === "post-merge";
43
+ }
44
+
41
45
  function isTaskArtifactMutationCommand(args) {
42
46
  if (args[0] === "verify") return true;
43
47
  if (args[0] === "finish") return true;
@@ -58,7 +62,8 @@ export function classifyStaleDistPolicy(argv = process.argv) {
58
62
  isConfigInspectionCommand(args) ||
59
63
  isTaskInspectionCommand(args) ||
60
64
  isReadyInspectionCommand(args) ||
61
- isPreflightCommand(args)
65
+ isPreflightCommand(args) ||
66
+ isPostMergeHookCommand(args)
62
67
  ) {
63
68
  return { mode: "warn_and_run", reason: "read_only_diagnostic" };
64
69
  }