okf-kit 0.7.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -7,6 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.0] - 2026-08-27
11
+
12
+ ### Added
13
+
14
+ - `citations-resolve`: a new backtick-delimited `` `path:#heading` `` citation
15
+ form (`.md` targets only) resolves to a whole Markdown section instead of
16
+ a line range, so it is immune to a line-number shift caused by an edit
17
+ anywhere above the cited section -- unlike even a heading-anchored
18
+ `path:N-M#anchor` citation, whose line range still drifts on every such
19
+ edit even though the anchor catches it landing in the wrong section. The
20
+ heading text must match exactly one level 1 or 2 heading in the target
21
+ (`heading-section-not-found` / `heading-section-ambiguous`), and the
22
+ resolved section must have at least one non-blank line before the next
23
+ heading of the same or shallower level (`heading-section-empty`). An
24
+ optional content anchor, `` `path:#heading#"text"` ``, must occur on
25
+ exactly one line inside the resolved section
26
+ (`heading-section-content-anchor-not-found` /
27
+ `-content-anchor-ambiguous`); a malformed attempt is reported rather than
28
+ silently dropped (`heading-section-malformed`). See the doc comment above
29
+ `HEADING_SECTION_CITATION_RE` in `src/rules/citations-resolve.ts` for the
30
+ full rationale, including why the grammar requires the `:#` colon-hash
31
+ rather than a bare `#`. Existing bundles that already use the older
32
+ `` `path#heading` `` shape in ordinary prose (a Markdown link's target
33
+ written in backticks) are unaffected: they no longer parse as a citation
34
+ at all, producing the same findings as before this form existed.
35
+ - `citations-resolve`: a new `--require-anchors` opt-in (and
36
+ `--require-anchors-allow <patterns...>` for exempting specific citedPath
37
+ globs/exact matches) adds four stricter, `warning`-severity checks, off
38
+ by default so an existing bundle's plain `check` findings are unaffected:
39
+ `anchor-required` (an in-repo full citation carries no `#anchor` at all,
40
+ except a reserved citing doc or an allowlisted target),
41
+ `anchor-not-on-last-line` (a string anchor was found in its cited range,
42
+ but not on the range's own last content line -- an anchor on the first
43
+ line survives a small insertion above the range, since the shifted
44
+ window still contains its original content just at a different offset;
45
+ the last content line falls out of the window on any insertion at all),
46
+ `anchor-not-unique-in-range` (a string anchor occurs on more than one
47
+ line of its cited range; a count of zero stays
48
+ `anchor-not-found-in-range` as before, unconditionally), and
49
+ `test-range-straddles-block` (a FULL citation's own range into a
50
+ `.test.`/`.spec.` target (`.ts`, `.js`, `.mjs`) contains a
51
+ `describe`/`it`/`test` block-head line, at the same or a shallower
52
+ indent than the range's own first line, on any line other than that
53
+ first line -- its own new rule, not a reuse of the existing
54
+ `test-range-start-not-head`/`test-range-end-not-closing` pair, which
55
+ stay short-form-only). See "Anchor strictness (opt-in,
56
+ `--require-anchors`)" in the README for the full rationale; verified
57
+ byte-identical findings on existing bundles before and after this
58
+ change, off by default and additive only.
59
+ - `citations-resolve`: four details of the `--require-anchors` checks
60
+ added above, worth knowing when adopting them:
61
+ `test-range-straddles-block` no longer flags a block-head line nested
62
+ strictly deeper than the range's own start line, so citing a whole
63
+ `describe` in full (including every `it(` nested inside it) is no
64
+ longer misreported as straddling into another block; only a sibling or
65
+ outer block-head line still counts. `anchor-not-on-last-line` now
66
+ anchors against a range's last CONTENT line rather than its literal
67
+ last line, so a range that (correctly) ends on bare closing boilerplate
68
+ (`});`, `]);`, `}),`, and similar) can anchor on the real content line
69
+ before it instead of being forced onto the boilerplate itself. Both of
70
+ the opt-in's per-atom checks (`test-range-straddles-block` and the
71
+ string-anchor checks) are now also exempt for a reserved citing doc
72
+ (`index.md`/`log.md`), matching `anchor-required`'s existing exemption
73
+ rather than only that one check having it; and a citation that both
74
+ straddles a block boundary and carries a missing/misplaced anchor now
75
+ gets both findings instead of the anchor problem silently vanishing
76
+ behind the straddle one.
77
+
10
78
  ## [0.7.0] - 2026-08-26
11
79
 
12
80
  ### Added
package/README.md CHANGED
@@ -70,7 +70,7 @@ Every template doc except `benchmark-template.md` ships with `sources: [path/to/
70
70
  | `no-absolute-links` | warning | Link targets should not start with `/`. GitHub resolves a leading slash against the repository root, not the bundle root, so an absolute link 404s once the bundle is viewed outside its own repository. Use a same-directory relative link instead. |
71
71
  | `sources-shape` | error | Frontmatter `sources`, when present, must be a non-empty array of non-empty strings. With a repo root (explicit or auto-detected), each listed path (file or directory) must also exist under it. |
72
72
  | `sources-fresh` | warning / notice | For docs with a `sources` list and a repo root, flags a source path whose last git commit is newer than both the doc's `timestamp` and the doc file's own last commit. See "Staleness (sources-fresh)" below. |
73
- | `citations-resolve` | warning / notice | For docs with a repo root, flags a `` `path:N`/`path:N-M` `` citation (and its `` `:N` ``/`` -`M` ``/`` (`N`) `` continuations, and bare paragraph-bound short forms `:N-M`/`(N-M)`) whose target file is missing, whose range is inverted or exceeds the file, or whose start line is blank or (for a non-markdown target) only a closing brace. A full citation may also carry an optional `#anchor` (e.g. `` `CHANGELOG.md:50-144#0.24.0` ``), checked against the target's own structure/content instead of just its line numbers. A short-form citation's range into a test file is also checked for a describe/it block boundary. See "Citation resolution (citations-resolve)" below. |
73
+ | `citations-resolve` | warning / notice | For docs with a repo root, flags a `` `path:N`/`path:N-M` `` citation (and its `` `:N` ``/`` -`M` ``/`` (`N`) `` continuations, and bare paragraph-bound short forms `:N-M`/`(N-M)`) whose target file is missing, whose range is inverted or exceeds the file, or whose start line is blank or (for a non-markdown target) only a closing brace. A full citation may also carry an optional `#anchor` (e.g. `` `CHANGELOG.md:50-144#0.24.0` ``), checked against the target's own structure/content instead of just its line numbers. A backtick-delimited `` `path:#heading` `` citation (`.md` targets only) resolves to a whole Markdown section instead of a line range, immune to every line-number shift above it; see "Heading-section citations" below. A short-form citation's range into a test file is also checked for a describe/it block boundary. `--require-anchors` opts into four additional checks; see "Anchor strictness (opt-in, `--require-anchors`)" below. See "Citation resolution (citations-resolve)" below. |
74
74
 
75
75
  ## repo-root auto-detection
76
76
 
@@ -124,6 +124,16 @@ Known limitation: the doc-commit comparison suppresses staleness for every sourc
124
124
  | `anchor-heading-not-found` | A heading-anchored citation has no heading (level 1 or 2) anywhere before its start line to anchor against; use a string anchor (`#"..."`) instead against a target with no heading structure. **Warning**. |
125
125
  | `anchor-not-found-in-range` | A string-anchored citation's (see below) anchor text does not occur, verbatim, on any line of the cited range. **Warning**. |
126
126
  | `anchor-malformed` | A `#` immediately follows a citation's range, but the text after it does not parse as either anchor form (unbalanced quotes, a backtick inside a quoted anchor, or nothing at all after the `#`). The citation is still checked as an ordinary anchorless citation; reported as a `notice` (never counted toward `--strict`) so a typo in an anchor does not silently turn off the very check it was written for. |
127
+ | `heading-section-not-found` | A heading-section citation's (see below) heading text does not match any level 1 or 2 heading in the target. **Warning**. |
128
+ | `heading-section-ambiguous` | A heading-section citation's heading text matches more than one level 1 or 2 heading in the target; reported rather than silently resolved to the first match. **Warning**. |
129
+ | `heading-section-empty` | A heading-section citation resolved to a single heading, but that heading's section has no non-blank content before the next heading of the same or shallower level. **Warning**. |
130
+ | `heading-section-content-anchor-not-found` | A heading-section citation's optional content anchor (`` `path:#heading#"text"` ``) does not occur on any line of the resolved section. **Warning**. |
131
+ | `heading-section-content-anchor-ambiguous` | A heading-section citation's content anchor occurs on more than one line of the resolved section; expected exactly one. **Warning**. |
132
+ | `heading-section-malformed` | A backtick-delimited `` `path:#...` `` opener does not parse as a well-formed heading-section citation (an unterminated or empty content-anchor quote, an unquoted third segment, or a non-`.md` target, including a non-lowercase `.MD` extension); reported as a `notice` (never counted toward `--strict`) so a typo does not silently vanish. |
133
+ | `anchor-required` | (opt-in, `--require-anchors`) An in-repo full citation carries no `#anchor` at all. **Warning**. |
134
+ | `anchor-not-on-last-line` | (opt-in, `--require-anchors`) A string-anchored citation's anchor text was found in the cited range, but not on the range's own last CONTENT line (see below). **Warning**. |
135
+ | `anchor-not-unique-in-range` | (opt-in, `--require-anchors`) A string-anchored citation's anchor text occurs on more than one line of the cited range. **Warning**. |
136
+ | `test-range-straddles-block` | (opt-in, `--require-anchors`) A full citation's own range into a `.test.`/`.spec.` target (`.ts`, `.js`, `.mjs`) contains a `describe`/`it`/`test` block-head line, at the same or a shallower indent than the range's own first line, on any line other than that first line. **Warning**. |
127
137
 
128
138
  **Anchored citations.** A full citation may carry an anchor directly after its range: `` `path:N-M#anchor` ``, e.g. `` `CHANGELOG.md:50-144#0.24.0` ``. This closes a gap the checks above cannot: a CHANGELOG.md that grows by inserting each new release at the top shifts every later entry's absolute line numbers, so a citation that lands 15 lines off in the *wrong* release section is exactly as green as before the shift -- none of `missing-file`/`inverted-range`/`range-exceeds-file`/`blank-start-line`/`closing-brace-start-line` can tell the difference. An anchor pins the citation to a piece of the target's own structure or content that a pure line-shift does not preserve. Two forms, told apart by the anchor text itself:
129
139
 
@@ -136,7 +146,9 @@ Anchors are checked only once the base checks above (blank-start-line, closing-b
136
146
 
137
147
  **Known limitations.** The heading form's `heading.text.includes(anchor.text)` check is a plain substring match against the heading's raw text, not a token-boundary match: an anchor `0.1` matches a heading containing `[0.10.0]` (and, by the same construction, `[0.24.0]` "contains" `24.0`). This is a deliberate simplification, not implemented as token-boundary matching in this round; treat a heading-anchored citation as a strong drift signal, not a semantic guarantee, the same way the rest of this rule's checks are mechanical rather than semantic. Separately, the heading form runs `MD_HEADING_RE` (a bare `` `#{1,6}\s+...` `` match) against the target's raw lines regardless of the target's own file type, so a `# comment` line in a `.yml` or `.json` target is matched as if it were a Markdown heading; restricting the heading form to `.md` targets is left as a known limitation rather than implemented here. Both limitations stand as documented rather than implemented; both remain easy to tighten later without touching anchor syntax or backward compatibility.
138
148
 
139
- **Continuation citations.** Once a sentence states a full `path:N` citation, prose commonly repeats just the line (or range) for a later reference in the same sentence: `` `:N` ``/`` `:N-M` `` (bare colon-prefixed), `` -`M` ``/`` –`M` `` (hyphen- or en-dash-led, the tail of a split range like `` `path:N`-`M` ``), or `` (`N`) `` (parenthesized). Each resolves against the nearest preceding citation in the same doc that resolved to a real file; a continuation right after an unresolved, ambiguous, or out-of-scope citation is silently skipped, not misattributed to an earlier, unrelated file.
149
+ **Heading-section citations.** `` `path:#heading` `` resolves to a whole Markdown section instead of a line range, so an edit anywhere above the cited section (e.g. inserting a new release at the top of a CHANGELOG) changes nothing about the citation -- see the doc comment above `HEADING_SECTION_CITATION_RE` in `src/rules/citations-resolve.ts` for the full rationale, including why the grammar requires the `:#` colon-hash and is restricted to `.md` targets. Grammar: `` `path:#heading` `` or, with an optional content anchor, `` `path:#heading#"text"` `` (always the quoted form). The heading text must match exactly one level 1 or 2 heading in the target (same containment check and same level cap as the line-range anchor's heading form above); the resolved section must be non-empty; the content anchor, when given, must occur on exactly one line inside that section. A malformed attempt (an unterminated or empty content-anchor quote, an unquoted third segment, or a non-`.md` target) is reported rather than silently dropped -- see `heading-section-malformed` in the table above. An unbalanced bracket in the heading position (`` `path:#[unclosed` ``) is not malformed by this definition: it parses as a heading named `[unclosed` and is reported as `heading-section-not-found`, the same way the line-range anchor form treats it. A bare `` `path#heading` `` without the colon is never a citation (it is the shape of an ordinary Markdown link target written in prose). See the rule table above for the exact finding names.
150
+
151
+ **Continuation citations.** Once a sentence states a full `path:N` citation, prose commonly repeats just the line (or range) for a later reference in the same sentence: `` `:N` ``/`` `:N-M` `` (bare colon-prefixed), `` -`M` ``/`` –`M` `` (hyphen- or en-dash-led, the tail of a split range like `` `path:N`-`M` ``), or `` (`N`) `` (parenthesized). Each resolves against the nearest preceding citation in the same doc that resolved to a real file; a continuation right after an unresolved, ambiguous, or out-of-scope citation is silently skipped, not misattributed to an earlier, unrelated file. A heading-section citation (see above) carries no line number and is never a continuation's target: it never sets or clears which citation a later continuation resolves against.
140
152
 
141
153
  **Short-form citations.** Distinct from a continuation above: a *bare* (no backtick, no file name at all) colon-range `:N-M`, e.g. `:580-588` in running prose. A short-form citation binds to **the last full `path:N-M` citation named earlier in the same paragraph** -- not the nearest preceding citation anywhere in the doc (that is what a continuation does); a paragraph boundary is a blank (empty or whitespace-only) line. A short-form citation with no full citation earlier in its own paragraph is reported `short-form-unbound`, not silently skipped. Only a range is recognised, never a bare single number (`:5`): a bare number is too easily an unrelated enumeration marker (e.g. a numbered list item) to detect mechanically without a large false-positive cost. A resolved short-form citation gets every check a full citation gets, plus the test-file/Markdown block-boundary check above (`test-range-*` / `markdown-range-boundary-bracket-or-fence`).
142
154
 
@@ -156,6 +168,17 @@ The colon form does not have this problem, but still needs a gate: a candidate `
156
168
 
157
169
  Like `sources-fresh`, this rule requires a repo root (explicit `--repo-root` or auto-detected): without one, it emits a single bundle-level notice (`citation resolution skipped: not inside a git work tree`) rather than silently reporting nothing.
158
170
 
171
+ ### Anchor strictness (opt-in, `--require-anchors`)
172
+
173
+ Everything above is on by default. `--require-anchors` opts into four additional, stricter checks against `citations-resolve`, all `warning`-severity, off unless the flag is passed -- an existing bundle's findings under a plain `check` are byte-for-byte unaffected by this section existing. `--require-anchors` (and its sibling `--require-anchors-allow`) is a CLI flag only; okf-kit has no bundle-level config file today (no `.okf.yml`, no `okf-kit.config`, no frontmatter field), so there is no other way to turn this on. All four checks are also exempt for a citing doc that is a reserved file (`index.md`, `log.md`), the same carve-out `citations-resolve` already gives reserved docs for short-form matching elsewhere in this doc -- a reserved doc's citations still get the unconditional base checks (`missing-file`, `inverted-range`, `anchor-not-found-in-range`, and so on), just none of the four opt-in ones:
174
+
175
+ - **`anchor-required`.** An in-repo full citation (resolved to a real target -- an unresolved one already gets its own `missing-file`/`unresolved-ambiguous` finding, not this one) carrying no `#anchor` at all is flagged. Also exempt (beyond the reserved-doc carve-out above): a citedPath matching one of `--require-anchors-allow`'s patterns (repeatable/space-separated, exact string or a `*`/`?` glob against the citation's raw, as-written path text), for a doc category not meant to be anchor-checked, e.g. `--require-anchors-allow README.md INSTALL-AGENT.md`. A target cited under several different spellings in the same bundle (`init.ts` in one paragraph, `src/init.ts` in another) needs one allow pattern per spelling, or a `*basename` glob that covers all of them -- the match is against the citation's own raw text, not the path it resolves to. `--require-anchors-allow` is commander-variadic: its list stops at the next `-`-prefixed token, so flags placed after it parse normally, but it swallows the positional bundle path if placed before it (`check --require-anchors-allow README.md <bundleDir>` fails with a missing-argument error); pass it after the bundle path.
176
+ - **`anchor-not-on-last-line`.** A string-anchored citation (`` `path:N-M#"text"` ``) whose anchor text was found in the cited range, but not on the range's own last CONTENT line. A content line is any line whose trimmed text is not empty and not composed only of closing brackets/braces/parens plus an optional trailing `,`/`;` (`}`, `});`, `]);`, `}),`, and similar); a range ending on one or more such boilerplate lines (the common shape of a `});` that closes a whole cited block) resolves to the real content line before them instead. An anchor sitting on the range's first line survives a small insertion above the range (the shifted window still contains the anchor's original content, just at a different offset); anchoring on the last content line closes that, since the original last content line falls out of the shifted window on any insertion at all.
177
+ - **`anchor-not-unique-in-range`.** A string-anchored citation whose anchor text occurs on more than one line of the cited range -- ambiguous evidence for which occurrence is the one actually pinning the citation. A count of zero is unaffected (already `anchor-not-found-in-range`, unconditionally).
178
+ - **`test-range-straddles-block`.** A FULL citation's own range into a `.test.`/`.spec.` target (`.ts`, `.js`, `.mjs`) must not run into a sibling or outer `describe`/`it`/`test` block (including `.only`/`.skip`/`.each` variants): a block-head line at the same or a shallower indent than the range's own start line, found on any line of the range OTHER than that start line, means the citation straddled out into a sibling or outer block. A block-head line indented STRICTLY DEEPER than the start line is a nested block (e.g. every `it(` inside a `describe(` the range cites in full) and is not a straddle -- citing a whole block is expected to contain every head line nested inside it. The start line itself is never checked here -- it is either a legitimate block head (the range correctly starts a block) or legitimately inside a block's body (a deliberate partial citation), and both are fine. A range that leaves its block without a later block-head line inside it (ending on an outer block's closing line) is not detected by this line-based check. Deliberately scoped to test-file targets only, and to this same opt-in: a full citation into a Markdown target legitimately cites a couple of arbitrary lines all the time (the same reasoning that keeps the Markdown half of `test-range-start-not-head`/`test-range-end-not-closing` scoped to short-form citations only, see above), and turning this on unconditionally for every existing full citation would silently regress an already-green bundle for every consumer, not just one that opted in.
179
+
180
+ `--require-anchors` is off by default and, once on, surfaces a real backlog the first time it is run against an existing, unaudited bundle -- the same posture `blank-start-line` already documents for `citations-resolve` itself. `anchor-required` in particular is only useful once a bundle's citations have actually been anchored; running it against a bundle that predates anchoring will flag most of that bundle's full citations.
181
+
159
182
  ## Exit codes
160
183
 
161
184
  | Code | Meaning |
@@ -170,7 +193,7 @@ This is advisory: don't fail the build on warnings unless you pass `--strict`. U
170
193
 
171
194
  ```yaml
172
195
  - name: OKF bundle check
173
- run: npx okf-kit@0.7.0 check path/to/bundle
196
+ run: npx okf-kit@0.8.0 check path/to/bundle
174
197
  ```
175
198
 
176
199
  Pin the version: an unpinned `npx okf-kit` picks up new rules on their release day, which turns an unrelated PR red.
package/dist/cli.d.ts CHANGED
@@ -5,6 +5,20 @@ export { UsageError };
5
5
  export interface CheckOptions {
6
6
  repoRoot?: string;
7
7
  strict?: boolean;
8
+ /**
9
+ * Opt-in for `citations-resolve`'s stricter anchor checks
10
+ * (`anchor-required`, `anchor-not-on-last-line`,
11
+ * `anchor-not-unique-in-range`, and the test-file block-boundary check
12
+ * applied to a full citation's own range). See the "Anchor strictness
13
+ * (opt-in)" doc block in `src/rules/citations-resolve.ts`.
14
+ */
15
+ requireAnchors?: boolean;
16
+ /**
17
+ * Glob/exact-match patterns exempting a matching citedPath from
18
+ * `anchor-required` (see `RequireAnchorsOptions` in `src/types.ts`).
19
+ * Ignored when `requireAnchors` is not set.
20
+ */
21
+ requireAnchorsAllow?: string[];
8
22
  /** Test-only override for git access; production code shells out to the real `git` binary. */
9
23
  runGit?: RunGit;
10
24
  }
package/dist/cli.js CHANGED
@@ -25,6 +25,9 @@ export function runCheck(bundleDir, options = {}) {
25
25
  ? path.resolve(options.repoRoot)
26
26
  : detectRepoRoot(resolvedBundleDir, options.runGit);
27
27
  const ctx = loadBundle(resolvedBundleDir, repoRoot, options.runGit);
28
+ if (options.requireAnchors) {
29
+ ctx.requireAnchors = { allow: options.requireAnchorsAllow ?? [] };
30
+ }
28
31
  const findings = allRules.flatMap((rule) => rule.run(ctx));
29
32
  const summary = summarize(findings);
30
33
  const exitCode = summary.errors > 0 || (Boolean(options.strict) && summary.warnings > 0)
@@ -51,12 +54,18 @@ program
51
54
  "(auto-detected via `git rev-parse --show-toplevel` from the bundle dir when omitted)")
52
55
  .option("-j, --json", "Output findings as JSON")
53
56
  .option("-s, --strict", "Also fail (exit 1) when warnings are present")
57
+ .option("--require-anchors", "citations-resolve: also require every in-repo full citation to carry a #anchor, and check " +
58
+ "a string anchor lands uniquely on the last line of its range (opt-in, see README)")
59
+ .option("--require-anchors-allow <patterns...>", "citations-resolve: citedPath glob/exact patterns (e.g. README.md) exempt from " +
60
+ "--require-anchors' anchor-required check")
54
61
  .exitOverride()
55
62
  .action((bundleDir, opts) => {
56
63
  try {
57
64
  const result = runCheck(bundleDir, {
58
65
  repoRoot: opts.repoRoot,
59
66
  strict: opts.strict,
67
+ requireAnchors: opts.requireAnchors,
68
+ requireAnchorsAllow: opts.requireAnchorsAllow,
60
69
  });
61
70
  const output = opts.json
62
71
  ? renderJson(result.bundleDir, result.findings)
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGhE,OAAO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AAEvD,IAAI,YAAY,EAAE,CAAC;IACjB,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACjC,IAAI,GAAG,YAAY,cAAc,EAAE,CAAC;YAClC,IAAI,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC;YACD,iEAAiE;YACjE,qEAAqE;YACrE,uEAAuE;YACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,YAAY,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CACjE,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,WAAW;IAClB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAyB,CAAC;QACrD,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -216,6 +216,99 @@ const RULE_ID = "citations-resolve";
216
216
  * plus prose) to stay in sync, the exact class of drift this rule
217
217
  * exists to catch.
218
218
  */
219
+ /**
220
+ * Anchor strictness (opt-in, `--require-anchors`, see `src/cli.ts`).
221
+ * Backward compatible by construction: every check in this section is
222
+ * gated on `ctx.requireAnchors` being present (`RequireAnchorsOptions`, see
223
+ * `src/types.ts`), so a consumer that never passes `--require-anchors`
224
+ * sees byte-identical findings to before this section existed. Three new
225
+ * rule ids, all `warning`-severity, mirroring this rule's own "a wrong
226
+ * start/target is strong drift evidence" posture rather than the `notice`
227
+ * posture reserved for the mechanical prose checks with a real
228
+ * false-positive risk (`markdown-range-boundary-bracket-or-fence` and
229
+ * friends):
230
+ *
231
+ * - `anchor-required`: an in-repo full citation (`path:N`/`path:N-M`,
232
+ * resolved to a real target -- an unresolved citation already gets its
233
+ * own `missing-file`/`unresolved-ambiguous` finding, not this one)
234
+ * carrying no `#anchor` at all. Exempted the same way this rule already
235
+ * exempts short-form matching for a reserved citing doc
236
+ * (`doc.isReserved`, e.g. `log.md`'s append-only line-number narration),
237
+ * and additionally by `requireAnchors.allow`: a citedPath matching one
238
+ * of its glob/exact patterns (matched against the citation's raw,
239
+ * as-written `citedPath` text -- see `matchesAllowPattern`) is exempt,
240
+ * for a doc category this check is not (yet) meant to cover, e.g. a
241
+ * README or install guide whose prose is not line-anchored the way a
242
+ * CHANGELOG or source citation is.
243
+ * - `anchor-not-on-last-line`: layered on `checkAnchor`'s existing string
244
+ * branch. An anchor sitting on the FIRST line of a wide range survives a
245
+ * k-line insertion above the range whenever k is smaller than the range
246
+ * itself, because the shifted window (the citation's own line numbers,
247
+ * re-read after the insertion) still contains the original first
248
+ * line's content, just at a different offset inside the window.
249
+ * Anchoring on the LAST line instead closes that: the original last
250
+ * line falls out of the shifted window on any insertion size >= 1, not
251
+ * only large ones.
252
+ * - `anchor-not-unique-in-range`: also layered on the string branch. An
253
+ * anchor text occurring more than once inside its own cited range is
254
+ * ambiguous evidence -- which occurrence is the one actually pinning
255
+ * the citation? A count of zero is unaffected (already
256
+ * `anchor-not-found-in-range`, unconditionally, not double-reported
257
+ * here).
258
+ *
259
+ * Both of the last two are checked only once a match exists at all (count
260
+ * >= 1); uniqueness is checked before last-line placement, since a
261
+ * non-unique anchor is the more fundamental problem (which of the several
262
+ * matching lines "is" the anchor is undefined before asking whether the
263
+ * one occurrence is on the right line).
264
+ *
265
+ * A fourth check, `test-range-straddles-block` (warning), applies to a FULL
266
+ * citation's own range into a `.test.`/`.spec.` target (`.ts`, `.js`,
267
+ * `.mjs`) under this same opt-in (see `checkTestRangeStraddle`, called
268
+ * from `checkFullTarget`): a
269
+ * full citation's range is expected to stay inside a single `describe`/
270
+ * `it`/`test` block once it starts, so any block-head line
271
+ * (`describe(`/`describe.only(`/`describe.skip(`/`describe.each(`/`it(`/
272
+ * `it.only(`/`it.skip(`/`it.each(`/`test(`/`test.only(`/`test.skip(`/
273
+ * `test.each(`, see `TEST_BLOCK_HEAD_RE`) found on any line of the range
274
+ * OTHER than its own first line means the citation ran into a sibling or
275
+ * outer block (or never really started on one). A range that leaves its
276
+ * block without a later head line inside it (ending on an outer block's
277
+ * closing line) is not detected by this line-based check. The range's start
278
+ * line is never itself checked here: it is either a legitimate block head
279
+ * (the range correctly starts a block) or legitimately inside a block's
280
+ * body (a partial citation into the middle of a block), and both are fine
281
+ * -- only a head line reappearing *after* the start is evidence of drift.
282
+ * Deliberately its own rule id rather than reusing `checkRangeBoundary`'s
283
+ * `test-range-start-not-head`/`test-range-end-not-closing` (which stay
284
+ * short-form-only, see `checkShortFormTarget`): those two require the range
285
+ * to start exactly on a head line and end exactly on the matching closing
286
+ * `});`, which is far stricter than a full citation's legitimate use
287
+ * (citing an arbitrary sub-range once a paragraph has already named the
288
+ * file) needs -- the straddle check only cares whether the range crossed a
289
+ * block boundary, not whether it captured a whole block precisely.
290
+ * Deliberately scoped to test-file targets only, same reasoning
291
+ * `checkShortFormTarget`'s own doc comment already gives for the Markdown
292
+ * half of the block-boundary check: a full citation into a Markdown target
293
+ * legitimately cites a couple of arbitrary lines all the time.
294
+ */
295
+ /**
296
+ * True when `citedPath` (the citation's raw, as-written path text) matches
297
+ * one of `patterns`: an exact string match, or a glob with `*` (any run of
298
+ * characters) and `?` (any single character) as the only wildcards -- the
299
+ * minimal shape needed for `requireAnchors.allow`'s own documented example
300
+ * (`["README.md", "INSTALL-AGENT.md"]`), not a general-purpose glob engine.
301
+ */
302
+ function matchesAllowPattern(citedPath, patterns) {
303
+ return patterns.some((pattern) => {
304
+ if (!pattern.includes("*") && !pattern.includes("?")) {
305
+ return pattern === citedPath;
306
+ }
307
+ const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&");
308
+ const reSource = "^" + escaped.replace(/\*/g, ".*").replace(/\?/g, ".") + "$";
309
+ return new RegExp(reSource).test(citedPath);
310
+ });
311
+ }
219
312
  const ANCHOR_HEADING_MAX_LEVEL = 2;
220
313
  const MD_HEADING_RE = /^(#{1,6})\s+(.*)$/;
221
314
  /**
@@ -335,22 +428,73 @@ function findEnclosingHeading(lines, startLine, fencedLines) {
335
428
  }
336
429
  return null;
337
430
  }
431
+ // A trimmed line composed of nothing but closing brackets/braces/parens
432
+ // plus an optional trailing `,`/`;` -- bare closing boilerplate like `}`,
433
+ // `});`, `]);`, `}),`. Used only by `lastContentLineInRange` (opt-in
434
+ // `anchor-not-on-last-line`, see there): a range that ends on such a line
435
+ // (the common shape of a `});` that closes a whole cited `describe`/`it`
436
+ // block) should not force the anchor onto that boilerplate line itself --
437
+ // the last CONTENT line before it is the meaningful place for an anchor
438
+ // to live.
439
+ const CLOSING_BOILERPLATE_RE = /^[\]\)\};,]*$/;
440
+ function isContentLine(text) {
441
+ const trimmed = text.trim();
442
+ return trimmed !== "" && !CLOSING_BOILERPLATE_RE.test(trimmed);
443
+ }
444
+ /**
445
+ * The last line number (1-based, within `[startLine, endLine]`) whose text
446
+ * is a "content" line -- see `isContentLine`. Walks backward from `endLine`
447
+ * so a range ending on one or more bare closing-boilerplate lines (`});`,
448
+ * `]);`, `}),`, a lone `}`) resolves to the real content line before them
449
+ * instead of the boilerplate itself. Falls back to `endLine` unchanged when
450
+ * every line in the range is boilerplate or blank (nothing better to
451
+ * anchor against).
452
+ */
453
+ function lastContentLineInRange(lines, startLine, endLine) {
454
+ for (let ln = endLine; ln >= startLine; ln--) {
455
+ if (isContentLine(lines[ln - 1] ?? ""))
456
+ return ln;
457
+ }
458
+ return endLine;
459
+ }
338
460
  /**
339
461
  * Checks an anchored full citation's anchor against its already-resolved,
340
462
  * already-range-checked target -- see the "Anchored citations" doc block
341
463
  * above for the two forms' semantics. `endLine` is the citation's end line,
342
464
  * or its start line for a single-line citation (a size-1 range).
343
465
  */
344
- function checkAnchor(anchor, startLine, endLine, lines) {
466
+ function checkAnchor(anchor, startLine, endLine, lines, requireAnchors) {
345
467
  if (anchor.kind === "string") {
468
+ let count = 0;
469
+ let lastMatchLine = -1;
346
470
  for (let i = startLine - 1; i <= endLine - 1 && i < lines.length; i++) {
347
- if ((lines[i] ?? "").includes(anchor.text))
348
- return null;
471
+ if ((lines[i] ?? "").includes(anchor.text)) {
472
+ count++;
473
+ lastMatchLine = i + 1;
474
+ }
349
475
  }
350
- return {
351
- rule: "anchor-not-found-in-range",
352
- message: `anchor "${anchor.text}" does not occur in the cited range (${startLine}-${endLine})`,
353
- };
476
+ if (count === 0) {
477
+ return {
478
+ rule: "anchor-not-found-in-range",
479
+ message: `anchor "${anchor.text}" does not occur in the cited range (${startLine}-${endLine})`,
480
+ };
481
+ }
482
+ if (requireAnchors) {
483
+ if (count > 1) {
484
+ return {
485
+ rule: "anchor-not-unique-in-range",
486
+ message: `anchor "${anchor.text}" occurs on ${count} lines of the cited range (${startLine}-${endLine}); expected exactly one`,
487
+ };
488
+ }
489
+ const lastContentLine = lastContentLineInRange(lines, startLine, endLine);
490
+ if (lastMatchLine !== lastContentLine) {
491
+ return {
492
+ rule: "anchor-not-on-last-line",
493
+ message: `anchor "${anchor.text}" occurs on line ${lastMatchLine}, not the cited range's last content line (${lastContentLine})`,
494
+ };
495
+ }
496
+ }
497
+ return null;
354
498
  }
355
499
  const fencedLines = computeFencedLineIndices(lines);
356
500
  const heading = findEnclosingHeading(lines, startLine, fencedLines);
@@ -380,6 +524,86 @@ function checkAnchor(anchor, startLine, endLine, lines) {
380
524
  return null;
381
525
  }
382
526
  const CITATION_RE = /([\w./-]+\.(?:ts|js|mjs|md|yml|yaml|json)):(\d+)(?:-(\d+))?(?:#(\[?\w(?:[\w.-]*\w)?\]?|"[^"\n`]*"))?/g;
527
+ /**
528
+ * Heading-section citations. A CHANGELOG.md that grows by insertion at the
529
+ * top forces every later `path:N-M#anchor` citation to be re-pointed on
530
+ * every release, even with the heading anchor above closing the "wrong
531
+ * section" gap -- the line RANGE itself still drifts on every insertion,
532
+ * so the citation still needs editing, just not silently mis-validated.
533
+ * `path:#heading` sidesteps line numbers entirely: it names a heading
534
+ * (matched the same way the line-range anchor above already matches one,
535
+ * `heading.text.includes(...)`, reused rather than re-invented -- see
536
+ * `parseAnchor`/`findHeadingSection`) and resolves to that heading's own
537
+ * section (from the line after the heading up to, but not including, the
538
+ * next heading of the same or shallower level, or EOF) -- see
539
+ * `findHeadingSection`. The section must exist (`heading-section-not-found`
540
+ * when no such heading is found), must be unambiguous (more than one
541
+ * matching heading is `heading-section-ambiguous`, never silently the
542
+ * first hit -- the same posture `unresolved-ambiguous` already takes for
543
+ * path resolution), and must not be empty (`heading-section-empty`).
544
+ *
545
+ * Deliberately reuses `ANCHOR_HEADING_MAX_LEVEL` (2), not a second cap: the
546
+ * same Keep-a-Changelog nesting that motivates the line-range anchor's cap
547
+ * (`## [x.y.z]` release headings around identically-named, per-release
548
+ * `### Added`/`### Changed`/`### Fixed` subsections) means a level-3+
549
+ * heading name is *never* unique across a real CHANGELOG anyway --
550
+ * matching it would just turn every such citation into a guaranteed
551
+ * `heading-section-ambiguous`. Capping the search at level 2 keeps this
552
+ * form usable for exactly the case it exists for (a release section) and
553
+ * behaves identically to the line-range anchor for the same reason.
554
+ *
555
+ * Optional content anchor: `path:#heading#"text"`, always the quoted form
556
+ * (a section's body is prose/content, not a second heading to look up) --
557
+ * the text must occur on EXACTLY one line inside the resolved section
558
+ * (`heading-section-content-anchor-not-found` / `-ambiguous`), stricter
559
+ * than the line-range string anchor's "at least one line" (`checkAnchor`'s
560
+ * string branch): a whole section is a much larger haystack than a
561
+ * caller-chosen line range, so "present somewhere" is far weaker evidence
562
+ * the anchor still points at the intended spot, and "found on exactly one
563
+ * line" is what the task this form was built for (pinning a citation to
564
+ * one prose sentence inside a growing section) actually needs. The heading
565
+ * position itself keeps only the bare/bracketed form (`#heading`/
566
+ * `#[heading]`); the quoted alternative is reserved for the content anchor
567
+ * position so the two can never be confused by shape alone.
568
+ *
569
+ * Backtick-delimited, unlike the line-range form above (which does not
570
+ * require backticks -- see the "Anchor syntax note" in the README). This
571
+ * is a deliberate, narrower grammar for this form specifically: a bare
572
+ * `path#heading` (the grammar this form used in an earlier round) is
573
+ * indistinguishable from an ordinary Markdown link's target, which
574
+ * commonly has exactly that shape (`[install](docs/README.md#install)`)
575
+ * -- unlike the line-range form (gated by a `:N` no ordinary link ever
576
+ * contains), there was no character available to tell a real citation
577
+ * apart from a relative link's href written in prose, and measuring
578
+ * against real bundles (see the CHANGELOG entry that introduced the
579
+ * `:#` form) showed the collision is not hypothetical: existing docs write
580
+ * `` `path#heading` `` as inline prose pointing at an unrelated anchor,
581
+ * each producing a spurious `heading-section-not-found`. The colon
582
+ * (`path:#heading`) reuses this rule's existing citation signature (a
583
+ * literal `:` no Markdown link fragment ever contains) instead of relying
584
+ * on backticks alone to do that job, and is additionally restricted to a
585
+ * `.md` target: a link fragment's target is always the Markdown doc it
586
+ * points into, never a source or config file, so a non-`.md` path with
587
+ * this shape is never a live citation. Requiring the whole citation
588
+ * inside one pair of backticks stays in place as well, matching this
589
+ * rule's own general recommendation for the line-range form.
590
+ */
591
+ const HEADING_SECTION_CITATION_RE = /`([\w./-]+\.md):#(\[?\w(?:[\w.-]*\w)?\]?)(?:#("[^"\n`]+"))?`/g;
592
+ /**
593
+ * Companion to `HEADING_SECTION_CITATION_RE`: matches the same
594
+ * backtick + path + `:#` opener but accepts anything up to the closing
595
+ * backtick, so a heading-section citation that fails to parse (an
596
+ * unterminated or empty content-anchor quote, an unquoted third segment,
597
+ * or a non-`.md` target, which includes a non-lowercase `.MD` extension) is
598
+ * still recognised as an *attempt* rather than
599
+ * silently vanishing -- mirrors `anchor-malformed`'s
600
+ * "still-visible-as-a-notice" posture for the line-range anchor form (see
601
+ * `extractMalformedAnchorRaw`). Only used for a match whose span does not
602
+ * already overlap a successful `HEADING_SECTION_CITATION_RE` match (see
603
+ * `collectHeadingSectionMatches`); a well-formed citation never also
604
+ * produces a malformed notice.
605
+ */
606
+ const HEADING_SECTION_MALFORMED_RE = /`([\w./-]+):#([^`\n]*)`/g;
383
607
  // Continuation citation forms (see the "Continuation citations" doc block
384
608
  // above). Each requires the backtick delimiter as part of the match so it
385
609
  // can never overlap a CITATION_RE match: a full citation's regex match
@@ -404,6 +628,14 @@ const SHORT_FORM_COLON_RE = /:(\d+)-(\d+)/g;
404
628
  const TEST_FILE_RE = /\.(test|spec)\.(ts|js|mjs)$/i;
405
629
  const TEST_HEAD_LINE_RE = /^\s*(?:describe|it)\s*\(/;
406
630
  const TEST_CLOSING_LINE_RE = /^\s*\}\)\s*;\s*$/;
631
+ // Block-head detection for test-range-straddles-block (see the doc block
632
+ // above and checkTestRangeStraddle below): a wider set of head shapes than
633
+ // TEST_HEAD_LINE_RE (which stays short-form-only, unchanged, via
634
+ // checkRangeBoundary/checkShortFormTarget) -- describe/it/test, each with
635
+ // an optional .only/.skip/.each modifier. A leading `export `/`async ` is
636
+ // deliberately not handled: not needed for any bundle this rule has been
637
+ // measured against.
638
+ const TEST_BLOCK_HEAD_RE = /^\s*(?:describe|it|test)(?:\.(?:only|skip|each))?\s*\(/;
407
639
  // Markdown block-boundary check (see checkRangeBoundary): a range boundary
408
640
  // line that is nothing but a bracket (open or close), optionally with a
409
641
  // trailing `,`/`;`, is always a drift signal. A bare code-fence delimiter is
@@ -679,17 +911,215 @@ function checkTarget(citedPath, startLine, endLine, resolvedPath) {
679
911
  * are full-citation-only (see that doc block for why), so `checkTarget`
680
912
  * itself is untouched and still used as-is for a cont-fresh atom.
681
913
  */
682
- function checkFullTarget(citedPath, startLine, endLine, resolvedPath, anchor) {
914
+ function checkFullTarget(citedPath, startLine, endLine, resolvedPath, anchor, requireAnchors) {
683
915
  const read = readTarget(resolvedPath);
684
916
  if ("rule" in read)
685
- return read;
917
+ return [read];
686
918
  const lines = splitLines(read.content);
687
919
  const base = checkTargetLines(citedPath, startLine, endLine, lines);
688
920
  if (base)
689
- return base;
690
- if (!anchor)
691
- return null;
692
- return checkAnchor(anchor, startLine, endLine ?? startLine, lines);
921
+ return [base];
922
+ const problems = [];
923
+ // test-range-straddles-block, opt-in only (see "Anchor strictness
924
+ // (opt-in)" above and checkTestRangeStraddle): a full citation's own
925
+ // range into a .test./.spec. target (.ts, .js, .mjs) must not cross
926
+ // into another block's head after its own first line. Deliberately
927
+ // scoped to test-file targets only (isTestFile), not also a markdown
928
+ // branch: a
929
+ // full citation into a markdown target legitimately cites a couple of
930
+ // arbitrary lines all the time (e.g. two lines of a code fence example),
931
+ // the exact reasoning checkShortFormTarget's own doc comment already
932
+ // gives for why the sibling block-boundary check was scoped to
933
+ // short-form in the first place. Only meaningful for an actual range
934
+ // (endLine !== null); a single-line citation trivially starts and ends
935
+ // on the same line and has nothing to straddle.
936
+ if (requireAnchors && endLine !== null && isTestFile(citedPath)) {
937
+ const straddle = checkTestRangeStraddle(startLine, endLine, lines);
938
+ if (straddle)
939
+ problems.push(straddle);
940
+ }
941
+ // The anchor check is run independently of the straddle check above
942
+ // (not gated on it having come back clean): a straddling range and a
943
+ // missing/misplaced anchor are two independent problems with the same
944
+ // citation, and reporting only the first one found would silently drop
945
+ // the other from the output every time both happen to co-occur.
946
+ if (anchor) {
947
+ const anchorProblem = checkAnchor(anchor, startLine, endLine ?? startLine, lines, requireAnchors);
948
+ if (anchorProblem)
949
+ problems.push(anchorProblem);
950
+ }
951
+ return problems;
952
+ }
953
+ /**
954
+ * Every Markdown heading in `lines` up to `ANCHOR_HEADING_MAX_LEVEL`, in
955
+ * document order -- the whole-document counterpart of `findEnclosingHeading`
956
+ * (which stops at the nearest heading at or before a given line): a
957
+ * heading-section citation has no start line to search backward from, it
958
+ * needs every candidate to test for a unique match. `fencedLines` (see
959
+ * `computeFencedLineIndices`) excludes a `#`-led line inside a fenced
960
+ * example, same as `findEnclosingHeading`.
961
+ */
962
+ function collectHeadingsUpToLevel(lines, fencedLines) {
963
+ const headings = [];
964
+ for (let i = 0; i < lines.length; i++) {
965
+ if (fencedLines.has(i))
966
+ continue;
967
+ const m = (lines[i] ?? "").match(MD_HEADING_RE);
968
+ if (m && m[1].length <= ANCHOR_HEADING_MAX_LEVEL) {
969
+ headings.push({ level: m[1].length, text: m[2].trim(), lineNo: i + 1 });
970
+ }
971
+ }
972
+ return headings;
973
+ }
974
+ /**
975
+ * Resolves a heading-section citation's heading text to a single section:
976
+ * every level <= `ANCHOR_HEADING_MAX_LEVEL` heading whose text contains
977
+ * `headingText` (same containment check `checkAnchor`'s heading branch
978
+ * already uses -- reused, not reinvented) is a candidate; zero is
979
+ * `not-found`, more than one is `ambiguous` (never silently the first
980
+ * match), exactly one resolves to the section running from the line right
981
+ * after the heading up to (not including) the next heading at or above the
982
+ * same level, or EOF -- the same enclosure boundary `checkAnchor`'s heading
983
+ * branch walks forward to check, just producing a body range here instead
984
+ * of a pass/fail against an already-known end line.
985
+ */
986
+ function findHeadingSection(lines, fencedLines, headingText) {
987
+ const headings = collectHeadingsUpToLevel(lines, fencedLines);
988
+ const matches = headings.filter((h) => h.text.includes(headingText));
989
+ if (matches.length === 0)
990
+ return { kind: "not-found" };
991
+ if (matches.length > 1)
992
+ return { kind: "ambiguous", matches };
993
+ const heading = matches[0];
994
+ let bodyEnd = lines.length;
995
+ for (let i = heading.lineNo; i < lines.length; i++) {
996
+ if (fencedLines.has(i))
997
+ continue;
998
+ const m = (lines[i] ?? "").match(MD_HEADING_RE);
999
+ if (m && m[1].length <= heading.level) {
1000
+ bodyEnd = i;
1001
+ break;
1002
+ }
1003
+ }
1004
+ return { kind: "found", heading, bodyStart: heading.lineNo, bodyEnd };
1005
+ }
1006
+ /** True when every line in `[bodyStart, bodyEnd)` is empty or whitespace-only. */
1007
+ function isSectionEmpty(lines, bodyStart, bodyEnd) {
1008
+ for (let i = bodyStart; i < bodyEnd; i++) {
1009
+ if ((lines[i] ?? "").trim() !== "")
1010
+ return false;
1011
+ }
1012
+ return true;
1013
+ }
1014
+ /**
1015
+ * Count of lines in `[bodyStart, bodyEnd)` containing `text` -- a heading
1016
+ * section's content anchor must occur on exactly one such line (see the
1017
+ * "Heading-section citations" doc block above for why this is stricter
1018
+ * than the line-range string anchor's "at least one line").
1019
+ */
1020
+ function countAnchorOccurrences(lines, bodyStart, bodyEnd, text) {
1021
+ let count = 0;
1022
+ for (let i = bodyStart; i < bodyEnd; i++) {
1023
+ if ((lines[i] ?? "").includes(text))
1024
+ count++;
1025
+ }
1026
+ return count;
1027
+ }
1028
+ /**
1029
+ * A heading-section citation's complete target check (see the
1030
+ * "Heading-section citations" doc block above): the named heading must
1031
+ * exist exactly once, its section must be non-empty, and, when a content
1032
+ * anchor was given, it must occur on exactly one line inside that section.
1033
+ * One problem per citation, checked in that order, matching every other
1034
+ * check in this file's "base checks first" pattern.
1035
+ */
1036
+ function checkHeadingSectionTarget(headingAnchor, contentAnchor, resolvedPath) {
1037
+ const read = readTarget(resolvedPath);
1038
+ if ("rule" in read)
1039
+ return read;
1040
+ const lines = splitLines(read.content);
1041
+ const fencedLines = computeFencedLineIndices(lines);
1042
+ const section = findHeadingSection(lines, fencedLines, headingAnchor.text);
1043
+ if (section.kind === "not-found") {
1044
+ return {
1045
+ rule: "heading-section-not-found",
1046
+ message: `no heading (level <= ${ANCHOR_HEADING_MAX_LEVEL}) contains "${headingAnchor.text}"`,
1047
+ };
1048
+ }
1049
+ if (section.kind === "ambiguous") {
1050
+ return {
1051
+ rule: "heading-section-ambiguous",
1052
+ message: `${section.matches.length} headings contain "${headingAnchor.text}" (lines ${section.matches
1053
+ .map((m) => m.lineNo)
1054
+ .join(", ")}); not evaluated`,
1055
+ };
1056
+ }
1057
+ if (isSectionEmpty(lines, section.bodyStart, section.bodyEnd)) {
1058
+ return {
1059
+ rule: "heading-section-empty",
1060
+ message: `section under heading "${section.heading.text}" (line ${section.heading.lineNo}) has no non-blank content before the next heading`,
1061
+ };
1062
+ }
1063
+ if (contentAnchor) {
1064
+ const count = countAnchorOccurrences(lines, section.bodyStart, section.bodyEnd, contentAnchor.text);
1065
+ if (count === 0) {
1066
+ return {
1067
+ rule: "heading-section-content-anchor-not-found",
1068
+ message: `content anchor "${contentAnchor.text}" does not occur in the section under heading "${section.heading.text}"`,
1069
+ };
1070
+ }
1071
+ if (count > 1) {
1072
+ return {
1073
+ rule: "heading-section-content-anchor-ambiguous",
1074
+ message: `content anchor "${contentAnchor.text}" occurs on ${count} lines in the section under heading "${section.heading.text}"; expected exactly one`,
1075
+ };
1076
+ }
1077
+ }
1078
+ return null;
1079
+ }
1080
+ /**
1081
+ * Every well-formed heading-section citation in `content`, in document
1082
+ * order. Collected once, up front (before `CITATION_RE`'s own scan in
1083
+ * `scanDoc`), so its match spans can gate both `CITATION_RE` (a full
1084
+ * citation never fires inside a heading-section citation's own quoted
1085
+ * content anchor, see the "Heading-section citations" doc block above) and
1086
+ * the malformed companion scan (see `collectHeadingSectionMalformedMatches`)
1087
+ * without re-deriving the same spans twice.
1088
+ */
1089
+ function collectHeadingSectionMatches(content) {
1090
+ const out = [];
1091
+ const re = new RegExp(HEADING_SECTION_CITATION_RE.source, HEADING_SECTION_CITATION_RE.flags);
1092
+ let m;
1093
+ while ((m = re.exec(content)) !== null) {
1094
+ out.push({
1095
+ index: m.index,
1096
+ end: m.index + m[0].length,
1097
+ citedPath: m[1],
1098
+ headingAnchor: parseAnchor(m[2]), // group 2 is mandatory
1099
+ contentAnchor: parseAnchor(m[3]),
1100
+ });
1101
+ }
1102
+ return out;
1103
+ }
1104
+ /**
1105
+ * Every backtick + path + `:#` opener in `content` that did NOT parse as a
1106
+ * well-formed heading-section citation (see `HEADING_SECTION_MALFORMED_RE`'s
1107
+ * doc comment) -- an unterminated content-anchor quote, an unquoted third
1108
+ * segment, or a non-`.md` target. `wellFormedSpans` (from
1109
+ * `collectHeadingSectionMatches`) gates out any match that is really just
1110
+ * the successful citation seen from the outside; a well-formed citation
1111
+ * never also produces a malformed notice.
1112
+ */
1113
+ function collectHeadingSectionMalformedMatches(content, wellFormedSpans) {
1114
+ const out = [];
1115
+ const re = new RegExp(HEADING_SECTION_MALFORMED_RE.source, "g");
1116
+ let m;
1117
+ while ((m = re.exec(content)) !== null) {
1118
+ if (isWithinAnySpan(m.index, wellFormedSpans))
1119
+ continue;
1120
+ out.push({ index: m.index, end: m.index + m[0].length, raw: m[0] });
1121
+ }
1122
+ return out;
693
1123
  }
694
1124
  // A cont-ext atom only ever extends the *end* of a range whose start line
695
1125
  // was already fully checked (blank / closing-brace) when it was cited as
@@ -839,6 +1269,53 @@ function checkRangeBoundary(citedPath, startLine, endLine, lines) {
839
1269
  }
840
1270
  return null;
841
1271
  }
1272
+ /**
1273
+ * Width (in characters) of `text`'s leading run of spaces/tabs -- used by
1274
+ * `checkTestRangeStraddle` to tell a NESTED block head (indented deeper
1275
+ * than the range's own start line) apart from a SIBLING or OUTER one
1276
+ * (indented the same or shallower): citing a whole `describe` block
1277
+ * necessarily contains every `it(`/nested-`describe(` head inside its own
1278
+ * body, and those are not straddling anywhere, they are exactly what the
1279
+ * citation is about.
1280
+ */
1281
+ function leadingWhitespaceWidth(text) {
1282
+ return (text.match(/^[ \t]*/) ?? [""])[0].length;
1283
+ }
1284
+ /**
1285
+ * `test-range-straddles-block` (opt-in, warning): a FULL citation's own
1286
+ * range into a `.test.`/`.spec.` target (`.ts`, `.js`, `.mjs`), see the
1287
+ * "Anchor strictness (opt-in)" doc block above for the full rule text.
1288
+ * Checks every line of `[startLine, endLine]` EXCEPT the range's own
1289
+ * first line (`startLine`
1290
+ * itself is never checked -- see that doc block for why) against
1291
+ * `TEST_BLOCK_HEAD_RE`; the first hit (in document order) is reported,
1292
+ * matching this file's "one problem per citation" pattern. A block-head
1293
+ * line indented STRICTLY DEEPER than the range's own start line is a
1294
+ * NESTED block (e.g. the `it(`s inside a `describe(` the range cites in
1295
+ * full) and is skipped, not reported: a citation covering a whole block is
1296
+ * expected to contain every head line nested inside it. A block-head line
1297
+ * at the same or a shallower indent is a SIBLING or OUTER block and is
1298
+ * still reported -- this is an approximation of "which block scope is
1299
+ * this line lexically in" using indentation instead of a real AST, chosen
1300
+ * because it reproduces the AST-based reference verdict on every straddle
1301
+ * finding this rule has been measured against; a file that mixes tabs and
1302
+ * spaces, or that does not indent nested blocks at all, can defeat it.
1303
+ */
1304
+ function checkTestRangeStraddle(startLine, endLine, lines) {
1305
+ const startIndent = leadingWhitespaceWidth(lines[startLine - 1] ?? "");
1306
+ for (let i = startLine; i <= endLine - 1 && i < lines.length; i++) {
1307
+ const text = lines[i] ?? "";
1308
+ if (!TEST_BLOCK_HEAD_RE.test(text))
1309
+ continue;
1310
+ if (leadingWhitespaceWidth(text) > startIndent)
1311
+ continue; // nested block
1312
+ return {
1313
+ rule: "test-range-straddles-block",
1314
+ message: `range straddles into another block's head at line ${i + 1} ("${text.trim()}")`,
1315
+ };
1316
+ }
1317
+ return null;
1318
+ }
842
1319
  /**
843
1320
  * A short-form citation's full check: checkTarget's existing checks
844
1321
  * (unreadable-target, inverted-range, range-exceeds-file, blank-start-line,
@@ -1223,11 +1700,36 @@ function extractMalformedAnchorRaw(content, hashIndex) {
1223
1700
  }
1224
1701
  return content.slice(from, end);
1225
1702
  }
1226
- function scanDoc(cache, root, bundleDir, doc) {
1703
+ function scanDoc(cache, root, bundleDir, doc, requireAnchors) {
1227
1704
  const findings = [];
1228
1705
  const content = doc.raw;
1229
1706
  const sources = getValidSources(doc.frontmatter.parsed) ?? [];
1230
1707
  const docAbsPath = path.join(bundleDir, doc.relPath);
1708
+ // The four `--require-anchors` opt-in checks (anchor-required,
1709
+ // anchor-not-on-last-line, anchor-not-unique-in-range,
1710
+ // test-range-straddles-block) are all exempt for a reserved citing doc
1711
+ // (index.md/log.md, see doc.isReserved), the same carve-out this rule
1712
+ // already gives reserved docs for short-form matching: an append-only
1713
+ // narrative journal routinely narrates historical line-number deltas as
1714
+ // prose about the past, not live citations against current content.
1715
+ // Threaded as `undefined` here (rather than a second boolean everywhere
1716
+ // `requireAnchors` is read) so every opt-in check downstream stays gated
1717
+ // on the exact same "is this option object present" test it already
1718
+ // uses for the non-reserved case.
1719
+ const requireAnchorsForDoc = doc.isReserved ? undefined : requireAnchors;
1720
+ // Heading-section citations (well-formed and malformed) are collected up
1721
+ // front so their char spans can gate the `CITATION_RE` scan below: a
1722
+ // `CITATION_RE` match landing inside a heading-section citation's own
1723
+ // quoted content anchor (e.g. `` `x.md:#2.0.0#"see other.md:12 now"` ``)
1724
+ // is not a second, independent citation -- it is text the heading-section
1725
+ // citation already owns. Reused again lower down for the heading-section
1726
+ // findings themselves, rather than re-scanning by regex a second time.
1727
+ const headingSectionMatches = collectHeadingSectionMatches(content);
1728
+ const headingSectionSpans = headingSectionMatches.map((hs) => [hs.index, hs.end]);
1729
+ const headingSectionMalformedMatches = collectHeadingSectionMalformedMatches(content, headingSectionSpans);
1730
+ for (const hm of headingSectionMalformedMatches) {
1731
+ headingSectionSpans.push([hm.index, hm.end]);
1732
+ }
1231
1733
  const fullAtoms = [];
1232
1734
  // Char spans of every matched full citation, used to keep short-form
1233
1735
  // matching (see collectShortFormMatches) from re-matching the tail of a
@@ -1238,6 +1740,8 @@ function scanDoc(cache, root, bundleDir, doc) {
1238
1740
  while ((m = re.exec(content)) !== null) {
1239
1741
  if (isWrappedPathContinuation(content, m.index))
1240
1742
  continue;
1743
+ if (isWithinAnySpan(m.index, headingSectionSpans))
1744
+ continue;
1241
1745
  const matchEnd = m.index + m[0].length;
1242
1746
  // anchor-malformed detection (see the atom-processing loop below for
1243
1747
  // where the finding is actually pushed): a `#` immediately follows the
@@ -1345,15 +1849,75 @@ function scanDoc(cache, root, bundleDir, doc) {
1345
1849
  if (atom.malformedAnchorRaw !== null) {
1346
1850
  pushDrift(findings, doc.relPath, citation, "anchor-malformed", `a "#" follows the citation's range but does not parse as a heading or string anchor (raw: "${atom.malformedAnchorRaw}")`, undefined, "notice");
1347
1851
  }
1348
- const problem = checkFullTarget(citedPath, startLine, endLine, resolution.path, anchor);
1852
+ // anchor-required (opt-in, warning): see the "Anchor strictness
1853
+ // (opt-in)" doc block above. Gated on the same posture every other
1854
+ // per-atom check already uses (only reached once the citation resolved
1855
+ // to a real, unambiguous, non-skipped target), plus a reserved citing
1856
+ // doc (e.g. log.md, folded into requireAnchorsForDoc above) and an
1857
+ // allowlisted citedPath being exempt.
1858
+ if (requireAnchorsForDoc &&
1859
+ !anchor &&
1860
+ !matchesAllowPattern(citedPath, requireAnchorsForDoc.allow)) {
1861
+ pushDrift(findings, doc.relPath, citation, "anchor-required", `full citation into an in-repo file carries no #anchor (--require-anchors is on)`, path.relative(root, resolution.path));
1862
+ }
1863
+ const problems = checkFullTarget(citedPath, startLine, endLine, resolution.path, anchor, requireAnchorsForDoc);
1864
+ for (const problem of problems) {
1865
+ if (problem.rule === "unreadable-target") {
1866
+ pushUnreadable(findings, doc.relPath, citation, path.relative(root, resolution.path), problem.code ?? "UNKNOWN");
1867
+ }
1868
+ else {
1869
+ pushDrift(findings, doc.relPath, citation, problem.rule, problem.message, path.relative(root, resolution.path));
1870
+ }
1871
+ }
1872
+ governing = { citedPath, resolvedPath: resolution.path };
1873
+ lastStartLine = startLine;
1874
+ }
1875
+ // Heading-section citations -- see the "Heading-section citations" doc
1876
+ // block above. Independent of `governing`/`lastStartLine`/`fullAtoms`:
1877
+ // this form carries its own path on every citation (never a continuation
1878
+ // or short form), so there is nothing to chain off. Iterates over
1879
+ // `headingSectionMatches`, collected up front (see above), rather than
1880
+ // re-scanning `content` with the regex a second time.
1881
+ for (const hs of headingSectionMatches) {
1882
+ const citedPath = hs.citedPath;
1883
+ const headingAnchor = hs.headingAnchor;
1884
+ const contentAnchor = hs.contentAnchor;
1885
+ const citation = `${citedPath}:${formatAnchorForLabel(headingAnchor)}${contentAnchor ? formatAnchorForLabel(contentAnchor) : ""}`;
1886
+ if (hasParentSegment(citedPath)) {
1887
+ pushDrift(findings, doc.relPath, citation, "path-traversal-rejected", `citedPath contains a ".." segment and was rejected without resolving: ${citedPath}`);
1888
+ continue;
1889
+ }
1890
+ const resolution = resolveCitation(cache, root, docAbsPath, content, sources, citedPath, hs.index);
1891
+ if (!resolution) {
1892
+ pushDrift(findings, doc.relPath, citation, "missing-file", `could not resolve ${citedPath}: tried doc sources, ancestor climb (bare filenames only), repo-root, doc-relative, nearest prior qualified mention, repo-wide search; no candidate file exists`);
1893
+ continue;
1894
+ }
1895
+ if ("skip" in resolution)
1896
+ continue;
1897
+ if ("ambiguous" in resolution) {
1898
+ pushAmbiguous(findings, doc.relPath, citation, resolution.candidates);
1899
+ continue;
1900
+ }
1901
+ const problem = checkHeadingSectionTarget(headingAnchor, contentAnchor, resolution.path);
1349
1902
  if (problem?.rule === "unreadable-target") {
1350
1903
  pushUnreadable(findings, doc.relPath, citation, path.relative(root, resolution.path), problem.code ?? "UNKNOWN");
1351
1904
  }
1352
1905
  else if (problem) {
1353
1906
  pushDrift(findings, doc.relPath, citation, problem.rule, problem.message, path.relative(root, resolution.path));
1354
1907
  }
1355
- governing = { citedPath, resolvedPath: resolution.path };
1356
- lastStartLine = startLine;
1908
+ }
1909
+ // heading-section-malformed (notice): a backtick + path + `:#` opener
1910
+ // that did not parse as a well-formed heading-section citation above --
1911
+ // mirrors `anchor-malformed`'s posture for the line-range anchor form
1912
+ // (see `extractMalformedAnchorRaw`'s doc comment): a typo should not
1913
+ // silently vanish from the very check it was written to exercise.
1914
+ for (const hm of headingSectionMalformedMatches) {
1915
+ // `hm.raw` includes the delimiting backticks (the regex match itself);
1916
+ // the citation label, like every other citation label in this file,
1917
+ // does not repeat them -- pushDrift's message template already wraps
1918
+ // the label in its own pair.
1919
+ const inner = hm.raw.slice(1, -1);
1920
+ pushDrift(findings, doc.relPath, inner, "heading-section-malformed", `a backtick-delimited "path:#" heading-section citation opener does not parse as a well-formed citation (raw: "${inner}")`, undefined, "notice");
1357
1921
  }
1358
1922
  // Short-form (paragraph-bound) citations -- see that doc block above.
1359
1923
  // Deliberately independent of `governing`/`lastStartLine`: short-form
@@ -1423,7 +1987,7 @@ function scanDoc(cache, root, bundleDir, doc) {
1423
1987
  }
1424
1988
  export const citationsResolveRule = {
1425
1989
  id: RULE_ID,
1426
- description: "`path:N`/`path:N-M` citations (and their `:N`, -`M`/–`M`, (`N`) continuations) must resolve to a real target file and land on real, non-blank content. Mechanical only: does not verify the cited line is semantically correct.",
1990
+ description: "`path:N`/`path:N-M` citations (and their `:N`, -`M`/–`M`, (`N`) continuations), and backtick-delimited `` `path:#heading` `` heading-section citations (`.md` targets only), must resolve to a real target file and land on real, non-blank content. Mechanical only: does not verify the cited line is semantically correct.",
1427
1991
  run(ctx) {
1428
1992
  if (!ctx.repoRoot) {
1429
1993
  // Never silently skip: mirrors sources-fresh's posture so a "clean"
@@ -1442,7 +2006,7 @@ export const citationsResolveRule = {
1442
2006
  // Fresh per invocation: see findByBasename's doc comment for why this
1443
2007
  // is not held at module scope.
1444
2008
  const cache = new Map();
1445
- return ctx.docs.flatMap((doc) => scanDoc(cache, root, ctx.bundleDir, doc));
2009
+ return ctx.docs.flatMap((doc) => scanDoc(cache, root, ctx.bundleDir, doc, ctx.requireAnchors));
1446
2010
  },
1447
2011
  };
1448
2012
  //# sourceMappingURL=citations-resolve.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"citations-resolve.js","sourceRoot":"","sources":["../../src/rules/citations-resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC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AC;YACJ,CAAC;iBAAM,IAAI,OAAO,EAAE,CAAC;gBACnB,SAAS,CACP,QAAQ,EACR,GAAG,CAAC,OAAO,EACX,QAAQ,EACR,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,OAAO,EACf,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,EACpC,OAAO,CAAC,QAAQ,CACjB,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAS;IACxC,EAAE,EAAE,OAAO;IACX,WAAW,EACT,+TAA+T;IACjU,GAAG,CAAC,GAAG;QACL,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YAClB,oEAAoE;YACpE,+DAA+D;YAC/D,oCAAoC;YACpC,OAAO;gBACL;oBACE,MAAM,EAAE,OAAO;oBACf,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,EAAE;oBACR,OAAO,EAAE,yDAAyD;iBACnE;aACF,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC1B,sEAAsE;QACtE,+BAA+B;QAC/B,MAAM,KAAK,GAAkB,IAAI,GAAG,EAAE,CAAC;QACvC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAC9B,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,cAAc,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF,CAAC"}
package/dist/types.d.ts CHANGED
@@ -29,12 +29,29 @@ export interface BundleDoc {
29
29
  * real git process.
30
30
  */
31
31
  export type RunGit = (args: string[], cwd: string) => string | null;
32
+ /**
33
+ * Opt-in options for `citations-resolve`'s stricter anchor checks (see
34
+ * `--require-anchors` in `src/cli.ts` and the "Anchor strictness (opt-in)"
35
+ * doc block in `src/rules/citations-resolve.ts`). Absent entirely when the
36
+ * opt-in was not requested, so a rule can gate its stricter behavior on a
37
+ * single `ctx.requireAnchors` truthiness check without a separate boolean.
38
+ */
39
+ export interface RequireAnchorsOptions {
40
+ /**
41
+ * Glob or exact-match patterns (matched against a citation's raw
42
+ * `citedPath` text, e.g. `"README.md"`), exempting a matching in-repo
43
+ * full citation from the `anchor-required` check.
44
+ */
45
+ allow: string[];
46
+ }
32
47
  export interface BundleContext {
33
48
  bundleDir: string;
34
49
  repoRoot?: string;
35
50
  docs: BundleDoc[];
36
51
  /** Defaults to a real `git` child-process call (see src/git.ts) when a rule needs it and none was injected. */
37
52
  runGit?: RunGit;
53
+ /** See `RequireAnchorsOptions`. Undefined when `--require-anchors` was not passed. */
54
+ requireAnchors?: RequireAnchorsOptions;
38
55
  }
39
56
  export interface Rule {
40
57
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okf-kit",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "CLI that validates OKF v0.1 knowledge bundles for structural correctness",
5
5
  "type": "module",
6
6
  "bin": {