/** * business-rules.ts — 业务规则三层统一加载 * * 三层结构(按分析/执行阶段声明式加载): * Layer 1 全局(跨端共享): GLOBAL/BUSINESS_RULES.md + GLOBAL/BUSINESS_RULES/*-common.md * Layer 2 端级(该端特有): GLOBAL/BUSINESS_RULES/{端}.md + 兼容 platforms/{端}/BUSINESS_RULES.md * Layer 3 功能级(该功能特有): Iteration-{iter}/020-specs/{feature}/overview/BUSINESS_RULES.md * * 职责:只做「确定性加载」——按层/端/功能定位文件并读取,返回结构化列表; * 语义(规则的约束性判断、冲突检测)由宿主 AI 完成。 * * v8.3.184+ */ export type BusinessRuleLayer = 'global' | 'platform' | 'feature'; export interface BusinessRuleItem { layer: BusinessRuleLayer; /** 相对项目根的路径(展示 + 追溯用) */ path: string; content: string; } export interface LoadBusinessRulesOptions { /** 项目根目录,默认 process.cwd() */ cwd?: string; /** 迭代名(功能级需要,如 Iteration-001) */ iteration?: string; /** 端名(端级过滤,如 backend/admin/h5),缺省加载全部 */ platform?: string; /** 功能单元(功能级):功能名(如 用户认证)或相对路径(含 020-specs) */ feature?: string; /** 每文件最大注入字符数,默认 4000 */ maxPerFile?: number; } export declare function loadBusinessRules(options: LoadBusinessRulesOptions): Promise; /** 把三层规则格式化为 prompt 注入文本 */ export declare function formatBusinessRules(items: BusinessRuleItem[]): string; //# sourceMappingURL=business-rules.d.ts.map