mandrel 2.33.0 → 2.35.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/docs/configuration.md +2 -2
- package/.agents/docs/quality-gates.md +30 -0
- package/.agents/docs/workflows.md +2 -1
- package/.agents/schemas/agentrc.schema.json +2 -2
- package/.agents/schemas/audit-rules.json +44 -0
- package/.agents/schemas/audit-rules.schema.json +1 -1
- package/.agents/scripts/coverage-capture.js +7 -1
- package/.agents/scripts/lib/baselines/kernel.js +20 -7
- package/.agents/scripts/lib/baselines/kinds/crap.js +7 -2
- package/.agents/scripts/lib/baselines/kinds/mutation.js +144 -14
- package/.agents/scripts/lib/close-validation/projections/crap.js +8 -6
- package/.agents/scripts/lib/config/gates/crap-incremental-coverage.schema.js +10 -7
- package/.agents/scripts/lib/config/quality.js +7 -0
- package/.agents/scripts/lib/coverage-capture-fullscope.js +5 -2
- package/.agents/scripts/lib/coverage-capture-incremental.js +9 -2
- package/.agents/scripts/lib/coverage-capture-usage.js +55 -0
- package/.agents/scripts/lib/coverage-capture.js +106 -41
- package/.agents/scripts/lib/findings/route-finding.js +98 -35
- package/.agents/scripts/lib/maintainability-utils.js +6 -14
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +24 -7
- package/.agents/scripts/lib/source-extensions.js +76 -0
- package/.agents/skills/core/documentation-and-adrs/SKILL.md +1 -1
- package/.agents/workflows/audit-adrs.md +270 -0
- package/.agents/workflows/audit-documentation.md +17 -0
- package/.agents/workflows/helpers/deliver-light.md +5 -2
- package/.agents/workflows/helpers/deliver-story-reference.md +23 -1
- package/.agents/workflows/helpers/deliver-story.md +4 -2
- package/docs/CHANGELOG.md +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Audit the decisions log as a live contract — Accepted ADRs whose claims the
|
|
4
|
+
tree has outgrown, broken supersede chains, structural gaps, and directional
|
|
5
|
+
changes that landed with no decision recorded. A deliberately-global lens over
|
|
6
|
+
whichever decisions-log layout the consumer ships.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Decisions-Log (ADR) Audit
|
|
10
|
+
|
|
11
|
+
You are a Staff Engineer & Decision Historian verifying that the consumer's
|
|
12
|
+
**decisions log still describes the system that exists**. An ADR is not prose
|
|
13
|
+
that merely rots — it is retrieved as *authority*: agents and humans read an
|
|
14
|
+
`Accepted` decision as the settled answer and do not re-litigate it. So an
|
|
15
|
+
Accepted ADR the tree has outgrown is worse than no ADR at all — it actively
|
|
16
|
+
teaches a wrong contract, and it keeps teaching it until someone supersedes it.
|
|
17
|
+
That is this lens's central target; structural tidiness is the cheap part.
|
|
18
|
+
|
|
19
|
+
The shared lens machinery — read-only constraint, scope interpretation, report
|
|
20
|
+
envelope + finding-block skeleton, severity scale, self-cross-check, and
|
|
21
|
+
execution strategy — lives in
|
|
22
|
+
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
23
|
+
`{{auditOutputDir}}/audit-adrs-results.md`. Dimension values:
|
|
24
|
+
`Decision Drift | Supersede-Chain Integrity | Structure & Status Hygiene |
|
|
25
|
+
Missing Decision | Layout Conformance`; the report adds a **Decision Coverage**
|
|
26
|
+
table.
|
|
27
|
+
|
|
28
|
+
## Applicability & layout detection
|
|
29
|
+
|
|
30
|
+
**Mandrel ships two first-class decisions-log layouts** (the
|
|
31
|
+
[`core/documentation-and-adrs`](../skills/core/documentation-and-adrs/SKILL.md)
|
|
32
|
+
Policy Capsule is the SSOT), and this lens reads whichever one the consumer
|
|
33
|
+
adopted. **Both layouts keep the same entry file** — `decisions.md` under the
|
|
34
|
+
configured docs root — so its mere presence never identifies the layout. Detect
|
|
35
|
+
in this order, resolving `<docsRoot>` from `project.paths.docsRoot` in
|
|
36
|
+
`.agentrc.json` (default `docs`):
|
|
37
|
+
|
|
38
|
+
1. **Neither `<docsRoot>/decisions.md` nor `<docsRoot>/decisions/` exists** →
|
|
39
|
+
the project keeps no decisions log. Emit the not-applicable report below and
|
|
40
|
+
stop. Never invent a log, and never infer decisions from commit history.
|
|
41
|
+
2. **`decisions.md` only** → **single-file dated-entry layout** (the default).
|
|
42
|
+
Every ADR body lives in that one file as an append-only entry.
|
|
43
|
+
3. **`decisions.md` + a `decisions/` directory** → read the entry file to tell
|
|
44
|
+
the two apart. When it is predominantly an **index** (one row or link per
|
|
45
|
+
ADR pointing into `decisions/`), this is the **index + `decisions/`
|
|
46
|
+
directory** (MADR-style) layout, and each `decisions/NNNN-*.md` file is an
|
|
47
|
+
ADR body. When it instead carries full ADR bodies *and* a `decisions/`
|
|
48
|
+
directory holds further ADRs, the log is a hybrid — conformant **only** when
|
|
49
|
+
every file under `decisions/` is reachable from the entry file by an
|
|
50
|
+
index row or an in-entry pointer; otherwise it is a Layout Conformance
|
|
51
|
+
finding (an unreferenced ADR body is invisible to every reader who starts,
|
|
52
|
+
as they must, at the entry file).
|
|
53
|
+
4. **`decisions/` only, with no entry file** → a Layout Conformance finding:
|
|
54
|
+
the entry file is the mandatory-read surface both layouts guarantee, and
|
|
55
|
+
without it the directory's ADRs are unreachable from the docs context.
|
|
56
|
+
|
|
57
|
+
**Override.** An operator may pass `--paths <file ...>` (audit specific ADR
|
|
58
|
+
files) or `--dir <path>` (treat that directory as the decisions root) to point
|
|
59
|
+
the lens at a non-conventional location. These flags are the **only** override:
|
|
60
|
+
there is deliberately no `.agentrc.json` key for the decisions-log location, so
|
|
61
|
+
detection stays derived from the skill's two layouts rather than from
|
|
62
|
+
configuration a consumer must maintain.
|
|
63
|
+
|
|
64
|
+
## Whole-log scope (global lens)
|
|
65
|
+
|
|
66
|
+
Unlike the change-set-scoped lenses, this lens **always evaluates the whole
|
|
67
|
+
decisions log**, even when the change that triggered it touched one file.
|
|
68
|
+
Decision integrity is a global property: a supersede chain spans entries the
|
|
69
|
+
change set never names, and — the load-bearing case — a code change *elsewhere*
|
|
70
|
+
is exactly what invalidates an Accepted ADR's claims. Narrowing to the change
|
|
71
|
+
set would blind the lens to its primary finding class.
|
|
72
|
+
|
|
73
|
+
Accordingly this lens declares `"scope": "global"` in
|
|
74
|
+
[`audit-rules.json`](../schemas/audit-rules.json) — the single source of truth
|
|
75
|
+
`resolveLensTier` in
|
|
76
|
+
[`lib/audit-suite/selector.js`](../scripts/lib/audit-suite/selector.js) reads —
|
|
77
|
+
and is **exempt from the cross-epic-leak guard** that narrows every other
|
|
78
|
+
lens's evidence to its `changedFiles`. The exemption is scoped to this lens
|
|
79
|
+
only; the guard is not weakened for any other lens.
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
{{changedFiles}}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- For this lens, **ignore** the `{{changedFiles}}` block above even when it is
|
|
86
|
+
populated: the decisions log is evaluated whole regardless. The block is
|
|
87
|
+
rendered only for envelope-shape parity with the scoped lenses. Do use it,
|
|
88
|
+
when populated, as a **prioritization hint** — an Accepted ADR whose subject
|
|
89
|
+
the change set touches is the first one to claim-check — never as a filter on
|
|
90
|
+
what is audited or reported.
|
|
91
|
+
|
|
92
|
+
## Execution strategy
|
|
93
|
+
|
|
94
|
+
Run this lens as a single `subagent_type: auditor` dispatch returning the report
|
|
95
|
+
path + Executive Summary; sequential inline execution is the fallback (see the
|
|
96
|
+
core's Execution strategy). On a large log, the Decision Drift claim-check
|
|
97
|
+
(Step 2.1) is the one dimension worth fanning out per batch of entries under
|
|
98
|
+
parallel-tooling Rule 3 — merge under the shared self-cross-check.
|
|
99
|
+
|
|
100
|
+
## Step 1: Deterministic structure sweep first
|
|
101
|
+
|
|
102
|
+
Run the cheap exact checks before reading any ADR for meaning — they
|
|
103
|
+
de-duplicate the easy findings and give Step 2 its inventory. Adjust the paths
|
|
104
|
+
below to the detected layout (or the `--dir` / `--paths` override):
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Entry file + any ADR bodies (single-file layout yields just the entry file).
|
|
108
|
+
ls docs/decisions.md docs/decisions/*.md 2>/dev/null
|
|
109
|
+
|
|
110
|
+
# Status lines and their spelling — the vocabulary is Accepted / Superseded
|
|
111
|
+
# by … / Deprecated / Reverted (…); anything else is a Structure & Status
|
|
112
|
+
# Hygiene finding.
|
|
113
|
+
grep -rn '^\*\*Status:\*\*\|^- \*\*Status:\*\*' docs/decisions.md docs/decisions/ 2>/dev/null
|
|
114
|
+
|
|
115
|
+
# Entry headings, for the id/date/uniqueness checks in Step 1's list below.
|
|
116
|
+
grep -n '^## ' docs/decisions.md 2>/dev/null
|
|
117
|
+
|
|
118
|
+
# Link integrity across the docs surface, including every ADR cross-reference.
|
|
119
|
+
node .agents/scripts/check-doc-links.js
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
From that output, resolve deterministically — each of these is a
|
|
123
|
+
**Structure & Status Hygiene** finding except where noted:
|
|
124
|
+
|
|
125
|
+
1. **Canonical sections.** Every ADR carries the canonical set the skill's
|
|
126
|
+
Policy Capsule names — **Status, Date, Deciders, Context, Decision,
|
|
127
|
+
(Alternatives Considered), Consequences**. `Alternatives Considered` is
|
|
128
|
+
optional; a missing `Status`, `Context`, `Decision`, or `Consequences` is a
|
|
129
|
+
finding, and a missing `Status` is the most severe of them because every
|
|
130
|
+
other dimension keys off it.
|
|
131
|
+
2. **Status vocabulary.** Each status reads `Accepted`, `Superseded by <ref>`,
|
|
132
|
+
`Deprecated`, or `Reverted (<date>)` — a reverted decision was **undone**
|
|
133
|
+
rather than replaced, so unlike a superseded one it has no successor to
|
|
134
|
+
point at, and its missing `by <ref>` is correct rather than a defect. A
|
|
135
|
+
free-invented status word — anything outside those four — leaves the entry
|
|
136
|
+
unclassifiable by this lens and by every reader.
|
|
137
|
+
3. **Unique, stable ids.** No two entries share an id/anchor; MADR files use
|
|
138
|
+
zero-padded sequential numbering matching their heading id.
|
|
139
|
+
4. **Parseable dates.** Every `Date` parses, and no entry is dated in the
|
|
140
|
+
future.
|
|
141
|
+
5. **Link integrity.** Report what `check-doc-links.js` finds inside the
|
|
142
|
+
decisions surface; leave findings outside it to `audit-documentation`.
|
|
143
|
+
|
|
144
|
+
This lens orchestrates the existing checker only — it adds no new deterministic
|
|
145
|
+
checker script, and the sweep above is inline shell by design.
|
|
146
|
+
|
|
147
|
+
## Step 2: Evaluation dimensions
|
|
148
|
+
|
|
149
|
+
### 2.1 Decision Drift — **`Accepted` entries only**
|
|
150
|
+
|
|
151
|
+
This is the lens's primary value. For each **Accepted** entry, extract its
|
|
152
|
+
load-bearing claims — the scripts, files, directories, commands, flags, config
|
|
153
|
+
keys, contracts, and mechanisms it names as decided — and verify each against
|
|
154
|
+
the current tree, exactly as a documentation claim-check would. Flag an
|
|
155
|
+
Accepted decision whose subject the code has moved past: a named mechanism that
|
|
156
|
+
no longer exists, a contract the implementation has replaced, a path or command
|
|
157
|
+
that resolves to nothing, a constraint the tree now routinely violates.
|
|
158
|
+
|
|
159
|
+
**Scope this claim-check to Accepted entries and no others.** A `Superseded`
|
|
160
|
+
or `Deprecated` entry is *supposed* to describe a world that no longer exists —
|
|
161
|
+
claim-checking it manufactures findings out of correctly-retired history, and
|
|
162
|
+
on a long log it is also where the cost would go. Superseded and Deprecated
|
|
163
|
+
entries get the chain checks in 2.2 and the structure checks in Step 1, and
|
|
164
|
+
nothing else.
|
|
165
|
+
|
|
166
|
+
**Remediation is always supersede-or-amend, never silent edit or deletion** —
|
|
167
|
+
the skill's lifecycle rule is that an ADR is superseded in place, never pruned
|
|
168
|
+
or archived. Say which in the finding: amend when the decision still holds and
|
|
169
|
+
only its details moved; supersede when the decision itself no longer describes
|
|
170
|
+
what the project does.
|
|
171
|
+
|
|
172
|
+
Severity guidance: **High** — an Accepted ADR whose central decision the code
|
|
173
|
+
contradicts (it will be retrieved and believed); **Medium** — an Accepted ADR
|
|
174
|
+
whose supporting details drifted while its decision still holds; **Low** —
|
|
175
|
+
cosmetic staleness (an old path in an aside, a renamed tool in an example).
|
|
176
|
+
|
|
177
|
+
### 2.2 Supersede-Chain Integrity
|
|
178
|
+
|
|
179
|
+
The chain is what keeps a retired decision honest, so audit it as a graph:
|
|
180
|
+
|
|
181
|
+
- **Every supersede reference resolves** to an ADR that exists (a heading
|
|
182
|
+
anchor in the single-file layout, a file in the directory layout).
|
|
183
|
+
- **No cycles**, and no entry superseding itself.
|
|
184
|
+
- **Index ↔ entry agreement** (directory layout, and any single-file log
|
|
185
|
+
carrying a summary table): the status in the index row matches the status in
|
|
186
|
+
the ADR body. A row saying `Accepted` over a body saying `Superseded` is a
|
|
187
|
+
finding — readers stop at the index.
|
|
188
|
+
- **Partial supersessions name what survives.** An entry recording that *some*
|
|
189
|
+
rows or clauses are superseded while the rest stand MUST say precisely which;
|
|
190
|
+
an unscoped "partly superseded" leaves every clause ambiguous.
|
|
191
|
+
- **No two Accepted entries contradict each other** on the same subject. When
|
|
192
|
+
a later decision silently overrode an earlier one, the earlier is the finding:
|
|
193
|
+
it was never marked superseded.
|
|
194
|
+
|
|
195
|
+
### 2.3 Structure & Status Hygiene
|
|
196
|
+
|
|
197
|
+
Promote the Step 1 sweep's resolved items to findings here. Keep them terse —
|
|
198
|
+
each names the entry and the missing or malformed element.
|
|
199
|
+
|
|
200
|
+
### 2.4 Missing Decision
|
|
201
|
+
|
|
202
|
+
The inverse gap: a directional change that landed with **no** decision
|
|
203
|
+
recorded. **Bound the search by date** — inspect history since the newest
|
|
204
|
+
entry's `Date`, not the whole history, or this dimension dominates the lens's
|
|
205
|
+
cost on any mature repository:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
git log --since=<newest-ADR-date> --pretty='%h %s' -- . | head -50
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Flag only **directional** changes — a mechanism retired, a contract cut over, a
|
|
212
|
+
dependency or platform swapped, an architectural seam moved. Routine features,
|
|
213
|
+
fixes, and refactors are not decisions and must not be reported here. When the
|
|
214
|
+
newest entry is recent and nothing directional landed since, record that as a
|
|
215
|
+
single `Info` observation rather than straining for a finding.
|
|
216
|
+
|
|
217
|
+
### 2.5 Layout Conformance
|
|
218
|
+
|
|
219
|
+
Report the detection outcomes named in **Applicability & layout detection**: an
|
|
220
|
+
unreferenced ADR body under `decisions/`, a `decisions/` directory with no
|
|
221
|
+
entry file, or an index whose rows and directory contents disagree about which
|
|
222
|
+
ADRs exist.
|
|
223
|
+
|
|
224
|
+
## Not-applicable report
|
|
225
|
+
|
|
226
|
+
When the project keeps **no decisions log** (neither the entry file nor the
|
|
227
|
+
directory exists, and no `--paths` / `--dir` override was supplied), emit this
|
|
228
|
+
explicit report instead of empty findings — and stop:
|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
# Decisions-Log (ADR) Audit Report
|
|
232
|
+
|
|
233
|
+
## Executive Summary
|
|
234
|
+
|
|
235
|
+
**Not applicable** — this project keeps no decisions log (no `decisions.md`
|
|
236
|
+
entry file and no `decisions/` directory under the configured docs root), so
|
|
237
|
+
the ADR lens has nothing to inspect and was skipped.
|
|
238
|
+
|
|
239
|
+
## Detailed Findings
|
|
240
|
+
|
|
241
|
+
_None — lens not applicable._
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Constraint (lens-specific carve-out)
|
|
245
|
+
|
|
246
|
+
Read-only over the decisions log and the tree it makes claims about. The single
|
|
247
|
+
write is the report artifact: never edit, supersede, renumber, reformat, or
|
|
248
|
+
delete an ADR — recording that a decision needs superseding is the deliverable,
|
|
249
|
+
and performing the supersession is a separate, human-owned pass. Run
|
|
250
|
+
`check-doc-links.js` in its default read-only mode only. Generic documentation
|
|
251
|
+
staleness outside the decisions surface belongs to
|
|
252
|
+
[`audit-documentation`](audit-documentation.md); architectural boundary
|
|
253
|
+
violations belong to `audit-architecture`. This lens judges whether a *recorded
|
|
254
|
+
decision* still matches the tree — never whether the decision was a good one.
|
|
255
|
+
|
|
256
|
+
## Report additions
|
|
257
|
+
|
|
258
|
+
Beyond the shared skeleton (Executive Summary + Detailed Findings from the
|
|
259
|
+
core), this lens's report carries its own title and a Decision Coverage table,
|
|
260
|
+
so a reader can see what was claim-checked versus what was only chain-checked:
|
|
261
|
+
|
|
262
|
+
```markdown
|
|
263
|
+
# Decisions-Log (ADR) Audit Report
|
|
264
|
+
|
|
265
|
+
## Decision Coverage
|
|
266
|
+
|
|
267
|
+
| ADR | Status | Checked |
|
|
268
|
+
| ----------- | ----------------------------------------------- | ----------------------------- |
|
|
269
|
+
| [id, title] | [Accepted · Superseded · Deprecated · Reverted] | [Claims + chain · Chain only] |
|
|
270
|
+
```
|
|
@@ -211,6 +211,23 @@ findings land as actionable, tracked work rather than a report nobody reads.
|
|
|
211
211
|
Run the deterministic checkers in `--check` mode only; the single write is the
|
|
212
212
|
report artifact. Do not edit any documentation or code.
|
|
213
213
|
|
|
214
|
+
### Boundary with the ADR lens
|
|
215
|
+
|
|
216
|
+
**Decision-log semantics belong to [`audit-adrs`](audit-adrs.md)**, not to this
|
|
217
|
+
lens: whether an `Accepted` ADR's claims still match the tree, whether its
|
|
218
|
+
supersede chain resolves, whether the index and the entry bodies agree on a
|
|
219
|
+
status, and whether a directional change landed with no decision recorded. That
|
|
220
|
+
lens reads the whole decisions log as a graph; this one would only ever see the
|
|
221
|
+
decisions file as one more prose doc.
|
|
222
|
+
|
|
223
|
+
This lens keeps its **generic** coverage of that file — link integrity, command
|
|
224
|
+
and path claims, and the History Bloat / Contradiction / Authority Drift
|
|
225
|
+
categories above — and both lenses may legitimately touch `decisions.md`. When
|
|
226
|
+
a finding turns on an ADR's **status, chain, or decided contract**, leave it to
|
|
227
|
+
`audit-adrs` rather than reporting it here, so the two lenses do not
|
|
228
|
+
double-report the same defect. The History Bloat remediation is unchanged and
|
|
229
|
+
still applies: never prune an ADR by archiving — supersede it in place.
|
|
230
|
+
|
|
214
231
|
## Report additions
|
|
215
232
|
|
|
216
233
|
Beyond the shared skeleton (Executive Summary + Detailed Findings from the
|
|
@@ -131,8 +131,11 @@ answer).
|
|
|
131
131
|
invoked, not reimplemented.
|
|
132
132
|
|
|
133
133
|
3. **Implement + self-eval.** `cd` into `workCwd`, implement the change, run
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
the full suite once in the worktree **so close can credit it** — the
|
|
135
|
+
crediting invocation and the freshness contract are
|
|
136
|
+
[`deliver-story.md`](deliver-story.md) Step 1.3, unchanged here — then run
|
|
137
|
+
the bounded acceptance self-eval loop
|
|
138
|
+
([`deliver-story.md`](deliver-story.md) Step 1a). Commit
|
|
136
139
|
on `story-<id>` with `(refs #<storyId>)`.
|
|
137
140
|
|
|
138
141
|
4. **Diff backstop.** Before close, re-check the ACTUAL diff:
|
|
@@ -233,12 +233,34 @@ runs maker-blind at Story-scope review inside the close subprocess. The
|
|
|
233
233
|
dispatch step produces `checklistPath` from the Story's predicted footprint
|
|
234
234
|
before it spawns the worker — see [`/deliver`](../deliver.md).
|
|
235
235
|
|
|
236
|
-
**Pre-eval full-suite discipline (spine step
|
|
236
|
+
**Pre-eval full-suite discipline (spine step 1.3).** Repo-invariant guards —
|
|
237
237
|
drift-guard and schema tests living outside the Story's scoped greps — are
|
|
238
238
|
the failure class that actually bounces deliveries: close-validation
|
|
239
239
|
discovers them only after the whole close pipeline has run, at several times
|
|
240
240
|
the cost of one pre-eval full-suite run.
|
|
241
241
|
|
|
242
|
+
**Run it so close can credit it.** Close skips a gate that already passed at
|
|
243
|
+
the current HEAD, but a bare `npm test` deposits no such record — the suite
|
|
244
|
+
then runs twice per delivery, once here and once in the close gate chain.
|
|
245
|
+
Pick the invocation by the same predicate `close-validation/gates.js` uses to
|
|
246
|
+
choose its test gate:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# CRAP gate enabled (default) + a `test:coverage` script — writes the stamp
|
|
250
|
+
# the close `coverage-capture` gate reads:
|
|
251
|
+
node <main-repo>/.agents/scripts/coverage-capture.js --cwd <workCwd>
|
|
252
|
+
# otherwise — the evidence record the close `test` gate reads. <workCwd> must
|
|
253
|
+
# be ABSOLUTE and the runner exactly `npm test`: both sides hash
|
|
254
|
+
# {cmd, args, cwd}, so a relative path or a wrapper misses the credit.
|
|
255
|
+
node <main-repo>/.agents/scripts/evidence-gate.js --standalone \
|
|
256
|
+
--scope-id <storyId> --gate test --worktree <workCwd> -- npm test
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The credit expires the moment it stops describing the tree: evidence is keyed
|
|
260
|
+
on HEAD, the capture stamp on a content digest of `crap.targetDirs`. A
|
|
261
|
+
self-eval fix — or any commit — invalidates it and close re-runs the suite for
|
|
262
|
+
real, so this never trades away the gate.
|
|
263
|
+
|
|
242
264
|
**Conflict with `main` mid-implementation** → resolve as you would any branch
|
|
243
265
|
rebase. There is no `epic/<id>` intermediate, so the rebase base is `main`
|
|
244
266
|
directly.
|
|
@@ -75,9 +75,11 @@ One branch, one PR to `main`, commits against the inline `acceptance[]` /
|
|
|
75
75
|
`## Slicing` rows as **intra-session checkpoints** (reference § Step 1).
|
|
76
76
|
2. Implement and commit on the Story branch, iterating with quick advisory
|
|
77
77
|
gates (`typecheck`, `lint`, scoped tests) — the full chain runs in Step 3.
|
|
78
|
-
3. Run
|
|
78
|
+
3. Run the full suite once in the worktree **before Step 1a**: repo-invariant
|
|
79
79
|
guards outside the Story's scoped greps are the failure class that bounces
|
|
80
|
-
deliveries. Fix and commit first, then run the self-eval loop.
|
|
80
|
+
deliveries. Fix and commit first, then run the self-eval loop. Run it **so
|
|
81
|
+
Step 3 credits it** — a bare `npm test` records nothing, so close re-runs
|
|
82
|
+
the identical suite (reference § Step 1, "Pre-eval full-suite discipline").
|
|
81
83
|
|
|
82
84
|
### Step 1a — Bounded acceptance self-eval loop (**required**)
|
|
83
85
|
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,31 @@ All notable changes to this project will be documented in this file.
|
|
|
15
15
|
-->
|
|
16
16
|
<!-- markdownlint-disable-file MD004 MD012 MD037 -->
|
|
17
17
|
|
|
18
|
+
## [2.35.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.34.0...mandrel-v2.35.0) (2026-08-28)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
* add /audit-adrs — global decisions-log audit lens (decision drift, supersede-chain integrity, structure, missing decisions) ([#5072](https://github.com/dsj1984/mandrel/issues/5072)) ([#5073](https://github.com/dsj1984/mandrel/issues/5073)) ([5757e6a](https://github.com/dsj1984/mandrel/commit/5757e6ae3da471713dcdb4ac8b6d8093ea36d6f4))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
* **adrs:** add Reverted to the ADR status vocabulary and pin it to the skill (refs [#5078](https://github.com/dsj1984/mandrel/issues/5078)) ([#5083](https://github.com/dsj1984/mandrel/issues/5083)) ([d498575](https://github.com/dsj1984/mandrel/commit/d49857573725d8241d7083ad4579583b47af4935))
|
|
29
|
+
* **audit-rules:** register a deploy-runtime sensitive-path class (refs [#5069](https://github.com/dsj1984/mandrel/issues/5069)) ([#5070](https://github.com/dsj1984/mandrel/issues/5070)) ([da7f9f3](https://github.com/dsj1984/mandrel/commit/da7f9f3969aa14afa45a89d1ee4973248268a7cd))
|
|
30
|
+
* **findings:** union the fingerprint lookup with the semantic pass in routeFinding (refs [#5079](https://github.com/dsj1984/mandrel/issues/5079)) ([#5082](https://github.com/dsj1984/mandrel/issues/5082)) ([fd82de3](https://github.com/dsj1984/mandrel/commit/fd82de3496b4fe02cf29bead27957ce82ef7a0b2))
|
|
31
|
+
* fix coverage-capture freshness: derive the scorable-source extension set from the CRAP scanner and fail closed when discovery finds nothing ([#5076](https://github.com/dsj1984/mandrel/issues/5076)) ([#5081](https://github.com/dsj1984/mandrel/issues/5081)) ([09f89c0](https://github.com/dsj1984/mandrel/commit/09f89c0bd39adde9936ebd6c47fb4c2a5c3ee4cd))
|
|
32
|
+
|
|
33
|
+
## [2.34.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.33.0...mandrel-v2.34.0) (2026-08-27)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
* **baselines:** weight the mutation rollup by mutant count and gate the migration (refs [#5058](https://github.com/dsj1984/mandrel/issues/5058)) ([#5062](https://github.com/dsj1984/mandrel/issues/5062)) ([a645d30](https://github.com/dsj1984/mandrel/commit/a645d3085450b4dae39ae5d0a9b9844014535f84))
|
|
39
|
+
* **coverage:** describe incrementalCoverage honestly, drop inert forwarding (refs [#5065](https://github.com/dsj1984/mandrel/issues/5065)) ([#5066](https://github.com/dsj1984/mandrel/issues/5066)) ([04ff450](https://github.com/dsj1984/mandrel/commit/04ff450cb1774a1faa0b4f901f1e09261b0ae00a))
|
|
40
|
+
* delivery lifecycle: credit the Step 1 full-suite run to close and enable incremental coverage by default ([#5063](https://github.com/dsj1984/mandrel/issues/5063)) ([#5064](https://github.com/dsj1984/mandrel/issues/5064)) ([39b1ea4](https://github.com/dsj1984/mandrel/commit/39b1ea421c9a8a43f35ad4c8cbc082e1f2ead8c4))
|
|
41
|
+
* **plan-persist:** re-carry audit provenance onto dependent Stories (refs [#5056](https://github.com/dsj1984/mandrel/issues/5056)) ([#5060](https://github.com/dsj1984/mandrel/issues/5060)) ([548cc8a](https://github.com/dsj1984/mandrel/commit/548cc8a46afc5b643452060cc3a03bf71a874b89))
|
|
42
|
+
|
|
18
43
|
## [2.33.0](https://github.com/dsj1984/mandrel/compare/mandrel-v2.32.0...mandrel-v2.33.0) (2026-08-07)
|
|
19
44
|
|
|
20
45
|
|
package/package.json
CHANGED