You are a senior code reviewer. Review the following code changes.

## Specification

No specification provided. Focus on correctness, tests, and integration.





## Code Changes

```diff
diff --git a/ftl_code_expert/cli.py b/ftl_code_expert/cli.py
index a32ac21..ba0f2bb 100644
--- a/ftl_code_expert/cli.py
+++ b/ftl_code_expert/cli.py
@@ -33,6 +33,7 @@
     PROPOSE_BELIEFS_CODE,
     RESEARCH_INFER_FILES_PROMPT,
     REVIEW_PROMPT,
+    VERIFY_PROMPT,
     build_diff_prompt,
     build_diff_summary_prompt,
     build_file_prompt,
@@ -3681,6 +3682,215 @@ def research(ctx, review_file, limit, dry_run):
     click.echo("\nResearch complete. Run `code-expert derive` to attempt rejustification.", err=True)
 
 
+# --- verify ---
+
+
+def _parse_verify_response(response: str) -> dict[str, dict]:
+    """Parse LLM verify response into {id: {verdict, reason}} dict."""
+    m = re.search(r"\{.*\}", response, re.DOTALL)
+    if not m:
+        return {}
+    try:
+        data = json.loads(m.group(0))
+        results = {}
+        for k, v in data.items():
+            if isinstance(v, dict) and "verdict" in v:
+                results[k] = {
+                    "verdict": v["verdict"].upper(),
+                    "reason": v.get("reason", ""),
+                }
+        return results
+    except (json.JSONDecodeError, TypeError, AttributeError):
+        return {}
+
+
+@cli.command("verify")
+@click.argument("belief_ids", nargs=-1)
+@click.option("--category", default=None,
+              help="Verify IN beliefs matching keyword in ID or text")
+@click.option("--gated", is_flag=True, default=False,
+              help="Verify IN beliefs that actively gate downstream chains")
+@click.option("--negative", is_flag=True, default=False,
+              help="Verify negative IN beliefs (bugs, gaps, risks)")
+@click.option("--all", "verify_all", is_flag=True, default=False,
+              help="Verify all IN beliefs (expensive)")
+@click.option("--retract", is_flag=True, default=False,
+              help="Retract STALE beliefs via reasons")
+@click.option("--dry-run", is_flag=True, default=False,
+              help="Show what would be verified without calling LLM")
+@click.option("--batch-size", type=int, default=10,
+              help="Beliefs per LLM batch (default: 10)")
+@click.pass_context
+def verify(ctx, belief_ids, category, gated, negative, verify_all, retract, dry_run, batch_size):
+    """Check whether beliefs still hold against current source code.
+
+    Reads the current source code for each belief and asks an LLM whether
+    the claim is CONFIRMED, STALE, or INCONCLUSIVE.
+
+    Examples:
+        code-expert verify login-audit-always-success-info
+        code-expert verify --category auth
+        code-expert verify --gated
+        code-expert verify --negative --retract
+        code-expert verify --all --dry-run
+    """
+    from .caffeinate import hold as _caffeinate
+    _caffeinate()
+
+    model = ctx.obj["model"]
+    timeout = ctx.obj["timeout"]
+    repo_path = _get_repo(ctx)
+    abs_repo = os.path.abspath(repo_path)
+    project_dir = _get_project_dir(ctx)
+
+    if not check_model_available(model):
+        click.echo(f"Error: Model '{model}' CLI not available", err=True)
+        sys.exit(1)
+
+    # Load belief network
+    try:
+        network = _load_network()
+        nodes = network.get("nodes", {})
+    except Exception as e:
+        click.echo(f"Error loading belief network: {e}", err=True)
+        sys.exit(1)
+
+    if not nodes:
+        click.echo("No beliefs found. Run explorations and propose-beliefs first.")
+        return
+
+    # Select beliefs to verify
+    beliefs: list[dict] = []
+
+    if belief_ids:
+        for bid in belief_ids:
+            node = nodes.get(bid)
+            if node:
+                beliefs.append({"id": bid, "text": node.get("text", "")})
+            else:
+                click.echo(f"  Belief not found: {bid}", err=True)
+
+    elif gated:
+        gated_beliefs = _find_gated_out_beliefs(nodes)
+        blocker_ids = set()
+        for gb in gated_beliefs:
+            for blocker in gb.get("blockers", []):
+                blocker_ids.add(blocker["id"])
+        for bid in blocker_ids:
+            node = nodes.get(bid, {})
+            beliefs.append({"id": bid, "text": node.get("text", "")})
+        click.echo(f"Found {len(beliefs)} active blocker(s) gating {len(gated_beliefs)} downstream belief(s)", err=True)
+
+    elif negative:
+        beliefs = _get_negative_beliefs(nodes, model=model)
+        click.echo(f"Found {len(beliefs)} negative IN belief(s)", err=True)
+
+    elif category:
+        keyword = category.lower()
+        for nid, node in nodes.items():
+            if node.get("truth_value") != "IN":
+                continue
+            if keyword in nid.lower() or keyword in node.get("text", "").lower():
+                beliefs.append({"id": nid, "text": node.get("text", "")})
+        click.echo(f"Found {len(beliefs)} IN belief(s) matching '{category}'", err=True)
+
+    elif verify_all:
+        for nid, node in nodes.items():
+            if node.get("truth_value") == "IN":
+                beliefs.append({"id": nid, "text": node.get("text", "")})
+        click.echo(f"Found {len(beliefs)} IN belief(s) to verify", err=True)
+
+    else:
+        click.echo("Specify belief IDs, or use --category, --gated, --negative, or --all.", err=True)
+        sys.exit(1)
+
+    if not beliefs:
+        click.echo("No beliefs to verify.")
+        return
+
+    if dry_run:
+        click.echo(f"\n{len(beliefs)} belief(s) would be verified:", err=True)
+        for b in beliefs:
+            click.echo(f"  {b['id']}: {b['text'][:100]}", err=True)
+        click.echo("\n--dry-run: stopping before LLM verification.", err=True)
+        return
+
+    # Verify in batches
+    all_results: dict[str, dict] = {}
+    batches = [beliefs[i:i + batch_size] for i in range(0, len(beliefs), batch_size)]
+
+    for i, batch in enumerate(batches):
+        click.echo(f"\nVerifying batch {i + 1}/{len(batches)} ({len(batch)} beliefs)...", err=True)
+
+        contexts = asyncio.run(
+            _gather_confirmation_context(batch, nodes, abs_repo, project_dir)
+        )
+
+        beliefs_section = []
+        for belief in batch:
+            ctx_text = contexts.get(belief["id"], "(no code context found)")
+            beliefs_section.append(
+                f"### `{belief['id']}`\n{belief['text']}\n\n"
+                f"**Code context:**\n{ctx_text}"
+            )
+
+        prompt = VERIFY_PROMPT.format(beliefs="\n\n---\n\n".join(beliefs_section))
+
+        try:
+            response = invoke_sync(prompt, model=model, timeout=timeout)
+            results = _parse_verify_response(response)
+            all_results.update(results)
+        except Exception as e:
+            click.echo(f"  Error: {e}", err=True)
+
+    # Report results
+    confirmed = []
+    stale = []
+    inconclusive = []
+
+    for belief in beliefs:
+        bid = belief["id"]
+        result = all_results.get(bid)
+        if not result:
+            inconclusive.append(bid)
+            click.echo(f"  {bid}: INCONCLUSIVE (no LLM response)", err=True)
+            continue
+
+        verdict = result["verdict"]
+        reason = result.get("reason", "")
+
+        if verdict == "CONFIRMED":
+            confirmed.append(bid)
+            click.echo(f"  {bid}: CONFIRMED — {reason}", err=True)
+        elif verdict == "STALE":
+            stale.append(bid)
+            click.echo(f"  {bid}: STALE — {reason}", err=True)
+        else:
+            inconclusive.append(bid)
+            click.echo(f"  {bid}: INCONCLUSIVE — {reason}", err=True)
+
+    click.echo(f"\nResults: {len(confirmed)} confirmed, {len(stale)} stale, "
+               f"{len(inconclusive)} inconclusive", err=True)
+
+    # Retract stale beliefs
+    if retract and stale and _has_reasons():
+        click.echo(f"\nRetracting {len(stale)} stale belief(s)...", err=True)
+        for bid in stale:
+            reason = all_results.get(bid, {}).get("reason", "stale per verify")
+            result = subprocess.run(
+                ["reasons", "retract", bid, "--reason", reason],
+                capture_output=True, text=True,
+            )
+            if result.returncode == 0:
+                click.echo(f"  Retracted: {bid}", err=True)
+            else:
+                click.echo(f"  Failed to retract {bid}: {result.stderr.strip()}", err=True)
+        _reasons_export()
+        click.echo("Network updated.", err=True)
+    elif retract and stale:
+        click.echo("\nCannot retract: reasons CLI not available.", err=True)
+
+
 # --- update ---
 
 
diff --git a/ftl_code_expert/prompts/__init__.py b/ftl_code_expert/prompts/__init__.py
index 258543b..b0feca3 100644
--- a/ftl_code_expert/prompts/__init__.py
+++ b/ftl_code_expert/prompts/__init__.py
@@ -9,6 +9,7 @@
 from .propose import PROPOSE_BELIEFS_CODE
 from .research import RESEARCH_INFER_FILES_PROMPT
 from .review import REVIEW_PROMPT
+from .verify import VERIFY_PROMPT
 from .repo import build_repo_prompt
 from .scan import build_scan_prompt
 from .spec import GENERATE_SPEC_PROMPT
@@ -20,6 +21,7 @@
     "PROPOSE_BELIEFS_CODE",
     "RESEARCH_INFER_FILES_PROMPT",
     "REVIEW_PROMPT",
+    "VERIFY_PROMPT",
     "TOPICS_INSTRUCTIONS",
     "build_diff_prompt",
     "build_diff_summary_prompt",
diff --git a/ftl_code_expert/prompts/verify.py b/ftl_code_expert/prompts/verify.py
new file mode 100644
index 0000000..ee72f3c
--- /dev/null
+++ b/ftl_code_expert/prompts/verify.py
@@ -0,0 +1,25 @@
+"""Prompt template for verifying belief staleness against current source code."""
+
+VERIFY_PROMPT = """\
+You are verifying whether beliefs about a codebase still hold by examining the current source code.
+
+For each belief below, I provide the belief text and relevant code context gathered from \
+the current state of the repository.
+
+Determine whether each belief is:
+- **CONFIRMED** — the current code still supports this claim
+- **STALE** — the code has changed and the belief no longer holds (explain what changed)
+- **INCONCLUSIVE** — the provided code context is insufficient to determine either way
+
+Return ONLY a JSON object mapping each belief ID to an object with "verdict" and "reason":
+
+Example:
+```json
+{{"belief-1": {{"verdict": "CONFIRMED", "reason": "The handler still enforces zero-arg construction"}}, \
+"belief-2": {{"verdict": "STALE", "reason": "LoginAttemptAuditHandler now covers failed logins with WARNING severity"}}, \
+"belief-3": {{"verdict": "INCONCLUSIVE", "reason": "The relevant middleware file was not in the provided context"}}}}
+```
+
+## Beliefs to Verify
+
+{beliefs}"""

```

## Observation Results

You previously requested observations. Here are the results:

```json
{
  "load_network_body": {
    "function": "_load_network",
    "file": "ftl_code_expert/cli.py",
    "start_line": 2706,
    "end_line": 2719,
    "source": "def _load_network() -> dict:\n    \"\"\"Load network.json (exported from reasons).\"\"\"\n    network_path = Path(\"network.json\")\n    if not network_path.exists():\n        # Try exporting from reasons\n        if _has_reasons():\n            import subprocess\n            result = subprocess.run(\n                [\"reasons\", \"export\"], capture_output=True, text=True,\n            )\n            if result.returncode == 0:\n                return json.loads(result.stdout)\n        return {\"nodes\": {}}\n    return json.loads(network_path.read_text())"
  },
  "find_gated_out_beliefs_body": {
    "function": "_find_gated_out_beliefs",
    "file": "ftl_code_expert/cli.py",
    "start_line": 3330,
    "end_line": 3355,
    "source": "def _find_gated_out_beliefs(nodes: dict) -> list[dict]:\n    \"\"\"Find gated OUT beliefs and their active blockers.\"\"\"\n    results = []\n    for nid, node in nodes.items():\n        if node.get(\"truth_value\") != \"OUT\":\n            continue\n        if node.get(\"metadata\", {}).get(\"superseded_by\"):\n            continue\n        for j in node.get(\"justifications\", []):\n            if not j.get(\"outlist\"):\n                continue\n            active_blockers = [\n                oid for oid in j[\"outlist\"]\n                if oid in nodes and nodes[oid].get(\"truth_value\") == \"IN\"\n            ]\n            if active_blockers:\n                results.append({\n                    \"id\": nid,\n                    \"text\": node.get(\"text\", \"\"),\n                    \"blockers\": [\n                        {\"id\": bid, \"text\": nodes[bid].get(\"text\", \"\")}\n                        for bid in active_blockers\n                    ],\n                })\n                break\n    return results"
  },
  "get_negative_beliefs_body": {
    "function": "_get_negative_beliefs",
    "file": "ftl_code_expert/cli.py",
    "start_line": 3370,
    "end_line": 3384,
    "source": "def _get_negative_beliefs(nodes: dict, model: str = \"claude\") -> list[dict]:\n    \"\"\"Get negative IN beliefs, preferring reasons list-negative when available.\"\"\"\n    if _has_reasons():\n        result = subprocess.run(\n            [\"reasons\", \"list-negative\", \"-m\", model],\n            capture_output=True, text=True,\n        )\n        if result.returncode == 0:\n            beliefs = []\n            for line in result.stdout.splitlines():\n                m = re.match(r\"\\s*\\[-\\]\\s+([\\w-]+):\\s+(.+)\", line)\n                if m:\n                    beliefs.append({\"id\": m.group(1), \"text\": m.group(2)})\n            return beliefs\n    return _find_negative_in_beliefs(nodes)"
  },
  "gather_confirmation_context_body": {
    "function": "_gather_confirmation_context",
    "file": "ftl_code_expert/cli.py",
    "start_line": 3033,
    "end_line": 3051,
    "source": "async def _gather_confirmation_context(\n    beliefs: list[dict],\n    nodes: dict,\n    repo_path: str,\n    project_dir: str | None = None,\n) -> dict[str, str]:\n    \"\"\"Gather code context for confirming whether beliefs still hold.\"\"\"\n    tasks = [\n        _gather_belief_context(b, nodes, repo_path, project_dir)\n        for b in beliefs\n    ]\n    results = await asyncio.gather(*tasks, return_exceptions=True)\n    contexts: dict[str, str] = {}\n    for i, result in enumerate(results):\n        if isinstance(result, Exception):\n            contexts[beliefs[i][\"id\"]] = \"(error gathering context)\"\n        else:\n            contexts[result[0]] = result[1]\n    return contexts"
  },
  "invoke_sync_raises": {
    "function": "invoke_sync",
    "file": "ftl_code_expert/cli.py",
    "explicit_raises": [],
    "calls": [],
    "error": "Function 'invoke_sync' not found"
  },
  "has_reasons_body": {
    "function": "_has_reasons",
    "file": "ftl_code_expert/cli.py",
    "start_line": 155,
    "end_line": 157,
    "source": "def _has_reasons() -> bool:\n    \"\"\"Check if ftl-reasons CLI is available.\"\"\"\n    return shutil.which(\"reasons\") is not None"
  },
  "reasons_export_body": {
    "function": "_reasons_export",
    "file": "ftl_code_expert/cli.py",
    "start_line": 2200,
    "end_line": 2219,
    "source": "def _reasons_export():\n    \"\"\"Re-export beliefs.md and network.json from reasons after adding beliefs.\"\"\"\n    beliefs_path = Path(\"beliefs.md\")\n    network_path = Path(\"network.json\")\n\n    result = subprocess.run(\n        [\"reasons\", \"export-markdown\"],\n        capture_output=True, text=True,\n    )\n    if result.returncode == 0:\n        beliefs_path.write_text(result.stdout)\n        click.echo(f\"Updated {beliefs_path}\")\n\n    result = subprocess.run(\n        [\"reasons\", \"export\"],\n        capture_output=True, text=True,\n    )\n    if result.returncode == 0:\n        network_path.write_text(result.stdout)\n        click.echo(f\"Updated {network_path}\")"
  },
  "verify_tests": {
    "error": "Parameter error: related_test_files() missing 1 required positional argument: 'file_path'",
    "params_received": [
      "source_file"
    ]
  },
  "parse_verify_response_usages": {
    "symbol": "_parse_verify_response",
    "usages": [
      {
        "file": "ftl_code_expert/cli.py",
        "line": 3688,
        "text": "def _parse_verify_response(response: str) -> dict[str, dict]:"
      },
      {
        "file": "ftl_code_expert/cli.py",
        "line": 3841,
        "text": "results = _parse_verify_response(response)"
      }
    ],
    "production_usages": [
      {
        "file": "ftl_code_expert/cli.py",
        "line": 3688,
        "text": "def _parse_verify_response(response: str) -> dict[str, dict]:"
      },
      {
        "file": "ftl_code_expert/cli.py",
        "line": 3841,
        "text": "results = _parse_verify_response(response)"
      }
    ],
    "test_usages": [],
    "production_count": 2,
    "test_count": 0,
    "total_count": 2
  },
  "research_command_body": {
    "function": "research",
    "file": "ftl_code_expert/cli.py",
    "start_line": 3523,
    "end_line": 3682,
    "source": "@cli.command(\"research\")\n@click.option(\"--review-file\", required=True, type=click.Path(exists=True),\n              help=\"Path to review JSON file (from review-beliefs)\")\n@click.option(\"--limit\", type=int, default=None,\n              help=\"Max candidates to research\")\n@click.option(\"--dry-run\", is_flag=True, default=False,\n              help=\"Show candidates and inferred files without exploring\")\n@click.pass_context\ndef research(ctx, review_file, limit, dry_run):\n    \"\"\"Evidence-driven exploration from belief review gaps.\n\n    Reads a review JSON file (from review-beliefs), identifies beliefs\n    lacking evidence, infers which source files to explore, then runs\n    the explore \u2192 propose \u2192 accept pipeline.\n\n    Example:\n        code-expert research --review-file reviews/review-beliefs-2026-06-13.json\n        code-expert research --review-file review.json --dry-run\n        code-expert -j 5 research --review-file review.json\n    \"\"\"\n    from .caffeinate import hold as _caffeinate\n    _caffeinate()\n\n    model = ctx.obj[\"model\"]\n    timeout = ctx.obj[\"timeout\"]\n    parallel = ctx.obj[\"parallel\"]\n    repo_path = _get_repo(ctx)\n    abs_repo = os.path.abspath(repo_path)\n\n    if not check_model_available(model):\n        click.echo(f\"Error: Model '{model}' CLI not available\", err=True)\n        sys.exit(1)\n\n    # Step 1: Parse review and find candidates\n    candidates = _parse_review_candidates(review_file)\n    if not candidates:\n        click.echo(\"No research candidates found (all beliefs have sufficient evidence).\")\n        return\n\n    if limit:\n        candidates = candidates[:limit]\n\n    click.echo(f\"Found {len(candidates)} research candidate(s)\", err=True)\n    for c in candidates:\n        status = []\n        if not c.get(\"valid\", True):\n            status.append(\"invalid\")\n        if not c.get(\"sufficient\", True):\n            status.append(\"insufficient\")\n        click.echo(f\"  {c['id']} [{', '.join(status)}]\", err=True)\n        click.echo(f\"    {c['comment'][:120]}\", err=True)\n\n    # Step 2: Load belief network for claim text\n    try:\n        network = _load_network()\n        nodes = network.get(\"nodes\", {})\n    except Exception:\n        nodes = {}\n\n    # Step 3: Collect already-explored files\n    explored = _get_explored_files()\n    if explored:\n        click.echo(f\"\\n{len(explored)} files already explored\", err=True)\n\n    # Step 4: Infer source files via LLM\n    click.echo(f\"\\nInferring source files with {model}...\", err=True)\n    repo_tree = get_repo_structure(abs_repo, max_depth=3)\n    explored_list = \"\\n\".join(f\"- {f}\" for f in sorted(explored)) if explored else \"(none)\"\n\n    prompts = []\n    for c in candidates:\n        node = nodes.get(c[\"id\"], {})\n        belief_text = node.get(\"text\", c[\"id\"])\n        prompts.append(RESEARCH_INFER_FILES_PROMPT.format(\n            belief_id=c[\"id\"],\n            belief_text=belief_text,\n            comment=c[\"comment\"],\n            repo_tree=repo_tree,\n            explored_files=explored_list,\n        ))\n\n    results = invoke_concurrent_sync(prompts, model=model, timeout=timeout, max_concurrent=parallel)\n\n    # Step 5: Collect and deduplicate inferred files\n    all_files: dict[str, list[str]] = {}  # file_path \u2192 list of belief_ids that need it\n    for i, result in enumerate(results):\n        candidate = candidates[i]\n        if isinstance(result, Exception):\n            click.echo(f\"  Error inferring files for {candidate['id']}: {result}\", err=True)\n            continue\n        files = _parse_inferred_files(result)\n        click.echo(f\"  {candidate['id']}: {files}\", err=True)\n        for f in files:\n            if os.path.isabs(f) or \"..\" in f.split(os.sep):\n                click.echo(f\"    Skipping {f} (unsafe path)\", err=True)\n                continue\n            abs_path = os.path.join(abs_repo, f)\n            if not os.path.isfile(abs_path):\n                click.echo(f\"    Skipping {f} (not found)\", err=True)\n                continue\n            if f in explored:\n                click.echo(f\"    Skipping {f} (already explored)\", err=True)\n                continue\n            all_files.setdefault(f, []).append(candidate[\"id\"])\n\n    if not all_files:\n        click.echo(\"\\nNo new files to explore.\", err=True)\n        return\n\n    click.echo(f\"\\n{len(all_files)} file(s) to explore:\", err=True)\n    for f, belief_ids in all_files.items():\n        click.echo(f\"  {f} (for: {', '.join(belief_ids)})\", err=True)\n\n    if dry_run:\n        click.echo(\"\\n--dry-run: stopping before exploration.\", err=True)\n        return\n\n    # Step 6: Build topics and explore\n    from .topics import Topic\n    topics = [\n        Topic(\n            title=f\"Research: evidence for {', '.join(belief_ids)}\",\n            kind=\"file\",\n            target=file_path,\n            source=f\"research:{','.join(belief_ids)}\",\n        )\n        for file_path, belief_ids in all_files.items()\n    ]\n\n    click.echo(f\"\\nExploring {len(topics)} file(s)...\", err=True)\n    if parallel > 1 and len(topics) > 1:\n        batch_results = asyncio.run(\n            _explore_topics_concurrent(topics, model, abs_repo, timeout, parallel)\n        )\n        for r in batch_results:\n            if isinstance(r, Exception):\n                click.echo(f\"  Error: {r}\", err=True)\n            elif r is not None:\n                _, result, entry_name, entry_title, source = r\n                _finalize_topic(ctx, entry_name, entry_title, source, result)\n    else:\n        for topic in topics:\n            try:\n                _run_file_topic(ctx, topic, model, abs_repo)\n            except (SystemExit, Exception) as e:\n                click.echo(f\"  Error exploring {topic.target}: {e}\", err=True)\n\n    # Step 7: Propose and accept beliefs from new entries\n    click.echo(f\"\\n{'=' * 40}\", err=True)\n    click.echo(\"Proposing and accepting beliefs from new entries...\", err=True)\n    click.echo(f\"{'=' * 40}\", err=True)\n    try:\n        ctx.invoke(propose_beliefs, auto_accept=True)\n    except SystemExit as e:\n        if e.code and e.code != 0:\n            click.echo(f\"WARN: propose-beliefs failed (exit {e.code})\", err=True)\n    except Exception as e:\n        click.echo(f\"WARN: propose-beliefs failed: {e}\", err=True)\n\n    click.echo(\"\\nResearch complete. Run `code-expert derive` to attempt rejustification.\", err=True)"
  },
  "verify_prompt_imports": {
    "file": "ftl_code_expert/prompts/__init__.py",
    "imports": [],
    "from_imports": [
      {
        "module": "common",
        "names": [
          "BELIEFS_INSTRUCTIONS",
          "TOPICS_INSTRUCTIONS"
        ]
      },
      {
        "module": "diff",
        "names": [
          "build_diff_prompt",
          "build_diff_summary_prompt"
        ]
      },
      {
        "module": "file",
        "names": [
          "build_file_prompt"
        ]
      },
      {
        "module": "function",
        "names": [
          "build_function_prompt"
        ]
      },
      {
        "module": "observe",
        "names": [
          "build_observe_prompt"
        ]
      },
      {
        "module": "derive",
        "names": [
          "DERIVE_BELIEFS_PROMPT"
        ]
      },
      {
        "module": "propose",
        "names": [
          "PROPOSE_BELIEFS_CODE"
        ]
      },
      {
        "module": "research",
        "names": [
          "RESEARCH_INFER_FILES_PROMPT"
        ]
      },
      {
        "module": "review",
        "names": [
          "REVIEW_PROMPT"
        ]
      },
      {
        "module": "verify",
        "names": [
          "VERIFY_PROMPT"
        ]
      },
      {
        "module": "repo",
        "names": [
          "build_repo_prompt"
        ]
      },
      {
        "module": "scan",
        "names": [
          "build_scan_prompt"
        ]
      },
      {
        "module": "spec",
        "names": [
          "GENERATE_SPEC_PROMPT"
        ]
      }
    ],
    "import_section": "\"\"\"Prompt templates for code expert.\"\"\"\n\nfrom .common import BELIEFS_INSTRUCTIONS, TOPICS_INSTRUCTIONS\nfrom .diff import build_diff_prompt, build_diff_summary_prompt\nfrom .file import build_file_prompt\nfrom .function import build_function_prompt\nfrom .observe import build_observe_prompt\nfrom .derive import DERIVE_BELIEFS_PROMPT\nfrom .propose import PROPOSE_BELIEFS_CODE\nfrom .research import RESEARCH_INFER_FILES_PROMPT\nfrom .review import REVIEW_PROMPT\nfrom .verify import VERIFY_PROMPT\nfrom .repo import build_repo_prompt\nfrom .scan import build_scan_prompt\nfrom .spec import GENERATE_SPEC_PROMPT\n\n__all__ = [\n    \"BELIEFS_INSTRUCTIONS\",\n    \"DERIVE_BELIEFS_PROMPT\",\n    \"GENERATE_SPEC_PROMPT\",\n    \"PROPOSE_BELIEFS_CODE\",\n    \"RESEARCH_INFER_FILES_PROMPT\",\n    \"REVIEW_PROMPT\",\n    \"VERIFY_PROMPT\",\n    \"TOPICS_INSTRUCTIONS\",\n    \"build_diff_prompt\",\n    \"build_diff_summary_prompt\",\n    \"build_file_prompt\",\n    \"build_function_prompt\",\n    \"build_observe_prompt\",\n    \"build_repo_prompt\",\n    \"build_scan_prompt\",\n]\n"
  }
}
```

Use these results to inform your review. Do not request the same observations again.


## Instructions

For each significant change (new file, modified function, etc.), provide a structured verdict.

Use this exact format for each change:

### <file_path or file_path:function_name>
VERDICT: PASS | CONCERN | BLOCK
CORRECTNESS: VALID | QUESTIONABLE | BROKEN
SPEC_COMPLIANCE: MEETS | PARTIAL | VIOLATES | N/A
ISSUE_COMPLIANCE: ADDRESSES | PARTIAL | UNRELATED | N/A
BELIEF_COMPLIANCE: CONSISTENT | VIOLATES | N/A
TEST_COVERAGE: COVERED | PARTIAL | UNTESTED
INTEGRATION: WIRED | PARTIAL | MISSING
REASONING: <brief explanation of your assessment>
---

## Review Criteria

1. **CORRECTNESS**: Does the code do what it claims? Is the logic sound?
   - VALID: Logic is correct, no bugs apparent
   - QUESTIONABLE: Logic may have edge cases or unclear behavior
   - BROKEN: Clear bugs or incorrect behavior

2. **SPEC_COMPLIANCE**: Does it meet MUST requirements from the spec?
   - MEETS: All relevant spec requirements satisfied
   - PARTIAL: Some requirements met, others missing or incomplete
   - VIOLATES: Contradicts spec requirements
   - N/A: No spec provided or not applicable

3. **ISSUE_COMPLIANCE** (only when an issue is provided): Do the changes address the problem or feature described in the issue?
   - ADDRESSES: Changes directly solve the issue's stated problem or implement the requested feature
   - PARTIAL: Changes partially address the issue but leave some aspects unresolved
   - UNRELATED: Changes do not appear related to the issue
   - N/A: No issue provided

4. **TEST_COVERAGE**: Are there tests for the new/changed code?
   - COVERED: Tests exist and cover the changes
   - PARTIAL: Some tests exist but coverage is incomplete
   - UNTESTED: No tests for the changes

5. **INTEGRATION**: Are callers updated? Is the feature usable end-to-end?
   - WIRED: Feature is fully integrated and usable
   - PARTIAL: Interface exists but callers not updated, or integration incomplete
   - MISSING: No integration with existing code

6. **BELIEF_COMPLIANCE** (only when beliefs are provided): Do the changes respect known architectural invariants, contracts, and rules?
   - CONSISTENT: Changes align with or reinforce known beliefs
   - VIOLATES: Changes contradict a specific belief — cite the belief ID
   - N/A: No beliefs provided or no relevant beliefs apply

## Verdict Guidelines

- **BLOCK**: Security issues, broken functionality, spec violations, or missing critical integration
- **CONCERN**: Missing tests, partial integration, questionable patterns, or unclear logic
- **PASS**: Correct, tested, well-integrated code

## Important

- Full function bodies for modified functions may be available in the observations section — use them to verify the complete logic, not just the diff hunks
- Related test files (prefixed with ``related_test:``) may be included in observations — check whether existing test assertions still match modified return types, signatures, or behavior. Flag any test that would break due to the changes
- If duplicate test coverage is detected (multiple test files covering the same source), note it in your review
- Focus on actual issues, not style preferences
- If a method signature is added but callers aren't updated, that's PARTIAL integration
- Be specific in reasoning - reference line numbers or function names
- When in doubt, use CONCERN rather than PASS

## Self-Review

After completing your review, add a brief self-assessment:

### SELF_REVIEW
LIMITATIONS: <what context were you missing that affected review quality?>
---

Examples of limitations:
- "Could not see full class to verify no other methods access the modified field"
- "Test file not included in diff - cannot verify coverage claims"
- "Spec file referenced but not provided"


## Feature Requests

If this review tool could be improved to help you do a better job, suggest features:

### FEATURE_REQUESTS
- <suggestion 1>
- <suggestion 2>
---

Examples:
- "Include full file context for modified functions, not just diff hunks"
- "Show callers of modified methods to verify integration"
- "Include test file alongside implementation changes"

Only include this section if you have specific suggestions. Skip if none.
