Skip to content

Conversation

@philoserf
Copy link
Owner

Document the new agent hooks feature that allows hooks to be defined in agent YAML frontmatter for lifecycle events scoped to that agent.

Changes:

  • Add hooks field to frontmatter-requirements.md subagent spec
  • Add Agent-Level Hooks section to hook-events.md reference
  • Add Agent Hooks section to agent-authoring skill
  • Add hooks examples to design-patterns.md templates
  • Add hooks validation to agent-audit checklist and workflow
  • Add Hooks Security Considerations to tool-restrictions.md
  • Update markdown.md rule (paths frontmatter, markdownlint command)
  • Various format improvements to rules and map-codebase templates

Document the new agent hooks feature that allows hooks to be defined
in agent YAML frontmatter for lifecycle events scoped to that agent.

Changes:
- Add hooks field to frontmatter-requirements.md subagent spec
- Add Agent-Level Hooks section to hook-events.md reference
- Add Agent Hooks section to agent-authoring skill
- Add hooks examples to design-patterns.md templates
- Add hooks validation to agent-audit checklist and workflow
- Add Hooks Security Considerations to tool-restrictions.md
- Update markdown.md rule (paths frontmatter, markdownlint command)
- Various format improvements to rules and map-codebase templates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request documents the new agent hooks feature that enables lifecycle hooks to be defined in agent YAML frontmatter, scoped to specific agents. The PR adds comprehensive documentation across authoring guides, reference materials, and audit workflows, along with minor formatting improvements to existing templates and rules.

Changes:

  • Added agent hooks specification to frontmatter requirements and reference documentation
  • Integrated hooks guidance into agent authoring and audit skills with security considerations
  • Added hooks examples to agent design patterns
  • Minor formatting improvements across map-codebase templates, command-audit index, and rules files

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
references/frontmatter-requirements.md Added hooks field specification to subagent frontmatter
references/hook-events.md Added Agent-Level Hooks section documenting supported events and configuration
skills/agent-authoring/SKILL.md Added Agent Hooks section explaining when and how to use hooks
skills/agent-authoring/design-patterns.md Added optional hooks examples for validation and auto-formatting patterns
skills/agent-audit/SKILL.md Added hooks validation checklist and workflow step
skills/agent-audit/tool-restrictions.md Added Hooks Security Considerations section with security checklist and examples
rules/markdown.md Updated markdownlint command from markdownlint-cli2 to markdownlint
rules/typescript.md Minor formatting change to test file pattern
rules/python.md Added blank lines around code block for formatting
skills/map-codebase/templates/*.md Added blank lines before "What does NOT belong" sections
skills/map-codebase/SKILL.md Added blank lines in Reference Files section
skills/command-audit/INDEX.md Realigned table columns for better formatting
skills/hook-audit/comparison-with-official.md Aligned table spacing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Use `bunx` for external tools, `bun run` for scripts, `bun install` for dependencies—never npm/yarn
- Target Bun as the runtime; use Bun's native APIs where applicable (file I/O, testing, bundling)
- Use Bun's native test runner with `bun test` for all test files (_.test.ts, _.spec.ts)
- Use Bun's native test runner with `bun test` for all test files (_.test.ts,_.spec.ts)
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in test file pattern. Should be (*.test.ts, *.spec.ts) with a space after the comma for consistency.

Suggested change
- Use Bun's native test runner with `bun test` for all test files (_.test.ts,_.spec.ts)
- Use Bun's native test runner with `bun test` for all test files (_.test.ts, *.spec.ts)

Copilot uses AI. Check for mistakes.
@philoserf philoserf merged commit 4f96811 into main Jan 22, 2026
8 checks passed
@philoserf philoserf deleted the docs/agent-hooks-documentation branch January 22, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants