mandrel 1.58.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 +100 -98
- package/.agents/docs/SDLC.md +140 -141
- package/.agents/docs/configuration.md +16 -16
- package/.agents/docs/workflows.md +7 -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/audit-rules.json +20 -0
- 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 +21 -4
- package/.agents/scripts/acceptance-spec-reconciler.js +2 -2
- package/.agents/scripts/analyze-execution.js +2 -2
- package/.agents/scripts/assert-branch.js +1 -3
- package/.agents/scripts/audit-to-stories.js +1 -1
- package/.agents/scripts/bootstrap.js +1 -1
- package/.agents/scripts/check-arch-cycles.js +360 -0
- package/.agents/scripts/check-doc-links.js +2 -3
- package/.agents/scripts/coverage-capture.js +24 -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 +11 -9
- package/.agents/scripts/epic-deliver-prepare.js +13 -5
- package/.agents/scripts/epic-execute-record-wave.js +5 -5
- 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 +2 -2
- package/.agents/scripts/generate-workflows-doc.js +1 -1
- package/.agents/scripts/git-rebase-and-resolve.js +1 -1
- package/.agents/scripts/hierarchy-gate.js +40 -24
- 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/baselines/kinds/coverage.js +33 -149
- package/.agents/scripts/lib/baselines/kinds/duplication.js +27 -116
- package/.agents/scripts/lib/baselines/kinds/kind-factory.js +192 -0
- package/.agents/scripts/lib/baselines/kinds/lighthouse.js +34 -133
- package/.agents/scripts/lib/baselines/kinds/maintainability.js +31 -124
- package/.agents/scripts/lib/baselines/kinds/mutation.js +25 -111
- package/.agents/scripts/lib/baselines/maintainability-baseline-io.js +59 -0
- package/.agents/scripts/lib/baselines/maintainability-baseline-save.js +37 -0
- package/.agents/scripts/lib/baselines/writer.js +1 -1
- 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/close-validation/commands.js +188 -0
- package/.agents/scripts/lib/close-validation/gates.js +235 -0
- package/.agents/scripts/lib/close-validation/process.js +101 -0
- package/.agents/scripts/lib/close-validation/projections/maintainability.js +1 -1
- package/.agents/scripts/lib/close-validation/runner.js +325 -0
- package/.agents/scripts/lib/close-validation/telemetry.js +70 -0
- package/.agents/scripts/lib/codebase-snapshot.js +1 -1
- package/.agents/scripts/lib/config/explain.js +1 -1
- package/.agents/scripts/lib/config/quality.js +6 -6
- 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-resolver.js +2 -5
- 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/coverage-capture.js +147 -4
- package/.agents/scripts/lib/cpu-pool.js +14 -0
- package/.agents/scripts/lib/crap-utils.js +6 -11
- package/.agents/scripts/lib/duplicate-search.js +1 -1
- package/.agents/scripts/lib/dynamic-workflow/capability.js +1 -1
- package/.agents/scripts/lib/dynamic-workflow/documentation-report-contract.js +87 -0
- 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/git-utils.js +24 -22
- package/.agents/scripts/lib/label-constants.js +3 -4
- package/.agents/scripts/lib/label-taxonomy.js +3 -8
- package/.agents/scripts/lib/maintainability-engine.js +1 -1
- package/.agents/scripts/lib/maintainability-utils.js +4 -187
- package/.agents/scripts/lib/observability/perf-report-readers.js +32 -23
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +81 -7
- package/.agents/scripts/lib/orchestration/code-review.js +95 -82
- 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 +14 -37
- package/.agents/scripts/lib/orchestration/epic-cleanup.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +22 -22
- 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-decompose/phases/planning-artifacts.js +2 -2
- package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +206 -58
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/drain.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +27 -3
- 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 +28 -8
- 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 +13 -41
- package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +7 -7
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +2 -3
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +2 -8
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/component-drift.js +103 -0
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/crap-drift.js +22 -64
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/maintainability-drift.js +38 -76
- package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/story-run-progress-writer.js +10 -10
- package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +8 -20
- 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 +6 -5
- 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 +144 -0
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +3 -3
- 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 +8 -8
- 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/notification.js +3 -3
- package/.agents/scripts/lib/orchestration/post-merge/phases/ticket-closure.js +3 -3
- package/.agents/scripts/lib/orchestration/post-merge/phases/worktree-reap.js +7 -7
- package/.agents/scripts/lib/orchestration/preflight-cache.js +36 -13
- 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/review-providers/codex.js +5 -60
- package/.agents/scripts/lib/orchestration/review-providers/native.js +7 -6
- package/.agents/scripts/lib/orchestration/review-providers/parse-findings.js +105 -0
- package/.agents/scripts/lib/orchestration/review-providers/security-review.js +7 -59
- package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +2 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +2 -4
- package/.agents/scripts/lib/orchestration/single-story-lease-guard.js +32 -35
- package/.agents/scripts/lib/orchestration/skill-capsule-loader.js +1 -2
- 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/auto-refresh-runner.js +451 -503
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/pre-merge-attribution.js +8 -2
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/refresh-commit.js +47 -2
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/regression-projection.js +2 -2
- package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/format-autofix.js +358 -54
- package/.agents/scripts/lib/orchestration/story-close/phases/close.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/phases/gates.js +3 -2
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +32 -5
- package/.agents/scripts/lib/orchestration/story-close/post-merge-close.js +5 -18
- package/.agents/scripts/lib/orchestration/story-close/pre-merge-validation.js +3 -3
- package/.agents/scripts/lib/orchestration/story-close-recovery.js +33 -16
- package/.agents/scripts/lib/orchestration/story-reachability.js +47 -0
- 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 +4 -35
- 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 +44 -73
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +16 -7
- package/.agents/scripts/lib/orchestration/ticketing/state.js +53 -439
- package/.agents/scripts/lib/orchestration/ticketing/transition.js +471 -0
- package/.agents/scripts/lib/orchestration/ticketing.js +0 -1
- package/.agents/scripts/lib/orchestration/wave-record-notifications.js +3 -3
- package/.agents/scripts/lib/orchestration/wave-record-projection.js +2 -8
- 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/project-root.js +17 -0
- 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-adjacency.js +76 -0
- 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 +9 -9
- package/.agents/scripts/lib/story-plan.js +1 -1
- package/.agents/scripts/lib/templates/decomposer-prompts.js +59 -52
- package/.agents/scripts/lib/transpile.js +93 -0
- package/.agents/scripts/lib/wave-runner/tick.js +4 -153
- package/.agents/scripts/lib/workers/crap-worker.js +1 -1
- package/.agents/scripts/lib/workers/maintainability-report-worker.js +1 -1
- package/.agents/scripts/lib/worktree/lifecycle/creation.js +20 -2
- package/.agents/scripts/lib/worktree/lifecycle/force-drain.js +90 -0
- package/.agents/scripts/lib/worktree/lifecycle/reap.js +26 -8
- package/.agents/scripts/lib/worktree/node-modules-strategy.js +74 -0
- 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 +114 -10
- package/.agents/scripts/resync-status-column.js +1 -1
- package/.agents/scripts/retro-run.js +2 -2
- package/.agents/scripts/run-lint.js +10 -1
- package/.agents/scripts/run-tests.js +24 -4
- package/.agents/scripts/single-story-init.js +1 -1
- package/.agents/scripts/stories-wave-tick.js +13 -10
- package/.agents/scripts/story-close.js +1 -1
- package/.agents/scripts/story-init.js +162 -26
- package/.agents/scripts/story-phase.js +5 -5
- package/.agents/scripts/story-plan.js +3 -3
- package/.agents/scripts/sync-branch-from-base.js +2 -2
- 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/skills/stack/qa/lighthouse-baseline/SKILL.md +1 -1
- 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 +226 -0
- 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} +59 -66
- 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 +28 -39
- 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 +12 -11
- package/.agents/workflows/helpers/worktree-lifecycle.md +18 -18
- package/.agents/workflows/onboard.md +21 -20
- 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 +17 -20
- 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 +338 -0
- package/lib/cli/update.js +413 -52
- package/package.json +3 -1
- package/.agents/scripts/lib/auto-refresh-baselines.js +0 -308
- package/.agents/scripts/lib/close-validation.js +0 -897
- package/.agents/scripts/lib/orchestration/cascade-grouping.js +0 -275
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter.js +0 -69
- package/.agents/scripts/lib/orchestration/reconciler.js +0 -137
- package/.agents/scripts/lib/orchestration/story-close/format-autofix-scoped.js +0 -221
- package/.agents/scripts/lib/orchestration/story-close/format-autofix-shared.js +0 -123
- package/.agents/scripts/lib/task-utils.js +0 -26
- package/.agents/scripts/story-deliver-prepare.js +0 -267
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
# Code Review (helper)
|
|
8
8
|
|
|
9
9
|
> **Helper module.** Not a slash command. Invoked automatically from
|
|
10
|
-
> `/
|
|
10
|
+
> `/deliver` (Story scope) and `/deliver` Phase 5 (Epic scope).
|
|
11
11
|
> To run a review directly, invoke the parent workflow — operators do not
|
|
12
12
|
> call this helper by hand.
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ is merged upstream. It runs in two scopes:
|
|
|
17
17
|
- **Story scope** — reviews the diff between a Story branch and its parent
|
|
18
18
|
Epic branch, before `story-close.js` merges the Story into the Epic.
|
|
19
19
|
- **Epic scope** — reviews the cumulative diff between an Epic branch and
|
|
20
|
-
`main`, before `/
|
|
20
|
+
`main`, before `/deliver` opens the integration pull request.
|
|
21
21
|
|
|
22
22
|
> **Persona**: `architect` · **Skills**: `core/code-review-and-quality`,
|
|
23
23
|
> `core/security-and-hardening`
|
|
@@ -43,7 +43,7 @@ the argument envelope.
|
|
|
43
43
|
|
|
44
44
|
`depth` is the risk-derived thoroughness lever introduced by Story #3876 and
|
|
45
45
|
made a live consumed signal end to end by Story #3937. The Epic caller
|
|
46
|
-
(`/
|
|
46
|
+
(`/deliver` Phase 5) resolves it from the Epic's judged `planningRisk`
|
|
47
47
|
envelope via
|
|
48
48
|
[`resolveReviewDepthForEpic`](../../scripts/lib/orchestration/code-review.js)
|
|
49
49
|
(`high` → `deep`, `low` → `light`, everything else — including a missing
|
|
@@ -54,7 +54,7 @@ It is an **input-only** signal: it changes *how thorough* the review is, never
|
|
|
54
54
|
the findings envelope (`{ status, severity, posted, report, halted,
|
|
55
55
|
blockerReason }`) nor the posted `code-review` structured-comment body. An
|
|
56
56
|
absent or malformed `depth` is treated as `standard`, so an Epic that skipped
|
|
57
|
-
`/
|
|
57
|
+
`/plan` still gets a passing review with no new failure mode.
|
|
58
58
|
|
|
59
59
|
How each tier changes the review protocol:
|
|
60
60
|
|
|
@@ -307,7 +307,7 @@ When `selectedAudits` is non-empty:
|
|
|
307
307
|
2. **Append** a `## Cross-phase re-check` section to the **existing**
|
|
308
308
|
`audit-results` structured comment on the Epic ticket. Do **not** post
|
|
309
309
|
a new comment; the comment is idempotent and downstream consumers
|
|
310
|
-
(the code-review trim, `/
|
|
310
|
+
(the code-review trim, `/deliver` Pillar 2, the retro helper)
|
|
311
311
|
read it once. The append carries the re-checked lens names, the new
|
|
312
312
|
findings (if any), and the focused-fix commit SHAs that triggered the
|
|
313
313
|
re-run, so reviewers can trace each finding back to the change set
|
|
@@ -10,16 +10,16 @@ description: >-
|
|
|
10
10
|
inspects the surface area.
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# /epic
|
|
13
|
+
# helpers/deliver-epic — Epic delivery path (invoked by /deliver)
|
|
14
14
|
|
|
15
15
|
## Overview
|
|
16
16
|
|
|
17
|
-
`/
|
|
17
|
+
`/deliver` is the **single SDL execution command** in the 5.40 surface.
|
|
18
18
|
It opens a PR against `main` and auto-merges when every signal certifies a
|
|
19
19
|
clean run; otherwise it falls back to the operator-merges-button path.
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
|
-
/
|
|
22
|
+
/deliver <epicId>
|
|
23
23
|
→ Phase 1 — prepare (epic-deliver-prepare.js)
|
|
24
24
|
→ Phase 2 — wave loop (wave-tick.js + Agent fan-out × concurrencyCap)
|
|
25
25
|
→ Phase 3 — close-validation (lint + test + ratchets on epic/<id>)
|
|
@@ -33,8 +33,8 @@ clean run; otherwise it falls back to the operator-merges-button path.
|
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
The argument is always an Epic ID (`type::epic`). Story IDs go to
|
|
36
|
-
[`/
|
|
37
|
-
[`helpers/epic-deliver-story`](
|
|
36
|
+
[`/deliver`](deliver-stories.md) (standalone) or the
|
|
37
|
+
[`helpers/epic-deliver-story`](epic-deliver-story.md) helper
|
|
38
38
|
(Epic-attached, invoked by this workflow's fan-out); Tasks are not directly
|
|
39
39
|
executable.
|
|
40
40
|
Story dispatch is in-session via the Agent tool — no subprocess is
|
|
@@ -45,11 +45,11 @@ spawned.
|
|
|
45
45
|
## Arguments
|
|
46
46
|
|
|
47
47
|
```text
|
|
48
|
-
/
|
|
48
|
+
/deliver <epicId> [--skip-epic-audit] [--skip-code-review] [--skip-retro] [--full-retro]
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
- `epicId` — must carry `type::epic`. Otherwise STOP and tell the operator
|
|
52
|
-
to use `/
|
|
52
|
+
to use `/deliver <id>` (standalone Story) or open the parent Epic.
|
|
53
53
|
- `--skip-epic-audit` — skip Phase 4 (log the override). Use only when the
|
|
54
54
|
change-set audits are known to be irrelevant (e.g., docs-only Epic).
|
|
55
55
|
- `--skip-code-review` — skip Phase 5 (log the override).
|
|
@@ -79,7 +79,7 @@ Every other runtime modifier is sourced from the Epic's labels or from
|
|
|
79
79
|
typed events on the in-session lifecycle bus; a fixed roster of
|
|
80
80
|
listeners performs the side effects. Phase 7, 8.5, and 9 each fire
|
|
81
81
|
exactly one lifecycle event via the generic
|
|
82
|
-
[`lifecycle-emit.js`](
|
|
82
|
+
[`lifecycle-emit.js`](../../scripts/lifecycle-emit.js) CLI
|
|
83
83
|
(`--event epic.close.end` / `--event epic.automerge.start` /
|
|
84
84
|
`--event epic.merge.armed`); the matching listener chain runs the
|
|
85
85
|
bus-driven side effects (acceptance reconcile, automerge-armer,
|
|
@@ -88,20 +88,20 @@ Every other runtime modifier is sourced from the Epic's labels or from
|
|
|
88
88
|
the canonical manual sequence and `finalizer.js` for the listener's
|
|
89
89
|
no-op disclaimer. The append-only NDJSON ledger at
|
|
90
90
|
`temp/epic-<id>/lifecycle.ndjson` is the resume target. See
|
|
91
|
-
[`docs/LIFECYCLE.md`](
|
|
91
|
+
[`docs/LIFECYCLE.md`](../../../docs/LIFECYCLE.md) for the bus
|
|
92
92
|
contract, event taxonomy, ledger format, and listener model.
|
|
93
93
|
|
|
94
|
-
> **Hierarchy.** `/
|
|
95
|
-
> (Epic →
|
|
94
|
+
> **Hierarchy.** `/deliver` operates over the 2-tier hierarchy
|
|
95
|
+
> (Epic → Story). The fan-out is one `Agent` tool call per
|
|
96
96
|
> Story per wave (§ 2b); Story branches merge into `epic/<id>` with
|
|
97
97
|
> `--no-ff` via `story-close.js`; the close-validation chain
|
|
98
98
|
> (Phase 3), epic-audit, code-review, retro, finalize, and auto-merge
|
|
99
99
|
> gates all operate on Story-level units.
|
|
100
|
-
> [`helpers/epic-deliver-story`](
|
|
100
|
+
> [`helpers/epic-deliver-story`](epic-deliver-story.md) runs a
|
|
101
101
|
> single Story-implementation phase per Story against the Story's
|
|
102
102
|
> inline `acceptance[]` / `verify[]` fields. See
|
|
103
|
-
> [`.agents/instructions.md` § 5.D](
|
|
104
|
-
> [`.agents/docs/SDLC.md` § Ticket hierarchy](
|
|
103
|
+
> [`.agents/instructions.md` § 5.D](../../instructions.md) and
|
|
104
|
+
> [`.agents/docs/SDLC.md` § Ticket hierarchy](../../docs/SDLC.md) for the full
|
|
105
105
|
> contract.
|
|
106
106
|
|
|
107
107
|
---
|
|
@@ -132,7 +132,7 @@ flip the Epic to `agent::blocked`, surface the envelope in chat for the
|
|
|
132
132
|
operator, and halt before Phase 1's `epic-deliver-prepare.js` call.
|
|
133
133
|
Resume after the operator unblocks (raising the threshold in
|
|
134
134
|
`.agentrc.json`, splitting the Epic, or accepting the cost) by re-running
|
|
135
|
-
`/
|
|
135
|
+
`/deliver <epicId>` — the preflight is idempotent and the second
|
|
136
136
|
run upserts the same comment in place.
|
|
137
137
|
|
|
138
138
|
Threshold defaults live in `delivery.preflight.*` in `.agentrc.json`
|
|
@@ -157,7 +157,7 @@ and upserts the `epic-run-state` checkpoint. Treat the printed JSON as
|
|
|
157
157
|
> **Preflight guards (Story #3482 / F-workflow-guards).** Before the
|
|
158
158
|
> snapshot phase runs — and before any worktree is created — prepare runs
|
|
159
159
|
> two **fail-closed** guards
|
|
160
|
-
> ([`lib/orchestration/epic-deliver-lease-guard.js`](
|
|
160
|
+
> ([`lib/orchestration/epic-deliver-lease-guard.js`](../../scripts/lib/orchestration/epic-deliver-lease-guard.js)):
|
|
161
161
|
>
|
|
162
162
|
> 1. **Checkout safety.** Prepare refuses to start when the working tree is
|
|
163
163
|
> dirty or HEAD is on a branch other than the expected one (`epic/<id>`
|
|
@@ -182,23 +182,23 @@ and upserts the `epic-run-state` checkpoint. Treat the printed JSON as
|
|
|
182
182
|
> `epic-merge-lock.js` continues to serialize same-machine sessions.
|
|
183
183
|
>
|
|
184
184
|
> Both guards throw on failure, which `runAsCli` maps to `process.exit(1)`
|
|
185
|
-
> per [`orchestration-error-handling.md`](
|
|
185
|
+
> per [`orchestration-error-handling.md`](../../rules/orchestration-error-handling.md).
|
|
186
186
|
|
|
187
187
|
Once the preflight guards pass, the snapshot phase applies one more gate:
|
|
188
188
|
|
|
189
189
|
> **Acceptance-spec start gate.** Before the wave loop fans out, the
|
|
190
190
|
> snapshot phase
|
|
191
|
-
> ([`lib/orchestration/epic-runner/phases/snapshot.js`](
|
|
191
|
+
> ([`lib/orchestration/epic-runner/phases/snapshot.js`](../../scripts/lib/orchestration/epic-runner/phases/snapshot.js))
|
|
192
192
|
> asserts that the Epic either carries the `acceptance::n-a` waiver
|
|
193
193
|
> label **or** has a linked `context::acceptance-spec` ticket. The
|
|
194
194
|
> ticket's GitHub state (open / closed) is **not** checked —
|
|
195
195
|
> presence is sufficient, matching the PRD and Tech Spec contract.
|
|
196
|
-
> The reviewer's OK during `/
|
|
196
|
+
> The reviewer's OK during `/plan` Phase 7 is the approval
|
|
197
197
|
> signal, not a manual ticket-close action. Neither condition met →
|
|
198
198
|
> the snapshot throws a clear error
|
|
199
199
|
> (`[epic-deliver] Epic #<id> cannot launch: …`) and `runAsCli`
|
|
200
200
|
> maps it to `process.exit(1)`. Operator remediation: either run
|
|
201
|
-
> `/
|
|
201
|
+
> `/plan` Phase 7 to author the spec, or apply the
|
|
202
202
|
> `acceptance::n-a` label to opt out.
|
|
203
203
|
|
|
204
204
|
---
|
|
@@ -206,7 +206,7 @@ Once the preflight guards pass, the snapshot phase applies one more gate:
|
|
|
206
206
|
## Phase 2 — Wave loop
|
|
207
207
|
|
|
208
208
|
The wave-loop state machine lives in
|
|
209
|
-
[`lib/wave-runner/tick.js`](
|
|
209
|
+
[`lib/wave-runner/tick.js`](../../scripts/lib/wave-runner/tick.js) — one
|
|
210
210
|
stateless `tick({ epic })` call returns one `WaveTickResult` describing
|
|
211
211
|
the next action. The slash command's job is to call `tick()` via its CLI
|
|
212
212
|
shim, dispatch from `nextAction.stories` via the Agent tool, persist the
|
|
@@ -243,7 +243,7 @@ only the two wave-window forensics signals that have a live consumer —
|
|
|
243
243
|
`waveParallelism` report (and `wave-start` anchors span-tree Story spans).
|
|
244
244
|
Story #3909 retired the write-only wave events with no reader (`wave-tick`,
|
|
245
245
|
`epic-complete`) — they duplicated the checkpoint + rollup. The
|
|
246
|
-
[`signals` helper](
|
|
246
|
+
[`signals` helper](signals.md) (`node .agents/scripts/signals-view.js`)
|
|
247
247
|
renders the forensics signals in the span-tree view.
|
|
248
248
|
|
|
249
249
|
### 2b. Dispatch — fan out per-Story Agent calls
|
|
@@ -252,7 +252,7 @@ renders the forensics signals in the span-tree view.
|
|
|
252
252
|
invoke `helpers/epic-deliver-story` yourself. Emit **one `Agent` tool call per
|
|
253
253
|
Story** in `nextAction.stories` (even when `length === 1` — the
|
|
254
254
|
parent-child boundary keeps the return-parser uniform). The *children*
|
|
255
|
-
run [`helpers/epic-deliver-story`](
|
|
255
|
+
run [`helpers/epic-deliver-story`](epic-deliver-story.md). Use
|
|
256
256
|
`subagent_type: general-purpose`.
|
|
257
257
|
|
|
258
258
|
Emit **one assistant turn** with **N parallel `Agent` calls** where
|
|
@@ -276,7 +276,7 @@ the cap, never wait for a whole batch before refilling.
|
|
|
276
276
|
**Ledger the dispatch BEFORE the Agent call.** Immediately before each
|
|
277
277
|
per-Story `Agent` tool call (one shell-out per Story, every attempt —
|
|
278
278
|
including retries from a refill), invoke
|
|
279
|
-
[`lifecycle-emit-story-dispatch.js`](
|
|
279
|
+
[`lifecycle-emit-story-dispatch.js`](../../scripts/lifecycle-emit-story-dispatch.js)
|
|
280
280
|
so the lifecycle ledger durably records the dispatch attempt. The
|
|
281
281
|
emit must happen **before** the Agent call fires — never after — so
|
|
282
282
|
that a host-process crash mid-Agent leaves a `story.dispatch.start`
|
|
@@ -297,32 +297,25 @@ NDJSON line to `temp/epic-<epicId>/lifecycle.ndjson`; the matching
|
|
|
297
297
|
after the Agent return is recorded in § 2c.
|
|
298
298
|
|
|
299
299
|
Each Agent call's prompt must (1) name the Story + Epic ids, (2)
|
|
300
|
-
instruct the child to invoke `helpers/epic-deliver-story <storyId
|
|
301
|
-
|
|
302
|
-
**non-interactive contract** (no clarifying questions;
|
|
303
|
-
`agent::blocked` and exit if stuck), (
|
|
304
|
-
per-Story chat relay and
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
to `agent::blocked` rather than fall silent. The pairing of
|
|
300
|
+
instruct the child to invoke `helpers/epic-deliver-story <storyId>`
|
|
301
|
+
(whose Step 4 defines the child's return shape), (3) remind the child
|
|
302
|
+
of the **non-interactive contract** (no clarifying questions;
|
|
303
|
+
transition to `agent::blocked` and exit if stuck), (4) ask the child to
|
|
304
|
+
suppress per-Story chat relay, and (5) require the child to emit a
|
|
305
|
+
`story.heartbeat` lifecycle event at least once per Story-level phase
|
|
306
|
+
transition via `node .agents/scripts/story-phase.js` (or whenever it
|
|
307
|
+
stalls on a long-running step), and if it cannot make progress to
|
|
308
|
+
transition to `agent::blocked` rather than fall silent. The pairing of
|
|
310
309
|
`story.heartbeat` and `agent::blocked` is what lets the §2e Idle
|
|
311
310
|
Watchdog distinguish a working child from a dead one; a silent child
|
|
312
311
|
with no recent heartbeat and no blocker label is the failure mode the
|
|
313
312
|
watchdog is built to catch.
|
|
314
313
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
"branchDeleted": <boolean>,
|
|
321
|
-
"blockerCommentId": <string|null>,
|
|
322
|
-
"detail": <string|undefined>,
|
|
323
|
-
"renderedBody": <string|undefined>
|
|
324
|
-
}
|
|
325
|
-
```
|
|
314
|
+
There is **no per-child JSON return-parsing ceremony** for the parent
|
|
315
|
+
to enforce. GitHub state is the contract: `epic-execute-record-wave.js`
|
|
316
|
+
(§ 2c, mode B) treats each child's raw return text as a best-effort
|
|
317
|
+
hint and reconciles any unparseable, empty, or missing return directly
|
|
318
|
+
from the Story's live labels and comments (Story #3907).
|
|
326
319
|
|
|
327
320
|
**Sub-agent dispatch.** `Agent` calls emit no `model:` argument by
|
|
328
321
|
default — children inherit from the `general-purpose` sub-agent
|
|
@@ -349,8 +342,8 @@ node .agents/scripts/epic-execute-record-wave.js \
|
|
|
349
342
|
# `<inline-json>` shape: [{ "storyId": <n>, "returnText": "<raw text>" }]
|
|
350
343
|
```
|
|
351
344
|
|
|
352
|
-
**
|
|
353
|
-
|
|
345
|
+
**Mode B is the default path** — pipe the raw return texts through
|
|
346
|
+
without inspecting them. The CLI reconciles parse failures from
|
|
354
347
|
GitHub, aggregates terminal status, appends to `state.waves[]`,
|
|
355
348
|
re-renders `epic-run-progress`, and prints
|
|
356
349
|
`{ status, nextAction, renderedBody, ... }`. Print `renderedBody`
|
|
@@ -432,7 +425,7 @@ one in-flight Story has been silent for ≥ the threshold:
|
|
|
432
425
|
|
|
433
426
|
**On a stall.** When the watchdog exits non-zero, post the envelope
|
|
434
427
|
verbatim as a `wave-stall` structured comment on the Epic (use
|
|
435
|
-
[`post-structured-comment.js`](
|
|
428
|
+
[`post-structured-comment.js`](../../scripts/post-structured-comment.js)
|
|
436
429
|
with `--kind wave-stall`), then re-evaluate the affected Stories: if a
|
|
437
430
|
child sub-agent has crashed (no `story.dispatch.end`, no recent
|
|
438
431
|
heartbeat, no commit on `story-<id>`), re-dispatch the Story per § 2b
|
|
@@ -472,14 +465,14 @@ the Epic branch; if any drifts, refresh and commit
|
|
|
472
465
|
## Phase 4 — Epic audit (change-set lenses)
|
|
473
466
|
|
|
474
467
|
Skip when `--skip-epic-audit`. Otherwise auto-invoke
|
|
475
|
-
[`helpers/epic-audit.md`](
|
|
476
|
-
[`epic-audit-prepare.js`](
|
|
477
|
-
[`selectAudits`](
|
|
468
|
+
[`helpers/epic-audit.md`](epic-audit.md) inline. The helper runs
|
|
469
|
+
[`epic-audit-prepare.js`](../../scripts/epic-audit-prepare.js) to ask the
|
|
470
|
+
[`selectAudits`](../../scripts/lib/audit-suite/index.js) SDK which lenses fire
|
|
478
471
|
at the `gate3` close gate, **unions in the model-judged risk-routed lenses**
|
|
479
472
|
(Story #3889 — `epic-audit-prepare.js` reads the Epic's `planningRisk`
|
|
480
473
|
envelope off the `epic-plan-state` checkpoint and maps each high-risk axis to
|
|
481
474
|
its lens via `resolveAuditLenses`), then dispatches each selected lens through
|
|
482
|
-
[`runAuditSuite`](
|
|
475
|
+
[`runAuditSuite`](../../scripts/lib/audit-suite/index.js). A high-risk Epic
|
|
483
476
|
therefore auto-runs its mapped lenses (e.g. a `security`-axis Epic runs
|
|
484
477
|
`audit-security`) even when the change set alone did not select them; a
|
|
485
478
|
low-risk Epic adds nothing. Findings are persisted as an `audit-results`
|
|
@@ -499,7 +492,7 @@ structured comment on the Epic.
|
|
|
499
492
|
|
|
500
493
|
Skip when `--skip-code-review`. Otherwise resolve the **risk-derived review
|
|
501
494
|
depth** for this Epic, then auto-invoke
|
|
502
|
-
[`helpers/code-review.md`](
|
|
495
|
+
[`helpers/code-review.md`](code-review.md) inline (read-only audit)
|
|
503
496
|
with the argument envelope `{ scope: 'epic', ticketId: <epicId>, baseRef:
|
|
504
497
|
'main', headRef: 'epic/<epicId>', depth: <reviewDepth> }`. The helper
|
|
505
498
|
persists findings as a `code-review` structured comment on the Epic.
|
|
@@ -507,11 +500,11 @@ persists findings as a `code-review` structured comment on the Epic.
|
|
|
507
500
|
The `depth` is the live epic-scope producer for Story #3876's review-depth
|
|
508
501
|
lever (Story #3937). Resolve it from the Epic's judged risk envelope the same
|
|
509
502
|
best-effort way Phase 4 routes audit lenses — via
|
|
510
|
-
[`resolveReviewDepthForEpic`](
|
|
503
|
+
[`resolveReviewDepthForEpic`](../../scripts/lib/orchestration/code-review.js),
|
|
511
504
|
which reads `planningRisk.overallLevel` off the Epic's `epic-plan-state`
|
|
512
505
|
checkpoint and maps it: `high` → `deep`, `low` → `light`, everything else
|
|
513
506
|
(including a missing/unparseable checkpoint, or an Epic that skipped
|
|
514
|
-
`/
|
|
507
|
+
`/plan`) → `standard`. The helper threads `depth` into `runCodeReview`,
|
|
515
508
|
which forwards it to every provider's `runReview` input; the LLM-backed
|
|
516
509
|
providers (codex, security-review, ultrareview) render it into the prompt they
|
|
517
510
|
emit so a high-risk Epic gets a deeper adversarial pass and a low-risk one a
|
|
@@ -534,12 +527,12 @@ runner via its CLI wrapper:
|
|
|
534
527
|
node .agents/scripts/retro-run.js --epic <epicId>
|
|
535
528
|
```
|
|
536
529
|
|
|
537
|
-
[`retro-run.js`](
|
|
530
|
+
[`retro-run.js`](../../scripts/retro-run.js) resolves the config/provider,
|
|
538
531
|
constructs a lifecycle bus with a `LedgerWriter` (so the run's
|
|
539
532
|
`retro.start` / `retro.end` boundaries land in
|
|
540
533
|
`temp/epic-<epicId>/lifecycle.ndjson`), and calls `runRetro` — the
|
|
541
534
|
canonical compose-and-post surface at
|
|
542
|
-
[`.agents/scripts/lib/orchestration/retro-runner.js`](
|
|
535
|
+
[`.agents/scripts/lib/orchestration/retro-runner.js`](../../scripts/lib/orchestration/retro-runner.js).
|
|
543
536
|
Propagate `--full-retro` to bypass the compact-path heuristic.
|
|
544
537
|
|
|
545
538
|
Retro fires here (before the PR opens) so it stays in the operator's
|
|
@@ -548,7 +541,7 @@ local session with full env access (env vars, credentials, MCP).
|
|
|
548
541
|
After the GitHub upsert succeeds, the retro body is also **mirrored
|
|
549
542
|
locally** to the per-Epic temp tree at `temp/epic-<epicId>/retro.md`
|
|
550
543
|
(path resolved via
|
|
551
|
-
[`lib/config/temp-paths.js`](
|
|
544
|
+
[`lib/config/temp-paths.js`](../../scripts/lib/config/temp-paths.js)'s
|
|
552
545
|
`epicRetroMirrorPath`, which honours `project.paths.tempRoot`).
|
|
553
546
|
Operators can read the retro without re-fetching from GitHub. GitHub
|
|
554
547
|
remains the source of truth — a mirror-write failure only logs a warn
|
|
@@ -599,16 +592,16 @@ responsibility below runs inside the listener chain — the operator
|
|
|
599
592
|
shells nothing manually. The `Finalizer` listener (Story #2894 —
|
|
600
593
|
bus-owned finalize) composes three helpers under
|
|
601
594
|
`.agents/scripts/lib/orchestration/finalize/` and emits the canonical
|
|
602
|
-
chain.** Treat this section as a runtime contract — `/
|
|
595
|
+
chain.** Treat this section as a runtime contract — `/deliver`
|
|
603
596
|
just fires the emit and reads the resulting ledger.
|
|
604
597
|
|
|
605
598
|
1. **Acceptance-spec reconciliation — bus-driven.** The
|
|
606
599
|
`AcceptanceReconciler` listener invokes
|
|
607
|
-
[`acceptance-spec-reconciler.js`](
|
|
600
|
+
[`acceptance-spec-reconciler.js`](../../scripts/acceptance-spec-reconciler.js)
|
|
608
601
|
to diff the AC IDs declared in the linked `context::acceptance-spec`
|
|
609
602
|
body against `@ac-*` / `@pending` tags in `tests/features/**`. A
|
|
610
603
|
non-OK reconciliation throws (per
|
|
611
|
-
[`rules/orchestration-error-handling.md`](
|
|
604
|
+
[`rules/orchestration-error-handling.md`](../../rules/orchestration-error-handling.md)),
|
|
612
605
|
aborting finalize **before** any PR is opened or planning artifacts
|
|
613
606
|
are closed — so the PRD, Tech Spec, and Acceptance Spec stay open
|
|
614
607
|
until the AC coverage gap is fixed. The reconciler returns
|
|
@@ -618,10 +611,10 @@ just fires the emit and reads the resulting ledger.
|
|
|
618
611
|
start gate in Phase 1 would normally catch that first).
|
|
619
612
|
2. **PR open — bus-driven (Story #2894).** On
|
|
620
613
|
`acceptance.reconcile.ok` the `Finalizer` listener invokes
|
|
621
|
-
[`openOrLocatePr`](
|
|
614
|
+
[`openOrLocatePr`](../../scripts/lib/orchestration/finalize/open-or-locate-pr.js)
|
|
622
615
|
with `{ epicId, headBranch: 'epic/<id>', baseBranch: 'main' }`.
|
|
623
616
|
The helper probes for an existing open PR on the head branch
|
|
624
|
-
first (idempotent locate path — a re-run of `/
|
|
617
|
+
first (idempotent locate path — a re-run of `/deliver`
|
|
625
618
|
on the same branch short-circuits without opening a duplicate)
|
|
626
619
|
and only opens a new PR when none exists. The listener then
|
|
627
620
|
emits `pr.created` → `epic.finalize.end` and **stops** (Story
|
|
@@ -634,17 +627,17 @@ just fires the emit and reads the resulting ledger.
|
|
|
634
627
|
driven later from the gated watch path (`pr.created` → `Watcher`
|
|
635
628
|
→ `epic.watch.end` → `AutomergePredicate` → `epic.merge.ready` →
|
|
636
629
|
`AutomergeArmer`) re-entered in Phase 8.5. The merge-lockout rule
|
|
637
|
-
in [`check-lifecycle-lint.js`](
|
|
630
|
+
in [`check-lifecycle-lint.js`](../../scripts/check-lifecycle-lint.js)
|
|
638
631
|
keeps `gh pr merge --auto --squash --delete-branch` confined to
|
|
639
632
|
`AutomergeArmer` — Phase 7 never shells the merge command.
|
|
640
633
|
3. **Planning-artifact close + hand-off — bus-driven (Story
|
|
641
634
|
#2894).** After `openOrLocatePr` returns, the `Finalizer` chains
|
|
642
|
-
[`closePlanningTickets`](
|
|
635
|
+
[`closePlanningTickets`](../../scripts/lib/orchestration/finalize/close-planning-tickets.js)
|
|
643
636
|
to close the three planning context tickets
|
|
644
637
|
(`context::prd`, `context::tech-spec`, `context::acceptance-spec`)
|
|
645
638
|
so the Epic's `Closes #<id>` auto-close path is not blocked by
|
|
646
639
|
open sub-issues, then
|
|
647
|
-
[`postHandoffComment`](
|
|
640
|
+
[`postHandoffComment`](../../scripts/lib/orchestration/finalize/post-handoff-comment.js)
|
|
648
641
|
to upsert the canonical `epic-handoff` structured comment naming
|
|
649
642
|
the PR URL. Both helpers are idempotent — already-closed tickets
|
|
650
643
|
are counted under `alreadyClosed`, and the handoff comment is
|
|
@@ -4,20 +4,20 @@ description: >-
|
|
|
4
4
|
computes a dependency-aware wave plan via `stories-wave-tick.js`, asks the
|
|
5
5
|
operator to confirm the plan, then fans out parallel Agent calls per wave
|
|
6
6
|
— each delegating to `helpers/single-story-deliver`. Stories without an
|
|
7
|
-
`Epic: #N` reference only; Epic-attached Stories use `/
|
|
7
|
+
`Epic: #N` reference only; Epic-attached Stories use `/deliver`.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# /
|
|
10
|
+
# helpers/deliver-stories — multi-Story delivery path (invoked by /deliver)
|
|
11
11
|
|
|
12
12
|
## Overview
|
|
13
13
|
|
|
14
|
-
`/
|
|
14
|
+
`/deliver` is the **operator-facing multi-Story delivery command**. It
|
|
15
15
|
takes one or more Story IDs, builds a dependency-aware wave plan, optionally
|
|
16
16
|
confirms it with the operator, and fans out one Agent call per Story per wave
|
|
17
17
|
— parallel within each wave, serialised across waves.
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
|
-
/
|
|
20
|
+
/deliver 101 102 103
|
|
21
21
|
→ Phase 0 — Validate input & build DAG
|
|
22
22
|
→ Phase 1 — stories-wave-tick.js → wave plan + operator confirmation
|
|
23
23
|
→ Phase 2 — for each wave:
|
|
@@ -26,22 +26,22 @@ confirms it with the operator, and fans out one Agent call per Story per wave
|
|
|
26
26
|
→ Phase 3 — Summary
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
**When to use `/
|
|
29
|
+
**When to use `/deliver` vs. other commands:**
|
|
30
30
|
|
|
31
31
|
| Scenario | Command |
|
|
32
32
|
| --- | --- |
|
|
33
|
-
| 1+ standalone Stories (no `Epic: #N` in body) | `/
|
|
33
|
+
| 1+ standalone Stories (no `Epic: #N` in body) | `/deliver <id> [<id>...]` |
|
|
34
34
|
| Exactly one standalone Story (lighter path) | `/single-story-deliver <id>` |
|
|
35
|
-
| Epic-attached Stories (have `Epic: #N`) | `/
|
|
35
|
+
| Epic-attached Stories (have `Epic: #N`) | `/deliver <epicId>` |
|
|
36
36
|
|
|
37
|
-
`/
|
|
37
|
+
`/deliver` **refuses** Stories that carry an `Epic: #N` reference in
|
|
38
38
|
their body. Those Stories belong to an Epic's dispatch manifest and must flow
|
|
39
|
-
through `/
|
|
39
|
+
through `/deliver`. Use `/single-story-deliver` for a single Epic-free
|
|
40
40
|
Story when you want the leaner one-story path without wave machinery.
|
|
41
41
|
|
|
42
42
|
> **Concurrency cap.** The cap is resolved **deterministically in code** by
|
|
43
43
|
> `stories-wave-tick.js` (Phase 1a) — the same `resolveConfig` + `getRunners`
|
|
44
|
-
> seam `/
|
|
44
|
+
> seam `/deliver` uses — and emitted as the `concurrencyCap` field on the
|
|
45
45
|
> `stories-wave-plan` envelope. The default is 3; override persistently via
|
|
46
46
|
> `delivery.deliverRunner.concurrencyCap` in `.agentrc.json` (a
|
|
47
47
|
> `.agentrc.local.json` override is honored) or per-run via the `--concurrency`
|
|
@@ -53,7 +53,7 @@ Story when you want the leaner one-story path without wave machinery.
|
|
|
53
53
|
## Arguments
|
|
54
54
|
|
|
55
55
|
```text
|
|
56
|
-
/
|
|
56
|
+
/deliver <storyId> [<storyId> ...] [--dep <fromId>:<toId> ...] [--yes] [--concurrency <n>]
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
- `storyId` — One or more GitHub issue numbers carrying `type::story` and
|
|
@@ -79,7 +79,7 @@ For each supplied Story ID:
|
|
|
79
79
|
|
|
80
80
|
1. Confirm the issue exists and carries the `type::story` label.
|
|
81
81
|
2. Confirm the issue body does **not** contain an `Epic: #N` reference. If
|
|
82
|
-
it does, STOP and tell the operator to use `/
|
|
82
|
+
it does, STOP and tell the operator to use `/deliver <epicId>`
|
|
83
83
|
instead.
|
|
84
84
|
3. Collect `blocked by #N` references between the supplied Story IDs.
|
|
85
85
|
References to Story IDs outside the supplied set are advisory warnings
|
|
@@ -112,7 +112,7 @@ node .agents/scripts/stories-wave-tick.js --dag '<dag-json>'
|
|
|
112
112
|
node .agents/scripts/stories-wave-tick.js --dag '<dag-json>' --concurrency <n>
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
When the operator passed `--concurrency <n>` to `/
|
|
115
|
+
When the operator passed `--concurrency <n>` to `/deliver`, forward it
|
|
116
116
|
verbatim to `stories-wave-tick.js`. The script resolves the cap from config
|
|
117
117
|
(`delivery.deliverRunner.concurrencyCap`, default 3) and the override wins for
|
|
118
118
|
that run.
|
|
@@ -184,7 +184,7 @@ envelope field is the single deterministic source.
|
|
|
184
184
|
Each Agent call:
|
|
185
185
|
|
|
186
186
|
1. Names the Story ID and instructs the child to invoke
|
|
187
|
-
[`helpers/single-story-deliver`](
|
|
187
|
+
[`helpers/single-story-deliver`](single-story-deliver.md)
|
|
188
188
|
for that Story.
|
|
189
189
|
2. States the **return contract** (see § 2c).
|
|
190
190
|
3. Reminds the child of the **non-interactive contract**: no clarifying
|
|
@@ -226,7 +226,7 @@ After every Story in a wave returns:
|
|
|
226
226
|
- **Any `status === 'blocked'`** → STOP the wave loop. Post a summary
|
|
227
227
|
of blocked Stories and their `blockerCommentId` references. Do not
|
|
228
228
|
dispatch the next wave. Wait for the operator to resolve each blocker
|
|
229
|
-
and re-run `/
|
|
229
|
+
and re-run `/deliver` with the same set (already-done Stories
|
|
230
230
|
will short-circuit because `single-story-close.js` is idempotent).
|
|
231
231
|
- **Any `status === 'failed'`** → STOP the wave loop. Report the
|
|
232
232
|
failures. The operator must fix the failing Stories before re-running.
|
|
@@ -238,7 +238,7 @@ After every Story in a wave returns:
|
|
|
238
238
|
Print a final run summary:
|
|
239
239
|
|
|
240
240
|
```text
|
|
241
|
-
/
|
|
241
|
+
/deliver — 3 Stories delivered in 2 waves
|
|
242
242
|
|
|
243
243
|
Wave 0: #101 ✅ done, #103 ✅ done
|
|
244
244
|
Wave 1: #102 ✅ done
|
|
@@ -265,8 +265,8 @@ Story's suite is green and the close-validation gates already pass — and
|
|
|
265
265
|
key is unset or `false`, story-deliver behaves exactly as documented above
|
|
266
266
|
and this stage is skipped entirely.
|
|
267
267
|
|
|
268
|
-
The stage adopts the [`refactorer`](
|
|
269
|
-
[`core/refactoring-discipline`](
|
|
268
|
+
The stage adopts the [`refactorer`](../../personas/refactorer.md) persona and the
|
|
269
|
+
[`core/refactoring-discipline`](../../skills/core/refactoring-discipline/SKILL.md)
|
|
270
270
|
skill to drive a behaviour-preserving pass that lowers CRAP and removes
|
|
271
271
|
duplication on the files the Story already touched:
|
|
272
272
|
|
|
@@ -277,7 +277,7 @@ duplication on the files the Story already touched:
|
|
|
277
277
|
must be reverted.
|
|
278
278
|
- **Advisory, not a gate.** This stage does **not** introduce a new
|
|
279
279
|
close-validation gate and does **not** change the semantics of the existing
|
|
280
|
-
[close-validation](
|
|
280
|
+
[close-validation](../../scripts/lib/close-validation/runner.js) chain (typecheck,
|
|
281
281
|
lint, test, format, maintainability, coverage, crap). The canonical gates
|
|
282
282
|
remain the single source of pass/fail at close; the refactor stage only adds
|
|
283
283
|
an extra behaviour-preserving cleanup commit when enabled.
|
|
@@ -293,7 +293,7 @@ duplication on the files the Story already touched:
|
|
|
293
293
|
`/single-story-deliver` is idempotent at every phase:
|
|
294
294
|
`single-story-init.js` reuses an existing worktree and
|
|
295
295
|
`single-story-close.js` short-circuits when the Story is already closed.
|
|
296
|
-
Re-running `/
|
|
296
|
+
Re-running `/deliver` with the same Story set after a partial
|
|
297
297
|
failure is safe — already-done Stories produce no-op outcomes; only the
|
|
298
298
|
blocked or unstarted Stories execute.
|
|
299
299
|
|
|
@@ -313,15 +313,15 @@ blocked or unstarted Stories execute.
|
|
|
313
313
|
`node .agents/scripts/update-ticket-state.js --ticket <id> --state <state>`.
|
|
314
314
|
This CLI is the authoritative mechanism — there is no separate
|
|
315
315
|
state-mutation MCP server to degrade from (see
|
|
316
|
-
[`.agents/instructions.md` § 1.D](
|
|
316
|
+
[`.agents/instructions.md` § 1.D](../../instructions.md)).
|
|
317
317
|
|
|
318
318
|
---
|
|
319
319
|
|
|
320
320
|
## See also
|
|
321
321
|
|
|
322
|
-
- [`helpers/single-story-deliver`](
|
|
322
|
+
- [`helpers/single-story-deliver`](single-story-deliver.md) — the
|
|
323
323
|
per-Story worker this command delegates to.
|
|
324
|
-
- [`/
|
|
324
|
+
- [`/deliver`](deliver-epic.md) — full Epic wave loop for
|
|
325
325
|
Epic-attached Stories.
|
|
326
|
-
- [`helpers/epic-deliver-story`](
|
|
327
|
-
per-Story worker `/
|
|
326
|
+
- [`helpers/epic-deliver-story`](epic-deliver-story.md) — the
|
|
327
|
+
per-Story worker `/deliver` uses internally.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
|
|
10
10
|
> **Helper, not a slash command.** Files under `workflows/helpers/` are not
|
|
11
11
|
> projected into the mandrel plugin command tree. The same `lib/checks/` registry runs
|
|
12
|
-
> automatically as preflight inside `/
|
|
12
|
+
> automatically as preflight inside `/deliver`, `/story-close`, and
|
|
13
13
|
> `npm test` — this viewer exists only for ad-hoc inspection. Invoke the
|
|
14
14
|
> backing script directly: `node .agents/scripts/diagnose.js [args]`.
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ description: >-
|
|
|
8
8
|
# Epic Audit (helper)
|
|
9
9
|
|
|
10
10
|
> **Helper module.** Not a slash command. Invoked automatically from
|
|
11
|
-
> `/
|
|
12
|
-
> `agent::done`). To run an audit directly, use `/
|
|
11
|
+
> `/deliver` Phase 4 once the wave loop completes (all Stories at
|
|
12
|
+
> `agent::done`). To run an audit directly, use `/deliver [Epic_ID]` — it
|
|
13
13
|
> delegates here (or pass `--skip-epic-audit` to bypass).
|
|
14
14
|
|
|
15
15
|
This helper runs the **change-set-aware audit pass** on an Epic branch
|
|
@@ -32,7 +32,7 @@ change-set selection. Both lens sources fire through the **same**
|
|
|
32
32
|
`runAuditSuite` dispatch below — no new audit machinery.
|
|
33
33
|
|
|
34
34
|
> **When to run**: After Phase 3 close-validation passes and before Phase 5
|
|
35
|
-
> code-review. `/
|
|
35
|
+
> code-review. `/deliver` invokes this automatically once the wave loop
|
|
36
36
|
> completes and all Stories reach `agent::done`.
|
|
37
37
|
>
|
|
38
38
|
> **Persona**: `architect` · **Skills**: `core/code-review-and-quality`,
|
|
@@ -94,7 +94,7 @@ resolved by the shared `resolveDepth` resolver from the Epic's model-judged
|
|
|
94
94
|
risk envelope (`overallLevel` off the `epic-plan-state` checkpoint) folded
|
|
95
95
|
with `changedFilesCount`: a high-risk **or** wide-footprint Epic resolves to
|
|
96
96
|
`deep`, a low-risk small one to `light`, and everything else — including an
|
|
97
|
-
Epic that skipped `/
|
|
97
|
+
Epic that skipped `/plan` and has no checkpoint — to `standard`.
|
|
98
98
|
|
|
99
99
|
Depth changes **how deeply** each lens runs, never **which** lenses fire:
|
|
100
100
|
|
|
@@ -274,8 +274,8 @@ The body MUST include:
|
|
|
274
274
|
### Severity gating
|
|
275
275
|
|
|
276
276
|
- **Any 🔴 Critical Blocker** → STOP. Relay to the operator and let
|
|
277
|
-
`/
|
|
278
|
-
- **Only 🟠/🟡/🟢** → log as non-blocking and return to `/
|
|
277
|
+
`/deliver` Phase 4 record a manual intervention.
|
|
278
|
+
- **Only 🟠/🟡/🟢** → log as non-blocking and return to `/deliver`
|
|
279
279
|
Phase 5 (code-review).
|
|
280
280
|
|
|
281
281
|
## Constraints
|