/** Stable exit code surfaced to the CLI when `--strict-standards` is set. */ export declare const EPEAKS_NO_STANDARDS: "EPEAKS_NO_STANDARDS"; /** Subdirectories of `/.claude/rules/` that must be populated. */ export type RdStandardsSubdir = 'common' | 'typescript'; export declare const RD_STANDARDS_REQUIRED_SUBDIRS: ReadonlyArray; /** The three gates the RD bootstrap inspects. */ export type RdStandardGateName = 'code-review' | 'security-review' | 'performance-review'; export type RdStandardGateStatus = 'ready' | 'skipped'; export type RdStandardGate = { readonly name: RdStandardGateName; readonly status: RdStandardGateStatus; readonly reason: string | null; }; export type DetectMissingProjectStandardsInput = { readonly projectRoot: string; }; export type DetectMissingProjectStandardsResult = { readonly missing: boolean; readonly path: string; readonly missingSubdirs: ReadonlyArray; readonly remediation: string; }; export type RenderRdStandardsDiagnosticInput = { readonly projectRoot: string; readonly detection: DetectMissingProjectStandardsResult; }; export type ResolveRdStartupStandardsCheckInput = { readonly projectRoot: string; readonly strict: boolean; }; export type ResolveRdStartupStandardsCheckResult = { readonly exitCode: 0 | 1; readonly errorCode: typeof EPEAKS_NO_STANDARDS | null; readonly diagnostic: string | null; readonly gates: ReadonlyArray; }; /** * Pure detection: scan `/.claude/rules/{common,typescript}/` * for at least one `.md` rule file per subdir. Empty subdirs and missing * subdirs both count as "missing". * * Defensive: never throws. Missing projectRoot, permission errors, or a * non-directory at the path all collapse to `{ missing: true }`. The caller * (CLI bootstrap) is expected to surface the remediation; this function * just reports the truth. */ export declare function detectMissingProjectStandards(input: DetectMissingProjectStandardsInput): DetectMissingProjectStandardsResult; /** * Render the human-readable diagnostic line that goes to stderr. * The line is single-line + copy-pasteable so the model can echo it * into a Bash command verbatim. */ export declare function renderRdStandardsDiagnostic(input: RenderRdStandardsDiagnosticInput): string; /** * Build the gate list for the JSON envelope returned by `peaks rd --json`. * Mirrors the PRD's AC2 contract: when missing, each gate is * `{ name, status: 'skipped', reason: 'no project-local standards' }`. */ export declare function buildRdStandardsGateList(input: { readonly missing: boolean; }): ReadonlyArray; /** * Single entry point for the RD / QA / Code bootstrap. Returns the * exit code + error code + diagnostic + gate list. The CLI wrapper is * responsible for `process.stderr.write(diagnostic ?? '')` and * `process.exit(result.exitCode)`. * * - `strict=true` + missing → exitCode 1, errorCode EPEAKS_NO_STANDARDS, * diagnostic + skipped gates emitted. * - `strict=false` + missing → exitCode 0, errorCode null, * diagnostic + skipped gates emitted * (warn-and-continue; PRD NG1). * - strict any + present → exitCode 0, errorCode null, * diagnostic null, gates ready. */ export declare function resolveRdStartupStandardsCheck(input: ResolveRdStartupStandardsCheckInput): ResolveRdStartupStandardsCheckResult;