mandrel 1.59.0 → 1.60.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.
- package/.agents/README.md +14 -14
- package/.agents/docs/SDLC.md +129 -134
- package/.agents/docs/configuration.md +16 -16
- package/.agents/docs/workflows.md +6 -8
- package/.agents/instructions.md +12 -11
- package/.agents/personas/architect.md +1 -1
- package/.agents/personas/product.md +1 -1
- package/.agents/personas/project-manager.md +14 -14
- package/.agents/personas/technical-writer.md +1 -1
- package/.agents/rules/changelog-style.md +5 -5
- package/.agents/rules/git-conventions.md +3 -3
- package/.agents/schemas/agentrc.schema.json +3 -3
- package/.agents/schemas/dispatch-manifest.json +4 -4
- package/.agents/schemas/epic-spec.schema.json +15 -45
- package/.agents/schemas/lifecycle/README.md +1 -1
- package/.agents/schemas/lifecycle/story.dispatch.end.schema.json +1 -1
- package/.agents/schemas/lifecycle/story.dispatch.start.schema.json +1 -1
- package/.agents/schemas/lifecycle/story.heartbeat.schema.json +1 -1
- package/.agents/schemas/validation-evidence.schema.json +1 -1
- package/.agents/scripts/README.md +1 -1
- package/.agents/scripts/acceptance-eval.js +1 -1
- package/.agents/scripts/acceptance-spec-reconciler.js +2 -2
- package/.agents/scripts/analyze-execution.js +2 -2
- package/.agents/scripts/audit-to-stories.js +1 -1
- package/.agents/scripts/check-doc-links.js +2 -3
- package/.agents/scripts/diagnose-friction.js +1 -1
- package/.agents/scripts/dispatcher.js +2 -2
- package/.agents/scripts/drain-pending-cleanup.js +1 -1
- package/.agents/scripts/epic-audit-prepare.js +3 -3
- package/.agents/scripts/epic-deliver-note-intervention.js +2 -2
- package/.agents/scripts/epic-deliver-preflight.js +6 -6
- package/.agents/scripts/epic-deliver-prepare.js +1 -1
- package/.agents/scripts/epic-execute-record-wave.js +4 -4
- package/.agents/scripts/epic-plan-healthcheck.js +6 -10
- package/.agents/scripts/epic-plan-spec-validate.js +1 -1
- package/.agents/scripts/epic-reconcile.js +11 -29
- package/.agents/scripts/evidence-gate.js +1 -1
- package/.agents/scripts/generate-workflows-doc.js +1 -1
- package/.agents/scripts/hierarchy-gate.js +7 -11
- package/.agents/scripts/lib/ITicketingProvider.js +1 -1
- package/.agents/scripts/lib/audit-suite/selector.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/seed-epic-from-findings.js +2 -2
- package/.agents/scripts/lib/baseline-snapshot.js +7 -7
- package/.agents/scripts/lib/bdd-runner-detect.js +1 -1
- package/.agents/scripts/lib/bdd-scenario-scanner.js +3 -3
- package/.agents/scripts/lib/bootstrap/baselines-layout-migration.js +1 -1
- package/.agents/scripts/lib/bootstrap/branch-protection.js +1 -1
- package/.agents/scripts/lib/bootstrap/ci-workflow-template.js +1 -1
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- package/.agents/scripts/lib/codebase-snapshot.js +1 -1
- package/.agents/scripts/lib/config/explain.js +1 -1
- package/.agents/scripts/lib/config/runners.js +2 -2
- package/.agents/scripts/lib/config/runtime.js +1 -1
- package/.agents/scripts/lib/config/temp-paths.js +2 -2
- package/.agents/scripts/lib/config-settings-schema-delivery.js +2 -2
- package/.agents/scripts/lib/config-settings-schema-quality.js +1 -1
- package/.agents/scripts/lib/config-settings-schema.js +3 -3
- package/.agents/scripts/lib/duplicate-search.js +1 -1
- package/.agents/scripts/lib/dynamic-workflow/capability.js +1 -1
- package/.agents/scripts/lib/epic-plan-clarity.js +1 -1
- package/.agents/scripts/lib/epic-plan-ideation.js +1 -1
- package/.agents/scripts/lib/feedback-loop/memory-freshness.js +1 -1
- package/.agents/scripts/lib/feedback-loop/prior-feedback-fetcher.js +1 -1
- package/.agents/scripts/lib/findings/classify-finding.js +1 -1
- package/.agents/scripts/lib/findings/promote-finding.js +10 -10
- package/.agents/scripts/lib/label-constants.js +3 -4
- package/.agents/scripts/lib/label-taxonomy.js +3 -8
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +1 -1
- package/.agents/scripts/lib/orchestration/code-review.js +5 -5
- package/.agents/scripts/lib/orchestration/context-hydration-engine.js +8 -9
- package/.agents/scripts/lib/orchestration/dependency-analyzer.js +3 -3
- package/.agents/scripts/lib/orchestration/detectors-phase.js +2 -2
- package/.agents/scripts/lib/orchestration/dispatch-engine.js +30 -38
- package/.agents/scripts/lib/orchestration/dispatch-pipeline.js +9 -25
- package/.agents/scripts/lib/orchestration/epic-cleanup.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +8 -8
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/creation.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/dag.js +7 -21
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/diagnostics.js +3 -3
- package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +26 -13
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/prompts.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/run-spec-phase.js +2 -2
- package/.agents/scripts/lib/orchestration/epic-plan-state-store.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-run-state-store.js +3 -3
- package/.agents/scripts/lib/orchestration/epic-runner/concurrency-gate.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/deliver-phases.js +3 -3
- package/.agents/scripts/lib/orchestration/epic-runner/phases/build-wave-dag.js +6 -21
- package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +7 -7
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +2 -2
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/story-run-progress-writer.js +8 -8
- package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-apply.js +7 -15
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-diff.js +72 -41
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-ops.js +2 -4
- package/.agents/scripts/lib/orchestration/file-assumptions.js +2 -2
- package/.agents/scripts/lib/orchestration/finalize/close-planning-tickets.js +1 -1
- package/.agents/scripts/lib/orchestration/finalize/open-or-locate-pr.js +2 -2
- package/.agents/scripts/lib/orchestration/finalize/sanitize-skip-ci.js +1 -1
- package/.agents/scripts/lib/orchestration/lease-guard-shared.js +3 -3
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/README.md +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-armer.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-predicate.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/branch-cleaner.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/finalizer.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/index.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/merge-watcher.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/notify-dispatcher.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/watcher.js +1 -1
- package/.agents/scripts/lib/orchestration/manifest-builder.js +5 -5
- package/.agents/scripts/lib/orchestration/parked-follow-ons.js +2 -2
- package/.agents/scripts/lib/orchestration/plan-runner/plan-router.js +5 -5
- package/.agents/scripts/lib/orchestration/post-merge/phases/ticket-closure.js +3 -3
- package/.agents/scripts/lib/orchestration/preflight-cache.js +1 -1
- package/.agents/scripts/lib/orchestration/recurring-failure-detector.js +1 -1
- package/.agents/scripts/lib/orchestration/retro/phases/compose-body.js +1 -1
- package/.agents/scripts/lib/orchestration/retro/phases/gather-signals.js +2 -2
- package/.agents/scripts/lib/orchestration/retro-runner.js +3 -3
- package/.agents/scripts/lib/orchestration/review-depth.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +1 -1
- package/.agents/scripts/lib/orchestration/spec-freshness.js +1 -1
- package/.agents/scripts/lib/orchestration/spec-renderer.js +36 -73
- package/.agents/scripts/lib/orchestration/spec-section-validator.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +2 -2
- package/.agents/scripts/lib/orchestration/task-body-validator.js +6 -6
- package/.agents/scripts/lib/orchestration/ticket-lease.js +1 -1
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +2 -2
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +1 -10
- package/.agents/scripts/lib/orchestration/ticket-validator.js +25 -70
- package/.agents/scripts/lib/orchestration/ticketing/bulk.js +5 -12
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +8 -8
- package/.agents/scripts/lib/orchestration/ticketing/state.js +3 -3
- package/.agents/scripts/lib/orchestration/wave-record-notifications.js +2 -2
- package/.agents/scripts/lib/orchestration/wave-record-projection.js +1 -1
- package/.agents/scripts/lib/plan-phase-cleanup.js +1 -1
- package/.agents/scripts/lib/preflight-runner.js +1 -1
- package/.agents/scripts/lib/presentation/dispatch-manifest-render.js +4 -5
- package/.agents/scripts/lib/presentation/manifest-builder.js +28 -34
- package/.agents/scripts/lib/presentation/manifest-formatter.js +3 -4
- package/.agents/scripts/lib/presentation/manifest-helpers.js +1 -1
- package/.agents/scripts/lib/presentation/manifest-procedures.js +4 -4
- package/.agents/scripts/lib/presentation/manifest-render-waves.js +4 -23
- package/.agents/scripts/lib/presentation/manifest-renderer.js +1 -1
- package/.agents/scripts/lib/presentation/manifest-story-views.js +2 -11
- package/.agents/scripts/lib/signals/schema.js +1 -1
- package/.agents/scripts/lib/spec/index.js +1 -1
- package/.agents/scripts/lib/spec/loader.js +2 -2
- package/.agents/scripts/lib/spec/state.js +7 -16
- package/.agents/scripts/lib/story-init/context-resolver.js +3 -3
- package/.agents/scripts/lib/story-init/state-transitioner.js +2 -2
- package/.agents/scripts/lib/story-init/task-graph-builder.js +7 -7
- package/.agents/scripts/lib/story-lifecycle.js +8 -8
- package/.agents/scripts/lib/story-plan.js +1 -1
- package/.agents/scripts/lib/templates/decomposer-prompts.js +59 -52
- package/.agents/scripts/lib/wave-runner/tick.js +1 -1
- package/.agents/scripts/lifecycle-emit-story-dispatch.js +1 -1
- package/.agents/scripts/lifecycle-emit.js +1 -1
- package/.agents/scripts/providers/github/board-add.js +1 -1
- package/.agents/scripts/providers/github/errors.js +1 -1
- package/.agents/scripts/providers/github/mappers.js +2 -2
- package/.agents/scripts/providers/github/tickets.js +4 -4
- package/.agents/scripts/resync-status-column.js +1 -1
- package/.agents/scripts/retro-run.js +2 -2
- package/.agents/scripts/run-lint.js +1 -1
- package/.agents/scripts/single-story-init.js +1 -1
- package/.agents/scripts/stories-wave-tick.js +5 -5
- package/.agents/scripts/story-close.js +1 -1
- package/.agents/scripts/story-init.js +13 -16
- package/.agents/scripts/story-phase.js +5 -5
- package/.agents/scripts/story-plan.js +3 -3
- package/.agents/scripts/sync-branch-from-base.js +1 -1
- package/.agents/scripts/validate-docs-freshness.js +1 -1
- package/.agents/scripts/wave-tick.js +1 -1
- package/.agents/skills/core/analyze-execution/SKILL.md +2 -2
- package/.agents/skills/core/epic-plan-consolidate/SKILL.md +21 -26
- package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +23 -56
- package/.agents/skills/core/epic-plan-spec-author/SKILL.md +4 -4
- package/.agents/skills/core/hydrate-context/SKILL.md +2 -2
- package/.agents/skills/core/idea-refinement/SKILL.md +4 -4
- package/.agents/skills/core/knowledge-transfer/SKILL.md +2 -2
- package/.agents/skills/core/planning-and-task-breakdown/SKILL.md +1 -1
- package/.agents/skills/core/scope-triage/SKILL.md +9 -10
- package/.agents/skills/core/using-agent-skills/SKILL.md +1 -1
- package/.agents/skills/skills.index.json +7 -7
- package/.agents/templates/agent-protocol.md +2 -2
- package/.agents/workflows/agents-update.md +2 -2
- package/.agents/workflows/audit-architecture.md +2 -2
- package/.agents/workflows/audit-clean-code.md +2 -2
- package/.agents/workflows/audit-dependencies.md +1 -1
- package/.agents/workflows/audit-devops.md +1 -1
- package/.agents/workflows/audit-documentation.md +2 -2
- package/.agents/workflows/audit-lighthouse.md +1 -1
- package/.agents/workflows/audit-performance.md +2 -2
- package/.agents/workflows/audit-privacy.md +1 -1
- package/.agents/workflows/audit-quality.md +2 -2
- package/.agents/workflows/audit-security.md +2 -2
- package/.agents/workflows/audit-seo.md +1 -1
- package/.agents/workflows/audit-sre.md +1 -1
- package/.agents/workflows/audit-to-stories.md +10 -10
- package/.agents/workflows/audit-ux-ui.md +1 -1
- package/.agents/workflows/deliver.md +85 -0
- package/.agents/workflows/explain.md +3 -3
- package/.agents/workflows/git-merge-pr.md +1 -1
- package/.agents/workflows/git-pr-all.md +13 -10
- package/.agents/workflows/git-push.md +6 -3
- package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
- package/.agents/workflows/helpers/acceptance-self-eval.md +1 -1
- package/.agents/workflows/helpers/code-review.md +5 -5
- package/.agents/workflows/{epic-deliver.md → helpers/deliver-epic.md} +43 -43
- package/.agents/workflows/{story-deliver.md → helpers/deliver-stories.md} +25 -25
- package/.agents/workflows/helpers/diagnose.md +1 -1
- package/.agents/workflows/helpers/epic-audit.md +6 -6
- package/.agents/workflows/helpers/epic-deliver-story.md +13 -13
- package/.agents/workflows/helpers/epic-plan-decompose.md +23 -23
- package/.agents/workflows/helpers/epic-plan-spec.md +6 -6
- package/.agents/workflows/helpers/epic-testing.md +3 -3
- package/.agents/workflows/helpers/parallel-tooling.md +1 -1
- package/.agents/workflows/{epic-plan.md → helpers/plan-epic.md} +84 -84
- package/.agents/workflows/{story-plan.md → helpers/plan-story.md} +43 -43
- package/.agents/workflows/helpers/signals.md +1 -1
- package/.agents/workflows/helpers/single-story-deliver.md +11 -11
- package/.agents/workflows/helpers/worktree-lifecycle.md +18 -18
- package/.agents/workflows/onboard.md +17 -17
- package/.agents/workflows/plan.md +89 -0
- package/.agents/workflows/qa-explore.md +1 -1
- package/.agents/workflows/qa-run-harness.md +1 -1
- package/README.md +4 -12
- package/docs/CHANGELOG.md +1149 -0
- package/lib/cli/__tests__/update-changelog-surface.test.js +357 -0
- package/lib/cli/__tests__/update-reexec.test.js +513 -0
- package/lib/cli/init.js +31 -29
- package/lib/cli/update.js +413 -52
- package/package.json +2 -1
- package/.agents/scripts/lib/orchestration/reconciler.js +0 -137
package/.agents/docs/SDLC.md
CHANGED
|
@@ -18,9 +18,9 @@ ADR 20260512-coupling-stance in [`../docs/decisions.md`](../../docs/decisions.md
|
|
|
18
18
|
|
|
19
19
|
From zero to shipped:
|
|
20
20
|
|
|
21
|
-
1. **Plan the work.** Run `/
|
|
21
|
+
1. **Plan the work.** Run `/plan` in your agentic IDE. The framework
|
|
22
22
|
generates a PRD, a Tech Spec, and an Acceptance Spec, decomposes the
|
|
23
|
-
work into the
|
|
23
|
+
work into the flat Story backlog under the Epic, and
|
|
24
24
|
transitions the Epic to `agent::ready`.
|
|
25
25
|
|
|
26
26
|
The entry point you use selects where the run begins:
|
|
@@ -31,7 +31,7 @@ From zero to shipped:
|
|
|
31
31
|
Phase 5 for an Epic Issue you have already opened.
|
|
32
32
|
|
|
33
33
|
> **Phase numbering note.** The numbered phases below are
|
|
34
|
-
> `/
|
|
34
|
+
> `/plan`'s **internal** phases (1–11), not the SDLC-level
|
|
35
35
|
> Phase 0–4 used by the Mermaid diagram in [§ End-to-End
|
|
36
36
|
> Process](#end-to-end-process). Phases 1–4 run **only** on the
|
|
37
37
|
> ideation entry; an existing-Epic invocation starts at Phase 5.
|
|
@@ -43,7 +43,7 @@ From zero to shipped:
|
|
|
43
43
|
2. **Phase 2 — cross-Epic duplicate search** *(ideation entry only)*
|
|
44
44
|
— `lib/duplicate-search.js` ranks open Epics whose scope overlaps
|
|
45
45
|
the one-pager; the operator confirms the idea is distinct or folds
|
|
46
|
-
it into an existing Epic (in which case `/
|
|
46
|
+
it into an existing Epic (in which case `/plan` exits).
|
|
47
47
|
3. **Phase 3 — render Epic body** *(ideation entry only)* — renders
|
|
48
48
|
the confirmed one-pager into the canonical Epic-from-idea template
|
|
49
49
|
and stops for a final wording confirmation.
|
|
@@ -53,7 +53,7 @@ From zero to shipped:
|
|
|
53
53
|
5. **Phase 5 — re-plan detection** — checks whether the Epic already
|
|
54
54
|
carries planning artifacts and, if so, prompts before overwriting
|
|
55
55
|
the PRD / Tech Spec / Acceptance Spec in place and recreating the
|
|
56
|
-
|
|
56
|
+
child Story tickets.
|
|
57
57
|
6. **Phase 6 — Epic clarity gate** — scores the Epic body against the
|
|
58
58
|
five canonical sections. A `clear` verdict requires ≥ 4 of 5
|
|
59
59
|
sections present **and** the Acceptance Criteria section present (AC
|
|
@@ -66,13 +66,13 @@ From zero to shipped:
|
|
|
66
66
|
and routes high-risk Epics to a HITL review stop (low-risk Epics
|
|
67
67
|
auto-proceed).
|
|
68
68
|
8. **Phase 8 — work-breakdown decomposition** — the
|
|
69
|
-
`epic-plan-decompose-author` skill emits the Epic →
|
|
69
|
+
`epic-plan-decompose-author` skill emits the Epic → Story
|
|
70
70
|
tree (with inline `acceptance[]` / `verify[]` per Story); the
|
|
71
71
|
validator enforces hierarchy, DAG acyclicity, and file-assumption
|
|
72
72
|
invariants.
|
|
73
73
|
9. **Phase 9 — execution roadmap** — runs the dispatcher in dry-run to
|
|
74
74
|
compute waves and posts the `dispatch-manifest` structured comment
|
|
75
|
-
that `/
|
|
75
|
+
that `/deliver` consumes.
|
|
76
76
|
10. **Phase 10 — readiness health check** — `epic-plan-healthcheck.js`
|
|
77
77
|
runs the default config + git-remote checks; a non-OK result is a
|
|
78
78
|
**blocking** exit condition for the `agent::ready` flip (overridable
|
|
@@ -83,22 +83,22 @@ From zero to shipped:
|
|
|
83
83
|
non-trivial plans, runs **after** the `agent::ready` flip, and is
|
|
84
84
|
interruptible at every checkpoint — it never blocks the hand-off.
|
|
85
85
|
12. **Phase 12 — notification & hand-off** — posts the backlog summary
|
|
86
|
-
comment, @mentions the operator, and names `/
|
|
86
|
+
comment, @mentions the operator, and names `/deliver` as the
|
|
87
87
|
next step.
|
|
88
88
|
|
|
89
|
-
2. **Deliver the Epic.** Run `/
|
|
89
|
+
2. **Deliver the Epic.** Run `/deliver <epicId>` in your IDE. The
|
|
90
90
|
skill drives the merged execute + close flow end-to-end.
|
|
91
91
|
|
|
92
92
|
> **Phase numbering note.** The numbered phases below refer to
|
|
93
|
-
> `/
|
|
93
|
+
> `/deliver`'s **internal** phases (1–9), not the SDLC-level
|
|
94
94
|
> Phase 0–4 used by the Mermaid diagram in [§ End-to-End
|
|
95
95
|
> Process](#end-to-end-process). When prose elsewhere in this
|
|
96
96
|
> document says "Phase 7", it always means the internal
|
|
97
|
-
> `/
|
|
97
|
+
> `/deliver` phase unless explicitly prefixed with "SDLC".
|
|
98
98
|
|
|
99
99
|
1. **Phase 1 — prepare** — snapshot the Epic, build the wave DAG,
|
|
100
100
|
initialise the `epic-run-state` checkpoint.
|
|
101
|
-
2. **Phase 2 — wave loop** — fan one `/
|
|
101
|
+
2. **Phase 2 — wave loop** — fan one `/deliver` Agent-tool
|
|
102
102
|
sub-agent out per Story per wave (capped at `concurrencyCap`).
|
|
103
103
|
Stories run in parallel inside the operator's Claude session
|
|
104
104
|
against your Max subscription quota; no subprocess worker sessions
|
|
@@ -140,9 +140,9 @@ From zero to shipped:
|
|
|
140
140
|
clean state for the next Epic.
|
|
141
141
|
|
|
142
142
|
For a single Epic-attached Story (re-driving a hotfix, resuming after
|
|
143
|
-
a halt), re-run `/
|
|
143
|
+
a halt), re-run `/deliver <epicId>` — the wave loop picks up
|
|
144
144
|
incomplete Stories from the dispatch manifest automatically. Standalone
|
|
145
|
-
Stories (no `Epic: #N` reference) use `/
|
|
145
|
+
Stories (no `Epic: #N` reference) use `/deliver <storyId>` instead.
|
|
146
146
|
|
|
147
147
|
That is the whole happy path. Everything below is **detail** — branching
|
|
148
148
|
conventions, HITL escalation, audit gates — that you only need when the
|
|
@@ -168,18 +168,18 @@ default flow requires adjustment.
|
|
|
168
168
|
branch reaches `main` only via a pull request the operator merges
|
|
169
169
|
through the GitHub UI.
|
|
170
170
|
- **Hierarchy-aligned skills.** Execution is split along the ticket
|
|
171
|
-
hierarchy: `/
|
|
172
|
-
entry), `/
|
|
173
|
-
`/
|
|
171
|
+
hierarchy: `/plan` builds the backlog (with optional ideation
|
|
172
|
+
entry), `/deliver` owns the merged wave-loop + close-tail, and
|
|
173
|
+
`/deliver` delivers one or more standalone Stories end-to-end.
|
|
174
174
|
`helpers/epic-deliver-story` and `helpers/single-story-deliver` are the
|
|
175
175
|
per-Story workers called by those two commands respectively. All share
|
|
176
176
|
the same primitives (`Graph.computeWaves`, `cascadeCompletion`,
|
|
177
177
|
`ticketing.js`, `WorktreeManager`).
|
|
178
|
-
- **Single-session fan-out.** `/
|
|
178
|
+
- **Single-session fan-out.** `/deliver` launches Story sub-agents via
|
|
179
179
|
the Agent tool — every Story runs inside the operator's Claude session,
|
|
180
180
|
with no subprocess boundary. Worktree filesystem isolation is preserved;
|
|
181
181
|
only the process boundary is gone.
|
|
182
|
-
- **PR is the sole promotion gate.** `/
|
|
182
|
+
- **PR is the sole promotion gate.** `/deliver` ends with a PR open
|
|
183
183
|
against `main` and (by default) GitHub native auto-merge armed; the
|
|
184
184
|
workflow itself never executes `git merge` against `main`. Branch
|
|
185
185
|
protection on `main` enforces required-checks before the merge button
|
|
@@ -232,7 +232,7 @@ graph LR
|
|
|
232
232
|
|
|
233
233
|
subgraph Phase1 ["Phase 1: Initiation"]
|
|
234
234
|
direction TB
|
|
235
|
-
A["👤 /
|
|
235
|
+
A["👤 /plan (ideation)<br/>or 👤 Create GitHub Epic + /plan <id>"]:::manual
|
|
236
236
|
end
|
|
237
237
|
|
|
238
238
|
subgraph Phase2 ["Phase 2: Planning"]
|
|
@@ -245,8 +245,8 @@ graph LR
|
|
|
245
245
|
|
|
246
246
|
subgraph Phase3 ["Phase 3: Delivery"]
|
|
247
247
|
direction TB
|
|
248
|
-
E["👤 /
|
|
249
|
-
F["🤖 wave loop (one /
|
|
248
|
+
E["👤 /deliver <epicId>"]:::manual
|
|
249
|
+
F["🤖 wave loop (one /deliver sub-agent per Story per wave)"]:::agentic
|
|
250
250
|
G["🤖 close-validation → code-review → retro → open PR"]:::agentic
|
|
251
251
|
E --> F --> G
|
|
252
252
|
G -.-> G_Art["📄 PR open against main"]:::artifact
|
|
@@ -306,7 +306,7 @@ files-only so the GitHub provisioning never runs unattended. `bootstrap.js`:
|
|
|
306
306
|
When `.agents/` is already materialized you can run the bootstrap directly
|
|
307
307
|
(`node .agents/scripts/bootstrap.js`). After bootstrap, run **`/onboard`**
|
|
308
308
|
inside Claude Code for the guided first run — stack detection, docs
|
|
309
|
-
scaffolding, a `mandrel doctor` readiness gate, and a started `/
|
|
309
|
+
scaffolding, a `mandrel doctor` readiness gate, and a started `/plan`.
|
|
310
310
|
|
|
311
311
|
> [!NOTE] Bootstrap runs once per repository. It is safe to re-run — existing
|
|
312
312
|
> labels, fields, and branch-protection entries are preserved; missing ones
|
|
@@ -320,7 +320,7 @@ The product lead defines the objective and triggers planning.
|
|
|
320
320
|
|
|
321
321
|
### 1a. Ideation entry (optional)
|
|
322
322
|
|
|
323
|
-
Run `/
|
|
323
|
+
Run `/plan` with no arguments (or `--idea "<seed>"`) to enter ideation
|
|
324
324
|
mode:
|
|
325
325
|
|
|
326
326
|
1. **Sharpen the idea.** The `idea-refinement` skill drives a divergent →
|
|
@@ -330,12 +330,12 @@ mode:
|
|
|
330
330
|
2. **Scope triage (Phase 1.5).** Before the ceremony is paid for, the
|
|
331
331
|
one-pager is judged against the story-vs-epic rubric (see the
|
|
332
332
|
subsection below). On a `story` / `borderline` verdict the operator may
|
|
333
|
-
route the work to `/
|
|
333
|
+
route the work to `/plan` instead of opening an Epic.
|
|
334
334
|
3. **Cross-Epic duplicate search.** `lib/duplicate-search.js` queries the
|
|
335
335
|
open Epics in the repo, scores by title + body keyword overlap, and
|
|
336
336
|
surfaces matches above a threshold. The operator either confirms the
|
|
337
337
|
new idea is genuinely distinct or folds it into an existing Epic
|
|
338
|
-
(`/
|
|
338
|
+
(`/plan` exits and the operator resumes work on the existing
|
|
339
339
|
id).
|
|
340
340
|
4. **Render and confirm the Epic body.** The one-pager is rendered into
|
|
341
341
|
the canonical Epic-from-idea template; the operator confirms before
|
|
@@ -346,12 +346,12 @@ mode:
|
|
|
346
346
|
|
|
347
347
|
#### Scope triage
|
|
348
348
|
|
|
349
|
-
`/
|
|
349
|
+
`/plan` Phase 1.5 runs the
|
|
350
350
|
[`core/scope-triage`](../skills/core/scope-triage/SKILL.md) rubric over the
|
|
351
351
|
sharpened one-pager so a story-sized scope is not pushed through the full Epic
|
|
352
|
-
ceremony (PRD + Tech Spec + Acceptance Spec +
|
|
353
|
-
`epic/<id>` integration branch) only to land as a degenerate one-
|
|
354
|
-
|
|
352
|
+
ceremony (PRD + Tech Spec + Acceptance Spec + Story backlog +
|
|
353
|
+
`epic/<id>` integration branch) only to land as a degenerate one-Story
|
|
354
|
+
output. The rubric anchors its sizing judgment **by reference** to
|
|
355
355
|
the existing sizing SSOT (`DELIVERABLE_GRANULARITY_GUIDANCE` /
|
|
356
356
|
`DEFAULT_TASK_SIZING` in `ticket-validator-sizing.js`) and emits one of three
|
|
357
357
|
verdicts — `epic` | `story` | `borderline`.
|
|
@@ -361,9 +361,9 @@ transition) and **advisory** — the operator always decides. It folds into the
|
|
|
361
361
|
existing Phase 1 HITL confirmation rather than adding a second stop: an `epic`
|
|
362
362
|
verdict proceeds with a plain confirm, while a `story` / `borderline` verdict
|
|
363
363
|
offers a three-way choice (single Story / plan as Epic anyway / abort). On an
|
|
364
|
-
accepted `story`, `/
|
|
365
|
-
`/
|
|
366
|
-
skipped when `/
|
|
364
|
+
accepted `story`, `/plan` hands the one-pager off to
|
|
365
|
+
`/plan --from-notes` as a scope-triage handoff and exits. Phase 1.5 is
|
|
366
|
+
skipped when `/plan` is itself entered via a scope-triage handoff, so the
|
|
367
367
|
two workflows never ping-pong a settled decision.
|
|
368
368
|
|
|
369
369
|
The same rubric also guards the **existing-Epic entry** (1b) as the
|
|
@@ -371,7 +371,7 @@ The same rubric also guards the **existing-Epic entry** (1b) as the
|
|
|
371
371
|
hand-opened directly as a `type::epic` issue (the Phase 6 Epic Clarity Gate
|
|
372
372
|
scores section *presence*, not scope *size*, so a clear-but-thin Epic would
|
|
373
373
|
otherwise sail through). The advisory fires **only** when Phase 5 found no
|
|
374
|
-
linked PRD / Tech Spec **and** the Epic has no open
|
|
374
|
+
linked PRD / Tech Spec **and** the Epic has no open Story children, so
|
|
375
375
|
it never re-triages an Epic that is being re-planned. An `epic` verdict
|
|
376
376
|
proceeds silently; a `story` / `borderline` verdict STOPs with the same
|
|
377
377
|
three-way choice (convert to a standalone Story / proceed as Epic anyway /
|
|
@@ -379,31 +379,31 @@ abort). Converting is **close-and-recreate** — a `type::epic` body cannot
|
|
|
379
379
|
satisfy `validateStoryBody`, and editing the issue in place would violate the
|
|
380
380
|
"do not modify existing issues without explicit permission" rule — so, only
|
|
381
381
|
after the operator confirms, the Epic body seeds a notes file,
|
|
382
|
-
`/
|
|
382
|
+
`/plan --from-notes` opens a replacement Story (identified as a
|
|
383
383
|
scope-triage handoff so it skips its own gate, with a `## Notes` back-link to
|
|
384
384
|
the Epic), and the Epic is closed with `gh issue close --comment` cross-linking
|
|
385
385
|
the replacement. No deterministic scorer, no schema, and no label transition
|
|
386
386
|
sit behind either gate.
|
|
387
387
|
|
|
388
388
|
The rubric also runs in the **escalation direction** — the symmetric
|
|
389
|
-
counterpart in [`/
|
|
389
|
+
counterpart in [`/plan`](../workflows/helpers/plan-story.md). After `/plan`
|
|
390
390
|
Phase 2 drafts a standalone Story body (the draft, not the seed, is the honest
|
|
391
391
|
basis for the judgment), the same `core/scope-triage` rubric judges whether the
|
|
392
392
|
scope is actually Epic-sized. The verdict folds into the existing Phase 2
|
|
393
393
|
draft-confirmation HITL stop with no extra stop on a `story` verdict; an `epic`
|
|
394
|
-
verdict offers a three-way choice (escalate to `/
|
|
394
|
+
verdict offers a three-way choice (escalate to `/plan --idea` as a
|
|
395
395
|
scope-triage handoff / persist as a standalone Story anyway / abort). On an
|
|
396
|
-
accepted escalation, `/
|
|
397
|
-
`/
|
|
398
|
-
gate. This gate is itself skipped when `/
|
|
399
|
-
scope-triage handoff (from `/
|
|
396
|
+
accepted escalation, `/plan` abandons the draft and hands the notes off to
|
|
397
|
+
`/plan --idea`, marked as a handoff so `/plan` skips its own Phase 1.5
|
|
398
|
+
gate. This gate is itself skipped when `/plan` was entered via a
|
|
399
|
+
scope-triage handoff (from `/plan` Phase 1.5 or the Phase 5.5 conversion
|
|
400
400
|
path), so the two workflows never ping-pong a settled decision. As with the
|
|
401
401
|
inbound gates, the verdict is advisory and host-LLM judgment — no auto-routing,
|
|
402
402
|
no scorer, no schema, and no label transition.
|
|
403
403
|
|
|
404
404
|
### 1b. Existing-Epic entry
|
|
405
405
|
|
|
406
|
-
Run `/
|
|
406
|
+
Run `/plan <epicId>` directly when the Epic Issue already exists. The
|
|
407
407
|
ideation phases (1a) are skipped.
|
|
408
408
|
|
|
409
409
|
In both modes the planning flow continues into Phase 2 with the captured
|
|
@@ -415,8 +415,8 @@ Epic id.
|
|
|
415
415
|
|
|
416
416
|
The framework reads the Epic and autonomously builds the entire work breakdown.
|
|
417
417
|
|
|
418
|
-
> **Epic Clarity Gate (`/
|
|
419
|
-
> Acceptance Spec authoring kicks off, `/
|
|
418
|
+
> **Epic Clarity Gate (`/plan` `planning.clarity-gate` state).** Before PRD / Tech Spec /
|
|
419
|
+
> Acceptance Spec authoring kicks off, `/plan` scores the Epic body
|
|
420
420
|
> against the five canonical sections from
|
|
421
421
|
> [`templates/epic-from-idea.md`](../templates/epic-from-idea.md) (Context,
|
|
422
422
|
> Goal, Non-Goals, Scope, Acceptance Criteria). Common legacy heading
|
|
@@ -473,7 +473,7 @@ fails loudly if any is missing or empty.
|
|
|
473
473
|
|
|
474
474
|
#### Adaptive planning risk routing
|
|
475
475
|
|
|
476
|
-
`/
|
|
476
|
+
`/plan`'s `planning.spec-authoring` state derives a deterministic
|
|
477
477
|
**`planningRisk`** envelope from a **planner-authored risk verdict**
|
|
478
478
|
(`risk-verdict.json`, the fourth planning artifact the
|
|
479
479
|
`epic-plan-spec-author` Skill writes from the PRD / Tech Spec it just
|
|
@@ -500,7 +500,7 @@ downstream decisions:
|
|
|
500
500
|
harness, cleanup) print the auto-proceed message from
|
|
501
501
|
`reviewRouting.operatorMessage` and chain directly into the
|
|
502
502
|
`planning.decompose` state. The operator can force the review
|
|
503
|
-
stop on low-risk work by passing `--force-review` to `/
|
|
503
|
+
stop on low-risk work by passing `--force-review` to `/plan`.
|
|
504
504
|
|
|
505
505
|
The risk envelope is also threaded into the `planning.decompose` state's decomposer context
|
|
506
506
|
so the ticket array can cite the relevant axes when assigning
|
|
@@ -516,9 +516,9 @@ framework maintenance, docs-only churn). The **`acceptance::n-a`** label
|
|
|
516
516
|
on the Epic ticket records the waiver. There are two routes to the label:
|
|
517
517
|
|
|
518
518
|
- **Operator-applied** — the operator labels the Epic before or during
|
|
519
|
-
`/
|
|
519
|
+
`/plan`'s `planning.spec-authoring` state when they already
|
|
520
520
|
know the work does not need a spec.
|
|
521
|
-
- **Planner-selected** — `/
|
|
521
|
+
- **Planner-selected** — `/plan`'s `planning.spec-authoring` state derives a
|
|
522
522
|
`planningRisk` envelope from the planner-authored risk verdict
|
|
523
523
|
(see § Adaptive planning risk routing) and,
|
|
524
524
|
when `acceptanceDisposition === 'not-applicable'`, the persist half
|
|
@@ -530,30 +530,28 @@ on the Epic ticket records the waiver. There are two routes to the label:
|
|
|
530
530
|
Either route produces the same runtime behavior. The waiver is respected
|
|
531
531
|
by both runtime gates:
|
|
532
532
|
|
|
533
|
-
- The `/
|
|
533
|
+
- The `/deliver` **start gate** (`delivery.snapshot` state) skips
|
|
534
534
|
the acceptance-spec presence check when the label is set.
|
|
535
535
|
- The finalize-time **acceptance-spec reconciler** returns
|
|
536
536
|
`status: 'waived'` without scanning `tests/features/**` and the
|
|
537
537
|
finalize step proceeds.
|
|
538
538
|
|
|
539
539
|
The waiver is binary — there is no partial opt-out. If an Epic later
|
|
540
|
-
warrants spec coverage, remove the label and run `/
|
|
540
|
+
warrants spec coverage, remove the label and run `/plan`'s
|
|
541
541
|
`planning.spec-authoring` state to author the spec.
|
|
542
542
|
|
|
543
543
|
1. **Ticket Decomposer** (`epic-plan-decompose.js`):
|
|
544
|
-
-
|
|
545
|
-
(Epic →
|
|
544
|
+
- Decomposes specs into the **2-tier hierarchy**
|
|
545
|
+
(Epic → Story):
|
|
546
546
|
|
|
547
547
|
```text
|
|
548
548
|
Epic (type::epic)
|
|
549
549
|
├── PRD (context::prd)
|
|
550
550
|
├── Tech Spec (context::tech-spec)
|
|
551
|
-
├──
|
|
552
|
-
│ ├── Story
|
|
553
|
-
│
|
|
554
|
-
|
|
555
|
-
│ └── Story (type::story)
|
|
556
|
-
└── Feature (type::feature)
|
|
551
|
+
├── Story (type::story)
|
|
552
|
+
│ ├── acceptance[] ← inline on Story body
|
|
553
|
+
│ └── verify[] ← inline on Story body
|
|
554
|
+
└── Story (type::story)
|
|
557
555
|
```
|
|
558
556
|
|
|
559
557
|
- **Wiring.** Each ticket is linked using `blocked by #NNN` syntax and
|
|
@@ -562,14 +560,15 @@ warrants spec coverage, remove the label and run `/epic-plan`'s
|
|
|
562
560
|
and agent prompts, plus the inline `acceptance[]` / `verify[]`
|
|
563
561
|
arrays the executing sub-agent reads.
|
|
564
562
|
|
|
565
|
-
`/
|
|
566
|
-
Story. The wave-loop fan-out in `/
|
|
567
|
-
|
|
568
|
-
|
|
563
|
+
`/deliver` runs a **single** Story-implementation phase per
|
|
564
|
+
Story. The wave-loop fan-out in `/deliver` and the
|
|
565
|
+
Story-branch → Epic-branch merge model are unchanged; the Feature and
|
|
566
|
+
Task layers are gone, and thematic grouping lives as prose in the Epic
|
|
567
|
+
body / Tech Spec.
|
|
569
568
|
|
|
570
569
|
When decomposition completes the Epic flips to `agent::ready` and the
|
|
571
570
|
dispatch manifest is posted as a structured comment on the Epic. That
|
|
572
|
-
manifest is the source of truth for the wave layout `/
|
|
571
|
+
manifest is the source of truth for the wave layout `/deliver`
|
|
573
572
|
consumes in the `delivery.snapshot` state.
|
|
574
573
|
|
|
575
574
|
### `agent::ready` exit conditions
|
|
@@ -577,7 +576,7 @@ consumes in the `delivery.snapshot` state.
|
|
|
577
576
|
The planning → delivery handoff is governed by an explicit checklist.
|
|
578
577
|
The persist half of `epic-plan-decompose.js` refuses to flip the Epic
|
|
579
578
|
to `agent::ready` unless **every** condition below is true. The
|
|
580
|
-
contract is enforced at the planner boundary so `/
|
|
579
|
+
contract is enforced at the planner boundary so `/deliver` can
|
|
581
580
|
treat `agent::ready` as a load-bearing precondition rather than a
|
|
582
581
|
hopeful signal.
|
|
583
582
|
|
|
@@ -587,16 +586,16 @@ hopeful signal.
|
|
|
587
586
|
`acceptance::n-a` waiver label. Missing-without-waiver fails the
|
|
588
587
|
handoff.
|
|
589
588
|
- **Decomposition persisted.** The structural reconciler has applied
|
|
590
|
-
the
|
|
589
|
+
the Epic's child-Story backlog and written the spec to
|
|
591
590
|
`.agents/epics/<epicId>.yaml`. The `epic-plan-state` checkpoint
|
|
592
591
|
comment records `phase: ready`.
|
|
593
592
|
- **Dispatch manifest posted.** A single `epic-dispatch` structured
|
|
594
593
|
comment exists on the Epic and validates against
|
|
595
594
|
`.agents/schemas/dispatch-manifest.json`. The dispatch manifest is
|
|
596
|
-
the source of truth `/
|
|
595
|
+
the source of truth `/deliver` reads during
|
|
597
596
|
`delivery.snapshot`.
|
|
598
597
|
- **Healthcheck green.** `epic-plan-healthcheck.js` (run during
|
|
599
|
-
`/
|
|
598
|
+
`/plan` Phase 10) returned `ok: true`. A failing healthcheck
|
|
600
599
|
blocks the handoff — there is no advisory degrade-mode for
|
|
601
600
|
`agent::ready`.
|
|
602
601
|
- **Notification posted.** The planner has posted the
|
|
@@ -617,7 +616,7 @@ the label to re-arm the gate.
|
|
|
617
616
|
|
|
618
617
|
## Phase 3: Delivery (Agentic)
|
|
619
618
|
|
|
620
|
-
Delivery is driven by the **`/
|
|
619
|
+
Delivery is driven by the **`/deliver`** slash command for whole-Epic
|
|
621
620
|
flows and the **Story Init/Close** scripts for individual Stories. All entry
|
|
622
621
|
points share the same primitives — DAG computation, context hydration,
|
|
623
622
|
worktree isolation, and cascade closure. The lifecycle bus listener
|
|
@@ -638,13 +637,13 @@ side-effects rather than inline calls at phase boundaries; the
|
|
|
638
637
|
`AutomergeArmer` listener.
|
|
639
638
|
|
|
640
639
|
> **Acceptance-spec start gate.** Before a single wave fans out,
|
|
641
|
-
> `/
|
|
640
|
+
> `/deliver`'s `delivery.snapshot` state
|
|
642
641
|
> ([`lib/orchestration/epic-runner/phases/snapshot.js`](../scripts/lib/orchestration/epic-runner/phases/snapshot.js))
|
|
643
642
|
> asserts that the Epic either (a) carries the `acceptance::n-a`
|
|
644
643
|
> waiver label, or (b) has a linked `context::acceptance-spec`
|
|
645
644
|
> ticket. The ticket's GitHub state (open / closed) is not checked
|
|
646
645
|
> — presence is sufficient, matching the PRD and Tech Spec contract.
|
|
647
|
-
> The reviewer's OK during `/
|
|
646
|
+
> The reviewer's OK during `/plan`'s `planning.spec-authoring`
|
|
648
647
|
> state is the approval
|
|
649
648
|
> signal, not a manual ticket-close action; the three planning
|
|
650
649
|
> context tickets are closed automatically by the
|
|
@@ -660,14 +659,14 @@ side-effects rather than inline calls at phase boundaries; the
|
|
|
660
659
|
|
|
661
660
|
| Mode | Entry point | When to use |
|
|
662
661
|
| -------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
663
|
-
| **Whole Epic** | `/
|
|
664
|
-
| **Epic-attached Story (worker)** | *helper* `helpers/epic-deliver-story <storyId>` | Per-Story sub-agent called internally by `/
|
|
665
|
-
| **Standalone Story — plan** | `/
|
|
666
|
-
| **Standalone Story — deliver** | `/
|
|
667
|
-
| **Standalone Story (worker)** | *helper* `helpers/single-story-deliver <storyId>` | Per-Story sub-agent called internally by `/
|
|
668
|
-
|
|
669
|
-
The operator-facing entry points are `/
|
|
670
|
-
`/
|
|
662
|
+
| **Whole Epic** | `/deliver <epicId>` | Drive an Epic end-to-end. Owns the wave loop and the close-tail; ends with a PR open to main. |
|
|
663
|
+
| **Epic-attached Story (worker)** | *helper* `helpers/epic-deliver-story <storyId>` | Per-Story sub-agent called internally by `/deliver`'s wave fan-out; not an operator slash command. |
|
|
664
|
+
| **Standalone Story — plan** | `/plan` | Plan a one-off Story that does not belong to an Epic backlog. |
|
|
665
|
+
| **Standalone Story — deliver** | `/deliver <storyId> [<storyId>...]` | Deliver one or more standalone Stories authored by `/plan`. |
|
|
666
|
+
| **Standalone Story (worker)** | *helper* `helpers/single-story-deliver <storyId>` | Per-Story sub-agent called internally by `/deliver`; not an operator slash command. |
|
|
667
|
+
|
|
668
|
+
The operator-facing entry points are `/deliver` (for Epics) and
|
|
669
|
+
`/deliver` (for standalone Stories). The `helpers/` layer sits below
|
|
671
670
|
both and is never invoked directly by the operator.
|
|
672
671
|
|
|
673
672
|
### Story-centric branching
|
|
@@ -679,7 +678,7 @@ both and is never invoked directly by the operator.
|
|
|
679
678
|
### Story execution lifecycle
|
|
680
679
|
|
|
681
680
|
Whether the Story is launched directly by the operator or fanned out by
|
|
682
|
-
`/
|
|
681
|
+
`/deliver`'s wave loop, the same three phases run:
|
|
683
682
|
|
|
684
683
|
1. **Initialization** (`story-init.js`):
|
|
685
684
|
- Verifies all upstream dependencies are satisfied.
|
|
@@ -720,17 +719,18 @@ Whether the Story is launched directly by the operator or fanned out by
|
|
|
720
719
|
resolver into `[1, hard ceiling]` so no configuration can disable the
|
|
721
720
|
cap or let the loop spin unbounded. Each terminus emits a
|
|
722
721
|
per-criterion `acceptance-eval` signal into the retro / feedback
|
|
723
|
-
substrate so the retro and `/
|
|
722
|
+
substrate so the retro and `/plan` Phase 0 feedback fetch see
|
|
724
723
|
which acceptance items needed rework and the round count. The loop is
|
|
725
724
|
**additive** and sits below the Epic-level acceptance-spec
|
|
726
|
-
reconciliation (`/
|
|
725
|
+
reconciliation (`/deliver` Phase 7.1) — it evaluates the actual
|
|
727
726
|
work product per Story mid-delivery, not test-tag presence at
|
|
728
727
|
finalize.
|
|
729
728
|
3. **Closure** (`story-close.js`):
|
|
730
729
|
- Runs shift-left validation (lint, format, test).
|
|
731
730
|
- Merges the Story branch into `epic/<epicId>`.
|
|
732
|
-
- Transitions the Story → `agent::done
|
|
733
|
-
|
|
731
|
+
- Transitions the Story → `agent::done`. There is no upward
|
|
732
|
+
auto-cascade — the Epic flips only when the operator merges the
|
|
733
|
+
`epic/<id>` PR to `main`.
|
|
734
734
|
- Reaps the Story worktree and cleans up the merged Story branch.
|
|
735
735
|
|
|
736
736
|
### Context hydration
|
|
@@ -741,7 +741,7 @@ standalone Stories), the Context Hydrator assembles a self-contained prompt:
|
|
|
741
741
|
|
|
742
742
|
1. `agent-protocol.md` (universal rules).
|
|
743
743
|
2. Persona and skill directives (from Task labels).
|
|
744
|
-
3. Hierarchy context (Story →
|
|
744
|
+
3. Hierarchy context (Story → Epic → PRD → Tech Spec).
|
|
745
745
|
4. **Story branch context.** Automatic checkouts to the Story branch. Under
|
|
746
746
|
worktree isolation, each Story runs in its own `.worktrees/story-<id>/` so
|
|
747
747
|
branch swaps, staging, and reflog activity are isolated per-story. See
|
|
@@ -754,7 +754,7 @@ Agents update their state in real-time on GitHub:
|
|
|
754
754
|
|
|
755
755
|
- **Labels**: `agent::ready` → `agent::executing` → `agent::done`. The
|
|
756
756
|
intermediate review label is not part of the label taxonomy; the
|
|
757
|
-
PR opened by `/
|
|
757
|
+
PR opened by `/deliver`'s `delivery.finalize` state is the equivalent "ready to merge"
|
|
758
758
|
signal at the Epic level. The `WaveObserver` submodule additionally
|
|
759
759
|
syncs a GitHub Projects v2 Status column on each transition when a
|
|
760
760
|
`projectNumber` is configured.
|
|
@@ -773,7 +773,7 @@ dispatches any newly-unblocked Tasks. This continues until all waves complete.
|
|
|
773
773
|
### Story assignment (deterministic)
|
|
774
774
|
|
|
775
775
|
`helpers/epic-deliver-story` requires an explicit Story id. The parent
|
|
776
|
-
`/
|
|
776
|
+
`/deliver` wave loop picks Story ids off the frozen dispatch manifest
|
|
777
777
|
deterministically and launches one Agent-tool sub-agent (calling
|
|
778
778
|
`helpers/epic-deliver-story`) per id per wave; sibling sub-agents never
|
|
779
779
|
race on the same Story.
|
|
@@ -839,13 +839,13 @@ an exclusive, time-bounded claim on the ticket via
|
|
|
839
839
|
rides the ticket's GitHub `assignees` field — a substrate every clone can
|
|
840
840
|
read — so a live foreign claim is visible to, and refuses, a second
|
|
841
841
|
operator regardless of which machine they are on. All three delivery and
|
|
842
|
-
planning entry points take the claim: `/
|
|
842
|
+
planning entry points take the claim: `/plan` acquires the Epic lease
|
|
843
843
|
before Phase 7 (spec) and releases it after Phase 8 (decompose),
|
|
844
|
-
`/
|
|
844
|
+
`/deliver` acquires the Epic lease in its prepare guard, and
|
|
845
845
|
`/single-story-deliver` acquires the Story lease at init. For
|
|
846
|
-
`/
|
|
846
|
+
`/deliver` and `/single-story-deliver`, liveness is decided by the
|
|
847
847
|
owner's most-recent `story.heartbeat` against `delivery.lease.ttlMs`;
|
|
848
|
-
because planning emits no `story.heartbeat`, `/
|
|
848
|
+
because planning emits no `story.heartbeat`, `/plan` has no
|
|
849
849
|
live-heartbeat source and treats **any** foreign assignee as a live claim.
|
|
850
850
|
A live foreign claim fails the preflight closed (refuse-and-exit, naming
|
|
851
851
|
the owner); `--steal` is the only override. See
|
|
@@ -857,9 +857,9 @@ clones from racing in the first place, while the same-machine merge lock
|
|
|
857
857
|
serialises the parallel-wave story closures *within* the one clone that
|
|
858
858
|
holds the lease.
|
|
859
859
|
|
|
860
|
-
### Close-tail (`delivery.close-validation` through `delivery.complete` of `/
|
|
860
|
+
### Close-tail (`delivery.close-validation` through `delivery.complete` of `/deliver`)
|
|
861
861
|
|
|
862
|
-
After the wave loop returns `complete`, `/
|
|
862
|
+
After the wave loop returns `complete`, `/deliver` runs the
|
|
863
863
|
remaining phases against the Epic branch — close-validation, audit,
|
|
864
864
|
code-review, retro, and finalize — before handing off to the
|
|
865
865
|
watch / auto-merge / cleanup tail that drives the PR to merge:
|
|
@@ -890,7 +890,7 @@ watch / auto-merge / cleanup tail that drives the PR to merge:
|
|
|
890
890
|
`epicRetroMirrorPath`) so operators can read the retro without
|
|
891
891
|
re-fetching from GitHub. GitHub remains the source of truth; the
|
|
892
892
|
mirror write is best-effort and a failure only logs a warn.
|
|
893
|
-
5. **Finalize (Phase 7).** `/
|
|
893
|
+
5. **Finalize (Phase 7).** `/deliver` fires `epic.close.end` via
|
|
894
894
|
`lifecycle-emit.js`; the `AcceptanceReconciler` → `Finalizer`
|
|
895
895
|
listener chain owns every close-time side effect end to end
|
|
896
896
|
(Story #2894 — bus-owned finalize). The chain runs three
|
|
@@ -931,7 +931,7 @@ watch / auto-merge / cleanup tail that drives the PR to merge:
|
|
|
931
931
|
`alreadyClosed` and edits the existing handoff comment in
|
|
932
932
|
place rather than appending a duplicate. The Epic stays at
|
|
933
933
|
`agent::executing` until the PR merges.
|
|
934
|
-
6. **Watch-and-iterate (Phase 8).** `/
|
|
934
|
+
6. **Watch-and-iterate (Phase 8).** `/deliver` watches the open PR's
|
|
935
935
|
required checks until they turn green. Transient failures trigger an
|
|
936
936
|
automated re-run loop; durable failures surface for human remediation
|
|
937
937
|
on the Epic branch.
|
|
@@ -943,7 +943,7 @@ watch / auto-merge / cleanup tail that drives the PR to merge:
|
|
|
943
943
|
local Story/Epic branch refs and any lingering worktrees so the
|
|
944
944
|
workspace returns to a clean state for the next Epic.
|
|
945
945
|
|
|
946
|
-
`/
|
|
946
|
+
`/deliver` exits cleanly once auto-merge is armed (or sooner if the
|
|
947
947
|
operator declines auto-merge). The operator can merge through the GitHub UI
|
|
948
948
|
at any time; the `delivery.complete` state handles the post-merge branch reap.
|
|
949
949
|
|
|
@@ -952,7 +952,7 @@ at any time; the `delivery.complete` state handles the post-merge branch reap.
|
|
|
952
952
|
## HITL (Human-in-the-Loop) model
|
|
953
953
|
|
|
954
954
|
On the happy path there is exactly **one** mandatory operator touchpoint
|
|
955
|
-
after `/
|
|
955
|
+
after `/deliver` fires (blocker resolution). PR merge is autonomous
|
|
956
956
|
via armed auto-merge; the operator can opt in as a second touchpoint by
|
|
957
957
|
disarming auto-merge in the GitHub UI, or is pulled in by exception when
|
|
958
958
|
required checks fail.
|
|
@@ -966,7 +966,7 @@ required checks fail.
|
|
|
966
966
|
scope edit on the blocking ticket), then flips the Epic back to
|
|
967
967
|
`agent::executing` to resume.
|
|
968
968
|
2. **PR merge (autonomous by default; operator-gated by exception).** At
|
|
969
|
-
the end of `/
|
|
969
|
+
the end of `/deliver`, the workflow opens a PR to `main` and
|
|
970
970
|
arms GitHub native auto-merge (the `delivery.automerge` state). When required checks pass,
|
|
971
971
|
the PR lands without a second operator visit; the standard
|
|
972
972
|
label-transition pathway flips the Epic to `agent::done` on merge.
|
|
@@ -975,7 +975,7 @@ required checks fail.
|
|
|
975
975
|
`code-review` comment, and the retro before merging by hand, or
|
|
976
976
|
(b) checks fail and need remediation on the Epic branch. There is
|
|
977
977
|
no separate close command — the close-out side effects (PR open,
|
|
978
|
-
planning-ticket close, handoff comment) are owned by `/
|
|
978
|
+
planning-ticket close, handoff comment) are owned by `/deliver`'s
|
|
979
979
|
`delivery.finalize` state (the lifecycle Finalizer listener), whose
|
|
980
980
|
replay is idempotent.
|
|
981
981
|
|
|
@@ -995,7 +995,7 @@ required checks fail.
|
|
|
995
995
|
|
|
996
996
|
- `risk::high` tasks **run without pause.** The label remains as planning
|
|
997
997
|
metadata and retro telemetry, but it does **not** halt the dispatcher
|
|
998
|
-
or `/
|
|
998
|
+
or `/deliver`. Branch protection on `main` and
|
|
999
999
|
`BlockerHandler`-driven escalation are the runtime defenses for
|
|
1000
1000
|
destructive actions.
|
|
1001
1001
|
- Wave boundaries — the runner advances as soon as wave N completes.
|
|
@@ -1009,10 +1009,10 @@ required checks fail.
|
|
|
1009
1009
|
|
|
1010
1010
|
## Epic Deliver Runner internals
|
|
1011
1011
|
|
|
1012
|
-
`/
|
|
1012
|
+
`/deliver` drives the long-running coordinator inside the operator's
|
|
1013
1013
|
Claude session. The slash command composes the submodules listed below;
|
|
1014
1014
|
`helpers/epic-deliver-story` is launched as an Agent-tool sub-agent of
|
|
1015
|
-
`/
|
|
1015
|
+
`/deliver`'s wave loop — no subprocess worker sessions for Story
|
|
1016
1016
|
execution, no GitHub Actions runner. Deterministic Node CLIs remain the
|
|
1017
1017
|
state-mutation contract.
|
|
1018
1018
|
|
|
@@ -1030,7 +1030,7 @@ state-mutation contract.
|
|
|
1030
1030
|
|
|
1031
1031
|
### Claude Max quota
|
|
1032
1032
|
|
|
1033
|
-
`/
|
|
1033
|
+
`/deliver` consumes Max subscription quota (5-hour rolling window with
|
|
1034
1034
|
overage disabled at the org level by default). If a long Epic exceeds the
|
|
1035
1035
|
5-hour window, `BlockerHandler` surfaces the rate-limit error as
|
|
1036
1036
|
`agent::blocked` so you can resume after the quota rolls.
|
|
@@ -1050,7 +1050,7 @@ the project's `CI / CD` workflow. Two mitigations:
|
|
|
1050
1050
|
## Phase 4: PR merge (auto by default)
|
|
1051
1051
|
|
|
1052
1052
|
Once the wave loop, close-validation, code-review, and retro have all
|
|
1053
|
-
completed, `/
|
|
1053
|
+
completed, `/deliver` opens a pull request from `epic/<epicId>` to
|
|
1054
1054
|
`main` and arms GitHub native auto-merge. When the required checks pass
|
|
1055
1055
|
the PR lands without further intervention; the operator can disarm
|
|
1056
1056
|
auto-merge in the GitHub UI to make the final merge an explicit human
|
|
@@ -1059,16 +1059,11 @@ action.
|
|
|
1059
1059
|
1. **Story merging.** Stories merge into `epic/<epicId>` automatically
|
|
1060
1060
|
during Story closure (`story-close.js`). The Epic branch is the rolling
|
|
1061
1061
|
integration target.
|
|
1062
|
-
2. **Completion
|
|
1063
|
-
`
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
```
|
|
1068
|
-
|
|
1069
|
-
Epics, PRDs, and Tech Specs are explicitly excluded from auto-cascade —
|
|
1070
|
-
the Epic only flips to `agent::done` when the operator merges the PR
|
|
1071
|
-
to `main`.
|
|
1062
|
+
2. **Completion.** Each Story flips to `agent::done` at its own closure
|
|
1063
|
+
(`story-close.js`); the wave loop tracks Epic-level progress as
|
|
1064
|
+
Stories complete. There is no upward auto-cascade — Epics, PRDs, and
|
|
1065
|
+
Tech Specs are never flipped by Story closure; the Epic only flips to
|
|
1066
|
+
`agent::done` when the operator merges the PR to `main`.
|
|
1072
1067
|
|
|
1073
1068
|
3. **PR merge — the sole promotion gate.** When the PR merges (auto or
|
|
1074
1069
|
manual):
|
|
@@ -1077,12 +1072,12 @@ action.
|
|
|
1077
1072
|
- the standard label-transition pathway flips the Epic to
|
|
1078
1073
|
`agent::done`;
|
|
1079
1074
|
- branch cleanup runs out-of-band: the `delivery.complete` state of
|
|
1080
|
-
`/
|
|
1075
|
+
`/deliver` reaps local refs after the merge; the rare "scrap
|
|
1081
1076
|
and reset" case for an unmerged Epic is handled manually.
|
|
1082
1077
|
|
|
1083
1078
|
If the operator chooses not to merge (rolling back, deferring, re-scoping),
|
|
1084
|
-
`/
|
|
1085
|
-
in place; re-running `/
|
|
1079
|
+
`/deliver` has not poisoned `main`. The Epic branch can be amended
|
|
1080
|
+
in place; re-running `/deliver <epicId>` re-runs the
|
|
1086
1081
|
`delivery.close-validation` / `delivery.audit` / `delivery.code-review`
|
|
1087
1082
|
states against the new HEAD (the evidence wrapper picks up the new SHA) and
|
|
1088
1083
|
updates the same PR — no duplicate PRs are opened against the same Epic
|
|
@@ -1198,12 +1193,12 @@ on so re-runs short-circuit when state has not changed.
|
|
|
1198
1193
|
| ------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ |
|
|
1199
1194
|
| Gate 1 | After Story completion | Content-triggered audits (clean-code, etc.) | advisory | Audit-report comment per Story (`audit-<lens>` structured comment) |
|
|
1200
1195
|
| Gate 2 | Pre-integration | Dependency + DevOps audits | advisory | Audit-report comment per Epic (`audit-<lens>` structured comment) |
|
|
1201
|
-
| Gate 3 | `/
|
|
1202
|
-
| Gate 4 | `/
|
|
1203
|
-
| Close-validation | `/
|
|
1196
|
+
| Gate 3 | `/deliver` `delivery.code-review` state | Full automated audit pass | blocking | `code-review` structured comment on Epic, keyed by Epic HEAD SHA |
|
|
1197
|
+
| Gate 4 | `/deliver` `delivery.finalize` state (pre-PR) | `audit-sre` production readiness gate | blocking | `audit-sre` structured comment on Epic, keyed by Epic HEAD SHA |
|
|
1198
|
+
| Close-validation | `/deliver` `delivery.close-validation` state | lint + test + maintainability + CRAP + coverage ratchets via `evidence-gate.js` | blocking | `evidence-gate` cache entry keyed by `git rev-parse HEAD` |
|
|
1204
1199
|
| Pre-push | Local `.husky/pre-push` hook on every push | Diff-scoped quality preview + coverage/CRAP ratchet | blocking | Working-tree SHA + staged-diff hash (per push) |
|
|
1205
|
-
| Acceptance reconciliation | `/
|
|
1206
|
-
| Spec freshness | `/
|
|
1200
|
+
| Acceptance reconciliation | `/deliver` `delivery.finalize` state | `acceptance-spec-reconciler.js` diffs AC IDs against `@ac-*` / `@pending` feature tags | blocking | `acceptance-reconcile` structured comment on Epic, keyed by spec-body SHA |
|
|
1201
|
+
| Spec freshness | `/plan` `planning.spec-authoring` state | Re-derives PRD / Tech Spec / Acceptance Spec staleness against Epic body checksum | advisory | `epic-plan-state` checkpoint entry per spec artifact body SHA |
|
|
1207
1202
|
|
|
1208
1203
|
### Review & feedback loop
|
|
1209
1204
|
|
|
@@ -1219,14 +1214,14 @@ report and posts it as a ticket comment via the `ITicketingProvider`.
|
|
|
1219
1214
|
risk per method against `baselines/crap.json`. Self-skips when
|
|
1220
1215
|
`delivery.quality.gates.crap.enabled` is `false`. The
|
|
1221
1216
|
`baseline-refresh:`-tagged commit convention for baseline edits is the
|
|
1222
|
-
project standard; the operator is the gate during `/
|
|
1217
|
+
project standard; the operator is the gate during `/deliver`
|
|
1223
1218
|
`delivery.finalize` state (the prior CI guardrail that enforced the tag was removed).
|
|
1224
1219
|
- **Human review on High/Critical.** If High or Critical findings are detected,
|
|
1225
|
-
the workflow halts for human review at the corresponding `/
|
|
1220
|
+
the workflow halts for human review at the corresponding `/deliver`
|
|
1226
1221
|
phase. Approval is given by the operator advancing the phase (the
|
|
1227
1222
|
auto-approve webhook listener was never wired into CI and was removed during the rebrand).
|
|
1228
1223
|
- **Implementation.** Once the operator approves the fixes, the ticket
|
|
1229
|
-
transitions to `agent::executing` and `/
|
|
1224
|
+
transitions to `agent::executing` and `/deliver` dispatches an agent to
|
|
1230
1225
|
implement and verify them.
|
|
1231
1226
|
|
|
1232
1227
|
---
|
|
@@ -1409,16 +1404,16 @@ For Stories already in flight, use one of the three options above.
|
|
|
1409
1404
|
| Command | Purpose |
|
|
1410
1405
|
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1411
1406
|
| `npx mandrel init` | Cold-start command — install `mandrel` (if absent), `mandrel sync`, then prompt to run `bootstrap.js` (provisions repo + Projects V2 board, labels, branch protection). |
|
|
1412
|
-
| `/onboard` | Guided first run after bootstrap — stack detection, docs scaffolding, `mandrel doctor` readiness gate, started `/
|
|
1413
|
-
| `/
|
|
1414
|
-
| `/
|
|
1415
|
-
| `/
|
|
1416
|
-
| `/
|
|
1417
|
-
| `/
|
|
1418
|
-
| `/
|
|
1419
|
-
| *helper* `workflows/helpers/epic-deliver-story` | Per-Story worker called by `/
|
|
1420
|
-
| *helper* `workflows/helpers/single-story-deliver` | Per-Story worker called by `/
|
|
1421
|
-
| *helper* `workflows/helpers/code-review.md` | Auto-invoked by `/
|
|
1407
|
+
| `/onboard` | Guided first run after bootstrap — stack detection, docs scaffolding, `mandrel doctor` readiness gate, started `/plan` handoff. |
|
|
1408
|
+
| `/plan` | Ideation entry — sharpen idea, search duplicates, open Epic, then PRD + Tech Spec + decomposition. |
|
|
1409
|
+
| `/plan --idea "<seed>"` | Same ideation entry with pre-supplied seed. |
|
|
1410
|
+
| `/plan <epicId>` | Existing-Epic mode — PRD + Tech Spec + decomposition for an Epic Issue already opened. |
|
|
1411
|
+
| `/deliver <epicId>` | Drive an Epic end-to-end. Wave loop → close-validation → code-review → retro → opens PR to `main` with auto-merge armed. |
|
|
1412
|
+
| `/deliver <storyId> [<storyId>...]` | Deliver one or more standalone Stories (no `Epic: #N` reference). Builds a dependency-aware wave plan and fans out one worker per Story per wave. |
|
|
1413
|
+
| `/plan` | Plan a one-off Story outside an Epic backlog. |
|
|
1414
|
+
| *helper* `workflows/helpers/epic-deliver-story` | Per-Story worker called by `/deliver`'s wave loop; not an operator slash command. See [`helpers/epic-deliver-story.md`](../workflows/helpers/epic-deliver-story.md). |
|
|
1415
|
+
| *helper* `workflows/helpers/single-story-deliver` | Per-Story worker called by `/deliver`; not an operator slash command. See [`helpers/single-story-deliver.md`](../workflows/helpers/single-story-deliver.md). |
|
|
1416
|
+
| *helper* `workflows/helpers/code-review.md` | Auto-invoked by `/deliver`'s `delivery.code-review` state (scope: epic); not a slash command. |
|
|
1422
1417
|
| `/git-commit-all` | Stage and commit all changes |
|
|
1423
1418
|
| `/git-push` | Stage, commit, and push to remote |
|
|
1424
1419
|
| `epic-reconcile.js --explicit-delete` | Hard reset — close orphaned Epic-scoped issues per `.agents/epics/<id>.yaml` |
|