//! The **Foreman** pattern — decompose a coding prompt, farm independent
//! subtasks to external coding CLIs in isolated git worktrees, and verify the
//! reassembly before integrating.
//!
//! Design and rationale:
//! `docs/proposals/verified-parallel-coding-orchestrator.md`. Build order:
//! `docs/plans/2026-06-12-001-feat-verified-parallel-coding-orchestrator-plan.md`.
//!
//! Path-B posture: the [`gate`] is the soundness boundary. Footprint analysis
//! (future B4) is only an advisory scheduling hint and never gates correctness.
//!
//! Implemented so far:
//! - **B1** — [`gate`]: the merge-verify gate (soundness boundary).
//! - **B2** — [`harness`]: the farm-out harness (+ union integration).
//! - **B4/B5** — footprint-aware scheduling in [`harness`] + the [`planner`].

pub mod gate;
pub mod harness;
pub mod orchestrator;
pub mod planner;
pub mod report;

pub use gate::{
    containment_violations, decide, duplicate_declarations, extract_changes, verify_changes,
    AcceptanceBasis, BuildTestStatus, ChangeKind, ChangedSymbol, CheckOutcome,
    ContainmentViolation, DeclaredFootprint, DuplicateDeclaration, FileChange, GateConfig,
    GateEvidence, MergeVerdict, NoVerifyWaiver, PolicyDecision, SymbolRef,
};
pub use harness::{
    integrate_and_verify, partition_by_files, regional_replan, run_farm_out,
    run_farm_out_with_progress, AgentRunSummary, ApplyConflict, BuildTestFailure, DuplicateBlame,
    FarmOutConfig, FarmOutResult, ForemanError, ForemanProgress, ForemanProgressSink,
    IntegrationBlame, IntegrationResult, Subtask, SubtaskOutcome, WorktreeAgent,
    WorktreeAgentRequest,
};
pub use orchestrator::{run_foreman, ForemanRunOutcome, RunMode};
pub use planner::{decompose, parse_plan, DecomposeResult};
pub use report::{
    AcceptanceBasisDto, BuildTestDto, DuplicateDto, ForemanReport, GateEvidenceDto,
    IntegrationReportDto, MergeVerdictDto, PlanReport, PlanSubtaskDto, SubtaskReportDto,
    SymbolRefDto, FOREMAN_SCHEMA_VERSION,
};
