mandrel 2.111.0 → 2.113.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/agents/acceptance-critic.md +14 -0
- package/.agents/agents/auditor.md +14 -0
- package/.agents/agents/plan-critic.md +5 -0
- package/.agents/agents/story-worker.md +4 -1
- package/.agents/docs/agentrc-reference.json +22 -10
- package/.agents/docs/configuration.md +367 -37
- package/.agents/docs/execution-reference.md +11 -0
- package/.agents/rules/git-conventions-reference.md +7 -0
- package/.agents/schemas/agentrc.schema.json +174 -14
- package/.agents/schemas/baselines/baseline-envelope.schema.json +16 -4
- package/.agents/schemas/baselines/bundle-size.schema.json +1 -0
- package/.agents/schemas/baselines/coverage.schema.json +1 -0
- package/.agents/schemas/baselines/crap.schema.json +37 -10
- package/.agents/schemas/baselines/duplication.schema.json +1 -0
- package/.agents/schemas/baselines/maintainability.schema.json +1 -0
- package/.agents/schemas/baselines/mutation.schema.json +1 -0
- package/.agents/schemas/crap-report.schema.json +6 -5
- package/.agents/schemas/story-deliver-terminal.schema.json +41 -2
- package/.agents/schemas/story-progress.schema.json +1 -1
- package/.agents/schemas/validation-evidence.schema.json +2 -2
- package/.agents/scripts/boot-sweep.js +41 -3
- package/.agents/scripts/coverage-capture.js +37 -3
- package/.agents/scripts/coverage-ratchet.js +106 -0
- package/.agents/scripts/evidence-gate.js +84 -21
- package/.agents/scripts/lib/audit-baselines/read.js +8 -1
- package/.agents/scripts/lib/audit-baselines/trend.js +2 -1
- package/.agents/scripts/lib/baseline-loader.js +4 -2
- package/.agents/scripts/lib/baselines/codec.js +57 -0
- package/.agents/scripts/lib/baselines/crap-preview-incremental.js +8 -3
- package/.agents/scripts/lib/baselines/crap-preview-scan.js +10 -16
- package/.agents/scripts/lib/baselines/crap-updater-cli.js +4 -13
- package/.agents/scripts/lib/baselines/kernel.js +19 -1
- package/.agents/scripts/lib/baselines/kinds/_crap-codec.js +171 -0
- package/.agents/scripts/lib/baselines/kinds/_crap-read.js +56 -16
- package/.agents/scripts/lib/baselines/kinds/_shared-metric.js +0 -59
- package/.agents/scripts/lib/baselines/kinds/crap.js +283 -319
- package/.agents/scripts/lib/baselines/merge-envelopes.js +46 -1
- package/.agents/scripts/lib/baselines/preview-gates.js +29 -10
- package/.agents/scripts/lib/baselines/reader.js +36 -9
- package/.agents/scripts/lib/baselines/refresh-service.js +93 -21
- package/.agents/scripts/lib/baselines/seat-missing.js +173 -7
- package/.agents/scripts/lib/baselines/writer.js +36 -21
- package/.agents/scripts/lib/changed-files.js +70 -6
- package/.agents/scripts/lib/child-exec.js +10 -0
- package/.agents/scripts/lib/claude/agents-projection.js +5 -5
- package/.agents/scripts/lib/close-lock-events.js +8 -3
- package/.agents/scripts/lib/close-validation/ci-deferral.js +40 -0
- package/.agents/scripts/lib/close-validation/gates.js +111 -35
- package/.agents/scripts/lib/close-validation/process.js +16 -7
- package/.agents/scripts/lib/close-validation/projections/crap.js +43 -10
- package/.agents/scripts/lib/close-validation/runner.js +55 -23
- package/.agents/scripts/lib/close-validation/skip-branch-test.js +144 -0
- package/.agents/scripts/lib/close-validation/test-delta.js +33 -8
- package/.agents/scripts/lib/codex/agents-projection.js +6 -0
- package/.agents/scripts/lib/config/agentrc-overlay.js +9 -5
- package/.agents/scripts/lib/config/explain.js +5 -2
- package/.agents/scripts/lib/config/gates/coverage.schema.js +45 -1
- package/.agents/scripts/lib/config/gates/crap-incremental-coverage.schema.js +1 -1
- package/.agents/scripts/lib/config/git-roots.js +38 -4
- package/.agents/scripts/lib/config/handoff.js +24 -0
- package/.agents/scripts/lib/config/quality.js +26 -13
- package/.agents/scripts/lib/config/worktree-isolation.js +2 -5
- package/.agents/scripts/lib/config-resolver.js +22 -2
- package/.agents/scripts/lib/config-settings-schema-delivery.js +87 -4
- package/.agents/scripts/lib/config-settings-schema-quality.js +36 -1
- package/.agents/scripts/lib/config-settings-schema.js +1 -1
- package/.agents/scripts/lib/coverage-capture-affected.js +1 -0
- package/.agents/scripts/lib/coverage-capture-delta.js +164 -32
- package/.agents/scripts/lib/coverage-capture-own-fix.js +232 -0
- package/.agents/scripts/lib/coverage-capture-usage.js +2 -2
- package/.agents/scripts/lib/coverage-capture.js +15 -0
- package/.agents/scripts/lib/coverage-deferral.js +96 -0
- package/.agents/scripts/lib/coverage-ratchet.js +187 -0
- package/.agents/scripts/lib/crap-baseline-join.js +5 -5
- package/.agents/scripts/lib/crap-engine.js +3 -3
- package/.agents/scripts/lib/crap-method-identity.js +104 -48
- package/.agents/scripts/lib/error-redactor.js +20 -0
- package/.agents/scripts/lib/escomplex-anchor.js +135 -0
- package/.agents/scripts/lib/escomplex-kernel.js +30 -1
- package/.agents/scripts/lib/failure-rows.js +121 -0
- package/.agents/scripts/lib/full-suite-lock.js +44 -4
- package/.agents/scripts/lib/full-suite-queue.js +89 -13
- package/.agents/scripts/lib/generated/agentrc-validator.js +8 -2
- package/.agents/scripts/lib/gh-env.js +3 -6
- package/.agents/scripts/lib/gh-pr-rest.js +1 -0
- package/.agents/scripts/lib/git/base-sync-probe.js +182 -0
- package/.agents/scripts/lib/git/baseline-conflict-rows.js +60 -0
- package/.agents/scripts/lib/git/sync-from-base.js +18 -9
- package/.agents/scripts/lib/git-branch-lifecycle.js +9 -0
- package/.agents/scripts/lib/observability/close-telemetry.js +37 -2
- package/.agents/scripts/lib/observability/handoff-telemetry.js +170 -0
- package/.agents/scripts/lib/observability/review-dispositions.js +23 -6
- package/.agents/scripts/lib/observability/runtime-friction.js +17 -4
- package/.agents/scripts/lib/observability/source-classifier.js +3 -0
- package/.agents/scripts/lib/observability/story-outcome.js +393 -0
- package/.agents/scripts/lib/orchestration/check-baselines/phases/compare.js +2 -1
- package/.agents/scripts/lib/orchestration/check-baselines/phases/evaluate.js +19 -1
- package/.agents/scripts/lib/orchestration/check-baselines/phases/fail-detail.js +84 -0
- package/.agents/scripts/lib/orchestration/check-baselines/phases/pipeline.js +14 -5
- package/.agents/scripts/lib/orchestration/check-baselines/phases/refresh-ack.js +3 -2
- package/.agents/scripts/lib/orchestration/check-baselines/phases/report.js +26 -6
- package/.agents/scripts/lib/orchestration/code-review.js +223 -19
- package/.agents/scripts/lib/orchestration/handoff-gates.js +129 -62
- package/.agents/scripts/lib/orchestration/handoff-rescore.js +170 -0
- package/.agents/scripts/lib/orchestration/handoff-suite-of-record.js +45 -0
- package/.agents/scripts/lib/orchestration/preflight-lanes.js +208 -0
- package/.agents/scripts/lib/orchestration/review-base-ref.js +40 -17
- package/.agents/scripts/lib/orchestration/review-deposit.js +38 -12
- package/.agents/scripts/lib/orchestration/review-depth.js +21 -0
- package/.agents/scripts/lib/orchestration/review-history.js +124 -20
- package/.agents/scripts/lib/orchestration/review-providers/claude-verdict.js +41 -12
- package/.agents/scripts/lib/orchestration/review-providers/code-review.js +90 -39
- package/.agents/scripts/lib/orchestration/review-providers/critical-verifier.js +64 -11
- package/.agents/scripts/lib/orchestration/review-providers/degraded-gates.js +102 -3
- package/.agents/scripts/lib/orchestration/review-providers/finding-identity.js +6 -2
- package/.agents/scripts/lib/orchestration/review-providers/findings-renderer.js +55 -8
- package/.agents/scripts/lib/orchestration/review-providers/review-guidance.js +1 -0
- package/.agents/scripts/lib/orchestration/review-providers/review-provider-factory.js +42 -15
- package/.agents/scripts/lib/orchestration/review-providers/types.js +6 -0
- package/.agents/scripts/lib/orchestration/single-story-close/failed-terminal.js +10 -1
- package/.agents/scripts/lib/orchestration/single-story-close/gate-log.js +10 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +7 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +16 -3
- package/.agents/scripts/lib/orchestration/single-story-close/phases/code-review.js +59 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +6 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/finish.js +15 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/land-review-record.js +213 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/normalize-pr-title.js +9 -12
- package/.agents/scripts/lib/orchestration/single-story-close/phases/open-pr.js +26 -12
- package/.agents/scripts/lib/orchestration/single-story-close/phases/post-land.js +51 -26
- package/.agents/scripts/lib/orchestration/single-story-close/phases/pre-gate-steps.js +2 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/pre-push.js +3 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/pull-request.js +50 -17
- package/.agents/scripts/lib/orchestration/single-story-close/phases/push.js +59 -11
- package/.agents/scripts/lib/orchestration/single-story-close/phases/reconcile-done.js +1 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-block.js +31 -13
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-halt.js +29 -6
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-outcome.js +10 -12
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-override.js +19 -4
- package/.agents/scripts/lib/orchestration/single-story-close/result.js +30 -13
- package/.agents/scripts/lib/orchestration/single-story-close/review-overlap.js +73 -39
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +11 -3
- package/.agents/scripts/lib/orchestration/story-close/baseline-upward-writeback.js +3 -2
- package/.agents/scripts/lib/orchestration/story-close/duplication-close-rescore.js +77 -15
- package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +7 -0
- package/.agents/scripts/lib/orchestration/story-handoff.js +796 -196
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +2 -0
- package/.agents/scripts/lib/pr-body-lines.js +32 -0
- package/.agents/scripts/lib/single-story/ci-ratchet-gate.js +140 -0
- package/.agents/scripts/lib/single-story/confirm-and-land.js +17 -7
- package/.agents/scripts/lib/single-story/confirm-merge.js +12 -3
- package/.agents/scripts/lib/single-story-sweep/report-stalled-executing.js +202 -0
- package/.agents/scripts/lib/standalone-ratchets.js +37 -0
- package/.agents/scripts/lib/suite-admission.js +20 -8
- package/.agents/scripts/lib/suite-sizing.js +146 -0
- package/.agents/scripts/lib/workspace-provisioner.js +2 -2
- package/.agents/scripts/merge-baseline.js +14 -3
- package/.agents/scripts/providers/github/comments.js +19 -3
- package/.agents/scripts/providers/github.js +1 -0
- package/.agents/scripts/review-dispositions-report.js +1 -1
- package/.agents/scripts/role-scope-guard.js +267 -0
- package/.agents/scripts/single-story-close.js +4 -4
- package/.agents/scripts/single-story-confirm-merge.js +31 -5
- package/.agents/scripts/single-story-init.js +24 -4
- package/.agents/scripts/story-handoff.js +3 -3
- package/.agents/scripts/story-outcomes-report.js +231 -0
- package/.agents/scripts/story-review-compute.js +9 -5
- package/.agents/scripts/update-coverage-baseline.js +12 -2
- package/.agents/scripts/update-crap-baseline.js +9 -1
- package/.agents/workflows/helpers/code-review.md +63 -9
- package/.agents/workflows/helpers/deliver-digest.md +53 -54
- package/.agents/workflows/helpers/deliver-reference.md +233 -67
- package/.agents/workflows/helpers/deliver-story-reference.md +19 -8
- package/.agents/workflows/helpers/deliver-story.md +7 -2
- package/.agents/workflows/helpers/parallel-tooling.md +29 -0
- package/docs/CHANGELOG.md +55 -0
- package/lib/cli/doctor-checks/coverage-ratchet.js +54 -0
- package/lib/cli/doctor-checks/effective-agentrc.js +23 -0
- package/lib/cli/doctor-checks/llm-review.js +2 -11
- package/lib/cli/doctor-checks/sync-parity.js +5 -1
- package/lib/cli/doctor-checks/test-credit-path.js +7 -2
- package/lib/cli/registry.js +5 -0
- package/package.json +1 -1
|
@@ -9,6 +9,13 @@ description: >-
|
|
|
9
9
|
whose verdict owner is a fresh critic.
|
|
10
10
|
effort: medium
|
|
11
11
|
model: inherit
|
|
12
|
+
disallowedTools: NotebookEdit
|
|
13
|
+
hooks:
|
|
14
|
+
PreToolUse:
|
|
15
|
+
- matcher: "Write|Edit|MultiEdit|NotebookEdit|Bash"
|
|
16
|
+
hooks:
|
|
17
|
+
- type: command
|
|
18
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.agents/scripts/role-scope-guard.js" --role acceptance-critic'
|
|
12
19
|
---
|
|
13
20
|
|
|
14
21
|
<!--
|
|
@@ -142,6 +149,13 @@ the gate decides.
|
|
|
142
149
|
## Boundaries
|
|
143
150
|
|
|
144
151
|
- Do not fix the code, redraft the diff, or commit. You evaluate and report.
|
|
152
|
+
- Your one write is the verdict file under tempRoot. The
|
|
153
|
+
`role-scope-guard.js` PreToolUse hook denies writes outside tempRoot and
|
|
154
|
+
Bash commands in named mutation classes (git/gh writes, `sed -i` /
|
|
155
|
+
`perl -i`, package installs). It is a deny-list, not a sandbox, and it does
|
|
156
|
+
not run in an untrusted folder, in a `-p` session, under
|
|
157
|
+
`roleScopedAgents: false`, or on Codex (which inherits the parent sandbox) —
|
|
158
|
+
staying read-only remains your duty.
|
|
145
159
|
- Do not invent criteria beyond the Story's `acceptance[]` array.
|
|
146
160
|
- Emit only paths, criteria text, and observed results — never secrets or raw
|
|
147
161
|
credential values (security-baseline § Data Leakage & Logging).
|
|
@@ -9,6 +9,13 @@ description: >-
|
|
|
9
9
|
audit-<lens> workflow's first-class execution path.
|
|
10
10
|
effort: medium
|
|
11
11
|
model: sonnet
|
|
12
|
+
disallowedTools: NotebookEdit
|
|
13
|
+
hooks:
|
|
14
|
+
PreToolUse:
|
|
15
|
+
- matcher: "Write|Edit|MultiEdit|NotebookEdit|Bash"
|
|
16
|
+
hooks:
|
|
17
|
+
- type: command
|
|
18
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.agents/scripts/role-scope-guard.js" --role auditor'
|
|
12
19
|
---
|
|
13
20
|
|
|
14
21
|
<!--
|
|
@@ -79,6 +86,13 @@ file is its standalone-agent form.
|
|
|
79
86
|
the environment variable named by `urlEnv`, read-only, with
|
|
80
87
|
`default_transaction_read_only=on` on any session you open. Never run a
|
|
81
88
|
migration or any statement that writes.
|
|
89
|
+
- **Enforcement is partial.** The
|
|
90
|
+
`role-scope-guard.js` PreToolUse hook denies writes outside tempRoot and
|
|
91
|
+
Bash commands in named mutation classes (git/gh writes, `sed -i` /
|
|
92
|
+
`perl -i`, package installs). It is a deny-list, not a sandbox, and it does
|
|
93
|
+
not run in an untrusted folder, in a `-p` session, under
|
|
94
|
+
`roleScopedAgents: false`, or on Codex (which inherits the parent sandbox) —
|
|
95
|
+
staying read-only remains your duty.
|
|
82
96
|
|
|
83
97
|
## Scope
|
|
84
98
|
|
|
@@ -9,6 +9,7 @@ description: >-
|
|
|
9
9
|
when delivery.routing.roleScopedAgents is enabled (the default).
|
|
10
10
|
effort: medium
|
|
11
11
|
model: inherit
|
|
12
|
+
tools: Read, Grep, Glob
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
<!--
|
|
@@ -100,6 +101,10 @@ nothing to say about returns no findings.
|
|
|
100
101
|
|
|
101
102
|
- Do not edit the draft, re-author `stories.json`, or persist anything. You
|
|
102
103
|
evaluate and report; the caller decides.
|
|
104
|
+
- Your frontmatter limits you to Read, Grep and Glob, so Claude Code enforces
|
|
105
|
+
this read-only scope. Under `roleScopedAgents: false` you run as a generic
|
|
106
|
+
sub-agent with no scope; on Codex only your shell is off, and file writes
|
|
107
|
+
depend on the parent sandbox.
|
|
103
108
|
- Do not invent findings outside your charter.
|
|
104
109
|
- Emit only paths, slugs, and observed results — never secrets or raw
|
|
105
110
|
credential values (security-baseline § Data Leakage & Logging).
|
|
@@ -140,7 +140,10 @@ A close after a base move re-runs only the affected tests when the
|
|
|
140
140
|
consumer declares `project.commands.testChanged`.
|
|
141
141
|
|
|
142
142
|
If it outruns the host's sync Bash ceiling, dispatch it in the
|
|
143
|
-
**background
|
|
143
|
+
**background** with an explicit timeout (`timeout: 7200000`, the 2-hour
|
|
144
|
+
maximum: [`parallel-tooling.md`](../workflows/helpers/parallel-tooling.md)
|
|
145
|
+
Rule 2): its completion re-invokes you; on a host stop notice re-run it once,
|
|
146
|
+
and a second stop is your blocked path. Never spawn a task to poll or
|
|
144
147
|
`sleep`-loop against it; a waiter with a wrong condition outlives the agent.
|
|
145
148
|
An exit code is never evidence a gate did work — its **output** is: read the
|
|
146
149
|
envelope's per-step outcomes and credit. Redraft rounds run the scoped
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
"delivery": {
|
|
79
79
|
"execution": {
|
|
80
80
|
"fullSuiteLock": true,
|
|
81
|
-
"workloads": []
|
|
81
|
+
"workloads": [],
|
|
82
|
+
"preflightConcurrency": 1
|
|
82
83
|
},
|
|
83
84
|
"docsFreshness": {
|
|
84
85
|
"paths": ["README.md"]
|
|
@@ -104,12 +105,7 @@
|
|
|
104
105
|
"primeFromPath": null,
|
|
105
106
|
"allowSymlinkOnWindows": false,
|
|
106
107
|
"reapOnSuccess": true,
|
|
107
|
-
"bootstrapFiles": [
|
|
108
|
-
".env",
|
|
109
|
-
".mcp.json",
|
|
110
|
-
".agentrc.local.json",
|
|
111
|
-
".agents/instructions.local.md"
|
|
112
|
-
]
|
|
108
|
+
"bootstrapFiles": [".env", ".mcp.json", ".agents/instructions.local.md"]
|
|
113
109
|
},
|
|
114
110
|
"quality": {
|
|
115
111
|
"gates": {
|
|
@@ -131,7 +127,12 @@
|
|
|
131
127
|
"captureScript": "test:coverage",
|
|
132
128
|
"captureScope": "full",
|
|
133
129
|
"timeoutMs": 600000,
|
|
134
|
-
"onOverBudget": "block"
|
|
130
|
+
"onOverBudget": "block",
|
|
131
|
+
"suiteOfRecord": "local",
|
|
132
|
+
"ciRatchetCheck": null,
|
|
133
|
+
"nonInputGlobs": [],
|
|
134
|
+
"captureHandlesConfigChanges": false,
|
|
135
|
+
"ownFixDeltaMaxFiles": 0
|
|
135
136
|
},
|
|
136
137
|
"crap": {
|
|
137
138
|
"enabled": true,
|
|
@@ -217,11 +218,17 @@
|
|
|
217
218
|
"autoRefresh": {
|
|
218
219
|
"enabled": true
|
|
219
220
|
},
|
|
221
|
+
"ratchets": {
|
|
222
|
+
"coveredByLint": []
|
|
223
|
+
},
|
|
220
224
|
"requireBaselines": false
|
|
221
225
|
},
|
|
222
226
|
"mergeWatch": {
|
|
223
227
|
"maxBudgetSeconds": 3600
|
|
224
228
|
},
|
|
229
|
+
"close": {
|
|
230
|
+
"baseSync": "always"
|
|
231
|
+
},
|
|
225
232
|
"codeReview": {
|
|
226
233
|
"providers": [
|
|
227
234
|
{
|
|
@@ -233,7 +240,8 @@
|
|
|
233
240
|
"optional": true
|
|
234
241
|
}
|
|
235
242
|
],
|
|
236
|
-
"autoFixSeverity": "medium"
|
|
243
|
+
"autoFixSeverity": "medium",
|
|
244
|
+
"onNoVerdict": "report"
|
|
237
245
|
},
|
|
238
246
|
"refactorStage": {
|
|
239
247
|
"enabled": false
|
|
@@ -242,7 +250,8 @@
|
|
|
242
250
|
"maxRounds": 2
|
|
243
251
|
},
|
|
244
252
|
"feedbackLoop": {
|
|
245
|
-
"retroProposals": false
|
|
253
|
+
"retroProposals": false,
|
|
254
|
+
"outcomeRecord": false
|
|
246
255
|
},
|
|
247
256
|
"ci": {
|
|
248
257
|
"autoMerge": "trust-ci",
|
|
@@ -253,6 +262,9 @@
|
|
|
253
262
|
"pullRequest": {
|
|
254
263
|
"bodyTrailers": []
|
|
255
264
|
},
|
|
265
|
+
"handoff": {
|
|
266
|
+
"postSeatChecks": []
|
|
267
|
+
},
|
|
256
268
|
"routing": {
|
|
257
269
|
"roleScopedAgents": true,
|
|
258
270
|
"ceremonyProfile": "standard",
|