Skip to content

docs: add hooks example to Pattern 3 (Workflow Orchestrator) #153

@philoserf

Description

@philoserf

Problem

In design-patterns.md, Pattern 3 (Workflow Orchestrator) describes agents that coordinate multi-step processes, but doesn't show how hooks can enhance this pattern:

# Current example lacks hooks
name: release-coordinator
description: Coordinates the release process

Workflow orchestrators are prime candidates for hooks (logging steps, validating transitions, notifying on completion).

Solution

Expand the Pattern 3 example to include hooks:

name: release-coordinator
description: Coordinates the release process across multiple stages
model: sonnet

hooks:
  - event: "AgentStart"
    command: "./scripts/log-release-start.sh"
    description: "Log release process initiation"
  
  - event: "Bash"
    matcher:
      command: "git tag *"
    command: "./scripts/validate-tag-format.sh"
    description: "Ensure tags follow semver"
  
  - event: "AgentStop"
    command: "./scripts/notify-release-complete.sh"
    description: "Send completion notification"

focus_areas:
  - Version bumping
  - Changelog generation
  - Tag creation
  - Deployment coordination

Add a note explaining:

**Hooks in Orchestrators:** Workflow orchestrators benefit from hooks for:
- Audit logging at each stage
- Validation gates before critical operations
- Notifications on completion or failure
- Metrics collection for process optimization

Files to Update

  • skills/agent-authoring/design-patterns.md

Impact

  • Priority: Medium
  • Effort: Medium
  • User Impact: Shows hooks in a real-world architectural context

Review context: commit f2fe29b (agent hooks documentation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions