/** * Storyboard Coverage Lens * * Measures which source files are referenced by Principal View storyboard nodes. * Coverage is based on reference count with logarithmic scoring (more references = better documented). * * Uses direct API integration with @principal-ai/principal-view-core for discovery. */ import { BaseLens } from '../base/BaseLens.js'; import type { LensResult, ExecuteResult, LensRequirements } from '../../types/index.js'; /** * File reference information from storyboard nodes */ interface FileRefInfo { /** Number of times this file is referenced */ count: number; /** IDs of storyboards that reference this file */ storyboardIds: Set; /** IDs of nodes that reference this file */ nodeIds: Set; } /** * Parsed storyboard coverage data */ interface StoryboardCoverageData { /** Map of file paths to reference info */ fileRefCounts: Map; /** Total number of storyboards discovered */ totalStoryboards: number; /** Total number of nodes across all storyboards */ totalNodes: number; /** Number of nodes that have sources defined */ nodesWithSources: number; /** Any errors encountered during discovery */ errors: Array<{ path: string; error: string; }>; } /** * Requirements for the storyboard coverage lens */ export declare const STORYBOARD_COVERAGE_REQUIREMENTS: LensRequirements; /** * Lens for measuring storyboard documentation coverage */ export declare class StoryboardCoverageLens extends BaseLens { readonly name = "storyboard-coverage"; readonly description = "Architecture storyboard documentation coverage"; readonly languages: string[]; readonly supportedTools: string[]; readonly requirements: LensRequirements; private pathMapper?; /** * Execute storyboard discovery using principal-view-core API * * This lens uses direct API integration rather than shelling out to a CLI. * The ExecuteResult contains JSON-encoded discovery data. */ execute(): Promise; /** * Parse the discovery result from execute() */ parse(output: ExecuteResult): StoryboardCoverageData; /** * Format parsed data into standard LensResult */ format(parsed: StoryboardCoverageData): LensResult; /** * Get or create path mapper */ private getPathMapper; /** * Check if a file path is within the current package directory */ private isFileInPackage; /** * Dynamically import principal-view-core to handle optional dependency * * Uses dynamic import to avoid requiring the package at compile time. * This allows the lenses package to build without principal-view-core installed. */ private importPrincipalViewCore; } export {}; //# sourceMappingURL=StoryboardCoverageLens.d.ts.map