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
@@ -16,7 +16,7 @@ compose. This file is only for "which command does X?" lookups.
16
16
  Every command file lives at `.agents/workflows/<name>.md` and is projected
17
17
  into a flat `.claude/commands/` tree by `npm run sync:commands` (the
18
18
  UserPromptSubmit hook keeps it current) so it shows up as a bare `/<name>`
19
- slash command (e.g. `/epic-deliver`). The projection writes only
19
+ slash command (e.g. `/deliver`). The projection writes only
20
20
  `.claude/commands/<name>.md` — there is no plugin manifest and no
21
21
  marketplace listing. The commands load in every Claude Code environment.
22
22
 
@@ -25,11 +25,11 @@ by `node .agents/scripts/generate-workflows-doc.js`; `npm run docs:check`
25
25
  fails when it drifts from the on-disk workflow set. To change a command’s
26
26
  description, edit the workflow file’s front-matter and regenerate.
27
27
 
28
- ## Commands (29)
28
+ ## Commands (26)
29
29
 
30
30
  | Command | Description |
31
31
  | --- | --- |
32
- | `/agents-update` | npm-era upgrade wraparound for a Mandrel consumer. Runs `mandrel update` (resolve newest non-major version → install → re-materialize `.agents/` → migrate → doctor → surface changelog) as the single mechanical step, then walks the operator through the judgment wraparound the CLI deliberately leaves unowned: reconcile `.agentrc.json`, install the Epic #1386 quality-gate surface, refresh the harness permission allowlist, reconcile the consumer's `AGENTS.md` / runbooks against the surfaced changelog, and stage + commit the staged lockfile bump. |
32
+ | `/agents-update` | npm-era upgrade wraparound for a Mandrel consumer. Runs `mandrel update` (resolve newest published version → install → re-materialize `.agents/` → migrate → doctor → surface changelog) as the single mechanical step, then walks the operator through the judgment wraparound the CLI deliberately leaves unowned: reconcile `.agentrc.json`, install the Epic #1386 quality-gate surface, refresh the harness permission allowlist, reconcile the consumer's `AGENTS.md` / runbooks against the surfaced changelog, and stage + commit the staged lockfile bump. |
33
33
  | `/audit-architecture` | Audit architectural boundaries, module coupling, and layering violations; emit a structured findings report keyed to High/Medium/Low severity. |
34
34
  | `/audit-clean-code` | Audit code smells, dead code, complexity hotspots, and maintainability-index outliers; emit a structured findings report. |
35
35
  | `/audit-dependencies` | Audit `package.json` for unused, outdated, and major-version-stale dependencies; surface Node-engine drift and propose upgrade batches. |
@@ -42,19 +42,16 @@ description, edit the workflow file’s front-matter and regenerate.
42
42
  | `/audit-security` | Audit dependency CVEs, input-validation gaps, secrets handling, and auth boundaries; emit a structured High/Medium/Low findings report. |
43
43
  | `/audit-seo` | Audit SEO fundamentals and Generative Engine Optimization signals (meta, structured data, crawlability); only relevant for web targets. |
44
44
  | `/audit-sre` | "Audit production-readiness for a release candidate: SLOs, observability, runbooks, error budgets, and rollback paths." |
45
- | `/audit-to-stories` | Convert findings produced by the audit-\* workflows into actionable GitHub Stories. Reads temp/audits/audit-\*-results.md, groups findings cross-audit, deduplicates against existing Issues by fingerprint, and either chains into /epic-plan --idea or opens standalone Stories. |
45
+ | `/audit-to-stories` | Convert findings produced by the audit-\* workflows into actionable GitHub Stories. Reads temp/audits/audit-\*-results.md, groups findings cross-audit, deduplicates against existing Issues by fingerprint, and either chains into /plan --idea or opens standalone Stories. |
46
46
  | `/audit-ux-ui` | Audit UX/UI consistency and design system adherence |
47
- | `/epic-deliver` | Drive an Epic from `agent::ready` to a merged pull request against `main`. The ten-phase flow runs the wave loop, close-validation, epic-audit, code-review, retro, finalize, watch-and-iterate, conditional auto-merge, and local branch cleanup. When the run is end-to-end clean (zero manual interventions, zero 🔴/🟠 review findings, compact retro) the PR auto-merges via `gh pr merge --squash --delete-branch`; otherwise the workflow falls back to the operator-merges-button path so a human inspects the surface area. |
48
- | `/epic-plan` | Orchestrates end-to-end Epic planning (PRD, Tech Spec, Acceptance Spec, and Work Breakdown) for a GitHub Epic. |
47
+ | `/deliver` | Unified delivery entry point. Inspects the ticket type(s) and Epic-reference state of the supplied IDs, then routes to the Epic wave loop or the standalone multi-Story fan-out preserving every flag and the parallel-delivery contract of the retired commands. |
49
48
  | `/explain` | Walk the operator through a code change until they genuinely understand it. Targets a PR, a branch, or the working-tree diff, then drives the `core/knowledge-transfer` skill (restate-first, why-ladder, mastery gates, persistent checklist) with an operator-controlled stop at every checkpoint. |
50
49
  | `/git-cleanup` | Tidy the local checkout in four phases: fast-forward `main`, prune stale remote-tracking refs, sweep merged branches (squash-aware), and triage `git stash` entries — each step gated by operator confirmation. |
51
50
  | `/git-commit-all` | Stage every untracked and modified file, then create a single conventional-commit on the current branch (no push). |
52
51
  | `/git-merge-pr` | Analyze, validate, resolve conflicts, and merge a given pull request by number. |
53
52
  | `/git-pr-all` | Stage all outstanding changes, commit, push to a feature branch, and open a pull request with native auto-merge enabled. |
54
53
  | `/git-push` | Commit all outstanding changes then push to the remote repository. |
55
- | `/onboard` | Guided first-run onboarding for a freshly installed Mandrel. Detects the consumer stack, offers to scaffold any missing docsContextFiles, runs `mandrel doctor` as a readiness gate, and hands off to a started /epic-plan. The whole path is designed to take about 15 minutes from a clean checkout to a planned Epic. |
54
+ | `/plan` | Unified planning entry point. Routes a seed idea (via scope triage) or an existing Epic ID to the right planning path the full Epic pipeline (PRD, Tech Spec, Acceptance Spec, decomposition) or the standalone-Story authoring path and absorbs every planning flag. |
56
55
  | `/qa-assist` | Human-led QA assist loop — ingest one operator observation, enrich it with repro + root-cause (file:line) + a coverage verdict, ask clarifying questions when it is ambiguous, and append a redacted ledger item to a persistent, resumable rolling session under temp/qa/ |
57
56
  | `/qa-explore` | Agent-led exploratory-QA loop — the agent Plans a surface with an explicit static-vs-drive method choice, drives it (browser MCP or static), and captures ledger items read-only, then Triages — a bounded per-surface session, HITL-gated at every phase transition, routed through the shared dedup/coverage/classification/missing-test/redaction/session core under temp/qa/ |
58
57
  | `/qa-run-harness` | Drive Gherkin scenarios through a real browser as an agent-driven QA sweep |
59
- | `/story-deliver` | Deliver one or more standalone Stories end-to-end. Accepts 1+ Story IDs, computes a dependency-aware wave plan via `stories-wave-tick.js`, asks the operator to confirm the plan, then fans out parallel Agent calls per wave — each delegating to `helpers/single-story-deliver`. Stories without an `Epic: #N` reference only; Epic-attached Stories use `/epic-deliver`. |
60
- | `/story-plan` | Author a standalone Story (no parent Epic) from a short prompt. Builds a context envelope, lets the host LLM draft the body, and creates the GitHub Issue with type::story and a persona label — ready to feed into /single-story-deliver. |
@@ -150,8 +150,8 @@ This protocol is not soft-prompt-only — it has a runtime substrate. While
150
150
  executing as a Story delivery sub-agent (via `helpers/epic-deliver-story`
151
151
  or `helpers/single-story-deliver`), you MUST emit a `story.heartbeat`
152
152
  lifecycle event on every Task transition (or whenever you stall on a
153
- long-running step) so the parent `/epic-deliver` idle watchdog (§ 2e of
154
- `.agents/workflows/epic-deliver.md`, re-ticked every 30 minutes via
153
+ long-running step) so the parent `/deliver` idle watchdog (§ 2e of
154
+ `.agents/workflows/helpers/deliver-epic.md`, re-ticked every 30 minutes via
155
155
  `wave-tick.js --check-idle 30`) can distinguish a child still making
156
156
  progress from a dead one. If you genuinely cannot proceed, transition to
157
157
  `agent::blocked` and exit non-zero — never fall silent. A child with no
@@ -219,7 +219,7 @@ stops.
219
219
  estimate (≈4 characters per token) and applies section-aware elision
220
220
  (`elideEnvelope`) so oversized envelopes drop or summarize
221
221
  lower-priority sections before you receive the prompt.
222
- - **`delivery.preflight.*`** (optional): before `/epic-deliver` fan-out,
222
+ - **`delivery.preflight.*`** (optional): before `/deliver` fan-out,
223
223
  `epic-deliver-preflight.js` compares **estimated** story count, waves,
224
224
  install time, GitHub API volume, and Claude quota tokens against
225
225
  configured ceilings (`maxClaudeQuotaTokens`, etc.). A breach surfaces
@@ -303,7 +303,7 @@ them automatically; agents commit on the execution branch only.
303
303
  | Purpose | Format | Owner | Notes |
304
304
  | ---------------- | ---------------------------- | ---------------------- | --------------------------------------------------------------------------------------------- |
305
305
  | Story execution | `story-<storyId>` | `story-init.js` | Per-Story worktree at `.worktrees/story-<storyId>/`. All Story implementation commits land here. |
306
- | Epic integration | `epic/<epicId>` | `/epic-deliver` slash command | Story branches merge into this branch with `--no-ff`. Pushed per wave. |
306
+ | Epic integration | `epic/<epicId>` | `/deliver` slash command | Story branches merge into this branch with `--no-ff`. Pushed per wave. |
307
307
 
308
308
  - **Verification**: After `story-init.js` returns, confirm
309
309
  `git branch --show-current` reports `story-<storyId>` before making any
@@ -324,18 +324,19 @@ prompted.
324
324
  Prioritize a clean `epic/[EPIC_ID]` branch. Story branches are merged into
325
325
  the Epic branch automatically by `helpers/epic-deliver-story` (via
326
326
  `story-close.js`); the Epic branch reaches `main` via the pull request that
327
- `/epic-deliver` opens at the end of its run — the operator merges through
327
+ `/deliver` opens at the end of its run — the operator merges through
328
328
  the GitHub UI. There is no in-script merge to `main`.
329
329
 
330
- ### D. Ticket hierarchy (3-tier)
330
+ ### D. Ticket hierarchy (2-tier)
331
331
 
332
- Mandrel uses a **3-tier ticket hierarchy** (Epic → Feature → Story).
332
+ Mandrel uses a **2-tier ticket hierarchy** (Epic → Story).
333
333
  Acceptance criteria and verification steps live inline on the Story
334
- body (`acceptance[]` / `verify[]`); there is no `type::task` ticket
335
- layer.
334
+ body (`acceptance[]` / `verify[]`); there is no Feature tier and no
335
+ `type::task` ticket layer. Thematic grouping lives as prose in the
336
+ Epic body / Tech Spec.
336
337
 
337
- - The decomposer emits only `type::epic`, `type::feature`, and
338
- `type::story` issues.
338
+ - The decomposer emits only `type::epic` and `type::story` issues;
339
+ Stories attach directly to the Epic.
339
340
  - Each Story-implementation phase is executed by
340
341
  `helpers/epic-deliver-story` (Epic-attached) or
341
342
  `helpers/single-story-deliver` (standalone). There is no per-Task
@@ -51,7 +51,7 @@ Before permitting any code generation, you must enforce this workflow:
51
51
  ### C. Protocol Evolution (Self-Healing)
52
52
 
53
53
  - **Friction Analysis:** During the retro phase (Phase 5 of
54
- `/epic-deliver`, driven by `lib/orchestration/retro-runner.js`), you
54
+ `/deliver`, driven by `lib/orchestration/retro-runner.js`), you
55
55
  MUST analyze the
56
56
  `agent-friction-log.json` to identify systemic bottlenecks, repetitive tool
57
57
  failures, or prompt ambiguities.
@@ -43,7 +43,7 @@ UI copy, metadata, and structural assumptions align with it.
43
43
  ### B. Epic Lifecycle & Retrospectives
44
44
 
45
45
  - **Retrospectives:** Own the Epic retrospective process. Phase 5 of
46
- `/epic-deliver` runs `lib/orchestration/retro-runner.js` in-process
46
+ `/deliver` runs `lib/orchestration/retro-runner.js` in-process
47
47
  to generate retro structured comments, analyze execution, and
48
48
  formulate action items.
49
49
  - **Epic Definition:** Lock upcoming features into a clear Epic scope.
@@ -9,7 +9,7 @@ prioritize **dependency clarity**, **parallel execution efficiency**, and
9
9
 
10
10
  **Golden Rule:** You do not write implementation code. You write the GitHub
11
11
  Issue hierarchy of instructions that other agent personas will execute.
12
- The ticket hierarchy is **3-tier** (Epic → Feature → Story), with
12
+ The ticket hierarchy is **2-tier** (Epic → Story), with
13
13
  acceptance criteria and verification steps inlined on the Story body.
14
14
  There are no `type::task` children — Stories themselves carry the
15
15
  implementation scope. If you catch yourself generating application code,
@@ -21,16 +21,16 @@ SQL, or UI components — stop immediately.
21
21
  and Tech Spec (`context::tech-spec`) GitHub Issues, plus every file
22
22
  listed in `project.docsContextFiles` (typically `architecture.md`
23
23
  and the data dictionary).
24
- 2. **Decompose:** Break Features into **Stories** that carry their own
24
+ 2. **Decompose:** Break the Epic into **Stories** that carry their own
25
25
  inline acceptance criteria and verification steps. Aim for roughly
26
26
  five acceptance bullets per Story as a soft atomicity heuristic; if
27
27
  a Story scope grows past that, split it into sequential sibling
28
- Stories under the same Feature.
28
+ Stories.
29
29
  3. **Assign:** Dynamically select the appropriate Persona from
30
30
  `.agents/personas/` for each Story based on its complexity and
31
31
  domain, and tag the issue with the matching `persona::` label.
32
- 4. **Format:** Generate the Feature → Story hierarchy using the
33
- `/epic-plan` workflow.
32
+ 4. **Format:** Generate the Story backlog using the
33
+ `/plan` workflow.
34
34
  5. **Validate:** Ensure every Acceptance Criterion from the PRD has a
35
35
  corresponding Story-body acceptance bullet. Do not drop business
36
36
  logic.
@@ -39,12 +39,12 @@ SQL, or UI components — stop immediately.
39
39
 
40
40
  ### A. Epic Planning & Task Decomposition
41
41
 
42
- - **Fan-Out Architecture:** Structure each Epic into Features and Stories
42
+ - **Fan-Out Architecture:** Structure each Epic into Stories
43
43
  with explicit `blocked by` links so the dispatch graph can compute parallel
44
44
  waves automatically.
45
- - **Issue Linkage:** Every Feature and Story GitHub Issue must declare
45
+ - **Issue Linkage:** Every Story GitHub Issue must declare
46
46
  its `parent` and (where applicable) `blocked by` relationships in the
47
- body so `/epic-plan` can build a clean dispatch manifest.
47
+ body so `/plan` can build a clean dispatch manifest.
48
48
  - **Dependency Mapping:** Explicitly declare blockers via `blocked by` on
49
49
  the GitHub Issue body. Ensure no Story references work that hasn't
50
50
  been completed by a predecessor Story.
@@ -52,7 +52,7 @@ SQL, or UI components — stop immediately.
52
52
  perform a limited number of logical steps — roughly five
53
53
  acceptance/verification bullets per Story is a good soft heuristic.
54
54
  When a Story grows beyond the heuristic, split it into sequential
55
- sibling Stories under the same Feature.
55
+ sibling Stories.
56
56
 
57
57
  ### B. Resource Allocation (Persona Routing)
58
58
 
@@ -68,11 +68,11 @@ SQL, or UI components — stop immediately.
68
68
  - **QA Tasks:** Delegate QA Stories to the `/audit-quality` workflow. Do not
69
69
  write custom QA instructions.
70
70
  - **Retro Tasks:** Delegate the Epic retro to Phase 5 of
71
- `/epic-deliver`, which runs `lib/orchestration/retro-runner.js`
71
+ `/deliver`, which runs `lib/orchestration/retro-runner.js`
72
72
  in-process. Do not write custom retro instructions.
73
73
  - **Story Finalization:** Ensure every Story's body incorporates a step
74
74
  to self-verify its own context (PRD/Tech Spec linkage, parent
75
- Feature) before starting work.
75
+ Epic) before starting work.
76
76
 
77
77
  ### D. Quality Control
78
78
 
@@ -80,15 +80,15 @@ SQL, or UI components — stop immediately.
80
80
  every Acceptance Criterion in the PRD against the generated
81
81
  Story-body acceptance bullets. Any missed AC is a planning failure.
82
82
  - **Format Compliance:** Use the exact Issue body templates, label taxonomy,
83
- and parent/blocked-by linkage rules required by `/epic-plan` so the
83
+ and parent/blocked-by linkage rules required by `/plan` so the
84
84
  generated dispatch manifest validates against the schema.
85
85
 
86
86
  ## 4. Output Artifacts
87
87
 
88
88
  - The GitHub Issue hierarchy under the parent Epic generated and linked
89
- by `/epic-plan` — Feature Story.
89
+ by `/plan` — a flat Story backlog.
90
90
  - The Epic dispatch manifest (`temp/dispatch-manifest-<epicId>.json`)
91
- emitted by `/epic-plan` for the runner to consume.
91
+ emitted by `/plan` for the runner to consume.
92
92
 
93
93
  ## 5. Scope Boundaries
94
94
 
@@ -38,7 +38,7 @@ wasn't in the room when it was built.
38
38
  - **Release Notes:** Use the `generate-release-notes` workflow to produce
39
39
  user-facing release notes. Focus on user impact, not implementation details.
40
40
  - **Retrospectives:** Support `lib/orchestration/retro-runner.js`
41
- (driven by Phase 5 of `/epic-deliver`) with clean, well-structured
41
+ (driven by Phase 5 of `/deliver`) with clean, well-structured
42
42
  retro structured comments.
43
43
 
44
44
  ### B. Architecture & Reference Documentation
@@ -3,7 +3,7 @@
3
3
  This rule governs the shape of per-release entries in the project CHANGELOG
4
4
  (typically `docs/CHANGELOG.md` or `CHANGELOG.md`). It applies whenever a
5
5
  release entry is authored or edited — most commonly inside Story #N's
6
- docs sweep before `/epic-deliver` opens the release PR.
6
+ docs sweep before `/deliver` opens the release PR.
7
7
 
8
8
  The contract is **guidance-tier** in v1: no automated gate fails a close when
9
9
  an entry drifts off-template. It still binds every author.
@@ -166,7 +166,7 @@ applies.
166
166
 
167
167
  ### Deliver tail auto-invokes pre-merge gates
168
168
 
169
- `/epic-deliver` auto-invokes the code-review module (Phase 4) and
169
+ `/deliver` auto-invokes the code-review module (Phase 4) and
170
170
  the retro runner (Phase 5) inline instead of halting to ask the
171
171
  operator to run them separately. `--skip-code-review` available as
172
172
  an override.
@@ -183,7 +183,7 @@ or a title starting with `📉 Epic Health:`, in addition to
183
183
  well-known lock files (`index.lock`, `HEAD.lock`, `packed-refs.lock`,
184
184
  `config.lock`, `shallow.lock`) whose mtime exceeds the threshold.
185
185
  Fresh locks belonging to in-flight ops are skipped. Runs at
186
- `/epic-deliver` start, before worktree GC.
186
+ `/deliver` start, before worktree GC.
187
187
  ```
188
188
 
189
189
  Contract violations: five separate `###` sub-sections where one theme
@@ -210,12 +210,12 @@ worktree cleanup.
210
210
  - **Shared-store worktrees.** Per-story worktrees link a shared
211
211
  `node_modules` store, so parallel waves no longer duplicate installs
212
212
  or leave residue that blocks reap.
213
- - **`/epic-deliver` auto-invokes pre-merge gates** (code review, retro)
213
+ - **`/deliver` auto-invokes pre-merge gates** (code review, retro)
214
214
  inline. `--skip-code-review` is available as an override.
215
215
  - **Closure sweep covers Epic Health tickets** in addition to PRD and
216
216
  Tech Spec tickets.
217
217
  - **Stale-lock sweep** on the shared `.git/` directory runs at
218
- `/epic-deliver` start, clearing lock files left behind by interrupted
218
+ `/deliver` start, clearing lock files left behind by interrupted
219
219
  operations.
220
220
  ```
221
221
 
@@ -18,8 +18,8 @@ All tasks within a Story MUST be committed to a shared **Story branch**:
18
18
  `story-<storyId>` (e.g., `story-104`). The runtime owns Story branch
19
19
  creation via `story-init.js`; agents commit on the active Story branch only.
20
20
 
21
- > **Commit subjects.** Under the 3-tier hierarchy
22
- > (Epic → Feature → Story), Stories have no child tickets. Commits
21
+ > **Commit subjects.** Under the 2-tier hierarchy
22
+ > (Epic → Story), Stories have no child tickets. Commits
23
23
  > land on `story-<storyId>` directly from the agent and the
24
24
  > Conventional Commit subject references the parent Story via
25
25
  > `(refs #<storyId>)`. See
@@ -111,7 +111,7 @@ rejected by `pre-push` hooks):
111
111
  ## Meta Labels (Retrospective Signal Routing)
112
112
 
113
113
  Two `meta::*` labels route retrospective signals into durable substrates so
114
- the `/epic-plan` Phase 0 fetcher (see
114
+ the `/plan` Phase 0 fetcher (see
115
115
  [`prior-feedback-fetcher.js`](../scripts/lib/feedback-loop/prior-feedback-fetcher.js))
116
116
  can surface open feedback issues to the planner. Both labels live in
117
117
  [`label-constants.js`](../scripts/lib/label-constants.js) under the
@@ -7,12 +7,12 @@
7
7
  "minimatch": "^10.0.0",
8
8
  "picomatch": "^4.0.4",
9
9
  "string-argv": "^0.3.2",
10
- "typescript": ">=5.0.0",
11
10
  "typhonjs-escomplex": "^0.1.0"
12
11
  },
13
12
  "optionalDependencies": {
14
13
  "@commitlint/load": "^21.0.0",
15
14
  "chokidar": "^5.0.0",
16
- "jscpd": "^4.0.0"
15
+ "jscpd": "^4.0.0",
16
+ "typescript": ">=5.0.0"
17
17
  }
18
18
  }
@@ -518,7 +518,7 @@
518
518
  "maxFixAttempts": {
519
519
  "type": "integer",
520
520
  "minimum": 0,
521
- "description": "Maximum auto-fix retry attempts per finding in /epic-deliver Phase 4 (epic-audit). 0 disables auto-fix. Default 3."
521
+ "description": "Maximum auto-fix retry attempts per finding in /deliver Phase 4 (epic-audit). 0 disables auto-fix. Default 3."
522
522
  },
523
523
  "maxFixScopeFiles": {
524
524
  "type": "integer",
@@ -600,7 +600,7 @@
600
600
  "maxFixAttempts": {
601
601
  "type": "integer",
602
602
  "minimum": 0,
603
- "description": "Maximum auto-fix retry attempts per finding in /epic-deliver Phase 5 (code-review). 0 disables auto-fix. Default 3."
603
+ "description": "Maximum auto-fix retry attempts per finding in /deliver Phase 5 (code-review). 0 disables auto-fix. Default 3."
604
604
  },
605
605
  "maxFixScopeFiles": {
606
606
  "type": "integer",
@@ -1383,7 +1383,7 @@
1383
1383
  },
1384
1384
  "preflight": {
1385
1385
  "type": "object",
1386
- "description": "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.",
1386
+ "description": "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.",
1387
1387
  "properties": {
1388
1388
  "maxStories": {
1389
1389
  "type": "integer",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "dispatch-manifest",
4
4
  "title": "Dispatch Manifest",
5
- "description": "Output of dispatcher.js (epic-dispatch variant) and orchestration/story-executor.js (story-execution variant). Written to temp/dispatch-manifest-<epicId>.json for the epic-dispatch variant. The two variants are discriminated by the `type` field. 3-tier shape only (Epic #3078): manifests are Story-only — there is no Task-level fan-out. Open-root by design — the AJV fixture drift test is the enforcement boundary; see docs/decisions.md ADR 20260427-868a.",
5
+ "description": "Output of dispatcher.js (epic-dispatch variant) and orchestration/story-executor.js (story-execution variant). Written to temp/dispatch-manifest-<epicId>.json for the epic-dispatch variant. The two variants are discriminated by the `type` field. 2-tier shape only (Epic #3078): manifests are Story-only — there is no Task-level fan-out. Open-root by design — the AJV fixture drift test is the enforcement boundary; see docs/decisions.md ADR 20260427-868a.",
6
6
  "type": "object",
7
7
  "required": ["generatedAt", "dryRun"],
8
8
  "properties": {
@@ -50,8 +50,8 @@
50
50
  },
51
51
  "hierarchy": {
52
52
  "type": "string",
53
- "const": "3-tier",
54
- "description": "Hierarchy identifier. 3-tier is the only supported shape (Epic #3078)."
53
+ "const": "2-tier",
54
+ "description": "Hierarchy identifier. 2-tier is the only supported shape (Epic #3078)."
55
55
  },
56
56
  "summary": {
57
57
  "type": "object",
@@ -66,7 +66,7 @@
66
66
  "totalStories": {
67
67
  "type": "integer",
68
68
  "minimum": 0,
69
- "description": "Story-centric count for the 3-tier shape (Epic #3078)."
69
+ "description": "Story-centric count for the 2-tier shape (Epic #3078)."
70
70
  },
71
71
  "doneStories": {
72
72
  "type": "integer",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/dsj1984/mandrel/blob/main/.agents/schemas/epic-spec.schema.json",
4
- "version": "3.0.0",
4
+ "version": "4.0.0",
5
5
  "title": "Epic Spec (declarative structural SSOT)",
6
- "description": "Canonical structural specification for an Epic and its children (Features, Stories), consumed by the epic-spec-reconciler. Lives on disk as .agents/epics/<epic-id>.yaml. The reconciler diffs this spec against live GitHub state and applies structural mutations (Create/Update/Close/Relink) behind a dry-run default. Slugs are stable, GH-incarnation-independent identifiers used for intra-spec dependency edges (dependsOn) and the spec ↔ GH-issue mapping persisted in the sibling .agents/epics/<epic-id>.state.json. This schema describes the 3-tier structural shape only (Epic → Feature → Story with inline Story-level acceptance[]/verify[]); agent-execution state (agent::* labels) is intentionally not modelled — that surface belongs to the wave-runner, not the reconciler.",
6
+ "description": "Canonical structural specification for an Epic and its child Stories, consumed by the epic-spec-reconciler. Lives on disk as .agents/epics/<epic-id>.yaml. The reconciler diffs this spec against live GitHub state and applies structural mutations (Create/Update/Close/Relink) behind a dry-run default. Slugs are stable, GH-incarnation-independent identifiers used for intra-spec dependency edges (dependsOn) and the spec ↔ GH-issue mapping persisted in the sibling .agents/epics/<epic-id>.state.json. This schema describes the 2-tier structural shape only (Epic → Story with inline Story-level acceptance[]/verify[]); agent-execution state (agent::* labels) is intentionally not modelled — that surface belongs to the wave-runner, not the reconciler.",
7
7
  "type": "object",
8
8
  "additionalProperties": false,
9
- "required": ["epic", "features"],
9
+ "required": ["epic", "stories"],
10
10
  "properties": {
11
11
  "$schema": {
12
12
  "type": "string",
@@ -15,16 +15,16 @@
15
15
  "version": {
16
16
  "type": "string",
17
17
  "pattern": "^\\d+\\.\\d+\\.\\d+$",
18
- "description": "Optional schema-shape identifier. Identification-only — readers MUST NOT branch behavior on this value. Bumped to 3.0.0 when Task-level decomposition was removed under the 3-tier collapse (Epic #3078)."
18
+ "description": "Optional schema-shape identifier. Identification-only — readers MUST NOT branch behavior on this value. Bumped to 4.0.0 when the Feature tier was removed under the 2-tier collapse (Story #4041); 3.0.0 removed Task-level decomposition (Epic #3078)."
19
19
  },
20
20
  "epic": {
21
21
  "$ref": "#/$defs/epic",
22
22
  "description": "The Epic this spec describes. Carries the GH issue number, human title, and structural labels (type::epic plus any project-specific structural tags). Execution-state labels (agent::*) MUST NOT appear here."
23
23
  },
24
- "features": {
24
+ "stories": {
25
25
  "type": "array",
26
- "description": "Ordered list of Features under this Epic. Order is preserved for human readability but is not load-bearing — wave ordering is driven by stories[].wave + dependsOn, not by feature position.",
27
- "items": { "$ref": "#/$defs/feature" }
26
+ "description": "Ordered list of Stories under this Epic. Order is preserved for human readability but is not load-bearing — execution order is driven by stories[].wave + dependsOn, not by array position.",
27
+ "items": { "$ref": "#/$defs/story" }
28
28
  },
29
29
  "gates": {
30
30
  "$ref": "#/$defs/gates",
@@ -36,12 +36,12 @@
36
36
  "type": "string",
37
37
  "minLength": 1,
38
38
  "pattern": "^[a-z0-9][a-z0-9-]*$",
39
- "description": "Stable kebab-case identifier used for intra-spec dependency edges (dependsOn) and the spec ↔ GH-issue mapping. Slugs must be unique within their scope (features within an epic, stories within a feature). Slugs are not GH issue numbers — they survive Epic re-incarnations and ticket renumbering. Pattern: lowercase alphanumeric + hyphens, must start with [a-z0-9]."
39
+ "description": "Stable kebab-case identifier used for intra-spec dependency edges (dependsOn) and the spec ↔ GH-issue mapping. Slugs must be unique within the Epic's stories[] array. Slugs are not GH issue numbers — they survive Epic re-incarnations and ticket renumbering. Pattern: lowercase alphanumeric + hyphens, must start with [a-z0-9]."
40
40
  },
41
41
  "label": {
42
42
  "type": "string",
43
43
  "minLength": 1,
44
- "description": "A GitHub label name. Structural labels only (e.g. type::epic, type::feature, type::story, persona::*, area::*). Execution-state labels in the AGENT_LABELS allow-list (agent::*) MUST NOT appear in the spec — they are owned by the wave-runner and the reconciler refuses to write them."
44
+ "description": "A GitHub label name. Structural labels only (e.g. type::epic, type::story, persona::*, area::*). Execution-state labels in the AGENT_LABELS allow-list (agent::*) MUST NOT appear in the spec — they are owned by the wave-runner and the reconciler refuses to write them."
45
45
  },
46
46
  "labels": {
47
47
  "type": "array",
@@ -53,7 +53,7 @@
53
53
  "type": "object",
54
54
  "additionalProperties": false,
55
55
  "required": ["id", "title"],
56
- "description": "Top-level Epic descriptor. Unlike Features/Stories (which are slug-keyed and may not exist in GH yet), the Epic always has a real GH issue number — the spec lives at .agents/epics/<id>.yaml and that <id> is the same number used here.",
56
+ "description": "Top-level Epic descriptor. Unlike Stories (which are slug-keyed and may not exist in GH yet), the Epic always has a real GH issue number — the spec lives at .agents/epics/<id>.yaml and that <id> is the same number used here.",
57
57
  "properties": {
58
58
  "id": {
59
59
  "type": "integer",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "body": {
69
69
  "type": "string",
70
- "description": "Optional Epic body. When present, the reconciler updates the GH issue body to match. When omitted, the GH issue body is left untouched (allowing operator-curated bodies to coexist with structural reconciliation). Multi-line markdown is fully supported."
70
+ "description": "Optional Epic body. When present, the reconciler updates the GH issue body to match. When omitted, the GH issue body is left untouched (allowing operator-curated bodies to coexist with structural reconciliation). Multi-line markdown is fully supported. Thematic grouping of Stories — formerly the Feature tier's job — lives here (and in the Tech Spec) as prose."
71
71
  },
72
72
  "labels": {
73
73
  "$ref": "#/$defs/labels",
@@ -75,45 +75,15 @@
75
75
  }
76
76
  }
77
77
  },
78
- "feature": {
79
- "type": "object",
80
- "additionalProperties": false,
81
- "required": ["slug", "title", "stories"],
82
- "description": "A Feature groups Stories under a common product/architectural theme. Features themselves are GitHub issues (type::feature) when materialised by the reconciler — they carry no execution state, only structure.",
83
- "properties": {
84
- "slug": {
85
- "$ref": "#/$defs/slug",
86
- "description": "Stable kebab-case identifier for this Feature. Must be unique within the parent Epic's features[] array."
87
- },
88
- "title": {
89
- "type": "string",
90
- "minLength": 1,
91
- "description": "Human-readable Feature title."
92
- },
93
- "body": {
94
- "type": "string",
95
- "description": "Optional Feature body. Same semantics as epic.body — written by the reconciler when present, left untouched when omitted."
96
- },
97
- "labels": {
98
- "$ref": "#/$defs/labels",
99
- "description": "Structural labels attached to this Feature (e.g. type::feature plus any project-specific structural tags)."
100
- },
101
- "stories": {
102
- "type": "array",
103
- "description": "Ordered list of Stories under this Feature. Order is for readability; execution order is driven by stories[].wave + dependsOn.",
104
- "items": { "$ref": "#/$defs/story" }
105
- }
106
- }
107
- },
108
78
  "story": {
109
79
  "type": "object",
110
80
  "additionalProperties": false,
111
81
  "required": ["slug", "title", "wave"],
112
- "description": "A Story is the unit of agent execution — exactly one Story branch (story-<id>) and exactly one Story sub-agent per Story per wave. Stories declare their wave assignment and inter-Story dependencies via slug references; the wave-runner consumes these to schedule the parallel fan-out. Under the 3-tier collapse (Epic #3078), Stories carry inline acceptance[] + verify[] arrays that the Story sub-agent treats as the Goal/Changes/Acceptance/Verify surface; there is no child-Task decomposition.",
82
+ "description": "A Story is the unit of agent execution — exactly one Story branch (story-<id>) and exactly one Story sub-agent per Story per wave. Stories are direct children of the Epic (2-tier hierarchy, Story #4041). They declare their wave assignment and inter-Story dependencies via slug references; the wave-runner consumes these to schedule the parallel fan-out. Stories carry inline acceptance[] + verify[] arrays that the Story sub-agent treats as the Goal/Changes/Acceptance/Verify surface; there is no child-Task decomposition.",
113
83
  "properties": {
114
84
  "slug": {
115
85
  "$ref": "#/$defs/slug",
116
- "description": "Stable kebab-case identifier for this Story. Must be unique within the parent Feature's stories[] array, and is the value referenced by sibling Stories' dependsOn arrays."
86
+ "description": "Stable kebab-case identifier for this Story. Must be unique within the Epic's stories[] array, and is the value referenced by sibling Stories' dependsOn arrays."
117
87
  },
118
88
  "title": {
119
89
  "type": "string",
@@ -144,7 +114,7 @@
144
114
  },
145
115
  "acceptance": {
146
116
  "type": "array",
147
- "description": "Inline acceptance criteria for this Story (Epic #3078 — 3-tier collapse). Each entry is a single user-visible acceptance statement that the Story-level agent must satisfy. Acts as the Story-level outcome contract that the Story sub-agent treats as the Goal/Changes/Acceptance/Verify surface.",
117
+ "description": "Inline acceptance criteria for this Story. Each entry is a single user-visible acceptance statement that the Story-level agent must satisfy. Acts as the Story-level outcome contract that the Story sub-agent treats as the Goal/Changes/Acceptance/Verify surface.",
148
118
  "items": {
149
119
  "type": "string",
150
120
  "minLength": 1,
@@ -153,7 +123,7 @@
153
123
  },
154
124
  "verify": {
155
125
  "type": "array",
156
- "description": "Inline verification commands for this Story (Epic #3078 — 3-tier collapse). Each entry is a shell-runnable command (typically a contract test invocation) that proves the corresponding acceptance[] entries hold.",
126
+ "description": "Inline verification commands for this Story. Each entry is a shell-runnable command (typically a contract test invocation) that proves the corresponding acceptance[] entries hold.",
157
127
  "items": {
158
128
  "type": "string",
159
129
  "minLength": 1,
@@ -1,7 +1,7 @@
1
1
  # Lifecycle event schemas
2
2
 
3
3
  JSON Schemas for the lifecycle event taxonomy consumed by the
4
- `/epic-deliver` lifecycle bus
4
+ `/deliver` lifecycle bus
5
5
  (`lib/orchestration/lifecycle/bus.js`). The bus validates every
6
6
  emit payload against one of these schemas before invoking
7
7
  listeners; a schema mismatch fails the emit and propagates the
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/dsj1984/mandrel/blob/main/.agents/schemas/lifecycle/story.dispatch.end.schema.json",
4
4
  "title": "story.dispatch.end",
5
- "description": "Appended to the Epic ledger by emit-story-dispatch-end.js when a child story sub-agent returns, so /epic-deliver's idle watchdog can subtract completed Stories from the in-flight set. Subscribed by CheckpointPointerWriter via SUBSCRIBED_END_EVENTS. Sibling ordering within a wave is not guaranteed; ordering between waves is.",
5
+ "description": "Appended to the Epic ledger by emit-story-dispatch-end.js when a child story sub-agent returns, so /deliver's idle watchdog can subtract completed Stories from the in-flight set. Subscribed by CheckpointPointerWriter via SUBSCRIBED_END_EVENTS. Sibling ordering within a wave is not guaranteed; ordering between waves is.",
6
6
  "type": "object",
7
7
  "required": ["storyId", "outcome", "durationMs"],
8
8
  "properties": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/dsj1984/mandrel/blob/main/.agents/schemas/lifecycle/story.dispatch.start.schema.json",
4
4
  "title": "story.dispatch.start",
5
- "description": "Emitted before a story is handed to the host-LLM for Agent-tool fanout. lifecycle-emit-story-dispatch.js appends the {storyId, waveIndex, dispatchedAt, attempt} shape to the Epic ledger so /epic-deliver's host loop can durably ledger every dispatch attempt for in-flight reconciliation (Story #2891).",
5
+ "description": "Emitted before a story is handed to the host-LLM for Agent-tool fanout. lifecycle-emit-story-dispatch.js appends the {storyId, waveIndex, dispatchedAt, attempt} shape to the Epic ledger so /deliver's host loop can durably ledger every dispatch attempt for in-flight reconciliation (Story #2891).",
6
6
  "type": "object",
7
7
  "required": ["storyId", "waveIndex"],
8
8
  "properties": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/dsj1984/mandrel/blob/main/.agents/schemas/lifecycle/story.heartbeat.schema.json",
4
4
  "title": "story.heartbeat",
5
- "description": "Emitted by story-phase.js inside a Story's implementation loop. Surfaces the in-progress Story as an inspectable ledger event so /epic-deliver's host-loop reconciler can confirm a long Story is still making forward progress between dispatch and merge — distinct from story.dispatch.start (one per Story per attempt) and story.merged (one per Story per close). The 3-tier hierarchy has no child Task tickets, so the heartbeat carries phase info only. The optional operator field (Story #3480) records the handle holding the assignee-as-lease claim on the Story so the ticket-lease primitive can decide claim liveness from the most-recent heartbeat for a given owner.",
5
+ "description": "Emitted by story-phase.js inside a Story's implementation loop. Surfaces the in-progress Story as an inspectable ledger event so /deliver's host-loop reconciler can confirm a long Story is still making forward progress between dispatch and merge — distinct from story.dispatch.start (one per Story per attempt) and story.merged (one per Story per close). The 2-tier hierarchy has no child Task tickets, so the heartbeat carries phase info only. The optional operator field (Story #3480) records the handle holding the assignee-as-lease claim on the Story so the ticket-lease primitive can decide claim liveness from the most-recent heartbeat for a given owner.",
6
6
  "type": "object",
7
7
  "required": ["event", "storyId", "epicId", "phase", "timestamp"],
8
8
  "properties": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "validation-evidence",
4
4
  "title": "Validation Evidence",
5
- "description": "Per-scope record of which validation gates have passed against which commit SHA. Written by lib/validation-evidence.js under the per-Epic temp tree at temp/epic-<epicId>/validation-evidence.json (Epic-scoped) or temp/epic-<epicId>/stories/story-<storyId>/validation-evidence.json (Story-scoped); both are gitignored via temp/. Consumed by close-validation, epic-code-review, and /epic-deliver Phase 3 (close-validation) to skip identical re-runs against an already-validated tree. The `storyId` field carries the scope id and equals the epic id for Epic-scoped records.",
5
+ "description": "Per-scope record of which validation gates have passed against which commit SHA. Written by lib/validation-evidence.js under the per-Epic temp tree at temp/epic-<epicId>/validation-evidence.json (Epic-scoped) or temp/epic-<epicId>/stories/story-<storyId>/validation-evidence.json (Story-scoped); both are gitignored via temp/. Consumed by close-validation, epic-code-review, and /deliver Phase 3 (close-validation) to skip identical re-runs against an already-validated tree. The `storyId` field carries the scope id and equals the epic id for Epic-scoped records.",
6
6
  "type": "object",
7
7
  "required": ["storyId", "schemaVersion", "records"],
8
8
  "properties": {
@@ -49,7 +49,7 @@ that the file was meaningfully updated during this Epic's lifecycle
49
49
 
50
50
  **When to run.** Optional. Useful as a pre-merge spot check when an
51
51
  Epic should have produced documentation updates; the standard
52
- `/epic-deliver` flow does **not** invoke this gate today.
52
+ `/deliver` flow does **not** invoke this gate today.
53
53
 
54
54
  **Usage.**
55
55
 
@@ -87,7 +87,7 @@ when Stryker itself fails to run.
87
87
  - [`/docs/architecture.md`](../../docs/architecture.md) — system
88
88
  architecture; the "Key Scripts" section lists the standard
89
89
  orchestration entrypoints.
90
- - [`/docs/quality-gates.md`](../../docs/quality-gates.md) — coverage,
90
+ - [`.agents/docs/quality-gates.md`](../docs/quality-gates.md) — coverage,
91
91
  CRAP, and maintainability baselines + floors.
92
92
  - `package.json` `scripts` — the canonical list of standard CLIs
93
93
  (`test`, `verify`, `coverage:update`, …).
@@ -16,7 +16,7 @@
16
16
  * and the resolved, undisableable round cap
17
17
  * (`delivery.acceptanceEval.maxRounds`, clamped to `[1, ceiling]`).
18
18
  * 3. Emit one per-criterion `acceptance-eval` signal into the retro /
19
- * feedback substrate so the retro and `/epic-plan` Phase 0 feedback
19
+ * feedback substrate so the retro and `/plan` Phase 0 feedback
20
20
  * fetch can see which acceptance items needed rework and the round
21
21
  * count.
22
22
  * 4. Print a single JSON envelope and exit:
@@ -301,7 +301,7 @@ export function renderBlockerMessage({
301
301
  lines.push(` Pending (@pending-only coverage): ${pending.join(', ')}`);
302
302
  }
303
303
  lines.push(
304
- `Author or de-pend scenarios under tests/features/** tagged @epic-${epicId}-ac-<n> so every AC ID is satisfied, then re-run /epic-deliver.`,
304
+ `Author or de-pend scenarios under tests/features/** tagged @epic-${epicId}-ac-<n> so every AC ID is satisfied, then re-run /deliver.`,
305
305
  );
306
306
  return lines.join('\n');
307
307
  }
@@ -420,7 +420,7 @@ export async function reconcileAcceptanceSpec({
420
420
  }
421
421
  // Defence in depth — the start gate would normally catch this.
422
422
  throw new Error(
423
- `[acceptance-spec-reconciler] Epic #${epicId} has no linked context::acceptance-spec ticket and no acceptance::n-a waiver label. Re-run /epic-plan Phase 7 or apply the waiver.`,
423
+ `[acceptance-spec-reconciler] Epic #${epicId} has no linked context::acceptance-spec ticket and no acceptance::n-a waiver label. Re-run /plan Phase 7 or apply the waiver.`,
424
424
  );
425
425
  }
426
426