/** * Validate Engine Operations โ€” business logic layer. * * Contains all gate-verification and protocol-validation domain logic migrated * from `packages/cleo/src/dispatch/engines/validate-engine.ts` (ENG-MIG-7 / T1574). * * Each exported function returns `EngineResult` and is importable from * `@cleocode/core/internal` so the CLI dispatch layer can call them without * any intermediate engine file. * * @task T1574 โ€” ENG-MIG-7 * @epic T1566 */ import type { EvidenceAtom, TaskVerification, VerificationGate } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; /** Parameters shared across all protocol validation operations. */ export interface ProtocolValidationParams { mode: 'task' | 'manifest'; taskId?: string; manifestFile?: string; strict?: boolean; votingMatrixFile?: string; epicId?: string; siblingCount?: number; descriptionClarity?: boolean; maxSiblings?: number; maxDepth?: number; specFile?: string; hasTaskTags?: boolean; hasContributionTags?: boolean; hasCodeChanges?: boolean; version?: string; hasChangelog?: boolean; artifactType?: string; buildPassed?: boolean; hasAttestation?: boolean; hasSbom?: boolean; adrContent?: string; status?: 'proposed' | 'accepted' | 'superseded' | 'deprecated'; hitlReviewed?: boolean; downstreamFlagged?: boolean; persistedInDb?: boolean; specMatchConfirmed?: boolean; testSuitePassed?: boolean; protocolComplianceChecked?: boolean; framework?: string; testsRun?: number; testsPassed?: number; testsFailed?: number; coveragePercent?: number; coverageThreshold?: number; ivtLoopConverged?: boolean; ivtLoopIterations?: number; } export interface GateVerifyParams { taskId: string; gate?: string; value?: boolean; agent?: string; all?: boolean; reset?: boolean; /** * Raw evidence string from CLI `--evidence` flag (T832 / ADR-051). * Required for all write operations except `reset` and `value=false`. */ evidence?: string; /** Session ID for audit trail (T832 / ADR-051 ยง6.1). */ sessionId?: string; /** * Acknowledge that the same evidence atom is being applied to >3 distinct * tasks in this session (T1502 / P0-6). Without this flag, such reuse * triggers a warning (or a hard reject in strict mode). */ sharedEvidence?: boolean; } export interface GateVerifyResult { taskId: string; title?: string; status?: string; type?: string; verification: TaskVerification; verificationStatus: 'passed' | 'pending'; passed: boolean; round: number; requiredGates: VerificationGate[]; missingGates: VerificationGate[]; action?: 'view' | 'set_gate' | 'set_all' | 'reset'; gateSet?: string; gatesSet?: VerificationGate[]; /** Evidence atoms validated and persisted for this write (T832). */ evidenceStored?: EvidenceAtom[]; /** True when CLEO_OWNER_OVERRIDE bypassed evidence validation (T832). */ override?: boolean; /** * Actionable next-step hint emitted when all required gates become green * after a write (policy-b: verify never auto-completes, explicit complete * is always required). Absent on view mode and when gates are still missing. * Fixes GH #94 / T919. */ hint?: string; } /** * check.gate.verify โ€” View or modify verification gates for a task. * * As of v2026.4.78 (T832 / ADR-051), every gate write MUST be accompanied * by structured evidence validated against git, the filesystem, and the * toolchain. `reset` mode requires no evidence. `value=false` (gate fail) * requires no evidence since failures do not need proof. * * @task T5327 * @task T832 * @adr ADR-051 */ export declare function validateGateVerify(projectRoot: string, params: GateVerifyParams): Promise>; /** * check.protocol.consensus - Validate consensus protocol compliance * @task T5327 */ export declare function validateProtocolConsensus(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.contribution - Validate contribution protocol compliance * @task T5327 */ export declare function validateProtocolContribution(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.decomposition - Validate decomposition protocol compliance * @task T5327 */ export declare function validateProtocolDecomposition(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.implementation - Validate implementation protocol compliance * @task T5327 */ export declare function validateProtocolImplementation(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.specification - Validate specification protocol compliance * @task T5327 */ export declare function validateProtocolSpecification(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.research - Validate research protocol compliance * @task T260 */ export declare function validateProtocolResearch(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.architecture-decision - Validate ADR protocol compliance * @task T260 */ export declare function validateProtocolArchitectureDecision(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.validation - Validate validation-stage protocol compliance * @task T260 */ export declare function validateProtocolValidation(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.testing - Validate testing-stage protocol compliance (IVT loop) * @task T260 */ export declare function validateProtocolTesting(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.release - Validate release protocol compliance * @task T260 */ export declare function validateProtocolRelease(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.artifact-publish - Validate artifact-publish protocol compliance * @task T260 */ export declare function validateProtocolArtifactPublish(_projectRoot: string, params: ProtocolValidationParams): Promise; /** * check.protocol.provenance - Validate provenance protocol compliance * @task T260 */ export declare function validateProtocolProvenance(_projectRoot: string, params: ProtocolValidationParams): Promise; //# sourceMappingURL=engine-ops.d.ts.map