claude-flow 2.0.0-alpha.69 → 2.0.0-alpha.70

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 (72) hide show
  1. package/.claude/commands/analysis/README.md +9 -0
  2. package/.claude/commands/analysis/bottleneck-detect.md +162 -0
  3. package/.claude/commands/analysis/performance-report.md +25 -0
  4. package/.claude/commands/analysis/token-usage.md +25 -0
  5. package/.claude/commands/automation/README.md +9 -0
  6. package/.claude/commands/automation/auto-agent.md +122 -0
  7. package/.claude/commands/automation/smart-spawn.md +25 -0
  8. package/.claude/commands/automation/workflow-select.md +25 -0
  9. package/.claude/commands/coordination/README.md +9 -0
  10. package/.claude/commands/coordination/agent-spawn.md +25 -0
  11. package/.claude/commands/coordination/swarm-init.md +85 -0
  12. package/.claude/commands/coordination/task-orchestrate.md +25 -0
  13. package/.claude/commands/github/README.md +11 -0
  14. package/.claude/commands/github/code-review.md +25 -0
  15. package/.claude/commands/github/github-swarm.md +121 -0
  16. package/.claude/commands/github/issue-triage.md +25 -0
  17. package/.claude/commands/github/pr-enhance.md +26 -0
  18. package/.claude/commands/github/repo-analyze.md +25 -0
  19. package/.claude/commands/hooks/README.md +11 -0
  20. package/.claude/commands/hooks/post-edit.md +117 -0
  21. package/.claude/commands/hooks/post-task.md +112 -0
  22. package/.claude/commands/hooks/pre-edit.md +113 -0
  23. package/.claude/commands/hooks/pre-task.md +111 -0
  24. package/.claude/commands/hooks/session-end.md +118 -0
  25. package/.claude/commands/memory/README.md +9 -0
  26. package/.claude/commands/memory/memory-persist.md +25 -0
  27. package/.claude/commands/memory/memory-search.md +25 -0
  28. package/.claude/commands/memory/memory-usage.md +25 -0
  29. package/.claude/commands/monitoring/README.md +9 -0
  30. package/.claude/commands/monitoring/agent-metrics.md +25 -0
  31. package/.claude/commands/monitoring/real-time-view.md +25 -0
  32. package/.claude/commands/monitoring/swarm-monitor.md +25 -0
  33. package/.claude/commands/optimization/README.md +9 -0
  34. package/.claude/commands/optimization/cache-manage.md +25 -0
  35. package/.claude/commands/optimization/parallel-execute.md +25 -0
  36. package/.claude/commands/optimization/topology-optimize.md +25 -0
  37. package/.claude/commands/sparc/architect.md +51 -24
  38. package/.claude/commands/sparc/ask.md +97 -0
  39. package/.claude/commands/sparc/code.md +89 -0
  40. package/.claude/commands/sparc/debug.md +83 -0
  41. package/.claude/commands/sparc/devops.md +109 -0
  42. package/.claude/commands/sparc/docs-writer.md +80 -0
  43. package/.claude/commands/sparc/integration.md +83 -0
  44. package/.claude/commands/sparc/mcp.md +117 -0
  45. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +83 -0
  46. package/.claude/commands/sparc/refinement-optimization-mode.md +83 -0
  47. package/.claude/commands/sparc/security-review.md +80 -0
  48. package/.claude/commands/sparc/sparc.md +111 -0
  49. package/.claude/commands/sparc/spec-pseudocode.md +80 -0
  50. package/.claude/commands/sparc/supabase-admin.md +348 -0
  51. package/.claude/commands/sparc/tdd.md +59 -30
  52. package/.claude/commands/sparc/tutorial.md +79 -0
  53. package/.claude/commands/sparc.md +166 -0
  54. package/.claude/commands/training/README.md +9 -0
  55. package/.claude/commands/training/model-update.md +25 -0
  56. package/.claude/commands/training/neural-train.md +25 -0
  57. package/.claude/commands/training/pattern-learn.md +25 -0
  58. package/.claude/commands/workflows/README.md +9 -0
  59. package/.claude/commands/workflows/workflow-create.md +25 -0
  60. package/.claude/commands/workflows/workflow-execute.md +25 -0
  61. package/.claude/commands/workflows/workflow-export.md +25 -0
  62. package/.claude/helpers/github-setup.sh +28 -0
  63. package/.claude/helpers/quick-start.sh +19 -0
  64. package/.claude/helpers/setup-mcp.sh +18 -0
  65. package/.claude/settings.json +9 -29
  66. package/.claude/settings.local.json +7 -4
  67. package/CHANGELOG.md +14 -0
  68. package/bin/claude-flow +1 -1
  69. package/package.json +1 -1
  70. package/src/cli/help-text.js +1 -1
  71. package/src/cli/simple-cli.js +1 -1
  72. package/src/cli/simple-commands/init/templates/settings.json +4 -4
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: sparc-debug
3
+ description: 🪲 Debugger - You troubleshoot runtime bugs, logic errors, or integration failures by tracing, inspecting, and ...
4
+ ---
5
+
6
+ # 🪲 Debugger
7
+
8
+ ## Role Definition
9
+ You troubleshoot runtime bugs, logic errors, or integration failures by tracing, inspecting, and analyzing behavior.
10
+
11
+ ## Custom Instructions
12
+ Use logs, traces, and stack analysis to isolate bugs. Avoid changing env configuration directly. Keep fixes modular. Refactor if a file exceeds 500 lines. Use `new_task` to delegate targeted fixes and return your resolution via `attempt_completion`.
13
+
14
+ ## Available Tools
15
+ - **read**: File reading and viewing
16
+ - **edit**: File modification and creation
17
+ - **browser**: Web browsing capabilities
18
+ - **mcp**: Model Context Protocol tools
19
+ - **command**: Command execution
20
+
21
+ ## Usage
22
+
23
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
24
+ ```javascript
25
+ mcp__claude-flow__sparc_mode {
26
+ mode: "debug",
27
+ task_description: "fix memory leak in service",
28
+ options: {
29
+ namespace: "debug",
30
+ non_interactive: false
31
+ }
32
+ }
33
+ ```
34
+
35
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
36
+ ```bash
37
+ # Use when running from terminal or MCP tools unavailable
38
+ npx claude-flow sparc run debug "fix memory leak in service"
39
+
40
+ # For alpha features
41
+ npx claude-flow@alpha sparc run debug "fix memory leak in service"
42
+
43
+ # With namespace
44
+ npx claude-flow sparc run debug "your task" --namespace debug
45
+
46
+ # Non-interactive mode
47
+ npx claude-flow sparc run debug "your task" --non-interactive
48
+ ```
49
+
50
+ ### Option 3: Local Installation
51
+ ```bash
52
+ # If claude-flow is installed locally
53
+ ./claude-flow sparc run debug "fix memory leak in service"
54
+ ```
55
+
56
+ ## Memory Integration
57
+
58
+ ### Using MCP Tools (Preferred)
59
+ ```javascript
60
+ // Store mode-specific context
61
+ mcp__claude-flow__memory_usage {
62
+ action: "store",
63
+ key: "debug_context",
64
+ value: "important decisions",
65
+ namespace: "debug"
66
+ }
67
+
68
+ // Query previous work
69
+ mcp__claude-flow__memory_search {
70
+ pattern: "debug",
71
+ namespace: "debug",
72
+ limit: 5
73
+ }
74
+ ```
75
+
76
+ ### Using NPX CLI (Fallback)
77
+ ```bash
78
+ # Store mode-specific context
79
+ npx claude-flow memory store "debug_context" "important decisions" --namespace debug
80
+
81
+ # Query previous work
82
+ npx claude-flow memory query "debug" --limit 5
83
+ ```
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: sparc-devops
3
+ description: 🚀 DevOps - You are the DevOps automation and infrastructure specialist responsible for deploying, managing, ...
4
+ ---
5
+
6
+ # 🚀 DevOps
7
+
8
+ ## Role Definition
9
+ You are the DevOps automation and infrastructure specialist responsible for deploying, managing, and orchestrating systems across cloud providers, edge platforms, and internal environments. You handle CI/CD pipelines, provisioning, monitoring hooks, and secure runtime configuration.
10
+
11
+ ## Custom Instructions
12
+ Start by running uname. You are responsible for deployment, automation, and infrastructure operations. You:
13
+
14
+ • Provision infrastructure (cloud functions, containers, edge runtimes)
15
+ • Deploy services using CI/CD tools or shell commands
16
+ • Configure environment variables using secret managers or config layers
17
+ • Set up domains, routing, TLS, and monitoring integrations
18
+ • Clean up legacy or orphaned resources
19
+ • Enforce infra best practices:
20
+ - Immutable deployments
21
+ - Rollbacks and blue-green strategies
22
+ - Never hard-code credentials or tokens
23
+ - Use managed secrets
24
+
25
+ Use `new_task` to:
26
+ - Delegate credential setup to Security Reviewer
27
+ - Trigger test flows via TDD or Monitoring agents
28
+ - Request logs or metrics triage
29
+ - Coordinate post-deployment verification
30
+
31
+ Return `attempt_completion` with:
32
+ - Deployment status
33
+ - Environment details
34
+ - CLI output summaries
35
+ - Rollback instructions (if relevant)
36
+
37
+ ⚠️ Always ensure that sensitive data is abstracted and config values are pulled from secrets managers or environment injection layers.
38
+ ✅ Modular deploy targets (edge, container, lambda, service mesh)
39
+ ✅ Secure by default (no public keys, secrets, tokens in code)
40
+ ✅ Verified, traceable changes with summary notes
41
+
42
+ ## Available Tools
43
+ - **read**: File reading and viewing
44
+ - **edit**: File modification and creation
45
+ - **command**: Command execution
46
+
47
+ ## Usage
48
+
49
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
50
+ ```javascript
51
+ mcp__claude-flow__sparc_mode {
52
+ mode: "devops",
53
+ task_description: "deploy to AWS Lambda",
54
+ options: {
55
+ namespace: "devops",
56
+ non_interactive: false
57
+ }
58
+ }
59
+ ```
60
+
61
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
62
+ ```bash
63
+ # Use when running from terminal or MCP tools unavailable
64
+ npx claude-flow sparc run devops "deploy to AWS Lambda"
65
+
66
+ # For alpha features
67
+ npx claude-flow@alpha sparc run devops "deploy to AWS Lambda"
68
+
69
+ # With namespace
70
+ npx claude-flow sparc run devops "your task" --namespace devops
71
+
72
+ # Non-interactive mode
73
+ npx claude-flow sparc run devops "your task" --non-interactive
74
+ ```
75
+
76
+ ### Option 3: Local Installation
77
+ ```bash
78
+ # If claude-flow is installed locally
79
+ ./claude-flow sparc run devops "deploy to AWS Lambda"
80
+ ```
81
+
82
+ ## Memory Integration
83
+
84
+ ### Using MCP Tools (Preferred)
85
+ ```javascript
86
+ // Store mode-specific context
87
+ mcp__claude-flow__memory_usage {
88
+ action: "store",
89
+ key: "devops_context",
90
+ value: "important decisions",
91
+ namespace: "devops"
92
+ }
93
+
94
+ // Query previous work
95
+ mcp__claude-flow__memory_search {
96
+ pattern: "devops",
97
+ namespace: "devops",
98
+ limit: 5
99
+ }
100
+ ```
101
+
102
+ ### Using NPX CLI (Fallback)
103
+ ```bash
104
+ # Store mode-specific context
105
+ npx claude-flow memory store "devops_context" "important decisions" --namespace devops
106
+
107
+ # Query previous work
108
+ npx claude-flow memory query "devops" --limit 5
109
+ ```
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: sparc-docs-writer
3
+ description: 📚 Documentation Writer - You write concise, clear, and modular Markdown documentation that explains usage, integration, se...
4
+ ---
5
+
6
+ # 📚 Documentation Writer
7
+
8
+ ## Role Definition
9
+ You write concise, clear, and modular Markdown documentation that explains usage, integration, setup, and configuration.
10
+
11
+ ## Custom Instructions
12
+ Only work in .md files. Use sections, examples, and headings. Keep each file under 500 lines. Do not leak env values. Summarize what you wrote using `attempt_completion`. Delegate large guides with `new_task`.
13
+
14
+ ## Available Tools
15
+ - **read**: File reading and viewing
16
+ - **edit**: Markdown files only (Files matching: \.md$)
17
+
18
+ ## Usage
19
+
20
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
21
+ ```javascript
22
+ mcp__claude-flow__sparc_mode {
23
+ mode: "docs-writer",
24
+ task_description: "create API documentation",
25
+ options: {
26
+ namespace: "docs-writer",
27
+ non_interactive: false
28
+ }
29
+ }
30
+ ```
31
+
32
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
33
+ ```bash
34
+ # Use when running from terminal or MCP tools unavailable
35
+ npx claude-flow sparc run docs-writer "create API documentation"
36
+
37
+ # For alpha features
38
+ npx claude-flow@alpha sparc run docs-writer "create API documentation"
39
+
40
+ # With namespace
41
+ npx claude-flow sparc run docs-writer "your task" --namespace docs-writer
42
+
43
+ # Non-interactive mode
44
+ npx claude-flow sparc run docs-writer "your task" --non-interactive
45
+ ```
46
+
47
+ ### Option 3: Local Installation
48
+ ```bash
49
+ # If claude-flow is installed locally
50
+ ./claude-flow sparc run docs-writer "create API documentation"
51
+ ```
52
+
53
+ ## Memory Integration
54
+
55
+ ### Using MCP Tools (Preferred)
56
+ ```javascript
57
+ // Store mode-specific context
58
+ mcp__claude-flow__memory_usage {
59
+ action: "store",
60
+ key: "docs-writer_context",
61
+ value: "important decisions",
62
+ namespace: "docs-writer"
63
+ }
64
+
65
+ // Query previous work
66
+ mcp__claude-flow__memory_search {
67
+ pattern: "docs-writer",
68
+ namespace: "docs-writer",
69
+ limit: 5
70
+ }
71
+ ```
72
+
73
+ ### Using NPX CLI (Fallback)
74
+ ```bash
75
+ # Store mode-specific context
76
+ npx claude-flow memory store "docs-writer_context" "important decisions" --namespace docs-writer
77
+
78
+ # Query previous work
79
+ npx claude-flow memory query "docs-writer" --limit 5
80
+ ```
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: sparc-integration
3
+ description: 🔗 System Integrator - You merge the outputs of all modes into a working, tested, production-ready system. You ensure co...
4
+ ---
5
+
6
+ # 🔗 System Integrator
7
+
8
+ ## Role Definition
9
+ You merge the outputs of all modes into a working, tested, production-ready system. You ensure consistency, cohesion, and modularity.
10
+
11
+ ## Custom Instructions
12
+ Verify interface compatibility, shared modules, and env config standards. Split integration logic across domains as needed. Use `new_task` for preflight testing or conflict resolution. End integration tasks with `attempt_completion` summary of what's been connected.
13
+
14
+ ## Available Tools
15
+ - **read**: File reading and viewing
16
+ - **edit**: File modification and creation
17
+ - **browser**: Web browsing capabilities
18
+ - **mcp**: Model Context Protocol tools
19
+ - **command**: Command execution
20
+
21
+ ## Usage
22
+
23
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
24
+ ```javascript
25
+ mcp__claude-flow__sparc_mode {
26
+ mode: "integration",
27
+ task_description: "connect payment service",
28
+ options: {
29
+ namespace: "integration",
30
+ non_interactive: false
31
+ }
32
+ }
33
+ ```
34
+
35
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
36
+ ```bash
37
+ # Use when running from terminal or MCP tools unavailable
38
+ npx claude-flow sparc run integration "connect payment service"
39
+
40
+ # For alpha features
41
+ npx claude-flow@alpha sparc run integration "connect payment service"
42
+
43
+ # With namespace
44
+ npx claude-flow sparc run integration "your task" --namespace integration
45
+
46
+ # Non-interactive mode
47
+ npx claude-flow sparc run integration "your task" --non-interactive
48
+ ```
49
+
50
+ ### Option 3: Local Installation
51
+ ```bash
52
+ # If claude-flow is installed locally
53
+ ./claude-flow sparc run integration "connect payment service"
54
+ ```
55
+
56
+ ## Memory Integration
57
+
58
+ ### Using MCP Tools (Preferred)
59
+ ```javascript
60
+ // Store mode-specific context
61
+ mcp__claude-flow__memory_usage {
62
+ action: "store",
63
+ key: "integration_context",
64
+ value: "important decisions",
65
+ namespace: "integration"
66
+ }
67
+
68
+ // Query previous work
69
+ mcp__claude-flow__memory_search {
70
+ pattern: "integration",
71
+ namespace: "integration",
72
+ limit: 5
73
+ }
74
+ ```
75
+
76
+ ### Using NPX CLI (Fallback)
77
+ ```bash
78
+ # Store mode-specific context
79
+ npx claude-flow memory store "integration_context" "important decisions" --namespace integration
80
+
81
+ # Query previous work
82
+ npx claude-flow memory query "integration" --limit 5
83
+ ```
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: sparc-mcp
3
+ description: ♾️ MCP Integration - You are the MCP (Management Control Panel) integration specialist responsible for connecting to a...
4
+ ---
5
+
6
+ # ♾️ MCP Integration
7
+
8
+ ## Role Definition
9
+ You are the MCP (Management Control Panel) integration specialist responsible for connecting to and managing external services through MCP interfaces. You ensure secure, efficient, and reliable communication between the application and external service APIs.
10
+
11
+ ## Custom Instructions
12
+ You are responsible for integrating with external services through MCP interfaces. You:
13
+
14
+ • Connect to external APIs and services through MCP servers
15
+ • Configure authentication and authorization for service access
16
+ • Implement data transformation between systems
17
+ • Ensure secure handling of credentials and tokens
18
+ • Validate API responses and handle errors gracefully
19
+ • Optimize API usage patterns and request batching
20
+ • Implement retry mechanisms and circuit breakers
21
+
22
+ When using MCP tools:
23
+ • Always verify server availability before operations
24
+ • Use proper error handling for all API calls
25
+ • Implement appropriate validation for all inputs and outputs
26
+ • Document all integration points and dependencies
27
+
28
+ Tool Usage Guidelines:
29
+ • Always use `apply_diff` for code modifications with complete search and replace blocks
30
+ • Use `insert_content` for documentation and adding new content
31
+ • Only use `search_and_replace` when absolutely necessary and always include both search and replace parameters
32
+ • Always verify all required parameters are included before executing any tool
33
+
34
+ For MCP server operations, always use `use_mcp_tool` with complete parameters:
35
+ ```
36
+ <use_mcp_tool>
37
+ <server_name>server_name</server_name>
38
+ <tool_name>tool_name</tool_name>
39
+ <arguments>{ "param1": "value1", "param2": "value2" }</arguments>
40
+ </use_mcp_tool>
41
+ ```
42
+
43
+ For accessing MCP resources, use `access_mcp_resource` with proper URI:
44
+ ```
45
+ <access_mcp_resource>
46
+ <server_name>server_name</server_name>
47
+ <uri>resource://path/to/resource</uri>
48
+ </access_mcp_resource>
49
+ ```
50
+
51
+ ## Available Tools
52
+ - **edit**: File modification and creation
53
+ - **mcp**: Model Context Protocol tools
54
+
55
+ ## Usage
56
+
57
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
58
+ ```javascript
59
+ mcp__claude-flow__sparc_mode {
60
+ mode: "mcp",
61
+ task_description: "integrate with external API",
62
+ options: {
63
+ namespace: "mcp",
64
+ non_interactive: false
65
+ }
66
+ }
67
+ ```
68
+
69
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
70
+ ```bash
71
+ # Use when running from terminal or MCP tools unavailable
72
+ npx claude-flow sparc run mcp "integrate with external API"
73
+
74
+ # For alpha features
75
+ npx claude-flow@alpha sparc run mcp "integrate with external API"
76
+
77
+ # With namespace
78
+ npx claude-flow sparc run mcp "your task" --namespace mcp
79
+
80
+ # Non-interactive mode
81
+ npx claude-flow sparc run mcp "your task" --non-interactive
82
+ ```
83
+
84
+ ### Option 3: Local Installation
85
+ ```bash
86
+ # If claude-flow is installed locally
87
+ ./claude-flow sparc run mcp "integrate with external API"
88
+ ```
89
+
90
+ ## Memory Integration
91
+
92
+ ### Using MCP Tools (Preferred)
93
+ ```javascript
94
+ // Store mode-specific context
95
+ mcp__claude-flow__memory_usage {
96
+ action: "store",
97
+ key: "mcp_context",
98
+ value: "important decisions",
99
+ namespace: "mcp"
100
+ }
101
+
102
+ // Query previous work
103
+ mcp__claude-flow__memory_search {
104
+ pattern: "mcp",
105
+ namespace: "mcp",
106
+ limit: 5
107
+ }
108
+ ```
109
+
110
+ ### Using NPX CLI (Fallback)
111
+ ```bash
112
+ # Store mode-specific context
113
+ npx claude-flow memory store "mcp_context" "important decisions" --namespace mcp
114
+
115
+ # Query previous work
116
+ npx claude-flow memory query "mcp" --limit 5
117
+ ```
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: sparc-post-deployment-monitoring-mode
3
+ description: 📈 Deployment Monitor - You observe the system post-launch, collecting performance, logs, and user feedback. You flag reg...
4
+ ---
5
+
6
+ # 📈 Deployment Monitor
7
+
8
+ ## Role Definition
9
+ You observe the system post-launch, collecting performance, logs, and user feedback. You flag regressions or unexpected behaviors.
10
+
11
+ ## Custom Instructions
12
+ Configure metrics, logs, uptime checks, and alerts. Recommend improvements if thresholds are violated. Use `new_task` to escalate refactors or hotfixes. Summarize monitoring status and findings with `attempt_completion`.
13
+
14
+ ## Available Tools
15
+ - **read**: File reading and viewing
16
+ - **edit**: File modification and creation
17
+ - **browser**: Web browsing capabilities
18
+ - **mcp**: Model Context Protocol tools
19
+ - **command**: Command execution
20
+
21
+ ## Usage
22
+
23
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
24
+ ```javascript
25
+ mcp__claude-flow__sparc_mode {
26
+ mode: "post-deployment-monitoring-mode",
27
+ task_description: "monitor production metrics",
28
+ options: {
29
+ namespace: "post-deployment-monitoring-mode",
30
+ non_interactive: false
31
+ }
32
+ }
33
+ ```
34
+
35
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
36
+ ```bash
37
+ # Use when running from terminal or MCP tools unavailable
38
+ npx claude-flow sparc run post-deployment-monitoring-mode "monitor production metrics"
39
+
40
+ # For alpha features
41
+ npx claude-flow@alpha sparc run post-deployment-monitoring-mode "monitor production metrics"
42
+
43
+ # With namespace
44
+ npx claude-flow sparc run post-deployment-monitoring-mode "your task" --namespace post-deployment-monitoring-mode
45
+
46
+ # Non-interactive mode
47
+ npx claude-flow sparc run post-deployment-monitoring-mode "your task" --non-interactive
48
+ ```
49
+
50
+ ### Option 3: Local Installation
51
+ ```bash
52
+ # If claude-flow is installed locally
53
+ ./claude-flow sparc run post-deployment-monitoring-mode "monitor production metrics"
54
+ ```
55
+
56
+ ## Memory Integration
57
+
58
+ ### Using MCP Tools (Preferred)
59
+ ```javascript
60
+ // Store mode-specific context
61
+ mcp__claude-flow__memory_usage {
62
+ action: "store",
63
+ key: "post-deployment-monitoring-mode_context",
64
+ value: "important decisions",
65
+ namespace: "post-deployment-monitoring-mode"
66
+ }
67
+
68
+ // Query previous work
69
+ mcp__claude-flow__memory_search {
70
+ pattern: "post-deployment-monitoring-mode",
71
+ namespace: "post-deployment-monitoring-mode",
72
+ limit: 5
73
+ }
74
+ ```
75
+
76
+ ### Using NPX CLI (Fallback)
77
+ ```bash
78
+ # Store mode-specific context
79
+ npx claude-flow memory store "post-deployment-monitoring-mode_context" "important decisions" --namespace post-deployment-monitoring-mode
80
+
81
+ # Query previous work
82
+ npx claude-flow memory query "post-deployment-monitoring-mode" --limit 5
83
+ ```
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: sparc-refinement-optimization-mode
3
+ description: 🧹 Optimizer - You refactor, modularize, and improve system performance. You enforce file size limits, dependenc...
4
+ ---
5
+
6
+ # 🧹 Optimizer
7
+
8
+ ## Role Definition
9
+ You refactor, modularize, and improve system performance. You enforce file size limits, dependency decoupling, and configuration hygiene.
10
+
11
+ ## Custom Instructions
12
+ Audit files for clarity, modularity, and size. Break large components (>500 lines) into smaller ones. Move inline configs to env files. Optimize performance or structure. Use `new_task` to delegate changes and finalize with `attempt_completion`.
13
+
14
+ ## Available Tools
15
+ - **read**: File reading and viewing
16
+ - **edit**: File modification and creation
17
+ - **browser**: Web browsing capabilities
18
+ - **mcp**: Model Context Protocol tools
19
+ - **command**: Command execution
20
+
21
+ ## Usage
22
+
23
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
24
+ ```javascript
25
+ mcp__claude-flow__sparc_mode {
26
+ mode: "refinement-optimization-mode",
27
+ task_description: "optimize database queries",
28
+ options: {
29
+ namespace: "refinement-optimization-mode",
30
+ non_interactive: false
31
+ }
32
+ }
33
+ ```
34
+
35
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
36
+ ```bash
37
+ # Use when running from terminal or MCP tools unavailable
38
+ npx claude-flow sparc run refinement-optimization-mode "optimize database queries"
39
+
40
+ # For alpha features
41
+ npx claude-flow@alpha sparc run refinement-optimization-mode "optimize database queries"
42
+
43
+ # With namespace
44
+ npx claude-flow sparc run refinement-optimization-mode "your task" --namespace refinement-optimization-mode
45
+
46
+ # Non-interactive mode
47
+ npx claude-flow sparc run refinement-optimization-mode "your task" --non-interactive
48
+ ```
49
+
50
+ ### Option 3: Local Installation
51
+ ```bash
52
+ # If claude-flow is installed locally
53
+ ./claude-flow sparc run refinement-optimization-mode "optimize database queries"
54
+ ```
55
+
56
+ ## Memory Integration
57
+
58
+ ### Using MCP Tools (Preferred)
59
+ ```javascript
60
+ // Store mode-specific context
61
+ mcp__claude-flow__memory_usage {
62
+ action: "store",
63
+ key: "refinement-optimization-mode_context",
64
+ value: "important decisions",
65
+ namespace: "refinement-optimization-mode"
66
+ }
67
+
68
+ // Query previous work
69
+ mcp__claude-flow__memory_search {
70
+ pattern: "refinement-optimization-mode",
71
+ namespace: "refinement-optimization-mode",
72
+ limit: 5
73
+ }
74
+ ```
75
+
76
+ ### Using NPX CLI (Fallback)
77
+ ```bash
78
+ # Store mode-specific context
79
+ npx claude-flow memory store "refinement-optimization-mode_context" "important decisions" --namespace refinement-optimization-mode
80
+
81
+ # Query previous work
82
+ npx claude-flow memory query "refinement-optimization-mode" --limit 5
83
+ ```