mandrel 1.59.0 → 1.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/.agents/README.md +86 -44
  2. package/.agents/docs/SDLC.md +135 -141
  3. package/.agents/docs/configuration.md +77 -20
  4. package/.agents/docs/quality-gates.md +796 -0
  5. package/.agents/docs/workflows.md +6 -9
  6. package/.agents/instructions.md +12 -11
  7. package/.agents/personas/architect.md +1 -1
  8. package/.agents/personas/product.md +1 -1
  9. package/.agents/personas/project-manager.md +14 -14
  10. package/.agents/personas/technical-writer.md +1 -1
  11. package/.agents/rules/changelog-style.md +5 -5
  12. package/.agents/rules/git-conventions.md +3 -3
  13. package/.agents/runtime-deps.json +2 -2
  14. package/.agents/schemas/agentrc.schema.json +3 -3
  15. package/.agents/schemas/dispatch-manifest.json +4 -4
  16. package/.agents/schemas/epic-spec.schema.json +15 -45
  17. package/.agents/schemas/lifecycle/README.md +1 -1
  18. package/.agents/schemas/lifecycle/story.dispatch.end.schema.json +1 -1
  19. package/.agents/schemas/lifecycle/story.dispatch.start.schema.json +1 -1
  20. package/.agents/schemas/lifecycle/story.heartbeat.schema.json +1 -1
  21. package/.agents/schemas/validation-evidence.schema.json +1 -1
  22. package/.agents/scripts/README.md +2 -2
  23. package/.agents/scripts/acceptance-eval.js +1 -1
  24. package/.agents/scripts/acceptance-spec-reconciler.js +2 -2
  25. package/.agents/scripts/agents-bootstrap-github.js +23 -119
  26. package/.agents/scripts/analyze-execution.js +2 -2
  27. package/.agents/scripts/audit-to-stories.js +1 -1
  28. package/.agents/scripts/check-doc-links.js +2 -3
  29. package/.agents/scripts/diagnose-friction.js +1 -1
  30. package/.agents/scripts/dispatcher.js +2 -2
  31. package/.agents/scripts/drain-pending-cleanup.js +1 -1
  32. package/.agents/scripts/epic-audit-prepare.js +3 -3
  33. package/.agents/scripts/epic-deliver-note-intervention.js +2 -2
  34. package/.agents/scripts/epic-deliver-preflight.js +6 -6
  35. package/.agents/scripts/epic-deliver-prepare.js +1 -1
  36. package/.agents/scripts/epic-execute-record-wave.js +4 -4
  37. package/.agents/scripts/epic-plan-healthcheck.js +6 -10
  38. package/.agents/scripts/epic-plan-spec-validate.js +1 -1
  39. package/.agents/scripts/epic-reconcile.js +11 -29
  40. package/.agents/scripts/evidence-gate.js +1 -1
  41. package/.agents/scripts/generate-workflows-doc.js +1 -1
  42. package/.agents/scripts/hierarchy-gate.js +7 -11
  43. package/.agents/scripts/lib/ITicketingProvider.js +1 -1
  44. package/.agents/scripts/lib/audit-suite/selector.js +1 -1
  45. package/.agents/scripts/lib/audit-to-stories/seed-epic-from-findings.js +2 -2
  46. package/.agents/scripts/lib/baseline-snapshot.js +7 -7
  47. package/.agents/scripts/lib/bdd-runner-detect.js +1 -1
  48. package/.agents/scripts/lib/bdd-scenario-scanner.js +3 -3
  49. package/.agents/scripts/lib/bootstrap/baselines-layout-migration.js +1 -1
  50. package/.agents/scripts/lib/bootstrap/branch-protection.js +1 -1
  51. package/.agents/scripts/lib/bootstrap/ci-workflow-template.js +47 -1
  52. package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
  53. package/.agents/scripts/lib/bootstrap/gh-preflight.js +7 -9
  54. package/.agents/scripts/lib/bootstrap/manifest.js +21 -1
  55. package/.agents/scripts/lib/bootstrap/merge-methods.js +31 -16
  56. package/.agents/scripts/lib/bootstrap/project-bootstrap.js +32 -11
  57. package/.agents/scripts/lib/codebase-snapshot.js +1 -1
  58. package/.agents/scripts/lib/config/explain.js +1 -1
  59. package/.agents/scripts/lib/config/runners.js +2 -2
  60. package/.agents/scripts/lib/config/runtime.js +1 -1
  61. package/.agents/scripts/lib/config/sync-agentrc.js +1 -1
  62. package/.agents/scripts/lib/config/temp-paths.js +2 -2
  63. package/.agents/scripts/lib/config-settings-schema-delivery.js +2 -2
  64. package/.agents/scripts/lib/config-settings-schema-quality.js +1 -1
  65. package/.agents/scripts/lib/config-settings-schema.js +3 -3
  66. package/.agents/scripts/lib/detect-package-manager.js +72 -0
  67. package/.agents/scripts/lib/duplicate-search.js +1 -1
  68. package/.agents/scripts/lib/dynamic-workflow/capability.js +1 -1
  69. package/.agents/scripts/lib/epic-plan-clarity.js +1 -1
  70. package/.agents/scripts/lib/epic-plan-ideation.js +1 -1
  71. package/.agents/scripts/lib/errors/index.js +4 -4
  72. package/.agents/scripts/lib/feedback-loop/memory-freshness.js +1 -1
  73. package/.agents/scripts/lib/feedback-loop/prior-feedback-fetcher.js +1 -1
  74. package/.agents/scripts/lib/findings/classify-finding.js +1 -1
  75. package/.agents/scripts/lib/findings/promote-finding.js +10 -10
  76. package/.agents/scripts/lib/label-constants.js +3 -4
  77. package/.agents/scripts/lib/label-taxonomy.js +5 -10
  78. package/.agents/scripts/lib/onboard/detect-stack.js +10 -10
  79. package/.agents/scripts/lib/onboard/init-tail.js +218 -0
  80. package/.agents/scripts/lib/onboard/scaffold-docs.js +18 -3
  81. package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +1 -1
  82. package/.agents/scripts/lib/orchestration/code-review.js +5 -5
  83. package/.agents/scripts/lib/orchestration/context-hydration-engine.js +8 -9
  84. package/.agents/scripts/lib/orchestration/dependency-analyzer.js +3 -3
  85. package/.agents/scripts/lib/orchestration/detectors-phase.js +2 -2
  86. package/.agents/scripts/lib/orchestration/dispatch-engine.js +30 -38
  87. package/.agents/scripts/lib/orchestration/dispatch-pipeline.js +9 -25
  88. package/.agents/scripts/lib/orchestration/epic-cleanup.js +1 -1
  89. package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +8 -8
  90. package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/creation.js +1 -1
  91. package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/dag.js +7 -21
  92. package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/diagnostics.js +3 -3
  93. package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +26 -13
  94. package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +1 -1
  95. package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/prompts.js +1 -1
  96. package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/run-spec-phase.js +2 -2
  97. package/.agents/scripts/lib/orchestration/epic-plan-state-store.js +1 -1
  98. package/.agents/scripts/lib/orchestration/epic-run-state-store.js +3 -3
  99. package/.agents/scripts/lib/orchestration/epic-runner/concurrency-gate.js +4 -4
  100. package/.agents/scripts/lib/orchestration/epic-runner/deliver-phases.js +3 -3
  101. package/.agents/scripts/lib/orchestration/epic-runner/phases/build-wave-dag.js +6 -21
  102. package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +7 -7
  103. package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +1 -1
  104. package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +2 -2
  105. package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +4 -4
  106. package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +4 -4
  107. package/.agents/scripts/lib/orchestration/epic-runner/story-run-progress-writer.js +8 -8
  108. package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +4 -4
  109. package/.agents/scripts/lib/orchestration/epic-spec-reconciler-apply.js +7 -15
  110. package/.agents/scripts/lib/orchestration/epic-spec-reconciler-diff.js +72 -41
  111. package/.agents/scripts/lib/orchestration/epic-spec-reconciler-ops.js +2 -4
  112. package/.agents/scripts/lib/orchestration/file-assumptions.js +2 -2
  113. package/.agents/scripts/lib/orchestration/finalize/close-planning-tickets.js +1 -1
  114. package/.agents/scripts/lib/orchestration/finalize/open-or-locate-pr.js +2 -2
  115. package/.agents/scripts/lib/orchestration/finalize/sanitize-skip-ci.js +1 -1
  116. package/.agents/scripts/lib/orchestration/lease-guard-shared.js +3 -3
  117. package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +1 -1
  118. package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +1 -1
  119. package/.agents/scripts/lib/orchestration/lifecycle/listeners/README.md +1 -1
  120. package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-armer.js +1 -1
  121. package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-predicate.js +1 -1
  122. package/.agents/scripts/lib/orchestration/lifecycle/listeners/branch-cleaner.js +1 -1
  123. package/.agents/scripts/lib/orchestration/lifecycle/listeners/finalizer.js +1 -1
  124. package/.agents/scripts/lib/orchestration/lifecycle/listeners/index.js +1 -1
  125. package/.agents/scripts/lib/orchestration/lifecycle/listeners/merge-watcher.js +1 -1
  126. package/.agents/scripts/lib/orchestration/lifecycle/listeners/notify-dispatcher.js +1 -1
  127. package/.agents/scripts/lib/orchestration/lifecycle/listeners/watcher.js +1 -1
  128. package/.agents/scripts/lib/orchestration/manifest-builder.js +5 -5
  129. package/.agents/scripts/lib/orchestration/parked-follow-ons.js +2 -2
  130. package/.agents/scripts/lib/orchestration/plan-runner/plan-router.js +5 -5
  131. package/.agents/scripts/lib/orchestration/post-merge/phases/ticket-closure.js +3 -3
  132. package/.agents/scripts/lib/orchestration/preflight-cache.js +1 -1
  133. package/.agents/scripts/lib/orchestration/recurring-failure-detector.js +1 -1
  134. package/.agents/scripts/lib/orchestration/retro/phases/compose-body.js +1 -1
  135. package/.agents/scripts/lib/orchestration/retro/phases/gather-signals.js +2 -2
  136. package/.agents/scripts/lib/orchestration/retro-runner.js +3 -3
  137. package/.agents/scripts/lib/orchestration/review-depth.js +1 -1
  138. package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +1 -1
  139. package/.agents/scripts/lib/orchestration/spec-freshness.js +1 -1
  140. package/.agents/scripts/lib/orchestration/spec-renderer.js +36 -73
  141. package/.agents/scripts/lib/orchestration/spec-section-validator.js +1 -1
  142. package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +1 -1
  143. package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +2 -2
  144. package/.agents/scripts/lib/orchestration/task-body-validator.js +6 -6
  145. package/.agents/scripts/lib/orchestration/ticket-lease.js +1 -1
  146. package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +2 -2
  147. package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +1 -10
  148. package/.agents/scripts/lib/orchestration/ticket-validator.js +25 -70
  149. package/.agents/scripts/lib/orchestration/ticketing/bulk.js +5 -12
  150. package/.agents/scripts/lib/orchestration/ticketing/reads.js +8 -8
  151. package/.agents/scripts/lib/orchestration/ticketing/state.js +3 -3
  152. package/.agents/scripts/lib/orchestration/wave-record-notifications.js +2 -2
  153. package/.agents/scripts/lib/orchestration/wave-record-projection.js +1 -1
  154. package/.agents/scripts/lib/plan-phase-cleanup.js +1 -1
  155. package/.agents/scripts/lib/preflight-runner.js +1 -1
  156. package/.agents/scripts/lib/presentation/dispatch-manifest-render.js +4 -5
  157. package/.agents/scripts/lib/presentation/manifest-builder.js +28 -34
  158. package/.agents/scripts/lib/presentation/manifest-formatter.js +3 -4
  159. package/.agents/scripts/lib/presentation/manifest-helpers.js +1 -1
  160. package/.agents/scripts/lib/presentation/manifest-procedures.js +4 -4
  161. package/.agents/scripts/lib/presentation/manifest-render-waves.js +4 -23
  162. package/.agents/scripts/lib/presentation/manifest-renderer.js +1 -1
  163. package/.agents/scripts/lib/presentation/manifest-story-views.js +2 -11
  164. package/.agents/scripts/lib/runtime-deps/preflight.js +6 -6
  165. package/.agents/scripts/lib/signals/schema.js +1 -1
  166. package/.agents/scripts/lib/spec/index.js +1 -1
  167. package/.agents/scripts/lib/spec/loader.js +2 -2
  168. package/.agents/scripts/lib/spec/state.js +7 -16
  169. package/.agents/scripts/lib/story-init/context-resolver.js +3 -3
  170. package/.agents/scripts/lib/story-init/state-transitioner.js +2 -2
  171. package/.agents/scripts/lib/story-init/task-graph-builder.js +7 -7
  172. package/.agents/scripts/lib/story-lifecycle.js +8 -8
  173. package/.agents/scripts/lib/story-plan.js +1 -1
  174. package/.agents/scripts/lib/templates/decomposer-prompts.js +59 -52
  175. package/.agents/scripts/lib/wave-runner/tick.js +1 -1
  176. package/.agents/scripts/lib/worktree/node-modules-strategy.js +5 -2
  177. package/.agents/scripts/lifecycle-emit-story-dispatch.js +1 -1
  178. package/.agents/scripts/lifecycle-emit.js +1 -1
  179. package/.agents/scripts/providers/github/board-add.js +1 -1
  180. package/.agents/scripts/providers/github/errors.js +1 -1
  181. package/.agents/scripts/providers/github/mappers.js +2 -2
  182. package/.agents/scripts/providers/github/tickets.js +4 -4
  183. package/.agents/scripts/resync-status-column.js +1 -1
  184. package/.agents/scripts/retro-run.js +2 -2
  185. package/.agents/scripts/run-lint.js +1 -1
  186. package/.agents/scripts/single-story-init.js +1 -1
  187. package/.agents/scripts/stories-wave-tick.js +5 -5
  188. package/.agents/scripts/story-close.js +1 -1
  189. package/.agents/scripts/story-init.js +13 -16
  190. package/.agents/scripts/story-phase.js +5 -5
  191. package/.agents/scripts/story-plan.js +3 -3
  192. package/.agents/scripts/sync-branch-from-base.js +1 -1
  193. package/.agents/scripts/validate-docs-freshness.js +1 -1
  194. package/.agents/scripts/wave-tick.js +1 -1
  195. package/.agents/skills/core/analyze-execution/SKILL.md +2 -2
  196. package/.agents/skills/core/epic-plan-consolidate/SKILL.md +21 -26
  197. package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +23 -56
  198. package/.agents/skills/core/epic-plan-spec-author/SKILL.md +4 -4
  199. package/.agents/skills/core/hydrate-context/SKILL.md +2 -2
  200. package/.agents/skills/core/idea-refinement/SKILL.md +4 -4
  201. package/.agents/skills/core/knowledge-transfer/SKILL.md +2 -2
  202. package/.agents/skills/core/planning-and-task-breakdown/SKILL.md +1 -1
  203. package/.agents/skills/core/scope-triage/SKILL.md +9 -10
  204. package/.agents/skills/core/using-agent-skills/SKILL.md +1 -1
  205. package/.agents/skills/skills.index.json +7 -7
  206. package/.agents/templates/agent-protocol.md +2 -2
  207. package/.agents/workflows/agents-update.md +16 -31
  208. package/.agents/workflows/audit-architecture.md +2 -2
  209. package/.agents/workflows/audit-clean-code.md +2 -2
  210. package/.agents/workflows/audit-dependencies.md +1 -1
  211. package/.agents/workflows/audit-devops.md +1 -1
  212. package/.agents/workflows/audit-documentation.md +2 -2
  213. package/.agents/workflows/audit-lighthouse.md +1 -1
  214. package/.agents/workflows/audit-performance.md +2 -2
  215. package/.agents/workflows/audit-privacy.md +1 -1
  216. package/.agents/workflows/audit-quality.md +2 -2
  217. package/.agents/workflows/audit-security.md +2 -2
  218. package/.agents/workflows/audit-seo.md +1 -1
  219. package/.agents/workflows/audit-sre.md +1 -1
  220. package/.agents/workflows/audit-to-stories.md +10 -10
  221. package/.agents/workflows/audit-ux-ui.md +1 -1
  222. package/.agents/workflows/deliver.md +85 -0
  223. package/.agents/workflows/explain.md +3 -3
  224. package/.agents/workflows/git-merge-pr.md +1 -1
  225. package/.agents/workflows/git-pr-all.md +13 -10
  226. package/.agents/workflows/git-push.md +6 -3
  227. package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
  228. package/.agents/workflows/helpers/acceptance-self-eval.md +1 -1
  229. package/.agents/workflows/helpers/agents-sync-config.md +3 -2
  230. package/.agents/workflows/helpers/code-review.md +5 -5
  231. package/.agents/workflows/{epic-deliver.md → helpers/deliver-epic.md} +43 -43
  232. package/.agents/workflows/{story-deliver.md → helpers/deliver-stories.md} +25 -25
  233. package/.agents/workflows/helpers/diagnose.md +1 -1
  234. package/.agents/workflows/helpers/epic-audit.md +6 -6
  235. package/.agents/workflows/helpers/epic-deliver-story.md +13 -13
  236. package/.agents/workflows/helpers/epic-plan-decompose.md +23 -23
  237. package/.agents/workflows/helpers/epic-plan-spec.md +6 -6
  238. package/.agents/workflows/helpers/epic-testing.md +3 -3
  239. package/.agents/workflows/helpers/parallel-tooling.md +1 -1
  240. package/.agents/workflows/{epic-plan.md → helpers/plan-epic.md} +84 -84
  241. package/.agents/workflows/{story-plan.md → helpers/plan-story.md} +43 -43
  242. package/.agents/workflows/helpers/signals.md +1 -1
  243. package/.agents/workflows/helpers/single-story-deliver.md +11 -11
  244. package/.agents/workflows/helpers/worktree-lifecycle.md +18 -18
  245. package/.agents/workflows/plan.md +131 -0
  246. package/.agents/workflows/qa-explore.md +1 -1
  247. package/.agents/workflows/qa-run-harness.md +1 -1
  248. package/README.md +19 -39
  249. package/bin/mandrel.js +235 -16
  250. package/docs/CHANGELOG.md +1173 -0
  251. package/lib/cli/doctor.js +45 -3
  252. package/lib/cli/init.js +97 -36
  253. package/lib/cli/registry.js +41 -145
  254. package/lib/cli/sync.js +122 -23
  255. package/lib/cli/uninstall.js +42 -7
  256. package/lib/cli/update.js +524 -210
  257. package/lib/cli/version-helpers.js +59 -0
  258. package/package.json +7 -6
  259. package/.agents/scripts/lib/orchestration/reconciler.js +0 -137
  260. package/.agents/workflows/onboard.md +0 -208
  261. package/lib/cli/__tests__/migrate.test.js +0 -268
  262. package/lib/cli/__tests__/sync-local-zone.test.js +0 -247
  263. package/lib/cli/__tests__/sync.test.js +0 -372
  264. package/lib/cli/__tests__/update-major.test.js +0 -217
  265. package/lib/cli/__tests__/update.test.js +0 -696
  266. package/lib/cli/__tests__/version-check.test.js +0 -398
  267. package/lib/migrations/__tests__/index.test.js +0 -216
@@ -38,8 +38,8 @@ top-level keys are validation errors.
38
38
  | ------------- | -------- | ---------------------------------------------------------------------------------- |
39
39
  | `project` | **Yes** | Project-local paths, base branch, validation commands, and context-hydration files. |
40
40
  | `github` | No | Ticketing provider config: owner/repo, branch protection, merge methods, notifications. |
41
- | `planning` | No | `/epic-plan` tuning: ticket budget, risk heuristics, codebase snapshot, context cap. |
42
- | `delivery` | No | `/epic-deliver` and `/story-deliver` tuning: quality gates, worktree isolation, runners, lifecycle. |
41
+ | `planning` | No | `/plan` tuning: ticket budget, risk heuristics, codebase snapshot, context cap. |
42
+ | `delivery` | No | `/deliver` and `/deliver` tuning: quality gates, worktree isolation, runners, lifecycle. |
43
43
  | `$schema` | No | JSON Schema pointer for editor tooling. |
44
44
 
45
45
  ---
@@ -266,13 +266,13 @@ top-level keys are validation errors.
266
266
  | `mergeWatch.intervalSeconds` | No | `integer` | `30` | Seconds between MergeWatcher polls. Default 30. |
267
267
  | `mergeWatch.maxBudgetSeconds` | No | `integer` | `3600` | Total wall-clock budget (seconds) for the MergeWatcher poll loop. Default 3600 (60 minutes). |
268
268
  | `epicAudit` | No | `object` | — | Nested configuration block. |
269
- | `epicAudit.maxFixAttempts` | No | `integer` | — | Maximum auto-fix retry attempts per finding in /epic-deliver Phase 4 (epic-audit). 0 disables auto-fix. Default 3. |
269
+ | `epicAudit.maxFixAttempts` | No | `integer` | — | Maximum auto-fix retry attempts per finding in /deliver Phase 4 (epic-audit). 0 disables auto-fix. Default 3. |
270
270
  | `epicAudit.maxFixScopeFiles` | No | `integer` | — | Maximum file count a single auto-fix may modify before escalating to agent::blocked. Default 5. |
271
271
  | `codeReview` | No | `object` | — | Nested configuration block. |
272
272
  | `codeReview.provider` | No | `"native"` \| `"codex"` \| `"security-review"` | `"native"` | Legacy single-adapter selection. ReviewProvider that produces the Finding[] consumed by runCodeReview(). Story #2833 registered `native` (in-process maintainability/lint); Story #2830 added `codex` (invokes `/codex:review` plugin); Story #2871 added `security-review` (shells out to `claude --print /security-review`). When `providers` (chain shape) is set this field is ignored with a warning. Selecting an adapter whose probe fails hard-fails at factory construction unless declared `optional: true` in the chain. |
273
273
  | `codeReview.providers[]` | No | `array<object>` | — | Multi-provider chain (Story #2871). When set and non-empty, takes precedence over the legacy `provider` field. The orchestrator iterates inline entries in declaration order and merges their Finding[] before posting one structured comment; manual-prompt entries (e.g. ultrareview) contribute a trailing 'Manual review suggestions' section. Each item has: name, scopes, optional, manualPrompt, when. |
274
274
  | `codeReview.providerConfig` | No | `object` | — | Optional escape hatch for adapter-specific configuration. No documented keys in Epic #2815; reserved so future adapters can be configured without another schema migration. |
275
- | `codeReview.maxFixAttempts` | No | `integer` | — | Maximum auto-fix retry attempts per finding in /epic-deliver Phase 5 (code-review). 0 disables auto-fix. Default 3. |
275
+ | `codeReview.maxFixAttempts` | No | `integer` | — | Maximum auto-fix retry attempts per finding in /deliver Phase 5 (code-review). 0 disables auto-fix. Default 3. |
276
276
  | `codeReview.maxFixScopeFiles` | No | `integer` | — | Maximum file count a single auto-fix may modify before escalating to agent::blocked. Default 5. |
277
277
  | `retro` | No | `object` | — | Story #3042 (Epic #3019). Operator-tunable retro behaviour. Currently exposes `perfThresholds`, the gates the retro perf-signals classifier uses to decide which signals to surface in the `## Performance Signals` / `## Recommended Follow-Ons` retro sections. |
278
278
  | `retro.perfThresholds` | No | `object` | — | Gates for `classifyPerfSignals` (lib/orchestration/retro-perf-heuristics.js). Defaults are 0.6 / 0.4 / 2. |
@@ -285,7 +285,7 @@ top-level keys are validation errors.
285
285
  | `acceptanceEval.maxRounds` | No | `integer` | — | Maximum number of redraft rounds before escalation. Default 2; clamped into [1, hard ceiling] by lib/config/acceptance-eval.js so the cap can never be disabled (maxRounds: 0 clamps up to 1). |
286
286
  | `ci` | No | `object` | — | Nested configuration block. |
287
287
  | `ci.skipForStoryPushes` | No | `boolean` | — | Story #2899 (Epic #2880, F13). When true (default), pre-push tooling appends a '[skip ci]' trailer to Story-branch commit subjects so intermediate pushes do not stampede the CI fleet. The Epic-branch merge commit produced by story-close.js never carries the marker, regardless of this flag. |
288
- | `preflight` | No | `object` | — | Story #2899 (Epic #2880, F13). Thresholds consumed by `.agents/scripts/epic-deliver-preflight.js`. When any value is exceeded the preflight envelope flags a breach and /epic-deliver Phase 1 surfaces it via agent::blocked. |
288
+ | `preflight` | No | `object` | — | Story #2899 (Epic #2880, F13). Thresholds consumed by `.agents/scripts/epic-deliver-preflight.js`. When any value is exceeded the preflight envelope flags a breach and /deliver Phase 1 surfaces it via agent::blocked. |
289
289
  | `preflight.maxStories` | No | `integer` | — | — |
290
290
  | `preflight.maxWaves` | No | `integer` | — | — |
291
291
  | `preflight.maxInstallCostSeconds` | No | `integer` | — | — |
@@ -376,7 +376,7 @@ branch protection on the base branch.
376
376
 
377
377
  | Field | Required | Default | Purpose |
378
378
  | ---------------- | -------- | ------- | ----------------------------------------------------------------------- |
379
- | `enforce` | No | `true` | When `true`, `node .agents/scripts/bootstrap.js` calls `ensureMainBranchProtection(...)`. |
379
+ | `enforce` | No | `true` | When `true`, `node .agents/scripts/bootstrap.js` calls `applyBranchProtection(...)`. |
380
380
  | `requiredChecks` | No | `[]` | Array of `{ name, cmd[] }` entries used both as required-status-check expectations on the PR and as local close-validation gate invocations. |
381
381
 
382
382
  Each `requiredChecks` entry takes the shape:
@@ -418,7 +418,7 @@ suppress a channel entirely, set its array to `[]`.
418
418
 
419
419
  ## `planning`
420
420
 
421
- `/epic-plan` tuning. All fields optional.
421
+ `/plan` tuning. All fields optional.
422
422
 
423
423
  | Field | Required | Default | Purpose |
424
424
  | ------------------------------ | -------- | ---------- | ------------------------------------------------------------------------------------------------ |
@@ -429,7 +429,7 @@ suppress a channel entirely, set its array to `[]`.
429
429
 
430
430
  ### `planning.context`
431
431
 
432
- Caps the size of `--emit-context` JSON payloads emitted during `/epic-plan`
432
+ Caps the size of `--emit-context` JSON payloads emitted during `/plan`
433
433
  so a runaway PRD / Tech Spec can't blow the planning agent's context budget.
434
434
 
435
435
  | Field | Required | Default | Purpose |
@@ -461,7 +461,7 @@ rather than a flat lexicographic slice — so a large, dot-prefixed tree like
461
461
  the consumer's own `src/` / `lib/` source. When `.agents/scripts/**` is the
462
462
  only matching tree (the Mandrel-repo dogfood case), the round-robin
463
463
  degenerates to taking the first 250 sorted paths, so that snapshot stays
464
- useful. When truncation occurs, `/epic-plan` Phase 7 emits an
464
+ useful. When truncation occurs, `/plan` Phase 7 emits an
465
465
  operator-visible warning naming the dropped file count and suggesting
466
466
  `tier: "medium"` and/or a narrowed `include`. Opt into the richer `medium`
467
467
  tier or narrow `include` if the partial skinny view is insufficient.
@@ -470,7 +470,7 @@ tier or narrow `include` if the partial skinny view is insufficient.
470
470
 
471
471
  ## `delivery`
472
472
 
473
- `/epic-deliver` and `/story-deliver` tuning. All sub-blocks are optional and
473
+ `/deliver` and `/deliver` tuning. All sub-blocks are optional and
474
474
  fall back to documented defaults (or are no-ops when omitted).
475
475
 
476
476
  ### `delivery.execution`
@@ -500,7 +500,7 @@ fall back to documented defaults (or are no-ops when omitted).
500
500
 
501
501
  ### `delivery.worktreeIsolation`
502
502
 
503
- Story-level worktree isolation. When `enabled: true`, `/story-deliver` runs
503
+ Story-level worktree isolation. When `enabled: true`, `/deliver` runs
504
504
  each Story inside `.worktrees/story-<id>/` instead of moving the main
505
505
  checkout's HEAD.
506
506
 
@@ -664,7 +664,7 @@ missing entries fall back to in-listener defaults.
664
664
 
665
665
  ### `delivery.epicAudit`
666
666
 
667
- `/epic-deliver` Phase 4 (epic-audit) auto-fix budget.
667
+ `/deliver` Phase 4 (epic-audit) auto-fix budget.
668
668
 
669
669
  | Field | Required | Default | Purpose |
670
670
  | ------------------ | -------- | ------- | -------------------------------------------------------------------- |
@@ -674,7 +674,7 @@ missing entries fall back to in-listener defaults.
674
674
  ### `delivery.codeReview`
675
675
 
676
676
  Configuration block for the code-review pipeline that runs at **both**
677
- Story-close (`story-close.js`) and Epic-close (`/epic-deliver` Phase 5).
677
+ Story-close (`story-close.js`) and Epic-close (`/deliver` Phase 5).
678
678
  Selects the review backend, exposes an escape-hatch for adapter-specific
679
679
  configuration, and sets the auto-fix budget enforced at each close scope.
680
680
 
@@ -700,7 +700,7 @@ points in the SDLC, using the **same configured values** for both scopes:
700
700
  - **Story-close** — `story-close.js` runs `runCodeReview()` against the
701
701
  Story branch's diff and applies the budget per finding before merging
702
702
  into `epic/<epicId>`.
703
- - **Epic-close** — `/epic-deliver` Phase 5 runs `runCodeReview()` against
703
+ - **Epic-close** — `/deliver` Phase 5 runs `runCodeReview()` against
704
704
  the integrated Epic branch and applies the same per-finding budget
705
705
  before opening the PR to `main`.
706
706
 
@@ -730,7 +730,7 @@ number of keys.
730
730
 
731
731
  | File | Audience | Role |
732
732
  | --------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
733
- | `.agentrc.json` (repo root) | The framework dogfooding itself | Live config used when running `/epic-*` and `/story-deliver` workflows against this repo. Exercises the framework end-to-end on its own source tree. |
733
+ | `.agentrc.json` (repo root) | The framework dogfooding itself | Live config used when running `/epic-*` and `/deliver` workflows against this repo. Exercises the framework end-to-end on its own source tree. |
734
734
  | `.agents/starter-agentrc.json` | Downstream consumer repos | Bootstrap delta-seed a consumer copies via `cp .agents/starter-agentrc.json .agentrc.json`. Minimum schema-required keys only. |
735
735
  | `.agents/docs/agentrc-reference.json` | Operators and reviewers | Exhaustive editor reference enumerating every schema key with its framework default. Not a copy target. |
736
736
 
@@ -770,14 +770,14 @@ the lint ratchet, and the CRAP/MI gates.
770
770
 
771
771
  | File | Owner | Refresh |
772
772
  | --------------------------------- | ------------------------------------ | ---------------------------------------------------------------------- |
773
- | `baselines/lint.json` | `lint-baseline.js` | `node .agents/scripts/lint-baseline.js --refresh` |
773
+ | `baselines/lint.json` | `lint-baseline.js` | `node .agents/scripts/lint-baseline.js capture` |
774
774
  | `baselines/crap.json` | `update-crap-baseline.js` | `npm run crap:update` |
775
775
  | `baselines/maintainability.json` | `update-maintainability-baseline.js` | `npm run maintainability:update` |
776
776
 
777
777
  These files are the contract. They are read by every gate (Story close, push
778
778
  hook, CI) and are regenerated only via tagged `baseline-refresh:` commits
779
779
  with a non-empty body. The convention is operator-enforced; see the CRAP
780
- section of [`docs/quality-gates.md`](../../docs/quality-gates.md) for the policy.
780
+ section of [`quality-gates.md`](quality-gates.md) for the policy.
781
781
 
782
782
  Paths are configured in `delivery.quality.gates.<tier>.baselinePath`. The
783
783
  default values match the canonical layout above; override only when a
@@ -874,8 +874,8 @@ under one identity. So each contributor sets their own in `.agentrc.local.json`:
874
874
  carries only the non-personal placeholder `@[USERNAME]` (so CI and fresh clones
875
875
  validate without naming a real person). The placeholder is **not** a usable
876
876
  identity: [`normalizeOperatorHandle`](../scripts/lib/orchestration/ticket-lease.js)
877
- resolves `@[USERNAME]` to `null`, and the lease guards (`/epic-plan`,
878
- `/epic-deliver`, `/story-deliver`) **fail closed** — they throw with a
877
+ resolves `@[USERNAME]` to `null`, and the lease guards (`/plan`,
878
+ `/deliver`, `/deliver`) **fail closed** — they throw with a
879
879
  "set your own handle in `.agentrc.local.json`" message rather than running an
880
880
  ownerless, unguarded workflow. Your local overlay replaces the placeholder with
881
881
  your real handle, and the guards proceed. By contrast, `github.owner` / `repo`
@@ -1024,6 +1024,63 @@ move and the allowlist response in the same diff.
1024
1024
 
1025
1025
  ---
1026
1026
 
1027
+ ## CLI subcommand quick-reference
1028
+
1029
+ `mandrel --help` prints the full subcommand list. Each subcommand that
1030
+ mutates state supports `--dry-run` to preview without writing. The table
1031
+ below covers every dispatch-visible subcommand:
1032
+
1033
+ | Subcommand | What it does | Key flags |
1034
+ | ---------- | ------------ | --------- |
1035
+ | `init` | Install and configure mandrel in the current project. | `--assume-yes`, `--skip-github`, `--dry-run` |
1036
+ | `sync` | Re-materialize `.agents/` from the installed package payload. | `--dry-run`, `--force` |
1037
+ | `sync-commands` | Rebuild `.claude/commands/` from `.agents/workflows/`. | — |
1038
+ | `doctor` | Run readiness checks and report remedies. | — |
1039
+ | `update` | Upgrade mandrel to the newest published version. | `--dry-run`, `--install-cmd` |
1040
+ | `migrate` | Apply version-keyed migrations for a version range. | `--from`, `--to`, `--dry-run` |
1041
+ | `explain` | Print resolved config values with sources. | `--json` |
1042
+ | `uninstall` | Reverse a recorded install using the install ledger. | `--include-github`, `--dry-run` |
1043
+
1044
+ ### `mandrel explain`
1045
+
1046
+ Prints every resolved config key — its effective value, its source layer
1047
+ (`[agentrc]` or `[default]`), and a one-line description. Secret-shaped
1048
+ values are shown as `<redacted>`. Useful when debugging unexpected behavior
1049
+ caused by config layering.
1050
+
1051
+ ```bash
1052
+ mandrel explain # human-readable report
1053
+ mandrel explain --json # JSON report for scripting
1054
+ ```
1055
+
1056
+ ### `mandrel sync-commands`
1057
+
1058
+ Regenerates the flat `.claude/commands/` tree from `.agents/workflows/`. The
1059
+ bootstrap wires a `UserPromptSubmit` hook so this runs automatically on every
1060
+ Claude Code prompt; manual invocations are only needed when the hook is absent
1061
+ or the commands/ tree is manually deleted.
1062
+
1063
+ ```bash
1064
+ mandrel sync-commands
1065
+ ```
1066
+
1067
+ ### `mandrel uninstall`
1068
+
1069
+ Reverses a recorded install using the install ledger
1070
+ (`.agents/.install-manifest.json`). Restoration is marker-based and
1071
+ non-destructive: operator-authored content that pre-existed the install
1072
+ is preserved; only install-created files and framework additions are removed.
1073
+ GitHub-side state is never acted on automatically; it is surfaced as a
1074
+ manual checklist.
1075
+
1076
+ ```bash
1077
+ mandrel uninstall # reverse all local mutations
1078
+ mandrel uninstall --dry-run # preview without writing
1079
+ mandrel uninstall --include-github # acknowledge GitHub-side follow-ups
1080
+ ```
1081
+
1082
+ ---
1083
+
1027
1084
  ## Cross-references
1028
1085
 
1029
1086
  - JSON Schema mirror —
@@ -1035,6 +1092,6 @@ move and the allowlist response in the same diff.
1035
1092
  - Bootstrap script —
1036
1093
  [`bootstrap.js`](../scripts/bootstrap.js)
1037
1094
  - Quality gates runbook (CRAP onboarding, MI ratchet, lint ratchet) —
1038
- [`docs/quality-gates.md`](../../docs/quality-gates.md)
1095
+ [`quality-gates.md`](quality-gates.md)
1039
1096
  - Activation pointers (slash commands, personas, skills) —
1040
1097
  [`.agents/README.md`](../README.md)