/** * The spec corpus: `.aidlc/specs/.md`, one file per capability, * saying what the system does today (living-spec-corpus/AC-1). * * Read-only. Only the `### Requirement: ` blocks are parsed; a file's * title, introduction and any other heading are never interpreted, which is * what lets a fold leave them byte for byte (living-spec-corpus/AC-17). * * Requirements: living-spec-corpus/AC-1, living-spec-corpus/AC-2, * living-spec-corpus/AC-9, living-spec-corpus/AC-17 */ import type { CapabilitySpec } from './types.js'; export declare const SPECS_RELATIVE = ".aidlc/specs"; export declare const ARCHIVE_RELATIVE = ".aidlc/specs/archive"; export declare const REQUIREMENT_HEADING_RE: RegExp; export declare const PROVENANCE_RE: RegExp; export declare function isValidCapability(slug: string): boolean; /** Identity of a requirement name: case and spacing are not part of it. */ export declare function requirementKey(name: string): string; /** * Normalise a requirement body: trailing whitespace off each line, leading and * trailing blank lines dropped, blank-line runs collapsed to one. Re-wrapping * whitespace by hand does not change a revision; changing a word does. */ export declare function normaliseBody(body: string): string; export declare function revisionOf(body: string): string; export declare function provenanceLine(instance: string, date: string): string; export declare function capabilityRelative(slug: string): string; /** Parse one capability file's requirement blocks. */ export declare function parseCapability(text: string, capability: string, path: string): CapabilitySpec; /** * Read one capability file. `null` when the file does not exist. Throws on an * invalid slug — callers validate first, and no path is built from one that * fails (living-spec-corpus/AC-4). */ export declare function readCapability(projectRoot: string, slug: string): CapabilitySpec | null; /** * Every capability file, sorted by slug. `null` when the corpus directory does * not exist. A `.md` file whose name is not a valid slug is not a capability * and is skipped. */ export declare function listCapabilities(projectRoot: string): CapabilitySpec[] | null; //# sourceMappingURL=corpus.d.ts.map