/** * Workstream Inventory Builder — pure projection from pre-collected * filesystem data to typed WorkstreamInventory. No I/O. No async. * * The caller is responsible for collecting BuilderInputs from the filesystem * (or from test fixtures). This module performs only the stateless transformation. */ export interface WorkstreamPhaseInventory { directory: string; status: 'complete' | 'in_progress' | 'pending'; plan_count: number; summary_count: number; } export interface WorkstreamInventory { name: string; path: string; active: boolean; files: { roadmap: boolean; state: boolean; requirements: boolean; }; status: string; current_phase: string | null; last_activity: string | null; phases: WorkstreamPhaseInventory[]; phase_count: number; completed_phases: number; roadmap_phase_count: number; total_plans: number; completed_plans: number; progress_percent: number; } export interface WorkstreamInventoryList { mode: 'flat' | 'workstream'; active: string | null; workstreams: WorkstreamInventory[]; count: number; message?: string; } export interface BuilderInputs { /** The workstream name (directory basename). */ name: string; /** Absolute path to the project root. */ projectDir: string; /** Absolute path to the workstream directory. */ workstreamDir: string; /** List of phase directory names (unsorted; builder will sort them). */ phaseDirNames: string[]; /** The currently active workstream name, or null if none. */ activeWorkstreamName: string | null; /** * Pre-collected plan/summary counts per phase directory. * The `directory` field must match entries in `phaseDirNames`. */ phaseFilesCounts: Array<{ directory: string; planCount: number; summaryCount: number; }>; /** Phase count from the ROADMAP.md (already resolved, fallback applied). */ roadmapPhaseCount: number; /** Projection from the workstream's STATE.md (already read). */ stateProjection: { status: string; current_phase: string | null; last_activity: string | null; }; /** Whether each canonical file exists (already checked). */ filesExist: { roadmap: boolean; state: boolean; requirements: boolean; }; } /** * Pure classifier: returns true if the given status string indicates a * completed or archived workstream (case-insensitive, boundary-aware match). */ export declare function isCompletedInventory(status: string): boolean; /** * Build a WorkstreamInventory from pre-collected BuilderInputs. * * This is a pure function — it does not read the filesystem and does not * produce side-effects. All I/O must be done by the caller before invoking. */ export declare function buildWorkstreamInventory(inputs: BuilderInputs): WorkstreamInventory; //# sourceMappingURL=builder.d.ts.map