glm-hammer

No need to type prompts โ€” the agent reads the intent itself and runs the whole course on its own:
a strong plan โ†’ a verified implementation loop โ†’ a security & QA review. A ZCode harness.

skills 3 critic agents 6 hooks 6 gate evidence-based GitHub โ†— ํ•œ๊ตญ์–ด

the journey

ยทTo find the hammer, you climb the mountain

No plan is born warm. Somewhere up on the ridge, in the only light for miles, a forge burns โ€” and every line of code glm-hammer ships is struck there, under the snow, with the receipt to prove it.

fig 01 ยท the climb to the smith a single light on the ridge โ€” every strike proven under the snow

00Philosophy โ€” don't trust; demand the receipt

An LLM agent's "done" is just a claim until it is verified. glm-hammer hands judgment to independent sub-agents, cross-checks that judgment against the evidence files (receipts) left on disk, and if a gate isn't met, hooks block the turn from ending at all. Instead of trusting the agent's diligence, the structure enforces it.

PRINCIPLE 1

Separation of roles

The main agent is only an orchestrator. The maker (worker), the one who judges the contract (validator), the one who hunts for cheating (critic), and the one who attacks the result (reviewer) are all separate sub-agents โ€” none of them can see each other's output.

PRINCIPLE 2

Evidence gate

Every judge writes its verification report directly to .glm-hammer/evidence/ and closes with EVIDENCE_RECORDED. If the state file's claim and the receipt disagree, the hook blocks the turn from ending.

PRINCIPLE 3

Binary Judge

Instead of an open-ended summary, the judge answers a fixed yes/no checklist. "If you didn't verify it, you may not say YES." The VERDICT is derived mechanically as the AND of the answers โ€” not a feeling.

01The full flow

There are only two places a human steps in โ€” when answering a question and when approving the plan. The loop handles the rest.

๐Ÿ’ฌ "build X properly" route-intent hook โ†’ intent routing ๐Ÿ”ฅ FORGE โ€” strong plan Deep recon Explore ร—2โ€“4 parallel Minimal questions only what recon couldn't answer Plan draft binary criteria + verification โš– critic panel ร—3 unanimous APPROVE required REJECT โ†’ revise, full panel re-review ๐Ÿ‘ค user approves plan (sole gate) ๐Ÿ”จ HAMMER โ€” implementation loop per task: worker โ†’ validator โ†’ implementation-critic (3-way check) E2E GATE verify cmd + full suite ๐Ÿ›ก security + QA review parallel, both PASS โœ“ complete FAIL โ†’ fix task, loop re-entry (stop-gate blocks exit) stop-gate: blocks exit until 3/3 approvals stop-gate: blocks exit until complete

02The three skills

Since the route-intent hook reads your prompt and routes on its own, you never need to memorize skill names. The rule: ambiguous or touching 4+ files โ†’ forge; small and clear โ†’ blueprint; plan already in hand โ†’ hammer.

skills/blueprint

๐Ÿ“ blueprint โ€” the plan

A lightweight plan for small, clear jobs (โ‰ค3 files). Same format as forge (binary acceptance criteria, verification strategy, symbol anchors) but a strict Self-Review replaces the critic panel. If it discovers hidden complexity, it promotes itself to forge.

skills/forge

๐Ÿ”ฅ forge โ€” the strong plan

Before asking a single question, it dispatches 2โ€“4 Explore sub-agents to recon the codebase. Anything recon can answer is never asked. After the draft, three critics verify against the real codebase โ€” a revision loop until all approve.

skills/hammer

๐Ÿ”จ hammer โ€” the implementation loop

Per task, a three-way check: worker โ†’ validator (information isolation) โ†’ implementation-critic (cheat detection). Once everything is done: the E2E gate โ†’ a parallel security/QA review. A FAIL becomes a fix task and loops back.

03FORGE in detail โ€” setting the plan on the anvil

Deep recon state: recon

It splits the work into four concerns โ€” structure / existing patterns / interface boundaries / verification infrastructure โ€” and dispatches parallel Explore sub-agents. Before asking the user anything, it exhausts everything the code itself can answer.

Minimal question round state: awaiting-user

Only the ambiguity recon couldn't resolve, cited against recon results, bundled into at most four independent questions in a single round. If no answers are needed, it asks nothing and moves on.

Actionable plan draft state: drafting

Saved to docs/glm-hammer/plans/. Every task is a Goal + dependencies + a list of symbol-anchor files + binary acceptance criteria with no room for interpretation + steps that hold real code. A placeholder counts as a plan failure.

The Anvil โ€” critic panel state: critique

Three critics attack the plan in parallel: feasibility (can it be built as written?), integration (will it assemble and run?), coverage (does it cover every requirement?). Each leaves a receipt; a single REJECT means a revision โ†’ full panel re-review. The instant the plan file is edited, the plan-gate hook resets approvals to zero, so re-review is enforced, not optional. Past 3 rounds, it escalates to the user.

Present & hand off state: awaiting-user โ†’ approved

It presents the plan with a summary and asks exactly one thing: "Shall we proceed with hammer?" โ€” on approval, hammer picks it up immediately.

04HAMMER in detail โ€” striking until it passes

Task cycle: worker โ†’ validator โ†’ critic

The worker implements per the plan (a step that clashes with reality is minimally adapted, then reported). The validator, having never seen the worker's output, judges each acceptance criterion from the plan text alone as an isolated yes/no. On pass, the implementation-critic hunts what the validator couldn't see โ€” stubs, test-shaped hardcoding, swallowed errors, tests that verify nothing.

Failure triage โ€” best-of-three

A failure is triaged first: a worker defect means a rework carrying all accumulated feedback; a plan defect means editing the plan file itself (an Amendment Log is recorded; loosening a criterion is forbidden as reward hacking). After three failures on one task, it escalates to the user.

E2E gate

Once all tasks are done, it runs the plan's verification-strategy command plus the full test suite. The raw output is saved to evidence/e2e.md โ€” without this receipt, the stop-gate will not let it pass.

Review panel: security + QA

Two reviewers attack the changed code in parallel โ€” security goes after injection / auth / secret keys / exposure, QA goes after real behavior / edge cases / regressions / test adequacy, each on its own binary checklist. A blocking finding becomes a fix task that must re-run the entire task cycle, and after the fix both the E2E gate and the review panel are re-run in full.

Why isn't the worker's output shown to the validator? โ€” To stop the judge from anchoring onto the maker's own framing. The validator prompt uses only a fixed template that copies the plan text verbatim; the main agent's summaries and paraphrases are forbidden.

05Hooks โ€” the devices that enforce the gates physically

Once a skill writes state to .glm-hammer/state.json, a hook cross-checks that state against the evidence on disk and enforces the gate. Verified configuration against the ZCode-installed engine.

HookEventRole
session-startSessionStartOn finding an unfinished run, injects a resume briefing โ€” automatic return after a restart or compaction, with no "continue" needed.
route-intentUserPromptSubmitIf it's a work request, injects a forge/blueprint/hammer routing directive; if work is in progress, reminds of the current state.
plan-gatePostToolUseDuring forge, detects a plan-file edit โ†’ resets critic approvals to zero, forcing a full panel re-review.
comment-checkerPostToolUseDetects AI-slop comments: elision markers ("... existing code ..."), change narration, placeholders โ€” orders an immediate fix in the same turn.
edit-diagnosticsPostToolUseLSP-lite: an instant syntax check on edited files (JS/JSON/Python) โ€” catches a broken file right at the edit, not at the E2E gate.
stop-gateStopCross-checks the state's claims against the evidence receipts โ€” if a gate isn't met, it blocks the turn from ending, and hardens its directive tone with each repeat.

Evidence gates

A completion claim in state.json is not trusted. A receipt left on disk by the judge itself is what opens the gate.

.glm-hammer/evidence/
โ”œโ”€โ”€ critics/round-<N>/<critic>.md   # VERDICT: APPROVE ร—3 required
โ”œโ”€โ”€ tasks/task-<i>/validator.md     # VERDICT: PASS
โ”œโ”€โ”€ tasks/task-<i>/critic.md        # VERDICT: APPROVE
โ”œโ”€โ”€ e2e.md                          # E2E gate raw output
โ””โ”€โ”€ reviews/{security,qa}.md        # VERDICT: PASS
"It claims approval but there's no receipt โ†’ that approval never happened. A completion claim without a receipt is blocked."

Escape hatches are designed in too: a legitimate user escalation (awaiting-user), a concession after 6 blocks, and an unblock when context pressure is detected. The evidence-gate and session-recovery patterns are borrowed from lazycodex (OmO).

06Binary Judge โ€” no summaries, only yes/no

Reflecting the observation that an LLM judge is more reliable on binary questions than on open summaries, all six judges rule on fixed checklists.

example: implementation-critic
CHECKS:
- C1: YES โ€” real implementation exists in every function
- C2: NO  โ€” parse() has a branch tuned to the test
         input only (utils.js:42)
- C3: YES โ€” every new test can fail
- C4: YES / C5: YES / C6: YES
VERDICT: REJECT   โ† automatic if any NO
FINDINGS:
- [REJECT-level] criteria-shaped
  hardcoding at utils.js:parse ...
the rules

Answer each question only YES / NO / N-A, and attach a one-line basis (what you verified).

YES Only when verified directly with a tool. If you didn't verify it, you may not answer YES โ€” verify it, or answer NO.

NO Must come with a matching finding (file ยท symbol ยท evidence).

VERDICT = the AND of all answers. No partial credit, no "almost there," no conditional pass. The verdict is computed, not felt.

07Install

Requirement: Node.js 18+ (to run the hook scripts; must be on your PATH).

ZCode

Settings โ†’ Plugin Management โ†’ add a custom marketplace โ†’ register the GitHub repo tmdgusya/glm-hammer (or your local clone path if you're developing) as a source โ†’ install glm-hammer. After install, check the plugin detail to confirm all 6 hooks show as runnable.

Claude Code

claude plugin marketplace add tmdgusya/glm-hammer
claude plugin install glm-hammer@glm-hammer

After install, just talk to it the way you normally would โ€” a single line like "build the checkout module properly" is enough for the router to fire forge, and after one plan approval you won't need to touch anything until the completion report.