/** * Stale Docs Checker — cross-references doc symbol mentions against * the WARP graph to detect documentation that may be outdated. * * Walks markdown for backtick-quoted identifiers and code block * contents. For each referenced symbol, queries the WARP graph to * determine whether the symbol changed after the doc was last modified. * * Also detects version number drift between package.json and CHANGELOG. */ import type { WarpContext } from "./context.js"; /** A symbol in a doc that is stale relative to the WARP graph. */ export interface StaleSymbolEntry { readonly symbol: string; readonly changeKind: "changed" | "removed"; readonly lastChangeSha: string; } /** Result of checking a single doc for staleness. */ export interface StaleDocReport { readonly docPath: string; /** Symbols referenced in the doc that changed after the doc was last modified. */ readonly staleSymbols: readonly StaleSymbolEntry[]; /** Symbols referenced in the doc that do not exist in the WARP graph. */ readonly unknownSymbols: readonly string[]; } /** Result of checking version drift between package.json and CHANGELOG. */ export interface VersionDriftReport { readonly drifted: boolean; readonly packageVersion: string; readonly changelogVersion: string | null; } /** * Extract symbol name references from markdown content. * * Sources: * 1. Backtick-quoted identifiers (single backtick, must be valid JS/TS identifier) * 2. Declaration identifiers inside fenced code blocks * * Returns a deduplicated array of symbol names. */ export declare function extractDocSymbolReferences(markdown: string): string[]; /** * Check a markdown document for stale symbol references. * * @param ctx - WARP context * @param docPath - relative path of the doc (for the report) * @param docCommitSha - SHA of the commit when the doc was last modified * @param docContent - raw markdown content of the doc */ export declare function checkStaleDocs(ctx: WarpContext, docPath: string, docCommitSha: string, docContent: string): Promise; /** * Check whether the latest version in a CHANGELOG matches * the version in package.json. */ export declare function checkVersionDrift(packageVersion: string, changelogContent: string): VersionDriftReport; //# sourceMappingURL=stale-docs.d.ts.map