/** * 解析器模块 — 工件内容解析 * * 职责: * 1. 解析 tasks.md 提取任务列表(支持 YAML frontmatter + Markdown checkbox) * 2. 解析 spec.md 提取 Delta 需求 * 3. 解析 proposal.md 提取元数据 * 4. 解析 design.md 提取架构决策 */ export interface ParsedTask { id: string; title: string; description: string; files: string[]; dependsOn: string[]; verification: string; estimatedEffort: 'S' | 'M' | 'L'; completed: boolean; } /** * PlanTask 适配类型 — 兼容 SDD 控制器消费端 */ export interface PlanTaskCompat { number: number; title: string; description: string; files: string[]; } /** * 从 tasks.md 内容解析任务列表(统一入口) * * 解析策略: * 1. 优先检测 YAML frontmatter(--- 分隔的结构化数据块) * 2. 回退到 Markdown checkbox 逐行解析 * * YAML frontmatter 格式示例: * ```yaml * --- * tasks: * - number: 1 * title: 创建用户模型 * files: * - src/models/user.ts * description: 实现用户数据模型 * verification: 单元测试通过 * dependsOn: [] * estimatedEffort: S * --- * ``` */ export declare function parseTasksFromContent(content: string): ParsedTask[]; /** * 将 ParsedTask[] 转换为 SDD 控制器所需的 PlanTask 格式 */ export declare function toPlanTasks(tasks: ParsedTask[]): PlanTaskCompat[]; /** * 解析 tasks.md 文件,提取结构化任务列表 * @deprecated 使用 parseTasksFromContent() 替代,支持 YAML frontmatter */ export declare function parseTasksFile(content: string): ParsedTask[]; export interface DeltaRequirement { type: 'ADDED' | 'MODIFIED' | 'REMOVED' | 'RENAMED'; id: string; title: string; description: string; acceptanceCriteria: AcceptanceCriterion[]; } export interface AcceptanceCriterion { given: string; when: string; then: string; } /** * 解析 spec.md 文件,提取 Delta 需求 */ export declare function parseSpecFile(content: string): DeltaRequirement[]; export interface ParsedProposal { title: string; motivation: string; goals: string[]; successCriteria: string[]; scope: { in: string[]; out: string[]; }; risks: { description: string; mitigation: string; }[]; } /** * 解析 proposal.md 文件 */ export declare function parseProposal(content: string): ParsedProposal; //# sourceMappingURL=index.d.ts.map