claude-flow-novice 1.5.1 → 1.5.3
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/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/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/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/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/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/slash-commands/benchmark-prompts.js +281 -0
- package/CLAUDE.md +1 -1
- 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
package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# hook pre-search
|
|
2
|
+
|
|
3
|
+
Optimize search operations with caching and intelligent filtering.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook pre-search [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--query, -q <text>` - Search query to optimize
|
|
14
|
+
- `--cache-results` - Cache search results (default: true)
|
|
15
|
+
- `--suggest-filters` - Suggest search filters
|
|
16
|
+
- `--check-memory` - Check memory for answers
|
|
17
|
+
- `--expand-query` - Expand search terms
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic pre-search hook
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook pre-search --query "authentication implementation"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### With caching
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook pre-search -q "React hooks usage" --cache-results
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Memory check first
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook pre-search -q "previous bug fixes" --check-memory
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Query expansion
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook pre-search -q "auth" --expand-query --suggest-filters
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Result Caching
|
|
48
|
+
|
|
49
|
+
- Stores search results
|
|
50
|
+
- Enables instant retrieval
|
|
51
|
+
- Reduces redundant searches
|
|
52
|
+
- Updates intelligently
|
|
53
|
+
|
|
54
|
+
### Filter Suggestions
|
|
55
|
+
|
|
56
|
+
- File type filters
|
|
57
|
+
- Directory scoping
|
|
58
|
+
- Time-based filtering
|
|
59
|
+
- Pattern matching
|
|
60
|
+
|
|
61
|
+
### Memory Checking
|
|
62
|
+
|
|
63
|
+
- Searches stored knowledge
|
|
64
|
+
- Finds previous results
|
|
65
|
+
- Avoids repetition
|
|
66
|
+
- Speeds up retrieval
|
|
67
|
+
|
|
68
|
+
### Query Expansion
|
|
69
|
+
|
|
70
|
+
- Adds synonyms
|
|
71
|
+
- Includes related terms
|
|
72
|
+
- Handles abbreviations
|
|
73
|
+
- Improves coverage
|
|
74
|
+
|
|
75
|
+
## Integration
|
|
76
|
+
|
|
77
|
+
This hook is automatically called by Claude Code when:
|
|
78
|
+
|
|
79
|
+
- Using Grep tool
|
|
80
|
+
- Using Glob tool
|
|
81
|
+
- Searching codebase
|
|
82
|
+
- Finding patterns
|
|
83
|
+
|
|
84
|
+
Manual usage in agents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Before searching
|
|
88
|
+
npx claude-flow hook pre-search --query "your search" --cache-results --check-memory
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Returns JSON with:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"query": "authentication implementation",
|
|
98
|
+
"cached": true,
|
|
99
|
+
"cacheHit": false,
|
|
100
|
+
"memoryResults": 3,
|
|
101
|
+
"expandedQuery": "(auth|authentication|login|oauth) (impl|implementation|code)",
|
|
102
|
+
"suggestedFilters": ["*.js", "*.ts", "src/**"],
|
|
103
|
+
"estimatedFiles": 45
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## See Also
|
|
108
|
+
|
|
109
|
+
- `Grep` - Content search tool
|
|
110
|
+
- `Glob` - File pattern tool
|
|
111
|
+
- `memory search` - Memory queries
|
|
112
|
+
- `cache manage` - Cache operations
|
package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
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
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# hook session-restore
|
|
2
|
+
|
|
3
|
+
Restore a previous session's context and state.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook session-restore [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--session-id, -s <id>` - Session ID to restore
|
|
14
|
+
- `--load-memory` - Load session memories (default: true)
|
|
15
|
+
- `--restore-files` - Reopen previous files
|
|
16
|
+
- `--resume-tasks` - Continue incomplete tasks
|
|
17
|
+
- `--merge-context` - Merge with current context
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic session restore
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook session-restore --session-id "dev-session-2024"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Full restoration
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook session-restore -s "feature-auth" --load-memory --restore-files --resume-tasks
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Selective restore
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook session-restore -s "bug-fix-123" --load-memory --resume-tasks
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Context merging
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook session-restore -s "refactor-api" --merge-context
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Memory Loading
|
|
48
|
+
|
|
49
|
+
- Retrieves stored decisions
|
|
50
|
+
- Loads implementation notes
|
|
51
|
+
- Restores agent configs
|
|
52
|
+
- Recovers context
|
|
53
|
+
|
|
54
|
+
### File Restoration
|
|
55
|
+
|
|
56
|
+
- Lists previously open files
|
|
57
|
+
- Suggests file reopening
|
|
58
|
+
- Maintains edit history
|
|
59
|
+
- Preserves cursor positions
|
|
60
|
+
|
|
61
|
+
### Task Resumption
|
|
62
|
+
|
|
63
|
+
- Shows incomplete tasks
|
|
64
|
+
- Restores task progress
|
|
65
|
+
- Loads task dependencies
|
|
66
|
+
- Continues workflows
|
|
67
|
+
|
|
68
|
+
### Context Merging
|
|
69
|
+
|
|
70
|
+
- Combines sessions
|
|
71
|
+
- Merges memories
|
|
72
|
+
- Unifies task lists
|
|
73
|
+
- Prevents conflicts
|
|
74
|
+
|
|
75
|
+
## Integration
|
|
76
|
+
|
|
77
|
+
This hook is automatically called by Claude Code when:
|
|
78
|
+
|
|
79
|
+
- Resuming previous work
|
|
80
|
+
- After unexpected shutdown
|
|
81
|
+
- Loading saved sessions
|
|
82
|
+
- Switching between projects
|
|
83
|
+
|
|
84
|
+
Manual usage in agents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# To restore context
|
|
88
|
+
npx claude-flow hook session-restore --session-id "previous-session" --load-memory
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Returns JSON with:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"sessionId": "dev-session-2024",
|
|
98
|
+
"restored": true,
|
|
99
|
+
"memories": 25,
|
|
100
|
+
"files": ["src/auth/login.js", "src/api/users.js"],
|
|
101
|
+
"tasks": {
|
|
102
|
+
"incomplete": 3,
|
|
103
|
+
"completed": 12
|
|
104
|
+
},
|
|
105
|
+
"context": {
|
|
106
|
+
"project": "auth-system",
|
|
107
|
+
"branch": "feature/oauth"
|
|
108
|
+
},
|
|
109
|
+
"warnings": []
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## See Also
|
|
114
|
+
|
|
115
|
+
- `hook session-start` - New session setup
|
|
116
|
+
- `hook session-end` - Session cleanup
|
|
117
|
+
- `memory usage` - Memory operations
|
|
118
|
+
- `task status` - Task checking
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# hook session-start
|
|
2
|
+
|
|
3
|
+
Initialize a new work session with context loading and environment setup.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-flow hook session-start [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
- `--session-id, -s <id>` - Unique session identifier
|
|
14
|
+
- `--restore-context` - Restore previous session context (default: true)
|
|
15
|
+
- `--load-preferences` - Load user preferences
|
|
16
|
+
- `--init-swarm` - Initialize swarm automatically
|
|
17
|
+
- `--telemetry` - Enable session telemetry
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Basic session start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx claude-flow hook session-start --session-id "dev-session-2024"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### With full restoration
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx claude-flow hook session-start -s "feature-auth" --restore-context --load-preferences
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Auto swarm initialization
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx claude-flow hook session-start -s "bug-fix-789" --init-swarm
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Telemetry enabled
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx claude-flow hook session-start -s "performance-opt" --telemetry
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Context Restoration
|
|
48
|
+
|
|
49
|
+
- Loads previous session state
|
|
50
|
+
- Restores open files
|
|
51
|
+
- Recovers task progress
|
|
52
|
+
- Maintains continuity
|
|
53
|
+
|
|
54
|
+
### Preference Loading
|
|
55
|
+
|
|
56
|
+
- User configuration
|
|
57
|
+
- Editor settings
|
|
58
|
+
- Tool preferences
|
|
59
|
+
- Custom shortcuts
|
|
60
|
+
|
|
61
|
+
### Swarm Initialization
|
|
62
|
+
|
|
63
|
+
- Auto-detects project type
|
|
64
|
+
- Spawns relevant agents
|
|
65
|
+
- Configures topology
|
|
66
|
+
- Prepares coordination
|
|
67
|
+
|
|
68
|
+
### Telemetry Setup
|
|
69
|
+
|
|
70
|
+
- Tracks session metrics
|
|
71
|
+
- Monitors performance
|
|
72
|
+
- Records patterns
|
|
73
|
+
- Enables analytics
|
|
74
|
+
|
|
75
|
+
## Integration
|
|
76
|
+
|
|
77
|
+
This hook is automatically called by Claude Code when:
|
|
78
|
+
|
|
79
|
+
- Starting a new conversation
|
|
80
|
+
- Beginning work session
|
|
81
|
+
- After Claude Code restart
|
|
82
|
+
- Switching projects
|
|
83
|
+
|
|
84
|
+
Manual usage in agents:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# At session start
|
|
88
|
+
npx claude-flow hook session-start --session-id "your-session" --restore-context
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Returns JSON with:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"sessionId": "dev-session-2024",
|
|
98
|
+
"restored": true,
|
|
99
|
+
"previousSession": "dev-session-2023",
|
|
100
|
+
"contextLoaded": {
|
|
101
|
+
"files": 5,
|
|
102
|
+
"tasks": 3,
|
|
103
|
+
"memories": 12
|
|
104
|
+
},
|
|
105
|
+
"swarmInitialized": true,
|
|
106
|
+
"topology": "hierarchical",
|
|
107
|
+
"agentsReady": 6,
|
|
108
|
+
"telemetryEnabled": true
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## See Also
|
|
113
|
+
|
|
114
|
+
- `hook session-end` - Session cleanup
|
|
115
|
+
- `hook session-restore` - Manual restoration
|
|
116
|
+
- `swarm init` - Swarm initialization
|
|
117
|
+
- `memory usage` - Memory management
|