mandrel 1.93.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/acceptance-critic.md +129 -0
- package/.agents/agents/story-worker.md +161 -0
- package/.agents/docs/SDLC.md +489 -1285
- package/.agents/docs/agentrc-reference.json +177 -67
- package/.agents/docs/configuration.md +108 -136
- package/.agents/docs/execution-reference.md +44 -22
- package/.agents/docs/quality-gates.md +13 -19
- package/.agents/docs/workflows.md +3 -3
- package/.agents/instructions.md +107 -108
- package/.agents/rules/ci-remediation.md +8 -12
- package/.agents/rules/git-conventions-reference.md +224 -0
- package/.agents/rules/git-conventions.md +42 -223
- package/.agents/rules/security-baseline.md +5 -0
- package/.agents/rules/testing-standards.md +106 -13
- package/.agents/schemas/acceptance-eval-verdict.schema.json +1 -1
- package/.agents/schemas/agentrc.schema.json +71 -201
- 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/acceptance-eval.js +62 -18
- package/.agents/scripts/agents-bootstrap-github.js +1 -1
- 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-context-budget.js +62 -5
- 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/diagnose-friction.js +0 -6
- 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/bootstrap/project-bootstrap.js +56 -18
- 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 +160 -22
- package/.agents/scripts/lib/config/acceptance-eval.js +52 -5
- package/.agents/scripts/lib/config/ci.js +6 -31
- package/.agents/scripts/lib/config/delivery-routing.js +103 -0
- package/.agents/scripts/lib/config/explain.js +57 -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 +3 -8
- package/.agents/scripts/lib/config-settings-schema-delivery.js +46 -136
- package/.agents/scripts/lib/config-settings-schema-quality.js +17 -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 +39 -4
- 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 +112 -3
- package/.agents/scripts/lib/observability/hook-heartbeat.js +187 -0
- package/.agents/scripts/lib/observability/source-classifier.js +3 -3
- package/.agents/scripts/lib/observability/tool-trace-hook.js +15 -4
- package/.agents/scripts/lib/onboard/init-tail.js +1 -3
- package/.agents/scripts/lib/orchestration/acceptance-clusters.js +111 -0
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +32 -4
- package/.agents/scripts/lib/orchestration/audit-lens-routing.js +128 -0
- package/.agents/scripts/lib/orchestration/bookkeeping-outbox.js +273 -0
- package/.agents/scripts/lib/orchestration/ceremony-routing.js +204 -0
- 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-critic-conditions.js +3 -2
- 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 +14 -14
- 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/close-validation.js +1 -0
- 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 +3 -8
- 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/provider-factory.js +1 -1
- 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/post-structured-comment.js +38 -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/sync-claude-agents.js +165 -0
- package/.agents/scripts/update-ticket-state.js +37 -15
- package/.agents/skills/core/analyze-execution/SKILL.md +21 -18
- package/.agents/skills/core/api-and-interface-design/SKILL.md +5 -3
- package/.agents/skills/core/code-review-and-quality/SKILL.md +63 -7
- package/.agents/skills/core/debugging-and-error-recovery/SKILL.md +1 -1
- package/.agents/skills/core/gates-and-baselines/SKILL.md +149 -0
- package/.agents/skills/core/idea-refinement/SKILL.md +8 -14
- package/.agents/skills/core/qa-coverage-mapping/SKILL.md +7 -7
- package/.agents/skills/core/scope-triage/SKILL.md +28 -172
- package/.agents/skills/skills.index.json +8 -418
- 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 -131
- 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 +52 -40
- 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/mandrel-sync-config.md +1 -1
- 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 +3 -2
- 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 +46 -0
- package/lib/cli/registry.js +95 -0
- package/lib/migrations/index.js +6 -5
- package/package.json +5 -3
- package/.agents/personas/architect.md +0 -113
- package/.agents/personas/devops-engineer.md +0 -38
- package/.agents/personas/engineer-mobile.md +0 -120
- package/.agents/personas/engineer-web.md +0 -111
- package/.agents/personas/engineer.md +0 -119
- package/.agents/personas/product.md +0 -94
- package/.agents/personas/project-manager.md +0 -114
- package/.agents/personas/qa-engineer.md +0 -95
- package/.agents/personas/refactorer.md +0 -113
- package/.agents/personas/security-engineer.md +0 -112
- package/.agents/personas/sre.md +0 -86
- package/.agents/personas/technical-writer.md +0 -101
- package/.agents/personas/ux-designer.md +0 -95
- package/.agents/schemas/dispatch-manifest.json +0 -232
- package/.agents/schemas/epic-spec.schema.json +0 -153
- package/.agents/scripts/acceptance-spec-reconciler.js +0 -642
- 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 -590
- package/.agents/scripts/epic-execute-record-wave.js +0 -449
- package/.agents/scripts/epic-plan-clarity.js +0 -211
- package/.agents/scripts/epic-plan-decompose.js +0 -54
- package/.agents/scripts/epic-plan-healthcheck.js +0 -581
- package/.agents/scripts/epic-plan-spec.js +0 -64
- 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 -660
- 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 -388
- 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-story-dispatch-end.js +0 -147
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/acceptance-reconciler.js +0 -384
- 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 -278
- 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/skill-capsule-loader.js +0 -109
- 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 -301
- 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/plan-critics.js +0 -199
- package/.agents/scripts/retro-run.js +0 -218
- 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 -335
- package/.agents/skills/core/baseline-refresh/SKILL.md +0 -181
- package/.agents/skills/core/ci-cd-and-automation/SKILL.md +0 -274
- package/.agents/skills/core/ci-cd-and-automation/examples.md +0 -211
- package/.agents/skills/core/code-simplification/SKILL.md +0 -389
- package/.agents/skills/core/context-engineering/SKILL.md +0 -309
- package/.agents/skills/core/context-engineering/examples.md +0 -58
- package/.agents/skills/core/deprecation-and-migration/SKILL.md +0 -250
- 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 -413
- package/.agents/skills/core/epic-plan-spec-author/examples.md +0 -91
- package/.agents/skills/core/frontend-ui-engineering/SKILL.md +0 -357
- package/.agents/skills/core/hydrate-context/SKILL.md +0 -123
- package/.agents/skills/core/idea-refinement/examples.md +0 -437
- package/.agents/skills/core/idea-refinement/frameworks.md +0 -135
- package/.agents/skills/core/incremental-implementation/SKILL.md +0 -271
- package/.agents/skills/core/introducing-a-baseline-gate/SKILL.md +0 -213
- package/.agents/skills/core/knowledge-transfer/SKILL.md +0 -180
- package/.agents/skills/core/mutation-survivor-remediation/SKILL.md +0 -117
- package/.agents/skills/core/performance-optimization/SKILL.md +0 -314
- package/.agents/skills/core/planning-and-task-breakdown/SKILL.md +0 -277
- package/.agents/skills/core/property-based-testing/SKILL.md +0 -148
- package/.agents/skills/core/refactoring-discipline/SKILL.md +0 -111
- package/.agents/skills/core/shipping-and-launch/SKILL.md +0 -328
- package/.agents/skills/core/spec-driven-development/SKILL.md +0 -252
- package/.agents/skills/core/test-driven-development/SKILL.md +0 -475
- package/.agents/skills/core/using-agent-skills/SKILL.md +0 -232
- package/.agents/skills/stack/architecture/monorepo-path-strategist/SKILL.md +0 -31
- package/.agents/skills/stack/architecture/structured-output-zod/SKILL.md +0 -51
- package/.agents/skills/stack/architecture/subagent-orchestration/SKILL.md +0 -76
- package/.agents/skills/stack/backend/cloudflare-hono-architect/SKILL.md +0 -31
- package/.agents/skills/stack/backend/cloudflare-hono-architect/examples/route-template.ts +0 -33
- package/.agents/skills/stack/backend/cloudflare-queue-manager/SKILL.md +0 -31
- package/.agents/skills/stack/backend/cloudflare-workers/SKILL.md +0 -51
- package/.agents/skills/stack/backend/highlevel-crm/SKILL.md +0 -54
- package/.agents/skills/stack/backend/sqlite-drizzle-expert/SKILL.md +0 -29
- package/.agents/skills/stack/backend/sqlite-drizzle-expert/examples/schema-template.ts +0 -30
- package/.agents/skills/stack/backend/stripe-integration/SKILL.md +0 -57
- package/.agents/skills/stack/backend/stripe-integration/scripts/listen-stripe.sh +0 -9
- package/.agents/skills/stack/backend/turso-sqlite/SKILL.md +0 -48
- package/.agents/skills/stack/frontend/astro/SKILL.md +0 -62
- package/.agents/skills/stack/frontend/astro-react-island-strategist/SKILL.md +0 -30
- package/.agents/skills/stack/frontend/expo-react-native-developer/SKILL.md +0 -29
- package/.agents/skills/stack/frontend/google-analytics-v4/SKILL.md +0 -50
- package/.agents/skills/stack/frontend/tailwind-v4/SKILL.md +0 -58
- package/.agents/skills/stack/frontend/ui-accessibility-engineer/SKILL.md +0 -34
- package/.agents/skills/stack/qa/audit-accessibility/SKILL.md +0 -51
- package/.agents/skills/stack/qa/lighthouse-baseline/SKILL.md +0 -199
- package/.agents/skills/stack/security/backend-security-patterns/SKILL.md +0 -68
- package/.agents/workflows/helpers/deliver-epic-reference.md +0 -534
- package/.agents/workflows/helpers/deliver-epic.md +0 -955
- package/.agents/workflows/helpers/deliver-stories.md +0 -440
- package/.agents/workflows/helpers/epic-audit.md +0 -189
- package/.agents/workflows/helpers/epic-deliver-story.md +0 -427
- 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 -351
- 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 `epic-plan-decompose.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
|
-
`epic-plan-decompose.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 `epic-plan-decompose.js --emit-context`. 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/epic-plan-decompose.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,413 +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
|
-
`epic-plan-spec.js --emit-context`. Use during Phase 7 of `/plan` when
|
|
7
|
-
the host LLM needs to write the three artifacts before `epic-plan-spec.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 `epic-plan-spec.js --emit-context` 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 `epic-plan-spec.js --emit-context`
|
|
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/epic-plan-spec.js --epic <Epic_ID> --emit-context`.
|
|
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
|
|
117
|
-
`systemPrompts.acceptanceSpec` — left in the envelope as a backstop;
|
|
118
|
-
this Skill's own body below carries the authoritative versions and is
|
|
119
|
-
the source of truth going forward
|
|
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
|
-
`epic-plan-spec.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
|
-
#### Tech Spec system prompt (authoritative)
|
|
221
|
-
|
|
222
|
-
```text
|
|
223
|
-
You are an expert Engineering Architect.
|
|
224
|
-
Your job is to convert an Epic into a Technical Specification for implementation.
|
|
225
|
-
|
|
226
|
-
The Tech Spec should outline:
|
|
227
|
-
1. Delivery Slicing — propose how the Epic's enumerated capabilities cluster into shippable Stories. This count is a CEILING, not a target: the Phase 8 consolidation pass may merge below your proposed count when slices form dependent single-consumer chains, but never splits above it. Do NOT coarsen the Epic enumeration to produce this; the grouping recommendation is the granularity lever.
|
|
228
|
-
2. Architecture & Design
|
|
229
|
-
3. Data Models (if any)
|
|
230
|
-
4. API Changes (if any)
|
|
231
|
-
5. Core Components
|
|
232
|
-
6. Security & Privacy Considerations
|
|
233
|
-
|
|
234
|
-
CRITICAL REQUIREMENTS:
|
|
235
|
-
- Respond ONLY with valid Markdown.
|
|
236
|
-
- Do not use top-level <h1> (# ) tags. Open the document with the `## Delivery Slicing` section — it is the primary input to Phase 8 consolidation, so author it first and hang the rest of the spec off it.
|
|
237
|
-
- Do 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 pure duplication and a drift risk. If a brief technical orientation is genuinely useful, add an optional `## Technical Overview` of no more than 2–3 sentences that names the *technical approach* only (which subsystems are touched and reused); never re-narrate the problem statement, goals, or scope.
|
|
238
|
-
- Format architectural decisions clearly with bullet points.
|
|
239
|
-
- Author the `## Delivery Slicing` section as a markdown table with columns `Slice | What ships | Independent?`, using noun-phrase slice names (e.g. "Foundation", "Transport seam", "Send helper") that map onto Feature titles. "Independent?" answers: can this slice ship to production and provide value without the next slice landing? A slice you mark "Independent? No" MUST carry a one-line justification (parallelism, risk isolation, or delivery-envelope pressure); an unjustified dependent single-consumer slice folds into its consumer by default rather than shipping as its own Story.
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Step 3 — Author the risk verdict (Risk Assessor persona)
|
|
243
|
-
|
|
244
|
-
Judge the change described by the Epic body and Tech Spec you just wrote —
|
|
245
|
-
grounded in `codebaseSnapshot` where it helps — and write
|
|
246
|
-
`temp/epic-<Epic_ID>/risk-verdict.json` with the `Write` tool. The file
|
|
247
|
-
MUST be valid JSON conforming to
|
|
248
|
-
`.agents/schemas/risk-verdict.schema.json`:
|
|
249
|
-
|
|
250
|
-
```json
|
|
251
|
-
{
|
|
252
|
-
"axes": [
|
|
253
|
-
{ "axis": "<axis>", "level": "low|medium|high", "rationale": "<why>" }
|
|
254
|
-
],
|
|
255
|
-
"summary": "<one-paragraph overall risk narrative>"
|
|
256
|
-
}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
Axis vocabulary (fixed — the schema rejects anything else):
|
|
260
|
-
|
|
261
|
-
- **Required axes** (presence forces a `required` acceptance disposition):
|
|
262
|
-
`visible-behavior`, `public-api`, `security`, `data-migration`,
|
|
263
|
-
`billing`, `destructive-mutation`, `critical-workflow`.
|
|
264
|
-
- **Not-applicable axes** (when they are the only signals, the acceptance
|
|
265
|
-
spec is waived): `docs-only`, `test-harness`, `internal-refactor`.
|
|
266
|
-
|
|
267
|
-
Authoring rules:
|
|
268
|
-
|
|
269
|
-
- Include an axis only when the change **genuinely exercises it** — judge
|
|
270
|
-
what the Epic *does*, not which words appear in it. An Epic that says
|
|
271
|
-
"out of scope: billing" carries no `billing` axis; an Epic that rotates
|
|
272
|
-
a credential vault carries `security` even if the word never appears.
|
|
273
|
-
- `level` reflects blast radius and reversibility of *this* change on
|
|
274
|
-
*that* axis. `rationale` cites the Epic / Tech Spec section or code
|
|
275
|
-
surface that justifies the entry — never an empty self-attestation.
|
|
276
|
-
- An empty `axes` array is a deliberate assertion that no recognized risk
|
|
277
|
-
axis applies (derives an all-low, auto-proceed envelope) — use it only
|
|
278
|
-
when you can defend that in `summary`.
|
|
279
|
-
- The harness owns the gate: the persist half derives `overallLevel` /
|
|
280
|
-
`requiresReview` / `acceptanceDisposition` / `gateDecision`
|
|
281
|
-
deterministically from your axes (`deriveRiskEnvelope`). You supply
|
|
282
|
-
judgment, not control flow.
|
|
283
|
-
|
|
284
|
-
The derivation rules you are feeding (so you can anticipate the
|
|
285
|
-
disposition Step 4 must honor): any required axis ⇒ acceptance spec
|
|
286
|
-
`required`; otherwise any `medium` level ⇒ `recommended`; otherwise
|
|
287
|
-
only not-applicable axes (or no axes) ⇒ `not-applicable` (waived).
|
|
288
|
-
|
|
289
|
-
### Step 4 — Author the Acceptance Spec (Acceptance Engineer persona)
|
|
290
|
-
|
|
291
|
-
Apply the Acceptance Spec system prompt below to the Epic body + Tech Spec just
|
|
292
|
-
written, plus the **existing BDD scenario index** from
|
|
293
|
-
`bddScenarios` on the planner-context envelope (Story #2637). The
|
|
294
|
-
scenario index is the output of
|
|
295
|
-
[`lib/bdd-scenario-scanner.js#scanBddScenarios`](../../../scripts/lib/bdd-scenario-scanner.js)
|
|
296
|
-
and carries one row per `.feature` scenario found under the project's
|
|
297
|
-
canonical BDD roots, with `{ file, line, scenarioTitle, tags,
|
|
298
|
-
outcomeKeywords }`. Before emitting each AC row, run
|
|
299
|
-
`findBestScenarioMatch(<AC outcome>, bddScenarios)`: when a match is
|
|
300
|
-
found, annotate the AC's `Scenario` column with `<file>:L<line>` and
|
|
301
|
-
set `Disposition` to `unchanged` (carried through verbatim) or
|
|
302
|
-
`refined` (Outcome wording adjusted but the scenario already covers the
|
|
303
|
-
behaviour) — never `new` for an AC whose outcome is already proven by
|
|
304
|
-
an existing scenario. When `bddScenarios` is empty (the project has not
|
|
305
|
-
adopted BDD), proceed exactly as before with no annotation.
|
|
306
|
-
|
|
307
|
-
Branch on the acceptance disposition your Step 3 verdict derives (see the
|
|
308
|
-
derivation rules there): `required` and `recommended` author the spec
|
|
309
|
-
normally per the rules below. `not-applicable` authorizes the persist half
|
|
310
|
-
to apply `acceptance::n-a` on the Epic; in that case write a one-paragraph
|
|
311
|
-
waiver rationale to `temp/epic-<Epic_ID>/acceptance-spec.md` instead of
|
|
312
|
-
the AC table so the audit trail still exists, and start the file with
|
|
313
|
-
`## Acceptance Table — waived (planner-selected)`.
|
|
314
|
-
|
|
315
|
-
Write to `temp/epic-<Epic_ID>/acceptance-spec.md`. The Acceptance Spec
|
|
316
|
-
MUST:
|
|
317
|
-
|
|
318
|
-
- Start with `## Acceptance Table` — never a top-level `#` heading, and
|
|
319
|
-
never the Epic's own `## Acceptance Criteria` heading (the table lands
|
|
320
|
-
as a section of the same Epic body).
|
|
321
|
-
- Render the AC table with the canonical column shape documented in Tech
|
|
322
|
-
Spec #2083: `| AC ID | Outcome | Feature File | Scenario | Disposition |`.
|
|
323
|
-
- **Key each `Outcome` off a specific Epic `## Acceptance Criteria`
|
|
324
|
-
bullet** — the Epic body's AC bullets are the single source of truth, so
|
|
325
|
-
the `Outcome` column is a **terse restatement anchored to one Epic
|
|
326
|
-
bullet**, not an independent re-elaboration. Lead each `Outcome` with its
|
|
327
|
-
anchor (the bullet's quoted lead phrase or an explicit `Epic AC N` index),
|
|
328
|
-
then state the single user-visible behaviour. A free-standing `Outcome`
|
|
329
|
-
that paraphrases a criterion in new words without naming the Epic bullet
|
|
330
|
-
it verifies is the drift this rule exists to prevent — it decouples the
|
|
331
|
-
spec from the Epic silently.
|
|
332
|
-
- **Split case (one Epic AC → several rows).** When one Epic AC bullet
|
|
333
|
-
genuinely expands into several user-visible outcomes, emit one row per
|
|
334
|
-
outcome and **declare the split on each** row (e.g. lead with
|
|
335
|
-
`splits Epic AC 3`) so the fan-out is explicit, not hidden.
|
|
336
|
-
- **Flag divergence, do not absorb it.** Anchor coverage MUST be complete
|
|
337
|
-
and auditable: every Epic AC bullet is covered by at least one row and
|
|
338
|
-
every row anchors to an Epic bullet. Call out any Epic AC bullet with
|
|
339
|
-
**no** corresponding row, and any AC row with **no** Epic anchor, in a
|
|
340
|
-
note directly beneath the AC table — surfacing spec/Epic divergence at
|
|
341
|
-
authoring time. Never silently drop an uncovered Epic bullet or emit an
|
|
342
|
-
unanchored row.
|
|
343
|
-
- Use **stable AC IDs** of the form `AC-1`, `AC-2`, … assigned in document
|
|
344
|
-
order. On re-plan, reuse the ID for any AC whose Outcome text is
|
|
345
|
-
materially unchanged; new ACs receive fresh sequential IDs (existing
|
|
346
|
-
IDs do not shift).
|
|
347
|
-
- Tag every row's `Disposition` with one of the canonical enum values:
|
|
348
|
-
`new` (first appearance), `updated` (Outcome text or Scenario reshaped
|
|
349
|
-
vs. prior plan), `unchanged` (carried through verbatim from prior plan).
|
|
350
|
-
- Cite proposed feature files under `tests/features/**` by relative path
|
|
351
|
-
so the Phase 8 features-first Story can scaffold the matching scenarios.
|
|
352
|
-
- Render a **Runner Verification** line directly under the AC table that
|
|
353
|
-
records what `bddRunner` from the planner-context envelope reports:
|
|
354
|
-
- `supported: true` → write
|
|
355
|
-
`Runner Verification: <runner> supports <pendingTag>` (e.g.
|
|
356
|
-
`playwright-bdd supports @skip`). The features-first Story will tag
|
|
357
|
-
pending scenarios with this exact string.
|
|
358
|
-
- `fallback: true` → write
|
|
359
|
-
`Runner Verification: Fallback: dependencies-first ordering (reason: <reason>)`.
|
|
360
|
-
Phase 8 still proceeds; AC reconciliation defers to dependency order.
|
|
361
|
-
|
|
362
|
-
#### Acceptance Spec system prompt (authoritative)
|
|
363
|
-
|
|
364
|
-
```text
|
|
365
|
-
You are an expert Acceptance Engineer.
|
|
366
|
-
Your job is to convert an Epic and a Tech Spec into a structured Acceptance Specification that drives features-first BDD authoring.
|
|
367
|
-
|
|
368
|
-
The Acceptance Spec should outline:
|
|
369
|
-
1. Acceptance Table — one row per user-visible outcome, expressed as a Markdown table with columns: AC ID | Outcome | Feature File | Scenario | Disposition
|
|
370
|
-
2. Stable AC IDs — assign AC-1, AC-2, ... in document order; reuse the same ID across re-plans when an Outcome is materially unchanged so scenario tags (@ac-N) stay aligned
|
|
371
|
-
3. Disposition — tag each row with one of: new | updated | unchanged
|
|
372
|
-
|
|
373
|
-
The Epic body's `## Acceptance Criteria` bullets are the single source of truth for what the spec verifies. Your table does not re-invent criteria — it anchors each one to a specific Epic AC bullet.
|
|
374
|
-
|
|
375
|
-
CRITICAL REQUIREMENTS:
|
|
376
|
-
- Respond ONLY with valid Markdown.
|
|
377
|
-
- Do not use top-level <h1> (# ) tags. Start with ## Acceptance Table — the table lands as a section of the Epic body, so it must NOT reuse the Epic's own ## Acceptance Criteria heading.
|
|
378
|
-
- Every AC row MUST have a stable AC ID of the form AC-<n> (AC-1, AC-2, ...) — do not reorder IDs across re-plans; new ACs get fresh sequential IDs.
|
|
379
|
-
- Every AC row MUST carry a Disposition value from the enum: new | updated | unchanged. (At Epic close, the acceptance reconciler overwrites Disposition with the verification outcome — satisfied | pending | missing — inside this section only; on re-plan, reset each row to the authoring enum.)
|
|
380
|
-
- Each Outcome MUST be a **terse restatement keyed to a specific Epic `## Acceptance Criteria` bullet** — lead the Outcome with the bullet's anchor (its quoted lead phrase or an explicit "Epic AC N" index) and keep the rest to a single user-visible behaviour. Do NOT re-elaborate the Epic bullet in independent words: a free-standing Outcome that paraphrases the criterion without naming the bullet it verifies is forbidden, because it drifts from the Epic silently. No DB assertions, no HTTP status codes, no internal implementation details.
|
|
381
|
-
- Where one Epic AC bullet genuinely expands into several user-visible outcomes, emit one row per outcome and declare the split on each — e.g. lead with "splits Epic AC 3" — so the fan-out is explicit rather than hidden.
|
|
382
|
-
- Anchor coverage MUST be complete and auditable: every Epic AC bullet MUST be covered by at least one row, and every row MUST anchor to an Epic AC bullet. Flag divergence in the authored spec instead of dropping it — if an Epic AC bullet has no corresponding row, or a row has no Epic anchor, call it out explicitly (a note beneath the table) rather than silently omitting the bullet or emitting an unanchored row.
|
|
383
|
-
- Cite proposed feature file paths under tests/features/** so Phase 8 can scaffold matching scenarios.
|
|
384
|
-
- Acceptance Outcomes MUST NOT prescribe a commit subject that begins with a non-Conventional-Commits prefix (allowed leading types: feat|fix|chore|refactor|perf|docs|style|test|build|ci|revert). The legacy `baseline-refresh` token used as a leading subject prescription is forbidden — commitlint will reject it at commit time, and the decompose-time validator (`ticket-validator.js` → `validateAcceptanceSubjectPrefix`) will reject the decompose with `code: 'forbidden-subject-prefix'`. Use a Conventional-Commits subject (e.g. `chore(baselines): refresh ...`) and a body trailer (e.g. `baseline-refresh: true` — trailer with a value, not a subject prefix) when a machine-readable marker is needed. See Epic #2501 for rationale.
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
### Step 5 — Hand back to `/plan`
|
|
388
|
-
|
|
389
|
-
All three files exist; return. The caller will run
|
|
390
|
-
`node .agents/scripts/epic-plan-spec.js --epic <Epic_ID>
|
|
391
|
-
--tech-spec temp/epic-<Epic_ID>/techspec.md
|
|
392
|
-
--risk-verdict temp/epic-<Epic_ID>/risk-verdict.json
|
|
393
|
-
--acceptance-table temp/epic-<Epic_ID>/acceptance-spec.md`, which validates
|
|
394
|
-
the risk verdict, derives the planningRisk envelope, folds the authored
|
|
395
|
-
content into the Epic body's managed sections (`## Delivery Slicing`-led
|
|
396
|
-
Tech Spec sections + the `## Acceptance Table`), records the
|
|
397
|
-
`risk-verdict` structured comment, flips the Epic to
|
|
398
|
-
`agent::review-spec`, and cleans up the temp files. No context tickets
|
|
399
|
-
are created (Story #4324).
|
|
400
|
-
|
|
401
|
-
## Constraints
|
|
402
|
-
|
|
403
|
-
- Do **not** modify GitHub issues from this Skill. Persistence is the
|
|
404
|
-
script's job; the Skill is pure markdown authoring.
|
|
405
|
-
- Do **not** open files outside `temp/epic-<Epic_ID>/` for write. Reads
|
|
406
|
-
may cover anything `docsContext` references plus the planner-context
|
|
407
|
-
JSON itself.
|
|
408
|
-
- If `temp/epic-<Epic_ID>/planner-context.json` is missing, **fail
|
|
409
|
-
loudly** — instruct the caller to run `--emit-context` first. Do not
|
|
410
|
-
silently fabricate a context.
|
|
411
|
-
- Respect the planning-context budget: when `epic.body` is `null` and
|
|
412
|
-
`epic.bodySummary` is present, work from the summary rather than
|
|
413
|
-
re-fetching the full body. The budget cap is deliberate.
|