import type { BoberConfig } from "../config/schema.js"; import type { SprintContract } from "../contracts/sprint-contract.js"; import type { EvaluationRunResult } from "../evaluators/registry.js"; import type { GeneratorResult } from "./generator-agent.js"; /** One existing doc the documenter updated because the sprint made it stale. */ export interface RelatedDocUpdate { path: string; reason: string; } /** * The structured result emitted by the bober-documenter subagent. */ export interface DocumentationResult { contractId: string; /** Path to the per-sprint record the documenter wrote. */ sprintDocPath: string; /** Existing docs the documenter updated. */ relatedDocsUpdated: RelatedDocUpdate[]; /** The docs-only commit the documenter made, if any. */ docsCommit?: string; /** Code/doc issues the documenter noticed but did NOT fix (it must not touch code). */ concerns: string[]; summary: string; } /** * Run the bober-documenter subagent to write per-sprint documentation. * * Runs AFTER the evaluator returns passed=true and the sprint is committed. * The documenter writes a focused record of what the sprint built to * `docs/sprints/.md`, finds & updates related existing docs that * the change made stale, and commits ONLY the doc files. It must NOT modify * application code or tests — the sprint already passed evaluation. * * Documentation is advisory: a documenter failure never downgrades the * already-passed sprint (see the caller in pipeline.ts). * * The documenter reuses the "generator" role's write-tool surface (bash, * read/write/edit files, glob, grep) — mirroring how runCodeReviewer reuses * the "evaluator" role rather than introducing a distinct AgentRole. * * @param contract The sprint contract that just passed. * @param evaluation The evaluation result (passed=true). * @param generatorResult The generator's result — the authoritative list of * what changed in this sprint. * @param projectRoot Absolute path to the project root. * @param config The resolved bober configuration. * @returns A DocumentationResult with the docs written and updated. */ export declare function runDocumenter(contract: SprintContract, evaluation: EvaluationRunResult, generatorResult: GeneratorResult | undefined, projectRoot: string, config: BoberConfig): Promise; /** * Parse the documenter's response into a DocumentationResult. * Mirrors the resilient JSON-parsing pattern from code-reviewer-agent.ts. * * Exported for direct unit testing. */ export declare function parseDocumentationResult(text: string, contractId: string, defaultSprintDocPath: string): DocumentationResult; //# sourceMappingURL=documenter-agent.d.ts.map