/hook-critic
criticizes a version-2 business hook
The default role is read-only. It does not patch unless you change the role to implementer.
Ground a hook file
<ground> holds a *.hook.ts path. A seen hook file is the operand.
Skill path
If the slash name does not start the skill, put the skill file on line 1.
Examples
Thought1s
Default role is read-only. Do not patch.
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.
Worked for 1m 20s
Findings with file, line, violated rule, and smallest correction. BLOCKERs first.
Then a verdict. PASS only when no BLOCKER or ERROR remains.
process-bank-import.payment-log.hook.ts
Source: live MCP `flow_document_schema` and `hook_graph`. Default role: read-only.
Each finding names file, line, violated rule, and the smallest correction.
Hook structure and cross-domain contracts are scope=IN.
The critic reuses style review, /hook-code-style, the selected pattern grammar, and MCP field and graph evidence.
Do not skip a gate and then claim PASS.
Read the verdict
Severity order: BLOCKER | ERROR | WARNING | NOTE.
Verdict PASS only when no BLOCKER or ERROR remains.
Pattern grammar order hits are BLOCKERs.
If MCP tools are missing, stop. Fix Setup.
| 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. |
Next steps
Look up version-2 shape on /hook-code-style.