import type { CodeChunk } from './types.js'; /** * A word/path-boundary regex for `token` — see `CONTINUATION_CHARS` for why * this is stricter than plain `\b`. Pass `flags: 'g'` for a reusable * global-match regex (`matchAll`). */ export declare function wordBoundaryRe(token: string, flags?: string): RegExp; /** * True iff `token` has an internal camelCase/PascalCase case transition or an * internal underscore — the shape no ordinary lowercase English word has * (`index`, `config`, `platform`), so it CANNOT be mistaken for one no matter * how many plain-prose occurrences turn up in the corpus. * * Deliberately NARROWER than "contains any uppercase letter or underscore * anywhere": a bare ALL-CAPS acronym (`API`, `ID`, `URL`, `DB`, `UI`, `HTTP`, * `TODO`) is exactly the kind of ordinary, high-frequency word this gate * exists to catch — "call the API", "check the ID" are completely mundane * prose, and a removed export literally named `ID` or `API` would otherwise * false-fire against nearly every doc in a real corpus. A single trailing or * leading underscore (`foo_`, `_prefix`) is excluded for the same reason: it * doesn't turn an otherwise-ordinary word into an identifier the way an * INTERNAL separator does. False-fires are this nudge's worst failure mode * (an incorrect "N docs reference X" is actively misleading, whereas a missed * reference is merely silent) — this is why the requirement is a genuine * shape signal, not merely "has a capital letter somewhere." Exposed for * testing. */ export declare function isUnambiguousIdentifierShape(token: string): boolean; /** * True iff EVERY word-boundary occurrence of `token` across `docChunks` reads * as code/path context — never as ordinary prose describing something * unrelated (e.g. a bare directory named `platform` inside "supports every * platform", or a bare symbol named `index`/`config` inside "the index is * built here"). A single prose hit disqualifies the token: when in doubt, * suppress. * * Skipped entirely for a token with `isUnambiguousIdentifierShape` — a * camelCase/PascalCase identifier or an underscored name reads as code no * matter what surrounds it in prose, so gating it the same way a bare * lowercase word needs to be gated would only produce false suppressions * (found dogfooding: this feature's own architecture-doc writeup mentions * `createVectorDB` inline, un-backticked, in running prose — a real doc * reference that must not be thrown away). The strict corpus-driven check * below remains exactly as it was for a bare lowercase word (the review * pass's bare-top-level-directory case, `platform`/`runner`, is unaffected * by construction: directory names here are always lowercase). * * Corpus-driven rather than a hardcoded stopword list: a fixed word list * needs constant upkeep across languages/domains and still misses whatever * wasn't anticipated. Checking what the corpus actually does with the word * is self-maintaining. Chunks that don't even contain `token` trivially pass * (nothing to disqualify), so callers may pass either the full doc corpus or * an already-narrowed "chunks containing this token" set — both produce the * same result. */ export declare function isDistinctiveToken(token: string, docChunks: CodeChunk[]): boolean; //# sourceMappingURL=doc-reference-matching.d.ts.map