mandrel 1.94.0 → 2.0.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 +59 -73
- package/.agents/agents/story-worker.md +12 -13
- package/.agents/docs/SDLC.md +489 -1285
- package/.agents/docs/agentrc-reference.json +177 -67
- package/.agents/docs/configuration.md +104 -138
- package/.agents/docs/execution-reference.md +17 -20
- package/.agents/docs/quality-gates.md +13 -19
- package/.agents/docs/workflows.md +3 -3
- package/.agents/instructions.md +70 -81
- package/.agents/rules/ci-remediation.md +8 -12
- package/.agents/rules/git-conventions-reference.md +6 -7
- package/.agents/rules/git-conventions.md +16 -22
- package/.agents/schemas/acceptance-eval-verdict.schema.json +1 -1
- package/.agents/schemas/agentrc.schema.json +54 -214
- package/.agents/schemas/lifecycle/ledger-record.schema.json +1 -1
- package/.agents/schemas/lifecycle/retro.end.schema.json +1 -1
- package/.agents/schemas/risk-verdict.schema.json +0 -13
- package/.agents/scripts/analyze-execution.js +1 -1
- package/.agents/scripts/audit-to-stories.js +7 -7
- package/.agents/scripts/boot-sweep.js +1 -1
- package/.agents/scripts/check-lifecycle-lint.js +6 -9
- package/.agents/scripts/check-prepush-recovery.js +1 -1
- package/.agents/scripts/cleanup-repo-test-temp.js +6 -1
- package/.agents/scripts/lib/Logger.js +6 -10
- package/.agents/scripts/lib/audit-suite/runner.js +2 -2
- package/.agents/scripts/lib/audit-suite/selector.js +5 -5
- package/.agents/scripts/lib/audit-to-stories/{seed-epic-from-findings.js → seed-from-findings.js} +9 -9
- package/.agents/scripts/lib/baselines/kernel.js +206 -18
- package/.agents/scripts/lib/baselines/kinds/maintainability.js +0 -4
- package/.agents/scripts/lib/baselines/reader.js +1 -6
- package/.agents/scripts/lib/bdd-runner-detect.js +5 -9
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +32 -33
- package/.agents/scripts/lib/checks/core-bare-clean.js +2 -2
- package/.agents/scripts/lib/checks/index.js +2 -1
- package/.agents/scripts/lib/checks/story-init-not-backgrounded.js +23 -21
- package/.agents/scripts/lib/cli/standard-args.js +13 -22
- package/.agents/scripts/lib/cli-args.js +16 -7
- package/.agents/scripts/lib/close-validation/gates.js +2 -2
- package/.agents/scripts/lib/config/ci.js +6 -31
- package/.agents/scripts/lib/config/delivery-routing.js +45 -29
- package/.agents/scripts/lib/config/explain.js +55 -36
- package/.agents/scripts/lib/config/limits.js +17 -58
- package/.agents/scripts/lib/config/paths.js +0 -2
- package/.agents/scripts/lib/config/quality.js +1 -1
- package/.agents/scripts/lib/config/runners.js +17 -50
- package/.agents/scripts/lib/config/temp-paths.js +19 -14
- package/.agents/scripts/lib/config/worktree-isolation.js +0 -5
- package/.agents/scripts/lib/config-resolver.js +2 -7
- package/.agents/scripts/lib/config-settings-schema-delivery.js +24 -148
- package/.agents/scripts/lib/config-settings-schema-quality.js +8 -14
- package/.agents/scripts/lib/config-settings-schema.js +52 -38
- package/.agents/scripts/lib/dependency-parser.js +3 -2
- package/.agents/scripts/lib/doc-tiers.js +2 -2
- package/.agents/scripts/lib/duplicate-search.js +211 -41
- package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +1 -1
- package/.agents/scripts/lib/findings/promote-finding.js +5 -5
- package/.agents/scripts/lib/framework-version.js +2 -3
- package/.agents/scripts/lib/git-branch-cleanup.js +1 -10
- package/.agents/scripts/lib/git-branch-lifecycle.js +17 -22
- package/.agents/scripts/lib/git-utils.js +32 -6
- package/.agents/scripts/lib/github/framework-repo.js +6 -0
- package/.agents/scripts/lib/label-constants.js +10 -23
- package/.agents/scripts/lib/label-taxonomy.js +9 -43
- package/.agents/scripts/lib/observability/active-story-env.js +1 -1
- package/.agents/scripts/lib/observability/hook-heartbeat.js +20 -52
- package/.agents/scripts/lib/observability/source-classifier.js +3 -3
- package/.agents/scripts/lib/onboard/init-tail.js +1 -3
- package/.agents/scripts/lib/orchestration/audit-lens-routing.js +128 -0
- package/.agents/scripts/lib/orchestration/bookkeeping-outbox.js +8 -5
- package/.agents/scripts/lib/orchestration/ceremony-routing.js +83 -20
- package/.agents/scripts/lib/orchestration/code-review.js +20 -268
- package/.agents/scripts/lib/orchestration/column-sync.js +1 -1
- package/.agents/scripts/lib/orchestration/consolidation-precondition.js +1 -1
- package/.agents/scripts/lib/orchestration/context-envelope.js +2 -5
- package/.agents/scripts/lib/orchestration/docs-digest.js +8 -8
- package/.agents/scripts/lib/orchestration/file-assumptions.js +7 -13
- package/.agents/scripts/lib/orchestration/git-cleanup/phases/cli.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/emit-loop-tick.js +8 -8
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +2 -2
- package/.agents/scripts/lib/orchestration/lifecycle/ledger-writer.js +6 -3
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/README.md +17 -43
- package/.agents/scripts/lib/orchestration/lint-baseline-service.js +4 -4
- package/.agents/scripts/lib/orchestration/merge-block-class.js +1 -1
- package/.agents/scripts/lib/orchestration/phase-runner.js +3 -2
- package/.agents/scripts/lib/orchestration/plan-context.js +248 -266
- package/.agents/scripts/lib/orchestration/plan-critics-evaluate.js +1 -1
- package/.agents/scripts/lib/orchestration/plan-navigation.js +92 -0
- package/.agents/scripts/lib/orchestration/plan-persist/fan-out-gate.js +61 -0
- package/.agents/scripts/lib/orchestration/plan-persist/persist-helpers.js +97 -0
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +223 -854
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +361 -0
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +35 -108
- package/.agents/scripts/lib/orchestration/plan-reachability.js +9 -14
- package/.agents/scripts/lib/orchestration/plan-runner/worktree-sweep.js +1 -1
- package/.agents/scripts/lib/orchestration/{epic-plan-spec/phases → planning}/authoring-context.js +13 -13
- package/.agents/scripts/lib/orchestration/planning/decomposer-context.js +27 -0
- package/.agents/scripts/lib/orchestration/{epic-plan-spec/phases → planning}/risk-verdict.js +3 -4
- package/.agents/scripts/lib/orchestration/post-merge/phases/branch-cleanup.js +2 -2
- package/.agents/scripts/lib/orchestration/post-merge/phases/dashboard-refresh.js +8 -20
- package/.agents/scripts/lib/orchestration/post-merge/phases/worktree-reap.js +3 -2
- package/.agents/scripts/lib/orchestration/pr-base-guard.js +18 -28
- package/.agents/scripts/lib/orchestration/preflight-cache.js +5 -5
- package/.agents/scripts/lib/orchestration/remote-verifier.js +1 -1
- package/.agents/scripts/lib/orchestration/resolve-plan-run.js +155 -0
- package/.agents/scripts/lib/orchestration/resolves-token.js +1 -1
- package/.agents/scripts/lib/orchestration/retro-perf-heuristics.js +8 -8
- package/.agents/scripts/lib/orchestration/retro-proposals.js +140 -79
- package/.agents/scripts/lib/orchestration/review-depth.js +26 -12
- package/.agents/scripts/lib/orchestration/review-providers/codex.js +2 -2
- package/.agents/scripts/lib/orchestration/review-providers/review-provider-factory.js +21 -56
- package/.agents/scripts/lib/orchestration/run-epilogue.js +426 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/auto-merge.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/code-review.js +95 -41
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +16 -13
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-block.js +40 -0
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +11 -3
- package/.agents/scripts/lib/orchestration/spec-freshness.js +14 -205
- package/.agents/scripts/lib/orchestration/spec-section-validator.js +4 -5
- package/.agents/scripts/lib/orchestration/spec-spill.js +60 -0
- package/.agents/scripts/lib/orchestration/split-policy-validator.js +188 -0
- package/.agents/scripts/lib/orchestration/story-close/emit-blocked.js +49 -0
- package/.agents/scripts/lib/orchestration/story-close/phases/code-review.js +15 -12
- package/.agents/scripts/lib/orchestration/story-follow-ups.js +237 -0
- package/.agents/scripts/lib/orchestration/story-init-remote.js +47 -0
- package/.agents/scripts/lib/orchestration/story-plan-state.js +48 -0
- package/.agents/scripts/lib/orchestration/{epic-runner → story-progress}/story-run-progress-writer.js +3 -3
- package/.agents/scripts/lib/orchestration/structured-comment-parser.js +1 -1
- package/.agents/scripts/lib/orchestration/task-body-validator.js +8 -18
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +11 -61
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +189 -373
- package/.agents/scripts/lib/orchestration/ticket-validator.js +2 -7
- package/.agents/scripts/lib/orchestration/ticketing/bulk.js +0 -25
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +29 -26
- package/.agents/scripts/lib/orchestration/ticketing/transition.js +5 -5
- package/.agents/scripts/lib/planning-corpus.js +16 -11
- package/.agents/scripts/lib/preflight-runner.js +2 -2
- package/.agents/scripts/lib/qa/coverage-verdict.js +5 -5
- package/.agents/scripts/lib/single-story/confirm-merge-follow-ups.js +36 -0
- package/.agents/scripts/lib/single-story-sweep/protection-ctx.js +1 -1
- package/.agents/scripts/lib/story-adjacency.js +11 -14
- package/.agents/scripts/lib/story-body/story-body.js +124 -70
- package/.agents/scripts/lib/story-plan.js +2 -4
- package/.agents/scripts/lib/templates/decomposer-prompts.js +46 -45
- package/.agents/scripts/lib/templates/spec-author-prompts.js +47 -45
- package/.agents/scripts/lib/{epic-body-sections.js → ticket-body-sections.js} +26 -26
- package/.agents/scripts/lib/validation-evidence.js +1 -1
- package/.agents/scripts/lib/wave-runner/ready-set.js +6 -6
- package/.agents/scripts/lib/workspace-provisioner.js +1 -1
- package/.agents/scripts/lib/worktree/lifecycle/reap.js +5 -7
- package/.agents/scripts/lint-issue-body.js +71 -40
- package/.agents/scripts/mandrel-update-preflight.js +1 -1
- package/.agents/scripts/notify.js +4 -3
- package/.agents/scripts/plan-context.js +64 -74
- package/.agents/scripts/plan-persist.js +121 -280
- package/.agents/scripts/plan-run-epilogue.js +97 -0
- package/.agents/scripts/providers/github/issues.js +17 -33
- package/.agents/scripts/providers/github/mappers.js +0 -12
- package/.agents/scripts/providers/github/tickets.js +2 -5
- package/.agents/scripts/resolve-plan-run.js +117 -0
- package/.agents/scripts/signals-view.js +24 -19
- package/.agents/scripts/single-story-close.js +11 -14
- package/.agents/scripts/single-story-confirm-merge.js +39 -23
- package/.agents/scripts/single-story-init.js +29 -20
- package/.agents/scripts/stories-wave-tick.js +6 -6
- package/.agents/scripts/story-plan.js +26 -47
- package/.agents/scripts/update-ticket-state.js +6 -15
- package/.agents/skills/core/analyze-execution/SKILL.md +21 -18
- package/.agents/skills/core/idea-refinement/SKILL.md +6 -6
- package/.agents/skills/core/scope-triage/SKILL.md +28 -172
- package/.agents/skills/skills.index.json +3 -43
- package/.agents/starter-agentrc.json +0 -5
- package/.agents/templates/agent-protocol.md +9 -10
- package/.agents/workflows/audit-architecture.md +3 -3
- package/.agents/workflows/audit-clean-code.md +3 -3
- package/.agents/workflows/audit-dependencies.md +3 -3
- package/.agents/workflows/audit-devops.md +3 -3
- package/.agents/workflows/audit-documentation.md +5 -5
- package/.agents/workflows/audit-lighthouse.md +3 -3
- package/.agents/workflows/audit-navigability.md +3 -2
- package/.agents/workflows/audit-performance.md +3 -3
- package/.agents/workflows/audit-privacy.md +3 -3
- package/.agents/workflows/audit-quality.md +3 -3
- package/.agents/workflows/audit-security.md +3 -3
- package/.agents/workflows/audit-seo.md +3 -3
- package/.agents/workflows/audit-sre.md +3 -3
- package/.agents/workflows/audit-to-stories.md +20 -20
- package/.agents/workflows/audit-ux-ui.md +3 -3
- package/.agents/workflows/deliver.md +122 -174
- package/.agents/workflows/git-cleanup.md +3 -4
- package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
- package/.agents/workflows/helpers/acceptance-self-eval.md +16 -29
- package/.agents/workflows/helpers/code-review.md +70 -193
- package/.agents/workflows/helpers/{single-story-deliver-reference.md → deliver-story-reference.md} +12 -14
- package/.agents/workflows/helpers/{single-story-deliver.md → deliver-story.md} +113 -139
- package/.agents/workflows/helpers/diagnose.md +10 -10
- package/.agents/workflows/helpers/parallel-tooling.md +1 -1
- package/.agents/workflows/helpers/signals.md +16 -16
- package/.agents/workflows/helpers/worktree-lifecycle.md +48 -64
- package/.agents/workflows/mandrel-update.md +2 -1
- package/.agents/workflows/plan.md +112 -145
- package/.agents/workflows/qa-assist.md +24 -30
- package/.agents/workflows/qa-explore.md +29 -38
- package/.agents/workflows/qa-run.md +2 -2
- package/README.md +9 -8
- package/docs/CHANGELOG.md +30 -0
- package/lib/migrations/index.js +6 -5
- package/package.json +2 -2
- package/.agents/agents/retro.md +0 -42
- package/.agents/personas/architect.md +0 -113
- package/.agents/personas/devops-engineer.md +0 -38
- package/.agents/personas/engineer.md +0 -33
- package/.agents/personas/project-manager.md +0 -114
- package/.agents/personas/qa-engineer.md +0 -95
- package/.agents/personas/security-engineer.md +0 -111
- package/.agents/personas/technical-writer.md +0 -101
- package/.agents/schemas/dispatch-manifest.json +0 -232
- package/.agents/schemas/epic-spec.schema.json +0 -153
- package/.agents/schemas/lifecycle/slice.end.schema.json +0 -21
- package/.agents/schemas/lifecycle/slice.heartbeat.schema.json +0 -20
- package/.agents/schemas/lifecycle/slice.start.schema.json +0 -17
- package/.agents/scripts/acceptance-spec-reconciler.js +0 -642
- package/.agents/scripts/bookkeeping-reconcile.js +0 -117
- package/.agents/scripts/dispatcher.js +0 -295
- package/.agents/scripts/epic-audit-prepare.js +0 -497
- package/.agents/scripts/epic-audit-recheck.js +0 -274
- package/.agents/scripts/epic-deliver-note-intervention.js +0 -192
- package/.agents/scripts/epic-deliver-preflight.js +0 -462
- package/.agents/scripts/epic-deliver-prepare.js +0 -852
- package/.agents/scripts/epic-execute-record-wave.js +0 -449
- package/.agents/scripts/epic-plan-clarity.js +0 -211
- package/.agents/scripts/epic-plan-healthcheck.js +0 -581
- package/.agents/scripts/epic-reconcile.js +0 -625
- package/.agents/scripts/lib/baseline-snapshot.js +0 -979
- package/.agents/scripts/lib/checks/epic-merge-lock-stale.js +0 -54
- package/.agents/scripts/lib/checks/stale-origin-epic.js +0 -49
- package/.agents/scripts/lib/config/lifecycle.js +0 -40
- package/.agents/scripts/lib/config/preflight.js +0 -58
- package/.agents/scripts/lib/config/retro.js +0 -77
- package/.agents/scripts/lib/epic-merge-lock.js +0 -322
- package/.agents/scripts/lib/epic-plan-clarity.js +0 -181
- package/.agents/scripts/lib/epic-plan-ideation.js +0 -261
- package/.agents/scripts/lib/orchestration/context-hydration-engine.js +0 -539
- package/.agents/scripts/lib/orchestration/deliver-route.js +0 -173
- package/.agents/scripts/lib/orchestration/dispatch-engine.js +0 -134
- package/.agents/scripts/lib/orchestration/dispatch-pipeline.js +0 -183
- package/.agents/scripts/lib/orchestration/epic-cleanup.js +0 -801
- package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +0 -310
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/context.js +0 -163
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/creation.js +0 -140
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/dag.js +0 -64
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/diagnostics.js +0 -72
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/persist-helpers.js +0 -156
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/persist.js +0 -345
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/planning-artifacts.js +0 -41
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/reconcile-spawn.js +0 -86
- package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +0 -391
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/drain.js +0 -94
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +0 -236
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/run-spec-phase.js +0 -307
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/spec-freshness.js +0 -117
- package/.agents/scripts/lib/orchestration/epic-plan-state-store.js +0 -117
- package/.agents/scripts/lib/orchestration/epic-run-state-store.js +0 -621
- package/.agents/scripts/lib/orchestration/epic-runner/concurrency-gate.js +0 -186
- package/.agents/scripts/lib/orchestration/epic-runner/deliver-phases.js +0 -50
- package/.agents/scripts/lib/orchestration/epic-runner/phases/build-wave-dag.js +0 -129
- package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +0 -103
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +0 -267
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +0 -210
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +0 -238
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/_bullet-format.js +0 -32
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/component-drift.js +0 -203
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/crap-drift.js +0 -227
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/maintainability-drift.js +0 -117
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/stalled-worktree.js +0 -37
- package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +0 -127
- package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +0 -276
- package/.agents/scripts/lib/orchestration/epic-runner/wave-scheduler.js +0 -66
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-apply.js +0 -789
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-diff.js +0 -676
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-discriminator.js +0 -389
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-format.js +0 -230
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-ops.js +0 -361
- package/.agents/scripts/lib/orchestration/finalize/open-or-locate-pr.js +0 -306
- package/.agents/scripts/lib/orchestration/finalize/post-handoff-comment.js +0 -489
- package/.agents/scripts/lib/orchestration/finalize/sanitize-skip-ci.js +0 -88
- package/.agents/scripts/lib/orchestration/lifecycle/emit-slice-lifecycle.js +0 -270
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +0 -147
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/acceptance-reconciler.js +0 -465
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-armer.js +0 -501
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-predicate.js +0 -984
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/branch-cleaner.js +0 -264
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/checkpoint-pointer-writer.js +0 -284
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/cleaner.js +0 -355
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/finalizer.js +0 -673
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/index.js +0 -378
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/intervention-recorder.js +0 -140
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/label-transitioner.js +0 -144
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/notify-dispatcher.js +0 -174
- package/.agents/scripts/lib/orchestration/manifest-builder.js +0 -222
- package/.agents/scripts/lib/orchestration/plan-persist/amend.js +0 -359
- package/.agents/scripts/lib/orchestration/plan-persist/delivery-mode.js +0 -127
- package/.agents/scripts/lib/orchestration/post-merge-pipeline.js +0 -205
- package/.agents/scripts/lib/orchestration/recurring-failure-detector.js +0 -152
- package/.agents/scripts/lib/orchestration/retro/phases/checks.js +0 -94
- package/.agents/scripts/lib/orchestration/retro/phases/compose-body.js +0 -571
- package/.agents/scripts/lib/orchestration/retro/phases/gather-signals.js +0 -450
- package/.agents/scripts/lib/orchestration/retro/phases/post-and-mirror.js +0 -191
- package/.agents/scripts/lib/orchestration/retro-heuristics.js +0 -57
- package/.agents/scripts/lib/orchestration/retro-runner.js +0 -197
- package/.agents/scripts/lib/orchestration/spec-renderer.js +0 -447
- package/.agents/scripts/lib/orchestration/story-close/auto-refresh-runner.js +0 -747
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/gate-failure.js +0 -211
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/pre-merge-attribution.js +0 -158
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/refresh-commit.js +0 -446
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/regression-projection.js +0 -297
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/scope-discovery.js +0 -48
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution-wiring.js +0 -67
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution.js +0 -161
- package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +0 -117
- package/.agents/scripts/lib/orchestration/story-close/cd-out-guard.js +0 -86
- package/.agents/scripts/lib/orchestration/story-close/cleanup-reconciler.js +0 -147
- package/.agents/scripts/lib/orchestration/story-close/close-inputs.js +0 -142
- package/.agents/scripts/lib/orchestration/story-close/comment-bodies.js +0 -62
- package/.agents/scripts/lib/orchestration/story-close/merge-runner.js +0 -658
- package/.agents/scripts/lib/orchestration/story-close/merge-subject.js +0 -198
- package/.agents/scripts/lib/orchestration/story-close/phases/branch-restore.js +0 -105
- package/.agents/scripts/lib/orchestration/story-close/phases/close.js +0 -222
- package/.agents/scripts/lib/orchestration/story-close/phases/gates.js +0 -292
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +0 -270
- package/.agents/scripts/lib/orchestration/story-close/phases/preflight.js +0 -110
- package/.agents/scripts/lib/orchestration/story-close/phases/refresh.js +0 -86
- package/.agents/scripts/lib/orchestration/story-close/phases/timeout-blocked-emitter.js +0 -112
- package/.agents/scripts/lib/orchestration/story-close/phases/timeout-blocked.js +0 -157
- package/.agents/scripts/lib/orchestration/story-close/post-merge-close.js +0 -421
- package/.agents/scripts/lib/orchestration/story-close/pre-merge-validation.js +0 -302
- package/.agents/scripts/lib/orchestration/story-close/shared-checkout-guard.js +0 -163
- package/.agents/scripts/lib/orchestration/story-close-recovery.js +0 -690
- package/.agents/scripts/lib/orchestration/wave-marker.js +0 -28
- package/.agents/scripts/lib/orchestration/wave-record-io.js +0 -218
- package/.agents/scripts/lib/orchestration/wave-record-notifications.js +0 -145
- package/.agents/scripts/lib/orchestration/wave-record-projection.js +0 -212
- package/.agents/scripts/lib/presentation/dispatch-manifest-render.js +0 -111
- package/.agents/scripts/lib/presentation/manifest-builder.js +0 -239
- package/.agents/scripts/lib/presentation/manifest-formatter.js +0 -242
- package/.agents/scripts/lib/presentation/manifest-helpers.js +0 -213
- package/.agents/scripts/lib/presentation/manifest-persistence.js +0 -261
- package/.agents/scripts/lib/presentation/manifest-procedures.js +0 -55
- package/.agents/scripts/lib/presentation/manifest-render-waves.js +0 -306
- package/.agents/scripts/lib/presentation/manifest-renderer.js +0 -188
- package/.agents/scripts/lib/presentation/manifest-story-views.js +0 -110
- package/.agents/scripts/lib/push-epic-retry.js +0 -209
- package/.agents/scripts/lib/spec/index.js +0 -36
- package/.agents/scripts/lib/spec/loader.js +0 -425
- package/.agents/scripts/lib/spec/state.js +0 -208
- package/.agents/scripts/lib/story-init/blocker-validator.js +0 -68
- package/.agents/scripts/lib/story-init/branch-initializer.js +0 -408
- package/.agents/scripts/lib/story-init/context-resolver.js +0 -92
- package/.agents/scripts/lib/story-init/donor-precheck.js +0 -207
- package/.agents/scripts/lib/story-init/state-transitioner.js +0 -80
- package/.agents/scripts/lib/story-init/task-graph-builder.js +0 -124
- package/.agents/scripts/lib/story-init/transition-summary.js +0 -34
- package/.agents/scripts/lib/test-reserved-epic-temp-ids.js +0 -35
- package/.agents/scripts/lib/wave-runner/tick.js +0 -754
- package/.agents/scripts/lib/wave-runner/wave-runner-error.js +0 -20
- package/.agents/scripts/lifecycle-emit-story-dispatch.js +0 -194
- package/.agents/scripts/lifecycle-emit.js +0 -510
- package/.agents/scripts/retro-run.js +0 -218
- package/.agents/scripts/slice-phase.js +0 -361
- package/.agents/scripts/standalone-feedback-rollup.js +0 -188
- package/.agents/scripts/story-close.js +0 -294
- package/.agents/scripts/story-init.js +0 -599
- package/.agents/scripts/story-phase.js +0 -369
- package/.agents/scripts/wave-tick.js +0 -464
- package/.agents/skills/core/epic-plan-consolidate/SKILL.md +0 -172
- package/.agents/skills/core/epic-plan-consolidate/examples.md +0 -51
- package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +0 -441
- package/.agents/skills/core/epic-plan-decompose-author/examples.md +0 -47
- package/.agents/skills/core/epic-plan-premortem/SKILL.md +0 -146
- package/.agents/skills/core/epic-plan-premortem/examples.md +0 -53
- package/.agents/skills/core/epic-plan-spec-author/SKILL.md +0 -383
- package/.agents/skills/core/epic-plan-spec-author/examples.md +0 -91
- package/.agents/workflows/helpers/deliver-epic-reference.md +0 -547
- package/.agents/workflows/helpers/deliver-epic-single.md +0 -331
- package/.agents/workflows/helpers/deliver-epic.md +0 -998
- package/.agents/workflows/helpers/deliver-stories.md +0 -450
- package/.agents/workflows/helpers/epic-audit.md +0 -189
- package/.agents/workflows/helpers/epic-deliver-story.md +0 -436
- package/.agents/workflows/helpers/epic-testing.md +0 -125
- package/.agents/workflows/helpers/plan-epic-reference.md +0 -160
- package/.agents/workflows/helpers/plan-epic.md +0 -353
- package/.agents/workflows/helpers/plan-story.md +0 -251
- package/.agents/workflows/helpers/scope-triage-gate.md +0 -108
- /package/.agents/scripts/lib/orchestration/{epic-plan-spec/phases → planning}/spec-authoring-grounding.js +0 -0
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: epic-plan-premortem
|
|
3
|
-
description: >-
|
|
4
|
-
Run a fresh-context, code-reading pre-mortem critic over the draft Story
|
|
5
|
-
ticket array an Epic's decompose phase produced. Use during Phase 8 of
|
|
6
|
-
`/plan`, after `epic-plan-decompose-author` / `epic-plan-consolidate` write
|
|
7
|
-
`temp/epic-<Epic_ID>/tickets.json` and before `plan-persist.js`
|
|
8
|
-
validates and persists it. Reads the sectioned Epic body AND the cited
|
|
9
|
-
code surfaces, then emits predicted-rework findings before any GitHub write.
|
|
10
|
-
allowed_tools:
|
|
11
|
-
- Read
|
|
12
|
-
- Write
|
|
13
|
-
- Bash
|
|
14
|
-
- Grep
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# epic-plan-premortem
|
|
18
|
-
|
|
19
|
-
## Policy Capsule
|
|
20
|
-
|
|
21
|
-
- Run only after a draft `temp/epic-<Epic_ID>/tickets.json` exists (authored by `epic-plan-decompose-author`, and consolidated by `epic-plan-consolidate` if that pass ran); fail loudly if the draft array is missing. Read the sectioned Epic body from `temp/epic-<Epic_ID>/decomposer-context.json` (the same envelope the author skill consumed) — never re-fetch from GitHub, and never call the GitHub API from this Skill.
|
|
22
|
-
- **You MUST read the actual cited code surfaces.** For every Story, open the files named in its `changes[]` / `references[]` (resolve each path against the repo root; use `Read` / `Grep`) and read enough of each to judge whether the Story's `acceptance[]` is verifiable against the real code and whether its `changes[]` assumptions hold. This is the load-bearing difference between this critic and the structural file-assumption gate: that gate proves a path **exists** (or does not); this critic reads what the file actually **contains**. A pre-mortem that did not open the cited files has not run.
|
|
23
|
-
- Emit exactly one artifact: a human-readable `temp/epic-<Epic_ID>/premortem-report.md` — the predicted-rework findings the operator reviews at the Phase 8 HITL diff. It MUST exist before returning.
|
|
24
|
-
- **This critic never writes to GitHub and never persists `tickets.json`.** It is read-and-report only: it does NOT mutate the draft array, does NOT create issues, and does NOT flip any label. Re-authoring on its findings is the author skill's job (the workflow re-runs `epic-plan-decompose-author` on the report before the persist call).
|
|
25
|
-
- **You are not scope-preserving.** Unlike `epic-plan-consolidate` (merge-and-rewire only), this critic MAY recommend splitting an under-specified Story, tightening or rewording an acceptance criterion, or flagging an over-specified Story — because it only *recommends* in a report; it never applies the change itself. The conservation invariant belongs to consolidation; this pass is deliberately a separate, additive-recommendation lens.
|
|
26
|
-
- Hunt for the three predicted-rework finding classes the structural gates cannot catch: **(1) unverifiable acceptance criteria** (an AC no `verify[]` command or readable code state can prove); **(2) over- or under-specified Stories** (a Story whose `acceptance[]` is far broader or narrower than its `changes[]` footprint and the cited code support); **(3) semantically-wrong assumptions** (the cited file exists but does not contain the seam / export / shape the Story assumes — the file-assumption gate passes, the work would still rework).
|
|
27
|
-
- Log only file/route/Story identifiers and short rationale in the report — never paste full source bodies, persona data, or secret material (per `rules/security-baseline.md` data-leakage MUSTs).
|
|
28
|
-
|
|
29
|
-
## Role
|
|
30
|
-
|
|
31
|
-
Senior Engineer + Architect, acting as a **fresh-context pre-mortem critic** —
|
|
32
|
-
deliberately *separate* from `epic-plan-decompose-author` (the generator) and
|
|
33
|
-
`epic-plan-consolidate` (the scope-preserving merge critic) so it is a
|
|
34
|
-
fresh-context, code-reading review, not a same-pass self-critique. The `/plan`
|
|
35
|
-
workflow delivers that fresh context by **dispatching this skill inside a
|
|
36
|
-
genuine sub-agent** (`Agent` tool, `subagent_type: general-purpose`) at Phase
|
|
37
|
-
8.5, rather than activating it inline in the authoring turn — the sub-agent does
|
|
38
|
-
not inherit the authoring conversation, so its code-reading review is
|
|
39
|
-
independent of the draft it grades.
|
|
40
|
-
|
|
41
|
-
> **Read [`examples.md`](./examples.md) on demand** for the extended rationale:
|
|
42
|
-
> why this critic opens the actual cited code, why it is additive-recommendation
|
|
43
|
-
> (not scope-preserving) unlike consolidation, and the three predicted-rework
|
|
44
|
-
> finding classes in full.
|
|
45
|
-
|
|
46
|
-
## When to use
|
|
47
|
-
|
|
48
|
-
`/plan` Phase 8, as the **8.5 — Planning Pre-Mortem Critic** sub-step:
|
|
49
|
-
after `epic-plan-decompose-author` writes (and, when present,
|
|
50
|
-
`epic-plan-consolidate` consolidates) `temp/epic-<Epic_ID>/tickets.json`, after
|
|
51
|
-
the reachability completeness critic (8.4), and **before**
|
|
52
|
-
`plan-persist.js --tickets …` validates and persists. The pass operates
|
|
53
|
-
on the temp artifact and emits a report so the operator sees predicted rework in
|
|
54
|
-
the Phase 8 HITL diff before the GitHub write; the author re-runs on the
|
|
55
|
-
findings and the deterministic validator runs *after*, so nothing this critic
|
|
56
|
-
surfaces reaches GitHub unreviewed.
|
|
57
|
-
|
|
58
|
-
## Inputs
|
|
59
|
-
|
|
60
|
-
The `/plan` workflow dispatches this skill inside a fresh-context sub-agent,
|
|
61
|
-
passing the Epic ID as the Skill argument. The Skill itself reads:
|
|
62
|
-
|
|
63
|
-
- `temp/epic-<Epic_ID>/tickets.json` — the **draft** (or consolidated) Story
|
|
64
|
-
array. This is the pre-mortem subject.
|
|
65
|
-
- `temp/epic-<Epic_ID>/decomposer-context.json` — the authoring envelope emitted
|
|
66
|
-
by `plan-context.js --epic <Epic_ID>`. Read `epicBody` from it —
|
|
67
|
-
the sectioned Epic body carrying the folded Tech Spec sections
|
|
68
|
-
(there is no separate `techSpec` key — Story #4324).
|
|
69
|
-
- **The repository working tree** — the actual files each Story's `changes[]` /
|
|
70
|
-
`references[]` name. Resolve each path against the repo root and read it.
|
|
71
|
-
|
|
72
|
-
## Outputs
|
|
73
|
-
|
|
74
|
-
- `temp/epic-<Epic_ID>/premortem-report.md` — a human-readable findings report.
|
|
75
|
-
Each finding names its Story, the cited surface it read, the finding class
|
|
76
|
-
(unverifiable-AC / over-or-under-specified / wrong-assumption), a one-line
|
|
77
|
-
rationale grounded in what the file actually contains, and a recommended
|
|
78
|
-
re-authoring action. End with a one-line verdict
|
|
79
|
-
(`findings: N` / `findings: 0 — no predicted rework`).
|
|
80
|
-
|
|
81
|
-
This file MUST exist before the Skill returns. The Skill writes **no** other
|
|
82
|
-
artifact and mutates **no** GitHub state.
|
|
83
|
-
|
|
84
|
-
## Procedure
|
|
85
|
-
|
|
86
|
-
### Step 1 — Load the draft and the spec
|
|
87
|
-
|
|
88
|
-
Read `temp/epic-<Epic_ID>/tickets.json` (the Story array) and
|
|
89
|
-
`temp/epic-<Epic_ID>/decomposer-context.json` (for the `epicBody`). If the
|
|
90
|
-
draft array is missing, fail loudly and instruct the caller to run the
|
|
91
|
-
`epic-plan-decompose-author` Skill first.
|
|
92
|
-
|
|
93
|
-
### Step 2 — Read the cited code surfaces
|
|
94
|
-
|
|
95
|
-
For each Story, collect the paths in its `changes[]` and `references[]`. For
|
|
96
|
-
each path that exists in the working tree, `Read` it (or `Grep` for the specific
|
|
97
|
-
export / seam the Story assumes when the file is large). Build, per Story, a
|
|
98
|
-
short note of what the cited code actually contains versus what the Story's
|
|
99
|
-
`acceptance[]` / `changes[]` assume.
|
|
100
|
-
|
|
101
|
-
### Step 3 — Hunt the three finding classes
|
|
102
|
-
|
|
103
|
-
Across the backlog, surface predicted rework:
|
|
104
|
-
|
|
105
|
-
- **Unverifiable AC** — an acceptance item nothing in `verify[]` (or readable
|
|
106
|
-
code state) can prove. Recommend a concrete verify command or a reworded,
|
|
107
|
-
checkable AC.
|
|
108
|
-
- **Over- / under-specified Story** — `acceptance[]` materially broader or
|
|
109
|
-
narrower than the `changes[]` footprint and the cited code support. Recommend
|
|
110
|
-
a split (under-specified one Story doing the work of several) or a tightening.
|
|
111
|
-
- **Semantically-wrong assumption** — the cited file exists (so the
|
|
112
|
-
file-assumption gate passes) but does not contain the seam, export, function,
|
|
113
|
-
or data shape the Story assumes. Recommend the corrected target or an explicit
|
|
114
|
-
"create the seam first" Story.
|
|
115
|
-
|
|
116
|
-
Record each finding with its Story, cited surface, class, rationale, and
|
|
117
|
-
recommended action.
|
|
118
|
-
|
|
119
|
-
### Step 4 — Write the report
|
|
120
|
-
|
|
121
|
-
Write all findings to `temp/epic-<Epic_ID>/premortem-report.md` with the verdict
|
|
122
|
-
line. Paste identifiers and short rationale only — never full source bodies.
|
|
123
|
-
|
|
124
|
-
### Step 5 — Hand back to `/plan`
|
|
125
|
-
|
|
126
|
-
Return control. The workflow shows the operator the pre-mortem report at the
|
|
127
|
-
Phase 8 HITL diff; on operator approval it re-runs
|
|
128
|
-
`epic-plan-decompose-author` on the findings **before** the persist call
|
|
129
|
-
(`node .agents/scripts/plan-persist.js --epic <Epic_ID> --tickets
|
|
130
|
-
temp/epic-<Epic_ID>/tickets.json`). This Skill itself persists nothing.
|
|
131
|
-
|
|
132
|
-
## Constraints
|
|
133
|
-
|
|
134
|
-
- Do **not** call the GitHub API from this Skill. It reads temp artifacts plus
|
|
135
|
-
the working tree and writes one temp report; persistence belongs to the
|
|
136
|
-
script, re-authoring belongs to `epic-plan-decompose-author`.
|
|
137
|
-
- Do **not** write outside `temp/epic-<Epic_ID>/`, and do **not** mutate
|
|
138
|
-
`temp/epic-<Epic_ID>/tickets.json` — this critic is report-only.
|
|
139
|
-
- Do **not** log full source bodies, persona data, or secrets into the report
|
|
140
|
-
(per `rules/security-baseline.md`). Identifiers and short rationale only.
|
|
141
|
-
- If `temp/epic-<Epic_ID>/tickets.json` is missing, fail loudly and instruct the
|
|
142
|
-
caller to run the `epic-plan-decompose-author` Skill first.
|
|
143
|
-
- The validator
|
|
144
|
-
([`lib/orchestration/ticket-validator.js`](../../../scripts/lib/orchestration/ticket-validator.js))
|
|
145
|
-
remains the authoritative post-re-author gate. This critic surfaces
|
|
146
|
-
*semantic* rework the structural validator cannot — it does not replace it.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# epic-plan-premortem — examples & extended rationale
|
|
2
|
-
|
|
3
|
-
Read this file on demand. The SKILL.md carries the operating contract (Policy
|
|
4
|
-
Capsule, Inputs / Outputs, Procedure, Constraints); this file carries the
|
|
5
|
-
extended rationale behind the pre-mortem critic — why it is a separate,
|
|
6
|
-
fresh-context, code-reading pass and how its three predicted-rework finding
|
|
7
|
-
classes differ from the structural gates.
|
|
8
|
-
|
|
9
|
-
## Why a separate fresh-context code-reading critic
|
|
10
|
-
|
|
11
|
-
This Skill acts as a Senior Engineer + Architect in the role of a
|
|
12
|
-
**fresh-context pre-mortem critic**. It is deliberately *separate* from
|
|
13
|
-
`epic-plan-decompose-author` (the generator) and from `epic-plan-consolidate`
|
|
14
|
-
(the scope-preserving merge critic): a same-pass self-critique is the weak mode
|
|
15
|
-
this is built to escape. The generator maps Epic capabilities to Stories
|
|
16
|
-
against the spec text; this critic opens the **actual cited code** and asks "if
|
|
17
|
-
I tried to deliver this exact backlog, where would it rework?" — before any
|
|
18
|
-
GitHub write makes the rework expensive.
|
|
19
|
-
|
|
20
|
-
**You MUST read the actual cited code surfaces.** This is the load-bearing
|
|
21
|
-
difference between this critic and the structural file-assumption gate: that
|
|
22
|
-
gate proves a path **exists** (or does not); this critic reads what the file
|
|
23
|
-
actually **contains**. A pre-mortem that did not open the cited files has not
|
|
24
|
-
run.
|
|
25
|
-
|
|
26
|
-
## Not scope-preserving (unlike consolidation)
|
|
27
|
-
|
|
28
|
-
Unlike `epic-plan-consolidate` (merge-and-rewire only), this critic MAY
|
|
29
|
-
recommend splitting an under-specified Story, tightening or rewording an
|
|
30
|
-
acceptance criterion, or flagging an over-specified Story — because it only
|
|
31
|
-
*recommends* in a report; it never applies the change itself. The conservation
|
|
32
|
-
invariant belongs to consolidation; this pass is deliberately a separate,
|
|
33
|
-
additive-recommendation lens. It never writes to GitHub, never persists
|
|
34
|
-
`tickets.json`, and never flips a label — re-authoring on its findings is the
|
|
35
|
-
author skill's job (the workflow re-runs `epic-plan-decompose-author` on the
|
|
36
|
-
report before the persist call).
|
|
37
|
-
|
|
38
|
-
## The three predicted-rework finding classes
|
|
39
|
-
|
|
40
|
-
Hunt for the three classes the structural gates cannot catch:
|
|
41
|
-
|
|
42
|
-
1. **Unverifiable acceptance criteria** — an AC no `verify[]` command or
|
|
43
|
-
readable code state can prove. Recommend a concrete verify command or a
|
|
44
|
-
reworded, checkable AC.
|
|
45
|
-
2. **Over- or under-specified Stories** — a Story whose `acceptance[]` is far
|
|
46
|
-
broader or narrower than its `changes[]` footprint and the cited code
|
|
47
|
-
support. Recommend a split (under-specified: one Story doing the work of
|
|
48
|
-
several) or a tightening.
|
|
49
|
-
3. **Semantically-wrong assumptions** — the cited file exists (so the
|
|
50
|
-
file-assumption gate passes) but does not contain the seam / export /
|
|
51
|
-
function / data shape the Story assumes — the file-assumption gate passes,
|
|
52
|
-
the work would still rework. Recommend the corrected target or an explicit
|
|
53
|
-
"create the seam first" Story.
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: epic-plan-spec-author
|
|
3
|
-
description: >-
|
|
4
|
-
Author the Tech Spec, Acceptance Table markdown, and risk-verdict JSON
|
|
5
|
-
for an Epic from the planner authoring context emitted by
|
|
6
|
-
`plan-context.js --epic <Epic_ID>`. Use during Phase 7 of `/plan` when
|
|
7
|
-
the host LLM needs to write the three artifacts before `plan-persist.js`
|
|
8
|
-
folds them into the Epic body's managed sections.
|
|
9
|
-
allowed_tools:
|
|
10
|
-
- Read
|
|
11
|
-
- Write
|
|
12
|
-
- Bash
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# epic-plan-spec-author
|
|
16
|
-
|
|
17
|
-
> **PRD retired (Story #4314).** The `context::prd` PRD artifact class was
|
|
18
|
-
> retired; this Skill no longer authors `prd.md`. Its one novel section —
|
|
19
|
-
> User Stories — now lives inline in the Epic body under a `## User Stories`
|
|
20
|
-
> heading, which is the requirements input. Both the Tech Spec and the
|
|
21
|
-
> Acceptance Spec now consume the Epic body directly (Context / Goal / Scope /
|
|
22
|
-
> User Stories) rather than a paraphrased PRD.
|
|
23
|
-
>
|
|
24
|
-
> **Context tickets retired (Story #4324).** The `context::tech-spec` /
|
|
25
|
-
> `context::acceptance-spec` ticket classes are retired too. The artifacts
|
|
26
|
-
> this Skill authors still land in `temp/epic-<Epic_ID>/` under the same
|
|
27
|
-
> filenames, but the persist half folds them into **managed sections of the
|
|
28
|
-
> Epic body** — the `## Delivery Slicing`-led Tech Spec sections and the
|
|
29
|
-
> `## Acceptance Table` AC-ID table — instead of creating separate tickets.
|
|
30
|
-
> On a re-plan, the Epic body's existing sections are the previous-spec
|
|
31
|
-
> input (that is how AC IDs stay stable across re-plans).
|
|
32
|
-
|
|
33
|
-
## Policy Capsule
|
|
34
|
-
|
|
35
|
-
- Run only during `/plan` Phase 7, after `plan-context.js --epic <Epic_ID>` has written `temp/epic-<Epic_ID>/planner-context.json`; fail loudly if the file is missing rather than fabricating context.
|
|
36
|
-
- Write exactly three artifacts and only inside `temp/epic-<Epic_ID>/`: `techspec.md`, `risk-verdict.json`, `acceptance-spec.md`. All three MUST exist on disk before returning.
|
|
37
|
-
- **Re-emit rule (amend, don't regenerate — Story #4431).** On a re-emit — the Phase 7 persist call rejecting an artifact (e.g. a missing `## Delivery Slicing` heading, a schema-invalid risk verdict) — apply **targeted edits** to the existing `temp/epic-<Epic_ID>/` artifact that fix only what the rejection named; do NOT rewrite an artifact wholesale from a blank draft. `helpers/plan-epic.md` bounds this to **one refinement pass** per invocation (the same shape as the Epic Clarity Gate's own "one refinement pass per invocation" contract) — do not loop.
|
|
38
|
-
- Start each markdown artifact at the correct `##` heading (Tech Spec → `## Delivery Slicing`, Acceptance Spec → `## Acceptance Table` — never the Epic's own `## Acceptance Criteria` heading, which stays the ideation bullets) — never emit a top-level `#` heading. `risk-verdict.json` is raw JSON conforming to `.agents/schemas/risk-verdict.schema.json`.
|
|
39
|
-
- The Tech Spec MUST open with `## Delivery Slicing` and MUST NOT restate the Epic's Context, Goal, or Scope — your output lands as sections of the same Epic body, which travels into every downstream story agent's prompt, so any restatement is duplication and a drift risk. A `## Technical Overview` section is optional and, when present, is a 2–3 sentence orientation of the *technical approach* only (which subsystems are touched and reused), never a re-narration of the problem statement, goals, or scope.
|
|
40
|
-
- Judge risk from what the change *does* (the Epic body / Tech Spec you just wrote), never from keyword presence — "out of scope: billing" is not a billing change; "rotate the credential vault" is high-risk even without a security keyword.
|
|
41
|
-
- The Tech Spec MUST carry a `## Delivery Slicing` section proposing how the Epic's enumerated capabilities cluster into N shippable Stories — the intentional grouping the Phase 8 consolidation pass (`epic-plan-consolidate`) reconciles the decomposer draft against. The proposed count is a **ceiling, not a target**: consolidation may merge below it when slices form dependent single-consumer chains, but never splits above it. Mark a slice "Independent? No" only with a one-line justification (parallelism, risk isolation, or delivery-envelope pressure); an unjustified dependent single-consumer slice folds into its consumer. Do NOT coarsen the Epic enumeration to produce it; the grouping recommendation is the granularity lever.
|
|
42
|
-
- Cite real module / file names from `codebaseSnapshot.files` and `codebaseSnapshot.signatures` before citing docs-only names; flag any cited path that is missing from the snapshot with a `<!-- DRIFT -->` callout.
|
|
43
|
-
- Assign stable AC IDs of the form `AC-<n>` in document order; reuse existing IDs across re-plans when Outcome wording is materially unchanged and tag every row's `Disposition` with one of `new | updated | unchanged`.
|
|
44
|
-
- Render the AC table with the canonical columns `AC ID | Outcome | Feature File | Scenario | Disposition`; when `bddScenarios` is non-empty, run `findBestScenarioMatch` per AC and annotate matched rows with `<file>:L<line>` (never tag a covered outcome as `new`).
|
|
45
|
-
- Emit a `Runner Verification` line directly under the AC table reflecting the `bddRunner` envelope (`<runner> supports <pendingTag>` when supported, or `Fallback: dependencies-first ordering (reason: …)` on fallback).
|
|
46
|
-
- Each AC Outcome MUST describe a single user-visible behaviour — no DB assertions, HTTP status codes, or implementation details — and MUST NOT prescribe a commit subject that starts with a non-Conventional-Commits prefix (the literal `baseline-refresh:` prefix is forbidden; use a body trailer instead).
|
|
47
|
-
- Do not mutate GitHub issues from this Skill; persistence is the script's job. Reads MAY span anything `docsContext` references plus the planner-context JSON.
|
|
48
|
-
- Respect the planning-context budget: when `epic.body` is `null` but `epic.bodySummary` is present, work from the summary instead of re-fetching the full body.
|
|
49
|
-
|
|
50
|
-
## Role
|
|
51
|
-
|
|
52
|
-
Engineering Architect + Risk Assessor + Acceptance Engineer (three authoring
|
|
53
|
-
roles, one Skill — the Architect persona consumes the Epic body to produce the
|
|
54
|
-
Tech Spec; the Risk Assessor judges the change the Epic and Tech Spec describe
|
|
55
|
-
to produce the risk verdict; the Acceptance Engineer consumes the Epic body and
|
|
56
|
-
the Tech Spec to produce the Acceptance Spec).
|
|
57
|
-
|
|
58
|
-
## When to use
|
|
59
|
-
|
|
60
|
-
`/plan` Phase 7, immediately after `plan-context.js --epic <Epic_ID>`
|
|
61
|
-
writes `temp/epic-<Epic_ID>/planner-context.json`. This Skill replaces the
|
|
62
|
-
inline "Author the Tech Spec" step from the legacy workflow body — the calling
|
|
63
|
-
workflow dispatches this Skill via the `Skill` tool, supplies the Epic ID, and
|
|
64
|
-
on completion has `temp/epic-<Epic_ID>/techspec.md`,
|
|
65
|
-
`temp/epic-<Epic_ID>/risk-verdict.json`, and
|
|
66
|
-
`temp/epic-<Epic_ID>/acceptance-spec.md` ready for the persist half of
|
|
67
|
-
the script.
|
|
68
|
-
|
|
69
|
-
## Inputs
|
|
70
|
-
|
|
71
|
-
The dispatcher passes the Epic ID as the Skill argument. The Skill itself
|
|
72
|
-
reads:
|
|
73
|
-
|
|
74
|
-
- `temp/epic-<Epic_ID>/planner-context.json` — produced by
|
|
75
|
-
`node .agents/scripts/plan-context.js --epic <Epic_ID>`.
|
|
76
|
-
Fields:
|
|
77
|
-
- `epic.id`, `epic.title`, `epic.body` (or `epic.bodySummary` when the
|
|
78
|
-
planning-context budget downgrades the body to a summary)
|
|
79
|
-
- `docsContext` — digest-first (Story #4433, hard cutover of the § 3.1
|
|
80
|
-
planning read contract): `{ mode: 'digest', digestPath }` pointing at
|
|
81
|
-
the per-Epic docs digest (`<tempRoot>/epic-<Epic_ID>/docs-digest.md` —
|
|
82
|
-
the same file the `/deliver` story sub-agents already consume, Story
|
|
83
|
-
#4338 / #4324), or `null` when `project.docsContextFiles` is unset. Read
|
|
84
|
-
the digest at `digestPath` for "how does the codebase do X today?"
|
|
85
|
-
orientation (path, byte size, heading outline with line numbers, first
|
|
86
|
-
paragraph per `##` section), then pull the full file on demand with your
|
|
87
|
-
own Read tool — jump straight to the line the digest names — only when a
|
|
88
|
-
section bears on the spec. There is no full-content `items[]` field;
|
|
89
|
-
embedding whole/summarized doc bodies in this envelope was retired in
|
|
90
|
-
the same cutover that made the `/deliver` children digest-first.
|
|
91
|
-
- `codebaseSnapshot` — Story #2634 structural view of the consumer repo
|
|
92
|
-
(file tree, `package.json` exports + scripts, recently-touched
|
|
93
|
-
directories, detected test runner + BDD feature roots, and — at the
|
|
94
|
-
`medium` tier — per-file export signatures). Prefer module / file
|
|
95
|
-
names that appear in this snapshot over names that appear only in
|
|
96
|
-
the docs digest; the docs may be stale relative to the actual
|
|
97
|
-
source tree. When the spec needs to cite a file that is **not** in
|
|
98
|
-
`codebaseSnapshot.files`, surface that as a `<!-- DRIFT -->` callout
|
|
99
|
-
in the Tech Spec body naming the cited path, so the freshness gate
|
|
100
|
-
(Story #2635) has prose context for the operator to read.
|
|
101
|
-
- `codebaseSnapshot.grounding` (Story #4139) — operator-visible
|
|
102
|
-
grounding signals derived before you author:
|
|
103
|
-
- `grounding.truncation` — non-null when the snapshot dropped files
|
|
104
|
-
(the skinny-tier cap kept only the first ~250 of N matched files).
|
|
105
|
-
Carries `{ dropped, matched, shown, tier, remedies[] }`. When it is
|
|
106
|
-
present, the file tree you see is **partial** — do not assume a
|
|
107
|
-
module is absent just because it is missing from
|
|
108
|
-
`codebaseSnapshot.files`; raise the partiality in a `<!-- DRIFT -->`
|
|
109
|
-
callout and prefer the `medium` tier (or a narrowed `include`) for
|
|
110
|
-
a grounded spec.
|
|
111
|
-
- `grounding.citedButAbsent[]` — paths the Epic body already cites
|
|
112
|
-
that are **not** in the snapshot and are not phrased as net-new.
|
|
113
|
-
Treat each as a likely drift signal: confirm the path exists (it may
|
|
114
|
-
have been dropped by truncation) or mark it net-new explicitly in
|
|
115
|
-
the spec so the post-author freshness gate does not flag it.
|
|
116
|
-
- `systemPrompts.techSpec` and `systemPrompts.acceptanceSpec` — the
|
|
117
|
-
**authoritative** rendered system prompts (single-sourced in
|
|
118
|
-
`lib/templates/spec-author-prompts.js`). Apply them verbatim; the
|
|
119
|
-
procedure below describes how to use them, it does not restate them.
|
|
120
|
-
- `bddRunner` — BDD runner pending-tag verification result. Shape:
|
|
121
|
-
`{ runner, pendingTag, supported, fallback, reason? }`. When
|
|
122
|
-
`supported: true`, render the verified `pendingTag` in the
|
|
123
|
-
acceptance-spec body so the features-first Story can scaffold
|
|
124
|
-
`.feature` files with that exact tag. When `fallback: true`, render
|
|
125
|
-
`"Fallback: dependencies-first ordering"` and omit the pending-tag
|
|
126
|
-
line — Phase 8 reverts to topological ordering.
|
|
127
|
-
- `bddScenarios` — Story #2637 scenario index for the project's
|
|
128
|
-
existing `.feature` files. Each row is
|
|
129
|
-
`{ file, line, scenarioTitle, tags, outcomeKeywords }`. Empty array
|
|
130
|
-
means the project has not adopted BDD; degrade silently and proceed
|
|
131
|
-
as before. Non-empty means the Acceptance Engineer step MUST run
|
|
132
|
-
`findBestScenarioMatch` for each planned AC and annotate the
|
|
133
|
-
Disposition column accordingly (see Step 4).
|
|
134
|
-
Planning risk is **not** an input — this Skill authors it. The risk
|
|
135
|
-
verdict (`risk-verdict.json`, Step 3 below) is one of the three planning
|
|
136
|
-
artifacts; the persist half validates it against
|
|
137
|
-
`.agents/schemas/risk-verdict.schema.json` and derives the deterministic
|
|
138
|
-
`planningRisk` envelope (`deriveRiskEnvelope`) that drives gate routing
|
|
139
|
-
and the acceptance disposition (Epic #3865).
|
|
140
|
-
|
|
141
|
-
## Outputs
|
|
142
|
-
|
|
143
|
-
- `temp/epic-<Epic_ID>/techspec.md` — Tech Spec markdown starting with
|
|
144
|
-
`## Delivery Slicing` (no `<h1>`; an optional 2–3 sentence
|
|
145
|
-
`## Technical Overview` may follow, never restating Epic context).
|
|
146
|
-
- `temp/epic-<Epic_ID>/risk-verdict.json` — planner risk verdict JSON
|
|
147
|
-
conforming to `.agents/schemas/risk-verdict.schema.json`:
|
|
148
|
-
`{ axes: [{ axis, level, rationale }], summary }`.
|
|
149
|
-
- `temp/epic-<Epic_ID>/acceptance-spec.md` — Acceptance Spec markdown
|
|
150
|
-
starting with `## Acceptance Table` (no `<h1>`).
|
|
151
|
-
|
|
152
|
-
All three files MUST exist on disk before this Skill returns control. The
|
|
153
|
-
caller will invoke
|
|
154
|
-
`plan-persist.js --epic <Epic_ID> --tech-spec ... --risk-verdict ... --acceptance-table ...`
|
|
155
|
-
next, and the persist half will fail loudly if any file is missing, empty,
|
|
156
|
-
or (for the verdict) schema-invalid.
|
|
157
|
-
|
|
158
|
-
## Procedure
|
|
159
|
-
|
|
160
|
-
### Step 1 — Load the context
|
|
161
|
-
|
|
162
|
-
Read `temp/epic-<Epic_ID>/planner-context.json` with the `Read` tool. Pull
|
|
163
|
-
the Epic title, body (or body summary, including the Epic's `## User Stories`
|
|
164
|
-
section), and the `docsContext` digest pointer (`digestPath`, or `null`).
|
|
165
|
-
When non-null, read the digest file at `digestPath` next — that outline,
|
|
166
|
-
not the planner-context envelope, is where the actual doc orientation
|
|
167
|
-
lives; pull a full doc on demand only when a section looks relevant.
|
|
168
|
-
|
|
169
|
-
### Step 2 — Author the Tech Spec (Engineering Architect persona)
|
|
170
|
-
|
|
171
|
-
Apply the Tech Spec system prompt below to the Epic body (Context / Goal /
|
|
172
|
-
Scope / User Stories), the docs digest (plus any full file pulled on
|
|
173
|
-
demand), and the `codebaseSnapshot` envelope (so the spec is
|
|
174
|
-
grounded in the actual codebase, not hallucinated patterns). Cite module
|
|
175
|
-
and file names from `codebaseSnapshot.files` / `codebaseSnapshot.signatures`
|
|
176
|
-
before reaching for names that appear only in the documentation. Write to
|
|
177
|
-
`temp/epic-<Epic_ID>/techspec.md`. The Tech Spec MUST:
|
|
178
|
-
|
|
179
|
-
- **Open with `## Delivery Slicing`** (see below) — never a top-level `#`
|
|
180
|
-
heading, and never an Epic-context recap. The Delivery Slicing section is
|
|
181
|
-
the primary input to Phase 8 consolidation, so author it first and hang the
|
|
182
|
-
rest of the spec off it.
|
|
183
|
-
- **Do NOT restate the Epic's Context, Goal, or Scope.** The Epic body always
|
|
184
|
-
travels alongside the Tech Spec into every downstream story agent's prompt,
|
|
185
|
-
so restating the problem statement, goals, or scope is pure duplication
|
|
186
|
-
(~300–500 tokens per Epic) and a drift risk. A `## Technical Overview`
|
|
187
|
-
section is **optional**; when you include one, cap it at 2–3 sentences that
|
|
188
|
-
orient the reader on the *technical approach* only (which subsystems are
|
|
189
|
-
touched and reused) — never re-narrate the problem, goals, or scope.
|
|
190
|
-
- Cover Architecture & Design, Data Models (if any), API Changes (if any),
|
|
191
|
-
Core Components, Security & Privacy Considerations.
|
|
192
|
-
- Cite the source files / modules it touches by relative path. Avoid
|
|
193
|
-
pseudocode — name real symbols when proposing edits.
|
|
194
|
-
|
|
195
|
-
#### Delivery Slicing section (authoritative ceiling for Phase 8 consolidation)
|
|
196
|
-
|
|
197
|
-
The Tech Spec MUST carry a `## Delivery Slicing` section proposing how the
|
|
198
|
-
Epic's enumerated capabilities **cluster into N shippable Stories** — the
|
|
199
|
-
intentional grouping the Phase 8 consolidation pass
|
|
200
|
-
([`epic-plan-consolidate`](../epic-plan-consolidate/SKILL.md)) reconciles the
|
|
201
|
-
decomposer draft against before any GitHub write. Author it as a table (one row
|
|
202
|
-
per slice: `Slice | What ships | Independent?`), using **noun-phrase** slice
|
|
203
|
-
names, and **write it before any other section** — it is the primary input to
|
|
204
|
-
consolidation and the section the model most often omits when it drafts it last.
|
|
205
|
-
|
|
206
|
-
- **The count is a ceiling, not a target.** Consolidation may merge below it
|
|
207
|
-
(dependent single-consumer chains) but never splits above it.
|
|
208
|
-
- **"Independent?"** answers: can this slice ship to production and provide
|
|
209
|
-
value without the next slice landing? Mark a slice `No` only with a one-line
|
|
210
|
-
justification (parallelism, risk isolation, or delivery-envelope pressure);
|
|
211
|
-
an unjustified dependent single-consumer slice folds into its consumer.
|
|
212
|
-
- Do **not** coarsen the Epic's capability enumeration to produce the slicing;
|
|
213
|
-
the grouping recommendation is the granularity lever.
|
|
214
|
-
|
|
215
|
-
> **Read [`examples.md`](./examples.md) on demand** for the worked Delivery
|
|
216
|
-
> Slicing table and the extended rationale behind these rules (what
|
|
217
|
-
> "Independent?" means, why an unjustified `No` slice is a smell, and how the
|
|
218
|
-
> consolidation pass degrades gracefully when the section is absent).
|
|
219
|
-
|
|
220
|
-
Apply the `systemPrompts.techSpec` string from the emitted envelope verbatim —
|
|
221
|
-
it is the single source (rendered from `lib/templates/spec-author-prompts.js`).
|
|
222
|
-
It fixes the section order (Delivery Slicing first as the Phase 8 ceiling, then
|
|
223
|
-
Architecture, Data Models, API Changes, Core Components, Security), forbids
|
|
224
|
-
`<h1>` and any restatement of Epic Context/Goal/Scope, and mandates the
|
|
225
|
-
`Slice | What ships | Independent?` table with a justification on every
|
|
226
|
-
`Independent? No` row. Do not re-transcribe it here.
|
|
227
|
-
|
|
228
|
-
### Step 3 — Author the risk verdict (Risk Assessor persona)
|
|
229
|
-
|
|
230
|
-
Judge the change described by the Epic body and Tech Spec you just wrote —
|
|
231
|
-
grounded in `codebaseSnapshot` where it helps — and write
|
|
232
|
-
`temp/epic-<Epic_ID>/risk-verdict.json` with the `Write` tool. The file
|
|
233
|
-
MUST be valid JSON conforming to
|
|
234
|
-
`.agents/schemas/risk-verdict.schema.json`:
|
|
235
|
-
|
|
236
|
-
```json
|
|
237
|
-
{
|
|
238
|
-
"axes": [
|
|
239
|
-
{ "axis": "<axis>", "level": "low|medium|high", "rationale": "<why>" }
|
|
240
|
-
],
|
|
241
|
-
"summary": "<one-paragraph overall risk narrative>"
|
|
242
|
-
}
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Axis vocabulary (fixed — the schema rejects anything else):
|
|
246
|
-
|
|
247
|
-
- **Required axes** (presence forces a `required` acceptance disposition):
|
|
248
|
-
`visible-behavior`, `public-api`, `security`, `data-migration`,
|
|
249
|
-
`billing`, `destructive-mutation`, `critical-workflow`.
|
|
250
|
-
- **Not-applicable axes** (when they are the only signals, the acceptance
|
|
251
|
-
spec is waived): `docs-only`, `test-harness`, `internal-refactor`.
|
|
252
|
-
|
|
253
|
-
Authoring rules:
|
|
254
|
-
|
|
255
|
-
- Include an axis only when the change **genuinely exercises it** — judge
|
|
256
|
-
what the Epic *does*, not which words appear in it. An Epic that says
|
|
257
|
-
"out of scope: billing" carries no `billing` axis; an Epic that rotates
|
|
258
|
-
a credential vault carries `security` even if the word never appears.
|
|
259
|
-
- `level` reflects blast radius and reversibility of *this* change on
|
|
260
|
-
*that* axis. `rationale` cites the Epic / Tech Spec section or code
|
|
261
|
-
surface that justifies the entry — never an empty self-attestation.
|
|
262
|
-
- An empty `axes` array is a deliberate assertion that no recognized risk
|
|
263
|
-
axis applies (derives an all-low, auto-proceed envelope) — use it only
|
|
264
|
-
when you can defend that in `summary`.
|
|
265
|
-
- The harness owns the gate: the persist half derives `overallLevel` /
|
|
266
|
-
`requiresReview` / `acceptanceDisposition` / `gateDecision`
|
|
267
|
-
deterministically from your axes (`deriveRiskEnvelope`). You supply
|
|
268
|
-
judgment, not control flow.
|
|
269
|
-
|
|
270
|
-
The derivation rules you are feeding (so you can anticipate the
|
|
271
|
-
disposition Step 4 must honor): any required axis ⇒ acceptance spec
|
|
272
|
-
`required`; otherwise any `medium` level ⇒ `recommended`; otherwise
|
|
273
|
-
only not-applicable axes (or no axes) ⇒ `not-applicable` (waived).
|
|
274
|
-
|
|
275
|
-
### Step 4 — Author the Acceptance Spec (Acceptance Engineer persona)
|
|
276
|
-
|
|
277
|
-
Apply the Acceptance Spec system prompt below to the Epic body + Tech Spec just
|
|
278
|
-
written, plus the **existing BDD scenario index** from
|
|
279
|
-
`bddScenarios` on the planner-context envelope (Story #2637). The
|
|
280
|
-
scenario index is the output of
|
|
281
|
-
[`lib/bdd-scenario-scanner.js#scanBddScenarios`](../../../scripts/lib/bdd-scenario-scanner.js)
|
|
282
|
-
and carries one row per `.feature` scenario found under the project's
|
|
283
|
-
canonical BDD roots, with `{ file, line, scenarioTitle, tags,
|
|
284
|
-
outcomeKeywords }`. Before emitting each AC row, run
|
|
285
|
-
`findBestScenarioMatch(<AC outcome>, bddScenarios)`: when a match is
|
|
286
|
-
found, annotate the AC's `Scenario` column with `<file>:L<line>` and
|
|
287
|
-
set `Disposition` to `unchanged` (carried through verbatim) or
|
|
288
|
-
`refined` (Outcome wording adjusted but the scenario already covers the
|
|
289
|
-
behaviour) — never `new` for an AC whose outcome is already proven by
|
|
290
|
-
an existing scenario. When `bddScenarios` is empty (the project has not
|
|
291
|
-
adopted BDD), proceed exactly as before with no annotation.
|
|
292
|
-
|
|
293
|
-
Branch on the acceptance disposition your Step 3 verdict derives (see the
|
|
294
|
-
derivation rules there): `required` and `recommended` author the spec
|
|
295
|
-
normally per the rules below. `not-applicable` authorizes the persist half
|
|
296
|
-
to apply `acceptance::n-a` on the Epic; in that case write a one-paragraph
|
|
297
|
-
waiver rationale to `temp/epic-<Epic_ID>/acceptance-spec.md` instead of
|
|
298
|
-
the AC table so the audit trail still exists, and start the file with
|
|
299
|
-
`## Acceptance Table — waived (planner-selected)`.
|
|
300
|
-
|
|
301
|
-
Write to `temp/epic-<Epic_ID>/acceptance-spec.md`. The Acceptance Spec
|
|
302
|
-
MUST:
|
|
303
|
-
|
|
304
|
-
- Start with `## Acceptance Table` — never a top-level `#` heading, and
|
|
305
|
-
never the Epic's own `## Acceptance Criteria` heading (the table lands
|
|
306
|
-
as a section of the same Epic body).
|
|
307
|
-
- Render the AC table with the canonical column shape documented in Tech
|
|
308
|
-
Spec #2083: `| AC ID | Outcome | Feature File | Scenario | Disposition |`.
|
|
309
|
-
- **Key each `Outcome` off a specific Epic `## Acceptance Criteria`
|
|
310
|
-
bullet** — the Epic body's AC bullets are the single source of truth, so
|
|
311
|
-
the `Outcome` column is a **terse restatement anchored to one Epic
|
|
312
|
-
bullet**, not an independent re-elaboration. Lead each `Outcome` with its
|
|
313
|
-
anchor (the bullet's quoted lead phrase or an explicit `Epic AC N` index),
|
|
314
|
-
then state the single user-visible behaviour. A free-standing `Outcome`
|
|
315
|
-
that paraphrases a criterion in new words without naming the Epic bullet
|
|
316
|
-
it verifies is the drift this rule exists to prevent — it decouples the
|
|
317
|
-
spec from the Epic silently.
|
|
318
|
-
- **Split case (one Epic AC → several rows).** When one Epic AC bullet
|
|
319
|
-
genuinely expands into several user-visible outcomes, emit one row per
|
|
320
|
-
outcome and **declare the split on each** row (e.g. lead with
|
|
321
|
-
`splits Epic AC 3`) so the fan-out is explicit, not hidden.
|
|
322
|
-
- **Flag divergence, do not absorb it.** Anchor coverage MUST be complete
|
|
323
|
-
and auditable: every Epic AC bullet is covered by at least one row and
|
|
324
|
-
every row anchors to an Epic bullet. Call out any Epic AC bullet with
|
|
325
|
-
**no** corresponding row, and any AC row with **no** Epic anchor, in a
|
|
326
|
-
note directly beneath the AC table — surfacing spec/Epic divergence at
|
|
327
|
-
authoring time. Never silently drop an uncovered Epic bullet or emit an
|
|
328
|
-
unanchored row.
|
|
329
|
-
- Use **stable AC IDs** of the form `AC-1`, `AC-2`, … assigned in document
|
|
330
|
-
order. On re-plan, reuse the ID for any AC whose Outcome text is
|
|
331
|
-
materially unchanged; new ACs receive fresh sequential IDs (existing
|
|
332
|
-
IDs do not shift).
|
|
333
|
-
- Tag every row's `Disposition` with one of the canonical enum values:
|
|
334
|
-
`new` (first appearance), `updated` (Outcome text or Scenario reshaped
|
|
335
|
-
vs. prior plan), `unchanged` (carried through verbatim from prior plan).
|
|
336
|
-
- Cite proposed feature files under `tests/features/**` by relative path
|
|
337
|
-
so the Phase 8 features-first Story can scaffold the matching scenarios.
|
|
338
|
-
- Render a **Runner Verification** line directly under the AC table that
|
|
339
|
-
records what `bddRunner` from the planner-context envelope reports:
|
|
340
|
-
- `supported: true` → write
|
|
341
|
-
`Runner Verification: <runner> supports <pendingTag>` (e.g.
|
|
342
|
-
`playwright-bdd supports @skip`). The features-first Story will tag
|
|
343
|
-
pending scenarios with this exact string.
|
|
344
|
-
- `fallback: true` → write
|
|
345
|
-
`Runner Verification: Fallback: dependencies-first ordering (reason: <reason>)`.
|
|
346
|
-
Phase 8 still proceeds; AC reconciliation defers to dependency order.
|
|
347
|
-
|
|
348
|
-
Apply the `systemPrompts.acceptanceSpec` string from the emitted envelope
|
|
349
|
-
verbatim — it is the single source (rendered from
|
|
350
|
-
`lib/templates/spec-author-prompts.js`). It mandates the
|
|
351
|
-
`AC ID | Outcome | Feature File | Scenario | Disposition` table, stable
|
|
352
|
-
`AC-<n>` IDs that survive re-plans, one Outcome per user-visible behaviour
|
|
353
|
-
anchored to a specific Epic `## Acceptance Criteria` bullet, complete and
|
|
354
|
-
auditable anchor coverage, and Conventional-Commits subjects (no
|
|
355
|
-
`baseline-refresh` subject prefix). Do not re-transcribe it here.
|
|
356
|
-
|
|
357
|
-
### Step 5 — Hand back to `/plan`
|
|
358
|
-
|
|
359
|
-
All three files exist; return. The caller will run
|
|
360
|
-
`node .agents/scripts/plan-persist.js --epic <Epic_ID>
|
|
361
|
-
--tech-spec temp/epic-<Epic_ID>/techspec.md
|
|
362
|
-
--risk-verdict temp/epic-<Epic_ID>/risk-verdict.json
|
|
363
|
-
--acceptance-table temp/epic-<Epic_ID>/acceptance-spec.md`, which validates
|
|
364
|
-
the risk verdict, derives the planningRisk envelope, folds the authored
|
|
365
|
-
content into the Epic body's managed sections (`## Delivery Slicing`-led
|
|
366
|
-
Tech Spec sections + the `## Acceptance Table`), records the
|
|
367
|
-
`risk-verdict` structured comment, flips the Epic to
|
|
368
|
-
`agent::review-spec`, and cleans up the temp files. No context tickets
|
|
369
|
-
are created (Story #4324).
|
|
370
|
-
|
|
371
|
-
## Constraints
|
|
372
|
-
|
|
373
|
-
- Do **not** modify GitHub issues from this Skill. Persistence is the
|
|
374
|
-
script's job; the Skill is pure markdown authoring.
|
|
375
|
-
- Do **not** open files outside `temp/epic-<Epic_ID>/` for write. Reads
|
|
376
|
-
may cover anything `docsContext` references plus the planner-context
|
|
377
|
-
JSON itself.
|
|
378
|
-
- If `temp/epic-<Epic_ID>/planner-context.json` is missing, **fail
|
|
379
|
-
loudly** — instruct the caller to run `--emit-context` first. Do not
|
|
380
|
-
silently fabricate a context.
|
|
381
|
-
- Respect the planning-context budget: when `epic.body` is `null` and
|
|
382
|
-
`epic.bodySummary` is present, work from the summary rather than
|
|
383
|
-
re-fetching the full body. The budget cap is deliberate.
|