claude-flow-novice 1.5.2 → 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.
Files changed (132) hide show
  1. package/.claude/agents/architecture/system-architect.md +3 -44
  2. package/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
  3. package/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
  4. package/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
  5. package/.claude/agents/data/ml/data-ml-model.md +5 -119
  6. package/.claude/agents/development/backend/dev-backend-api.md +4 -115
  7. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
  8. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
  9. package/.claude/agents/github/multi-repo-swarm.md +1 -28
  10. package/.claude/agents/github/pr-manager.md +1 -29
  11. package/.claude/agents/github/project-board-sync.md +1 -32
  12. package/.claude/agents/github/release-manager.md +1 -32
  13. package/.claude/agents/github/release-swarm.md +1 -33
  14. package/.claude/agents/github/repo-architect.md +1 -34
  15. package/.claude/agents/github/swarm-issue.md +1 -26
  16. package/.claude/agents/github/swarm-pr.md +1 -30
  17. package/.claude/agents/github/sync-coordinator.md +1 -30
  18. package/.claude/agents/github/workflow-automation.md +1 -31
  19. package/.claude/agents/neural/neural-pattern-agent.md +2 -50
  20. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
  21. package/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
  22. package/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
  23. package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
  24. package/.claude/agents/sublinear/pagerank-agent.md +2 -19
  25. package/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
  26. package/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
  27. package/.claude/agents/sublinear/sublinear.md +2 -1
  28. package/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
  29. package/.claude/agents/testing/e2e/playwright-agent.md +7 -0
  30. package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +3 -44
  31. package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
  32. package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
  33. package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
  34. package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +5 -119
  35. package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +4 -115
  36. package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
  37. package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
  38. package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +1 -28
  39. package/.claude-flow-novice/.claude/agents/github/pr-manager.md +1 -29
  40. package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +1 -32
  41. package/.claude-flow-novice/.claude/agents/github/release-manager.md +1 -32
  42. package/.claude-flow-novice/.claude/agents/github/release-swarm.md +1 -33
  43. package/.claude-flow-novice/.claude/agents/github/repo-architect.md +1 -34
  44. package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +1 -26
  45. package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +1 -30
  46. package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +1 -30
  47. package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +1 -31
  48. package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +2 -50
  49. package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
  50. package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
  51. package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
  52. package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
  53. package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +2 -19
  54. package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
  55. package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
  56. package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +2 -1
  57. package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
  58. package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +7 -0
  59. package/.claude-flow-novice/dist/src/cli/simple-commands/init/CLAUDE.md +188 -0
  60. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow-universal +81 -0
  61. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.bat +18 -0
  62. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.ps1 +24 -0
  63. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-md.js +982 -0
  64. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/analysis/bottleneck-detect.md +162 -0
  65. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/automation/auto-agent.md +122 -0
  66. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/coordination/swarm-init.md +85 -0
  67. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/github/github-swarm.md +121 -0
  68. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/helpers/standard-checkpoint-hooks.sh +179 -0
  69. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/notification.md +113 -0
  70. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-command.md +116 -0
  71. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-edit.md +117 -0
  72. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-task.md +112 -0
  73. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-command.md +113 -0
  74. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-edit.md +113 -0
  75. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-search.md +112 -0
  76. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-task.md +111 -0
  77. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-end.md +118 -0
  78. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-restore.md +118 -0
  79. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-start.md +117 -0
  80. package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination-md.js +340 -0
  81. package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination.md +16 -0
  82. package/.claude-flow-novice/dist/src/cli/simple-commands/init/enhanced-templates.js +2347 -0
  83. package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe-enhanced.js +331 -0
  84. package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe.js +106 -0
  85. package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank-md.js +259 -0
  86. package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank.md +16 -0
  87. package/.claude-flow-novice/dist/src/cli/simple-commands/init/readme-files.js +72 -0
  88. package/.claude-flow-novice/dist/src/cli/simple-commands/init/safe-hook-patterns.js +430 -0
  89. package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json +109 -0
  90. package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json.enhanced +35 -0
  91. package/.claude-flow-novice/dist/src/cli/simple-commands/init/sparc-modes.js +1401 -0
  92. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +188 -0
  93. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
  94. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
  95. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
  96. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +982 -0
  97. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
  98. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
  99. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
  100. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
  101. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
  102. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
  103. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
  104. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
  105. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
  106. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
  107. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
  108. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
  109. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
  110. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
  111. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
  112. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
  113. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
  114. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination.md +16 -0
  115. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
  116. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
  117. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe.js +106 -0
  118. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
  119. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
  120. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/readme-files.js +72 -0
  121. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
  122. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json +109 -0
  123. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
  124. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
  125. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
  126. package/.claude-flow-novice/dist/src/cli/simple-commands/init/verification-claude-md.js +432 -0
  127. package/.claude-flow-novice/dist/src/slash-commands/benchmark-prompts.js +281 -0
  128. package/CLAUDE.md +1927 -127
  129. package/package.json +3 -3
  130. package/src/cli/simple-commands/init/index.js +39 -4
  131. package/src/cli/simple-commands/init/templates/CLAUDE.md +8 -10
  132. package/src/slash-commands/benchmark-prompts.js +281 -0
@@ -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
@@ -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