/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ /** * review-task-source.ts, review findings as a SECOND task source feeding the * ONE workstream engine (the fix-phase rework; never a sibling * scheduler). * * The reviewer's typed record, findings with file citations, the acceptance * checklist derived from the ORIGINAL task, and per-constraint satisfaction, * parses into typed tasks. A planner pass coalesces them by file-cluster/ * subsystem and draws the INITIAL dependency graph: shared-file edges * (same-file tasks serialize, severity-first) and semantic-prerequisite edges * (verification tasks wait for the fixes that touch their files; an * injectable judgment hook can add more). The output is a * CreateWorkstreamInput for the one engine: worktree isolation, the * reviewed-and-merged release policy, and the elastic pool, sequential vs * concurrent is emergent from the edges, never a mode. */ import type { ReviewerReport } from '../agents/completion-report.js'; import type { WrfcCommitScope } from '../agents/wrfc-config.js'; import type { CreateWorkstreamInput } from './engine.js'; import type { WorkItemSpec } from './types.js'; /** Where a parsed task came from in the review record. */ export type ReviewTaskSource = 'finding' | 'checklist' | 'constraint'; /** One typed task parsed from the review. */ export interface ReviewTask { readonly id: string; readonly title: string; /** The full task text a fixer agent receives (original ask + the slice + citations). */ readonly description: string; readonly source: ReviewTaskSource; readonly severity: 'critical' | 'major' | 'minor'; /** File citations from the review record (drive shared-file edges + clusters). */ readonly files: readonly string[]; } /** Parse the reviewer's findings + acceptance checklist + constraint findings into typed tasks. */ export declare function parseReviewIntoTasks(input: { readonly review: ReviewerReport; readonly originalTask: string; }): ReviewTask[]; /** File-cluster label: the first two path segments (subsystem granularity), or 'general'. */ export declare function clusterOf(files: readonly string[]): string; /** An optional judgment hook adding semantic-prerequisite edges beyond the heuristics. */ export type SemanticEdgePlanner = (tasks: readonly ReviewTask[]) => ReadonlyArray<{ readonly from: string; readonly to: string; }>; /** * The planner pass: coalesce by file-cluster and draw the initial dependency * graph. Edges (from DEPENDS ON to): * - shared-file: tasks citing the same file serialize, severity-first (a * critical fix lands before a minor one touches the same file); * - semantic-prerequisite: file-less verification tasks (checklist/constraint) * wait for every finding fix in the graph, the verification is over the * fixed deliverable, not the broken one; a custom `semanticEdges` hook may * add judgment edges on top. */ export declare function planTaskGraph(tasks: readonly ReviewTask[], semanticEdges?: SemanticEdgePlanner): { specs: WorkItemSpec[]; edgeCount: number; }; /** Per-phase capacity for elastic fix graphs: the fleet ceiling is the real limiter. */ export declare const ELASTIC_PHASE_CAPACITY = 64; /** Assemble the full CreateWorkstreamInput for one planned-fix cycle. */ export declare function planFixWorkstream(input: { readonly chainId: string; readonly originalTask: string; readonly review: ReviewerReport; readonly attempt: number; readonly commitScope: WrfcCommitScope; readonly semanticEdges?: SemanticEdgePlanner | undefined; }): { workstream: CreateWorkstreamInput; tasks: ReviewTask[]; } | null; //# sourceMappingURL=review-task-source.d.ts.map