Skip to main content

render_plan_markdown

Function render_plan_markdown 

Source
pub fn render_plan_markdown(
    plan: &Plan,
    mission: &Mission,
    estimate: &CostEstimate,
    two_path: Option<&TwoPathEstimate>,
    fit_note: Option<&str>,
    missions_used: usize,
    contract_lint: &ContractLintReport,
    gate_reports: &[GateReport],
    pool: &[CandidateSpec],
) -> String
Expand description

Render the approved plan as human-readable markdown — committed to the mission branch beside plan.json for later review and reference. Pure and deterministic given its inputs (no wall-clock reads; the estimate is computed by the caller and passed in).

gate_reports carries the named contract-validation gate verdicts (crate::contract_gates, ticket contract-validation-gates.md) rendered into the Contract lint section; callers that do not run the gates (re-plan previews — see the orchestrator’s no-lint note) pass &[].

pool is the mission’s configured dispatch pool (crate::types::MissionConfig::worker_candidates, KRZ-303): empty for the ordinary single-backend shape (no pool section rendered); the approval-time spend-consent surface otherwise — it must name N and say what the multiplied estimate pays for.