mandrel 2.70.0 → 2.72.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 +8 -9
- package/.agents/agents/acceptance-critic.md +1 -0
- package/.agents/agents/auditor.md +1 -0
- package/.agents/agents/plan-critic.md +1 -0
- package/.agents/agents/story-worker.md +63 -64
- package/.agents/docs/agentrc-reference.json +2 -1
- package/.agents/docs/configuration.md +7 -8
- package/.agents/rules/git-conventions-reference.md +2 -2
- package/.agents/schemas/agentrc.schema.json +19 -2
- package/.agents/schemas/story-deliver-terminal.schema.json +10 -1
- package/.agents/scripts/acceptance-eval.js +194 -15
- package/.agents/scripts/deliver-run.js +92 -43
- package/.agents/scripts/lib/audit-suite/index.js +1 -1
- package/.agents/scripts/lib/audit-suite/story-checklist.js +65 -0
- package/.agents/scripts/lib/audit-to-stories/audit-label-taxonomy.js +2 -2
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +1 -1
- package/.agents/scripts/lib/cli-args.js +22 -0
- package/.agents/scripts/lib/close-validation/gates.js +17 -3
- package/.agents/scripts/lib/config/agent-models.js +117 -0
- package/.agents/scripts/lib/config-settings-schema-delivery.js +13 -1
- package/.agents/scripts/lib/config-settings-schema-quality.js +1 -1
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/git/sync-from-base.js +89 -17
- package/.agents/scripts/lib/label-taxonomy.js +13 -3
- package/.agents/scripts/lib/notifications/notifier.js +11 -15
- package/.agents/scripts/lib/observability/close-telemetry.js +19 -3
- package/.agents/scripts/lib/observability/source-classifier.js +1 -0
- package/.agents/scripts/lib/orchestration/cancelled-run-discount.js +129 -0
- package/.agents/scripts/lib/orchestration/code-review.js +2 -2
- package/.agents/scripts/lib/orchestration/deliver-recover.js +166 -34
- package/.agents/scripts/lib/orchestration/file-assumptions.js +45 -11
- package/.agents/scripts/lib/orchestration/plan-context.js +17 -10
- package/.agents/scripts/lib/orchestration/plan-persist/changes-repair.js +130 -24
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +19 -16
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +1 -0
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +4 -3
- package/.agents/scripts/lib/orchestration/pr-watch.js +14 -3
- package/.agents/scripts/lib/orchestration/resolve-stories.js +10 -2
- package/.agents/scripts/lib/orchestration/review-providers/native.js +5 -165
- package/.agents/scripts/lib/orchestration/single-story-close/failed-terminal.js +14 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/auto-merge.js +45 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +162 -58
- package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +58 -6
- package/.agents/scripts/lib/orchestration/single-story-close/phases/merge-wait-recovery.js +296 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +20 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/post-land.js +52 -6
- package/.agents/scripts/lib/orchestration/single-story-close/phases/pull-request.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/story-branch-catch-up.js +50 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/worktree-reap.js +64 -52
- package/.agents/scripts/lib/orchestration/single-story-close/phases/worktree-restore.js +133 -0
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +187 -74
- package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +46 -6
- package/.agents/scripts/lib/orchestration/story-handoff.js +849 -0
- package/.agents/scripts/lib/orchestration/story-init-result.js +83 -0
- package/.agents/scripts/lib/orchestration/task-body-validator.js +35 -5
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +1 -1
- package/.agents/scripts/lib/orchestration/ticket-validator.js +20 -2
- package/.agents/scripts/lib/single-story/confirm-merge.js +44 -7
- package/.agents/scripts/lib/story-body/story-body.js +40 -5
- package/.agents/scripts/lib/templates/decomposer-prompts.js +33 -36
- package/.agents/scripts/pr-watch-with-update.js +5 -0
- package/.agents/scripts/single-story-close.js +8 -0
- package/.agents/scripts/single-story-confirm-merge.js +34 -3
- package/.agents/scripts/single-story-init.js +17 -32
- package/.agents/scripts/story-handoff.js +112 -0
- package/.agents/scripts/sync-claude-agents.js +58 -27
- package/.agents/workflows/helpers/acceptance-self-eval.md +24 -18
- package/.agents/workflows/helpers/code-review.md +3 -3
- package/.agents/workflows/helpers/deliver-digest.md +79 -80
- package/.agents/workflows/helpers/deliver-light.md +9 -7
- package/.agents/workflows/helpers/deliver-reference.md +38 -22
- package/.agents/workflows/helpers/deliver-story-reference.md +39 -18
- package/.agents/workflows/helpers/deliver-story.md +30 -23
- package/.agents/workflows/helpers/plan-reference.md +24 -9
- package/.agents/workflows/helpers/worktree-lifecycle.md +5 -5
- package/docs/CHANGELOG.md +31 -0
- package/lib/cli/registry.js +7 -0
- package/package.json +4 -3
- package/.agents/scripts/lib/orchestration/review-providers/scoped-lint.js +0 -272
package/.agents/README.md
CHANGED
|
@@ -510,14 +510,13 @@ ticketing provider is GitHub, resolved by `provider-factory.js` from the
|
|
|
510
510
|
`orchestration.provider` config key. CLI scripts receive provider
|
|
511
511
|
instances from the SDK surface rather than importing provider
|
|
512
512
|
implementations directly. Execution is Claude-Code-in-session — there is
|
|
513
|
-
no separate adapter abstraction;
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
hydration, planning state, label transitions, Story-close internals,
|
|
513
|
+
no separate adapter abstraction; a Story's GitHub labels and structured
|
|
514
|
+
comments are the cross-runtime contract.
|
|
515
|
+
|
|
516
|
+
There is no SDK barrel: callers import each module directly, with
|
|
517
|
+
`scripts/lib/orchestration/ticketing.js` as the authoritative ticketing SDK.
|
|
518
|
+
Key families include Story resolution and delivery (`single-story-init.js`
|
|
519
|
+
/ `single-story-close.js` internals), planning state, label transitions,
|
|
521
520
|
retro proposals, and structured error capture.
|
|
522
521
|
|
|
523
522
|
### GitHub authentication
|
|
@@ -615,7 +614,7 @@ and per-kind CLI deletion are tracked in **Epic #1943**.
|
|
|
615
614
|
|
|
616
615
|
`schemas/` contains JSON Schema draft 2020-12 contracts consumed by the
|
|
617
616
|
orchestration layer. Each schema describes one structured artefact:
|
|
618
|
-
configuration, runtime reports,
|
|
617
|
+
configuration, runtime reports, or persisted state.
|
|
619
618
|
Where a runtime AJV schema also exists, the JSON file is a mirror kept
|
|
620
619
|
in sync by a drift test.
|
|
621
620
|
|
|
@@ -5,6 +5,7 @@ description: >-
|
|
|
5
5
|
system prompt (no entry-doc / instructions.md closure). Carries the
|
|
6
6
|
load-bearing delivery MUSTs standalone. Dispatched by helpers/deliver-story
|
|
7
7
|
when delivery.routing.roleScopedAgents is enabled (the default).
|
|
8
|
+
model: inherit
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
<!--
|
|
@@ -47,10 +48,11 @@ the step-by-step. This shared core binds every role:
|
|
|
47
48
|
|
|
48
49
|
You are a **Story delivery worker**: you take one Story from init through
|
|
49
50
|
implementation to a **pushed branch**, then return. You do **not** close it —
|
|
50
|
-
your caller owns the close-and-land tail.
|
|
51
|
-
|
|
52
|
-
blocking tool-permission prompt as a harness
|
|
53
|
-
`agent::blocked` rather than
|
|
51
|
+
your caller owns the close-and-land tail. This file carries every worker
|
|
52
|
+
MUST; your mandatory reads are it, the dispatch prompt, the Story body and
|
|
53
|
+
the checklist it names. Treat a blocking tool-permission prompt as a harness
|
|
54
|
+
condition — flip to `agent::blocked` rather than wait on an approval that
|
|
55
|
+
cannot come.
|
|
54
56
|
|
|
55
57
|
## Worktree discipline (MUST)
|
|
56
58
|
|
|
@@ -58,9 +60,9 @@ blocking tool-permission prompt as a harness condition — flip to
|
|
|
58
60
|
`node .agents/scripts/single-story-init.js --story <storyId>` from the
|
|
59
61
|
**main checkout**, synchronously at max Bash timeout — the install
|
|
60
62
|
can take minutes; never background it.
|
|
61
|
-
2. Capture `workCwd` and `
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
2. Capture `workCwd` and `checklistPath` from the envelope. Anchor every
|
|
64
|
+
path at the absolute `workCwd` and work only there; never move the main
|
|
65
|
+
checkout HEAD. Read the checklist (when non-null) before writing.
|
|
64
66
|
|
|
65
67
|
## Verify branch before every commit (MUST)
|
|
66
68
|
|
|
@@ -71,59 +73,60 @@ work to `main` or outside the worktree/branch. Re-run
|
|
|
71
73
|
|
|
72
74
|
## Commit discipline
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
[`git-conventions.md`](../rules/git-conventions.md): imperative
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
Conventional Commit subjects on `story-<storyId>` per
|
|
77
|
+
[`git-conventions.md`](../rules/git-conventions.md): imperative, ≤100
|
|
78
|
+
chars, `(refs #<storyId>)`. Never bypass a hook (`--no-verify` /
|
|
79
|
+
`--no-gpg-sign`); if one fails, fix the cause in a follow-up commit, never
|
|
80
|
+
amend. Docs are digest-first: read the digest your caller passes and pull
|
|
81
|
+
files on demand; a null digest path means no docs mandate.
|
|
82
|
+
|
|
83
|
+
## Acceptance self-eval (MUST)
|
|
84
|
+
|
|
85
|
+
Once the implementation is committed, run
|
|
86
|
+
`node <main-repo>/.agents/scripts/acceptance-eval.js --story <storyId> --init --cwd <workCwd>`.
|
|
87
|
+
It writes the verdict skeleton — one empty record per `acceptance[]` item —
|
|
88
|
+
and prints its path, the derived change set `files` and the `verdictOwner`.
|
|
89
|
+
Under the default profile the owner is **you**: fill every record, scoring
|
|
90
|
+
that `files` set — never one you re-derive — with `verify[]` output as
|
|
91
|
+
evidence, and score it in one call (`--verdict <path>`). Under `strict` the
|
|
92
|
+
owner is a fresh critic
|
|
93
|
+
([`acceptance-self-eval.md`](../workflows/helpers/acceptance-self-eval.md));
|
|
94
|
+
hand it that same `files` list. **proceed** → the handoff; **redraft** → fix,
|
|
95
|
+
commit, re-init, re-score; **block** → the blocked path. Never hand off an
|
|
96
|
+
unscored branch.
|
|
97
|
+
|
|
98
|
+
## Close gates — one credited run, via `story-handoff.js`
|
|
79
99
|
|
|
80
|
-
|
|
100
|
+
`single-story-close.js` runs the canonical close-validation chain
|
|
101
|
+
(**typecheck, lint, test, format, maintainability, coverage, crap**) and is
|
|
102
|
+
the authoritative gate — do not pre-run it. Your whole tail is one command:
|
|
81
103
|
|
|
82
|
-
|
|
83
|
-
digest your caller passes, then pull files on demand at the lines it
|
|
84
|
-
names. A null digest path means no docs mandate.
|
|
104
|
+
`node <main-repo>/.agents/scripts/story-handoff.js --story <storyId> --cwd <workCwd>`
|
|
85
105
|
|
|
86
|
-
|
|
106
|
+
It runs the blocking preflight, the base merge, the one credited run, the
|
|
107
|
+
`--seat-missing` seat, the push with its remote-ref check, and the held
|
|
108
|
+
review, then prints one envelope (what each step runs:
|
|
109
|
+
[`deliver-digest.md`](../workflows/helpers/deliver-digest.md) § 5).
|
|
110
|
+
`ready` → return. `fix-required` (exit 2) → fix the cause it names, commit,
|
|
111
|
+
re-run it; the same cause surviving the same fix twice is your blocked path.
|
|
112
|
+
`blocked` (exit 1) → it already flipped `agent::blocked`; exit non-zero.
|
|
87
113
|
|
|
88
|
-
|
|
89
|
-
(**typecheck, lint, test, format, maintainability, coverage, crap**) and is
|
|
90
|
-
the authoritative gate — do not pre-run it. Two exceptions, both run in
|
|
91
|
-
`<workCwd>` exactly as
|
|
92
|
-
[`deliver-digest.md`](../workflows/helpers/deliver-digest.md) § 5 states them:
|
|
93
|
-
the **blocking** lint + quality-preview preflight, then the one credited run
|
|
94
|
-
(the coverage capture or the test depositor, as § 5 picks), once after the
|
|
95
|
-
self-eval loop's last fix commit, then the `--seat-missing` baseline seat
|
|
96
|
-
before push. That section is their only home, so read the invocations there
|
|
97
|
-
rather than from a copy here.
|
|
98
|
-
|
|
99
|
-
If the run outruns the host's sync Bash ceiling, dispatch it in the
|
|
114
|
+
If it outruns the host's sync Bash ceiling, dispatch it in the
|
|
100
115
|
**background**: its completion re-invokes you. Never spawn a task to poll or
|
|
101
116
|
`sleep`-loop against it; a waiter with a wrong condition outlives the agent.
|
|
102
|
-
An exit code is never evidence a gate did work — its **output** is
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
An exit code is never evidence a gate did work — its **output** is: read the
|
|
118
|
+
envelope's per-step outcomes and credit. Redraft rounds run the scoped
|
|
119
|
+
projects for the roots you changed plus `verify[]`, not the whole suite, and
|
|
120
|
+
never stamp coverage / CRAP fresh any other way.
|
|
105
121
|
|
|
106
122
|
Gate output that lies (mandrel's own repo): `docs/contributing/known-tooling-behavior.md`.
|
|
107
123
|
Waiter traps: [`parallel-tooling.md`](../workflows/helpers/parallel-tooling.md) Rule 2.
|
|
108
124
|
|
|
109
|
-
## Acceptance self-eval before close (MUST)
|
|
110
|
-
|
|
111
|
-
**Before** flipping to `closing`, run the bounded self-eval loop
|
|
112
|
-
([`acceptance-self-eval.md`](../workflows/helpers/acceptance-self-eval.md)).
|
|
113
|
-
Derive the change set and the verdict owner with
|
|
114
|
-
`node <main-repo>/.agents/scripts/ceremony-derive.js --story <storyId> --cwd <workCwd>`.
|
|
115
|
-
Under the default profile the owner is **you**: author **one** verdict file
|
|
116
|
-
covering every `acceptance[]` item, scoring the derived `files` set — never
|
|
117
|
-
one you re-derive — with `verify[]` output as evidence, and score it in one
|
|
118
|
-
gate call. Under `strict` the owner is a fresh critic; hand it that same
|
|
119
|
-
`files` list. **proceed** → flip to `closing`, run the suite, push, hand off;
|
|
120
|
-
**redraft** → fix the criteria, commit, re-eval; **block** → take the
|
|
121
|
-
blocked path below. Never hand off an unscored branch.
|
|
122
|
-
|
|
123
125
|
## Lifecycle: progress & blocked (MUST)
|
|
124
126
|
|
|
125
|
-
- **Progress.** One terse line per phase
|
|
126
|
-
`Story #<id>: implementing →
|
|
127
|
+
- **Progress.** One terse line per phase (e.g.
|
|
128
|
+
`Story #<id>: implementing → pushed`), not a label: the Story stays
|
|
129
|
+
`agent::executing` until close opens the PR.
|
|
127
130
|
- **Blocked.** When you cannot proceed, transition the Story to
|
|
128
131
|
`agent::blocked`, post a `friction` comment naming the decision needed
|
|
129
132
|
(or the unmet criteria and their evidence), and **exit non-zero**.
|
|
@@ -132,25 +135,21 @@ blocked path below. Never hand off an unscored branch.
|
|
|
132
135
|
|
|
133
136
|
## Land or block — the only sanctioned landing (MUST)
|
|
134
137
|
|
|
135
|
-
|
|
136
|
-
`
|
|
137
|
-
`
|
|
138
|
-
the only sanctioned landing.
|
|
138
|
+
`remoteVerified: false` in the init envelope → flip to `agent::blocked`
|
|
139
|
+
quoting `remoteProbe.detail` and stop. A PR opened by
|
|
140
|
+
`single-story-close.js` is the only sanctioned landing.
|
|
139
141
|
|
|
140
142
|
## Your turn ends at a pushed branch (MUST)
|
|
141
143
|
|
|
142
|
-
You do **not** run close.
|
|
143
|
-
the remote ref
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
close for you. If the push fails, take the blocked path above. After
|
|
148
|
-
the push, compute the held review and fix a CRITICAL before returning
|
|
149
|
-
([`deliver-reference.md`](../workflows/helpers/deliver-reference.md) § Held review).
|
|
144
|
+
You do **not** run close. `story-handoff.js` is how you push `story-<storyId>`
|
|
145
|
+
to `origin` and confirm the remote ref equals HEAD; then return. The
|
|
146
|
+
orchestrator runs `single-story-close.js` in its own session, serialized
|
|
147
|
+
against your siblings. Do not open the PR, flip `agent::done`, or spawn a
|
|
148
|
+
child to close for you.
|
|
150
149
|
|
|
151
150
|
## Return contract — the hand-off report
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
tally. Say the branch is pushed and unclosed. Never hand-compose
|
|
156
|
-
terminal envelope — inventing one makes an unlanded Story look landed.
|
|
152
|
+
Return the `ready` envelope `story-handoff.js` printed, plus the self-eval
|
|
153
|
+
verdict and `verify[]` evidence: Story id, `workCwd`, branch, pushed head
|
|
154
|
+
SHA, review tally. Say the branch is pushed and unclosed. Never hand-compose
|
|
155
|
+
a terminal envelope — inventing one makes an unlanded Story look landed.
|
|
@@ -237,7 +237,7 @@ Everything `/mandrel-deliver` and `single-story-close` consume: worktree isolati
|
|
|
237
237
|
| `mergeWatch.maxWaitSeconds` | No | `integer` | — | Per-invocation merge-wait bound (seconds). Default 300 (5 minutes) — chosen to fit inside a single host tool invocation (~10 min ceiling) alongside the close gates that precede the wait. Expiry yields `pending` (exit 3), never a block. Headless callers with no host ceiling raise this to land in one block. |
|
|
238
238
|
| `mergeWatch.maxBudgetSeconds` | No | `integer` | `3600` | Cumulative wall-clock budget (seconds) across merge-wait resumes, anchored at the PR's createdAt. Default 3600 (60 minutes). Exhausting this classifies the block and transitions the Story to agent::blocked. |
|
|
239
239
|
| `codeReview` | No | `object` | — | Review-provider chain and on-branch remediation threshold for the /mandrel-deliver code-review ceremony. |
|
|
240
|
-
| `codeReview.providers[]` | No | `array<object>` | `[{"name":"native"},{"name":"code-review","scopes":["story"],"optional":true}]` | Review-provider chain (Story #2871). When unset or empty, falls back to this default: `native` (
|
|
240
|
+
| `codeReview.providers[]` | No | `array<object>` | `[{"name":"native"},{"name":"code-review","scopes":["story"],"optional":true}]` | Review-provider chain (Story #2871). When unset or empty, falls back to this default: `native` (maintainability scoring of the changed files) then an optional story-scoped `code-review` — a low-effort `claude --print` bug review whose every finding is critical and halts close before auto-merge; hosts without the `claude` CLI skip it. `security-review` and `ultrareview` are opt-in. The orchestrator iterates inline entries in declaration order and merges their Finding[] before posting one structured comment; manual-prompt entries (e.g. ultrareview) contribute a trailing 'Manual review suggestions' section. Selecting an adapter whose probe fails hard-fails at factory construction unless declared `optional: true` in the chain. Each item has: name, scopes, optional, manualPrompt, when. |
|
|
241
241
|
| `codeReview.autoFixSeverity` | No | `"high"` \| `"medium"` | `"medium"` | Severity threshold for on-branch remediation in /mandrel-deliver Phase 5 (code-review). `medium` (default) routes 🔴/🟠/🟡 findings into the host-LLM focused-fix routing (Mediums batched per lens: one commit per lens, a single validation + rescan at the end) while 🟢 suggestions still graduate to follow-up issues; `high` reproduces the pre-4399 Critical/High-only routing. Hard cutover — no back-compat flag. |
|
|
242
242
|
| `refactorStage` | No | `object` | — | Opt-in, config-gated post-green refactor checkpoint wired into story-deliver (Story #3430, Epic #3418). Strictly additive and default-OFF: when disabled, story-deliver behaves exactly as before. Advisory only — never changes existing close-validation gate semantics. |
|
|
243
243
|
| `refactorStage.enabled` | No | `boolean` | `false` | When true, story-deliver runs an advisory post-green refactor stage (core/code-review-and-quality skill, Post-Green Refactor Pass) after the suite is green. Default false — when unset the stage is skipped and close-validation gate semantics are unchanged. |
|
|
@@ -246,7 +246,7 @@ Everything `/mandrel-deliver` and `single-story-close` consume: worktree isolati
|
|
|
246
246
|
| `feedbackLoop` | No | `object` | — | Opt-in toggle for the close-time retro auto-file graduator. Auto-filing defaults to OFF (Story #5341). |
|
|
247
247
|
| `feedbackLoop.retroProposals` | No | `boolean` | `false` | When true, the retro auto-files its actionable routed proposals as meta::<framework-gap\|consumer-improvement> + friction::<category> issues via the graduator pre-parsed-findings seam, and the rendered retro sections list the filed issue numbers instead of paste-ready gh command stanzas. Defaults to false (Story #5341), which renders the command stanzas instead. |
|
|
248
248
|
| `ci` | No | `object` | — | CI-aware delivery namespace (Story #4356, Epic #4355): the merge posture and the advisory-check policy. |
|
|
249
|
-
| `ci.autoMerge` | No | `"trust-ci"` \| `"strict"` | `"trust-ci"` | Story #4356 (Epic #4355). Merge posture. 'trust-ci' (default) merges once required checks pass; 'strict'
|
|
249
|
+
| `ci.autoMerge` | No | `"trust-ci"` \| `"strict"` | `"trust-ci"` | Story #4356 (Epic #4355). Merge posture. 'trust-ci' (default) merges once required checks pass; 'strict' skips arming auto-merge, so the operator owns the merge; it adds no review gate. |
|
|
250
250
|
| `ci.blockOnAdvisoryFailure` | No | `boolean` | `true` | Story #5096. When true (default), delivery refuses to arm — and disarms — GitHub native auto-merge while a non-required (advisory) check is genuinely red on the PR head and GitHub reports the PR mergeable anyway (mergeStateStatus=UNSTABLE). `--auto` waits on REQUIRED contexts only, so without this a red advisory quality gate merges unattended. Set false to restore the pre-#5096 behaviour verbatim. |
|
|
251
251
|
| `ci.advisoryAllowlist` | No | `array<string>` | `[]` | Story #5096. Check-run names exempt from blockOnAdvisoryFailure — a red run whose name matches exactly never blocks arming. Matching is exact; an unnamed run can never match and always blocks. |
|
|
252
252
|
| `ci.rerunAdvisory` | No | `integer` | `0` | Story #5266. How many times close may re-run a failed advisory workflow run before blocking on it, per close invocation. Default 0: close spends no CI minutes and issues no GitHub mutation on an advisory red unless asked. At n > 0 the failed run(s) are re-run within that allowance and the merge wait re-polls inside its existing budget, landing or blocking on the re-run verdict. Overridden per invocation by --rerun-advisory <n>. |
|
|
@@ -254,6 +254,7 @@ Everything `/mandrel-deliver` and `single-story-close` consume: worktree isolati
|
|
|
254
254
|
| `routing.roleScopedAgents` | No | `boolean` | `true` | Epic #4478 (M7-B). Kill-switch for the role-scoped boot contexts. When true (default), a converted delivery spawn (`story-worker`, `acceptance-critic`) boots on its own `.claude/agents/<role>.md` system prompt instead of re-paying the full entry-doc (AGENTS.md or CLAUDE.md) @-import closure. When false, every converted spawn falls back to `subagent_type: general-purpose` — the instant, code-rollback-free per-consumer revert, and the universal escape for hosts that ignore `.claude/agents/`. The fallback is the full-closure agent that ran before M7-B, so flipping it off never drops a gate. |
|
|
255
255
|
| `routing.ceremonyProfile` | No | `"minimal"` \| `"standard"` \| `"strict"` | `"standard"` | Acceptance-ceremony depth — who authors the Story acceptance verdict. minimal and standard (default) = the inline self-eval, whatever the diff touches; strict = a fresh-context maker-blind critic. Review depth is a separate decision and still derives `deep` for any sensitive path (review-depth.js). |
|
|
256
256
|
| `routing.closeAndLand` | No | `boolean` | `true` | When true (default), single-story-close lands through merge in one close. Opt out per-run with --no-wait-merge. |
|
|
257
|
+
| `routing.agentModels` | No | `object<map>` | `{}` | Per-role model override for the role-scoped agents, keyed by role name (`story-worker`, `acceptance-critic`, `plan-critic`, `auditor`; any other key is a validation error). A value is a Claude Code agent model: an alias (`sonnet`, `opus`, `haiku`), a full model id, or `inherit` (the operator's session model). It replaces the role file's `model:` frontmatter default when `sync-claude-agents` projects `.claude/agents/<role>.md`. Defaults: story-worker, acceptance-critic and plan-critic `inherit` (a checker runs at least as strong as the maker); auditor `sonnet` (a read-heavy lens sweep). Nothing here selects or changes the operator's session model, and a one-Story run stays inline in that session. A multi-Story close records the dispatched story-worker's resolved model as `telemetry.workerModel` beside `workerTokens` (null for an inline close), so opting workers down, e.g. `{ "story-worker": "sonnet" }`, is decided from measured outcomes. |
|
|
257
258
|
|
|
258
259
|
### `qa` (optional)
|
|
259
260
|
|
|
@@ -320,11 +321,9 @@ names or defaults.
|
|
|
320
321
|
|
|
321
322
|
### `planning`
|
|
322
323
|
|
|
323
|
-
Defaults are **advisory, not Story-width ceilings**.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
envelope, and cohesion / split policy / conflict advisories are the primary
|
|
327
|
-
sizing signal.
|
|
324
|
+
Defaults are **advisory, not Story-width ceilings**. There is no token
|
|
325
|
+
ceiling and no `maxTokenBudget` envelope: sizing is cohesion-only, with split
|
|
326
|
+
policy and conflict advisories as its signals.
|
|
328
327
|
|
|
329
328
|
There is no snapshot knob to tune: Story #4811 retired the structural-snapshot
|
|
330
329
|
block outright. Spec authoring is grounded by the author's own targeted repo
|
|
@@ -626,7 +625,7 @@ Claude Code web environment-variables UI for web sessions.
|
|
|
626
625
|
| Variable | Required? | Purpose |
|
|
627
626
|
| -------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
628
627
|
| `GITHUB_TOKEN` | Yes\* | GitHub API auth for all ticketing operations. `GH_TOKEN` is accepted as a synonym. `gh auth token` is a fallback for local sessions. |
|
|
629
|
-
| `NOTIFICATION_WEBHOOK_URL` | No | POST target for in-band Notifier events (Make.com / Slack / Discord). Unset disables the webhook channel;
|
|
628
|
+
| `NOTIFICATION_WEBHOOK_URL` | No | POST target for in-band Notifier events (Make.com / Slack / Discord). Unset disables the webhook channel; the GitHub comment channel still fires. |
|
|
630
629
|
| `WEBHOOK_SECRET` | No | Shared secret used to sign outbound webhook payloads as `X-Signature-256: sha256=<hmac>`. Unset ships unsigned payloads. |
|
|
631
630
|
| `MANDREL_ALLOW_TEST_WEBHOOKS` | No | Set to `1` to keep `NOTIFICATION_WEBHOOK_URL` live inside `npm test` / `npm run test:profile`. Default behaviour scrubs the env var from the test child so no URL resolves and the webhook never fires (see below). |
|
|
632
631
|
| `MANDREL_POOL_CONCURRENCY` | No | Upper bound on the width of every `runOnPool` worker pool in the process (the MI and CRAP scan pools). Precedence is: a caller's explicit `concurrency` → this variable → a clamp of 4 under `node:test` → `os.availableParallelism()`. Set it on a constrained or shared runner where one pool per core oversubscribes the host; a non-numeric value is ignored rather than collapsing the pool. |
|
|
@@ -129,8 +129,8 @@ pushing `story-<id>` and opening a PR. Two guards remain, and they cover
|
|
|
129
129
|
different hazards:
|
|
130
130
|
|
|
131
131
|
- **Per-Story lease** (`lib/orchestration/single-story-lease-guard.js`). The
|
|
132
|
-
standalone path has
|
|
133
|
-
|
|
132
|
+
standalone path has nothing else to serialize two operators driving the
|
|
133
|
+
**same** Story, so `single-story-init.js` takes an
|
|
134
134
|
exclusive, time-bounded lease on the Story ticket (assignee-as-lease) and
|
|
135
135
|
clears it at close. It **fails closed** on a foreign assignee — there is no
|
|
136
136
|
heartbeat ledger to judge staleness from — so a foreign holder always blocks
|
|
@@ -1282,7 +1282,7 @@
|
|
|
1282
1282
|
},
|
|
1283
1283
|
"additionalProperties": false
|
|
1284
1284
|
},
|
|
1285
|
-
"description": "Review-provider chain (Story #2871). When unset or empty, falls back to this default: `native` (
|
|
1285
|
+
"description": "Review-provider chain (Story #2871). When unset or empty, falls back to this default: `native` (maintainability scoring of the changed files) then an optional story-scoped `code-review` — a low-effort `claude --print` bug review whose every finding is critical and halts close before auto-merge; hosts without the `claude` CLI skip it. `security-review` and `ultrareview` are opt-in. The orchestrator iterates inline entries in declaration order and merges their Finding[] before posting one structured comment; manual-prompt entries (e.g. ultrareview) contribute a trailing 'Manual review suggestions' section. Selecting an adapter whose probe fails hard-fails at factory construction unless declared `optional: true` in the chain.",
|
|
1286
1286
|
"default": [
|
|
1287
1287
|
{
|
|
1288
1288
|
"name": "native"
|
|
@@ -1347,7 +1347,7 @@
|
|
|
1347
1347
|
"autoMerge": {
|
|
1348
1348
|
"type": "string",
|
|
1349
1349
|
"enum": ["trust-ci", "strict"],
|
|
1350
|
-
"description": "Story #4356 (Epic #4355). Merge posture. 'trust-ci' (default) merges once required checks pass; 'strict'
|
|
1350
|
+
"description": "Story #4356 (Epic #4355). Merge posture. 'trust-ci' (default) merges once required checks pass; 'strict' skips arming auto-merge, so the operator owns the merge; it adds no review gate.",
|
|
1351
1351
|
"default": "trust-ci"
|
|
1352
1352
|
},
|
|
1353
1353
|
"blockOnAdvisoryFailure": {
|
|
@@ -1391,6 +1391,23 @@
|
|
|
1391
1391
|
"type": "boolean",
|
|
1392
1392
|
"description": "When true (default), single-story-close lands through merge in one close. Opt out per-run with --no-wait-merge.",
|
|
1393
1393
|
"default": true
|
|
1394
|
+
},
|
|
1395
|
+
"agentModels": {
|
|
1396
|
+
"type": "object",
|
|
1397
|
+
"description": "Per-role model override for the role-scoped agents, keyed by role name (`story-worker`, `acceptance-critic`, `plan-critic`, `auditor`; any other key is a validation error). A value is a Claude Code agent model: an alias (`sonnet`, `opus`, `haiku`), a full model id, or `inherit` (the operator's session model). It replaces the role file's `model:` frontmatter default when `sync-claude-agents` projects `.claude/agents/<role>.md`. Defaults: story-worker, acceptance-critic and plan-critic `inherit` (a checker runs at least as strong as the maker); auditor `sonnet` (a read-heavy lens sweep). Nothing here selects or changes the operator's session model, and a one-Story run stays inline in that session. A multi-Story close records the dispatched story-worker's resolved model as `telemetry.workerModel` beside `workerTokens` (null for an inline close), so opting workers down, e.g. `{ \"story-worker\": \"sonnet\" }`, is decided from measured outcomes.",
|
|
1398
|
+
"propertyNames": {
|
|
1399
|
+
"enum": [
|
|
1400
|
+
"story-worker",
|
|
1401
|
+
"acceptance-critic",
|
|
1402
|
+
"plan-critic",
|
|
1403
|
+
"auditor"
|
|
1404
|
+
]
|
|
1405
|
+
},
|
|
1406
|
+
"additionalProperties": {
|
|
1407
|
+
"type": "string",
|
|
1408
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
1409
|
+
},
|
|
1410
|
+
"default": {}
|
|
1394
1411
|
}
|
|
1395
1412
|
},
|
|
1396
1413
|
"additionalProperties": false
|
|
@@ -67,7 +67,11 @@
|
|
|
67
67
|
null
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
|
-
"autoMergeEnabled": { "type": ["boolean", "null"] }
|
|
70
|
+
"autoMergeEnabled": { "type": ["boolean", "null"] },
|
|
71
|
+
"autoMergeReason": {
|
|
72
|
+
"type": ["string", "null"],
|
|
73
|
+
"description": "Story #5533 — why close did not arm (disabled-by-flag, disabled-by-policy-strict, an arm failure), or null when it armed. With autoMergeEnabled it is the evidence a resumed wait needs before it may re-arm a PR a new head disarmed: an operator-owned merge is never re-armed."
|
|
74
|
+
}
|
|
71
75
|
},
|
|
72
76
|
"additionalProperties": false
|
|
73
77
|
},
|
|
@@ -85,6 +89,7 @@
|
|
|
85
89
|
"required": [
|
|
86
90
|
"followUps",
|
|
87
91
|
"statusResync",
|
|
92
|
+
"worktreeReap",
|
|
88
93
|
"refCleanup",
|
|
89
94
|
"baseFastForward",
|
|
90
95
|
"tempPurge",
|
|
@@ -94,6 +99,10 @@
|
|
|
94
99
|
"properties": {
|
|
95
100
|
"followUps": { "type": "boolean" },
|
|
96
101
|
"statusResync": { "type": "boolean" },
|
|
102
|
+
"worktreeReap": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"description": "Story #5533 — the Story worktree was reaped. Worktree lifetime is Story lifetime: the close pipeline no longer reaps, so a pending, blocked or failed close keeps its working copy, and this step — run under the post-land lock BEFORE refCleanup, because git branch -D refuses a branch a live worktree holds — is the one place it is removed. Nothing to reap, or delivery.worktreeIsolation.reapOnSuccess false, reports true (details.worktreeReap says which); a refused reap (a dirty tree) reports false, and like every tail step that degrades the report, never the land."
|
|
105
|
+
},
|
|
97
106
|
"refCleanup": { "type": "boolean" },
|
|
98
107
|
"baseFastForward": { "type": "boolean" },
|
|
99
108
|
"tempPurge": {
|