export type InspectorIssueStatus = 'open' | 'in_progress' | 'done' | 'blocked'; export type InspectorPriority = 'low' | 'medium' | 'high'; export interface InspectorIssue { id: string; title: string; project?: string; status: InspectorIssueStatus; priority: InspectorPriority; epic_id?: string; tags?: string[]; created_at?: string; updated_at?: string; _file?: string; } export type InspectorEpicStatus = 'open' | 'in_progress' | 'done' | 'blocked'; export interface InspectorEpic { id: string; title: string; project?: string; status: InspectorEpicStatus; owner?: string; tags?: string[]; created_at?: string; updated_at?: string; _file?: string; } export type InspectorADRScope = 'project' | 'global'; export type InspectorADRStatus = 'proposed' | 'accepted' | 'superseded' | 'deprecated' | 'rejected'; export interface InspectorADR { id: string; scope?: InspectorADRScope; project?: string; title: string; status: InspectorADRStatus; related_issues?: string[]; related_epics?: string[]; created_at?: string; updated_at?: string; _file?: string; } export type ValidationSeverity = 'error' | 'warn'; export interface ValidationError { severity: ValidationSeverity; type: 'issue' | 'epic' | 'adr'; id: string; file?: string; field?: string; message: string; } export interface OrphanReport { epicsWithNoIssues: Array<{ id: string; title: string; }>; issuesWithMissingEpic: Array<{ id: string; title: string; epic_id: string; }>; adrsWithMissingIssues: Array<{ id: string; title: string; missing: string[]; }>; adrsWithMissingEpics: Array<{ id: string; title: string; missing: string[]; }>; } export interface StaleReport { issues: Array<{ id: string; title: string; updated_at: string; }>; epics: Array<{ id: string; title: string; updated_at: string; }>; adrs: Array<{ id: string; title: string; updated_at: string; }>; } export interface DataIndex { issues: InspectorIssue[]; epics: InspectorEpic[]; adrs: InspectorADR[]; decibelRoot: string; projectName: string; } export interface ScanSummary { issues: { total: number; open: number; in_progress: number; done: number; blocked: number; }; epics: { total: number; open: number; in_progress: number; done: number; blocked: number; }; adrs: { total: number; proposed: number; accepted: number; superseded: number; deprecated: number; }; } export type ScanScope = 'runtime' | 'data' | 'all'; export type FlagCategory = 'orphans' | 'stale' | 'invalid'; export interface ScanDataInput { projectId?: string; scope: ScanScope; validate?: boolean; flag?: FlagCategory[]; days?: number; } export interface ScanDataOutput { scope: ScanScope; projectName: string; decibelRoot?: string; summary?: ScanSummary; validation?: ValidationError[]; orphans?: OrphanReport; stale?: StaleReport; error?: string; } /** * Find the .decibel root directory by walking up from the start path */ export declare function findDecibelRoot(start?: string): string | undefined; /** * Get the project name from the .decibel root's parent directory */ export declare function getProjectNameFromRoot(decibelRoot: string): string; /** * Get global data root (DECIBEL_MCP_ROOT or ~/.decibel) */ export declare function getGlobalRoot(): string; /** * Load all issues from the .decibel/sentinel/issues directory */ export declare function loadIssues(decibelRoot: string): Promise; /** * Load all epics from the .decibel/sentinel/epics directory */ export declare function loadEpics(decibelRoot: string): Promise; /** * Load all ADRs from the .decibel/architect/adrs directory */ export declare function loadADRs(decibelRoot: string): Promise; /** * Load all data into a DataIndex */ export declare function loadDataIndex(decibelRoot: string): Promise; /** * Validate all data and return validation errors */ export declare function validateSchema(issues: InspectorIssue[], epics: InspectorEpic[], adrs: InspectorADR[]): ValidationError[]; /** * Find orphaned records (broken references) */ export declare function findOrphans(issues: InspectorIssue[], epics: InspectorEpic[], adrs: InspectorADR[]): OrphanReport; /** * Find stale records (not updated in N days) */ export declare function findStale(issues: InspectorIssue[], epics: InspectorEpic[], adrs: InspectorADR[], days?: number): StaleReport; /** * Generate a summary of the data */ export declare function generateSummary(issues: InspectorIssue[], epics: InspectorEpic[], adrs: InspectorADR[]): ScanSummary; /** * Execute the data scan */ export declare function scanData(input: ScanDataInput): Promise; /** * Format the scan output as a human-readable string */ export declare function formatScanOutput(output: ScanDataOutput): string; //# sourceMappingURL=data-inspector.d.ts.map