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
package/.agents/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Mandrel Framework
|
|
2
2
|
|
|
3
3
|
An opinionated workflow framework for AI coding assistants built on
|
|
4
|
-
|
|
4
|
+
Story-centric GitHub orchestration. Planning, execution, and state all live natively in GitHub Issues, Labels, and Projects V2.
|
|
5
5
|
|
|
6
6
|
This is the consumer README inside the distributed `.agents/` bundle. It explains what each part of the bundle is for and captures the cross-directory authoring conventions. The process narrative for
|
|
7
7
|
`/plan` and `/deliver` stays in [`docs/SDLC.md`](docs/SDLC.md).
|
|
8
8
|
|
|
9
9
|
The framework payload (`.agents/`) is consumed by host repos. It ships inside the [`mandrel`](https://www.npmjs.com/package/mandrel)
|
|
10
|
-
npm package and is materialized into a consumer's `./.agents/` directory by `mandrel sync`. It carries a system prompt, a baseline rule pack, a two-tier skill library, a slash-command workflow set, and the orchestration engine that runs
|
|
10
|
+
npm package and is materialized into a consumer's `./.agents/` directory by `mandrel sync`. It carries a system prompt, a baseline rule pack, a two-tier skill library, a slash-command workflow set, and the orchestration engine that runs Story-centric plans on GitHub (`/plan` → Stories, `/deliver` → `story-*` → `main`).
|
|
11
11
|
|
|
12
12
|
The framework version is the version of the installed [`mandrel`](https://www.npmjs.com/package/mandrel) npm package — run `npm ls mandrel` (or read `package.json`), not a
|
|
13
13
|
count here.
|
|
@@ -226,8 +226,6 @@ read-when-relevant pattern skills use).
|
|
|
226
226
|
**Always-load (the recommended core):**
|
|
227
227
|
|
|
228
228
|
- [`instructions.md`](instructions.md) — the core agent protocol.
|
|
229
|
-
- [`personas/engineer.md`](personas/engineer.md) — the default persona (swap in
|
|
230
|
-
another persona when the task calls for it).
|
|
231
229
|
- [`rules/security-baseline.md`](rules/security-baseline.md) — inviolable
|
|
232
230
|
security MUSTs, relevant to every change.
|
|
233
231
|
- [`rules/git-conventions.md`](rules/git-conventions.md) — every commit,
|
|
@@ -284,11 +282,10 @@ For non-interactive (CI) installs, pass `--owner`, `--repo`, and
|
|
|
284
282
|
After bootstrap, every Mandrel command is generated into a flat
|
|
285
283
|
`.claude/commands/` tree by `npm run sync:commands` (the UserPromptSubmit hook
|
|
286
284
|
keeps it current) and loads as a bare `/<command>` slash command — e.g.
|
|
287
|
-
`/plan`, `/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
[`/
|
|
291
|
-
Issue) with [`/deliver`](workflows/helpers/deliver-stories.md) (Story Issue → merged
|
|
285
|
+
`/plan`, `/deliver`, `/audit-security`. The commands load in every Claude Code
|
|
286
|
+
environment. The [SDLC guide](docs/SDLC.md) walks end-to-end planning and
|
|
287
|
+
delivery; Stories pair [`/plan`](workflows/plan.md) (idea → drafted Story Issue)
|
|
288
|
+
with [`/deliver`](workflows/deliver.md) (Story Issue → merged
|
|
292
289
|
PR).
|
|
293
290
|
|
|
294
291
|
---
|
|
@@ -331,9 +328,18 @@ in `runtime-deps.json`.
|
|
|
331
328
|
|
|
332
329
|
## Ticket Hierarchy
|
|
333
330
|
|
|
334
|
-
|
|
331
|
+
Orchestration and planning are **Story-only** (`type::story`): `/plan`
|
|
332
|
+
persists Stories with inline `acceptance[]` / `verify[]` and a folded
|
|
333
|
+
`## Spec`; `/deliver` runs `helpers/deliver-story` on
|
|
334
|
+
`story-<id>` → PR → `main`. There is no `type::epic` / `type::task`
|
|
335
|
+
label and no Epic issue form — an Epic is at most an optional untyped
|
|
336
|
+
human umbrella issue outside orchestration. There is no Epic wave /
|
|
337
|
+
`epic/<id>` integration branch. Tickets that still carry an `Epic: #N`
|
|
338
|
+
footer are refused by `/deliver` and must be closed or re-planned as
|
|
339
|
+
v2 Stories.
|
|
335
340
|
|
|
336
|
-
See [`docs/SDLC.md`
|
|
341
|
+
See [`docs/SDLC.md`](docs/SDLC.md) and [`instructions.md` § 5.D](instructions.md)
|
|
342
|
+
for the execution-model contract.
|
|
337
343
|
|
|
338
344
|
---
|
|
339
345
|
|
|
@@ -345,7 +351,7 @@ See [`docs/SDLC.md` § Ticket hierarchy](docs/SDLC.md) for the diagram and execu
|
|
|
345
351
|
| [`docs/SDLC.md`](docs/SDLC.md) | Operator process for `/plan` and `/deliver`. |
|
|
346
352
|
| [`starter-agentrc.json`](starter-agentrc.json) | Bootstrap delta-seed copied to the consumer repo root as `.agentrc.json`. |
|
|
347
353
|
| [`agentrc-reference.json`](docs/agentrc-reference.json) | Exhaustive editor reference enumerating every schema key with its framework default. |
|
|
348
|
-
| [`
|
|
354
|
+
| [`agents/`](agents/) | Optional role-scoped spawn boot contexts (`delivery.routing.roleScopedAgents`). |
|
|
349
355
|
| [`rules/`](rules/) | Domain-agnostic coding, security, testing, shell, git, and workflow rules. |
|
|
350
356
|
| [`skills/core/`](skills/core/) | Universal process skills such as debugging, TDD, security, documentation, and code review. |
|
|
351
357
|
| [`skills/stack/`](skills/stack/) | Stack-specific guardrails for frameworks, services, and testing tools. |
|
|
@@ -369,7 +375,7 @@ See [`docs/SDLC.md` § Ticket hierarchy](docs/SDLC.md) for the diagram and execu
|
|
|
369
375
|
| Quality-gate runbooks (CRAP, MI, lint, friction) plus the baseline envelope, component model, and writer/reader contract | [`.agents/docs/quality-gates.md`](docs/quality-gates.md) |
|
|
370
376
|
| Slash-command workflow definitions | [`workflows/`](workflows/) |
|
|
371
377
|
| Render the signals span-tree (debug helper) | [`workflows/helpers/signals.md`](workflows/helpers/signals.md) |
|
|
372
|
-
|
|
|
378
|
+
| Role-scoped spawn boot contexts | [`agents/`](agents/) |
|
|
373
379
|
| Domain-agnostic baseline rules | [`rules/`](rules/) |
|
|
374
380
|
| Skill library (core process + stack guardrails) | [`skills/core/`](skills/core/) · [`skills/stack/`](skills/stack/) |
|
|
375
381
|
| Decision rule: should this be a Skill or a Script? | [§ When to use a Skill vs a Script](#when-to-use-a-skill-vs-a-script) |
|
|
@@ -543,7 +549,7 @@ sessions, `gh auth login` is sufficient.
|
|
|
543
549
|
## Self-Healing Checks
|
|
544
550
|
|
|
545
551
|
`scripts/lib/checks/` is the discovery-based registry of named checks
|
|
546
|
-
consumed by preflight guards (`/deliver`,
|
|
552
|
+
consumed by preflight guards (`/deliver`, `single-story-close`, `npm test`),
|
|
547
553
|
the `diagnose.js` ad-hoc viewer, and the retro surface. Use one check per
|
|
548
554
|
file. The runner (`index.js`) loads checks at process start and filters by
|
|
549
555
|
scope at each call site.
|
|
@@ -552,9 +558,9 @@ Each check module default-exports an object with this shape:
|
|
|
552
558
|
|
|
553
559
|
```js
|
|
554
560
|
export default {
|
|
555
|
-
id: 'stale-origin-
|
|
561
|
+
id: 'stale-origin-main',
|
|
556
562
|
severity: 'blocker', // 'blocker' | 'warning' | 'info'
|
|
557
|
-
scope: ['
|
|
563
|
+
scope: ['deliver', 'single-story-close', 'retro'],
|
|
558
564
|
autoCorrect: 'refuse-and-print', // 'auto' | 'refuse-and-print'
|
|
559
565
|
detect(state) {
|
|
560
566
|
return null;
|
|
@@ -636,21 +642,19 @@ follow-up **Epic #1943**.
|
|
|
636
642
|
|
|
637
643
|
`schemas/` contains JSON Schema draft 2020-12 contracts consumed by the
|
|
638
644
|
orchestration layer. Each schema describes one structured artefact:
|
|
639
|
-
configuration,
|
|
640
|
-
|
|
641
|
-
|
|
645
|
+
configuration, runtime reports, dispatch manifests, or persisted state.
|
|
646
|
+
Where a runtime AJV schema also exists, the JSON file is a mirror kept
|
|
647
|
+
in sync by a drift test.
|
|
642
648
|
|
|
643
649
|
Important schema groups:
|
|
644
650
|
|
|
645
|
-
- Structural specs: `epic-spec.schema.json` for the declarative
|
|
646
|
-
`epic.yaml` plus reconciler flow.
|
|
647
651
|
- Configuration: `agentrc.schema.json`, mirrored from the runtime config
|
|
648
652
|
schemas.
|
|
653
|
+
- Story / signal contracts: `signal-event.schema.json`, acceptance-eval
|
|
654
|
+
verdicts, and related runtime envelopes.
|
|
649
655
|
- Runtime reports: audit results, CRAP and maintainability reports,
|
|
650
656
|
performance summaries, friction and signal events, and validation
|
|
651
657
|
evidence.
|
|
652
|
-
- Dispatch: `dispatch-manifest.json`, the per-Epic dispatch manifest
|
|
653
|
-
schema written by `dispatcher.js`.
|
|
654
658
|
|
|
655
659
|
Schema conventions:
|
|
656
660
|
|
|
@@ -666,18 +670,13 @@ Schema conventions:
|
|
|
666
670
|
|
|
667
671
|
## Code review providers (pluggable chain)
|
|
668
672
|
|
|
669
|
-
`runCodeReview()` (invoked
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
- **Provider chain** (Story #2871) — `delivery.codeReview.providers: []`
|
|
677
|
-
iterates a declared list of entries, merges every inline adapter's
|
|
678
|
-
`Finding[]` in declaration order, and appends a non-blocking
|
|
679
|
-
"Manual Review Suggestions" section for any manual-prompt entries
|
|
680
|
-
that contributed text. When both fields are set, `providers` wins.
|
|
673
|
+
`runCodeReview()` (invoked from `helpers/deliver-story` and `/deliver`'s
|
|
674
|
+
risk-routed ceremony) loads its review backend through a pluggable registry.
|
|
675
|
+
Configure a provider chain via `delivery.codeReview.providers` — an array
|
|
676
|
+
of entries iterated in declaration order. Inline adapters merge their
|
|
677
|
+
`Finding[]`; manual-prompt entries append a non-blocking
|
|
678
|
+
"Manual Review Suggestions" section. When `providers` is unset or empty,
|
|
679
|
+
the factory defaults to `[{ name: "native" }]`.
|
|
681
680
|
|
|
682
681
|
```json
|
|
683
682
|
{
|
|
@@ -685,10 +684,10 @@ state) loads its review backend through a pluggable registry. Two configuration
|
|
|
685
684
|
"codeReview": {
|
|
686
685
|
"providers": [
|
|
687
686
|
{ "name": "native" },
|
|
688
|
-
{ "name": "security-review", "scopes": ["
|
|
687
|
+
{ "name": "security-review", "scopes": ["story"], "optional": true },
|
|
689
688
|
{
|
|
690
689
|
"name": "ultrareview",
|
|
691
|
-
"scopes": ["
|
|
690
|
+
"scopes": ["story"],
|
|
692
691
|
"manualPrompt": true,
|
|
693
692
|
"when": { "label": "risk::high" }
|
|
694
693
|
}
|
|
@@ -733,9 +732,9 @@ chain, `security-review`, and `ultrareview` were added in Story #2871.
|
|
|
733
732
|
|
|
734
733
|
## Feedback loop — verification-results auto-graduation
|
|
735
734
|
|
|
736
|
-
When
|
|
737
|
-
`high`, `medium`, or `suggestion`) that survived merge are
|
|
738
|
-
into follow-up issues in a SINGLE pass over the unified
|
|
735
|
+
When a Story (or plan-run) finalize path runs, non-blocking findings
|
|
736
|
+
(severity `high`, `medium`, or `suggestion`) that survived merge are
|
|
737
|
+
auto-graduated into follow-up issues in a SINGLE pass over the unified
|
|
739
738
|
`verification-results` structured comment (Story #4411 folded the former
|
|
740
739
|
`code-review` and `audit-results` comments into one), routed by source
|
|
741
740
|
classification into the framework repo or the consumer repo. The toggle
|
|
@@ -759,7 +758,7 @@ stabilization window), set the toggle to `false` in your root
|
|
|
759
758
|
```
|
|
760
759
|
|
|
761
760
|
When disabled, the listener short-circuits and leaves the
|
|
762
|
-
`verification-results` comment on the
|
|
761
|
+
`verification-results` comment on the Story ticket untouched. Re-enabling
|
|
763
762
|
the toggle is safe: the graduator embeds a content-derived idempotency
|
|
764
763
|
marker in each filed issue body, so re-runs skip findings that already
|
|
765
764
|
have an issue.
|
|
@@ -776,15 +775,16 @@ each with different cost/portability trade-offs:
|
|
|
776
775
|
|
|
777
776
|
| Strategy | When to use | Cold-start cost | Notes |
|
|
778
777
|
| -------------- | ---------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------- |
|
|
779
|
-
| `
|
|
778
|
+
| `clone` | **Shipped default on darwin/linux** — copy-on-write clone of donor `node_modules`. | Near-zero on APFS/reflink FS. | Falls back to `per-worktree` on unsupported filesystems or cross-volume clones. |
|
|
779
|
+
| `per-worktree` | Default on Windows; also the safe fallback everywhere. | Full `npm ci` per Story. | Each worktree gets an independent `node_modules`. |
|
|
780
780
|
| `symlink` | npm/yarn repos that want the fast path. **Opt-in.** | Near-zero. | Junctions a single donor `node_modules` into each worktree. Refuses on Windows unless explicitly opted in. |
|
|
781
|
-
| `pnpm-store` | pnpm repos. **
|
|
781
|
+
| `pnpm-store` | pnpm repos. **Opt-in.** | Fast (store-backed). | Runs `pnpm install --frozen-lockfile` against the shared content-addressable store. |
|
|
782
782
|
|
|
783
783
|
The **shipped consumer default in
|
|
784
|
-
[`.agents/docs/agentrc-reference.json`](./docs/agentrc-reference.json)
|
|
785
|
-
`
|
|
786
|
-
|
|
787
|
-
|
|
784
|
+
[`.agents/docs/agentrc-reference.json`](./docs/agentrc-reference.json) is
|
|
785
|
+
`clone`** (Windows resolves to `per-worktree` via the platform-aware
|
|
786
|
+
accessor). Repos that use pnpm or want symlink semantics should set
|
|
787
|
+
`nodeModulesStrategy` explicitly in their root `.agentrc.json`.
|
|
788
788
|
|
|
789
789
|
### Symlink opt-in (npm / yarn)
|
|
790
790
|
|
|
@@ -809,13 +809,13 @@ To opt in, set three fields on `delivery.worktreeIsolation` in your root
|
|
|
809
809
|
- **`primeFromPath`** — relative path (from the repo root) to the donor
|
|
810
810
|
worktree whose `node_modules/` is reused. `"."` means the root
|
|
811
811
|
checkout, which must already have `node_modules/` populated before a
|
|
812
|
-
Story initializes. `story-init.js` enforces this with a pre-check.
|
|
812
|
+
Story initializes. `single-story-init.js` enforces this with a pre-check.
|
|
813
813
|
- **`allowSymlinkOnWindows`** — required on Windows. The strategy uses
|
|
814
814
|
junctions (no admin rights needed) on Windows when this is `true`; it
|
|
815
815
|
refuses with an explanatory error otherwise, because symlink semantics
|
|
816
816
|
vary by Windows version.
|
|
817
817
|
|
|
818
|
-
Once these are set, `story-init.js` skips `npm ci` in the worktree and
|
|
818
|
+
Once these are set, `single-story-init.js` skips `npm ci` in the worktree and
|
|
819
819
|
junctions/symlinks `node_modules` from the donor — typical cold-start
|
|
820
820
|
falls from minutes to under a second.
|
|
821
821
|
|
|
@@ -823,9 +823,8 @@ falls from minutes to under a second.
|
|
|
823
823
|
|
|
824
824
|
## Multi-developer coordination
|
|
825
825
|
|
|
826
|
-
Two operators can drive the same repository at once —
|
|
827
|
-
`/deliver <
|
|
828
|
-
operators on the same Epic from separate clones. The framework keeps those
|
|
826
|
+
Two operators can drive the same repository at once — for example, two
|
|
827
|
+
`/deliver <storyId>` runs from separate clones. The framework keeps those
|
|
829
828
|
runs from clobbering one another with **two distinct coordination layers**.
|
|
830
829
|
They solve different problems and must not be confused:
|
|
831
830
|
|
|
@@ -866,28 +865,15 @@ yanks the claim back from whoever legitimately took over.
|
|
|
866
865
|
|
|
867
866
|
**Where it's wired:**
|
|
868
867
|
|
|
869
|
-
- **`/deliver`**
|
|
870
|
-
|
|
871
|
-
([`epic-deliver-lease-guard.js`](scripts/lib/orchestration/epic-deliver-lease-guard.js)).
|
|
872
|
-
A live foreign claim refuses the run; pass `--steal` to override and
|
|
873
|
-
`--as <handle>` to claim under a specific identity. The operator is
|
|
874
|
-
resolved from `--as`, then `github.operatorHandle`, then
|
|
875
|
-
`git config user.email`; when none resolve, the lease step is skipped
|
|
876
|
-
(the checkout-safety guard still runs).
|
|
877
|
-
- **`/single-story-deliver`** acquires the lease on the **Story** ticket at
|
|
878
|
-
init and releases it at close
|
|
868
|
+
- **`/deliver`** runs each Story through `helpers/deliver-story`, which
|
|
869
|
+
acquires the lease on the **Story** ticket at init and releases it at close
|
|
879
870
|
([`single-story-lease-guard.js`](scripts/lib/orchestration/single-story-lease-guard.js)).
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
delivery-time signal), the plan path has no live-heartbeat source and so
|
|
887
|
-
**fails closed**: any foreign assignee is treated as a live claim and
|
|
888
|
-
refuses the run unless `--steal` transfers it. Unassigned or self-held
|
|
889
|
-
Epics proceed. When `github.operatorHandle` is unset the lease cannot be
|
|
890
|
-
keyed and the preflight degrades to a no-op.
|
|
871
|
+
A live foreign claim refuses the run; pass `--steal` to override. The Story
|
|
872
|
+
path requires `github.operatorHandle` to be set — without an operator identity
|
|
873
|
+
the lease has no owner to record.
|
|
874
|
+
- **`/plan`** does not take a planning lease on an Epic ticket. Planning is a
|
|
875
|
+
short authoring ceremony over Stories; concurrent `/plan` runs coordinate
|
|
876
|
+
via ordinary GitHub issue creation, not an Epic lease guard.
|
|
891
877
|
|
|
892
878
|
---
|
|
893
879
|
|
|
@@ -21,11 +21,9 @@ description: >-
|
|
|
21
21
|
You are a **Story delivery worker**: you take one Story from init through
|
|
22
22
|
implementation to a landed PR, then return. You run on this focused prompt
|
|
23
23
|
alone — you do **not** have the full project protocol chain loaded, so the
|
|
24
|
-
non-negotiable MUSTs you need are stated here. Follow the
|
|
25
|
-
prose your caller hands you
|
|
26
|
-
|
|
27
|
-
step-by-step; this boot context governs the invariants that hold across every
|
|
28
|
-
step.
|
|
24
|
+
non-negotiable MUSTs you need are stated here. Follow the `helpers/deliver-story`
|
|
25
|
+
workflow prose your caller hands you for the step-by-step; this boot context
|
|
26
|
+
governs the invariants that hold across every step.
|
|
29
27
|
|
|
30
28
|
## Non-interactive contract
|
|
31
29
|
|
|
@@ -42,7 +40,7 @@ You run as a sub-agent with **no input channel** mid-run.
|
|
|
42
40
|
|
|
43
41
|
## Worktree discipline (MUST)
|
|
44
42
|
|
|
45
|
-
1. Initialize with `node .agents/scripts/story-init.js --story <storyId>` from
|
|
43
|
+
1. Initialize with `node .agents/scripts/single-story-init.js --story <storyId>` from
|
|
46
44
|
the **main checkout** (the worktree does not exist yet). Invoke it
|
|
47
45
|
**synchronously** with the Bash maximum timeout — a per-worktree install can
|
|
48
46
|
take several minutes; do not background it.
|
|
@@ -63,7 +61,7 @@ git -C "<workCwd>" branch --show-current # MUST print story-<storyId>
|
|
|
63
61
|
|
|
64
62
|
If it does **not** report `story-<storyId>`, **STOP** — do not commit. Never
|
|
65
63
|
commit Story work to `main`, to an Epic branch directly, or outside the
|
|
66
|
-
worktree/branch. Re-run `story-init.js` (it is idempotent on partial state) to
|
|
64
|
+
worktree/branch. Re-run `single-story-init.js` (it is idempotent on partial state) to
|
|
67
65
|
restore the branch before proceeding.
|
|
68
66
|
|
|
69
67
|
## Commit discipline
|
|
@@ -117,9 +115,10 @@ scores the working diff against **each** `acceptance[]` item and consumes the
|
|
|
117
115
|
- **Heartbeat.** Emit a `story.heartbeat` lifecycle event on every phase
|
|
118
116
|
transition (or when you stall on a long-running step) so the parent
|
|
119
117
|
`/deliver` idle watchdog can tell a live child from a dead one. In practice
|
|
120
|
-
this is the `story-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
this is the `story-run-progress` structured comment (via
|
|
119
|
+
`post-structured-comment.js` / the close pipeline) at each transition;
|
|
120
|
+
write it at every transition, and relay one terse line per transition
|
|
121
|
+
(e.g. `Story #<id>: implementing → closing`), not the full body.
|
|
123
122
|
- **Blocked.** If you genuinely cannot proceed, flip the snapshot to `blocked`,
|
|
124
123
|
transition the Story to `agent::blocked`, post a `friction` comment naming
|
|
125
124
|
the decision needed (or the unmet criteria and their evidence), and **exit
|
|
@@ -143,9 +142,9 @@ sanctioned way the work lands.
|
|
|
143
142
|
## Return schema
|
|
144
143
|
|
|
145
144
|
Your authoritative status is the `story-run-progress` snapshot comment that
|
|
146
|
-
|
|
147
|
-
reads that, not your chat. On completion, return a
|
|
148
|
-
the terminal state and evidence:
|
|
145
|
+
the deliver/close pipeline upserts at each transition — the parent
|
|
146
|
+
`/deliver` aggregator reads that, not your chat. On completion, return a
|
|
147
|
+
compact JSON object naming the terminal state and evidence:
|
|
149
148
|
|
|
150
149
|
```json
|
|
151
150
|
{
|