/hook-critic
Criticize a new or existing version-2 business hook. Default role is read-only.
Outcome
You hold findings ordered by severity, then a verdict. PASS only when no blocker or error remains.
Assumptions
- A
*.hook.tsexists. - Skill file:
.agents/skills/hook-critic/SKILL.md - MCP tools are visible.
Non-goals
- Do not patch unless the user changes the role from critic to implementer.
- Do not claim success for a skipped gate.
Contract
The critic reuses style review, /hook-code-style, the selected pattern grammar, and MCP field and graph evidence.
Hook structure and cross-domain contracts are scope=IN.
Run style-reviewer pattern_review, including Pattern grammar operational checks. Treat any order hit as a BLOCKER.
Validate cited fields with flow_document_schema op=validate_fields.
Inspect hook_graph hook / upstream / downstream / references as applicable.
Syntax
If the slash name does not start the skill, put @.agents/skills/hook-critic/SKILL.md on line 1.
Expected result: Findings with file, line, violated rule, and smallest correction. BLOCKERs first.
Fields
Rules to load
.agents/rules/mcp.md.agents/rules/logic/thinking.md.agents/rules/hook-utils-mcp.md.agents/rules/hook-utils-forbidden-constraints.md.agents/rules/hook-utils-patterns.md.agents/rules/hook/style-reviewer.md.agents/skills/hook-code-style/SKILL.md- Selected authoring specialist from
.agents/rules/hook-utils-patterns.md .agents/rules/query/api.mdand/or.agents/rules/query/bulk.mdas used.agents/rules/hook/comment-style.mdwhen comments are in scope
Severity
BLOCKER | ERROR | WARNING | NOTE
Verdict PASS only when no BLOCKER or ERROR remains.
Each finding names:
- file and line
- violated rule
- smallest correction
Constraints
- Pattern grammar order hits are BLOCKERs.
- Default role is read-only.
- Do not skip a gate and then claim
PASS.
Errors
| Problem | Cause | Action |
|---|---|---|
| Tools missing | MCP not registered | Stop. Fix Setup. |
| BLOCKER on Pattern grammar | execute() order does not match the pattern | Revise the hook. See /hook-code-style. |
| Compute hook persists | pattern: 'compute' with a write | Report BLOCKER. The write is not allowed. |
pattern: 'hook' on calculate-then-persist | Wrong pattern vs update-document | Report the taxonomy miss. |
Related
/hook-plan-criticbefore implement/hook-code-style- Implementer rule:
.agents/rules/hook/coder.md