From bencium-harness
Walks ACCEPTANCE.md against actual repo state, runs configured verify commands, and reports PASS/FAIL/SKIP with evidence for each check.
How this command is triggered — by the user, by Claude, or both
Slash command
/bencium-harness:bencium-verifyFiles this command reads when invoked
This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
You are running `/bencium-verify` — the verification gate. ## Step 0: Record phase (statusline) If `.harness/` exists, write the current phase so the optional statusline can highlight TEST: ## Step 1: Load 1. Read `ACCEPTANCE.md` from project root. If missing, tell the user to run `/bencium-init` first. 2. Read `.harness/config.yaml` to find `verify.cmd` entries (optional — if absent, skip the hard-check phase). 3. Read `.harness/rules.md` for project-specific non-negotiables that should also be checked. ## Step 2: Hard checks (if config has them) Run each command in `verify.cmd` se...
You are running /bencium-verify — the verification gate.
If .harness/ exists, write the current phase so the optional statusline can highlight TEST:
[ -d .harness ] && printf 'phase=test\ntask=verify acceptance\nupdated=%s\n' "$(date -u +%FT%TZ)" > .harness/state
ACCEPTANCE.md from project root. If missing, tell the user to run /bencium-init first..harness/config.yaml to find verify.cmd entries (optional — if absent, skip the hard-check phase)..harness/rules.md for project-specific non-negotiables that should also be checked.Run each command in verify.cmd sequentially via Bash. Capture exit code + last 20 lines of output. If any non-zero, record as FAIL with evidence.
Examples of typical commands users may have configured: npm test -- --run, npm run typecheck, npm run build, custom smoke scripts.
For EACH unchecked item in ACCEPTANCE.md:
- [deployed] (or has a trailing [deployed] tag), it is a deployed-environment check. Classify as SKIP with reason awaiting post-deploy smoke — re-walked by /bencium-deploy Step 5.5 against deploy.url. Do NOT attempt to evaluate it locally, and do NOT mark it [x]. Move on. (Rationale: local pass != deployed pass. The whole reason this tag exists is because tests passing locally have falsely confirmed deployed features in the past.)- [ ] (local). Read the check carefully.SUPABASE_KEY=, sk_live_, etc.) in tracked files onlyfetch(, useQuery, useMutation, upload handlers and confirm each has visible loading/error state (e.g. matching isLoading, <Spinner, <Skeleton, toast.error, etc.); flag any async call with no visible state binding.- [x] in ACCEPTANCE.md.A green test only counts if the test still asserts the real behavior. Agents optimize for the metric they're graded on, so before trusting any passing hard check, inspect the changes that produced it. Look at the diff for the test and config files (git diff on *.test.*, *.spec.*, conftest.py, snapshots, vitest.config, jest.config, etc.) and flag any of:
expect(true).toBe(true), assert True, an assertion deleted/commented, or narrowed to something trivially true..skip, xit, test.todo, @pytest.mark.skip, --passWithNoTests, || true appended to a verify command.-u) without the change being justified in the diff.verify.cmd quietly changed to run fewer tests, or a failing file excluded.If you find any: record the affected acceptance/hard check as FAIL with the file:line evidence, regardless of the green result. A gamed pass is a fail. Name the specific gaming pattern in the evidence string.
This is cheap insurance against the exact failure mode where "all tests pass" but the tests no longer test anything.
The single biggest verification lever is separation: an agent grading its own work skews positive. When you (the verifier) also wrote the code in this session, or when a check is subjective / large / easy to rationalize, delegate a skeptical second opinion to a subagent that did not write the code.
When to use it:
/bencium-verify runs in the same session that just built the feature (/bencium-next BUILD ran earlier in this context).How:
Task subagent (type Explore or general) — at most three only if you need to shard a long ACCEPTANCE list; one task each, never nested. Honor the 3-agent cap.ACCEPTANCE.md rows, the git diff, and the verify.cmd output. Ask for a concise per-row PASS/FAIL with file:line evidence and a one-line reason — nothing else (keep the main context clean).builder said PASS, independent reviewer said FAIL — <reason>).The subagent is advisory to the gate, not a separate gate — its FAILs flip the corresponding rows to FAIL in your report.
This is a faster, wider version of Steps 3 + 3b for long ACCEPTANCE lists. It is purely additive — the serial walk above stays the default and the portable path. Two gates must both be true before you use it; if either is false, run Steps 3/3b serially and skip this section entirely:
Workflow tool available. It exists only in Claude Code. On Codex, opencode, or a copy-paste chat surface there is no Workflow tool — in that case do not try to emulate this with extra Task subagents (that would break the 3-agent cap); just run the serial path.workflow argument, or "ultracode"). Never invoke it automatically — it spawns many agents and costs tokens.When both hold:
[deployed] rows; those stay deferred to SMOKE). Gather the git diff and the Step 2 verify.cmd output.Workflow tool with the scaffolded script (prefer the project copy .claude/workflows/verify-acceptance.mjs; fall back to ${CLAUDE_PLUGIN_ROOT}/workflows/verify-acceptance.mjs). Pass args: { rows: [{ text }], diff, verifyOutput }. The workflow evaluates each row (Haiku) and adversarially re-checks each PASS with a fresh skeptic (Sonnet) — Step 3a's gamed-pass hunt, at scale.items into your Step 4 report exactly as if you had walked them serially. A row the workflow marks fail (including a refuted PASS) is FAIL — take the stricter verdict, same reconciliation rule as Step 3b.mode: "workflow" and agents: <count> in the Step 8 marker (see below). If you ran serially, set mode: "serial" and omit or zero agents.The workflow is advisory to the gate in exactly the way the Step 3b subagent is — it does not deploy, it does not check off [deployed] rows, and its output flows into the same marker schema.
Print the TEST banner (yellow) — see phase-banner skill for the codes:
\033[33m┌── TEST ── verify acceptance (local) ──┐\033[0m
🗺️ ▸ 📋 ▸ 🔨 ▸ [✓] ▸ 🚀 ▸ 🔥 ▸ 💭
Then a structured report. Show deployed-env checks as a separate block so the user can see at a glance that local PASS is not a deploy gate on its own.
/bencium-verify report (local)
Hard checks:
✓ tests (npm test -- --run, 0)
✗ typecheck (npm run typecheck, 2 errors in src/api.ts:42, src/db.ts:88)
Soft checks — local (ACCEPTANCE.md):
✓ All list endpoints paginated
└─ Inspected 4 routes in app/api/, all use limit/offset
✗ Health check returns 200
└─ curl https://app.fly.dev/health → 503
- No secrets in repo (skipped: no scanner configured)
✓ UI discloses backend activity
└─ All 7 fetch sites bound to visible loading/error state
✓ ...
Deployed-env checks (deferred — run /bencium-deploy SMOKE to evaluate):
⏭ [deployed] Upload works at https://app.example.com
└─ awaiting post-deploy smoke
⏭ [deployed] No console errors on deployed page load
└─ awaiting post-deploy smoke
Result: 7 PASS, 2 FAIL, 1 SKIP, 2 DEFERRED-TO-SMOKE
Note: DEFERRED-TO-SMOKE is not a failure — it just means the row cannot be evaluated locally. The deploy command will walk these. The local pass count never includes deployed rows.
Close: \033[33m└──────────────────────────────────┘\033[0m
If any FAIL exists:
${CLAUDE_PLUGIN_ROOT}/templates/next-moves.md.tmpl, filling:
{{phase_progress_strip}} → 🗺️ ▸ 📋 ▸ 🔨 ▸ ✓ ▸ 🚀 ▸ 🔥 ▸ [💭] (reflect highlighted next){{verify_reason}} → N checks still failing — fix and re-run (or omit the verify block entirely){{top_roadmap_items}} → read from tasks.md ## Roadmap (first 3 items){{tail_status}} → 📝 Memory: unchanged (verify failed — no memory line until clean)/bencium-retro at the top of the rendered output.Append to .harness/memory.md under ## Verifications:
- YYYY-MM-DD HH:MM — /bencium-verify clean (N checks)
Render ${CLAUDE_PLUGIN_ROOT}/templates/next-moves.md.tmpl, filling:
{{phase_progress_strip}} → 🗺️ ▸ 📋 ▸ 🔨 ▸ ✓ ▸ [🚀] ▸ 🔥 ▸ 💭 (deploy highlighted next; smoke still pending){{verify_reason}} → local clean — /bencium-deploy is gated open. Deployed-env rows will be evaluated by SMOKE after deploy; the loop is not complete until they pass.{{top_roadmap_items}} → read from tasks.md ## Roadmap (first 3 items){{tail_status}} → 📝 Memory: +1 verification line appended to .harness/memory.mdPut /bencium-deploy at the top of the rendered output and tell the user the gate is open.
Whether the result was PASS or FAIL, print one explicit memory line so the user knows what landed in .harness/memory.md:
📝 Memory: +1 verification line appended (on full PASS)
or
📝 Memory: unchanged (on any FAIL)
Emit a fenced ```json block as the very last thing the command prints. Nothing after it — no closing banner, no extra prose, no trailing whitespace beyond the closing fence. This is how CI scripts, dashboards, and follow-up commands locate the result.
Schema:
{
"_marker": "bencium-verify-result",
"version": 1,
"ts": "<ISO8601 UTC>",
"phase": "test",
"mode": "serial" | "workflow",
"agents": <int>,
"result": "pass" | "fail" | "partial",
"hard_checks": [
{ "name": "<verify.cmd entry>", "status": "pass" | "fail", "evidence": "<one-line>", "exit_code": <int> }
],
"soft_checks_local": {
"pass": <int>,
"fail": <int>,
"skip": <int>,
"items": [
{ "text": "<ACCEPTANCE row text>", "status": "pass" | "fail" | "skip", "evidence": "<one-line>" }
]
},
"deferred_to_smoke": [
{ "text": "<row text>", "tag": "deployed" }
]
}
Rules for populating:
result is pass only if every hard check passes AND every local soft check is pass. Any fail → fail. All pass with any skip → partial. deferred_to_smoke entries do NOT count toward the result (they are evaluated by /bencium-deploy SMOKE).evidence strings come from the same prose report in Step 4 — one line each, no markdown.hard_checks is an empty array if .harness/config.yaml has no verify.cmd entries.deferred_to_smoke is an empty array if no [deployed]-tagged rows exist.mode / agents are optional, additive fields (schema stays version: 1). Set mode: "workflow" and agents to the count only when Step 3c ran; otherwise mode: "serial" and agents: 0. Consumers that predate these fields ignore them — the serial path is byte-for-byte the old behavior.[x] without actual evidence (file path, grep result, command output).verify.cmd, the backed check is FAIL regardless of the green result. Green is necessary, not sufficient — the test must still assert the real behavior.Task subagents. Workflow mode (Step 3c — Claude Code only, explicit opt-in) is a separate escalation and is not bound by this cap. It is additive: when the Workflow tool is absent or the user did not opt in, the serial path runs unchanged.[deployed]-tagged rows locally. They are SKIP with reason awaiting post-deploy smoke until /bencium-deploy walks them against deploy.url. Marking one [x] from local state is a false confirmation — the exact failure mode this gate was built to prevent.version: 1); future schema changes bump the integer.npx claudepluginhub bencium/bencium-harness --plugin bencium-harness/verifyRuns parallel verification agents across unit, integration, E2E, security, and type-checking dimensions. Produces graded scores, coverage deltas, and improvement suggestions.
/fire-double-checkRuns evidence-based verification on current work or a specified target, executing build, test, type, and lint checks before reporting results.
/verifyRuns on-demand verification — executes project tests, checks acceptance criteria from a file, validates phase success criteria from ROADMAP.md, or verifies inline criteria. Reports PASS/FAIL with evidence.
/verifyRuns a multi-phase verification gate (tests, lint, type-check, visual check) after code execution, producing a structured report and blocking shipping on failure.
/double-checkVerifies recent code changes via git status/diffs and runs ecosystem-specific quality gates (tests, lint, typecheck, build), reporting results in a table. Supports --deep multi-agent review.
/evaluateRuns 3-stage verification (mechanical gates, semantic AC compliance, judgment quality) against a seed spec to validate implementation before commit.