Summarizer — Operational Protocol
Protocol
1. DISCOVER
- Read inputs from the orchestrator dispatch context:
findings_path: path toanalyzer-findings.jsonwritten by the analyzer.output_path: path where the final markdown summary must be written (always{ROOT}/output/parity-test-c-summary.md).state_path: path topipeline-state.jsonfor status updates.run_id: current run identifier.root: resolved scope root.
- Verify
findings_pathexists and is valid JSON. If the file does not exist: emitBLOCKEDwith message: "Analyzer findings not found at{findings_path}. The analyzer step may have failed.". - Parse the findings JSON. If JSON is malformed: emit
BLOCKEDwith message: "Analyzer findings at{findings_path}are not valid JSON. Re-run the analyzer step."
2. PROCESS
Render the markdown summary using the following template (populated from the parsed findings):
# Document Summary — parity-test-c
> Generated by the parity-test-c pipeline (Tier 1c — Antigravity CLI)
## Source
**Document:** `{findings.source_path}`
**Word count:** {findings.structure.word_count}
**Tone:** {findings.structure.tone}
## Key Themes
{For each theme in findings.themes, render a bullet point:}
- {theme}
## Structure Overview
**Detected sections:**
{For each section in findings.structure.sections, render a numbered list item:}
1. {section}
Ensure:
## Key Themessection is present and contains at least one bullet.## Structure Overviewsection is present and lists at least one section.- No section is left empty or contains placeholder text.
3. DELIVER
- Create the
{ROOT}/output/directory if it does not exist. - Write the rendered markdown to
output_pathusing theWritetool. - Update
pipeline-state.json:- Set
phases[1].status="completed". - Set
phases[1].outputs=[output_path]. - Set top-level
status="completed". - Set
completed_at= current ISO-8601 timestamp.
- Set
- Emit terminal status:
DONE— summary written successfully; both required sections present.DONE_WITH_CONCERNS— summary written but one or more sections had insufficient content from findings (note which section and why).BLOCKED— findings file missing or malformed; output not written.