Node API
Main exports:
scanProject(options): run a scan and return aScanReportformatReport(report, options): generate terminal report textbuildAgentPrompt(report): generate an agent repair promptinstallLynxDoctor(options): write workflow, script, and agent notesdefineConfig(config): add type hints to config filesRULES: inspect built-in rules, categories, subcategories, docs URLs, and skill source metadata
For an existing component library build, pass package: true to scanProject. This option cannot be combined with diff or staged. CSS configuration is available through CssTargets, and ScanReport.cssCoverage records coverage.
Source parsing failures are returned in ScanReport.parseErrors as ParseError entries with filePath, line, column, and message. Other files continue to be checked, and failed files are excluded from scannedFiles and applicable coverage. Any parse failure sets ok to false, including with blocking: "none"; rule filters do not hide parse failures. Configuration and unexpected internal errors still reject the scan.
diagnostics, summary, and the numeric score describe rule findings only. Check ok and parseErrors before interpreting that score. formatScore returns N/A for incomplete scans, and buildAgentPrompt includes the parsing failures so they can be resolved and verified.
