/** * Living spec corpus types: the standing capability files under `.aidlc/specs/`, * the `## Spec delta` section a requirements author writes against them, and * the fold plan that merges one into the other. * * Design: design.md (living-spec-corpus), "Interfaces" */ export type DeltaOp = 'ADDED' | 'MODIFIED' | 'REMOVED'; /** A problem with a line of input — the delta or a capability file. */ export interface SpecIssue { /** 1-based. */ line: number; message: string; /** Posix, project-relative; absent when the issue is in requirements.md. */ path?: string; } /** One `### Requirement: ` block in a capability file. */ export interface SpecRequirement { name: string; /** Identity: lower-cased, whitespace collapsed. */ key: string; /** First 8 hex of SHA-256 over the normalised body. */ revision: string; changedBy: string | null; changedOn: string | null; /** 0-based heading line. */ startLine: number; /** 0-based, exclusive; trailing blank lines are not part of the block. */ endLine: number; } /** One parsed `.aidlc/specs/.md`. */ export interface CapabilitySpec { capability: string; /** Posix, project-relative. */ path: string; requirements: SpecRequirement[]; /** Duplicate requirement names — a fold touching this file stops. */ errors: SpecIssue[]; } /** One `### : ` block of a delta. */ export interface DeltaBlock { op: DeltaOp; capability: string; name: string; key: string; base: string | null; /** New requirement text (ADDED, MODIFIED) or the reason (REMOVED). */ body: string; /** 1-based heading line in requirements.md. */ line: number; } export interface ParsedDelta { present: boolean; /** The section verbatim, heading included; '' when absent. */ section: string; blocks: DeltaBlock[]; errors: SpecIssue[]; warnings: SpecIssue[]; } export interface FoldConflict { op: DeltaOp; capability: string; requirement: string; reason: string; currentRevision: string | null; changedBy: string | null; /** 1-based delta heading line. */ line: number; } export interface FoldOperation { op: DeltaOp; capability: string; requirement: string; before: string | null; after: string | null; } export type FoldStatus = 'no-delta' | 'already-folded' | 'blocked' | 'ready'; export interface FoldPlan { instance: string; status: FoldStatus; operations: FoldOperation[]; errors: SpecIssue[]; conflicts: FoldConflict[]; warnings: SpecIssue[]; /** Absolute paths; the archive record is last. Empty unless `ready`. */ writes: { path: string; content: string; }[]; /** Posix, project-relative: the record written, or the one that already exists. */ archive: string | null; /** `no-delta` because the section holds only prose, not because it is absent. */ proseOnly?: true; } //# sourceMappingURL=types.d.ts.map