import type { WorkFile, WorkTask, WorkTaskDefinition } from '../types'; import type { ValidationIssue } from '../artifacts/schema'; export declare function validateWorkFile(value: unknown, path?: string): ValidationIssue[]; export declare function asWorkFile(value: unknown): WorkFile | null; export declare function computeMaterialDigest(briefDigest: string, definition: WorkTaskDefinition): string; export declare function computeEvidenceDigest(evidence: unknown): string; export declare function deriveWorkHandoff(work: Pick): WorkFile['handoff']; /** * Reciprocal promotion sidecar published under the target Forge scope. * Versioned exact keys; every digest binds bytes external to this record * (pre-promotion work.json as sourceDigest, target sprint.json, brief.md), * never this record itself. */ export declare function validatePromotionSidecar(value: unknown, path?: string): ValidationIssue[]; /** * Durable pending promotion intent under the source Work directory. * Lifecycle evidence only: readers derive blocked state from it but never * treat its presence as a completed promotion. */ export declare function validatePromotionJournal(value: unknown, path?: string): ValidationIssue[]; export interface WorkTaskAmendmentProposal { title: string; description: string; context: string; filesToTouch: string[]; acceptanceCriteria: string[]; dependsOn: string[]; } /** * True when the proposed definition differs materially from the stored task. * Title and description compare trimmed (the writer stores them trimmed); * a whitespace-only change is not material. Context, files, and criteria * compare exactly as written; dependencies compare as an unordered edge set * because prerequisite order carries no graph semantics. */ export declare function isMaterialTaskDefinitionChange(current: Pick, proposal: WorkTaskAmendmentProposal): boolean; /** * Clear the current approval bound to a task whose definition or brief changed. * Evidence and verdicts (pass or fail) reference the previous material via * definitionRevision and digests, so the schema requires them to be dropped. * Tasks awaiting review or verified return to pending; in-progress and blocked * tasks keep their status so local work can continue under the new contract. * Prior approvals remain auditable in activity history; this only clears the * live approval. Pending and disposed tasks are returned unchanged. */ export declare function demoteTaskForInvalidation(task: WorkTask): WorkTask; /** Transitive dependents of a task in BFS order (iterative, no recursion). */ export declare function transitiveDependentIds(tasks: ReadonlyArray<{ id: string; dependsOn: readonly string[]; }>, rootId: string): string[]; export declare function hasDependencyCycle(tasks: ReadonlyArray<{ id: string; dependsOn: readonly string[]; }>): boolean; //# sourceMappingURL=schema.d.ts.map