import type { ProductGraph } from '../graph/graph-types.js'; import type { IncrementalSpec } from '../incremental/types.js'; import type { AgentDriver } from '../agent/types.js'; import type { GovernanceRule } from '../governance/types.js'; import type { ImplementTask, ImplementPrompt, ImplementPhaseResult, SeamRange, CodeBlock } from './types.js'; /** * Build rich implementation tasks from the incremental spec + graph. * Each task includes node metadata, field definitions, and related edges. */ export declare function buildImplementTasks(graph: ProductGraph, spec: IncrementalSpec): ImplementTask[]; /** * Generate an implementation prompt for a single task. * The prompt includes full context: constitution, governance, graph slice, * field definitions, and related edges. */ export declare function buildImplementPrompt(task: ImplementTask, graph: ProductGraph, constitution: string | null, governance: readonly GovernanceRule[]): ImplementPrompt; export interface ExecuteOptions { readonly root?: string; readonly dryRun?: boolean; } /** * Execute implementation for all tasks using the provided agent driver. */ export declare function executeImplementation(tasks: readonly ImplementTask[], prompts: readonly ImplementPrompt[], driver: AgentDriver, constitution: string | null, governance: string | null, options?: ExecuteOptions): Promise; /** * Extract seam-protected ranges from file content. */ export declare function extractSeams(content: string): SeamRange[]; /** * Reapply seam-protected content into regenerated output. * Matches seams by ID and replaces the content between markers. */ export declare function applySeams(newContent: string, seams: readonly SeamRange[]): string; /** * Extract fenced code blocks from an AI response string. * Supports `// filename: path/to/file.ts` hints on the first line of a block. * Falls back to deriving filename from task context when no hint is present. */ export declare function extractCodeBlocks(response: string): CodeBlock[]; /** * Write extracted code blocks to disk under the specified root directory. * Uses filename hints from responses or falls back to task-derived paths. * Returns the list of written file paths. */ export declare function writeImplementationOutput(blocks: readonly CodeBlock[], root: string, task: ImplementTask): string[]; //# sourceMappingURL=implement.d.ts.map