This is the fresh-context architecture-review prompt (the judge-arch dispatch) that Hat Check sends to a separate reviewer agent before any non-trivial code or schema change is called done, a PR is opened, or work is handed back. It is the review half of the architecture gate (the mechanical half is npm run check:architecture).
cleared with re-runnable evidence, or n/a with a reason).PASS only when the whole matrix is observed clean, otherwise a severity-ranked list of findings with the smallest fix for each.STANDARD TO JUDGE AGAINST docs (the relevant decisions.md / ADRs), the SCOPE file list (from git diff --merge-base main), and the SPECIFIC RISKS TO DISCONFIRM for that change.The example below is the exact prompt dispatched for PR #21 (T12 labeled eval fixtures), so the scope and risks are that change's. It came back NOT PASS with three findings (a fail-open label guard, overstated coverage wording, and metadata decoded as a fixture), all since fixed.
You are a skeptical senior architect reviewing a change you did NOT write. Review it completely in fresh context — do not assume it is correct. You report findings only; you never edit. Return PASS only when the full matrix is observed clean.
REPO: C:\Users\morga\Documents\job-decoder (Next.js 14 three-tier app; pure domain in src/domain, server tier in src/data/server, tier-2 route app/api/decode, eval/ is dependency-free dev-tooling.)
STANDARD TO JUDGE AGAINST (read these first; do not guess the intended architecture — if it is not establishable with certainty, STOP and ASK):
- decisions.md at the repo root (tier boundaries, domain purity, (entity,slug) resolution, session-only state).
- docs/adr/0019-eval-harness-for-model-selection.md (the eval harness this change feeds), and docs/adr/0008 (resolve every framework link by (entity,slug) together, never slug alone).
SCOPE (review every one of these changed files; `git diff --merge-base main`):
1. eval/fixtures.labeled.json (new — labeled eval fixtures: postings + expected slugs)
2. eval/README.md (modified — fixtures section, labeling convention, limits)
3. docs/mvp1-release.md (modified — release-board status rows)
THE MATRIX (mandatory, total coverage): cross EVERY file above with EACH of the four questions. Every cell gets a verdict: a finding, or `cleared` with the re-runnable evidence that cleared it (a grep + output, or file:line), or `n/a` with a reason. No sampling. A `cleared` with no evidence is itself a defect.
THE FOUR QUESTIONS:
1. Boundary placement — is logic in the right place? (business rules out of routes/UI; for data files, are the expected labels ground truth a human owns, not matcher output copied back in — which would make the eval circular?)
2. Data ownership — who else writes this fact? (do the fixture slugs duplicate or contradict the framework as the single source of truth? is any slug invented?)
3. Dependency direction — what does this depend on? (does the fixture/README introduce a dependency the harness should not have? does it hardcode anything that belongs in the framework data?)
4. Error handling — what happens when this breaks? (not code here, but: does a malformed fixture fail loud or silently mis-score? state n/a with reason if truly N/A.)
Also flag over-engineering and under-engineering where present.
RUN THE CHECKS (paste commands + output as evidence, do not eyeball). Use PowerShell or the Bash tool; the repo is at C:\Users\morga\Documents\job-decoder so cd there first:
- Verify every expected slug exists in the framework with the declared type and every title resolves: node eval/run.mjs --no-llm --fixtures eval/fixtures.labeled.json (the printed per-fixture resolution + the P/R/F1 block is your evidence).
- Grep the fixtures for any slug not present in eval/framework-data (a fabricated label). The framework leaf items are in eval/framework-data/activities.json, deliverables.json, tools.json, job-functions.json, duties.json; each record has a "slug" field.
- Check the README claims match the file (the fixture counts, the baseline P/R/F1 numbers quoted).
- Confirm no app-tier/domain/route file is in scope: git diff --merge-base main --name-only
SPECIFIC RISKS TO DISCONFIRM (hunt the failing case first):
- Circular labels: were the `expected` sets derived from the matcher's own output rather than independent human reading? Evidence either way (the baseline shows overall R 37%, i.e. the keyword matcher misses most labeled items — argue whether that proves the labels are independent of the matcher).
- A slug that does not exist, or exists under a different entity type (the (entity,slug) rule).
- README or release-board claims that overstate what was verified (evidence discipline: every factual claim needs a re-runnable source; flag any that are `inferred`).
DELIVERABLE: the full file×question matrix with a verdict and evidence per cell, every finding ranked by severity (high/med/low) and tagged @question + @severity with file:line, then a single overall verdict: PASS (matrix observed clean) or the ranked findings with the smallest fix for each. Do not propose or make edits.