From glm-hammer
Forces deep codebase recon and multi-critic approval before presenting any non-trivial plan. Use for ambiguous, multi-file, or high-stakes changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/glm-hammer:forgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Forges a plan the way steel is forged: heat it with recon, shape it into a draft, then hammer it on the anvil of a critic panel until it holds. A plan leaves the forge only when **at least 3 independent critic subagents unanimously confirm it is actually implementable** against the real codebase.
Forges a plan the way steel is forged: heat it with recon, shape it into a draft, then hammer it on the anvil of a critic panel until it holds. A plan leaves the forge only when at least 3 independent critic subagents unanimously confirm it is actually implementable against the real codebase.
Exploration precedes questions; critics precede presentation. The user should never be asked something the codebase can answer, and never be shown a plan that has not survived adversarial review.
feasibility-critic, integration-critic, coverage-critic) in parallel. All must return APPROVE. The Stop hook blocks turn completion while approvals are missing.runId, generation, role, evidencePath, planSha256, forgeRound, and dispatchId in the approved tool input and prompt. Each critic writes its receipt under .glm-hammer/evidence/critics/round-<N>/<critic-name>.md, ends with EVIDENCE_RECORDED: <path>, and uses this exact ordered header before CHECKS::
RECEIPT_VERSION: 1, RUN_ID: <uuid>, ROLE: <critic-name>, EVIDENCE_PATH: <path>, PLAN_SHA256: <64 lowercase hex>, GENERATION: <canonical nonnegative decimal>, FORGE_ROUND: <positive integer>, DISPATCH_ID: <uuid>.
The Stop hook accepts only a matching journaled CORE_DISPATCH_COMPLETED; a projection claim or self-written receipt earns no credit..glm-hammer/state.json is a disposable projection only. Request legal phase transitions through the registered core hook flow; never edit the projection to manufacture approval, awaiting-user, or completion.The certified journal is the authority for run ID, generation, legal transitions, critic dispatch completion, question proof, and terminal state. Keep .glm-hammer/state.json only as the hook-maintained projection shown below; direct edits do not confer credit:
{
"phase": "forge",
"status": "recon | drafting | critique | awaiting-user | approved",
"plan": "docs/glm-hammer/plans/YYYY-MM-DD-<feature>.md",
"critics": {
"required": 3,
"approved": 0,
"round": 1,
"verdicts": [
{ "critic": "feasibility-critic", "verdict": "APPROVE|REJECT", "round": 1 }
]
},
"stopBlocks": 0
}
Rules:
Request the legal awaiting-user transition only when a user answer is genuinely required and the structural question proof exists. Do not write the projection to create it.
Request approval only after all required current-generation CORE_DISPATCH_COMPLETED events and matching APPROVE receipts exist. The journal computes the projected approval; never write it yourself.
Add .glm-hammer/ to .gitignore if the project has one and it is not already listed.
A question round may pause only after the approved structural question observer records proof. Raw transcript markers never release forge. With current unconsumed proof, the exact whole trimmed request glm-hammer override-unverified RUNID GENERATION may atomically end that run as UNVERIFIED, never PASS. Without structural proof or approved runtime identity there is no override; remain fail-closed.
Dispatch 2-4 Explore subagents in parallel, sliced by concern, e.g.:
Prompt template per subagent:
subagent_type: Explore
prompt: |
The user requested: [summarized request].
Investigate [concern slice] and report:
1. Related files and each one's role
2. Existing patterns to follow or conflict with
3. Boundaries/dependencies this work will touch
4. Recent related changes; existing test coverage and exact test commands
Report key findings concisely. Do not dump file contents.
After recon returns, list remaining ambiguities. For each, first check: can recon answer this? If yes, answer it yourself. Bundle the survivors (max 4, independent only) into ONE AskUserQuestion round, each grounded in findings ("recon shows X in services/y.ts — follow or replace?"). If nothing survives, ask nothing and proceed. Prefer proposing a defensible default over asking. A pause is valid only after the capability-selected observer records approved structural question proof; raw prompt/transcript text is not proof.
Write the plan to docs/glm-hammer/plans/YYYY-MM-DD-<feature>.md. The plan must be executable by a worker with zero context:
Header: Goal (one sentence), Architecture (2-3 sentences), Tech Stack, Work Scope (in/out), and a Verification Strategy (level: e2e | integration | test-suite | build-only, exact command, what passing proves — discovered in recon; if none exists, Task 1 creates minimal verification).
Declared paths: every path appears in a task's Files list. At seal time, the hook records the complete normalized path map as ABSENT, FILE, or SYMLINK. Do not add generated flags, self-hashes, directories, special files, duplicate-normalized paths, or out-of-root paths.
Tasks use this strict grammar:
### Task N: [Name]
**Goal:** [one sentence — copied verbatim into validator prompts later]
**Dependencies:** None
**Files:**
- Create: `path/to/new-file`
- Modify: `path/to/existing-file`
- Test: `path/to/test-file`
**Acceptance Criteria:**
- [ ] [binary-decidable outcome]
**Step 1:** [one concrete action with actual code/command and expected output]
Tasks are contiguous from 1. Dependencies are exactly None or comma-space-separated, strictly ascending unique lower Task N references; every repeated writer and consumer of an earlier creation has a transitive dependency. File entries are exactly - Create: \path`, - Modify: `path`, or - Test: `path`with one repository-relative path. Acceptance items are column-one unchecked checkboxes, and steps are contiguous exactStep N:` markers. Create/Modify/Test legality is evaluated against the sealed generation baseline plus virtual task order, never the later live workspace. Every task has at least one criterion; criteria are decidable outcomes, not implementation choices. The last task is Final Verification and runs the Verification Strategy plus the full suite.
Dispatch the three critics in parallel, each as a subagent via the Agent tool:
| Agent | Lens |
|---|---|
feasibility-critic | Can each task actually be implemented as written against the real codebase? |
integration-critic | Dependencies, interface contracts, parallel-task file conflicts, shared state |
coverage-critic | Spec coverage, criteria decidability, placeholder scan, verification completeness |
For each critic, first preallocate the dispatch ID. The approved tool input and prompt receive ONLY the plan path, original request verbatim, evidence path, and the exact metadata tuple runId, generation, role, evidencePath, planSha256, forgeRound: <N>, dispatchId. Not your reasoning or recon summaries. All tuple values must describe the same sealed generation.
Each critic answers its fixed checklist, writes the ordered metadata-v1 header followed by its full CHECKS: report, and ends with EVIDENCE_RECORDED: <path>. Before projecting a verdict, confirm that the receipt and journaled CORE_DISPATCH_COMPLETED match byte-for-byte provenance, timing, stat, and hash requirements. A missing dispatch, late allocation, stale generation, mismatched role/path/hash, or self-written receipt has not approved anything.
If the runtime does not expose named critic types, a general-purpose subagent may use the corresponding agents/<name>.md body, but it still receives the same preallocated approved input and metadata-v1 contract. Unsupported Agent observation or unapproved runtime identity is fail-closed; it never enables a legacy/degraded forge PASS.
## Critic Responses section, not ignored.Present a compact summary (goal, task count, verification strategy, critic rounds survived) with the plan path. Ask one question: proceed with hammer now?
hammer skill immediately. Do not wait for further instructions.| Anti-Pattern | Why It Fails |
|---|---|
| Asking the user before recon returns | Generic questions the code could answer; burns user trust |
| Presenting the plan before the panel passes | The whole point of forge; also the Stop hook will block you |
| Re-running only the rejecting critic after a revision | A revision can break what another critic approved; full panel or nothing |
| Softening a criterion so a critic approves | Reward hacking — critics verify implementability, not agreeableness |
Writing status: approved to state without real verdicts | Falsified state; hooks exist because this is tempting |
| Treating critic REJECT as noise ("plan is fine") | If 1 of 3 independent reviewers can't see how to implement it, a worker won't either |
npx claudepluginhub tmdgusya/glm-hammer --plugin glm-hammerRuns multi-stage planning pipeline with verification gates and persistent Ralph state for complex tasks spanning 3+ files or unclear scope.
Orchestrates complex multi-step tasks with automatic retry, memory, and validation. Useful for breaking down large objectives into verified modules.
Executes a plan via worker-validator-critic loop, then runs security/QA review gates. Use when a plan exists and implementation should run.