@delorenj/claude-notifications 2.0.0 → 2.1.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 (206) hide show
  1. package/DO.md +5 -0
  2. package/FIXES-APPLIED.md +195 -0
  3. package/INTEGRATION.md +445 -0
  4. package/LAYOUT-INTEGRATION.md +191 -0
  5. package/QUICK-REFERENCE.md +195 -0
  6. package/README.md +145 -14
  7. package/TASK.md +15 -0
  8. package/ZELLIJ-NOTIFY.md +523 -0
  9. package/_bmad-output/implementation-artifacts/spec-install-multi-cli-hooks.md +241 -0
  10. package/bin/claude-notifications.js +417 -312
  11. package/bin/claude-notify.js +47 -1
  12. package/bin/zellij-notify.js +346 -0
  13. package/bun.lock +35 -0
  14. package/diagnose-zellij.sh +105 -0
  15. package/examples/settings-with-zellij.json +18 -0
  16. package/examples/settings-zellij-only.json +18 -0
  17. package/examples/zellij-notify-examples.sh +143 -0
  18. package/lib/adapters/_stub.js +35 -0
  19. package/lib/adapters/auggie.js +10 -0
  20. package/lib/adapters/claude-code.js +181 -0
  21. package/lib/adapters/codex.js +10 -0
  22. package/lib/adapters/copilot.js +10 -0
  23. package/lib/adapters/gemini.js +10 -0
  24. package/lib/adapters/index.js +240 -0
  25. package/lib/adapters/kimi.js +10 -0
  26. package/lib/adapters/opencode.js +14 -0
  27. package/lib/adapters/vibe.js +10 -0
  28. package/lib/config.js +44 -8
  29. package/lib/tui.js +115 -0
  30. package/lib/zellij.js +248 -0
  31. package/package.json +6 -4
  32. package/postinstall.js +28 -25
  33. package/preuninstall.js +18 -9
  34. package/test/adapters/claude-code.test.js +144 -0
  35. package/test/adapters/patches.test.js +81 -0
  36. package/test/adapters/registry.test.js +89 -0
  37. package/test/adapters/stubs.test.js +46 -0
  38. package/test/cli-json.test.js +79 -0
  39. package/test/helpers/fake-fs.js +59 -0
  40. package/test-integration.sh +113 -0
  41. package/test-notification-plugin.kdl +34 -0
  42. package/test-updated-layout.sh +75 -0
  43. package/test-zellij-cli.sh +72 -0
  44. package/zellij-plugin/.cargo/config.toml +5 -0
  45. package/zellij-plugin/.github/workflows/ci.yml +97 -0
  46. package/zellij-plugin/Cargo.lock +3558 -0
  47. package/zellij-plugin/Cargo.toml +40 -0
  48. package/zellij-plugin/README.md +290 -0
  49. package/zellij-plugin/build.sh +179 -0
  50. package/zellij-plugin/configs/examples/accessibility.kdl +31 -0
  51. package/zellij-plugin/configs/examples/catppuccin.kdl +32 -0
  52. package/zellij-plugin/configs/examples/default.kdl +34 -0
  53. package/zellij-plugin/configs/examples/minimal.kdl +22 -0
  54. package/zellij-plugin/docs/CONFIGURATION.md +191 -0
  55. package/zellij-plugin/docs/INTEGRATION.md +333 -0
  56. package/zellij-plugin/src/animation.rs +451 -0
  57. package/zellij-plugin/src/colors.rs +407 -0
  58. package/zellij-plugin/src/config.rs +664 -0
  59. package/zellij-plugin/src/event_bridge.rs +339 -0
  60. package/zellij-plugin/src/main.rs +420 -0
  61. package/zellij-plugin/src/notification.rs +466 -0
  62. package/zellij-plugin/src/queue.rs +399 -0
  63. package/zellij-plugin/src/renderer.rs +477 -0
  64. package/zellij-plugin/src/state.rs +338 -0
  65. package/zellij-plugin/src/tests.rs +413 -0
  66. package/.claude/checkpoints/1756392335.json +0 -1
  67. package/.claude/checkpoints/1756392341.json +0 -1
  68. package/.claude/checkpoints/1756392347.json +0 -1
  69. package/.claude/checkpoints/1756392376.json +0 -1
  70. package/.claude/checkpoints/1756392377.json +0 -1
  71. package/.claude/checkpoints/1756392386.json +0 -1
  72. package/.claude/checkpoints/1756392387.json +0 -1
  73. package/.claude/checkpoints/1756392398.json +0 -1
  74. package/.claude/checkpoints/1756392400.json +0 -1
  75. package/.claude/checkpoints/1756392427.json +0 -1
  76. package/.claude/checkpoints/1756392428.json +0 -1
  77. package/.claude/checkpoints/1756392486.json +0 -1
  78. package/.claude/checkpoints/1756392488.json +0 -1
  79. package/.claude/checkpoints/1756392558.json +0 -1
  80. package/.claude/checkpoints/1756392559.json +0 -1
  81. package/.claude/checkpoints/summary-session-20250828-105040.md +0 -57
  82. package/.claude/checkpoints/task-1756392207.json +0 -1
  83. package/.claude/checkpoints/task-1756392742.json +0 -1
  84. package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
  85. package/.claude/commands/analysis/README.md +0 -9
  86. package/.claude/commands/analysis/bottleneck-detect.md +0 -162
  87. package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
  88. package/.claude/commands/analysis/performance-report.md +0 -25
  89. package/.claude/commands/analysis/token-efficiency.md +0 -45
  90. package/.claude/commands/analysis/token-usage.md +0 -25
  91. package/.claude/commands/automation/README.md +0 -9
  92. package/.claude/commands/automation/auto-agent.md +0 -122
  93. package/.claude/commands/automation/self-healing.md +0 -106
  94. package/.claude/commands/automation/session-memory.md +0 -90
  95. package/.claude/commands/automation/smart-agents.md +0 -73
  96. package/.claude/commands/automation/smart-spawn.md +0 -25
  97. package/.claude/commands/automation/workflow-select.md +0 -25
  98. package/.claude/commands/coordination/README.md +0 -9
  99. package/.claude/commands/coordination/agent-spawn.md +0 -25
  100. package/.claude/commands/coordination/init.md +0 -44
  101. package/.claude/commands/coordination/orchestrate.md +0 -43
  102. package/.claude/commands/coordination/spawn.md +0 -45
  103. package/.claude/commands/coordination/swarm-init.md +0 -85
  104. package/.claude/commands/coordination/task-orchestrate.md +0 -25
  105. package/.claude/commands/github/README.md +0 -11
  106. package/.claude/commands/github/code-review-swarm.md +0 -514
  107. package/.claude/commands/github/code-review.md +0 -25
  108. package/.claude/commands/github/github-modes.md +0 -147
  109. package/.claude/commands/github/github-swarm.md +0 -121
  110. package/.claude/commands/github/issue-tracker.md +0 -292
  111. package/.claude/commands/github/issue-triage.md +0 -25
  112. package/.claude/commands/github/multi-repo-swarm.md +0 -519
  113. package/.claude/commands/github/pr-enhance.md +0 -26
  114. package/.claude/commands/github/pr-manager.md +0 -170
  115. package/.claude/commands/github/project-board-sync.md +0 -471
  116. package/.claude/commands/github/release-manager.md +0 -338
  117. package/.claude/commands/github/release-swarm.md +0 -544
  118. package/.claude/commands/github/repo-analyze.md +0 -25
  119. package/.claude/commands/github/repo-architect.md +0 -367
  120. package/.claude/commands/github/swarm-issue.md +0 -482
  121. package/.claude/commands/github/swarm-pr.md +0 -285
  122. package/.claude/commands/github/sync-coordinator.md +0 -301
  123. package/.claude/commands/github/workflow-automation.md +0 -442
  124. package/.claude/commands/hooks/README.md +0 -11
  125. package/.claude/commands/hooks/overview.md +0 -58
  126. package/.claude/commands/hooks/post-edit.md +0 -117
  127. package/.claude/commands/hooks/post-task.md +0 -112
  128. package/.claude/commands/hooks/pre-edit.md +0 -113
  129. package/.claude/commands/hooks/pre-task.md +0 -111
  130. package/.claude/commands/hooks/session-end.md +0 -118
  131. package/.claude/commands/hooks/setup.md +0 -103
  132. package/.claude/commands/memory/README.md +0 -9
  133. package/.claude/commands/memory/memory-persist.md +0 -25
  134. package/.claude/commands/memory/memory-search.md +0 -25
  135. package/.claude/commands/memory/memory-usage.md +0 -25
  136. package/.claude/commands/memory/neural.md +0 -47
  137. package/.claude/commands/memory/usage.md +0 -46
  138. package/.claude/commands/monitoring/README.md +0 -9
  139. package/.claude/commands/monitoring/agent-metrics.md +0 -25
  140. package/.claude/commands/monitoring/agents.md +0 -44
  141. package/.claude/commands/monitoring/real-time-view.md +0 -25
  142. package/.claude/commands/monitoring/status.md +0 -46
  143. package/.claude/commands/monitoring/swarm-monitor.md +0 -25
  144. package/.claude/commands/optimization/README.md +0 -9
  145. package/.claude/commands/optimization/auto-topology.md +0 -62
  146. package/.claude/commands/optimization/cache-manage.md +0 -25
  147. package/.claude/commands/optimization/parallel-execute.md +0 -25
  148. package/.claude/commands/optimization/parallel-execution.md +0 -50
  149. package/.claude/commands/optimization/topology-optimize.md +0 -25
  150. package/.claude/commands/pair/README.md +0 -261
  151. package/.claude/commands/pair/commands.md +0 -546
  152. package/.claude/commands/pair/config.md +0 -510
  153. package/.claude/commands/pair/examples.md +0 -512
  154. package/.claude/commands/pair/modes.md +0 -348
  155. package/.claude/commands/pair/session.md +0 -407
  156. package/.claude/commands/pair/start.md +0 -209
  157. package/.claude/commands/sparc/analyzer.md +0 -52
  158. package/.claude/commands/sparc/architect.md +0 -53
  159. package/.claude/commands/sparc/batch-executor.md +0 -54
  160. package/.claude/commands/sparc/coder.md +0 -54
  161. package/.claude/commands/sparc/debugger.md +0 -54
  162. package/.claude/commands/sparc/designer.md +0 -53
  163. package/.claude/commands/sparc/documenter.md +0 -54
  164. package/.claude/commands/sparc/innovator.md +0 -54
  165. package/.claude/commands/sparc/memory-manager.md +0 -54
  166. package/.claude/commands/sparc/optimizer.md +0 -54
  167. package/.claude/commands/sparc/orchestrator.md +0 -132
  168. package/.claude/commands/sparc/researcher.md +0 -54
  169. package/.claude/commands/sparc/reviewer.md +0 -54
  170. package/.claude/commands/sparc/sparc-modes.md +0 -174
  171. package/.claude/commands/sparc/swarm-coordinator.md +0 -54
  172. package/.claude/commands/sparc/tdd.md +0 -54
  173. package/.claude/commands/sparc/tester.md +0 -54
  174. package/.claude/commands/sparc/workflow-manager.md +0 -54
  175. package/.claude/commands/stream-chain/pipeline.md +0 -121
  176. package/.claude/commands/stream-chain/run.md +0 -70
  177. package/.claude/commands/swarm/analysis.md +0 -95
  178. package/.claude/commands/swarm/development.md +0 -96
  179. package/.claude/commands/swarm/examples.md +0 -168
  180. package/.claude/commands/swarm/maintenance.md +0 -102
  181. package/.claude/commands/swarm/optimization.md +0 -117
  182. package/.claude/commands/swarm/research.md +0 -136
  183. package/.claude/commands/swarm/testing.md +0 -131
  184. package/.claude/commands/training/README.md +0 -9
  185. package/.claude/commands/training/model-update.md +0 -25
  186. package/.claude/commands/training/neural-patterns.md +0 -74
  187. package/.claude/commands/training/neural-train.md +0 -25
  188. package/.claude/commands/training/pattern-learn.md +0 -25
  189. package/.claude/commands/training/specialization.md +0 -63
  190. package/.claude/commands/truth/start.md +0 -143
  191. package/.claude/commands/verify/check.md +0 -50
  192. package/.claude/commands/verify/start.md +0 -128
  193. package/.claude/commands/workflows/README.md +0 -9
  194. package/.claude/commands/workflows/development.md +0 -78
  195. package/.claude/commands/workflows/research.md +0 -63
  196. package/.claude/commands/workflows/workflow-create.md +0 -25
  197. package/.claude/commands/workflows/workflow-execute.md +0 -25
  198. package/.claude/commands/workflows/workflow-export.md +0 -25
  199. package/.claude/config.json +0 -36
  200. package/.claude/settings.json +0 -162
  201. package/.claude-flow/metrics/agent-metrics.json +0 -1
  202. package/.claude-flow/metrics/performance.json +0 -9
  203. package/.claude-flow/metrics/system-metrics.json +0 -230
  204. package/.claude-flow/metrics/task-metrics.json +0 -10
  205. package/FIXES.md +0 -75
  206. package/test-results.md +0 -163
@@ -1,112 +0,0 @@
1
- # hook post-task
2
-
3
- Execute post-task cleanup, performance analysis, and memory storage.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npx claude-flow hook post-task [options]
9
- ```
10
-
11
- ## Options
12
-
13
- - `--task-id, -t <id>` - Task identifier for tracking
14
- - `--analyze-performance` - Generate performance metrics (default: true)
15
- - `--store-decisions` - Save task decisions to memory
16
- - `--export-learnings` - Export neural pattern learnings
17
- - `--generate-report` - Create task completion report
18
-
19
- ## Examples
20
-
21
- ### Basic post-task hook
22
-
23
- ```bash
24
- npx claude-flow hook post-task --task-id "auth-implementation"
25
- ```
26
-
27
- ### With full analysis
28
-
29
- ```bash
30
- npx claude-flow hook post-task -t "api-refactor" --analyze-performance --generate-report
31
- ```
32
-
33
- ### Memory storage
34
-
35
- ```bash
36
- npx claude-flow hook post-task -t "bug-fix-123" --store-decisions --export-learnings
37
- ```
38
-
39
- ### Quick cleanup
40
-
41
- ```bash
42
- npx claude-flow hook post-task -t "minor-update" --analyze-performance false
43
- ```
44
-
45
- ## Features
46
-
47
- ### Performance Analysis
48
-
49
- - Measures execution time
50
- - Tracks token usage
51
- - Identifies bottlenecks
52
- - Suggests optimizations
53
-
54
- ### Decision Storage
55
-
56
- - Saves key decisions made
57
- - Records implementation choices
58
- - Stores error resolutions
59
- - Maintains knowledge base
60
-
61
- ### Neural Learning
62
-
63
- - Exports successful patterns
64
- - Updates coordination models
65
- - Improves future performance
66
- - Trains on task outcomes
67
-
68
- ### Report Generation
69
-
70
- - Creates completion summary
71
- - Documents changes made
72
- - Lists files modified
73
- - Tracks metrics achieved
74
-
75
- ## Integration
76
-
77
- This hook is automatically called by Claude Code when:
78
-
79
- - Completing a task
80
- - Switching to a new task
81
- - Ending a work session
82
- - After major milestones
83
-
84
- Manual usage in agents:
85
-
86
- ```bash
87
- # In agent coordination
88
- npx claude-flow hook post-task --task-id "your-task-id" --analyze-performance true
89
- ```
90
-
91
- ## Output
92
-
93
- Returns JSON with:
94
-
95
- ```json
96
- {
97
- "taskId": "auth-implementation",
98
- "duration": 1800000,
99
- "tokensUsed": 45000,
100
- "filesModified": 12,
101
- "performanceScore": 0.92,
102
- "learningsExported": true,
103
- "reportPath": "/reports/task-auth-implementation.md"
104
- }
105
- ```
106
-
107
- ## See Also
108
-
109
- - `hook pre-task` - Pre-task setup
110
- - `performance report` - Detailed metrics
111
- - `memory usage` - Memory management
112
- - `neural patterns` - Pattern analysis
@@ -1,113 +0,0 @@
1
- # hook pre-edit
2
-
3
- Execute pre-edit validations and agent assignment before file modifications.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npx claude-flow hook pre-edit [options]
9
- ```
10
-
11
- ## Options
12
-
13
- - `--file, -f <path>` - File path to be edited
14
- - `--auto-assign-agent` - Automatically assign best agent (default: true)
15
- - `--validate-syntax` - Pre-validate syntax before edit
16
- - `--check-conflicts` - Check for merge conflicts
17
- - `--backup-file` - Create backup before editing
18
-
19
- ## Examples
20
-
21
- ### Basic pre-edit hook
22
-
23
- ```bash
24
- npx claude-flow hook pre-edit --file "src/auth/login.js"
25
- ```
26
-
27
- ### With validation
28
-
29
- ```bash
30
- npx claude-flow hook pre-edit -f "config/database.js" --validate-syntax
31
- ```
32
-
33
- ### Manual agent assignment
34
-
35
- ```bash
36
- npx claude-flow hook pre-edit -f "api/users.ts" --auto-assign-agent false
37
- ```
38
-
39
- ### Safe editing with backup
40
-
41
- ```bash
42
- npx claude-flow hook pre-edit -f "production.env" --backup-file --check-conflicts
43
- ```
44
-
45
- ## Features
46
-
47
- ### Auto Agent Assignment
48
-
49
- - Analyzes file type and content
50
- - Assigns specialist agents
51
- - TypeScript → TypeScript expert
52
- - Database → Data specialist
53
- - Tests → QA engineer
54
-
55
- ### Syntax Validation
56
-
57
- - Pre-checks syntax validity
58
- - Identifies potential errors
59
- - Suggests corrections
60
- - Prevents broken code
61
-
62
- ### Conflict Detection
63
-
64
- - Checks for git conflicts
65
- - Identifies concurrent edits
66
- - Warns about stale files
67
- - Suggests merge strategies
68
-
69
- ### File Backup
70
-
71
- - Creates safety backups
72
- - Enables quick rollback
73
- - Tracks edit history
74
- - Preserves originals
75
-
76
- ## Integration
77
-
78
- This hook is automatically called by Claude Code when:
79
-
80
- - Using Edit or MultiEdit tools
81
- - Before file modifications
82
- - During refactoring operations
83
- - When updating critical files
84
-
85
- Manual usage in agents:
86
-
87
- ```bash
88
- # Before editing files
89
- npx claude-flow hook pre-edit --file "path/to/file.js" --validate-syntax
90
- ```
91
-
92
- ## Output
93
-
94
- Returns JSON with:
95
-
96
- ```json
97
- {
98
- "continue": true,
99
- "file": "src/auth/login.js",
100
- "assignedAgent": "auth-specialist",
101
- "syntaxValid": true,
102
- "conflicts": false,
103
- "backupPath": ".backups/login.js.bak",
104
- "warnings": []
105
- }
106
- ```
107
-
108
- ## See Also
109
-
110
- - `hook post-edit` - Post-edit processing
111
- - `Edit` - File editing tool
112
- - `MultiEdit` - Multiple edits tool
113
- - `agent spawn` - Manual agent creation
@@ -1,111 +0,0 @@
1
- # hook pre-task
2
-
3
- Execute pre-task preparations and context loading.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npx claude-flow hook pre-task [options]
9
- ```
10
-
11
- ## Options
12
-
13
- - `--description, -d <text>` - Task description for context
14
- - `--auto-spawn-agents` - Automatically spawn required agents (default: true)
15
- - `--load-memory` - Load relevant memory from previous sessions
16
- - `--optimize-topology` - Select optimal swarm topology
17
- - `--estimate-complexity` - Analyze task complexity
18
-
19
- ## Examples
20
-
21
- ### Basic pre-task hook
22
-
23
- ```bash
24
- npx claude-flow hook pre-task --description "Implement user authentication"
25
- ```
26
-
27
- ### With memory loading
28
-
29
- ```bash
30
- npx claude-flow hook pre-task -d "Continue API development" --load-memory
31
- ```
32
-
33
- ### Manual agent control
34
-
35
- ```bash
36
- npx claude-flow hook pre-task -d "Debug issue #123" --auto-spawn-agents false
37
- ```
38
-
39
- ### Full optimization
40
-
41
- ```bash
42
- npx claude-flow hook pre-task -d "Refactor codebase" --optimize-topology --estimate-complexity
43
- ```
44
-
45
- ## Features
46
-
47
- ### Auto Agent Assignment
48
-
49
- - Analyzes task requirements
50
- - Determines needed agent types
51
- - Spawns agents automatically
52
- - Configures agent parameters
53
-
54
- ### Memory Loading
55
-
56
- - Retrieves relevant past decisions
57
- - Loads previous task contexts
58
- - Restores agent configurations
59
- - Maintains continuity
60
-
61
- ### Topology Optimization
62
-
63
- - Analyzes task structure
64
- - Selects best swarm topology
65
- - Configures communication patterns
66
- - Optimizes for performance
67
-
68
- ### Complexity Estimation
69
-
70
- - Evaluates task difficulty
71
- - Estimates time requirements
72
- - Suggests agent count
73
- - Identifies dependencies
74
-
75
- ## Integration
76
-
77
- This hook is automatically called by Claude Code when:
78
-
79
- - Starting a new task
80
- - Resuming work after a break
81
- - Switching between projects
82
- - Beginning complex operations
83
-
84
- Manual usage in agents:
85
-
86
- ```bash
87
- # In agent coordination
88
- npx claude-flow hook pre-task --description "Your task here"
89
- ```
90
-
91
- ## Output
92
-
93
- Returns JSON with:
94
-
95
- ```json
96
- {
97
- "continue": true,
98
- "topology": "hierarchical",
99
- "agentsSpawned": 5,
100
- "complexity": "medium",
101
- "estimatedMinutes": 30,
102
- "memoryLoaded": true
103
- }
104
- ```
105
-
106
- ## See Also
107
-
108
- - `hook post-task` - Post-task cleanup
109
- - `agent spawn` - Manual agent creation
110
- - `memory usage` - Memory management
111
- - `swarm init` - Swarm initialization
@@ -1,118 +0,0 @@
1
- # hook session-end
2
-
3
- Cleanup and persist session state before ending work.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npx claude-flow hook session-end [options]
9
- ```
10
-
11
- ## Options
12
-
13
- - `--session-id, -s <id>` - Session identifier to end
14
- - `--save-state` - Save current session state (default: true)
15
- - `--export-metrics` - Export session metrics
16
- - `--generate-summary` - Create session summary
17
- - `--cleanup-temp` - Remove temporary files
18
-
19
- ## Examples
20
-
21
- ### Basic session end
22
-
23
- ```bash
24
- npx claude-flow hook session-end --session-id "dev-session-2024"
25
- ```
26
-
27
- ### With full export
28
-
29
- ```bash
30
- npx claude-flow hook session-end -s "feature-auth" --export-metrics --generate-summary
31
- ```
32
-
33
- ### Quick close
34
-
35
- ```bash
36
- npx claude-flow hook session-end -s "quick-fix" --save-state false --cleanup-temp
37
- ```
38
-
39
- ### Complete persistence
40
-
41
- ```bash
42
- npx claude-flow hook session-end -s "major-refactor" --save-state --export-metrics --generate-summary
43
- ```
44
-
45
- ## Features
46
-
47
- ### State Persistence
48
-
49
- - Saves current context
50
- - Stores open files
51
- - Preserves task progress
52
- - Maintains decisions
53
-
54
- ### Metric Export
55
-
56
- - Session duration
57
- - Commands executed
58
- - Files modified
59
- - Tokens consumed
60
- - Performance data
61
-
62
- ### Summary Generation
63
-
64
- - Work accomplished
65
- - Key decisions made
66
- - Problems solved
67
- - Next steps identified
68
-
69
- ### Cleanup Operations
70
-
71
- - Removes temp files
72
- - Clears caches
73
- - Frees resources
74
- - Optimizes storage
75
-
76
- ## Integration
77
-
78
- This hook is automatically called by Claude Code when:
79
-
80
- - Ending a conversation
81
- - Closing work session
82
- - Before shutdown
83
- - Switching contexts
84
-
85
- Manual usage in agents:
86
-
87
- ```bash
88
- # At session end
89
- npx claude-flow hook session-end --session-id "your-session" --generate-summary
90
- ```
91
-
92
- ## Output
93
-
94
- Returns JSON with:
95
-
96
- ```json
97
- {
98
- "sessionId": "dev-session-2024",
99
- "duration": 7200000,
100
- "saved": true,
101
- "metrics": {
102
- "commandsRun": 145,
103
- "filesModified": 23,
104
- "tokensUsed": 85000,
105
- "tasksCompleted": 8
106
- },
107
- "summaryPath": "/sessions/dev-session-2024-summary.md",
108
- "cleanedUp": true,
109
- "nextSession": "dev-session-2025"
110
- }
111
- ```
112
-
113
- ## See Also
114
-
115
- - `hook session-start` - Session initialization
116
- - `hook session-restore` - Session restoration
117
- - `performance report` - Detailed metrics
118
- - `memory backup` - State backup
@@ -1,103 +0,0 @@
1
- # Setting Up ruv-swarm Hooks
2
-
3
- ## Quick Start
4
-
5
- ### 1. Initialize with Hooks
6
- ```bash
7
- npx claude-flow init --hooks
8
- ```
9
-
10
- This automatically creates:
11
- - `.claude/settings.json` with hook configurations
12
- - Hook command documentation
13
- - Default hook handlers
14
-
15
- ### 2. Test Hook Functionality
16
- ```bash
17
- # Test pre-edit hook
18
- npx claude-flow hook pre-edit --file test.js
19
-
20
- # Test session summary
21
- npx claude-flow hook session-end --summary
22
- ```
23
-
24
- ### 3. Customize Hooks
25
-
26
- Edit `.claude/settings.json` to customize:
27
-
28
- ```json
29
- {
30
- "hooks": {
31
- "PreToolUse": [
32
- {
33
- "matcher": "^Write$",
34
- "hooks": [{
35
- "type": "command",
36
- "command": "npx claude-flow hook pre-write --file '${tool.params.file_path}'"
37
- }]
38
- }
39
- ]
40
- }
41
- }
42
- ```
43
-
44
- ## Hook Response Format
45
-
46
- Hooks return JSON with:
47
- - `continue`: Whether to proceed (true/false)
48
- - `reason`: Explanation for decision
49
- - `metadata`: Additional context
50
-
51
- Example blocking response:
52
- ```json
53
- {
54
- "continue": false,
55
- "reason": "Protected file - manual review required",
56
- "metadata": {
57
- "file": ".env.production",
58
- "protection_level": "high"
59
- }
60
- }
61
- ```
62
-
63
- ## Performance Tips
64
- - Keep hooks lightweight (< 100ms)
65
- - Use caching for repeated operations
66
- - Batch related operations
67
- - Run non-critical hooks asynchronously
68
-
69
- ## Debugging Hooks
70
- ```bash
71
- # Enable debug output
72
- export CLAUDE_FLOW_DEBUG=true
73
-
74
- # Test specific hook
75
- npx claude-flow hook pre-edit --file app.js --debug
76
- ```
77
-
78
- ## Common Patterns
79
-
80
- ### Auto-Format on Save
81
- Already configured by default for common file types.
82
-
83
- ### Protected File Detection
84
- ```json
85
- {
86
- "matcher": "^(Write|Edit)$",
87
- "hooks": [{
88
- "type": "command",
89
- "command": "npx claude-flow hook check-protected --file '${tool.params.file_path}'"
90
- }]
91
- }
92
- ```
93
-
94
- ### Automatic Testing
95
- ```json
96
- {
97
- "matcher": "^Write$",
98
- "hooks": [{
99
- "type": "command",
100
- "command": "test -f '${tool.params.file_path%.js}.test.js' && npm test '${tool.params.file_path%.js}.test.js'"
101
- }]
102
- }
103
- ```
@@ -1,9 +0,0 @@
1
- # Memory Commands
2
-
3
- Commands for memory operations in Claude Flow.
4
-
5
- ## Available Commands
6
-
7
- - [memory-usage](./memory-usage.md)
8
- - [memory-persist](./memory-persist.md)
9
- - [memory-search](./memory-search.md)
@@ -1,25 +0,0 @@
1
- # memory-persist
2
-
3
- Persist memory across sessions.
4
-
5
- ## Usage
6
- ```bash
7
- npx claude-flow memory persist [options]
8
- ```
9
-
10
- ## Options
11
- - `--export <file>` - Export to file
12
- - `--import <file>` - Import from file
13
- - `--compress` - Compress memory data
14
-
15
- ## Examples
16
- ```bash
17
- # Export memory
18
- npx claude-flow memory persist --export memory-backup.json
19
-
20
- # Import memory
21
- npx claude-flow memory persist --import memory-backup.json
22
-
23
- # Compressed export
24
- npx claude-flow memory persist --export memory.gz --compress
25
- ```
@@ -1,25 +0,0 @@
1
- # memory-search
2
-
3
- Search through stored memory.
4
-
5
- ## Usage
6
- ```bash
7
- npx claude-flow memory search [options]
8
- ```
9
-
10
- ## Options
11
- - `--query <text>` - Search query
12
- - `--pattern <regex>` - Pattern matching
13
- - `--limit <n>` - Result limit
14
-
15
- ## Examples
16
- ```bash
17
- # Search memory
18
- npx claude-flow memory search --query "authentication"
19
-
20
- # Pattern search
21
- npx claude-flow memory search --pattern "api-.*"
22
-
23
- # Limited results
24
- npx claude-flow memory search --query "config" --limit 10
25
- ```
@@ -1,25 +0,0 @@
1
- # memory-usage
2
-
3
- Manage persistent memory storage.
4
-
5
- ## Usage
6
- ```bash
7
- npx claude-flow memory usage [options]
8
- ```
9
-
10
- ## Options
11
- - `--action <type>` - Action (store, retrieve, list, clear)
12
- - `--key <key>` - Memory key
13
- - `--value <data>` - Data to store (JSON)
14
-
15
- ## Examples
16
- ```bash
17
- # Store memory
18
- npx claude-flow memory usage --action store --key "project-config" --value '{"api": "v2"}'
19
-
20
- # Retrieve memory
21
- npx claude-flow memory usage --action retrieve --key "project-config"
22
-
23
- # List all keys
24
- npx claude-flow memory usage --action list
25
- ```
@@ -1,47 +0,0 @@
1
- # Neural Pattern Training
2
-
3
- ## 🎯 Key Principle
4
- **This tool coordinates Claude Code's actions. It does NOT write code or create content.**
5
-
6
- ## MCP Tool Usage in Claude Code
7
-
8
- **Tool:** `mcp__claude-flow__neural_train`
9
-
10
- ## Parameters
11
- ```json
12
- {
13
- "pattern_type": "coordination",
14
- "training_data": "task decomposition patterns",
15
- "epochs": 50
16
- }
17
- ```
18
-
19
- ## Description
20
- Improve coordination patterns through neural network training
21
-
22
- ## Details
23
- Training improves:
24
- - Task breakdown effectiveness
25
- - Coordination pattern selection
26
- - Resource allocation strategies
27
- - Overall coordination efficiency
28
-
29
- ## Example Usage
30
-
31
- **In Claude Code:**
32
- 1. Train coordination patterns: Use tool `mcp__claude-flow__neural_train` with parameters `{"pattern_type": "coordination", "training_data": "successful task patterns", "epochs": 50}`
33
- 2. Train optimization patterns: Use tool `mcp__claude-flow__neural_train` with parameters `{"pattern_type": "optimization", "training_data": "performance metrics", "epochs": 30}`
34
- 3. Check training status: Use tool `mcp__claude-flow__neural_status`
35
- 4. Analyze patterns: Use tool `mcp__claude-flow__neural_patterns` with parameters `{"action": "analyze"}`
36
-
37
- ## Important Reminders
38
- - ✅ This tool provides coordination and structure
39
- - ✅ Claude Code performs all actual implementation
40
- - ❌ The tool does NOT write code
41
- - ❌ The tool does NOT access files directly
42
- - ❌ The tool does NOT execute commands
43
-
44
- ## See Also
45
- - Main documentation: /CLAUDE.md
46
- - Other commands in this category
47
- - Workflow examples in /workflows/