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
package/.agents/README.md CHANGED
@@ -4,10 +4,10 @@ An opinionated workflow framework for AI coding assistants built on
4
4
  Epic-centric GitHub orchestration. Planning, execution, and state all live natively in GitHub Issues, Labels, and Projects V2.
5
5
 
6
6
  This is the consumer README inside the distributed `.agents/` bundle. It explains what each part of the bundle is for and captures the cross-directory authoring conventions. The process narrative for
7
- `/epic-plan` and `/epic-deliver` stays in [`docs/SDLC.md`](docs/SDLC.md).
7
+ `/plan` and `/deliver` stays in [`docs/SDLC.md`](docs/SDLC.md).
8
8
 
9
9
  The framework payload (`.agents/`) is consumed by host repos. It ships inside the [`mandrel`](https://www.npmjs.com/package/mandrel)
10
- npm package and is materialized into a consumer's `./.agents/` directory by `mandrel sync`. It carries a system prompt, a baseline rule pack, a two-tier skill library, a slash-command workflow set, and the orchestration engine that runs Epic → Feature → Story plans on GitHub.
10
+ npm package and is materialized into a consumer's `./.agents/` directory by `mandrel sync`. It carries a system prompt, a baseline rule pack, a two-tier skill library, a slash-command workflow set, and the orchestration engine that runs Epic → Story plans on GitHub.
11
11
 
12
12
  The framework version is the version of the installed [`mandrel`](https://www.npmjs.com/package/mandrel) npm package — run `npm ls mandrel` (or read `package.json`), not a
13
13
  count here.
@@ -42,9 +42,9 @@ also forwarded to `bootstrap.js`); a non-TTY run without `--assume-yes` defaults
42
42
  to **files-only**, so the side-effecting GitHub provisioning never runs
43
43
  unattended.
44
44
 
45
- After it completes, run **`/onboard`** inside Claude Code for the guided first
46
- run — stack detection, docs scaffolding, a `mandrel doctor` readiness gate, and
47
- a started `/epic-plan` handoff.
45
+ After it completes, `mandrel init` runs the onboarding tail automatically
46
+ stack detection, docs scaffolding offer, a `mandrel doctor` readiness gate,
47
+ and a printed `/plan` handoff — so you land at planning in one command.
48
48
 
49
49
  ### Manual Install
50
50
 
@@ -112,7 +112,7 @@ clone produces zero file mutations.
112
112
  ## Upgrading and local additions
113
113
 
114
114
  Once installed, the ongoing upgrade path is **`mandrel update`** — it bumps
115
- `mandrel` to the newest non-major version, re-runs `mandrel sync`,
115
+ `mandrel` to the newest published version, re-runs `mandrel sync`,
116
116
  applies version-keyed migrations, and verifies the install with
117
117
  `mandrel doctor`. The lockfile bump is left **staged for you to review and
118
118
  commit** (the command performs no `git` mutation):
@@ -122,12 +122,9 @@ npx mandrel update # update → sync → migrate → doctor
122
122
  npx mandrel update --dry-run # preview the target version + ordered steps
123
123
  ```
124
124
 
125
- A **major** crossing (e.g. `1.x 2.0`) is **gated**: Mandrel lives on the
126
- 1.x line under release-please `always-bump-minor`, so a major is a deliberate
127
- operator decision. `mandrel update` refuses a major bump, points at the
128
- [`docs/upgrade-major.md`](../docs/upgrade-major.md) runbook, and exits
129
- without touching anything — re-run with `--major` to adopt it. Minor and
130
- patch bumps are never gated. Migrations can also be run on their own:
125
+ Major crossings are applied like any other bump Mandrel ships hard
126
+ cutovers, so the release notes in the surfaced changelog are the migration
127
+ guide. Migrations can also be run on their own:
131
128
 
132
129
  ```bash
133
130
  npx mandrel migrate --from <version> --to <version> [--dry-run]
@@ -143,6 +140,61 @@ workflow fragments there rather than editing synced files in place.
143
140
 
144
141
  ---
145
142
 
143
+ ## CLI subcommand reference
144
+
145
+ Run `mandrel --help` for a subcommand list. Each subcommand supports
146
+ `--dry-run` (where noted) to preview without writing.
147
+
148
+ | Subcommand | Purpose | Key flags |
149
+ | ---------- | ------- | --------- |
150
+ | `init` | Install + configure mandrel in the current project (cold-start). | `--assume-yes`, `--skip-github`, `--dry-run` |
151
+ | `sync` | Re-materialize `.agents/` from the installed package payload. | `--dry-run` |
152
+ | `sync-commands` | Regenerate `.claude/commands/` from `.agents/workflows/`. | — |
153
+ | `doctor` | Run readiness checks and print per-check remedies. | — |
154
+ | `update` | Upgrade mandrel to the newest published version. | `--dry-run`, `--install-cmd` |
155
+ | `migrate` | Apply version-keyed migrations for a version range. | `--from`, `--to`, `--dry-run` |
156
+ | `explain` | Print resolved config values with their sources. | `--json` |
157
+ | `uninstall` | Reverse a recorded install using the install ledger. | `--include-github`, `--dry-run` |
158
+
159
+ ### `mandrel explain`
160
+
161
+ Prints every resolved `.agentrc.json` config key — its effective value, the
162
+ source layer it came from (`[agentrc]` or `[default]`), and a one-line
163
+ meaning. Secret-shaped keys are redacted. Useful for debugging unexpected
164
+ behavior when multiple config sources overlap.
165
+
166
+ ```bash
167
+ mandrel explain # human-readable config report
168
+ mandrel explain --json # same report as JSON
169
+ ```
170
+
171
+ ### `mandrel sync-commands`
172
+
173
+ Regenerates the flat `.claude/commands/` projection from `.agents/workflows/`.
174
+ The bootstrap wires a `UserPromptSubmit` hook that runs this automatically on
175
+ every Claude Code prompt submission, so manual runs are rarely needed.
176
+
177
+ ```bash
178
+ mandrel sync-commands # rebuild .claude/commands/
179
+ ```
180
+
181
+ ### `mandrel uninstall`
182
+
183
+ Reverses a recorded install using the install ledger
184
+ (`.agents/.install-manifest.json`). Each ledger entry is a
185
+ mutation-manifest record; uninstall walks reversible entries and undoes
186
+ exactly what the install applied, without touching pre-existing operator
187
+ content. GitHub-side state (labels, branch protection, Projects board)
188
+ requires manual reversal and is surfaced as a follow-up checklist.
189
+
190
+ ```bash
191
+ mandrel uninstall # reverse all local install mutations
192
+ mandrel uninstall --dry-run # preview what would be reversed
193
+ mandrel uninstall --include-github # acknowledge GitHub-side manual steps
194
+ ```
195
+
196
+ ---
197
+
146
198
  ## Automatic system-prompt wiring
147
199
 
148
200
  The bootstrap wires the framework system prompt into a project-root
@@ -187,11 +239,11 @@ For non-interactive (CI) installs, pass `--owner`, `--repo`, and
187
239
  After bootstrap, every Mandrel command is generated into a flat
188
240
  `.claude/commands/` tree by `npm run sync:commands` (the UserPromptSubmit hook
189
241
  keeps it current) and loads as a bare `/<command>` slash command — e.g.
190
- `/epic-plan`, `/story-plan`, `/story-deliver`, `/audit-security`. The
242
+ `/plan`, `/plan`, `/deliver`, `/audit-security`. The
191
243
  commands load in every Claude Code environment. The [SDLC guide](docs/SDLC.md) walks
192
244
  an end-to-end Epic; standalone Stories pair
193
- [`/story-plan`](workflows/story-plan.md) (idea → drafted Story
194
- Issue) with [`/story-deliver`](workflows/story-deliver.md) (Story Issue → merged
245
+ [`/plan`](workflows/helpers/plan-story.md) (idea → drafted Story
246
+ Issue) with [`/deliver`](workflows/helpers/deliver-stories.md) (Story Issue → merged
195
247
  PR).
196
248
 
197
249
  ---
@@ -209,9 +261,10 @@ a single vendored manifest that ships inside the bundle:
209
261
  - **[`runtime-deps.json`](runtime-deps.json)** — the single source of
210
262
  truth. Its `dependencies` block lists the **required** packages (`ajv`,
211
263
  `ajv-formats`, `js-yaml`, `minimatch`, `picomatch`, `string-argv`,
212
- `typescript`, `typhonjs-escomplex`); its `optionalDependencies` block
213
- lists packages used only behind graceful-degradation paths (`chokidar`
214
- for `quality:watch`, `@commitlint/load` for commit-subject sizing).
264
+ `typhonjs-escomplex`); its `optionalDependencies` block lists packages
265
+ used behind graceful-degradation paths (`typescript` for TS-source
266
+ scoring in the maintainability engine, `chokidar` for `quality:watch`,
267
+ `@commitlint/load` for commit-subject sizing).
215
268
 
216
269
  **How a consumer satisfies them:** `bootstrap` (above) merges the required
217
270
  set into your `package.json` `dependencies` and runs your package manager's
@@ -233,7 +286,7 @@ in `runtime-deps.json`.
233
286
 
234
287
  ## Ticket Hierarchy
235
288
 
236
- Mandrel uses a **3-tier hierarchy**, (Epic → Feature → Story) with inline `acceptance[]` / `verify[]` on story bodies.
289
+ Mandrel uses a **2-tier hierarchy** (Epic → Story) with inline `acceptance[]` / `verify[]` on story bodies.
237
290
 
238
291
  See [`docs/SDLC.md` § Ticket hierarchy](docs/SDLC.md) for the diagram and execution-model implications.
239
292
 
@@ -244,7 +297,7 @@ See [`docs/SDLC.md` § Ticket hierarchy](docs/SDLC.md) for the diagram and execu
244
297
  | Path | Purpose |
245
298
  | ---- | ------- |
246
299
  | [`instructions.md`](instructions.md) | Primary system prompt loaded by the host AI tool. |
247
- | [`docs/SDLC.md`](docs/SDLC.md) | Operator process for `/epic-plan` and `/epic-deliver`. |
300
+ | [`docs/SDLC.md`](docs/SDLC.md) | Operator process for `/plan` and `/deliver`. |
248
301
  | [`starter-agentrc.json`](starter-agentrc.json) | Bootstrap delta-seed copied to the consumer repo root as `.agentrc.json`. |
249
302
  | [`agentrc-reference.json`](docs/agentrc-reference.json) | Exhaustive editor reference enumerating every schema key with its framework default. |
250
303
  | [`personas/`](personas/) | Role-specific behavior packs selected by task persona or explicit user instruction. |
@@ -268,7 +321,7 @@ See [`docs/SDLC.md` § Ticket hierarchy](docs/SDLC.md) for the diagram and execu
268
321
  | The Epic planning and delivery process | [`docs/SDLC.md`](docs/SDLC.md) |
269
322
  | The system prompt loaded by your AI tool | [`instructions.md`](instructions.md) |
270
323
  | Every `.agentrc.json` key, default, and override | [`docs/configuration.md`](docs/configuration.md) (under `.agents/`) |
271
- | Quality-gate runbooks (CRAP, MI, lint, friction) plus the baseline envelope, component model, and writer/reader contract | [`docs/quality-gates.md`](../docs/quality-gates.md) |
324
+ | Quality-gate runbooks (CRAP, MI, lint, friction) plus the baseline envelope, component model, and writer/reader contract | [`.agents/docs/quality-gates.md`](docs/quality-gates.md) |
272
325
  | Slash-command workflow definitions | [`workflows/`](workflows/) |
273
326
  | Render the signals span-tree (debug helper) | [`workflows/helpers/signals.md`](workflows/helpers/signals.md) |
274
327
  | Persona behavior packs | [`personas/`](personas/) |
@@ -445,7 +498,7 @@ sessions, `gh auth login` is sufficient.
445
498
  ## Self-Healing Checks
446
499
 
447
500
  `scripts/lib/checks/` is the discovery-based registry of named checks
448
- consumed by preflight guards (`/epic-deliver`, `/story-close`, `npm test`),
501
+ consumed by preflight guards (`/deliver`, `/story-close`, `npm test`),
449
502
  the `diagnose.js` ad-hoc viewer, and the retro surface. Use one check per
450
503
  file. The runner (`index.js`) loads checks at process start and filters by
451
504
  scope at each call site.
@@ -504,8 +557,8 @@ envelope, every gate reads through one shared module
504
557
  and every refresher writes through one shared writer
505
558
  ([`.agents/scripts/lib/baselines/writer.js`](scripts/lib/baselines/writer.js)).
506
559
 
507
- See the [Baseline reference](../docs/quality-gates.md#baseline-reference)
508
- section of `docs/quality-gates.md` for the full reference: envelope shape,
560
+ See the [Baseline reference](docs/quality-gates.md#baseline-reference)
561
+ section of `.agents/docs/quality-gates.md` for the full reference: envelope shape,
509
562
  per-kind axes, component model, path canonicalisation, writer/reader
510
563
  contract, kernel-version friction, and — most relevant to consumers — the
511
564
  **floor override** path. Consumers add a `floors` block
@@ -569,7 +622,7 @@ Schema conventions:
569
622
  ## Code review providers (pluggable chain)
570
623
 
571
624
  `runCodeReview()` (invoked at the end of `helpers/epic-deliver-story`,
572
- `helpers/single-story-deliver`, and `/epic-deliver`'s `delivery.code-review`
625
+ `helpers/single-story-deliver`, and `/deliver`'s `delivery.code-review`
573
626
  state) loads its review backend through a pluggable registry. Two configuration shapes are supported:
574
627
 
575
628
  - **Legacy single provider** — `delivery.codeReview.provider: "native"`
@@ -721,7 +774,7 @@ falls from minutes to under a second.
721
774
  ## Multi-developer coordination
722
775
 
723
776
  Two operators can drive the same repository at once — one running
724
- `/epic-deliver <id>`, another running `/single-story-deliver <id>`, or two
777
+ `/deliver <id>`, another running `/single-story-deliver <id>`, or two
725
778
  operators on the same Epic from separate clones. The framework keeps those
726
779
  runs from clobbering one another with **two distinct coordination layers**.
727
780
  They solve different problems and must not be confused:
@@ -763,7 +816,7 @@ yanks the claim back from whoever legitimately took over.
763
816
 
764
817
  **Where it's wired:**
765
818
 
766
- - **`/epic-deliver`** acquires the lease on the **Epic** ticket during its
819
+ - **`/deliver`** acquires the lease on the **Epic** ticket during its
767
820
  prepare phase, before any mutating git work
768
821
  ([`epic-deliver-lease-guard.js`](scripts/lib/orchestration/epic-deliver-lease-guard.js)).
769
822
  A live foreign claim refuses the run; pass `--steal` to override and
@@ -776,7 +829,7 @@ yanks the claim back from whoever legitimately took over.
776
829
  ([`single-story-lease-guard.js`](scripts/lib/orchestration/single-story-lease-guard.js)).
777
830
  The standalone path requires `github.operatorHandle` to be set — without
778
831
  an operator identity the lease has no owner to record.
779
- - **`/epic-plan`** acquires the lease on the **Epic** ticket before Phase 7
832
+ - **`/plan`** acquires the lease on the **Epic** ticket before Phase 7
780
833
  (spec) and releases it after Phase 8 (decompose)
781
834
  ([`epic-plan-lease-guard.js`](scripts/lib/orchestration/epic-plan-lease-guard.js)).
782
835
  Because planning emits no `story.heartbeat` (heartbeats are a
@@ -790,22 +843,11 @@ yanks the claim back from whoever legitimately took over.
790
843
 
791
844
  ## Root config vs distributed templates
792
845
 
793
- Three `.agentrc`-shaped files live in this repository and are easy to
794
- confuse:
795
-
796
- | File | Audience | Role |
797
- | --------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
798
- | `.agentrc.json` (repo root) | The framework dogfooding itself | Live config used when running `/epic-*`, `/story-deliver` against this repo. Exercises the framework end-to-end. |
799
- | `.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. |
800
- | `.agents/docs/agentrc-reference.json` | Operators and reviewers | Exhaustive editor reference enumerating every schema key with its framework default. Not a copy target. |
801
-
802
- The three files share a schema; where they legitimately diverge (target
803
- dirs, repo identifiers, version-file pointer) is documented in
804
- [`docs/configuration.md` § Root dogfood vs distributed template](docs/configuration.md#root-dogfood-vs-distributed-template).
805
- Edit `agentrc-reference.json` when a framework default changes; edit
806
- `starter-agentrc.json` only when the bootstrap seed itself needs new
807
- schema-required keys; edit the root `.agentrc.json` for changes that
808
- only affect this repo's own dogfood runs.
846
+ Three `.agentrc`-shaped files live in this repository and serve different
847
+ audiences. Their roles, audiences, and the keys where they legitimately
848
+ diverge are documented in
849
+ [`docs/configuration.md` § Root dogfood vs distributed templates](docs/configuration.md#root-dogfood-vs-distributed-templates)
850
+ that section is the canonical single home for this table.
809
851
 
810
852
  ---
811
853