rulesync 6.2.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +58 -21
  2. package/dist/index.cjs +1683 -842
  3. package/dist/index.js +1650 -809
  4. package/package.json +17 -17
package/README.md CHANGED
@@ -130,27 +130,27 @@ npx rulesync generate --targets "*" --features "*"
130
130
 
131
131
  Rulesync supports both **generation** and **import** for All of the major AI coding tools:
132
132
 
133
- | Tool | rules | ignore | mcp | commands | subagents | skills |
134
- | ------------------ | :---: | :----: | :------: | :------: | :-------: | :----: |
135
- | AGENTS.md | ✅ | | | 🎮 | 🎮 | 🎮 |
136
- | Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 📦 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
137
- | Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 | ✅ 🌏 |
138
- | Gemini CLI | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | 🎮 |
139
- | GitHub Copilot | ✅ | | ✅ | ✅ | ✅ | ✅ |
140
- | Cursor | ✅ | ✅ | ✅ | ✅ 🌏 | | ✅ |
141
- | OpenCode | ✅ | | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
142
- | Cline | ✅ | ✅ | ✅ | ✅ 🌏 | | |
143
- | Kilo Code | ✅ 🌏 | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 |
144
- | Roo Code | ✅ | ✅ | ✅ | ✅ | 🎮 | ✅ 🌏 |
145
- | Qwen Code | ✅ | ✅ | | | | |
146
- | Kiro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
147
- | Google Antigravity | ✅ | | | ✅ | | ✅ 🌏 |
148
- | JetBrains Junie | ✅ | ✅ | ✅ | | | |
149
- | AugmentCode | ✅ | ✅ | | | | |
150
- | Windsurf | ✅ | ✅ | | | | |
151
- | Warp | ✅ | | | | | |
152
- | Replit | ✅ | | | | | |
153
- | Zed | | ✅ | | | | |
133
+ | Tool | rules | ignore | mcp | commands | subagents | skills | hooks |
134
+ | ------------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: |
135
+ | AGENTS.md | ✅ | | | 🎮 | 🎮 | 🎮 | |
136
+ | Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 📦 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
137
+ | Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 | ✅ 🌏 | |
138
+ | Gemini CLI | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | 🎮 | |
139
+ | GitHub Copilot | ✅ | | ✅ | ✅ | ✅ | ✅ | |
140
+ | Cursor | ✅ | ✅ | ✅ | ✅ 🌏 | 🌏 | 🌏 | ✅ |
141
+ | OpenCode | ✅ | | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | |
142
+ | Cline | ✅ | ✅ | ✅ | ✅ 🌏 | | | |
143
+ | Kilo Code | ✅ 🌏 | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | |
144
+ | Roo Code | ✅ | ✅ | ✅ | ✅ | 🎮 | ✅ 🌏 | |
145
+ | Qwen Code | ✅ | ✅ | | | | | |
146
+ | Kiro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
147
+ | Google Antigravity | ✅ | | | ✅ | | ✅ 🌏 | |
148
+ | JetBrains Junie | ✅ | ✅ | ✅ | | | | |
149
+ | AugmentCode | ✅ | ✅ | | | | | |
150
+ | Windsurf | ✅ | ✅ | | | | | |
151
+ | Warp | ✅ | | | | | | |
152
+ | Replit | ✅ | | | | || |
153
+ | Zed | | ✅ | | | | | |
154
154
 
155
155
  - ✅: Supports project mode
156
156
  - 🌏: Supports global mode
@@ -361,6 +361,43 @@ This is Rulesync, a Node.js CLI tool that automatically generates configuration
361
361
  ...
362
362
  ```
363
363
 
364
+ ### `.rulesync/hooks.json`
365
+
366
+ Hooks run scripts at lifecycle events (e.g. session start, before tool use). Events use **canonical camelCase** in this file; Cursor uses them as-is; Claude Code gets PascalCase in `.claude/settings.json`.
367
+
368
+ **Event support:**
369
+
370
+ - **Shared (Cursor and Claude):** `sessionStart`, `sessionEnd`, `preToolUse`, `postToolUse`, `beforeSubmitPrompt`, `stop`, `subagentStop`, `preCompact`
371
+ - **Cursor-only:** `postToolUseFailure`, `subagentStart`, `beforeShellExecution`, `afterShellExecution`, `beforeMCPExecution`, `afterMCPExecution`, `beforeReadFile`, `afterFileEdit`, `afterAgentResponse`, `afterAgentThought`, `beforeTabFileRead`, `afterTabFileEdit`
372
+ - **Claude-only:** `permissionRequest`, `notification`, `setup`
373
+
374
+ Use optional **override keys** so tool-specific events and config live in one file without leaking to the other: `cursor.hooks` for Cursor-only events, `claudecode.hooks` for Claude-only. Events in shared `hooks` that a tool does not support are skipped for that tool (and a warning is logged at generate time).
375
+
376
+ Example:
377
+
378
+ ```json
379
+ {
380
+ "version": 1,
381
+ "hooks": {
382
+ "sessionStart": [{ "type": "command", "command": ".rulesync/hooks/session-start.sh" }],
383
+ "postToolUse": [{ "matcher": "Write|Edit", "command": ".rulesync/hooks/format.sh" }],
384
+ "stop": [{ "command": ".rulesync/hooks/audit.sh" }]
385
+ },
386
+ "cursor": {
387
+ "hooks": {
388
+ "afterFileEdit": [{ "command": ".cursor/hooks/format.sh" }]
389
+ }
390
+ },
391
+ "claudecode": {
392
+ "hooks": {
393
+ "notification": [
394
+ { "matcher": "permission_prompt", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify.sh" }
395
+ ]
396
+ }
397
+ }
398
+ }
399
+ ```
400
+
364
401
  ### `rulesync/commands/*.md`
365
402
 
366
403
  Example: