/** * v2.15.0 follow-up — G3: prd 4 必填块 checker. * * Validates that a PRD artifact body contains the 4 mandatory sections * required by the 12 Gaps positioning memory: * * 1. 业务场景(目标用户 / 业务流程 / 性能 / 现有系统 / 业务禁区) * 2. 边界 case 清单 * 3. UI 装配意图(页面模式 / 关键交互 / 信息密度) * 4. 上游基线(仅 fork 场景必填) * * Returns a structured report; the CLI surfaces it as a lint * complement to `peaks request lint` (which checks placeholders). * `peaks prd check-blocks` ensures the design quality is locked at * the prd stage (the principle: 质量杠杆前置到 prd). */ export interface PrdBlockFinding { /** Block identifier (1-4). */ readonly block: 1 | 2 | 3 | 4; /** Block name (Chinese). */ readonly name: string; /** Whether the block is required (block 4 only required for fork projects). */ readonly required: boolean; /** Whether the block was found in the document. */ readonly present: boolean; /** The content under the heading, or null when not found. */ readonly content: string | null; /** Issues detected (empty array when the block is OK). */ readonly issues: readonly string[]; } export interface PrdBlocksReport { /** Project root. */ readonly projectRoot: string; /** Path to the artifact. */ readonly artifactPath: string; /** Whether this is a fork project (controls block 4 required flag). */ readonly isFork: boolean; /** Findings for each of the 4 blocks. */ readonly findings: readonly PrdBlockFinding[]; /** Overall pass/fail: all required blocks present + no issues. */ readonly ok: boolean; } export declare function findPrdArtifact(projectRoot: string, requestId: string): string | null; export declare function readPrdArtifact(artifactPath: string): string; /** * Detect whether the project is a fork by looking for `.peaks/fork-state.json` * (the G11 CLI's state file) or `.peaks/release-state.json` history entries * that reference an upstream. Lightweight heuristic. */ export declare function detectForkProject(projectRoot: string): boolean; export declare function checkPrdBlocks(projectRoot: string, requestId: string): PrdBlocksReport;