Overview
Create docs/HOOKS_STANDARDS.md — event-driven hooks for agents, skills, and automation with idempotency and error resilience patterns.
Research & Content Creation
Planning Reference:
Research Prompt:
Document hooks standards. Create:
- Hook concept — Event-driven automation and handlers
- Hook types:
- Startup/shutdown (initialization & cleanup)
- Before-run/after-run (pre/post execution)
- On-error (error handling)
- On-success (success logging)
- Custom hooks
- Folder structure —
hooks/{name}.js or hooks/{category}/{name}.js
- Hook implementation:
- Function signature & context
- Return values
- Error handling (throw vs. warn vs. ignore)
- Idempotency (safe to run multiple times)
- Hook registration — Agent config, workflows, plugins
- Best practices:
- Idempotent design
- Error resilience
- Performance (avoid long operations)
- Logging & observability
- Testing hooks
- Real examples — From repo (branch-validation, template-enforcement)
- Anti-patterns — What NOT to do
Mermaid diagrams (2-3 required):
- Hook lifecycle: event trigger → hook execution → result
- Hook types & their triggers
Definition of Ready
Definition of Done
File: docs/HOOKS_STANDARDS.md
Epic: #1261 | PR: #1251
Overview
Create
docs/HOOKS_STANDARDS.md— event-driven hooks for agents, skills, and automation with idempotency and error resilience patterns.Research & Content Creation
Planning Reference:
Research Prompt:
Document hooks standards. Create:
hooks/{name}.jsorhooks/{category}/{name}.jsMermaid diagrams (2-3 required):
Definition of Ready
Definition of Done
docs/HOOKS_STANDARDS.mdcreatedFile:
docs/HOOKS_STANDARDS.mdEpic: #1261 | PR: #1251