/** * 0.19.0-α.11 (#84) — stale-stub detector. * * Empirical finding from rewo reuse-scan 2026-05-07: 6 @slowcook-stub * files survived from incomplete story-016/018 brews. They're not * refactor candidates (reuse-scan misclassified them at 100% similar * because they're literally the same template body); they're * INCOMPLETE WORK markers that should escalate to PM after a grace * period. * * This module: walk src/, find @slowcook-stub markers, age each via * `git log --diff-filter=A` (first-add date), report stale ones * + (optionally) escalate to PM via gh comment on the source issue. * * Pure helpers below; cli wiring in recon's --stub-scan flag. */ export interface StubFile { /** Repo-relative path. */ path: string; /** Story id extracted from the stub marker (e.g., "016", "018"). */ storyId: string | null; /** ISO timestamp of the file's first-add commit. Null if git log * couldn't resolve (file isn't tracked, repo isn't a git repo, * etc.). */ firstAddedAt: string | null; /** Age in days, computed against `now`. Null when firstAddedAt * is null. */ ageDays: number | null; /** Classification: fresh < gracePeriod, stale ≥ gracePeriod. */ classification: "fresh" | "stale" | "unknown"; } /** * Detect a `@slowcook-stub` marker in file content + extract the * story id when one is named alongside it. Pure: no IO. * * Patterns recognized: * `// @slowcook-stub story-016` — explicit story id * `// @slowcook-stub` — bare; storyId = null * `/* @slowcook-stub story-018 *\/` — block comment form */ export declare function detectStubMarker(content: string): { isStub: boolean; storyId: string | null; }; /** * Compute days between two ISO timestamps. Pure: no clock IO. Returns * a non-negative number rounded to 1 decimal. */ export declare function daysBetween(earlierIso: string, laterIso: string): number; /** * Classify a stub by age against a grace period. Pure. * ageDays === null → "unknown" * ageDays < graceDays → "fresh" * ageDays >= graceDays → "stale" */ export declare function classifyStubAge(ageDays: number | null, graceDays: number): "fresh" | "stale" | "unknown"; /** * Synthesize a PM-actionable comment body for an overdue stub. * Pure: no IO. Caller posts via gh. * * 0.19.0-α.12 — appends slowcook:cost HTML marker so the comment is * grep-able by downstream cost / activity aggregation tools. */ export declare function buildStaleStubComment(stub: StubFile, graceDays: number, cliVersion?: string): string; //# sourceMappingURL=stale-stubs.d.ts.map