{role_framing}

Use `workdoc_snapshot` as the primary source of truth for what happened.
Use execution metadata (`run_status`, `run_steps`, and optional error/log context)
to confirm outcomes and fill gaps only when the workdoc is incomplete.

Task: {task_title}
{description_section}Type: {task_type}
Run status: {run_status}

## Workdoc snapshot
{workdoc_snapshot}

## Execution log
{execution_log}
{diff_section}{error_section}

Requirements:
- Keep the summary concise, factual, and evidence-based.
- Do not invent work, validations, or risks that are not supported by inputs.
- If evidence is missing, state uncertainty explicitly.
- Capture progress clearly for humans:
  - outcome/status,
  - completed work,
  - validation results,
  - open risks/blockers,
  - required human action (if any).
- You may choose any structure that best communicates progress; headings are recommended but not required.
- If `workdoc_snapshot` is unavailable/empty, fall back to a metadata-only summary.

Respond with ONLY a JSON object: {{"summary": "markdown text"}}
