claude-flow-novice 1.5.2 → 1.5.4
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/SPARSE_LANGUAGE_FINDINGS.md +991 -0
- package/.claude/agents/architecture/system-architect.md +3 -44
- package/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
- package/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
- package/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
- package/.claude/agents/data/ml/data-ml-model.md +5 -119
- package/.claude/agents/development/backend/dev-backend-api.md +4 -115
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
- package/.claude/agents/github/multi-repo-swarm.md +1 -28
- package/.claude/agents/github/pr-manager.md +1 -29
- package/.claude/agents/github/project-board-sync.md +1 -32
- package/.claude/agents/github/release-manager.md +1 -32
- package/.claude/agents/github/release-swarm.md +1 -33
- package/.claude/agents/github/repo-architect.md +1 -34
- package/.claude/agents/github/swarm-issue.md +1 -26
- package/.claude/agents/github/swarm-pr.md +1 -30
- package/.claude/agents/github/sync-coordinator.md +1 -30
- package/.claude/agents/github/workflow-automation.md +1 -31
- package/.claude/agents/neural/neural-pattern-agent.md +2 -50
- package/.claude/agents/specialized/CODER_AGENT_GUIDELINES.md +1245 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
- package/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
- package/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
- package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
- package/.claude/agents/sublinear/pagerank-agent.md +2 -19
- package/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
- package/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
- package/.claude/agents/sublinear/sublinear.md +2 -1
- package/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
- package/.claude/agents/testing/e2e/playwright-agent.md +7 -0
- package/.claude-flow-novice/.claude/agents/SPARSE_LANGUAGE_FINDINGS.md +991 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +3 -44
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +5 -119
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +4 -115
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +1 -28
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +1 -29
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +1 -32
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +1 -32
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +1 -33
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +1 -34
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +1 -26
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +1 -30
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +1 -30
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +1 -31
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +2 -50
- package/.claude-flow-novice/.claude/agents/specialized/CODER_AGENT_GUIDELINES.md +1245 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +2 -1
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +7 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/CLAUDE.md +188 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow-universal +81 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.bat +18 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.ps1 +24 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-md.js +982 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/automation/auto-agent.md +122 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/coordination/swarm-init.md +85 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/github/github-swarm.md +121 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/notification.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-command.md +116 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-edit.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-task.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-command.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-edit.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-search.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-task.md +111 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-end.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-restore.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-start.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination-md.js +340 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/enhanced-templates.js +2347 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe-enhanced.js +331 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe.js +106 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/index.js +1896 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank-md.js +259 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/readme-files.js +72 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/safe-hook-patterns.js +430 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json +109 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json.enhanced +35 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/sparc-modes.js +1401 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +188 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +982 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe.js +106 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/readme-files.js +72 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json +109 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/verification-claude-md.js +432 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init.js +4 -0
- package/.claude-flow-novice/dist/src/slash-commands/benchmark-prompts.js +281 -0
- package/CLAUDE.md +1927 -127
- package/package.json +3 -3
- package/src/cli/simple-commands/init/index.js +39 -4
- package/src/cli/simple-commands/init/templates/CLAUDE.md +8 -10
- package/src/slash-commands/benchmark-prompts.js +281 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# hook notification
|
|
2
|
+
|
|
3
|
+
Send coordination notifications and track important decisions.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook notification [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--message, -m <text>` - Notification message
|
|
14
|
+
- `--level, -l <level>` - Message level (info/warning/error/success)
|
|
15
|
+
- `--telemetry` - Include in telemetry (default: true)
|
|
16
|
+
- `--broadcast` - Broadcast to all agents
|
|
17
|
+
- `--memory-store` - Store in memory
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic notification
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook notification --message "Completed authentication module"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Warning notification
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook notification -m "Potential security issue found" -l warning
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Broadcast to swarm
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook notification -m "API refactoring started" --broadcast
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Decision tracking
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook notification -m "Chose JWT over sessions for auth" --memory-store
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Message Levels
|
|
48
|
+
|
|
49
|
+
- **info** - General information
|
|
50
|
+
- **warning** - Important notices
|
|
51
|
+
- **error** - Error conditions
|
|
52
|
+
- **success** - Completion notices
|
|
53
|
+
|
|
54
|
+
### Telemetry Integration
|
|
55
|
+
|
|
56
|
+
- Tracks key events
|
|
57
|
+
- Records decisions
|
|
58
|
+
- Monitors progress
|
|
59
|
+
- Enables analytics
|
|
60
|
+
|
|
61
|
+
### Agent Broadcasting
|
|
62
|
+
|
|
63
|
+
- Notifies all agents
|
|
64
|
+
- Ensures coordination
|
|
65
|
+
- Shares context
|
|
66
|
+
- Prevents conflicts
|
|
67
|
+
|
|
68
|
+
### Memory Storage
|
|
69
|
+
|
|
70
|
+
- Persists decisions
|
|
71
|
+
- Creates audit trail
|
|
72
|
+
- Enables learning
|
|
73
|
+
- Maintains history
|
|
74
|
+
|
|
75
|
+
## Integration
|
|
76
|
+
|
|
77
|
+
This hook is used by agents for:
|
|
78
|
+
|
|
79
|
+
- Sharing progress updates
|
|
80
|
+
- Recording decisions
|
|
81
|
+
- Warning about issues
|
|
82
|
+
- Coordinating actions
|
|
83
|
+
|
|
84
|
+
Manual usage in agents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# For coordination
|
|
88
|
+
npx claude-flow hook notification --message "Starting database migration" --broadcast --memory-store
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Returns JSON with:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"message": "Completed authentication module",
|
|
98
|
+
"level": "success",
|
|
99
|
+
"timestamp": 1234567890,
|
|
100
|
+
"telemetryRecorded": true,
|
|
101
|
+
"broadcasted": false,
|
|
102
|
+
"memoryKey": "notifications/success/auth-complete",
|
|
103
|
+
"recipients": ["coordinator", "tester"],
|
|
104
|
+
"acknowledged": true
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## See Also
|
|
109
|
+
|
|
110
|
+
- `agent list` - View active agents
|
|
111
|
+
- `memory usage` - Memory storage
|
|
112
|
+
- `swarm monitor` - Real-time monitoring
|
|
113
|
+
- `telemetry` - Analytics tracking
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# hook post-command
|
|
2
|
+
|
|
3
|
+
Execute post-command processing including output analysis and state updates.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook post-command [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--command, -c <cmd>` - Command that was executed
|
|
14
|
+
- `--exit-code, -e <code>` - Command exit code
|
|
15
|
+
- `--analyze-output` - Analyze command output (default: true)
|
|
16
|
+
- `--update-cache` - Update command cache
|
|
17
|
+
- `--track-metrics` - Track performance metrics
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic post-command hook
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook post-command --command "npm test" --exit-code 0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### With output analysis
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook post-command -c "git status" -e 0 --analyze-output
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Cache update
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook post-command -c "npm list" -e 0 --update-cache
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Performance tracking
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook post-command -c "build.sh" -e 0 --track-metrics
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Output Analysis
|
|
48
|
+
|
|
49
|
+
- Parses command output
|
|
50
|
+
- Extracts key information
|
|
51
|
+
- Identifies errors/warnings
|
|
52
|
+
- Summarizes results
|
|
53
|
+
|
|
54
|
+
### Cache Management
|
|
55
|
+
|
|
56
|
+
- Stores command results
|
|
57
|
+
- Enables fast re-execution
|
|
58
|
+
- Tracks output changes
|
|
59
|
+
- Reduces redundant runs
|
|
60
|
+
|
|
61
|
+
### Metric Tracking
|
|
62
|
+
|
|
63
|
+
- Records execution time
|
|
64
|
+
- Monitors resource usage
|
|
65
|
+
- Tracks success rates
|
|
66
|
+
- Identifies bottlenecks
|
|
67
|
+
|
|
68
|
+
### State Updates
|
|
69
|
+
|
|
70
|
+
- Updates project state
|
|
71
|
+
- Refreshes file indexes
|
|
72
|
+
- Syncs dependencies
|
|
73
|
+
- Maintains consistency
|
|
74
|
+
|
|
75
|
+
## Integration
|
|
76
|
+
|
|
77
|
+
This hook is automatically called by Claude Code when:
|
|
78
|
+
|
|
79
|
+
- After Bash tool execution
|
|
80
|
+
- Following shell commands
|
|
81
|
+
- Post build/test operations
|
|
82
|
+
- After system changes
|
|
83
|
+
|
|
84
|
+
Manual usage in agents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# After running commands
|
|
88
|
+
npx claude-flow hook post-command --command "npm build" --exit-code 0 --analyze-output
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Returns JSON with:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"command": "npm test",
|
|
98
|
+
"exitCode": 0,
|
|
99
|
+
"duration": 45230,
|
|
100
|
+
"outputSummary": "All 42 tests passed",
|
|
101
|
+
"cached": true,
|
|
102
|
+
"metrics": {
|
|
103
|
+
"cpuUsage": "45%",
|
|
104
|
+
"memoryPeak": "256MB"
|
|
105
|
+
},
|
|
106
|
+
"stateChanges": ["test-results.json updated"],
|
|
107
|
+
"warnings": []
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## See Also
|
|
112
|
+
|
|
113
|
+
- `hook pre-command` - Pre-command validation
|
|
114
|
+
- `Bash` - Command execution tool
|
|
115
|
+
- `cache manage` - Cache operations
|
|
116
|
+
- `metrics collect` - Performance data
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# hook post-edit
|
|
2
|
+
|
|
3
|
+
Execute post-edit processing including formatting, validation, and memory updates.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook post-edit [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--file, -f <path>` - File path that was edited
|
|
14
|
+
- `--auto-format` - Automatically format code (default: true)
|
|
15
|
+
- `--memory-key, -m <key>` - Store edit context in memory
|
|
16
|
+
- `--train-patterns` - Train neural patterns from edit
|
|
17
|
+
- `--validate-output` - Validate edited file
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic post-edit hook
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook post-edit --file "src/components/Button.jsx"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### With memory storage
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook post-edit -f "api/auth.js" --memory-key "auth/login-implementation"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Format and validate
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook post-edit -f "config/webpack.js" --auto-format --validate-output
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Neural training
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook post-edit -f "utils/helpers.ts" --train-patterns --memory-key "utils/refactor"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Auto Formatting
|
|
48
|
+
|
|
49
|
+
- Language-specific formatters
|
|
50
|
+
- Prettier for JS/TS/JSON
|
|
51
|
+
- Black for Python
|
|
52
|
+
- gofmt for Go
|
|
53
|
+
- Maintains consistency
|
|
54
|
+
|
|
55
|
+
### Memory Storage
|
|
56
|
+
|
|
57
|
+
- Saves edit context
|
|
58
|
+
- Records decisions made
|
|
59
|
+
- Tracks implementation details
|
|
60
|
+
- Enables knowledge sharing
|
|
61
|
+
|
|
62
|
+
### Pattern Training
|
|
63
|
+
|
|
64
|
+
- Learns from successful edits
|
|
65
|
+
- Improves future suggestions
|
|
66
|
+
- Adapts to coding style
|
|
67
|
+
- Enhances coordination
|
|
68
|
+
|
|
69
|
+
### Output Validation
|
|
70
|
+
|
|
71
|
+
- Checks syntax correctness
|
|
72
|
+
- Runs linting rules
|
|
73
|
+
- Validates formatting
|
|
74
|
+
- Ensures quality
|
|
75
|
+
|
|
76
|
+
## Integration
|
|
77
|
+
|
|
78
|
+
This hook is automatically called by Claude Code when:
|
|
79
|
+
|
|
80
|
+
- After Edit tool completes
|
|
81
|
+
- Following MultiEdit operations
|
|
82
|
+
- During file saves
|
|
83
|
+
- After code generation
|
|
84
|
+
|
|
85
|
+
Manual usage in agents:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# After editing files
|
|
89
|
+
npx claude-flow hook post-edit --file "path/to/edited.js" --memory-key "feature/step1"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Output
|
|
93
|
+
|
|
94
|
+
Returns JSON with:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"file": "src/components/Button.jsx",
|
|
99
|
+
"formatted": true,
|
|
100
|
+
"formatterUsed": "prettier",
|
|
101
|
+
"lintPassed": true,
|
|
102
|
+
"memorySaved": "component/button-refactor",
|
|
103
|
+
"patternsTrained": 3,
|
|
104
|
+
"warnings": [],
|
|
105
|
+
"stats": {
|
|
106
|
+
"linesChanged": 45,
|
|
107
|
+
"charactersAdded": 234
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## See Also
|
|
113
|
+
|
|
114
|
+
- `hook pre-edit` - Pre-edit preparation
|
|
115
|
+
- `Edit` - File editing tool
|
|
116
|
+
- `memory usage` - Memory management
|
|
117
|
+
- `neural train` - Pattern training
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# hook pre-command
|
|
2
|
+
|
|
3
|
+
Execute pre-command validations and safety checks before running shell commands.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook pre-command [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--command, -c <cmd>` - Command to be executed
|
|
14
|
+
- `--validate-safety` - Check command safety (default: true)
|
|
15
|
+
- `--check-permissions` - Verify execution permissions
|
|
16
|
+
- `--estimate-duration` - Estimate command runtime
|
|
17
|
+
- `--dry-run` - Preview without executing
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic pre-command hook
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook pre-command --command "npm install express"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Safety validation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook pre-command -c "rm -rf node_modules" --validate-safety
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Permission check
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook pre-command -c "sudo apt update" --check-permissions
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Dry run preview
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook pre-command -c "git push origin main" --dry-run
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Safety Validation
|
|
48
|
+
|
|
49
|
+
- Detects dangerous commands
|
|
50
|
+
- Warns about destructive operations
|
|
51
|
+
- Checks for sudo/admin usage
|
|
52
|
+
- Validates command syntax
|
|
53
|
+
|
|
54
|
+
### Permission Checking
|
|
55
|
+
|
|
56
|
+
- Verifies execution rights
|
|
57
|
+
- Checks directory access
|
|
58
|
+
- Validates file permissions
|
|
59
|
+
- Ensures proper context
|
|
60
|
+
|
|
61
|
+
### Duration Estimation
|
|
62
|
+
|
|
63
|
+
- Predicts execution time
|
|
64
|
+
- Warns about long operations
|
|
65
|
+
- Suggests timeouts
|
|
66
|
+
- Tracks historical data
|
|
67
|
+
|
|
68
|
+
### Dry Run Mode
|
|
69
|
+
|
|
70
|
+
- Shows command effects
|
|
71
|
+
- Lists files affected
|
|
72
|
+
- Previews changes
|
|
73
|
+
- No actual execution
|
|
74
|
+
|
|
75
|
+
## Integration
|
|
76
|
+
|
|
77
|
+
This hook is automatically called by Claude Code when:
|
|
78
|
+
|
|
79
|
+
- Using Bash tool
|
|
80
|
+
- Running shell commands
|
|
81
|
+
- Executing npm/pip/cargo commands
|
|
82
|
+
- System operations
|
|
83
|
+
|
|
84
|
+
Manual usage in agents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Before running commands
|
|
88
|
+
npx claude-flow hook pre-command --command "your command here" --validate-safety
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Returns JSON with:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"continue": true,
|
|
98
|
+
"command": "npm install express",
|
|
99
|
+
"safe": true,
|
|
100
|
+
"estimatedDuration": 15000,
|
|
101
|
+
"warnings": [],
|
|
102
|
+
"permissions": "user",
|
|
103
|
+
"affectedFiles": ["package.json", "package-lock.json"],
|
|
104
|
+
"dryRunOutput": "Would install 50 packages"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## See Also
|
|
109
|
+
|
|
110
|
+
- `hook post-command` - Post-command processing
|
|
111
|
+
- `Bash` - Command execution tool
|
|
112
|
+
- `terminal execute` - Terminal operations
|
|
113
|
+
- `security scan` - Security validation
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|