/** * openlore API: spec requirements extractor * * Reads `.openlore/analysis/mapping.json` and extracts the exact requirement * blocks from the spec files referenced by each mapping entry. * * The function returns a mapping from the mapping.requirement key to a * structured object: * * { * title: string, // requirement heading as found in the file * body: string, // markdown body of the requirement (everything after the heading) * specFile?: string, // spec file path exactly as referenced in mapping.json * domain?: string, // domain from mapping * service?: string // service from mapping * } * * Behavior: * - For each mapping entry we read the referenced spec file (exact path). * - We attempt a deterministic (case-insensitive) equality match of the * requirement heading (the text right after "### Requirement:"). * - If found, we return the extracted body. If not found or the file cannot * be read, an empty body string is returned (the caller can interpret this * as "not available"). * * This API intentionally avoids fuzzy heuristics — it uses the exact specFile * path coming from mapping.json and only performs case-insensitive title * equality checks. */ import type { BaseOptions } from './types.js'; export type SpecRequirement = { title: string; body: string; specFile?: string; domain?: string; service?: string; }; /** * Read spec requirements referenced in mapping.json. * * @param options.rootPath project root (default: process.cwd()) * @returns an object keyed by mapping.requirement with SpecRequirement values */ export declare function openloreGetSpecRequirements(options?: BaseOptions): Promise<{ generatedAt?: string; requirements: Record; }>; export default openloreGetSpecRequirements; //# sourceMappingURL=specs.d.ts.map