/** * Tasks types: task lines parsed from tasks.md, the gate-criterion result * exposed via `aidlc gate --json` (task-breakdown AC-19), and the status * column summary (AC-21). * * Design: design.md (task-breakdown) §1 */ export type TaskState = 'open' | 'done' | 'deferred'; /** One AC reference in a task line's AC list. */ export interface TaskAcRef { /** n in AC-n (≥1, no leading zeros). */ id: number; /** * Qualified instance name, or null for a bare token. Bare refs resolve to * the owning instance (DD8) — never traceability's uniqueness rule. */ instance: string | null; } /** A single task line parsed from tasks.md (FR1). */ export interface TaskLine { /** n in T (≥1, no leading zeros). */ id: number; state: TaskState; /** Non-empty title prose (empty titles are near-misses). */ title: string; acRefs: TaskAcRef[]; /** Present iff state === 'deferred'. */ deferReason?: string; /** YYYY-MM-DD, shape-validated only; present iff state === 'deferred'. */ deferDate?: string; /** * `n` from a well-formed `(wave: n)` group: adjacent tasks sharing it may run * at the same time. Absent when the line has none or an unusable one * (task-fresh-context-reviewer/AC-1, AC-2). */ wave?: number; /** 1-based line number in tasks.md. */ line: number; } /** Parse result for one instance's tasks.md. */ export interface ParsedTasks { /** Ordered by id (NFR3); most-blocking state wins on duplicates (AC-3). */ tasks: TaskLine[]; /** * `[>]` lines without a well-formed deferral marker (AC-2) — these force * the criterion unsatisfied, unlike ordinary near-misses. Only lines whose * strict prefix (id included) parsed can land here; a `[>]` line with a * broken prefix is an ordinary near-miss (AC-5). */ malformedDeferrals: { id: number; line: number; }[]; /** Duplicates, near-misses, sequence gaps — ordered by line (NFR3). */ warnings: string[]; /** * Lines matching the loose task pattern (tasks + malformed + near-misses). * Drives the applicability tri-state (DD7): 0 → criterion silent for * opt-in instances; >0 with no tasks → warnings-only result. */ taskShapedLines: number; } /** Per-task row of the gate JSON `tasks` field (AC-19). */ export interface TaskEntry { id: number; state: TaskState; title: string; /** Rendered as written: `AC-3` or `other-instance/AC-3`. */ acRefs: string[]; deferReason?: string; /** Present only when the task has a valid wave (task-fresh-context-reviewer/AC-4). */ wave?: number; } /** Full tasks result attached to GateCheckResult (AC-19). */ export interface TasksResult { /** Posix-separated, project-root-relative tasks.md path. */ tasksPath: string; /** Sorted by id (NFR3). */ entries: TaskEntry[]; /** Ordered by line (NFR3). */ warnings: string[]; /** Open ([ ]) task ids — drive gate failure (AC-11). */ openTasks: number[]; /** Malformed-deferral task ids (AC-2) — also drive gate failure. */ malformed: number[]; /** Set when the AC-17 (file) / AC-28 (empty) backstop fails the gate. */ missing?: 'file' | 'empty'; } /** Task summary for the `aidlc status` column (AC-21). */ export interface TasksSummary { /** [x] count — deferred is NOT counted here. */ done: number; /** [>] count, rendered as ` ▸n` when > 0. */ deferred: number; /** All task lines, deferred included. */ total: number; } //# sourceMappingURL=types.d.ts.map