@descent-vtt/spec-guard 0.4.0 → 0.5.1

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +283 -150
  2. package/README.md +868 -644
  3. package/dist/cli.d.ts +8 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +40 -7
  6. package/dist/cli.js.map +1 -1
  7. package/dist/comments.d.ts +23 -4
  8. package/dist/comments.d.ts.map +1 -1
  9. package/dist/comments.js +75 -27
  10. package/dist/comments.js.map +1 -1
  11. package/dist/engine.d.ts +126 -6
  12. package/dist/engine.d.ts.map +1 -1
  13. package/dist/engine.js +301 -154
  14. package/dist/engine.js.map +1 -1
  15. package/dist/glob.d.ts +11 -1
  16. package/dist/glob.d.ts.map +1 -1
  17. package/dist/glob.js +20 -5
  18. package/dist/glob.js.map +1 -1
  19. package/dist/imports.d.ts +28 -4
  20. package/dist/imports.d.ts.map +1 -1
  21. package/dist/imports.js +46 -8
  22. package/dist/imports.js.map +1 -1
  23. package/dist/index.d.ts +11 -8
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +7 -5
  26. package/dist/index.js.map +1 -1
  27. package/dist/parser.d.ts +12 -1
  28. package/dist/parser.d.ts.map +1 -1
  29. package/dist/parser.js +39 -26
  30. package/dist/parser.js.map +1 -1
  31. package/dist/polyglot.d.ts +139 -0
  32. package/dist/polyglot.d.ts.map +1 -0
  33. package/dist/polyglot.js +548 -0
  34. package/dist/polyglot.js.map +1 -0
  35. package/dist/reporter.d.ts +41 -0
  36. package/dist/reporter.d.ts.map +1 -1
  37. package/dist/reporter.js +154 -1
  38. package/dist/reporter.js.map +1 -1
  39. package/dist/runner.d.ts +54 -2
  40. package/dist/runner.d.ts.map +1 -1
  41. package/dist/runner.js +321 -73
  42. package/dist/runner.js.map +1 -1
  43. package/dist/text.d.ts +34 -0
  44. package/dist/text.d.ts.map +1 -0
  45. package/dist/text.js +80 -0
  46. package/dist/text.js.map +1 -0
  47. package/dist/types.d.ts +76 -2
  48. package/dist/types.d.ts.map +1 -1
  49. package/package.json +73 -73
package/CHANGELOG.md CHANGED
@@ -1,150 +1,283 @@
1
- # Changelog
2
-
3
- All notable changes to this project are documented here. Versions follow
4
- [semantic versioning](https://semver.org), with the 0.x caveat that behaviour
5
- may change in a minor release — each such change is listed under **Changed**
6
- with the flag that restores the previous behaviour.
7
-
8
- ## 0.4.0
9
-
10
- An audit found spec-guard reporting a clean pass on a repository that contained
11
- the forbidden symbol. On a tree with eight copies of one token, the scanner
12
- found two and ripgrep found four, and neither said anything about the rest.
13
-
14
- ### Changed
15
-
16
- - **Hidden directories are searched.** `.github`, `.husky`, `.claude-rules` and
17
- `.agents` hold CI, hooks and agent rules, and both engines skipped them
18
- entirely - so an absence assertion passed while the forbidden thing sat in a
19
- workflow file.
20
- - **The skip list is now four names**: `.git`, `.hg`, `.svn`, `node_modules`.
21
- `dist`, `build`, `out`, `coverage`, `.next` and eight others are searched,
22
- because spec-guard cannot tell build output from a directory of build scripts,
23
- and guessing wrong means a rule silently covers nothing. **If a run starts
24
- failing on your build output, that is this change, and the fix is to say so:**
25
-
26
- ```md
27
- <!-- @assert-absence target="." symbol="TODO" exclude="dist coverage" -->
28
- ```
29
-
30
- - **`.gitignore` is no longer consulted.** It describes what git should carry,
31
- not what a rule covers - and ripgrep applies it only inside a git repository,
32
- so the same tree gave different answers depending on whether a `.git`
33
- directory existed above it.
34
- - **Binary files are searched, and a match in one is reported** rather than
35
- dropped. It is not counted as a violation, but it is no longer invisible.
36
- "Binary" now means "contains a NUL byte" for both engines; the scanner used to
37
- look only at the first 8KB, which disagreed with ripgrep on files whose first
38
- NUL came later.
39
- - **`--strict` fails when a file could not be inspected**, which now has a
40
- precise meaning: unreadable, or binary and containing the symbol.
41
- - **The engines are one implementation.** ripgrep now answers only *which files
42
- contain this text*; the scanner does all counting, comment classification,
43
- binary handling and reporting for both. `--engine` changes how long a run
44
- takes, not what it concludes. See [ADR-0007](docs/adr/0007-search-scope.md).
45
-
46
- ### Added
47
-
48
- - **`--no-default-skips`** to search even those four directories.
49
- - **`skipped`** on each result in `--json`: what was not inspected, and why.
50
-
51
- ### Removed
52
-
53
- - `DEFAULT_IGNORED_DIRECTORIES`, `canBatchLiterals`, `shouldBatchPatterns`,
54
- `createRipgrepSink` and `byteColumnToCharacter` from the public API. All of
55
- them existed to make ripgrep's own counting trustworthy; as a pre-filter it
56
- does not count, so pattern batching no longer has to be proved safe and
57
- ripgrep's byte columns no longer need converting.
58
-
59
- ### Fixed
60
-
61
- - ripgrep's per-file errors are no longer discarded. `--no-messages` meant a
62
- file that could not be opened produced no match, no error, and no way to tell
63
- it apart from one that was read and found clean.
64
- - `comments="include"` no longer changes whether binary files are searched. An
65
- attribute about comments decided that, because it selected a different code
66
- path through the engine.
67
-
68
- ## 0.3.0
69
-
70
- ### Added
71
-
72
- - **`exclude` attribute.** Most real rules are "nowhere except one place", not
73
- "not here": `exclude="src/config/**"` expresses that in one assertion instead
74
- of a hand-maintained list of every directory that is not `src/config`. Follows
75
- gitignore semantics — deliberately different from `glob`'s basename matching —
76
- and a parity matrix asserts both engines agree.
77
- - **Import assertions:** `@assert-import-absence` and `@assert-import-count`.
78
- "The UI layer must not depend on the database layer" is a dependency claim,
79
- not a text claim, and approximating it with a string search fails in both
80
- directions. A zero-dependency tokenizer resolves `import`, `export … from`,
81
- `import type`, dynamic `import()` with a literal, and `require()`. Module
82
- references it cannot resolve statically are reported, never counted as clean.
83
- See [ADR-0005](docs/adr/0005-import-assertions.md).
84
- - **`comments` attribute.** See Changed, below.
85
- - **`--allow-missing-targets`** to restore the previous handling of a `target`
86
- path that does not exist.
87
- - **`commentMatches` and `unclassifiedFiles`** on every result in `--json`.
88
-
89
- ### Changed
90
-
91
- - **Matches inside comments no longer count**, so the note recording that a
92
- symbol was deleted is no longer read as an occurrence of that symbol. This is
93
- the defect where documenting a decision defeated the assertion enforcing it.
94
- Comment syntax is known for 59 extensions across 9 families; strings are
95
- tracked too, since `//` inside a URL is not a comment. Where classification is
96
- uncertain the text counts as code, and every run reports how many matches it
97
- excluded — a pass caused by comment exclusion is never silent.
98
- `comments="include"` restores counting per assertion.
99
- See [ADR-0006](docs/adr/0006-comment-classification.md).
100
- - **A `target` path that does not exist now fails the run** instead of warning
101
- and searching what remained. An assertion pointed at a renamed directory used
102
- to search nothing, find nothing, and report success. `--allow-missing-targets`
103
- restores the old behaviour.
104
- - **`--strict`** now means "treat analysis that could not be completed as a
105
- failure" — it no longer carries the missing-target meaning, which is now the
106
- default.
107
-
108
- ### Fixed
109
-
110
- - `search()` on the ripgrep engine was not comment-aware while `searchBatch()`
111
- was, so a spec containing exactly one assertion kept its comment matches.
112
- - The two engines reported different columns for the same match on a line
113
- containing non-ASCII text: ripgrep counts bytes, the scanner counts
114
- characters, and editors count characters. ripgrep's column is now converted,
115
- so a reported location points at the match in both engines.
116
- - Leftover `*.test.ts` files in scratch fixture directories were collected by
117
- Vitest, breaking a run with "no test suite found" because of debris from a
118
- previous one.
119
-
120
- ### Notes
121
-
122
- The version in `package.json` was bumped to 0.3.0 during development but never
123
- published; npm went 0.1.0 -> 0.2.0. Everything above ships together as the
124
- first published 0.3.0.
125
-
126
- ## 0.2.0
127
-
128
- ### Added
129
-
130
- - **Adaptive engine selection.** `--engine auto` now measures rather than
131
- guesses: a budgeted, stat-only enumeration decides whether a tree is small
132
- enough for the JavaScript scanner to beat a ripgrep process spawn. The probe
133
- is the work — the enumeration it performs is reused by the scanner, so
134
- choosing costs nothing when the scanner wins.
135
- See [ADR-0004](docs/adr/0004-adaptive-engine.md).
136
- - **Mutation testing** with Stryker, wired into CI on every push, plus the tests
137
- that closed the gaps it exposed. See [ADR-0003](docs/adr/0003-mutation-testing.md).
138
-
139
- ### Changed
140
-
141
- - Published as `@descent-vtt/spec-guard`. The binary is still plain
142
- `spec-guard`.
143
-
144
- ## 0.1.0
145
-
146
- Initial release: `@assert-absence`, `@assert-count` and `@assert-present`,
147
- written as HTML comments that are invisible in every Markdown renderer. ripgrep
148
- primary with a pure-JavaScript fallback of identical semantics, safe assertion
149
- batching, `--json`, and exit code 2 for "spec-guard could not run" as distinct
150
- from "your specs failed".
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. Versions follow
4
+ [semantic versioning](https://semver.org), with the 0.x caveat that behaviour
5
+ may change in a minor release — each such change is listed under **Changed**
6
+ with the flag that restores the previous behaviour.
7
+
8
+ ## 0.5.1
9
+
10
+ Writing down what the code already claimed. Every module was driven to its
11
+ honest mutation-testing ceiling, and the exercise turned up six wrong answers
12
+ rather than six missing tests — which is the argument for doing it at all. No
13
+ new features, and nothing a user has to change.
14
+
15
+ ### Fixed
16
+
17
+ - **Two assertions on the same symbol answered each other's comment handling.**
18
+ The result cache keyed on the symbol, the targets and the search flags, but
19
+ not on `comments`. A spec with `<!-- @assert-count symbol="X" ... -->` above
20
+ `<!-- @assert-count symbol="X" ... comments="include" -->` returned whichever
21
+ count ran first for both. The grouping test had the same omission, so the two
22
+ were also merged into a single pass and the second was scanned with the
23
+ first's mask. There is now one definition of "the same question", in three
24
+ nested scopes, and the scope policy is part of it too.
25
+ - **An unreadable directory went unreported on a small repository.** The
26
+ adaptive engine had the walk's skip ledger in hand and returned without it on
27
+ any tree small enough to scan in process, so the same directory was a reported
28
+ gap on a large repository and silence on a small one. Same tree, two answers,
29
+ decided by its size.
30
+ - **Snippets from CRLF files carried a carriage return into the report**, which
31
+ returns the terminal cursor to column 0 and overwrites the line just printed.
32
+ The trim looked for `\r?\n` at the end of a line the caller had already cut at
33
+ the newline, so it could never match.
34
+ - **A bad `regex="true"` pattern was reported as `Invalid regular expression:
35
+ Invalid regular expression: /(/: ...`** — V8's message already says it once.
36
+
37
+ ### Changed
38
+
39
+ - **Two requests differing only in `scope` are no longer merged into one
40
+ search pass.** Reachable today only through the programmatic API, where a
41
+ caller may build more than one `ScopePolicy` per run.
42
+ - `enumerateCandidates` takes a `WalkRequest` — a `SearchRequest` without the
43
+ `symbol`, because a walk does not depend on one. Existing callers are
44
+ unaffected; the symbol is now optional rather than required.
45
+ - `CachedEngine` declares `searchBatch` as present rather than optional, which
46
+ `createCachedEngine` has always guaranteed.
47
+ - `KINDS` and `ALLOWED_ATTRIBUTES` are exported from the parser, so the
48
+ directive grammar can be asserted rather than restated.
49
+ - **The mutation gate moves from 85 to 97**, against a CI measurement of 97.65%
50
+ over 4,299 mutants. Every module is above 95% and three are at 100%, where
51
+ 0.5.0 ran from 73% to 96%. The 101 mutants still alive have each been applied
52
+ individually and produce byte-identical output, so that figure is the ceiling
53
+ rather than a way-point — and 29 that were assumed equivalent turned out not
54
+ to be, and are now tested. See
55
+ [ADR-0003](docs/adr/0003-mutation-testing.md), which also records a Stryker
56
+ limitation found on the way: a mutant that stops a test file *loading* is
57
+ reported as survived even though the suite is killing it.
58
+ - **`src/imports.ts` went from 73.74% to 95.89%.** The tokenizer was tested as a
59
+ step towards a list of module references rather than as a thing with an
60
+ output, so a template resumption that lost its place, a regex escape that
61
+ skipped a character, and three lookup tables were all unpinned. One
62
+ behaviour-preserving change came with it: the word branch starts its scan one
63
+ character in, so progress is unconditional by construction rather than a
64
+ consequence of a relation nothing enforced. Verified identical on 53.6 MB of
65
+ real JavaScript.
66
+
67
+ ### Internal
68
+
69
+ Not user-visible, but this is where the release's weight is: nine new test
70
+ files, 1,770 tests against 1,206 at 0.5.0, 100% line coverage, and the analyser
71
+ verified byte-identical to the published 0.5.0 across 6,976 files of real code.
72
+ Thirty-five negative controls confirm the suite goes red for each defect above,
73
+ and `scripts/mutation-equivalence.mjs` is in the repository so the equivalence
74
+ measurement stays reproducible.
75
+
76
+ ## 0.5.0
77
+
78
+ Import assertions covered one language, so a dependency rule pointed at a
79
+ directory of Go files did not fail - it passed, having analysed nothing. That is
80
+ the same defect 0.4.0 was written to remove, and this release closes the two
81
+ remaining shapes of it: a rule that cannot read the language, and a rule whose
82
+ scope holds no files at all.
83
+
84
+ ### Added
85
+
86
+ - **Import assertions read Python, Go, Rust and C#**, alongside JavaScript and
87
+ TypeScript. `import a.b` / `from .rel import x`, `import ( ... )` groups,
88
+ `use a::{b, c}` with nested expansion, `using static` and `global using`, and
89
+ the dynamic forms (`importlib.import_module`) that can only be reported.
90
+ Not four new tokenizers: the comment and string lexer from ADR-0006 masks the
91
+ source and the readers work on what is left. Tree-sitter measured 94 MB
92
+ unpacked against this package's 0.33 MB. See
93
+ [ADR-0008](docs/adr/0008-polyglot-imports.md).
94
+ - **`baseline` and `ratchet`** on the absence assertions, for adopting a strict
95
+ rule on a codebase that already breaks it. `baseline="src/legacy/a.ts:2"`
96
+ names the debt by file and count. The ratchet is two-sided: new violations
97
+ fail, and so does an entry the code no longer supports, because a baseline
98
+ that only grows is an `exclude` with extra steps. `ratchet="one-way"` relaxes
99
+ the second half. See [ADR-0009](docs/adr/0009-debt-baselines.md).
100
+ - **`--print-baseline`** prints the attribute that would exempt today's
101
+ violations, for a human to paste. It prints; it does not edit. That is the
102
+ whole answer to `--fix`, and ADR-0009 argues it.
103
+ - **`--format sarif`** writes SARIF 2.1.0, which GitHub turns into an annotation
104
+ on the offending line. One alert per broken rule, anchored on the code, with
105
+ the directive as a related location and a fingerprint that survives the code
106
+ moving. `--json` is unchanged and is now also `--format json`.
107
+ - **`allow-empty` and `--allow-empty-scope`**, for the rules where covering
108
+ nothing is the honest state of the world.
109
+ - **`baselinedMatches`, `staleBaseline` and `fileMatches`** on each result in
110
+ `--json`.
111
+
112
+ ### Changed
113
+
114
+ - **An assertion that inspected no files now fails.** A rule whose scope holds
115
+ nothing passes every time and reads in the report exactly like a rule that
116
+ inspected a thousand files and found nothing. The usual causes are a `glob`
117
+ matching no extension in the tree, an `exclude` that swallowed the target, or
118
+ an emptied directory. **If a run starts failing this way, the rule was
119
+ covering nothing before it started failing;** `allow-empty="true"` on the
120
+ directive, or `--allow-empty-scope` for the run, restores the old behaviour.
121
+ - **An import assertion fails when nothing in scope is in a language it can
122
+ read**, rather than reporting "analysed 0 of 12 files" in a warning and
123
+ passing.
124
+ - **`.py`, `.pyi`, `.go`, `.rs`, `.cs` and `.csx` files are now analysed** by import
125
+ assertions rather than counted as skipped, so a rule over a polyglot tree
126
+ starts finding dependencies it previously reported as unanalysable.
127
+ - **Mutation testing in CI runs in two tiers**: incremental on branches,
128
+ a full authoritative sweep on `main` and nightly. The gate stays at 85 in
129
+ both. See [ADR-0003](docs/adr/0003-mutation-testing.md).
130
+
131
+ ### Fixed
132
+
133
+ - `excludeFiles` was applied after enumeration rather than during it, so an
134
+ excluded spec file counted towards a budgeted walk. Only reachable through the
135
+ adaptive engine's probe, where it could make a tree look larger than the file
136
+ set actually being searched.
137
+ - The README described the safe-batching apparatus - containment and
138
+ dovetailing checks before merging literals into a ripgrep alternation - as
139
+ current behaviour. It was deleted in 0.4.0 when ripgrep became a pre-filter.
140
+
141
+ ## 0.4.0
142
+
143
+ An audit found spec-guard reporting a clean pass on a repository that contained
144
+ the forbidden symbol. On a tree with eight copies of one token, the scanner
145
+ found two and ripgrep found four, and neither said anything about the rest.
146
+
147
+ ### Changed
148
+
149
+ - **Hidden directories are searched.** `.github`, `.husky`, `.claude-rules` and
150
+ `.agents` hold CI, hooks and agent rules, and both engines skipped them
151
+ entirely - so an absence assertion passed while the forbidden thing sat in a
152
+ workflow file.
153
+ - **The skip list is now four names**: `.git`, `.hg`, `.svn`, `node_modules`.
154
+ `dist`, `build`, `out`, `coverage`, `.next` and eight others are searched,
155
+ because spec-guard cannot tell build output from a directory of build scripts,
156
+ and guessing wrong means a rule silently covers nothing. **If a run starts
157
+ failing on your build output, that is this change, and the fix is to say so:**
158
+
159
+ ```md
160
+ <!-- @assert-absence target="." symbol="TODO" exclude="dist coverage" -->
161
+ ```
162
+
163
+ - **`.gitignore` is no longer consulted.** It describes what git should carry,
164
+ not what a rule covers - and ripgrep applies it only inside a git repository,
165
+ so the same tree gave different answers depending on whether a `.git`
166
+ directory existed above it.
167
+ - **Binary files are searched, and a match in one is reported** rather than
168
+ dropped. It is not counted as a violation, but it is no longer invisible.
169
+ "Binary" now means "contains a NUL byte" for both engines; the scanner used to
170
+ look only at the first 8KB, which disagreed with ripgrep on files whose first
171
+ NUL came later.
172
+ - **`--strict` fails when a file could not be inspected**, which now has a
173
+ precise meaning: unreadable, or binary and containing the symbol.
174
+ - **The engines are one implementation.** ripgrep now answers only *which files
175
+ contain this text*; the scanner does all counting, comment classification,
176
+ binary handling and reporting for both. `--engine` changes how long a run
177
+ takes, not what it concludes. See [ADR-0007](docs/adr/0007-search-scope.md).
178
+
179
+ ### Added
180
+
181
+ - **`--no-default-skips`** to search even those four directories.
182
+ - **`skipped`** on each result in `--json`: what was not inspected, and why.
183
+
184
+ ### Removed
185
+
186
+ - `DEFAULT_IGNORED_DIRECTORIES`, `canBatchLiterals`, `shouldBatchPatterns`,
187
+ `createRipgrepSink` and `byteColumnToCharacter` from the public API. All of
188
+ them existed to make ripgrep's own counting trustworthy; as a pre-filter it
189
+ does not count, so pattern batching no longer has to be proved safe and
190
+ ripgrep's byte columns no longer need converting.
191
+
192
+ ### Fixed
193
+
194
+ - ripgrep's per-file errors are no longer discarded. `--no-messages` meant a
195
+ file that could not be opened produced no match, no error, and no way to tell
196
+ it apart from one that was read and found clean.
197
+ - `comments="include"` no longer changes whether binary files are searched. An
198
+ attribute about comments decided that, because it selected a different code
199
+ path through the engine.
200
+
201
+ ## 0.3.0
202
+
203
+ ### Added
204
+
205
+ - **`exclude` attribute.** Most real rules are "nowhere except one place", not
206
+ "not here": `exclude="src/config/**"` expresses that in one assertion instead
207
+ of a hand-maintained list of every directory that is not `src/config`. Follows
208
+ gitignore semantics — deliberately different from `glob`'s basename matching —
209
+ and a parity matrix asserts both engines agree.
210
+ - **Import assertions:** `@assert-import-absence` and `@assert-import-count`.
211
+ "The UI layer must not depend on the database layer" is a dependency claim,
212
+ not a text claim, and approximating it with a string search fails in both
213
+ directions. A zero-dependency tokenizer resolves `import`, `export … from`,
214
+ `import type`, dynamic `import()` with a literal, and `require()`. Module
215
+ references it cannot resolve statically are reported, never counted as clean.
216
+ See [ADR-0005](docs/adr/0005-import-assertions.md).
217
+ - **`comments` attribute.** See Changed, below.
218
+ - **`--allow-missing-targets`** to restore the previous handling of a `target`
219
+ path that does not exist.
220
+ - **`commentMatches` and `unclassifiedFiles`** on every result in `--json`.
221
+
222
+ ### Changed
223
+
224
+ - **Matches inside comments no longer count**, so the note recording that a
225
+ symbol was deleted is no longer read as an occurrence of that symbol. This is
226
+ the defect where documenting a decision defeated the assertion enforcing it.
227
+ Comment syntax is known for 59 extensions across 9 families; strings are
228
+ tracked too, since `//` inside a URL is not a comment. Where classification is
229
+ uncertain the text counts as code, and every run reports how many matches it
230
+ excluded — a pass caused by comment exclusion is never silent.
231
+ `comments="include"` restores counting per assertion.
232
+ See [ADR-0006](docs/adr/0006-comment-classification.md).
233
+ - **A `target` path that does not exist now fails the run** instead of warning
234
+ and searching what remained. An assertion pointed at a renamed directory used
235
+ to search nothing, find nothing, and report success. `--allow-missing-targets`
236
+ restores the old behaviour.
237
+ - **`--strict`** now means "treat analysis that could not be completed as a
238
+ failure" — it no longer carries the missing-target meaning, which is now the
239
+ default.
240
+
241
+ ### Fixed
242
+
243
+ - `search()` on the ripgrep engine was not comment-aware while `searchBatch()`
244
+ was, so a spec containing exactly one assertion kept its comment matches.
245
+ - The two engines reported different columns for the same match on a line
246
+ containing non-ASCII text: ripgrep counts bytes, the scanner counts
247
+ characters, and editors count characters. ripgrep's column is now converted,
248
+ so a reported location points at the match in both engines.
249
+ - Leftover `*.test.ts` files in scratch fixture directories were collected by
250
+ Vitest, breaking a run with "no test suite found" because of debris from a
251
+ previous one.
252
+
253
+ ### Notes
254
+
255
+ The version in `package.json` was bumped to 0.3.0 during development but never
256
+ published; npm went 0.1.0 -> 0.2.0. Everything above ships together as the
257
+ first published 0.3.0.
258
+
259
+ ## 0.2.0
260
+
261
+ ### Added
262
+
263
+ - **Adaptive engine selection.** `--engine auto` now measures rather than
264
+ guesses: a budgeted, stat-only enumeration decides whether a tree is small
265
+ enough for the JavaScript scanner to beat a ripgrep process spawn. The probe
266
+ is the work — the enumeration it performs is reused by the scanner, so
267
+ choosing costs nothing when the scanner wins.
268
+ See [ADR-0004](docs/adr/0004-adaptive-engine.md).
269
+ - **Mutation testing** with Stryker, wired into CI on every push, plus the tests
270
+ that closed the gaps it exposed. See [ADR-0003](docs/adr/0003-mutation-testing.md).
271
+
272
+ ### Changed
273
+
274
+ - Published as `@descent-vtt/spec-guard`. The binary is still plain
275
+ `spec-guard`.
276
+
277
+ ## 0.1.0
278
+
279
+ Initial release: `@assert-absence`, `@assert-count` and `@assert-present`,
280
+ written as HTML comments that are invisible in every Markdown renderer. ripgrep
281
+ primary with a pure-JavaScript fallback of identical semantics, safe assertion
282
+ batching, `--json`, and exit code 2 for "spec-guard could not run" as distinct
283
+ from "your specs failed".