import type { RepoEntry } from '../core/types.js'; export interface RequirementOverride { title?: string | undefined; notes?: string | undefined; status?: string | undefined; risk?: boolean | undefined; } export type RequirementCategory = 'functional' | 'config-data'; /** Product-functional requirements come from CODE; statements extracted from * lockfiles, manifests, data fixtures, and docs are honest observations about * those assets but are NOT product behavior — they class as config-data so the * default view can focus on the product. */ export declare function categoryOf(file: string): RequirementCategory; export interface RequirementSummary { key: string; domain: string; reqId: string; title: string; category: RequirementCategory; /** First business-rule statement — the requirement's actual content (empty when none). */ statement: string; status: string; risk: boolean; riskSource: 'operator' | 'data' | null; edited: boolean; } export interface RequirementDetail extends RequirementSummary { description: string; notes: string; sourceTitle: string; ruleCount: number; componentCount: number; validationCount: number; errorPathCount: number; businessRules: unknown[]; legacyComponents: unknown[]; } export interface RequirementsQuery { q?: string | undefined; risk?: 'risk' | 'no-risk' | undefined; domain?: string | undefined; category?: RequirementCategory | undefined; offset: number; limit: number; } export interface RequirementsPage { total: number; corpus: number; offset: number; limit: number; items: RequirementSummary[]; /** * Which source served this corpus. Always `'artifact'` since 0.7.35 (crew#548 — the live-store * read through a second SQLite library is gone; module header); the `'store'` arm stays in the * wire type (`wicked-crew-api-types`) for readers of older daemons. (FINDING-065) */ source: 'store' | 'artifact'; /** * Override keys that matched no requirement in this corpus — operator edits stranded by an * estate id-scheme migration (method/field SymbolIds re-mint on a full re-extract) or by an * artifact regeneration that renamed their domain/reqId. Counted so the edits' existence is * never silent; deliberately NOT re-keyed (module header says why). */ orphanedOverrides: number; } /** Tokenized AND-match: every whitespace-separated term must appear in the haystack. */ export declare function listRequirements(repo: RepoEntry, query: RequirementsQuery): Promise; export declare function getRequirement(repo: RepoEntry, key: string): Promise; /** Merge a patch into the overrides sidecar (atomic write) and return the fresh detail. */ export declare function patchRequirement(repo: RepoEntry, key: string, patch: RequirementOverride): Promise; //# sourceMappingURL=requirements.d.ts.map