Create a hook (.json) to enforce policy or automate agent lifecycle events.
Guide the user to create a hook in .github/hooks/.
First, review the conversation history. If the user has been expressing concerns about agent behavior (e.g., "don't run this command", "always check before doing X", "inject this context"), generalize that into a hook. Extract:
If no clear policy need emerges from the conversation, clarify:
Remember to follow the agent-customization guidelines to create highly effective hooks.