rulesync icon indicating copy to clipboard operation
rulesync copied to clipboard

Support latest Claude Code hook events

Open saitota opened this issue 6 months ago • 0 comments

Claude Code hooks document events that are not in the current Rulesync Claude Code hook map.

  • Docs: https://code.claude.com/docs/en/hooks#hook-events
  • Current events: https://github.com/dyoshikawa/rulesync/blob/main/src/types/hooks.ts#L101-L114

Events to add include UserPromptExpansion, PostToolUseFailure, PostToolBatch, PermissionDenied, SubagentStart, TaskCreated, TaskCompleted, StopFailure, TeammateIdle, InstructionsLoaded, ConfigChange, CwdChanged, FileChanged, PostCompact, Elicitation, and ElicitationResult.

Expected behavior:

  • rulesync generate -t claudecode -f hooks should support these Claude Code hook events.
  • Add the Claude Code event name mappings where needed.

[!NOTE] This issue is scoped to hook events only. Handler types and handler fields such as http, mcp_tool, agent, if, args, url, headers, allowedEnvVars, async, and shell are documented separately in https://code.claude.com/docs/en/hooks#hook-handler-fields and likely need schema/design discussion before Rulesync supports them.

saitota avatar May 12 '26 06:05 saitota