agentic-flow 2.0.1-alpha.66 → 2.0.1-alpha.68
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/.claude-flow/metrics/agent-metrics.json +1 -0
- package/.claude/agents/.claude-flow/metrics/performance.json +87 -0
- package/.claude/agents/.claude-flow/metrics/task-metrics.json +10 -0
- package/.claude/skills/agentic-flow-quickstart/skill.md +69 -0
- package/.claude/skills/hooks-automation/skill.md +155 -0
- package/.claude/skills/memory-patterns/skill.md +110 -0
- package/.claude/skills/sparc-methodology/skill.md +137 -0
- package/.claude/skills/swarm-coordination/skill.md +94 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/benchmarks/embeddings-benchmark.d.ts +2 -1
- package/dist/benchmarks/embeddings-benchmark.d.ts.map +1 -1
- package/dist/benchmarks/embeddings-benchmark.js.map +1 -1
- package/dist/core/agentdb-fast.js +3 -3
- package/dist/core/agentdb-fast.js.map +1 -1
- package/dist/core/agentdb-wrapper-enhanced.d.ts.map +1 -1
- package/dist/core/agentdb-wrapper-enhanced.js +20 -4
- package/dist/core/agentdb-wrapper-enhanced.js.map +1 -1
- package/dist/core/attention-native.js +2 -1
- package/dist/core/attention-native.js.map +1 -1
- package/dist/embeddings/optimized-embedder.d.ts.map +1 -1
- package/dist/embeddings/optimized-embedder.js +4 -3
- package/dist/embeddings/optimized-embedder.js.map +1 -1
- package/dist/federation/integrations/supabase-adapter-debug.js +3 -3
- package/dist/federation/integrations/supabase-adapter-debug.js.map +1 -1
- package/dist/hooks/swarm-learning-optimizer.js +5 -5
- package/dist/hooks/swarm-learning-optimizer.js.map +1 -1
- package/dist/mcp/claudeFlowSdkServer.d.ts.map +1 -1
- package/dist/mcp/claudeFlowSdkServer.js +9 -3
- package/dist/mcp/claudeFlowSdkServer.js.map +1 -1
- package/dist/mcp/tools/agent-booster-tools.d.ts.map +1 -1
- package/dist/mcp/tools/agent-booster-tools.js +10 -4
- package/dist/mcp/tools/agent-booster-tools.js.map +1 -1
- package/dist/mcp/tools/sona-tools.d.ts.map +1 -1
- package/dist/mcp/tools/sona-tools.js +6 -0
- package/dist/mcp/tools/sona-tools.js.map +1 -1
- package/dist/optimizations/agent-booster-migration.d.ts.map +1 -1
- package/dist/optimizations/agent-booster-migration.js +5 -2
- package/dist/optimizations/agent-booster-migration.js.map +1 -1
- package/dist/proxy/quic-proxy.js +2 -2
- package/dist/proxy/quic-proxy.js.map +1 -1
- package/dist/reasoningbank/HybridBackend.js +1 -1
- package/dist/reasoningbank/HybridBackend.js.map +1 -1
- package/dist/router/providers/onnx-local.d.ts.map +1 -1
- package/dist/router/providers/onnx-local.js +8 -4
- package/dist/router/providers/onnx-local.js.map +1 -1
- package/dist/services/sona-agent-training.d.ts +1 -0
- package/dist/services/sona-agent-training.d.ts.map +1 -1
- package/dist/services/sona-agent-training.js.map +1 -1
- package/dist/services/sona-agentdb-integration.d.ts.map +1 -1
- package/dist/services/sona-agentdb-integration.js +9 -6
- package/dist/services/sona-agentdb-integration.js.map +1 -1
- package/package.json +1 -1
- /package/.claude/agents/analysis/{code-review/analyze-code-quality.md → analyze-code-quality.md} +0 -0
- /package/.claude/agents/architecture/{system-design/arch-system-design.md → arch-system-design.md} +0 -0
- /package/.claude/agents/data/{ml/data-ml-model.md → data-ml-model.md} +0 -0
- /package/.claude/agents/development/{backend/dev-backend-api.md → dev-backend-api.md} +0 -0
- /package/.claude/agents/devops/{ci-cd/ops-cicd-github.md → ops-cicd-github.md} +0 -0
- /package/.claude/agents/documentation/{api-docs/docs-api-openapi.md → docs-api-openapi.md} +0 -0
- /package/.claude/agents/specialized/{mobile/spec-mobile-react-native.md → spec-mobile-react-native.md} +0 -0
- /package/.claude/agents/testing/{validation/production-validator.md → production-validator.md} +0 -0
- /package/.claude/agents/testing/{unit/tdd-london-swarm.md → tdd-london-swarm.md} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"startTime": 1767544348034,
|
|
3
|
+
"sessionId": "session-1767544348034",
|
|
4
|
+
"lastActivity": 1767544348034,
|
|
5
|
+
"sessionDuration": 0,
|
|
6
|
+
"totalTasks": 1,
|
|
7
|
+
"successfulTasks": 1,
|
|
8
|
+
"failedTasks": 0,
|
|
9
|
+
"totalAgents": 0,
|
|
10
|
+
"activeAgents": 0,
|
|
11
|
+
"neuralEvents": 0,
|
|
12
|
+
"memoryMode": {
|
|
13
|
+
"reasoningbankOperations": 0,
|
|
14
|
+
"basicOperations": 0,
|
|
15
|
+
"autoModeSelections": 0,
|
|
16
|
+
"modeOverrides": 0,
|
|
17
|
+
"currentMode": "auto"
|
|
18
|
+
},
|
|
19
|
+
"operations": {
|
|
20
|
+
"store": {
|
|
21
|
+
"count": 0,
|
|
22
|
+
"totalDuration": 0,
|
|
23
|
+
"errors": 0
|
|
24
|
+
},
|
|
25
|
+
"retrieve": {
|
|
26
|
+
"count": 0,
|
|
27
|
+
"totalDuration": 0,
|
|
28
|
+
"errors": 0
|
|
29
|
+
},
|
|
30
|
+
"query": {
|
|
31
|
+
"count": 0,
|
|
32
|
+
"totalDuration": 0,
|
|
33
|
+
"errors": 0
|
|
34
|
+
},
|
|
35
|
+
"list": {
|
|
36
|
+
"count": 0,
|
|
37
|
+
"totalDuration": 0,
|
|
38
|
+
"errors": 0
|
|
39
|
+
},
|
|
40
|
+
"delete": {
|
|
41
|
+
"count": 0,
|
|
42
|
+
"totalDuration": 0,
|
|
43
|
+
"errors": 0
|
|
44
|
+
},
|
|
45
|
+
"search": {
|
|
46
|
+
"count": 0,
|
|
47
|
+
"totalDuration": 0,
|
|
48
|
+
"errors": 0
|
|
49
|
+
},
|
|
50
|
+
"init": {
|
|
51
|
+
"count": 0,
|
|
52
|
+
"totalDuration": 0,
|
|
53
|
+
"errors": 0
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"performance": {
|
|
57
|
+
"avgOperationDuration": 0,
|
|
58
|
+
"minOperationDuration": null,
|
|
59
|
+
"maxOperationDuration": null,
|
|
60
|
+
"slowOperations": 0,
|
|
61
|
+
"fastOperations": 0,
|
|
62
|
+
"totalOperationTime": 0
|
|
63
|
+
},
|
|
64
|
+
"storage": {
|
|
65
|
+
"totalEntries": 0,
|
|
66
|
+
"reasoningbankEntries": 0,
|
|
67
|
+
"basicEntries": 0,
|
|
68
|
+
"databaseSize": 0,
|
|
69
|
+
"lastBackup": null,
|
|
70
|
+
"growthRate": 0
|
|
71
|
+
},
|
|
72
|
+
"errors": {
|
|
73
|
+
"total": 0,
|
|
74
|
+
"byType": {},
|
|
75
|
+
"byOperation": {},
|
|
76
|
+
"recent": []
|
|
77
|
+
},
|
|
78
|
+
"reasoningbank": {
|
|
79
|
+
"semanticSearches": 0,
|
|
80
|
+
"sqlFallbacks": 0,
|
|
81
|
+
"embeddingGenerated": 0,
|
|
82
|
+
"consolidations": 0,
|
|
83
|
+
"avgQueryTime": 0,
|
|
84
|
+
"cacheHits": 0,
|
|
85
|
+
"cacheMisses": 0
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-flow-quickstart
|
|
3
|
+
description: Quick start guide for agentic-flow - initialize, configure, and run
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- initialization
|
|
9
|
+
- configuration
|
|
10
|
+
- mcp_integration
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Agentic Flow Quickstart
|
|
14
|
+
|
|
15
|
+
Initialize and configure agentic-flow for optimal Claude Code integration.
|
|
16
|
+
|
|
17
|
+
## Quick Commands
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Initialize new project with agentic-flow
|
|
21
|
+
npx agentic-flow@alpha init
|
|
22
|
+
|
|
23
|
+
# Start MCP server for Claude Code
|
|
24
|
+
npx agentic-flow@alpha mcp start
|
|
25
|
+
|
|
26
|
+
# List available agents
|
|
27
|
+
npx agentic-flow@alpha --list
|
|
28
|
+
|
|
29
|
+
# Run a specific agent
|
|
30
|
+
npx agentic-flow@alpha --agent coder --task "implement feature X"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
### 🤖 54+ Specialized Agents
|
|
36
|
+
- Core: `coder`, `reviewer`, `tester`, `planner`, `researcher`
|
|
37
|
+
- Swarm: `hierarchical-coordinator`, `mesh-coordinator`, `adaptive-coordinator`
|
|
38
|
+
- GitHub: `pr-manager`, `code-review-swarm`, `issue-tracker`
|
|
39
|
+
- SPARC: `specification`, `pseudocode`, `architecture`, `refinement`
|
|
40
|
+
|
|
41
|
+
### 🧠 ReasoningBank Learning Memory
|
|
42
|
+
- Pattern recognition with 84.8% SWE-Bench solve rate
|
|
43
|
+
- 150x faster vector search with HNSW
|
|
44
|
+
- Cross-session memory persistence
|
|
45
|
+
|
|
46
|
+
### ⚡ SONA Micro-LoRA Optimization
|
|
47
|
+
- 0.05ms inference latency
|
|
48
|
+
- 32.3% token reduction
|
|
49
|
+
- Real-time learning adaptation
|
|
50
|
+
|
|
51
|
+
### 🔗 MCP Integration
|
|
52
|
+
- 213+ MCP tools available
|
|
53
|
+
- Swarm coordination via claude-flow
|
|
54
|
+
- GitHub integration via ruv-swarm
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
Settings are stored in `.claude/settings.json`:
|
|
59
|
+
- Hooks for pre/post operations
|
|
60
|
+
- Agent definitions
|
|
61
|
+
- MCP server configuration
|
|
62
|
+
- Statusline customization
|
|
63
|
+
|
|
64
|
+
## Next Steps
|
|
65
|
+
|
|
66
|
+
1. Run `npx agentic-flow@alpha init` to set up project
|
|
67
|
+
2. Start MCP server with `npx agentic-flow@alpha mcp start`
|
|
68
|
+
3. Use Claude Code's Task tool to spawn agents
|
|
69
|
+
4. Monitor via statusline and metrics
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hooks-automation
|
|
3
|
+
description: Configure Claude Code hooks for automated coordination and learning
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- pre_edit_hooks
|
|
9
|
+
- post_edit_hooks
|
|
10
|
+
- session_management
|
|
11
|
+
- metrics_tracking
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Hooks Automation Skill
|
|
15
|
+
|
|
16
|
+
Configure intelligent hooks for automated coordination, formatting, and learning.
|
|
17
|
+
|
|
18
|
+
## Available Hooks
|
|
19
|
+
|
|
20
|
+
### PreToolUse Hooks
|
|
21
|
+
Triggered before Claude Code tools execute.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"PreToolUse": [
|
|
26
|
+
{
|
|
27
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
28
|
+
"hooks": [{
|
|
29
|
+
"type": "command",
|
|
30
|
+
"command": "npx agentic-flow@alpha hooks pre-edit \"$TOOL_INPUT_file_path\""
|
|
31
|
+
}]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"matcher": "Bash",
|
|
35
|
+
"hooks": [{
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "npx agentic-flow@alpha hooks pre-command \"$TOOL_INPUT_command\""
|
|
38
|
+
}]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### PostToolUse Hooks
|
|
45
|
+
Triggered after successful tool execution.
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"PostToolUse": [
|
|
50
|
+
{
|
|
51
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
52
|
+
"hooks": [{
|
|
53
|
+
"type": "command",
|
|
54
|
+
"command": "npx agentic-flow@alpha hooks post-edit \"$TOOL_INPUT_file_path\" --success"
|
|
55
|
+
}]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Session Hooks
|
|
62
|
+
Triggered at session start/end.
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"SessionStart": [{
|
|
67
|
+
"hooks": [{
|
|
68
|
+
"type": "command",
|
|
69
|
+
"command": "npx agentic-flow@alpha hooks intelligence stats --json"
|
|
70
|
+
}]
|
|
71
|
+
}],
|
|
72
|
+
"SessionEnd": [{
|
|
73
|
+
"hooks": [{
|
|
74
|
+
"type": "command",
|
|
75
|
+
"command": "npx agentic-flow@alpha hooks metrics --session --json"
|
|
76
|
+
}]
|
|
77
|
+
}]
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Hook Commands
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Pre-edit: Check for patterns, validate
|
|
85
|
+
npx agentic-flow@alpha hooks pre-edit "src/api.ts"
|
|
86
|
+
|
|
87
|
+
# Post-edit: Format, learn pattern
|
|
88
|
+
npx agentic-flow@alpha hooks post-edit "src/api.ts" --success
|
|
89
|
+
|
|
90
|
+
# Pre-command: Validate safety
|
|
91
|
+
npx agentic-flow@alpha hooks pre-command "npm install"
|
|
92
|
+
|
|
93
|
+
# Post-command: Track result
|
|
94
|
+
npx agentic-flow@alpha hooks post-command "npm install"
|
|
95
|
+
|
|
96
|
+
# Intelligence routing
|
|
97
|
+
npx agentic-flow@alpha hooks route "implement OAuth"
|
|
98
|
+
|
|
99
|
+
# Session metrics
|
|
100
|
+
npx agentic-flow@alpha hooks metrics --session
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Automation Features
|
|
104
|
+
|
|
105
|
+
### Auto-Agent Assignment
|
|
106
|
+
Hooks automatically assign specialized agents based on file type:
|
|
107
|
+
- `.ts`, `.tsx` → TypeScript agent
|
|
108
|
+
- `.py` → Python agent
|
|
109
|
+
- `.md` → Documentation agent
|
|
110
|
+
- `test.*` → Testing agent
|
|
111
|
+
|
|
112
|
+
### Command Validation
|
|
113
|
+
Pre-command hooks validate for:
|
|
114
|
+
- Dangerous patterns (rm -rf, force push)
|
|
115
|
+
- Permission requirements
|
|
116
|
+
- Resource limits
|
|
117
|
+
|
|
118
|
+
### Pattern Learning
|
|
119
|
+
Post-edit hooks learn:
|
|
120
|
+
- Code patterns
|
|
121
|
+
- Successful solutions
|
|
122
|
+
- Error recovery strategies
|
|
123
|
+
|
|
124
|
+
### Metrics Tracking
|
|
125
|
+
Session hooks track:
|
|
126
|
+
- Token usage
|
|
127
|
+
- Tool invocations
|
|
128
|
+
- Success rates
|
|
129
|
+
- Performance metrics
|
|
130
|
+
|
|
131
|
+
## Configuration
|
|
132
|
+
|
|
133
|
+
Full hook configuration in `.claude/settings.json`:
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"hooks": {
|
|
138
|
+
"PreToolUse": [...],
|
|
139
|
+
"PostToolUse": [...],
|
|
140
|
+
"PostToolUseFailure": [...],
|
|
141
|
+
"SessionStart": [...],
|
|
142
|
+
"SessionEnd": [...],
|
|
143
|
+
"UserPromptSubmit": [...],
|
|
144
|
+
"Stop": [...]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Best Practices
|
|
150
|
+
|
|
151
|
+
1. **Keep hooks fast**: <100ms for interactive experience
|
|
152
|
+
2. **Use timeout**: Prevent hanging hooks
|
|
153
|
+
3. **Handle failures gracefully**: Use `|| true` for optional hooks
|
|
154
|
+
4. **Log metrics**: Track for optimization
|
|
155
|
+
5. **Test hooks**: Verify before deployment
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-patterns
|
|
3
|
+
description: Persistent memory patterns for cross-session learning and context retention
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- memory_store
|
|
9
|
+
- memory_retrieve
|
|
10
|
+
- pattern_learning
|
|
11
|
+
- context_management
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Memory Patterns Skill
|
|
15
|
+
|
|
16
|
+
Implement persistent memory patterns for AI agents using ReasoningBank.
|
|
17
|
+
|
|
18
|
+
## Quick Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Store a pattern
|
|
22
|
+
npx agentic-flow@alpha memory store "api:auth" "OAuth2 with JWT"
|
|
23
|
+
|
|
24
|
+
# Retrieve a pattern
|
|
25
|
+
npx agentic-flow@alpha memory get "api:auth"
|
|
26
|
+
|
|
27
|
+
# Search patterns
|
|
28
|
+
npx agentic-flow@alpha memory search "authentication"
|
|
29
|
+
|
|
30
|
+
# List all patterns
|
|
31
|
+
npx agentic-flow@alpha memory list --namespace project
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Memory Namespaces
|
|
35
|
+
|
|
36
|
+
| Namespace | Purpose | TTL |
|
|
37
|
+
|-----------|---------|-----|
|
|
38
|
+
| `session` | Current session context | Until end |
|
|
39
|
+
| `project` | Project-specific learnings | Permanent |
|
|
40
|
+
| `user` | User preferences | Permanent |
|
|
41
|
+
| `swarm` | Swarm coordination state | Swarm lifetime |
|
|
42
|
+
| `cache` | Temporary cached data | 1 hour |
|
|
43
|
+
|
|
44
|
+
## Pattern Types
|
|
45
|
+
|
|
46
|
+
### Decision Patterns
|
|
47
|
+
```bash
|
|
48
|
+
# Store decision with context
|
|
49
|
+
npx agentic-flow@alpha memory store \
|
|
50
|
+
"decisions:auth-method" \
|
|
51
|
+
'{"choice": "JWT", "reason": "stateless, scalable", "date": "2024-01-01"}'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Code Patterns
|
|
55
|
+
```bash
|
|
56
|
+
# Store reusable code pattern
|
|
57
|
+
npx agentic-flow@alpha memory store \
|
|
58
|
+
"patterns:error-handling" \
|
|
59
|
+
"try-catch with custom error classes and logging"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Learning Patterns
|
|
63
|
+
```bash
|
|
64
|
+
# Store learning from successful task
|
|
65
|
+
npx agentic-flow@alpha memory store \
|
|
66
|
+
"learnings:react-hooks" \
|
|
67
|
+
"useCallback for event handlers, useMemo for expensive computations"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## MCP Tools
|
|
71
|
+
|
|
72
|
+
```javascript
|
|
73
|
+
// Store memory
|
|
74
|
+
mcp__claude-flow__memory_usage({
|
|
75
|
+
action: "store",
|
|
76
|
+
key: "project:architecture",
|
|
77
|
+
value: "microservices with event-driven communication",
|
|
78
|
+
namespace: "project"
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// Retrieve memory
|
|
82
|
+
mcp__claude-flow__memory_usage({
|
|
83
|
+
action: "retrieve",
|
|
84
|
+
key: "project:architecture",
|
|
85
|
+
namespace: "project"
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
// Search memories
|
|
89
|
+
mcp__claude-flow__memory_search({
|
|
90
|
+
pattern: "auth*",
|
|
91
|
+
namespace: "project",
|
|
92
|
+
limit: 10
|
|
93
|
+
})
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## ReasoningBank Integration
|
|
97
|
+
|
|
98
|
+
ReasoningBank provides:
|
|
99
|
+
- **150x faster** vector search with HNSW
|
|
100
|
+
- **Reflexion memory** for self-improvement
|
|
101
|
+
- **Skill library** for learned capabilities
|
|
102
|
+
- **Causal graphs** for decision tracking
|
|
103
|
+
|
|
104
|
+
## Best Practices
|
|
105
|
+
|
|
106
|
+
1. **Use namespaces**: Organize by scope
|
|
107
|
+
2. **Be specific**: Clear, searchable keys
|
|
108
|
+
3. **Include context**: Store decisions with reasoning
|
|
109
|
+
4. **Clean up**: Delete stale patterns
|
|
110
|
+
5. **Version patterns**: Track changes over time
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sparc-methodology
|
|
3
|
+
description: SPARC development methodology for systematic test-driven development
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- specification
|
|
9
|
+
- pseudocode
|
|
10
|
+
- architecture
|
|
11
|
+
- refinement
|
|
12
|
+
- completion
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# SPARC Methodology Skill
|
|
16
|
+
|
|
17
|
+
Systematic Test-Driven Development using SPARC (Specification, Pseudocode, Architecture, Refinement, Completion).
|
|
18
|
+
|
|
19
|
+
## Quick Commands
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Run complete TDD workflow
|
|
23
|
+
npx agentic-flow@alpha sparc tdd "implement user authentication"
|
|
24
|
+
|
|
25
|
+
# Run specific phase
|
|
26
|
+
npx agentic-flow@alpha sparc run specification "auth system"
|
|
27
|
+
npx agentic-flow@alpha sparc run pseudocode "auth system"
|
|
28
|
+
npx agentic-flow@alpha sparc run architect "auth system"
|
|
29
|
+
npx agentic-flow@alpha sparc run refinement "auth system"
|
|
30
|
+
npx agentic-flow@alpha sparc run completion "auth system"
|
|
31
|
+
|
|
32
|
+
# Batch execution
|
|
33
|
+
npx agentic-flow@alpha sparc batch "spec-pseudocode,architect" "feature X"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## SPARC Phases
|
|
37
|
+
|
|
38
|
+
### 1. Specification (spec)
|
|
39
|
+
Define requirements and acceptance criteria.
|
|
40
|
+
|
|
41
|
+
**Agent**: `specification`
|
|
42
|
+
**Output**: Requirements doc, test cases
|
|
43
|
+
**Command**:
|
|
44
|
+
```bash
|
|
45
|
+
npx agentic-flow@alpha sparc run spec "user login feature"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Pseudocode (pseudo)
|
|
49
|
+
Design algorithms and logic flow.
|
|
50
|
+
|
|
51
|
+
**Agent**: `pseudocode`
|
|
52
|
+
**Output**: Algorithm design, flow diagrams
|
|
53
|
+
**Command**:
|
|
54
|
+
```bash
|
|
55
|
+
npx agentic-flow@alpha sparc run pseudo "auth flow"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3. Architecture (arch)
|
|
59
|
+
System design and component structure.
|
|
60
|
+
|
|
61
|
+
**Agent**: `architecture`
|
|
62
|
+
**Output**: Component diagram, API design
|
|
63
|
+
**Command**:
|
|
64
|
+
```bash
|
|
65
|
+
npx agentic-flow@alpha sparc run arch "microservices layout"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. Refinement (refine)
|
|
69
|
+
Iterative TDD implementation.
|
|
70
|
+
|
|
71
|
+
**Agent**: `refinement`
|
|
72
|
+
**Output**: Tests + Implementation
|
|
73
|
+
**Command**:
|
|
74
|
+
```bash
|
|
75
|
+
npx agentic-flow@alpha sparc run refine "auth module"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. Completion (complete)
|
|
79
|
+
Integration and deployment.
|
|
80
|
+
|
|
81
|
+
**Agent**: `completion`
|
|
82
|
+
**Output**: Integrated system, docs
|
|
83
|
+
**Command**:
|
|
84
|
+
```bash
|
|
85
|
+
npx agentic-flow@alpha sparc run complete "auth system"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## SPARC Modes
|
|
89
|
+
|
|
90
|
+
Additional specialized modes:
|
|
91
|
+
|
|
92
|
+
| Mode | Description |
|
|
93
|
+
|------|-------------|
|
|
94
|
+
| `dev` | General development |
|
|
95
|
+
| `api` | API design |
|
|
96
|
+
| `ui` | UI/UX development |
|
|
97
|
+
| `test` | Testing focus |
|
|
98
|
+
| `refactor` | Code improvement |
|
|
99
|
+
| `debug` | Bug investigation |
|
|
100
|
+
| `security` | Security review |
|
|
101
|
+
| `devops` | CI/CD setup |
|
|
102
|
+
|
|
103
|
+
## TDD Workflow
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Full TDD cycle
|
|
107
|
+
npx agentic-flow@alpha sparc tdd "implement OAuth2"
|
|
108
|
+
|
|
109
|
+
# This runs:
|
|
110
|
+
# 1. Specification: Define requirements
|
|
111
|
+
# 2. Pseudocode: Design algorithm
|
|
112
|
+
# 3. Architecture: Plan structure
|
|
113
|
+
# 4. Refinement: Write tests first, then implement
|
|
114
|
+
# 5. Completion: Integrate and document
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Agent Integration
|
|
118
|
+
|
|
119
|
+
SPARC uses specialized agents:
|
|
120
|
+
|
|
121
|
+
```javascript
|
|
122
|
+
// Via Claude Code Task tool
|
|
123
|
+
Task("Specification agent", "Define requirements for OAuth", "specification")
|
|
124
|
+
Task("Architecture agent", "Design OAuth architecture", "architecture")
|
|
125
|
+
Task("Coder agent", "Implement OAuth with TDD", "sparc-coder")
|
|
126
|
+
Task("Tester agent", "Verify OAuth implementation", "tester")
|
|
127
|
+
Task("Reviewer agent", "Review OAuth code quality", "reviewer")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Best Practices
|
|
131
|
+
|
|
132
|
+
1. **Start with specification**: Clear requirements first
|
|
133
|
+
2. **Write tests first**: TDD in refinement phase
|
|
134
|
+
3. **Iterate small**: Small increments
|
|
135
|
+
4. **Document as you go**: Keep docs updated
|
|
136
|
+
5. **Review at each phase**: Quality gates
|
|
137
|
+
6. **Use parallel execution**: Multiple agents
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swarm-coordination
|
|
3
|
+
description: Orchestrate multi-agent swarms for complex parallel task execution
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- swarm_init
|
|
9
|
+
- agent_spawn
|
|
10
|
+
- task_orchestration
|
|
11
|
+
- topology_optimization
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Swarm Coordination Skill
|
|
15
|
+
|
|
16
|
+
Coordinate multi-agent swarms for parallel task execution with intelligent topology selection.
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Initialize a mesh swarm with 5 agents
|
|
22
|
+
npx agentic-flow@alpha swarm init --topology mesh --agents 5
|
|
23
|
+
|
|
24
|
+
# Spawn specialized agents
|
|
25
|
+
npx agentic-flow@alpha swarm spawn --type researcher --name "Research Agent"
|
|
26
|
+
npx agentic-flow@alpha swarm spawn --type coder --name "Code Agent"
|
|
27
|
+
|
|
28
|
+
# Orchestrate a task
|
|
29
|
+
npx agentic-flow@alpha swarm orchestrate "Implement feature X with tests"
|
|
30
|
+
|
|
31
|
+
# Check swarm status
|
|
32
|
+
npx agentic-flow@alpha swarm status
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Topologies
|
|
36
|
+
|
|
37
|
+
### Mesh (Default)
|
|
38
|
+
- All agents communicate directly
|
|
39
|
+
- Best for: Collaborative tasks, code review
|
|
40
|
+
- Latency: Low
|
|
41
|
+
- Scalability: Medium
|
|
42
|
+
|
|
43
|
+
### Hierarchical
|
|
44
|
+
- Tree structure with coordinator
|
|
45
|
+
- Best for: Large projects, delegation
|
|
46
|
+
- Latency: Medium
|
|
47
|
+
- Scalability: High
|
|
48
|
+
|
|
49
|
+
### Ring
|
|
50
|
+
- Sequential communication
|
|
51
|
+
- Best for: Pipeline processing, CI/CD
|
|
52
|
+
- Latency: Higher
|
|
53
|
+
- Scalability: Medium
|
|
54
|
+
|
|
55
|
+
### Star
|
|
56
|
+
- Central hub coordinates all
|
|
57
|
+
- Best for: Simple coordination
|
|
58
|
+
- Latency: Low
|
|
59
|
+
- Scalability: Low
|
|
60
|
+
|
|
61
|
+
## Agent Types
|
|
62
|
+
|
|
63
|
+
| Type | Description | Use Case |
|
|
64
|
+
|------|-------------|----------|
|
|
65
|
+
| researcher | Deep analysis | Requirements gathering |
|
|
66
|
+
| coder | Implementation | Feature development |
|
|
67
|
+
| tester | Quality assurance | Test creation |
|
|
68
|
+
| reviewer | Code quality | PR review |
|
|
69
|
+
| architect | System design | Architecture decisions |
|
|
70
|
+
| coordinator | Task routing | Complex workflows |
|
|
71
|
+
|
|
72
|
+
## MCP Tools
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
// Initialize swarm
|
|
76
|
+
mcp__claude-flow__swarm_init({ topology: "mesh", maxAgents: 8 })
|
|
77
|
+
|
|
78
|
+
// Spawn agent
|
|
79
|
+
mcp__claude-flow__agent_spawn({ type: "coder", name: "Feature Dev" })
|
|
80
|
+
|
|
81
|
+
// Orchestrate task
|
|
82
|
+
mcp__claude-flow__task_orchestrate({
|
|
83
|
+
task: "Implement OAuth",
|
|
84
|
+
strategy: "parallel"
|
|
85
|
+
})
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Best Practices
|
|
89
|
+
|
|
90
|
+
1. **Right-size your swarm**: Start with 3-5 agents
|
|
91
|
+
2. **Choose topology wisely**: Match to task structure
|
|
92
|
+
3. **Use Claude Code Task tool**: For actual agent spawning
|
|
93
|
+
4. **Monitor status**: Check for bottlenecks
|
|
94
|
+
5. **Clean up**: Destroy swarm when done
|