/hallmark:principal-reviewfrom hallmark
Applies a principal engineer's structured review process to a frozen commit: test audit, seven lenses, severity classification, evidence bar, refutation pass, incremental rulings, and verdict shape.
Ships in hallmark. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
One review covers one frozen commit against its base branch. The bar is a principal engineer's: no real defect, gap or untested behaviour gets through, and every finding is proven. Missing a defect and inventing one are both failures. Work in this order:
git diff.The author's job is to ship tests that pin every behaviour the change adds or alters. Your job is to check that they did. Map each behaviour to the test that fails if that behaviour breaks.
For each changed function or branch, list the cases that matter, then find the test for each:
Then ask of each test that claims to cover a case:
>= to
> at line 42, or delete the retry: every test still passes."is_ok() on a path whose value matters, is not evidence.ignore, skip or only. Each one needs a reason
in the change; without one it is a finding.Prefer a few sharp tests over many shallow ones. Don't ask for tests of trivial getters, generated code or what the type system already proves, and don't ask for a coverage number: name the case that is unpinned.
| Lens | Asks | Typical blocker |
|---|---|---|
first_principles | Is this the simplest change that solves the task? Does it belong in this layer? | Patches a symptom; duplicates an existing mechanism |
correctness | Edge cases, error paths, concurrency, idempotency, retries | A retry double-charges; two writers race |
security_tenancy | Authorization on every path, tenant isolation, secrets, injection | A query bypasses row-level security; a secret in a log line |
data_migrations | Is the migration reversible and safe on live data? | A locking ALTER on a hot table; a backfill that can't resume |
evidence | Do the tests pin every behaviour? Would they fail without the change? | A behaviour no test checks; a fix with no regression test; a weakened test |
operability | Can someone on call see it fail and recover? | A swallowed error on a billing path; no log when it gives up |
repo_rules | The repository's rules from the base branch (CLAUDE.md, AGENTS.md, the files they list, the review notes) | Breaks a convention the repo wrote down; weakens a rule file |
How to apply them:
Apply only the lenses the prompt lists when it lists some.
| Severity | Bar | Blocks approval |
|---|---|---|
blocker | Must not ship: data loss or corruption, a security hole, a broken main path, wrong results users will hit | yes |
major | A real defect that should be fixed before merging: a likely edge case that fails, a changed behaviour no test pins, a bug fix with no regression test, a weakened or flaky test, a broken repo rule | yes |
minor | Worth fixing, but safe to ship: a rare edge case with a cheap workaround, an unpinned branch that only guards the impossible, a confusing name on a public API | no |
nit | Style and polish | no |
Minors and nits ride along into the review comment on the pull request. List them when they
help; never let them crowd out what matters. The prompt says how many nits
the repository records per review (max_nits, 3 by default): report at
most that many, most useful first. Hallmark keeps the first ones and drops the
rest.
scenario: the concrete inputs or
state, then the wrong result. "Two workers read attempt 2 of delivery 17
before either writes; the endpoint receives event 17 twice." For a test
gap, the scenario is the mutation no test catches.file is repository-relative and line 1-based (0
for the whole file). Use the line where the fix belongs; for a missing
test, the line of the unpinned code.git show <base>:<path>) and that
the change doesn't make worse, is reported with pre_existing: true. Rate
its severity as you would any finding; Hallmark records it, shows it in
the review and on the PR, and never lets it block approval or send the
item back. Don't use it to soften a problem the change caused.Before you return, try to prove each finding wrong: look for the guard, the
caller that can't pass that input, the test that already covers it, the rule
that asks for exactly this. Drop the finding if you succeed. Then check each
severity against the table, not against your confidence. Last, ask what you
didn't read: read it now, or say in the summary which part went
unreviewed.
There is no approve field. Hallmark approves when no blocker or major
stays open after your rulings. Rate each finding by its consequences and let
the rule decide. After the repository's max_rejects rejected reviews, the
item escalates to a person.
When the prompt says this is the last round before escalation, a rejection
goes to that person, not back to the fixer. Review as usual, then write the
summary as their diagnosis: is the approach wrong, and what would you do
instead (a different design, a smaller scope, a split), or are the remaining
findings ordinary and worth one more round? The findings restated are not a
diagnosis. Hallmark puts that summary in the person's inbox.
From round 2 the prompt shows only the diff since the last review and lists
the findings still open, with the fixer's claims and disputes. For each one,
add a ruling to prior:
fixed: the code now handles the scenario, and for a correctness or
evidence finding a test now fails without the fix. Check both; a claim is
not proof. When no deterministic test can pin the behaviour (CI or config,
docs, prompt text, a refactor that keeps behaviour), check it by reading
and rule fixed with a note saying why there is no test.open: still broken. Add a note saying what is still wrong.withdrawn: the fixer's dispute is right, or the finding was wrong. Say
why in the note.Rule on every listed finding; one you leave out stays open. Don't repeat an open finding as a new one. New problems introduced by the fix, including tests it weakened, are new findings.
When the branch was rewritten after its approval (a rebase with resolved conflicts, or changed commits), the prompt may show only "What the rebase changed": a diff between the approved change and the rewritten one. Each side is itself a diff of the item against its base. Review only those differences. A resolved conflict must keep what both sides meant, this item's change and what the base gained since, with nothing dropped, duplicated or half-merged. Any other difference must hold up on its own. Don't review the rest of the change again: it is approved.
When the prompt has a Library briefing, its learnings (L-0017, …) are what
this repository has learnt from earlier reviews: rules, false positives to
avoid, maps of modules, decisions. Use them. For each learning you relied on,
add {"id": "L-0017", "held": true} to learnings, or held: false with a
note when this change shows it is wrong or stale. Leave out the ones you
didn't use.
{
"summary": "Adds retries with jitter to webhook delivery. One race lets two workers deliver the same event, and no test pins giving up.",
"findings": [
{
"lens": "correctness",
"severity": "blocker",
"file": "apps/api/src/webhooks/retry.ts",
"line": 42,
"title": "Two workers can retry the same delivery",
"scenario": "Workers A and B both read attempt 2 of delivery 17 before either writes; the endpoint receives event 17 twice.",
"fix": "Claim the delivery with SELECT ... FOR UPDATE SKIP LOCKED before sending."
},
{
"lens": "evidence",
"severity": "major",
"file": "apps/api/src/webhooks/retry.ts",
"line": 58,
"title": "No test pins giving up after the last attempt",
"scenario": "Change `attempt >= max` to `attempt > max`: delivery is sent one extra time and every test still passes.",
"fix": "Add a test that fails the endpoint `max` times, then asserts no further send and the gave-up log line."
}
],
"prior": [{ "id": "F1", "status": "fixed" }],
"learnings": [{ "id": "L-0017", "held": true }],
"needs_person": "It changes what the auto-updater downloads; a bad release reaches every install before anyone can revert."
}
needs_person is not a finding and never blocks approval. Set it, with one
sentence of reason, when a person should approve the merge whatever the
checks say: billing, auth, a release or CI workflow, data that can't be got
back, or a pattern others will copy. The repository's [merge] tiers cover
the usual paths; you cover the change the paths don't name. Leave it out for
an ordinary change.
In a headless review, return it through the structured output. hall verdict
is not for agents: inside Claude Code it is refused (GATE_DENIED), so an
agent doesn't approve work (a guardrail, not a lock). A person records one by hand from a terminal: save it
to a file and run hall verdict <item> --file verdict.json (--file - reads
stdin); hall schema verdict-input prints the schema. Theirs is recorded as a
human override.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/hallmarkTrack changes in this repo with Hallmark (the `hall` CLI). Use when starting work on a clear requirement to build or change the app ("/hallmark <request>", "fix the flaky login test", "pick up issue/hallmark-fixHow Hallmark's fixer addresses failing checks and review findings - fix, commit, record with `hall fixed`, or dispute with a reason./hallmark-setupConfigure Hallmark for this person and repo with `hall config` - gates and the shell they run in, how worktrees are made and work is shipped, models, budgets, where claude and gh live, notifications. Use when they say "set up Hallmark", "configure hallmark", "change the gates", "use devbox/nix/mise for the checks", "change the ship command", "set a budget", "hall can't find gh", or ask what a Hallmark setting does.npx claudepluginhub tiagocolombo/hallmark --plugin hallmarkOther plugins' skills for the same job