Summary
The agent-template now ships a hooks/ directory with lifecycle hook support (setup_complete, shutdown, pre/post_tool_use, pre/post_mcp_connect, mcp_auth_refresh). The fips-agents patch command doesn't know about this directory because .fips-template.yaml has no hooks category.
Scaffolded agents that run fips-agents patch won't receive the example hook files or new hook YAML bindings added to the template.
What needs to change
Add a hooks category to the agent-loop (and optionally workflow) .fips-template.yaml:
hooks:
description: Lifecycle hook examples and bindings
patterns:
- hooks/**/*
ask_before_patch: true
ask_before_patch: true is recommended since developers may have customized their hook scripts.
Files in the template's hooks/ directory
hooks/setup-memory.yaml — example hook binding (setup_complete event)
hooks/fetch-memory.sh — example hook script (MemoryHub memory loading)
Related
- fips-agents/agent-template
aa75998 — lifecycle hook system
- fips-agents/agent-template
d64c95b — pre/post_mcp_connect events
- fips-agents/agent-template
b64fc01 — mcp_auth_refresh event (#225)
- fips-agents/agent-template
85419aa — headers field on McpServerConfig (#224)
Additional context
agent.yaml is in AGENT_NEVER_PATCH (correctly — users customize it), so the new hooks: [] section and headers: documentation won't auto-merge. Users pick these up via fips-agents patch docs which updates CLAUDE.md, or by manually merging from the template's agent.yaml.
Summary
The agent-template now ships a
hooks/directory with lifecycle hook support (setup_complete, shutdown, pre/post_tool_use, pre/post_mcp_connect, mcp_auth_refresh). Thefips-agents patchcommand doesn't know about this directory because.fips-template.yamlhas nohookscategory.Scaffolded agents that run
fips-agents patchwon't receive the example hook files or new hook YAML bindings added to the template.What needs to change
Add a
hookscategory to the agent-loop (and optionally workflow).fips-template.yaml:ask_before_patch: trueis recommended since developers may have customized their hook scripts.Files in the template's hooks/ directory
hooks/setup-memory.yaml— example hook binding (setup_complete event)hooks/fetch-memory.sh— example hook script (MemoryHub memory loading)Related
aa75998— lifecycle hook systemd64c95b— pre/post_mcp_connect eventsb64fc01— mcp_auth_refresh event (#225)85419aa— headers field on McpServerConfig (#224)Additional context
agent.yamlis inAGENT_NEVER_PATCH(correctly — users customize it), so the newhooks: []section andheaders:documentation won't auto-merge. Users pick these up viafips-agents patch docswhich updates CLAUDE.md, or by manually merging from the template's agent.yaml.