import { type DocTypeId } from "./catalog.js"; /** The four document writer roles. */ export type DocWriter = "readme-writer" | "changelog-writer" | "api-docs-writer" | "other-docs-writer"; export interface DocSelection { writers: DocWriter[]; reasons: Record; } /** One concrete document to write: writer + catalog type + target + cap. */ export interface DocTask { writer: DocWriter; docType: DocTypeId; /** Target path relative to the project root (catalog default). */ targetPath: string; maxLines: number; /** Why this doc was selected (shown in the stage prompt). */ reason: string; } export interface DocWritePlan { tasks: DocTask[]; /** Tasks grouped for execution: ≤ MAX_BATCH writers per batch; * batch N+1 starts only after batch N completes. */ batches: DocTask[][]; } export declare const MAX_BATCH = 4; /** Deterministic decision table: which document writers a project needs. * No LLM call. readme-writer is always selected. */ export declare function selectDocumentWriters(cwd: string): DocSelection; /** Extends selectDocumentWriters into a concrete write plan: one DocTask per * selected document, with the catalog's default path, template id, and length * cap. Extra signal on top of the writer decision table: an existing * architect profile (.pi/architect/architect-profile.json) adds the * arc42-lite architecture overview. Selection is project-wise only — no * developer-level dimension, and files.json deliberately adds no doc types * (that was the doc-bloat source this factory exists to prevent). * Tasks are chunked into batches of MAX_BATCH (4); batch order is stable * (readme first, then changelog, api, others). Language-agnostic. */ export declare function buildDocWritePlan(cwd: string): DocWritePlan; export interface DocsStructureResult { /** Stub files written by this call. */ created: string[]; /** Existing non-stub docs left untouched. */ kept: string[]; manifestPath: string; } /** Creates the docs skeleton for the selected doc types: the target folders * (only for selected types) and one template stub per planned task. Existing * non-stub docs are NEVER overwritten. Also writes the manifest doctor * validates the skeleton against. */ export declare function generateDocsStructure(cwd: string): DocsStructureResult; /** Markdown block injected into the Document stage prompt. Lists every doc * task with its target path, template id, and length cap, then the explicit * execution batches (≤ MAX_BATCH tasks each). Batch N+1 starts only after * every task in batch N has a verified artifact on disk. */ export declare function buildDocSelectionBlock(cwd: string): string;