@claude-flow/cli 3.37.0 → 3.38.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.
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/issue-tracker.md +1 -1
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/release-manager.md +2 -2
- package/.claude/agents/github/repo-architect.md +2 -2
- package/.claude/agents/github/workflow-automation.md +1 -1
- package/.claude/agents/optimization/benchmark-suite.md +8 -8
- package/.claude/agents/optimization/load-balancer.md +7 -7
- package/.claude/agents/optimization/performance-monitor.md +8 -8
- package/.claude/agents/optimization/resource-allocator.md +9 -9
- package/.claude/agents/optimization/topology-optimizer.md +8 -8
- package/.claude/commands/agents/README.md +4 -4
- package/.claude/commands/agents/agent-capabilities.md +1 -1
- package/.claude/commands/agents/agent-coordination.md +3 -3
- package/.claude/commands/agents/agent-types.md +2 -2
- package/.claude/commands/agents/health.md +10 -10
- package/.claude/commands/agents/list.md +8 -8
- package/.claude/commands/agents/logs.md +16 -16
- package/.claude/commands/agents/metrics.md +9 -9
- package/.claude/commands/agents/pool.md +10 -10
- package/.claude/commands/agents/spawn.md +35 -35
- package/.claude/commands/agents/status.md +9 -9
- package/.claude/commands/agents/stop.md +15 -15
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +1 -1
- package/.claude/commands/analysis/bottleneck-detect.md +5 -5
- package/.claude/commands/analysis/performance-report.md +4 -4
- package/.claude/commands/analysis/token-usage.md +4 -4
- package/.claude/commands/automation/auto-agent.md +5 -5
- package/.claude/commands/automation/self-healing.md +1 -1
- package/.claude/commands/automation/session-memory.md +1 -1
- package/.claude/commands/automation/smart-agents.md +1 -1
- package/.claude/commands/automation/smart-spawn.md +4 -4
- package/.claude/commands/automation/workflow-select.md +4 -4
- package/.claude/commands/claude-flow-help.md +1 -1
- package/.claude/commands/coordination/agent-spawn.md +4 -4
- package/.claude/commands/coordination/swarm-init.md +5 -5
- package/.claude/commands/coordination/task-orchestrate.md +4 -4
- package/.claude/commands/github/code-review.md +4 -4
- package/.claude/commands/github/github-swarm.md +5 -5
- package/.claude/commands/github/issue-triage.md +4 -4
- package/.claude/commands/github/pr-enhance.md +4 -4
- package/.claude/commands/github/release-manager.md +1 -1
- package/.claude/commands/github/repo-analyze.md +4 -4
- package/.claude/commands/github/repo-architect.md +2 -2
- package/.claude/commands/hive-mind/hive-mind-consensus.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-init.md +3 -3
- package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-metrics.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-resume.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-sessions.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-spawn.md +4 -4
- package/.claude/commands/hive-mind/hive-mind-status.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-stop.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-wizard.md +1 -1
- package/.claude/commands/hive-mind/hive-mind.md +4 -4
- package/.claude/commands/hooks/overview.md +1 -1
- package/.claude/commands/hooks/post-edit.md +6 -6
- package/.claude/commands/hooks/post-task.md +6 -6
- package/.claude/commands/hooks/pre-edit.md +6 -6
- package/.claude/commands/hooks/pre-task.md +6 -6
- package/.claude/commands/hooks/session-end.md +6 -6
- package/.claude/commands/hooks/setup.md +6 -6
- package/.claude/commands/memory/memory-persist.md +4 -4
- package/.claude/commands/memory/memory-search.md +4 -4
- package/.claude/commands/memory/memory-usage.md +4 -4
- package/.claude/commands/monitoring/agent-metrics.md +4 -4
- package/.claude/commands/monitoring/real-time-view.md +4 -4
- package/.claude/commands/monitoring/swarm-monitor.md +4 -4
- package/.claude/commands/optimization/auto-topology.md +2 -2
- package/.claude/commands/optimization/cache-manage.md +4 -4
- package/.claude/commands/optimization/parallel-execute.md +4 -4
- package/.claude/commands/optimization/parallel-execution.md +1 -1
- package/.claude/commands/optimization/topology-optimize.md +4 -4
- package/.claude/commands/sparc/analyzer.md +1 -1
- package/.claude/commands/sparc/architect.md +1 -1
- package/.claude/commands/sparc/ask.md +5 -5
- package/.claude/commands/sparc/batch-executor.md +1 -1
- package/.claude/commands/sparc/code.md +5 -5
- package/.claude/commands/sparc/coder.md +1 -1
- package/.claude/commands/sparc/debug.md +5 -5
- package/.claude/commands/sparc/debugger.md +1 -1
- package/.claude/commands/sparc/designer.md +1 -1
- package/.claude/commands/sparc/devops.md +5 -5
- package/.claude/commands/sparc/docs-writer.md +5 -5
- package/.claude/commands/sparc/documenter.md +1 -1
- package/.claude/commands/sparc/innovator.md +1 -1
- package/.claude/commands/sparc/integration.md +5 -5
- package/.claude/commands/sparc/mcp.md +5 -5
- package/.claude/commands/sparc/memory-manager.md +1 -1
- package/.claude/commands/sparc/optimizer.md +1 -1
- package/.claude/commands/sparc/orchestrator.md +8 -8
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +5 -5
- package/.claude/commands/sparc/refinement-optimization-mode.md +5 -5
- package/.claude/commands/sparc/researcher.md +1 -1
- package/.claude/commands/sparc/reviewer.md +1 -1
- package/.claude/commands/sparc/security-review.md +5 -5
- package/.claude/commands/sparc/sparc-modes.md +11 -11
- package/.claude/commands/sparc/sparc.md +5 -5
- package/.claude/commands/sparc/spec-pseudocode.md +5 -5
- package/.claude/commands/sparc/supabase-admin.md +5 -5
- package/.claude/commands/sparc/swarm-coordinator.md +1 -1
- package/.claude/commands/sparc/tdd.md +1 -1
- package/.claude/commands/sparc/tester.md +1 -1
- package/.claude/commands/sparc/tutorial.md +5 -5
- package/.claude/commands/sparc/workflow-manager.md +1 -1
- package/.claude/commands/sparc.md +6 -6
- package/.claude/commands/swarm/analysis.md +1 -1
- package/.claude/commands/swarm/development.md +1 -1
- package/.claude/commands/swarm/examples.md +3 -3
- package/.claude/commands/swarm/maintenance.md +1 -1
- package/.claude/commands/swarm/optimization.md +1 -1
- package/.claude/commands/swarm/research.md +1 -1
- package/.claude/commands/swarm/swarm-analysis.md +1 -1
- package/.claude/commands/swarm/swarm-background.md +1 -1
- package/.claude/commands/swarm/swarm-init.md +3 -3
- package/.claude/commands/swarm/swarm-modes.md +1 -1
- package/.claude/commands/swarm/swarm-monitor.md +1 -1
- package/.claude/commands/swarm/swarm-spawn.md +3 -3
- package/.claude/commands/swarm/swarm-status.md +1 -1
- package/.claude/commands/swarm/swarm-strategies.md +1 -1
- package/.claude/commands/swarm/testing.md +1 -1
- package/.claude/commands/training/model-update.md +4 -4
- package/.claude/commands/training/neural-patterns.md +12 -12
- package/.claude/commands/training/neural-train.md +8 -8
- package/.claude/commands/training/pattern-learn.md +4 -4
- package/.claude/commands/training/specialization.md +2 -2
- package/.claude/commands/workflows/development.md +3 -3
- package/.claude/commands/workflows/research.md +2 -2
- package/.claude/commands/workflows/workflow-create.md +4 -4
- package/.claude/commands/workflows/workflow-execute.md +4 -4
- package/.claude/commands/workflows/workflow-export.md +4 -4
- package/.claude/helpers/.helpers-version +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +1 -1
- package/.claude/helpers/github-setup.sh +4 -4
- package/.claude/helpers/helpers.manifest.json +3 -3
- package/.claude/helpers/quick-start.sh +4 -4
- package/.claude/helpers/setup-mcp.sh +1 -1
- package/.claude/helpers/statusline.cjs +0 -0
- package/.claude/settings.json +1 -1
- package/.claude/skills/dual-mode/dual-spawn.md +2 -2
- package/.claude/skills/github-multi-repo/SKILL.md +21 -21
- package/.claude/skills/github-release-management/SKILL.md +19 -19
- package/.claude/skills/hooks-automation/SKILL.md +107 -107
- package/.claude/skills/sparc-methodology/SKILL.md +26 -26
- package/.claude/skills/swarm-advanced/SKILL.md +3 -3
- package/catalog-manifest.json +2 -2
- package/dist/src/commands/migrate-agent-detection.d.ts +27 -0
- package/dist/src/commands/migrate-agent-detection.js +113 -0
- package/dist/src/commands/migrate.js +41 -3
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ This skill provides a comprehensive hook system that automatically manages devel
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
# Initialize with default hooks configuration
|
|
41
|
-
npx claude-flow init --hooks
|
|
41
|
+
npx @claude-flow/cli@latest init --hooks
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
This creates:
|
|
@@ -50,13 +50,13 @@ This creates:
|
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
# Pre-task hook (auto-spawns agents)
|
|
53
|
-
npx claude-flow hook pre-task --description "Implement authentication"
|
|
53
|
+
npx @claude-flow/cli@latest hook pre-task --description "Implement authentication"
|
|
54
54
|
|
|
55
55
|
# Post-edit hook (auto-formats and stores in memory)
|
|
56
|
-
npx claude-flow hook post-edit --file "src/auth.js" --memory-key "auth/login"
|
|
56
|
+
npx @claude-flow/cli@latest hook post-edit --file "src/auth.js" --memory-key "auth/login"
|
|
57
57
|
|
|
58
58
|
# Session end hook (saves state and metrics)
|
|
59
|
-
npx claude-flow hook session-end --session-id "dev-session" --export-metrics
|
|
59
|
+
npx @claude-flow/cli@latest hook session-end --session-id "dev-session" --export-metrics
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
---
|
|
@@ -71,7 +71,7 @@ Hooks that execute BEFORE operations to prepare and validate:
|
|
|
71
71
|
|
|
72
72
|
**pre-edit** - Validate and assign agents before file modifications
|
|
73
73
|
```bash
|
|
74
|
-
npx claude-flow hook pre-edit [options]
|
|
74
|
+
npx @claude-flow/cli@latest hook pre-edit [options]
|
|
75
75
|
|
|
76
76
|
Options:
|
|
77
77
|
--file, -f <path> File path to be edited
|
|
@@ -81,9 +81,9 @@ Options:
|
|
|
81
81
|
--backup-file Create backup before editing
|
|
82
82
|
|
|
83
83
|
Examples:
|
|
84
|
-
npx claude-flow hook pre-edit --file "src/auth/login.js"
|
|
85
|
-
npx claude-flow hook pre-edit -f "config/db.js" --validate-syntax
|
|
86
|
-
npx claude-flow hook pre-edit -f "production.env" --backup-file --check-conflicts
|
|
84
|
+
npx @claude-flow/cli@latest hook pre-edit --file "src/auth/login.js"
|
|
85
|
+
npx @claude-flow/cli@latest hook pre-edit -f "config/db.js" --validate-syntax
|
|
86
|
+
npx @claude-flow/cli@latest hook pre-edit -f "production.env" --backup-file --check-conflicts
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
**Features:**
|
|
@@ -94,7 +94,7 @@ Examples:
|
|
|
94
94
|
|
|
95
95
|
**pre-bash** - Check command safety and resource requirements
|
|
96
96
|
```bash
|
|
97
|
-
npx claude-flow hook pre-bash --command <cmd>
|
|
97
|
+
npx @claude-flow/cli@latest hook pre-bash --command <cmd>
|
|
98
98
|
|
|
99
99
|
Options:
|
|
100
100
|
--command, -c <cmd> Command to validate
|
|
@@ -103,8 +103,8 @@ Options:
|
|
|
103
103
|
--require-confirmation Request user confirmation for risky commands
|
|
104
104
|
|
|
105
105
|
Examples:
|
|
106
|
-
npx claude-flow hook pre-bash -c "rm -rf /tmp/cache"
|
|
107
|
-
npx claude-flow hook pre-bash --command "docker build ." --estimate-resources
|
|
106
|
+
npx @claude-flow/cli@latest hook pre-bash -c "rm -rf /tmp/cache"
|
|
107
|
+
npx @claude-flow/cli@latest hook pre-bash --command "docker build ." --estimate-resources
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
**Features:**
|
|
@@ -115,7 +115,7 @@ Examples:
|
|
|
115
115
|
|
|
116
116
|
**pre-task** - Auto-spawn agents and prepare for complex tasks
|
|
117
117
|
```bash
|
|
118
|
-
npx claude-flow hook pre-task [options]
|
|
118
|
+
npx @claude-flow/cli@latest hook pre-task [options]
|
|
119
119
|
|
|
120
120
|
Options:
|
|
121
121
|
--description, -d <text> Task description for context
|
|
@@ -125,9 +125,9 @@ Options:
|
|
|
125
125
|
--estimate-complexity Analyze task complexity
|
|
126
126
|
|
|
127
127
|
Examples:
|
|
128
|
-
npx claude-flow hook pre-task --description "Implement user authentication"
|
|
129
|
-
npx claude-flow hook pre-task -d "Continue API dev" --load-memory
|
|
130
|
-
npx claude-flow hook pre-task -d "Refactor codebase" --optimize-topology
|
|
128
|
+
npx @claude-flow/cli@latest hook pre-task --description "Implement user authentication"
|
|
129
|
+
npx @claude-flow/cli@latest hook pre-task -d "Continue API dev" --load-memory
|
|
130
|
+
npx @claude-flow/cli@latest hook pre-task -d "Refactor codebase" --optimize-topology
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
**Features:**
|
|
@@ -138,7 +138,7 @@ Examples:
|
|
|
138
138
|
|
|
139
139
|
**pre-search** - Prepare and optimize search operations
|
|
140
140
|
```bash
|
|
141
|
-
npx claude-flow hook pre-search --query <query>
|
|
141
|
+
npx @claude-flow/cli@latest hook pre-search --query <query>
|
|
142
142
|
|
|
143
143
|
Options:
|
|
144
144
|
--query, -q <text> Search query
|
|
@@ -146,7 +146,7 @@ Options:
|
|
|
146
146
|
--optimize-query Optimize search pattern
|
|
147
147
|
|
|
148
148
|
Examples:
|
|
149
|
-
npx claude-flow hook pre-search -q "authentication middleware"
|
|
149
|
+
npx @claude-flow/cli@latest hook pre-search -q "authentication middleware"
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
**Features:**
|
|
@@ -160,7 +160,7 @@ Hooks that execute AFTER operations to process and learn:
|
|
|
160
160
|
|
|
161
161
|
**post-edit** - Auto-format, validate, and update memory
|
|
162
162
|
```bash
|
|
163
|
-
npx claude-flow hook post-edit [options]
|
|
163
|
+
npx @claude-flow/cli@latest hook post-edit [options]
|
|
164
164
|
|
|
165
165
|
Options:
|
|
166
166
|
--file, -f <path> File path that was edited
|
|
@@ -170,9 +170,9 @@ Options:
|
|
|
170
170
|
--validate-output Validate edited file
|
|
171
171
|
|
|
172
172
|
Examples:
|
|
173
|
-
npx claude-flow hook post-edit --file "src/components/Button.jsx"
|
|
174
|
-
npx claude-flow hook post-edit -f "api/auth.js" --memory-key "auth/login"
|
|
175
|
-
npx claude-flow hook post-edit -f "utils/helpers.ts" --train-patterns
|
|
173
|
+
npx @claude-flow/cli@latest hook post-edit --file "src/components/Button.jsx"
|
|
174
|
+
npx @claude-flow/cli@latest hook post-edit -f "api/auth.js" --memory-key "auth/login"
|
|
175
|
+
npx @claude-flow/cli@latest hook post-edit -f "utils/helpers.ts" --train-patterns
|
|
176
176
|
```
|
|
177
177
|
|
|
178
178
|
**Features:**
|
|
@@ -183,7 +183,7 @@ Examples:
|
|
|
183
183
|
|
|
184
184
|
**post-bash** - Log execution and update metrics
|
|
185
185
|
```bash
|
|
186
|
-
npx claude-flow hook post-bash --command <cmd>
|
|
186
|
+
npx @claude-flow/cli@latest hook post-bash --command <cmd>
|
|
187
187
|
|
|
188
188
|
Options:
|
|
189
189
|
--command, -c <cmd> Command that was executed
|
|
@@ -192,7 +192,7 @@ Options:
|
|
|
192
192
|
--store-result Store result in memory
|
|
193
193
|
|
|
194
194
|
Examples:
|
|
195
|
-
npx claude-flow hook post-bash -c "npm test" --update-metrics
|
|
195
|
+
npx @claude-flow/cli@latest hook post-bash -c "npm test" --update-metrics
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
**Features:**
|
|
@@ -203,7 +203,7 @@ Examples:
|
|
|
203
203
|
|
|
204
204
|
**post-task** - Performance analysis and decision storage
|
|
205
205
|
```bash
|
|
206
|
-
npx claude-flow hook post-task [options]
|
|
206
|
+
npx @claude-flow/cli@latest hook post-task [options]
|
|
207
207
|
|
|
208
208
|
Options:
|
|
209
209
|
--task-id, -t <id> Task identifier for tracking
|
|
@@ -213,9 +213,9 @@ Options:
|
|
|
213
213
|
--generate-report Create task completion report
|
|
214
214
|
|
|
215
215
|
Examples:
|
|
216
|
-
npx claude-flow hook post-task --task-id "auth-implementation"
|
|
217
|
-
npx claude-flow hook post-task -t "api-refactor" --analyze-performance
|
|
218
|
-
npx claude-flow hook post-task -t "bug-fix-123" --store-decisions
|
|
216
|
+
npx @claude-flow/cli@latest hook post-task --task-id "auth-implementation"
|
|
217
|
+
npx @claude-flow/cli@latest hook post-task -t "api-refactor" --analyze-performance
|
|
218
|
+
npx @claude-flow/cli@latest hook post-task -t "bug-fix-123" --store-decisions
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
**Features:**
|
|
@@ -226,7 +226,7 @@ Examples:
|
|
|
226
226
|
|
|
227
227
|
**post-search** - Cache results and improve patterns
|
|
228
228
|
```bash
|
|
229
|
-
npx claude-flow hook post-search --query <query> --results <path>
|
|
229
|
+
npx @claude-flow/cli@latest hook post-search --query <query> --results <path>
|
|
230
230
|
|
|
231
231
|
Options:
|
|
232
232
|
--query, -q <text> Original search query
|
|
@@ -235,7 +235,7 @@ Options:
|
|
|
235
235
|
--train-patterns Improve search patterns
|
|
236
236
|
|
|
237
237
|
Examples:
|
|
238
|
-
npx claude-flow hook post-search -q "auth" -r "results.json" --train-patterns
|
|
238
|
+
npx @claude-flow/cli@latest hook post-search -q "auth" -r "results.json" --train-patterns
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
**Features:**
|
|
@@ -249,7 +249,7 @@ Hooks that coordinate with MCP swarm tools:
|
|
|
249
249
|
|
|
250
250
|
**mcp-initialized** - Persist swarm configuration
|
|
251
251
|
```bash
|
|
252
|
-
npx claude-flow hook mcp-initialized --swarm-id <id>
|
|
252
|
+
npx @claude-flow/cli@latest hook mcp-initialized --swarm-id <id>
|
|
253
253
|
|
|
254
254
|
Features:
|
|
255
255
|
- Save swarm topology and configuration
|
|
@@ -259,7 +259,7 @@ Features:
|
|
|
259
259
|
|
|
260
260
|
**agent-spawned** - Update agent roster and memory
|
|
261
261
|
```bash
|
|
262
|
-
npx claude-flow hook agent-spawned --agent-id <id> --type <type>
|
|
262
|
+
npx @claude-flow/cli@latest hook agent-spawned --agent-id <id> --type <type>
|
|
263
263
|
|
|
264
264
|
Features:
|
|
265
265
|
- Register agent in coordination memory
|
|
@@ -269,7 +269,7 @@ Features:
|
|
|
269
269
|
|
|
270
270
|
**task-orchestrated** - Monitor task progress
|
|
271
271
|
```bash
|
|
272
|
-
npx claude-flow hook task-orchestrated --task-id <id>
|
|
272
|
+
npx @claude-flow/cli@latest hook task-orchestrated --task-id <id>
|
|
273
273
|
|
|
274
274
|
Features:
|
|
275
275
|
- Track task progress through memory
|
|
@@ -279,7 +279,7 @@ Features:
|
|
|
279
279
|
|
|
280
280
|
**neural-trained** - Save pattern improvements
|
|
281
281
|
```bash
|
|
282
|
-
npx claude-flow hook neural-trained --pattern <name>
|
|
282
|
+
npx @claude-flow/cli@latest hook neural-trained --pattern <name>
|
|
283
283
|
|
|
284
284
|
Features:
|
|
285
285
|
- Export trained neural patterns
|
|
@@ -309,7 +309,7 @@ Features:
|
|
|
309
309
|
|
|
310
310
|
**memory-sync** - Synchronize memory across swarm agents
|
|
311
311
|
```bash
|
|
312
|
-
npx claude-flow hook memory-sync --namespace <ns>
|
|
312
|
+
npx @claude-flow/cli@latest hook memory-sync --namespace <ns>
|
|
313
313
|
|
|
314
314
|
Features:
|
|
315
315
|
- Sync memory state across agents
|
|
@@ -322,7 +322,7 @@ Features:
|
|
|
322
322
|
|
|
323
323
|
**session-start** - Initialize new session
|
|
324
324
|
```bash
|
|
325
|
-
npx claude-flow hook session-start --session-id <id>
|
|
325
|
+
npx @claude-flow/cli@latest hook session-start --session-id <id>
|
|
326
326
|
|
|
327
327
|
Options:
|
|
328
328
|
--session-id, -s <id> Session identifier
|
|
@@ -338,7 +338,7 @@ Features:
|
|
|
338
338
|
|
|
339
339
|
**session-restore** - Load previous session state
|
|
340
340
|
```bash
|
|
341
|
-
npx claude-flow hook session-restore --session-id <id>
|
|
341
|
+
npx @claude-flow/cli@latest hook session-restore --session-id <id>
|
|
342
342
|
|
|
343
343
|
Options:
|
|
344
344
|
--session-id, -s <id> Session to restore
|
|
@@ -346,8 +346,8 @@ Options:
|
|
|
346
346
|
--restore-agents Restore agent configurations
|
|
347
347
|
|
|
348
348
|
Examples:
|
|
349
|
-
npx claude-flow hook session-restore --session-id "swarm-20241019"
|
|
350
|
-
npx claude-flow hook session-restore -s "feature-auth" --restore-memory
|
|
349
|
+
npx @claude-flow/cli@latest hook session-restore --session-id "swarm-20241019"
|
|
350
|
+
npx @claude-flow/cli@latest hook session-restore -s "feature-auth" --restore-memory
|
|
351
351
|
```
|
|
352
352
|
|
|
353
353
|
**Features:**
|
|
@@ -358,7 +358,7 @@ Examples:
|
|
|
358
358
|
|
|
359
359
|
**session-end** - Cleanup and persist session state
|
|
360
360
|
```bash
|
|
361
|
-
npx claude-flow hook session-end [options]
|
|
361
|
+
npx @claude-flow/cli@latest hook session-end [options]
|
|
362
362
|
|
|
363
363
|
Options:
|
|
364
364
|
--session-id, -s <id> Session identifier to end
|
|
@@ -368,9 +368,9 @@ Options:
|
|
|
368
368
|
--cleanup-temp Remove temporary files
|
|
369
369
|
|
|
370
370
|
Examples:
|
|
371
|
-
npx claude-flow hook session-end --session-id "dev-session-2024"
|
|
372
|
-
npx claude-flow hook session-end -s "feature-auth" --export-metrics --generate-summary
|
|
373
|
-
npx claude-flow hook session-end -s "quick-fix" --cleanup-temp
|
|
371
|
+
npx @claude-flow/cli@latest hook session-end --session-id "dev-session-2024"
|
|
372
|
+
npx @claude-flow/cli@latest hook session-end -s "feature-auth" --export-metrics --generate-summary
|
|
373
|
+
npx @claude-flow/cli@latest hook session-end -s "quick-fix" --cleanup-temp
|
|
374
374
|
```
|
|
375
375
|
|
|
376
376
|
**Features:**
|
|
@@ -381,7 +381,7 @@ Examples:
|
|
|
381
381
|
|
|
382
382
|
**notify** - Custom notifications with swarm status
|
|
383
383
|
```bash
|
|
384
|
-
npx claude-flow hook notify --message <msg>
|
|
384
|
+
npx @claude-flow/cli@latest hook notify --message <msg>
|
|
385
385
|
|
|
386
386
|
Options:
|
|
387
387
|
--message, -m <text> Notification message
|
|
@@ -390,8 +390,8 @@ Options:
|
|
|
390
390
|
--broadcast Send to all agents
|
|
391
391
|
|
|
392
392
|
Examples:
|
|
393
|
-
npx claude-flow hook notify -m "Task completed" --level info
|
|
394
|
-
npx claude-flow hook notify -m "Critical error" --level error --broadcast
|
|
393
|
+
npx @claude-flow/cli@latest hook notify -m "Task completed" --level info
|
|
394
|
+
npx @claude-flow/cli@latest hook notify -m "Critical error" --level error --broadcast
|
|
395
395
|
```
|
|
396
396
|
|
|
397
397
|
**Features:**
|
|
@@ -414,14 +414,14 @@ Edit `.claude/settings.json` to configure hooks:
|
|
|
414
414
|
"matcher": "^(Write|Edit|MultiEdit)$",
|
|
415
415
|
"hooks": [{
|
|
416
416
|
"type": "command",
|
|
417
|
-
"command": "npx claude-flow hook pre-edit --file '${tool.params.file_path}' --memory-key 'swarm/editor/current'"
|
|
417
|
+
"command": "npx @claude-flow/cli@latest hook pre-edit --file '${tool.params.file_path}' --memory-key 'swarm/editor/current'"
|
|
418
418
|
}]
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
421
|
"matcher": "^Bash$",
|
|
422
422
|
"hooks": [{
|
|
423
423
|
"type": "command",
|
|
424
|
-
"command": "npx claude-flow hook pre-bash --command '${tool.params.command}'"
|
|
424
|
+
"command": "npx @claude-flow/cli@latest hook pre-bash --command '${tool.params.command}'"
|
|
425
425
|
}]
|
|
426
426
|
}
|
|
427
427
|
],
|
|
@@ -430,14 +430,14 @@ Edit `.claude/settings.json` to configure hooks:
|
|
|
430
430
|
"matcher": "^(Write|Edit|MultiEdit)$",
|
|
431
431
|
"hooks": [{
|
|
432
432
|
"type": "command",
|
|
433
|
-
"command": "npx claude-flow hook post-edit --file '${tool.params.file_path}' --memory-key 'swarm/editor/complete' --auto-format --train-patterns"
|
|
433
|
+
"command": "npx @claude-flow/cli@latest hook post-edit --file '${tool.params.file_path}' --memory-key 'swarm/editor/complete' --auto-format --train-patterns"
|
|
434
434
|
}]
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
"matcher": "^Bash$",
|
|
438
438
|
"hooks": [{
|
|
439
439
|
"type": "command",
|
|
440
|
-
"command": "npx claude-flow hook post-bash --command '${tool.params.command}' --update-metrics"
|
|
440
|
+
"command": "npx @claude-flow/cli@latest hook post-bash --command '${tool.params.command}' --update-metrics"
|
|
441
441
|
}]
|
|
442
442
|
}
|
|
443
443
|
]
|
|
@@ -462,7 +462,7 @@ Complete hook configuration with all features:
|
|
|
462
462
|
"hooks": [
|
|
463
463
|
{
|
|
464
464
|
"type": "command",
|
|
465
|
-
"command": "npx claude-flow hook pre-edit --file '${tool.params.file_path}' --auto-assign-agent --validate-syntax",
|
|
465
|
+
"command": "npx @claude-flow/cli@latest hook pre-edit --file '${tool.params.file_path}' --auto-assign-agent --validate-syntax",
|
|
466
466
|
"timeout": 3000,
|
|
467
467
|
"continueOnError": true
|
|
468
468
|
}
|
|
@@ -473,7 +473,7 @@ Complete hook configuration with all features:
|
|
|
473
473
|
"hooks": [
|
|
474
474
|
{
|
|
475
475
|
"type": "command",
|
|
476
|
-
"command": "npx claude-flow hook pre-task --description '${tool.params.task}' --auto-spawn-agents --load-memory",
|
|
476
|
+
"command": "npx @claude-flow/cli@latest hook pre-task --description '${tool.params.task}' --auto-spawn-agents --load-memory",
|
|
477
477
|
"async": true
|
|
478
478
|
}
|
|
479
479
|
]
|
|
@@ -483,7 +483,7 @@ Complete hook configuration with all features:
|
|
|
483
483
|
"hooks": [
|
|
484
484
|
{
|
|
485
485
|
"type": "command",
|
|
486
|
-
"command": "npx claude-flow hook pre-search --query '${tool.params.pattern}' --check-cache"
|
|
486
|
+
"command": "npx @claude-flow/cli@latest hook pre-search --query '${tool.params.pattern}' --check-cache"
|
|
487
487
|
}
|
|
488
488
|
]
|
|
489
489
|
}
|
|
@@ -495,7 +495,7 @@ Complete hook configuration with all features:
|
|
|
495
495
|
"hooks": [
|
|
496
496
|
{
|
|
497
497
|
"type": "command",
|
|
498
|
-
"command": "npx claude-flow hook post-edit --file '${tool.params.file_path}' --memory-key 'edits/${tool.params.file_path}' --auto-format --train-patterns",
|
|
498
|
+
"command": "npx @claude-flow/cli@latest hook post-edit --file '${tool.params.file_path}' --memory-key 'edits/${tool.params.file_path}' --auto-format --train-patterns",
|
|
499
499
|
"async": true
|
|
500
500
|
}
|
|
501
501
|
]
|
|
@@ -505,7 +505,7 @@ Complete hook configuration with all features:
|
|
|
505
505
|
"hooks": [
|
|
506
506
|
{
|
|
507
507
|
"type": "command",
|
|
508
|
-
"command": "npx claude-flow hook post-task --task-id '${result.task_id}' --analyze-performance --store-decisions --export-learnings",
|
|
508
|
+
"command": "npx @claude-flow/cli@latest hook post-task --task-id '${result.task_id}' --analyze-performance --store-decisions --export-learnings",
|
|
509
509
|
"async": true
|
|
510
510
|
}
|
|
511
511
|
]
|
|
@@ -515,7 +515,7 @@ Complete hook configuration with all features:
|
|
|
515
515
|
"hooks": [
|
|
516
516
|
{
|
|
517
517
|
"type": "command",
|
|
518
|
-
"command": "npx claude-flow hook post-search --query '${tool.params.pattern}' --cache-results --train-patterns"
|
|
518
|
+
"command": "npx @claude-flow/cli@latest hook post-search --query '${tool.params.pattern}' --cache-results --train-patterns"
|
|
519
519
|
}
|
|
520
520
|
]
|
|
521
521
|
}
|
|
@@ -526,7 +526,7 @@ Complete hook configuration with all features:
|
|
|
526
526
|
"hooks": [
|
|
527
527
|
{
|
|
528
528
|
"type": "command",
|
|
529
|
-
"command": "npx claude-flow hook session-start --session-id '${session.id}' --load-context"
|
|
529
|
+
"command": "npx @claude-flow/cli@latest hook session-start --session-id '${session.id}' --load-context"
|
|
530
530
|
}
|
|
531
531
|
]
|
|
532
532
|
}
|
|
@@ -537,7 +537,7 @@ Complete hook configuration with all features:
|
|
|
537
537
|
"hooks": [
|
|
538
538
|
{
|
|
539
539
|
"type": "command",
|
|
540
|
-
"command": "npx claude-flow hook session-end --session-id '${session.id}' --export-metrics --generate-summary --cleanup-temp"
|
|
540
|
+
"command": "npx @claude-flow/cli@latest hook session-end --session-id '${session.id}' --export-metrics --generate-summary --cleanup-temp"
|
|
541
541
|
}
|
|
542
542
|
]
|
|
543
543
|
}
|
|
@@ -559,7 +559,7 @@ Add protection for sensitive files:
|
|
|
559
559
|
"hooks": [
|
|
560
560
|
{
|
|
561
561
|
"type": "command",
|
|
562
|
-
"command": "npx claude-flow hook check-protected --file '${tool.params.file_path}'"
|
|
562
|
+
"command": "npx @claude-flow/cli@latest hook check-protected --file '${tool.params.file_path}'"
|
|
563
563
|
}
|
|
564
564
|
]
|
|
565
565
|
}
|
|
@@ -599,7 +599,7 @@ Hooks automatically integrate with MCP tools for coordination:
|
|
|
599
599
|
|
|
600
600
|
```javascript
|
|
601
601
|
// Hook command
|
|
602
|
-
npx claude-flow hook pre-task --description "Build REST API"
|
|
602
|
+
npx @claude-flow/cli@latest hook pre-task --description "Build REST API"
|
|
603
603
|
|
|
604
604
|
// Internally calls MCP tools:
|
|
605
605
|
mcp__claude-flow__agent_spawn {
|
|
@@ -623,7 +623,7 @@ mcp__claude-flow__memory_usage {
|
|
|
623
623
|
|
|
624
624
|
```javascript
|
|
625
625
|
// Hook command
|
|
626
|
-
npx claude-flow hook post-edit --file "api/auth.js"
|
|
626
|
+
npx @claude-flow/cli@latest hook post-edit --file "api/auth.js"
|
|
627
627
|
|
|
628
628
|
// Internally calls MCP tools:
|
|
629
629
|
mcp__claude-flow__memory_usage {
|
|
@@ -649,7 +649,7 @@ mcp__claude-flow__neural_train {
|
|
|
649
649
|
|
|
650
650
|
```javascript
|
|
651
651
|
// Hook command
|
|
652
|
-
npx claude-flow hook session-end --session-id "dev-2024"
|
|
652
|
+
npx @claude-flow/cli@latest hook session-end --session-id "dev-2024"
|
|
653
653
|
|
|
654
654
|
// Internally calls MCP tools:
|
|
655
655
|
mcp__claude-flow__memory_persist {
|
|
@@ -776,7 +776,7 @@ FILES=$(git diff --cached --name-only --diff-filter=ACM)
|
|
|
776
776
|
|
|
777
777
|
for FILE in $FILES; do
|
|
778
778
|
# Run pre-edit hook for validation
|
|
779
|
-
npx claude-flow hook pre-edit --file "$FILE" --validate-syntax
|
|
779
|
+
npx @claude-flow/cli@latest hook pre-edit --file "$FILE" --validate-syntax
|
|
780
780
|
|
|
781
781
|
if [ $? -ne 0 ]; then
|
|
782
782
|
echo "Validation failed for $FILE"
|
|
@@ -784,7 +784,7 @@ for FILE in $FILES; do
|
|
|
784
784
|
fi
|
|
785
785
|
|
|
786
786
|
# Run post-edit hook for formatting
|
|
787
|
-
npx claude-flow hook post-edit --file "$FILE" --auto-format
|
|
787
|
+
npx @claude-flow/cli@latest hook post-edit --file "$FILE" --auto-format
|
|
788
788
|
done
|
|
789
789
|
|
|
790
790
|
# Run tests
|
|
@@ -803,7 +803,7 @@ exit $?
|
|
|
803
803
|
COMMIT_HASH=$(git rev-parse HEAD)
|
|
804
804
|
COMMIT_MSG=$(git log -1 --pretty=%B)
|
|
805
805
|
|
|
806
|
-
npx claude-flow hook notify \
|
|
806
|
+
npx @claude-flow/cli@latest hook notify \
|
|
807
807
|
--message "Commit completed: $COMMIT_MSG" \
|
|
808
808
|
--level info \
|
|
809
809
|
--swarm-status
|
|
@@ -820,12 +820,12 @@ npx claude-flow hook notify \
|
|
|
820
820
|
npm run test:all
|
|
821
821
|
|
|
822
822
|
# Run quality checks
|
|
823
|
-
npx claude-flow hook session-end \
|
|
823
|
+
npx @claude-flow/cli@latest hook session-end \
|
|
824
824
|
--generate-report \
|
|
825
825
|
--export-metrics
|
|
826
826
|
|
|
827
827
|
# Verify quality thresholds
|
|
828
|
-
TRUTH_SCORE=$(npx claude-flow metrics score --format json | jq -r '.truth_score')
|
|
828
|
+
TRUTH_SCORE=$(npx @claude-flow/cli@latest metrics score --format json | jq -r '.truth_score')
|
|
829
829
|
|
|
830
830
|
if (( $(echo "$TRUTH_SCORE < 0.95" | bc -l) )); then
|
|
831
831
|
echo "Truth score below threshold: $TRUTH_SCORE < 0.95"
|
|
@@ -844,13 +844,13 @@ How agents use hooks for coordination:
|
|
|
844
844
|
```bash
|
|
845
845
|
# Agent 1: Backend Developer
|
|
846
846
|
# STEP 1: Pre-task preparation
|
|
847
|
-
npx claude-flow hook pre-task \
|
|
847
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
848
848
|
--description "Implement user authentication API" \
|
|
849
849
|
--auto-spawn-agents \
|
|
850
850
|
--load-memory
|
|
851
851
|
|
|
852
852
|
# STEP 2: Work begins - pre-edit validation
|
|
853
|
-
npx claude-flow hook pre-edit \
|
|
853
|
+
npx @claude-flow/cli@latest hook pre-edit \
|
|
854
854
|
--file "api/auth.js" \
|
|
855
855
|
--auto-assign-agent \
|
|
856
856
|
--validate-syntax
|
|
@@ -859,20 +859,20 @@ npx claude-flow hook pre-edit \
|
|
|
859
859
|
# ... code changes ...
|
|
860
860
|
|
|
861
861
|
# STEP 4: Post-edit processing
|
|
862
|
-
npx claude-flow hook post-edit \
|
|
862
|
+
npx @claude-flow/cli@latest hook post-edit \
|
|
863
863
|
--file "api/auth.js" \
|
|
864
864
|
--memory-key "swarm/backend/auth-api" \
|
|
865
865
|
--auto-format \
|
|
866
866
|
--train-patterns
|
|
867
867
|
|
|
868
868
|
# STEP 5: Notify coordination system
|
|
869
|
-
npx claude-flow hook notify \
|
|
869
|
+
npx @claude-flow/cli@latest hook notify \
|
|
870
870
|
--message "Auth API implementation complete" \
|
|
871
871
|
--swarm-status \
|
|
872
872
|
--broadcast
|
|
873
873
|
|
|
874
874
|
# STEP 6: Task completion
|
|
875
|
-
npx claude-flow hook post-task \
|
|
875
|
+
npx @claude-flow/cli@latest hook post-task \
|
|
876
876
|
--task-id "auth-api" \
|
|
877
877
|
--analyze-performance \
|
|
878
878
|
--store-decisions \
|
|
@@ -882,25 +882,25 @@ npx claude-flow hook post-task \
|
|
|
882
882
|
```bash
|
|
883
883
|
# Agent 2: Test Engineer (receives notification)
|
|
884
884
|
# STEP 1: Check memory for API details
|
|
885
|
-
npx claude-flow hook session-restore \
|
|
885
|
+
npx @claude-flow/cli@latest hook session-restore \
|
|
886
886
|
--session-id "swarm-current" \
|
|
887
887
|
--restore-memory
|
|
888
888
|
|
|
889
889
|
# Memory contains: swarm/backend/auth-api with implementation details
|
|
890
890
|
|
|
891
891
|
# STEP 2: Generate tests
|
|
892
|
-
npx claude-flow hook pre-task \
|
|
892
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
893
893
|
--description "Write tests for auth API" \
|
|
894
894
|
--load-memory
|
|
895
895
|
|
|
896
896
|
# STEP 3: Create test file
|
|
897
|
-
npx claude-flow hook post-edit \
|
|
897
|
+
npx @claude-flow/cli@latest hook post-edit \
|
|
898
898
|
--file "api/auth.test.js" \
|
|
899
899
|
--memory-key "swarm/testing/auth-api-tests" \
|
|
900
900
|
--train-patterns
|
|
901
901
|
|
|
902
902
|
# STEP 4: Share test results
|
|
903
|
-
npx claude-flow hook notify \
|
|
903
|
+
npx @claude-flow/cli@latest hook notify \
|
|
904
904
|
--message "Auth API tests complete - 100% coverage" \
|
|
905
905
|
--broadcast
|
|
906
906
|
```
|
|
@@ -979,37 +979,37 @@ module.exports = {
|
|
|
979
979
|
|
|
980
980
|
```bash
|
|
981
981
|
# Session start - initialize coordination
|
|
982
|
-
npx claude-flow hook session-start --session-id "fullstack-feature"
|
|
982
|
+
npx @claude-flow/cli@latest hook session-start --session-id "fullstack-feature"
|
|
983
983
|
|
|
984
984
|
# Pre-task planning
|
|
985
|
-
npx claude-flow hook pre-task \
|
|
985
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
986
986
|
--description "Build user profile feature - frontend + backend + tests" \
|
|
987
987
|
--auto-spawn-agents \
|
|
988
988
|
--optimize-topology
|
|
989
989
|
|
|
990
990
|
# Backend work
|
|
991
|
-
npx claude-flow hook pre-edit --file "api/profile.js"
|
|
991
|
+
npx @claude-flow/cli@latest hook pre-edit --file "api/profile.js"
|
|
992
992
|
# ... implement backend ...
|
|
993
|
-
npx claude-flow hook post-edit \
|
|
993
|
+
npx @claude-flow/cli@latest hook post-edit \
|
|
994
994
|
--file "api/profile.js" \
|
|
995
995
|
--memory-key "profile/backend" \
|
|
996
996
|
--train-patterns
|
|
997
997
|
|
|
998
998
|
# Frontend work (reads backend details from memory)
|
|
999
|
-
npx claude-flow hook pre-edit --file "components/Profile.jsx"
|
|
999
|
+
npx @claude-flow/cli@latest hook pre-edit --file "components/Profile.jsx"
|
|
1000
1000
|
# ... implement frontend ...
|
|
1001
|
-
npx claude-flow hook post-edit \
|
|
1001
|
+
npx @claude-flow/cli@latest hook post-edit \
|
|
1002
1002
|
--file "components/Profile.jsx" \
|
|
1003
1003
|
--memory-key "profile/frontend" \
|
|
1004
1004
|
--train-patterns
|
|
1005
1005
|
|
|
1006
1006
|
# Testing (reads both backend and frontend from memory)
|
|
1007
|
-
npx claude-flow hook pre-task \
|
|
1007
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
1008
1008
|
--description "Test profile feature" \
|
|
1009
1009
|
--load-memory
|
|
1010
1010
|
|
|
1011
1011
|
# Session end - export everything
|
|
1012
|
-
npx claude-flow hook session-end \
|
|
1012
|
+
npx @claude-flow/cli@latest hook session-end \
|
|
1013
1013
|
--session-id "fullstack-feature" \
|
|
1014
1014
|
--export-metrics \
|
|
1015
1015
|
--generate-summary
|
|
@@ -1019,39 +1019,39 @@ npx claude-flow hook session-end \
|
|
|
1019
1019
|
|
|
1020
1020
|
```bash
|
|
1021
1021
|
# Start debugging session
|
|
1022
|
-
npx claude-flow hook session-start --session-id "debug-memory-leak"
|
|
1022
|
+
npx @claude-flow/cli@latest hook session-start --session-id "debug-memory-leak"
|
|
1023
1023
|
|
|
1024
1024
|
# Pre-task: analyze issue
|
|
1025
|
-
npx claude-flow hook pre-task \
|
|
1025
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
1026
1026
|
--description "Debug memory leak in event handlers" \
|
|
1027
1027
|
--load-memory \
|
|
1028
1028
|
--estimate-complexity
|
|
1029
1029
|
|
|
1030
1030
|
# Search for event emitters
|
|
1031
|
-
npx claude-flow hook pre-search --query "EventEmitter"
|
|
1031
|
+
npx @claude-flow/cli@latest hook pre-search --query "EventEmitter"
|
|
1032
1032
|
# ... search executes ...
|
|
1033
|
-
npx claude-flow hook post-search \
|
|
1033
|
+
npx @claude-flow/cli@latest hook post-search \
|
|
1034
1034
|
--query "EventEmitter" \
|
|
1035
1035
|
--cache-results
|
|
1036
1036
|
|
|
1037
1037
|
# Fix the issue
|
|
1038
|
-
npx claude-flow hook pre-edit \
|
|
1038
|
+
npx @claude-flow/cli@latest hook pre-edit \
|
|
1039
1039
|
--file "services/events.js" \
|
|
1040
1040
|
--backup-file
|
|
1041
1041
|
# ... fix code ...
|
|
1042
|
-
npx claude-flow hook post-edit \
|
|
1042
|
+
npx @claude-flow/cli@latest hook post-edit \
|
|
1043
1043
|
--file "services/events.js" \
|
|
1044
1044
|
--memory-key "debug/memory-leak-fix" \
|
|
1045
1045
|
--validate-output
|
|
1046
1046
|
|
|
1047
1047
|
# Verify fix
|
|
1048
|
-
npx claude-flow hook post-task \
|
|
1048
|
+
npx @claude-flow/cli@latest hook post-task \
|
|
1049
1049
|
--task-id "memory-leak-fix" \
|
|
1050
1050
|
--analyze-performance \
|
|
1051
1051
|
--generate-report
|
|
1052
1052
|
|
|
1053
1053
|
# End session
|
|
1054
|
-
npx claude-flow hook session-end \
|
|
1054
|
+
npx @claude-flow/cli@latest hook session-end \
|
|
1055
1055
|
--session-id "debug-memory-leak" \
|
|
1056
1056
|
--export-metrics
|
|
1057
1057
|
```
|
|
@@ -1060,27 +1060,27 @@ npx claude-flow hook session-end \
|
|
|
1060
1060
|
|
|
1061
1061
|
```bash
|
|
1062
1062
|
# Initialize swarm for refactoring
|
|
1063
|
-
npx claude-flow hook pre-task \
|
|
1063
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
1064
1064
|
--description "Refactor legacy codebase to modern patterns" \
|
|
1065
1065
|
--auto-spawn-agents \
|
|
1066
1066
|
--optimize-topology
|
|
1067
1067
|
|
|
1068
1068
|
# Agent 1: Code Analyzer
|
|
1069
|
-
npx claude-flow hook pre-task --description "Analyze code complexity"
|
|
1069
|
+
npx @claude-flow/cli@latest hook pre-task --description "Analyze code complexity"
|
|
1070
1070
|
# ... analysis ...
|
|
1071
|
-
npx claude-flow hook post-task \
|
|
1071
|
+
npx @claude-flow/cli@latest hook post-task \
|
|
1072
1072
|
--task-id "analysis" \
|
|
1073
1073
|
--store-decisions
|
|
1074
1074
|
|
|
1075
1075
|
# Agent 2: Refactoring (reads analysis from memory)
|
|
1076
|
-
npx claude-flow hook session-restore \
|
|
1076
|
+
npx @claude-flow/cli@latest hook session-restore \
|
|
1077
1077
|
--session-id "swarm-refactor" \
|
|
1078
1078
|
--restore-memory
|
|
1079
1079
|
|
|
1080
1080
|
for file in src/**/*.js; do
|
|
1081
|
-
npx claude-flow hook pre-edit --file "$file" --backup-file
|
|
1081
|
+
npx @claude-flow/cli@latest hook pre-edit --file "$file" --backup-file
|
|
1082
1082
|
# ... refactor ...
|
|
1083
|
-
npx claude-flow hook post-edit \
|
|
1083
|
+
npx @claude-flow/cli@latest hook post-edit \
|
|
1084
1084
|
--file "$file" \
|
|
1085
1085
|
--memory-key "refactor/$file" \
|
|
1086
1086
|
--auto-format \
|
|
@@ -1088,12 +1088,12 @@ for file in src/**/*.js; do
|
|
|
1088
1088
|
done
|
|
1089
1089
|
|
|
1090
1090
|
# Agent 3: Testing (reads refactored code from memory)
|
|
1091
|
-
npx claude-flow hook pre-task \
|
|
1091
|
+
npx @claude-flow/cli@latest hook pre-task \
|
|
1092
1092
|
--description "Generate tests for refactored code" \
|
|
1093
1093
|
--load-memory
|
|
1094
1094
|
|
|
1095
1095
|
# Broadcast completion
|
|
1096
|
-
npx claude-flow hook notify \
|
|
1096
|
+
npx @claude-flow/cli@latest hook notify \
|
|
1097
1097
|
--message "Refactoring complete - all tests passing" \
|
|
1098
1098
|
--broadcast
|
|
1099
1099
|
```
|
|
@@ -1117,13 +1117,13 @@ Enable debug mode for troubleshooting:
|
|
|
1117
1117
|
export CLAUDE_FLOW_DEBUG=true
|
|
1118
1118
|
|
|
1119
1119
|
# Test specific hook with verbose output
|
|
1120
|
-
npx claude-flow hook pre-edit --file "test.js" --debug
|
|
1120
|
+
npx @claude-flow/cli@latest hook pre-edit --file "test.js" --debug
|
|
1121
1121
|
|
|
1122
1122
|
# Check hook execution logs
|
|
1123
1123
|
cat .claude-flow/logs/hooks-$(date +%Y-%m-%d).log
|
|
1124
1124
|
|
|
1125
1125
|
# Validate configuration
|
|
1126
|
-
npx claude-flow hook validate-config
|
|
1126
|
+
npx @claude-flow/cli@latest hook validate-config
|
|
1127
1127
|
```
|
|
1128
1128
|
|
|
1129
1129
|
### Benefits
|
|
@@ -1183,12 +1183,12 @@ npx claude-flow hook validate-config
|
|
|
1183
1183
|
|
|
1184
1184
|
### Related Commands
|
|
1185
1185
|
|
|
1186
|
-
- `npx claude-flow init --hooks` - Initialize hooks system
|
|
1187
|
-
- `npx claude-flow hook --list` - List available hooks
|
|
1188
|
-
- `npx claude-flow hook --test <hook>` - Test specific hook
|
|
1189
|
-
- `npx claude-flow memory usage` - Manage memory
|
|
1190
|
-
- `npx claude-flow agent spawn` - Spawn agents
|
|
1191
|
-
- `npx claude-flow swarm init` - Initialize swarm
|
|
1186
|
+
- `npx @claude-flow/cli@latest init --hooks` - Initialize hooks system
|
|
1187
|
+
- `npx @claude-flow/cli@latest hook --list` - List available hooks
|
|
1188
|
+
- `npx @claude-flow/cli@latest hook --test <hook>` - Test specific hook
|
|
1189
|
+
- `npx @claude-flow/cli@latest memory usage` - Manage memory
|
|
1190
|
+
- `npx @claude-flow/cli@latest agent spawn` - Spawn agents
|
|
1191
|
+
- `npx @claude-flow/cli@latest swarm init` - Initialize swarm
|
|
1192
1192
|
|
|
1193
1193
|
### Integration with Other Skills
|
|
1194
1194
|
|