Technology Radar Utilities
Supporting APIs for the documentation build pipeline. These helpers are exported from @relational-fabric/canon/radar and are intended for scripts that convert and validate radar data stored under planning/radar.
Runtime helpers
convertYamlToCsv
function convertYamlToCsv(yamlContent: string): stringParses in-memory YAML content and returns a CSV string using the canonical quadrant and ring labels.
convertYamlFileToCsv
function convertYamlFileToCsv(yamlPath: string, csvPath: string): voidReads a YAML file, converts it with convertYamlToCsv, and writes the resulting CSV to the given path. Throws on I/O or parsing failures.
parseRadarYaml
function parseRadarYaml(yamlContent: string): RadarDataProduces a strongly typed RadarData object graph from YAML content. Used by the conversion and validation scripts.
readRadarYaml
function readRadarYaml(yamlPath: string): RadarDataConvenience wrapper that reads a file from disk and returns the parsed RadarData.
validateRadarData
function validateRadarData(data: unknown): ValidationResultPerforms structural validation of a RadarData payload. Returns a ValidationResult containing errors, warnings, and a computed isValid flag.
validateRadarFile
function validateRadarFile(filePath: string): Promise<ValidationResult>Loads a YAML file from disk, parses it, and validates the structure. Surfaces file-system or parsing failures as invalid_structure errors in the result.
Type surfaces
The following types are re-exported alongside the runtime helpers and live in src/types/radar.ts:
RadarEntryQuadrantRingRadarMetadataRadarDataRadarConfigCsvRowQuadrantKeyRingKey
Validation utilities also expose the diagnostic types declared in src/radar/validator.ts:
ValidationErrorValidationResult
Refer to the source files for field-level documentation and examples.