#121Critic Verdict ParserEasy

Critic Verdict Parser

Background

The Critic agent outputs a structured verdict that the orchestrator loop parses. The canonical format: VERDICT: PASS or VERDICT: FAIL, optional GAP: lines, optional UNSUPPORTED: lines. The orchestrator needs a parser that's tolerant of LLM formatting drift.

Problem statement

Implement parse_critic_verdict(text). Return a dict with:

  • passed: bool - True iff a VERDICT: PASS line appears (case-insensitive).
  • gaps: list[str] - items from lines starting with GAP:.
  • unsupported: list[str] - items from lines starting with UNSUPPORTED:.

Input

  • text - the raw critic output.

Output

  • dict with keys passed, gaps, unsupported.

Examples

Input: "VERDICT: PASS\nGAP: The impact section is shallow"
Output: {passed: True, gaps: ["The impact section is shallow"], unsupported: []}

Constraints

  • Recognise case-insensitive VERDICT: PASS|FAIL.
  • A missing verdict means passed: False.
  • Strip the prefix and surrounding whitespace from each gap/unsupported.

Notes

  • Strict structure, lenient parsing. The Critic prompt enforces these prefixes; the parser still needs to accept extra whitespace, mixed case, and blank lines.
Python
Loading...

▶ Run executes the 3 visible sample tests below in your browser. Submit runs the full suite — including hidden tests — on the server for an official verdict.

  • Reference example: PASS verdict with one gap
  • Sample: lowercase verdict, gap, whitespace-padded unsupported
  • Reference: FAIL with multiple gaps and unsupported claims