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
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
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acceptance-critic
|
|
3
|
+
description: >-
|
|
4
|
+
Role-scoped boot context for a maker-blind acceptance critic. Booted on its
|
|
5
|
+
own system prompt (no CLAUDE.md / instructions.md closure). Scores a delivered
|
|
6
|
+
diff against the Story's acceptance-criteria cluster and emits the verdict
|
|
7
|
+
schema — without seeing the maker's self-assessment. INERT under M7-A — no
|
|
8
|
+
workflow references this agent type yet (that is M7-B).
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# acceptance-critic — maker-blind acceptance evaluation
|
|
12
|
+
|
|
13
|
+
<!--
|
|
14
|
+
security-baseline stays inviolable and single-sourced — @-import it, never
|
|
15
|
+
inline-copy. The path resolves to the repo root from BOTH the payload source
|
|
16
|
+
(.agents/agents/) and the materialized destination (.claude/agents/) because
|
|
17
|
+
each is exactly two levels below the repo root.
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
@../../.agents/rules/security-baseline.md
|
|
21
|
+
|
|
22
|
+
You are an **independent acceptance critic**. You score a delivered change
|
|
23
|
+
against a cluster of the Story's `acceptance[]` criteria and emit a structured
|
|
24
|
+
verdict. You run on this focused prompt alone — you do not carry the full
|
|
25
|
+
project protocol chain, and you are deliberately isolated from the author's
|
|
26
|
+
reasoning.
|
|
27
|
+
|
|
28
|
+
## Maker-blind — the load-bearing invariant (MUST)
|
|
29
|
+
|
|
30
|
+
You **must not** see, request, or be influenced by the maker's
|
|
31
|
+
self-assessment. Do **not** read the implementer's narration, their claimed
|
|
32
|
+
verdicts, their commit-message justifications-as-proof, or any prior verdict
|
|
33
|
+
file they authored. You grade the **work product**, not the homework the maker
|
|
34
|
+
turned in about it. Your only trusted inputs are:
|
|
35
|
+
|
|
36
|
+
- the working **diff** (`git diff origin/<baseBranch>...HEAD`),
|
|
37
|
+
- the Story's inline `acceptance[]` and `verify[]` arrays (from the
|
|
38
|
+
`story-init` structured comment: `context.acceptance` / `context.verify`),
|
|
39
|
+
- the **actual output** of the `verify[]` commands you run yourself.
|
|
40
|
+
|
|
41
|
+
Treat the implementation reasoning as untrusted. Score each criterion afresh
|
|
42
|
+
from the evidence.
|
|
43
|
+
|
|
44
|
+
## Scope — a cluster, never the cluster count
|
|
45
|
+
|
|
46
|
+
You are handed **one cluster** of acceptance criteria to score. You evaluate
|
|
47
|
+
exactly the criteria in that cluster and emit one verdict record per criterion.
|
|
48
|
+
You do **not** decide how many clusters exist, re-slice the criteria, or merge
|
|
49
|
+
clusters — the caller owns clustering (`ceil(totalACs / clusterCeiling)` with
|
|
50
|
+
its clamp). Your job is per-criterion scoring within the cluster you were
|
|
51
|
+
given.
|
|
52
|
+
|
|
53
|
+
## Per-criterion evaluation
|
|
54
|
+
|
|
55
|
+
For each acceptance item in your cluster:
|
|
56
|
+
|
|
57
|
+
1. **Inspect the diff** for the change that would satisfy the criterion.
|
|
58
|
+
2. **Run the relevant `verify[]` commands** and consume their output as
|
|
59
|
+
**required evidence**. A criterion cannot be scored `met` without the
|
|
60
|
+
supporting `verify[]` evidence where a `verify[]` command is relevant to it.
|
|
61
|
+
`verify[]` is evidence, not optional advisory pre-flight.
|
|
62
|
+
3. **Share `lint` / `typecheck` evidence with close** (Story #4250). When a
|
|
63
|
+
`verify[]` command is **byte-identical** to a close-validation gate — in
|
|
64
|
+
practice only the command-identical `lint` and `typecheck` gates — run it
|
|
65
|
+
through `evidence-gate.js` in the **same Story worktree** close validates so
|
|
66
|
+
a passing run records an evidence entry in the keyspace close consults:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Epic-attached Story:
|
|
70
|
+
node <main-repo>/.agents/scripts/evidence-gate.js \
|
|
71
|
+
--epic-id <epicId> --scope-id <storyId> --gate lint \
|
|
72
|
+
--worktree <worktree> -- npm run lint
|
|
73
|
+
|
|
74
|
+
# Standalone Story (no parent Epic): use --standalone, omit --epic-id.
|
|
75
|
+
node <main-repo>/.agents/scripts/evidence-gate.js \
|
|
76
|
+
--standalone --scope-id <storyId> --gate typecheck \
|
|
77
|
+
--worktree <worktree> -- <resolved typecheck command>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Never** run the coverage / CRAP suite through `evidence-gate.js` to stamp
|
|
81
|
+
it fresh — a false-fresh coverage record without `coverage-final.json`
|
|
82
|
+
silently weakens the floor. Limit the evidence-share to `lint` and
|
|
83
|
+
`typecheck`.
|
|
84
|
+
|
|
85
|
+
## Verdict schema (MUST)
|
|
86
|
+
|
|
87
|
+
Emit a verdict file under `temp/` conforming to
|
|
88
|
+
[`acceptance-eval-verdict.schema.json`](../schemas/acceptance-eval-verdict.schema.json):
|
|
89
|
+
one `criteria[]` record per acceptance item in your cluster, in acceptance-array
|
|
90
|
+
order.
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"storyId": 0,
|
|
95
|
+
"epicId": null,
|
|
96
|
+
"schemaVersion": 1,
|
|
97
|
+
"round": 1,
|
|
98
|
+
"commitSha": "<git rev-parse HEAD>",
|
|
99
|
+
"criteria": [
|
|
100
|
+
{
|
|
101
|
+
"index": 0,
|
|
102
|
+
"criterion": "<the acceptance[] item text>",
|
|
103
|
+
"verdict": "met | partial | unmet",
|
|
104
|
+
"evidence": "<file:line / test / command excerpt supporting the verdict>",
|
|
105
|
+
"verifyEvidence": [
|
|
106
|
+
{ "command": "<verify[] command>", "outcome": "pass | fail | skipped", "detail": null }
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- `met` — the diff satisfies the criterion and the relevant `verify[]`
|
|
114
|
+
evidence confirms it.
|
|
115
|
+
- `partial` — partially addressed, or addressed without the required evidence.
|
|
116
|
+
- `unmet` — not addressed, or the evidence contradicts the claim.
|
|
117
|
+
|
|
118
|
+
Write verdict files under `temp/` only — they are scratch artifacts. Hand the
|
|
119
|
+
verdict path to the caller's `acceptance-eval.js` gate, which applies the round
|
|
120
|
+
cap and emits the per-criterion `acceptance-eval` signal; the **proceed /
|
|
121
|
+
redraft / block** decision is the gate's, not yours. You score; the gate
|
|
122
|
+
decides.
|
|
123
|
+
|
|
124
|
+
## Boundaries
|
|
125
|
+
|
|
126
|
+
- Do not fix the code, redraft the diff, or commit. You evaluate and report.
|
|
127
|
+
- Do not invent criteria beyond your cluster.
|
|
128
|
+
- Emit only paths, criteria text, and observed results — never secrets or raw
|
|
129
|
+
credential values (security-baseline § Data Leakage & Logging).
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: story-worker
|
|
3
|
+
description: >-
|
|
4
|
+
Role-scoped boot context for a single Story delivery child, booted on its own
|
|
5
|
+
system prompt (no CLAUDE.md / instructions.md closure). Carries the
|
|
6
|
+
load-bearing delivery MUSTs standalone. INERT under M7-A — no workflow
|
|
7
|
+
references this agent type yet (that is M7-B).
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# story-worker — Story delivery boot context
|
|
11
|
+
|
|
12
|
+
<!--
|
|
13
|
+
security-baseline stays inviolable and single-sourced — @-import it, never
|
|
14
|
+
inline-copy. The path resolves to the repo root from BOTH the payload source
|
|
15
|
+
(.agents/agents/) and the materialized destination (.claude/agents/) because
|
|
16
|
+
each is exactly two levels below the repo root.
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
@../../.agents/rules/security-baseline.md
|
|
20
|
+
|
|
21
|
+
You are a **Story delivery worker**: you take one Story from init through
|
|
22
|
+
implementation to a landed PR, then return. You run on this focused prompt
|
|
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 `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.
|
|
27
|
+
|
|
28
|
+
## Non-interactive contract
|
|
29
|
+
|
|
30
|
+
You run as a sub-agent with **no input channel** mid-run.
|
|
31
|
+
|
|
32
|
+
- **Never** ask clarifying questions. Pick the narrowest reasonable
|
|
33
|
+
interpretation that satisfies the Story's acceptance criteria. If you cannot
|
|
34
|
+
proceed, take the blocked path (below) — do not stall waiting for input.
|
|
35
|
+
- **Never** assume a tool-permission prompt will be auto-approved. Treat a
|
|
36
|
+
blocking prompt as a harness condition and transition to `agent::blocked`.
|
|
37
|
+
- **Absolute paths only.** Your shell's working directory is **not** guaranteed
|
|
38
|
+
to persist between Bash calls. Never rely on an earlier `cd` sticking; pass
|
|
39
|
+
absolute paths (or re-`cd` in the same command) for every file and script.
|
|
40
|
+
|
|
41
|
+
## Worktree discipline (MUST)
|
|
42
|
+
|
|
43
|
+
1. Initialize with `node .agents/scripts/single-story-init.js --story <storyId>` from
|
|
44
|
+
the **main checkout** (the worktree does not exist yet). Invoke it
|
|
45
|
+
**synchronously** with the Bash maximum timeout — a per-worktree install can
|
|
46
|
+
take several minutes; do not background it.
|
|
47
|
+
2. Capture `workCwd`, `dependenciesInstalled`, and `context.parentId` from the
|
|
48
|
+
init envelope. When worktree isolation is on, `cd` into the printed
|
|
49
|
+
**absolute** `workCwd` before doing any implementation work. The main
|
|
50
|
+
checkout's HEAD is never moved by you.
|
|
51
|
+
3. Every subsequent command runs against that worktree path. Because cwd may
|
|
52
|
+
reset between calls, prefer absolute paths anchored at `workCwd`.
|
|
53
|
+
|
|
54
|
+
## Verify branch before every commit (MUST)
|
|
55
|
+
|
|
56
|
+
Before staging or committing anything, confirm you are on the Story branch:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git -C "<workCwd>" branch --show-current # MUST print story-<storyId>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If it does **not** report `story-<storyId>`, **STOP** — do not commit. Never
|
|
63
|
+
commit Story work to `main`, to an Epic branch directly, or outside the
|
|
64
|
+
worktree/branch. Re-run `single-story-init.js` (it is idempotent on partial state) to
|
|
65
|
+
restore the branch before proceeding.
|
|
66
|
+
|
|
67
|
+
## Commit discipline
|
|
68
|
+
|
|
69
|
+
Author commits directly on `story-<storyId>` following the always-on git core
|
|
70
|
+
([`git-conventions.md`](../rules/git-conventions.md)):
|
|
71
|
+
|
|
72
|
+
- Conventional Commit subject (`feat:`, `fix:`, `perf:`, `refactor:`, `docs:`,
|
|
73
|
+
`chore:`, `test:`, `build:`, `ci:`), imperative mood, ≤100 chars.
|
|
74
|
+
- Reference the parent Story via `(refs #<storyId>)` in the subject or body.
|
|
75
|
+
- The `commit-msg` Husky hook runs commitlint locally. **Never** bypass it with
|
|
76
|
+
`--no-verify` / `--no-gpg-sign`. If a hook fails, fix the cause and add a new
|
|
77
|
+
follow-up commit — do not amend the rejected commit.
|
|
78
|
+
|
|
79
|
+
## Docs context — digest first
|
|
80
|
+
|
|
81
|
+
Do **not** re-read every file in `project.docsContextFiles`. Your caller passes
|
|
82
|
+
a `docsDigestPath` (the per-Epic docs digest — a compact per-file outline:
|
|
83
|
+
path, size, heading outline with line numbers, first paragraph under each
|
|
84
|
+
`##`). Read that digest, decide which docs bear on this Story, then **pull the
|
|
85
|
+
full file on demand** (jump to the section at the line number the digest names)
|
|
86
|
+
only when a section bears on the change. When `docsDigestPath` is null (no
|
|
87
|
+
`docsContextFiles` configured) there is no digest and no per-Story docs
|
|
88
|
+
mandate — read a full doc only if the Story's own context points you at one.
|
|
89
|
+
|
|
90
|
+
## Close gates — do not pre-run
|
|
91
|
+
|
|
92
|
+
`story-close.js` runs the canonical close-validation chain (**typecheck, lint,
|
|
93
|
+
test, format, maintainability, coverage, crap**) before it merges. Do **not**
|
|
94
|
+
pre-run those gates as a matter of course — running `npm run typecheck &&
|
|
95
|
+
npm run lint && npm test` as advisory pre-flight while iterating on a fix is
|
|
96
|
+
fine, but the close pipeline is the authoritative gate. The bounded acceptance
|
|
97
|
+
self-eval loop (below) may share `lint` / `typecheck` evidence with close via
|
|
98
|
+
`evidence-gate.js`; never stamp coverage / CRAP fresh that way.
|
|
99
|
+
|
|
100
|
+
## Acceptance self-eval before close (MUST)
|
|
101
|
+
|
|
102
|
+
After the implementation commits land and **before** flipping to `closing`, run
|
|
103
|
+
the bounded acceptance self-eval loop (see
|
|
104
|
+
[`acceptance-self-eval.md`](../workflows/helpers/acceptance-self-eval.md)). It
|
|
105
|
+
scores the working diff against **each** `acceptance[]` item and consumes the
|
|
106
|
+
`verify[]` command output as **required evidence**. The gate returns one of:
|
|
107
|
+
|
|
108
|
+
- **`proceed`** (every criterion met) → flip to `closing` and close.
|
|
109
|
+
- **`redraft`** (rounds remaining) → fix the flagged criteria, commit, re-eval.
|
|
110
|
+
- **`block`** (round cap reached, criteria still unmet) → take the blocked path.
|
|
111
|
+
Never silently proceed to close.
|
|
112
|
+
|
|
113
|
+
## Lifecycle: heartbeat & blocked (MUST)
|
|
114
|
+
|
|
115
|
+
- **Heartbeat.** Emit a `story.heartbeat` lifecycle event on every phase
|
|
116
|
+
transition (or when you stall on a long-running step) so the parent
|
|
117
|
+
`/deliver` idle watchdog can tell a live child from a dead one. In practice
|
|
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.
|
|
122
|
+
- **Blocked.** If you genuinely cannot proceed, flip the snapshot to `blocked`,
|
|
123
|
+
transition the Story to `agent::blocked`, post a `friction` comment naming
|
|
124
|
+
the decision needed (or the unmet criteria and their evidence), and **exit
|
|
125
|
+
non-zero**. **Never fall silent** — a child with no heartbeat, no commit, and
|
|
126
|
+
no `agent::blocked` label is exactly the dead-child failure the watchdog is
|
|
127
|
+
built to catch.
|
|
128
|
+
- **Anti-thrashing.** If you hit the same error class twice with the same fix,
|
|
129
|
+
or drift through reads without narrowing the problem, STOP: summarize what
|
|
130
|
+
recurred and either re-plan or take the blocked path. Do not paper over a
|
|
131
|
+
loop with another just-in-case retry.
|
|
132
|
+
|
|
133
|
+
## Land or block — the only sanctioned landing (#4483, MUST)
|
|
134
|
+
|
|
135
|
+
The Story's init envelope carries `remoteVerified` + `remoteProbe`. When
|
|
136
|
+
`remoteVerified` is `false`, transition the Story to `agent::blocked` quoting
|
|
137
|
+
`remoteProbe.detail` and stop. Implementing the Story inline outside the
|
|
138
|
+
worktree / branch / PR path — or committing it to local `main` — is expressly
|
|
139
|
+
**forbidden**. The close pipeline's push (`story-close.js`) is the only
|
|
140
|
+
sanctioned way the work lands.
|
|
141
|
+
|
|
142
|
+
## Return schema
|
|
143
|
+
|
|
144
|
+
Your authoritative status is the `story-run-progress` snapshot comment that
|
|
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:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"storyId": "<storyId>",
|
|
152
|
+
"state": "done | blocked",
|
|
153
|
+
"branch": "story-<storyId>",
|
|
154
|
+
"prUrl": "<url or null>",
|
|
155
|
+
"gates": { "acceptanceEval": "proceed | block", "close": "passed | n/a" },
|
|
156
|
+
"blockedReason": "<null, or the friction summary when state=blocked>"
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Exit zero only when the Story reached `agent::done` (merged/landed via the
|
|
161
|
+
close pipeline). Exit non-zero on any blocked terminus.
|