claude-flow-novice 2.13.0 → 2.14.1
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/commands/cfn/README.md +177 -129
- package/.claude/commands/cfn/cfn-loop-cli.md +279 -0
- package/.claude/commands/cfn/cfn-loop-document.md +20 -1
- package/.claude/commands/cfn/cfn-loop-frontend.md +17 -2
- package/.claude/commands/cfn/cfn-loop-task.md +460 -0
- package/.claude/commands/cfn/context-curate.md +27 -38
- package/.claude/commands/cfn/context-inject.md +14 -25
- package/.claude/commands/cfn/context-query.md +40 -45
- package/.claude/commands/cfn/context-reflect.md +40 -38
- package/.claude/commands/cfn/context-stats.md +13 -38
- package/.claude/commands/cfn/launch-web-dashboard.md +0 -295
- package/.claude/commands/cfn/list-agents-rebuild.md +18 -18
- package/.claude/commands/cfn/write-plan.md +246 -75
- package/.claude/root-claude-distribute/CFN-CLAUDE.md +126 -233
- package/.claude/skills/cfn-backlog-management/add-backlog-item.sh +25 -27
- package/.claude/skills/cfn-changelog-management/add-changelog-entry.sh +21 -19
- package/.claude/skills/cfn-changelog-management/bulk-import.sh +268 -0
- package/.claude/skills/cfn-changelog-management/lib/README.md +212 -0
- package/.claude/skills/cfn-changelog-management/lib/validation.sh +72 -0
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +36 -11
- package/claude-assets/agents/cfn-dev-team/analysts/root-cause-analyst.md +259 -0
- package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +45 -6
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +59 -0
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +4 -4
- package/claude-assets/commands/cfn/auto-compact.md +80 -0
- package/claude-assets/commands/cfn/cfn-loop-cli.md +13 -2
- package/claude-assets/commands/cfn/cfn-loop-epic.md +478 -0
- package/claude-assets/commands/cfn/cfn-loop-single.md +256 -0
- package/claude-assets/commands/cfn/cfn-loop-sprints.md +396 -0
- package/claude-assets/commands/cfn/cfn-loop-task.md +27 -9
- package/claude-assets/commands/cfn/cfn-loop.md +518 -0
- package/claude-assets/commands/cfn/claude-md.md +64 -0
- package/claude-assets/commands/cfn/claude-soul.md +22 -0
- package/claude-assets/commands/cfn/cost-savings-off.md +35 -0
- package/claude-assets/commands/cfn/cost-savings-on.md +35 -0
- package/claude-assets/commands/cfn/cost-savings-status.md +34 -0
- package/claude-assets/commands/cfn/custom-routing-activate.md +55 -0
- package/claude-assets/commands/cfn/custom-routing-deactivate.md +46 -0
- package/claude-assets/commands/cfn/dependency-recommendations.md +171 -0
- package/claude-assets/commands/cfn/fullstack.md +179 -0
- package/claude-assets/commands/cfn/github.md +221 -0
- package/claude-assets/commands/cfn/hooks.md +38 -0
- package/claude-assets/commands/cfn/metrics-summary.md +58 -0
- package/claude-assets/commands/cfn/neural.md +39 -0
- package/claude-assets/commands/cfn/parse-epic.md +357 -0
- package/claude-assets/commands/cfn/performance.md +41 -0
- package/claude-assets/commands/cfn/sparc.md +46 -0
- package/claude-assets/commands/cfn/suggest-improvements.md +95 -0
- package/claude-assets/commands/cfn/suggest-templates.md +147 -0
- package/claude-assets/commands/cfn/swarm.md +24 -0
- package/claude-assets/root-claude-distribute/CFN-CLAUDE.md +126 -233
- package/claude-assets/skills/cfn-backlog-management/add-backlog-item.sh +25 -27
- package/claude-assets/skills/cfn-changelog-management/add-changelog-entry.sh +21 -19
- package/claude-assets/skills/cfn-changelog-management/bulk-import.sh +268 -0
- package/claude-assets/skills/cfn-changelog-management/lib/README.md +212 -0
- package/claude-assets/skills/cfn-changelog-management/lib/validation.sh +72 -0
- package/claude-assets/skills/cfn-product-owner-decision/execute-decision.sh +36 -11
- package/claude-assets/skills/cfn-task-config-init/SKILL.md +204 -0
- package/claude-assets/skills/cfn-task-config-init/initialize-config.sh +264 -0
- package/dist/agents/agent-loader.js +165 -146
- package/dist/agents/agent-loader.js.map +1 -1
- package/package.json +2 -2
- package/.claude/commands/README.md +0 -205
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +0 -840
- package/.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh.backup-p7 +0 -423
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup +0 -38
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-1761167675 +0 -1672
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-p5 +0 -1604
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase1 +0 -1550
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase2 +0 -1621
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase3 +0 -1621
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.broken +0 -1627
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.corrupted +0 -80
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.deprecated +0 -1864
- package/.claude/skills/cfn-redis-coordination/tests/test_coordination_primitives.sh.deprecated +0 -20
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup +0 -840
- package/claude-assets/skills/cfn-loop2-output-processing/execute-and-extract.sh.backup +0 -36
- package/claude-assets/skills/cfn-redis-coordination/invoke-waiting-mode.sh.backup-p7 +0 -423
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup +0 -38
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-1761167675 +0 -1672
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-p5 +0 -1604
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase1 +0 -1550
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase2 +0 -1621
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.backup-phase3 +0 -1621
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.broken +0 -1627
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.corrupted +0 -80
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.deprecated +0 -1864
- package/claude-assets/skills/cfn-redis-coordination/tests/test_coordination_primitives.sh.deprecated +0 -20
|
@@ -1,65 +1,60 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Query adaptive context bullets by category, tags, confidence
|
|
2
|
+
description: Query adaptive context bullets by category, tags, confidence, or semantic similarity
|
|
3
3
|
tags: [context, ace, query, search, retrieval]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Context Query Command
|
|
7
7
|
|
|
8
|
-
Search the `adaptive_context` table to retrieve relevant bullets.
|
|
8
|
+
Search the `adaptive_context` table to retrieve relevant bullets for task execution, agent spawning, or CLAUDE.md injection.
|
|
9
9
|
|
|
10
10
|
**Usage:**
|
|
11
11
|
```bash
|
|
12
|
-
/context-query [--category=<type>] [--tags=<
|
|
12
|
+
/context-query [--category=<type>] [--tags=<tag1,tag2>] [--min-confidence=<0.0-1.0>]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
**
|
|
15
|
+
**What This Does:**
|
|
16
|
+
1. Queries `adaptive_context` table with filters
|
|
17
|
+
2. Ranks bullets by relevance (priority, confidence, usage_count)
|
|
18
|
+
3. Optionally uses semantic similarity if embeddings available
|
|
19
|
+
4. Returns formatted bullets ready for injection
|
|
20
|
+
|
|
21
|
+
**Arguments:**
|
|
22
|
+
- `--category=<type>`: Filter by category (strategy/pattern/edge_case/domain_insight/anti_pattern/optimization)
|
|
23
|
+
- `--tags=<tag1,tag2>`: Filter by tags (comma-separated)
|
|
24
|
+
- `--min-confidence=<0.0-1.0>`: Minimum confidence score (default: 0.6)
|
|
25
|
+
- `--min-helpful=<count>`: Minimum helpful_count (default: 0)
|
|
26
|
+
- `--max-harmful=<count>`: Maximum harmful_count (default: 2)
|
|
27
|
+
- `--priority-min=<1-10>`: Minimum priority (default: 5)
|
|
28
|
+
- `--limit=<N>`: Max results to return (default: 20)
|
|
29
|
+
- `--sort-by=<field>`: Sort by confidence|helpful_count|priority|last_used_at (default: priority)
|
|
30
|
+
- `--semantic-query=<text>`: Find bullets semantically similar to query text (requires embeddings)
|
|
31
|
+
- `--related-to=<bullet-id>`: Find bullets related to specific bullet
|
|
32
|
+
- `--swarm-id=<id>`: Filter by swarm context
|
|
33
|
+
- `--project-id=<id>`: Filter by project context
|
|
34
|
+
- `--output=<format>`: Output format (json|markdown|claude-md) (default: markdown)
|
|
35
|
+
- `--inject`: Automatically inject results into CLAUDE.md
|
|
36
|
+
|
|
37
|
+
**Query Examples:**
|
|
16
38
|
|
|
17
39
|
```bash
|
|
18
40
|
# Get top strategy bullets
|
|
19
|
-
|
|
20
|
-
SELECT bullet_id, content, confidence_score, helpful_count
|
|
21
|
-
FROM adaptive_context
|
|
22
|
-
WHERE is_active = 1 AND category = 'strategy' AND confidence_score >= 0.8
|
|
23
|
-
ORDER BY confidence_score DESC, helpful_count DESC
|
|
24
|
-
LIMIT 10;
|
|
25
|
-
"
|
|
41
|
+
/context-query --category=strategy --min-confidence=0.8 --limit=10
|
|
26
42
|
|
|
27
43
|
# Find CFN Loop coordination patterns
|
|
28
|
-
|
|
29
|
-
SELECT bullet_id, category, content, tags
|
|
30
|
-
FROM adaptive_context
|
|
31
|
-
WHERE is_active = 1
|
|
32
|
-
AND (tags LIKE '%cfn-loop%' OR tags LIKE '%coordination%')
|
|
33
|
-
AND helpful_count >= 3
|
|
34
|
-
ORDER BY helpful_count DESC;
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
# Get high-priority optimization tips
|
|
38
|
-
sqlite3 ./.artifacts/database/swarm-memory.db "
|
|
39
|
-
SELECT bullet_id, content, confidence_score, priority
|
|
40
|
-
FROM adaptive_context
|
|
41
|
-
WHERE is_active = 1
|
|
42
|
-
AND category = 'optimization'
|
|
43
|
-
AND priority >= 7
|
|
44
|
-
ORDER BY confidence_score DESC;
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
# Get all active bullets
|
|
48
|
-
sqlite3 ./.artifacts/database/swarm-memory.db "
|
|
49
|
-
SELECT bullet_id, category, content, confidence_score, helpful_count, harmful_count
|
|
50
|
-
FROM adaptive_context
|
|
51
|
-
WHERE is_active = 1
|
|
52
|
-
ORDER BY helpful_count DESC, confidence_score DESC
|
|
53
|
-
LIMIT 20;
|
|
54
|
-
"
|
|
55
|
-
```
|
|
44
|
+
/context-query --tags=cfn-loop,coordination --min-helpful=3
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
46
|
+
# Get all high-priority optimization tips
|
|
47
|
+
/context-query --category=optimization --priority-min=7 --sort-by=confidence
|
|
48
|
+
|
|
49
|
+
# Semantic search for Redis patterns
|
|
50
|
+
/context-query --semantic-query="Redis pub/sub coordination patterns"
|
|
51
|
+
|
|
52
|
+
# Get bullets related to specific bullet
|
|
53
|
+
/context-query --related-to=STRAT-001 --limit=5
|
|
54
|
+
|
|
55
|
+
# Get project-specific domain insights
|
|
56
|
+
/context-query --category=domain_insight --project-id=proj-auth --min-helpful=5
|
|
57
|
+
```
|
|
63
58
|
|
|
64
59
|
**Output Formats:**
|
|
65
60
|
|
|
@@ -68,16 +68,20 @@ Spawn a `context-reflector` agent to analyze recent task execution traces and ex
|
|
|
68
68
|
/context-reflect --reflection-type=optimization --swarm-id=swarm-perf
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
**
|
|
71
|
+
**Reflection Prompt Template:**
|
|
72
|
+
The reflector agent will use this structured prompt:
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
```
|
|
75
|
+
You are a Context Reflector for the ACE (Adaptive Context Extension) system.
|
|
76
|
+
|
|
77
|
+
**Task Execution Trace:**
|
|
78
|
+
{execution_trace}
|
|
74
79
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
You are a Context Reflector for the ACE system.
|
|
80
|
+
**Feedback Signals:**
|
|
81
|
+
{feedback_signals}
|
|
78
82
|
|
|
79
83
|
**Your Mission:**
|
|
80
|
-
|
|
84
|
+
Extract 3-7 high-quality lessons (bullets) from this execution. For each lesson:
|
|
81
85
|
|
|
82
86
|
1. **Identify the pattern/insight**: What worked? What failed? What was unexpected?
|
|
83
87
|
2. **Classify the lesson**:
|
|
@@ -94,40 +98,38 @@ Analyze recent task execution and extract 3-7 high-quality lessons. For each les
|
|
|
94
98
|
- Include context/conditions ("When X, do Y")
|
|
95
99
|
- 1-3 sentences max
|
|
96
100
|
|
|
97
|
-
4. Assess confidence
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
--reflection-type success \\
|
|
122
|
-
--task-id \${TASK_ID} \\
|
|
123
|
-
--agent-id \${AGENT_ID} \\
|
|
124
|
-
--lessons-file /tmp/lessons.json
|
|
125
|
-
\`\`\`
|
|
126
|
-
|
|
127
|
-
4. Report reflection ID and summary
|
|
128
|
-
`, "context-reflector");
|
|
101
|
+
4. **Assess confidence**: 0.0-1.0 based on:
|
|
102
|
+
- Strong evidence (tests pass, metrics improve) → 0.8-1.0
|
|
103
|
+
- Moderate evidence (code works, no tests) → 0.5-0.7
|
|
104
|
+
- Hypothesis/observation (needs validation) → 0.3-0.4
|
|
105
|
+
|
|
106
|
+
5. **Tag appropriately**: Add 2-5 relevant tags for retrieval
|
|
107
|
+
|
|
108
|
+
**Output Format (JSON):**
|
|
109
|
+
{
|
|
110
|
+
"reflection_type": "success|failure|optimization|edge_case|pattern",
|
|
111
|
+
"summary": "Brief summary of what was learned",
|
|
112
|
+
"extracted_lessons": [
|
|
113
|
+
{
|
|
114
|
+
"bullet_id": "STRAT-XXX", // Use next available ID
|
|
115
|
+
"category": "strategy|pattern|edge_case|domain_insight|anti_pattern|optimization",
|
|
116
|
+
"content": "Actionable lesson with context",
|
|
117
|
+
"confidence": 0.85,
|
|
118
|
+
"tags": ["tag1", "tag2"],
|
|
119
|
+
"reasoning": "Why this lesson is valuable"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"helpful_existing_bullets": ["STRAT-001", "PATTERN-017"], // Bullets that helped
|
|
123
|
+
"harmful_existing_bullets": [] // Bullets that led astray
|
|
124
|
+
}
|
|
129
125
|
```
|
|
130
126
|
|
|
127
|
+
**Storage:**
|
|
128
|
+
- Reflections stored in `context_reflections` table
|
|
129
|
+
- ACL Level 3 (Swarm) - visible to swarm members
|
|
130
|
+
- 30-day retention for pending reflections
|
|
131
|
+
- Processed reflections retained as audit trail
|
|
132
|
+
|
|
131
133
|
**Post-Reflection:**
|
|
132
134
|
1. If `--auto-curate` enabled: Trigger `/context-curate --reflection-id=<id>`
|
|
133
135
|
2. Otherwise: Reflection queued for manual curation
|
|
@@ -5,52 +5,27 @@ tags: [context, ace, stats, analytics, health]
|
|
|
5
5
|
|
|
6
6
|
# Context Statistics Command
|
|
7
7
|
|
|
8
|
-
View statistics about adaptive context
|
|
8
|
+
View comprehensive statistics about the adaptive context system, including bullet health, usage patterns, confidence trends, and curation metrics.
|
|
9
9
|
|
|
10
10
|
**Usage:**
|
|
11
11
|
```bash
|
|
12
|
-
/context-stats [--
|
|
12
|
+
/context-stats [--category=<type>] [--period=<days>] [--format=<format>]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
**What This Does:**
|
|
16
|
-
Queries
|
|
16
|
+
1. Queries `adaptive_context`, `context_usage_log`, and `context_merge_log` tables
|
|
17
|
+
2. Generates analytics and health metrics
|
|
18
|
+
3. Identifies trends, anomalies, and optimization opportunities
|
|
19
|
+
4. Provides actionable recommendations
|
|
17
20
|
|
|
18
21
|
**Arguments:**
|
|
19
|
-
- `--
|
|
20
|
-
- `--
|
|
21
|
-
- `--
|
|
22
|
-
- `--
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Query summary
|
|
29
|
-
./.claude/skills/cfn-ace-system/invoke-context-stats.sh --query summary
|
|
30
|
-
|
|
31
|
-
# Query all bullets
|
|
32
|
-
sqlite3 ./.artifacts/database/swarm-memory.db "
|
|
33
|
-
SELECT
|
|
34
|
-
category,
|
|
35
|
-
COUNT(*) as count,
|
|
36
|
-
AVG(confidence_score) as avg_confidence,
|
|
37
|
-
SUM(helpful_count) as total_helpful,
|
|
38
|
-
SUM(harmful_count) as total_harmful
|
|
39
|
-
FROM adaptive_context
|
|
40
|
-
WHERE is_active = 1
|
|
41
|
-
GROUP BY category
|
|
42
|
-
ORDER BY count DESC;
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
# Get top bullets
|
|
46
|
-
sqlite3 ./.artifacts/database/swarm-memory.db "
|
|
47
|
-
SELECT bullet_id, category, confidence_score, helpful_count, harmful_count, content
|
|
48
|
-
FROM adaptive_context
|
|
49
|
-
WHERE is_active = 1
|
|
50
|
-
ORDER BY helpful_count DESC, confidence_score DESC
|
|
51
|
-
LIMIT 10;
|
|
52
|
-
"
|
|
53
|
-
```
|
|
22
|
+
- `--category=<type>`: Filter by category (default: all)
|
|
23
|
+
- `--period=<days>`: Analysis period in days (default: 30)
|
|
24
|
+
- `--swarm-id=<id>`: Filter by swarm
|
|
25
|
+
- `--project-id=<id>`: Filter by project
|
|
26
|
+
- `--format=<format>`: Output format (text|json|chart) (default: text)
|
|
27
|
+
- `--detail-level=<level>`: Summary|detailed|comprehensive (default: summary)
|
|
28
|
+
- `--output=<path>`: Save report to file
|
|
54
29
|
|
|
55
30
|
**Output Example:**
|
|
56
31
|
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
# Launch Web Dashboard - Start Web Portal Development Server
|
|
2
|
-
|
|
3
|
-
Launch the claude-flow-novice web portal with hot-reload development servers for both client and server.
|
|
4
|
-
|
|
5
|
-
## Command
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
/launch-web-dashboard [--port <port>] [--production]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Execution Pattern
|
|
12
|
-
|
|
13
|
-
### Default Development Mode
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# Navigate to web portal package
|
|
17
|
-
cd packages/web-portal
|
|
18
|
-
|
|
19
|
-
# Kill any existing processes on ports 3001-3003 (client) and 3000-3002 (server)
|
|
20
|
-
lsof -ti:3001,3002,3003,3000 | xargs -r kill -9
|
|
21
|
-
|
|
22
|
-
# Start development servers with hot-reload
|
|
23
|
-
npm run dev
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
This will:
|
|
27
|
-
1. **Client (Vite)**: Start on port 3001 (or next available: 3002, 3003)
|
|
28
|
-
2. **Server (tsx watch)**: Start on port 3000 (or next available: 3001, 3002)
|
|
29
|
-
|
|
30
|
-
### Production Mode
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
# Build for production
|
|
34
|
-
npm run build
|
|
35
|
-
|
|
36
|
-
# Start production server
|
|
37
|
-
npm run start
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Port Configuration
|
|
41
|
-
|
|
42
|
-
### Default Ports
|
|
43
|
-
- **Client (Vite)**: 3001
|
|
44
|
-
- **Server (Express)**: 3000
|
|
45
|
-
- **WebSocket**: Same as server port
|
|
46
|
-
|
|
47
|
-
### Port Conflict Resolution
|
|
48
|
-
If ports are in use, automatically tries next available port:
|
|
49
|
-
- Client: 3001 → 3002 → 3003
|
|
50
|
-
- Server: 3000 → 3001 → 3002
|
|
51
|
-
|
|
52
|
-
## Output
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
🚀 Launching Web Portal...
|
|
56
|
-
|
|
57
|
-
📦 Package: @claude-flow-novice/web-portal
|
|
58
|
-
📂 Directory: packages/web-portal
|
|
59
|
-
|
|
60
|
-
🔧 Cleaning up existing processes...
|
|
61
|
-
✅ Ports cleared: 3001, 3002, 3000
|
|
62
|
-
|
|
63
|
-
🎬 Starting development servers...
|
|
64
|
-
|
|
65
|
-
[Client] VITE v7.1.9 ready in 951 ms
|
|
66
|
-
[Client] ➜ Local: http://localhost:3001/
|
|
67
|
-
[Client] ➜ Network: use --host to expose
|
|
68
|
-
|
|
69
|
-
[Server] 🚀 Server running on http://localhost:3000
|
|
70
|
-
[Server] 📊 Metrics: http://localhost:3000/api/metrics
|
|
71
|
-
[Server] 🔌 WebSocket: ws://localhost:3000
|
|
72
|
-
|
|
73
|
-
✅ Web Dashboard Launched Successfully!
|
|
74
|
-
|
|
75
|
-
📱 Access Points:
|
|
76
|
-
• Main UI: http://localhost:3001
|
|
77
|
-
• API Server: http://localhost:3000
|
|
78
|
-
• API Docs: http://localhost:3000/api-docs
|
|
79
|
-
• Health Check: http://localhost:3000/health
|
|
80
|
-
|
|
81
|
-
🛠️ Available Features:
|
|
82
|
-
✓ Agent Management & Monitoring
|
|
83
|
-
✓ CFN Loop Execution & Visualization
|
|
84
|
-
✓ Real-time Metrics Dashboard
|
|
85
|
-
✓ WebSocket Live Updates
|
|
86
|
-
✓ Hybrid Routing Control Panel
|
|
87
|
-
✓ SQLite Memory Browser
|
|
88
|
-
✓ Redis Coordination Monitor
|
|
89
|
-
|
|
90
|
-
💡 Tips:
|
|
91
|
-
• Hot-reload enabled for instant updates
|
|
92
|
-
• Check console for detailed logs
|
|
93
|
-
• Press Ctrl+C to stop servers
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Flags
|
|
97
|
-
|
|
98
|
-
### --port <port>
|
|
99
|
-
Specify custom client port (server will use port-1)
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
/launch-web-dashboard --port 4000
|
|
103
|
-
# Client: http://localhost:4000
|
|
104
|
-
# Server: http://localhost:3999
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### --production
|
|
108
|
-
Build and run in production mode
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
/launch-web-dashboard --production
|
|
112
|
-
# Optimized build with minification
|
|
113
|
-
# No hot-reload, better performance
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### --debug
|
|
117
|
-
Enable verbose logging
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
/launch-web-dashboard --debug
|
|
121
|
-
# Shows detailed startup logs
|
|
122
|
-
# Includes dependency resolution
|
|
123
|
-
# Displays all environment variables
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### --kill-only
|
|
127
|
-
Just kill existing processes without starting new ones
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
/launch-web-dashboard --kill-only
|
|
131
|
-
# Cleanup only, useful for port conflicts
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Features Available in Dashboard
|
|
135
|
-
|
|
136
|
-
### 1. Agent Management
|
|
137
|
-
- View all active agents and their status
|
|
138
|
-
- Monitor agent workload and performance
|
|
139
|
-
- Inspect agent capabilities and roles
|
|
140
|
-
- Track agent communication via Redis pub/sub
|
|
141
|
-
|
|
142
|
-
### 2. CFN Loop Visualization
|
|
143
|
-
- Real-time phase execution tracking
|
|
144
|
-
- Loop 2/3/4 progress monitoring
|
|
145
|
-
- Confidence score aggregation
|
|
146
|
-
- Consensus validation status
|
|
147
|
-
- Product Owner decisions
|
|
148
|
-
|
|
149
|
-
### 3. Metrics Dashboard
|
|
150
|
-
- Cost tracking (per provider)
|
|
151
|
-
- Token usage analytics
|
|
152
|
-
- API latency monitoring
|
|
153
|
-
- Success/failure rates
|
|
154
|
-
- Performance bottlenecks
|
|
155
|
-
|
|
156
|
-
### 4. Hybrid Routing Control
|
|
157
|
-
- Provider selection (Claude Max / z.ai)
|
|
158
|
-
- Worker spawn monitoring
|
|
159
|
-
- Coordinator intelligence tracking
|
|
160
|
-
- Cost savings visualization
|
|
161
|
-
|
|
162
|
-
### 5. Memory & State
|
|
163
|
-
- SQLite memory browser with ACL levels
|
|
164
|
-
- Redis key inspection
|
|
165
|
-
- Audit trail viewer
|
|
166
|
-
- Permission management
|
|
167
|
-
|
|
168
|
-
### 6. Event Stream
|
|
169
|
-
- Live WebSocket event feed
|
|
170
|
-
- Filter by event type
|
|
171
|
-
- Search historical events
|
|
172
|
-
- Export event logs
|
|
173
|
-
|
|
174
|
-
## Troubleshooting
|
|
175
|
-
|
|
176
|
-
### Port Already in Use
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
# Automatic resolution
|
|
180
|
-
/launch-web-dashboard
|
|
181
|
-
# Will try ports 3001 → 3002 → 3003 automatically
|
|
182
|
-
|
|
183
|
-
# Manual cleanup
|
|
184
|
-
/launch-web-dashboard --kill-only
|
|
185
|
-
# Then try again
|
|
186
|
-
/launch-web-dashboard
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Build Errors
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
# Clean build cache
|
|
193
|
-
cd packages/web-portal
|
|
194
|
-
rm -rf node_modules .vite dist
|
|
195
|
-
npm install
|
|
196
|
-
npm run build
|
|
197
|
-
|
|
198
|
-
# Then launch
|
|
199
|
-
/launch-web-dashboard
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### WebSocket Connection Issues
|
|
203
|
-
|
|
204
|
-
Check that both client and server are running:
|
|
205
|
-
```bash
|
|
206
|
-
# Client should show: http://localhost:3001
|
|
207
|
-
# Server should show: http://localhost:3000
|
|
208
|
-
|
|
209
|
-
# WebSocket connects to server port
|
|
210
|
-
# Ensure VITE_API_URL matches server URL
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Missing Dependencies
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Install all dependencies
|
|
217
|
-
npm install
|
|
218
|
-
|
|
219
|
-
# Web portal specific
|
|
220
|
-
cd packages/web-portal
|
|
221
|
-
npm install
|
|
222
|
-
|
|
223
|
-
# Rebuild TypeScript
|
|
224
|
-
npm run build
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Integration with Other Commands
|
|
228
|
-
|
|
229
|
-
### With CFN Loop
|
|
230
|
-
```bash
|
|
231
|
-
# Launch dashboard first
|
|
232
|
-
/launch-web-dashboard
|
|
233
|
-
|
|
234
|
-
# In another terminal, run CFN Loop
|
|
235
|
-
/cfn-loop "Task description" --mode=standard
|
|
236
|
-
|
|
237
|
-
# Dashboard will show real-time progress
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### With Hybrid Routing
|
|
241
|
-
```bash
|
|
242
|
-
# Start dashboard
|
|
243
|
-
/launch-web-dashboard
|
|
244
|
-
|
|
245
|
-
# Spawn workers (dashboard monitors them)
|
|
246
|
-
npx claude-flow-spawn "Task" --max-agents 5
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### With Swarm Coordination
|
|
250
|
-
```bash
|
|
251
|
-
# Launch dashboard
|
|
252
|
-
/launch-web-dashboard
|
|
253
|
-
|
|
254
|
-
# Initialize swarm
|
|
255
|
-
node tests/manual/test-swarm-direct.js "Objective" --executor
|
|
256
|
-
|
|
257
|
-
# Dashboard shows agent coordination
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
## Environment Variables
|
|
261
|
-
|
|
262
|
-
The dashboard uses these environment variables (auto-configured):
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
# Client (.env in packages/web-portal)
|
|
266
|
-
VITE_API_URL=http://localhost:3000
|
|
267
|
-
VITE_WS_URL=ws://localhost:3000
|
|
268
|
-
|
|
269
|
-
# Server
|
|
270
|
-
PORT=3000
|
|
271
|
-
NODE_ENV=development
|
|
272
|
-
REDIS_URL=redis://localhost:6379
|
|
273
|
-
SQLITE_DB_PATH=../../data/swarm-memory.db
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
## Security Note
|
|
277
|
-
|
|
278
|
-
Development mode runs with:
|
|
279
|
-
- CORS enabled for localhost
|
|
280
|
-
- Authentication disabled
|
|
281
|
-
- Verbose error messages
|
|
282
|
-
|
|
283
|
-
For production deployment, use `--production` flag which enables:
|
|
284
|
-
- CORS restrictions
|
|
285
|
-
- Authentication requirements
|
|
286
|
-
- Error sanitization
|
|
287
|
-
- Rate limiting
|
|
288
|
-
|
|
289
|
-
## Related Commands
|
|
290
|
-
|
|
291
|
-
- `/cfn-loop` - Execute CFN Loop (visible in dashboard)
|
|
292
|
-
- `/swarm` - Manage swarms (dashboard monitors)
|
|
293
|
-
- `/github-commit` - Commit changes (shows in activity feed)
|
|
294
|
-
- `/sqlite-memory` - Memory management (browsable in dashboard)
|
|
295
|
-
- `/context-stats` - Context metrics (displayed in dashboard)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: list-agents-rebuild
|
|
3
|
-
description: "Regenerate available agents list from .claude/agents/
|
|
3
|
+
description: "Regenerate available agents list from .claude/agents/ folder discovery"
|
|
4
4
|
argument-hint: "[--output=path] [--format=markdown]"
|
|
5
5
|
allowed-tools: ["Bash", "Read", "Write"]
|
|
6
6
|
---
|
|
@@ -11,12 +11,12 @@ Regenerate `src/cli/hybrid-routing/AVAILABLE-AGENTS.md` from live agent discover
|
|
|
11
11
|
|
|
12
12
|
## Architecture Clarification
|
|
13
13
|
|
|
14
|
-
**Source of Truth**: `.claude/agents
|
|
14
|
+
**Source of Truth**: `.claude/agents/` folder (50+ agent .md files)
|
|
15
15
|
**Live Discovery**: `HybridWorkerSpawner.loadAgentDefinitions()` method
|
|
16
16
|
**Documentation Snapshot**: `src/cli/hybrid-routing/AVAILABLE-AGENTS.md` (generated file)
|
|
17
17
|
|
|
18
18
|
**When coordinators spawn agents**:
|
|
19
|
-
1. Load agents dynamically from `.claude/agents
|
|
19
|
+
1. Load agents dynamically from `.claude/agents/` folder
|
|
20
20
|
2. Parse YAML frontmatter from each .md file
|
|
21
21
|
3. Extract keywords, system prompts, categories
|
|
22
22
|
4. In-memory cache for performance
|
|
@@ -26,7 +26,7 @@ Regenerate `src/cli/hybrid-routing/AVAILABLE-AGENTS.md` from live agent discover
|
|
|
26
26
|
- Human-readable reference
|
|
27
27
|
- Documentation for users/coordinators
|
|
28
28
|
- Snapshot of available agents at generation time
|
|
29
|
-
- **NOT** used by the spawning system (system reads .claude/agents/
|
|
29
|
+
- **NOT** used by the spawning system (system reads .claude/agents/ directly)
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ Regenerate `src/cli/hybrid-routing/AVAILABLE-AGENTS.md` from live agent discover
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
# Regenerate agent list
|
|
37
|
-
|
|
37
|
+
node src/cli/hybrid-routing/spawn-workers.js --agents-by-category > src/cli/hybrid-routing/AVAILABLE-AGENTS.md.tmp
|
|
38
38
|
|
|
39
39
|
# Parse and format into markdown document
|
|
40
40
|
node << 'EOF'
|
|
@@ -52,12 +52,12 @@ let markdown = '';
|
|
|
52
52
|
markdown += '# Available Specialized Agents\n\n';
|
|
53
53
|
markdown += '**Hybrid Routing System - Dynamic Agent Discovery**\n\n';
|
|
54
54
|
markdown += '**Generated**: ' + new Date().toISOString().split('T')[0] + '\n';
|
|
55
|
-
markdown += '**Source**: `.claude/agents
|
|
56
|
-
markdown += '**Purpose**: Documentation snapshot - coordinators read from `.claude/agents
|
|
55
|
+
markdown += '**Source**: `.claude/agents/` folder (live discovery)\n';
|
|
56
|
+
markdown += '**Purpose**: Documentation snapshot - coordinators read from `.claude/agents/` directly\n\n';
|
|
57
57
|
|
|
58
58
|
// Add architecture note
|
|
59
59
|
markdown += '## Architecture\n\n';
|
|
60
|
-
markdown += '**Source of Truth**: `.claude/agents
|
|
60
|
+
markdown += '**Source of Truth**: `.claude/agents/` folder\n';
|
|
61
61
|
markdown += '- Coordinators use `HybridWorkerSpawner.loadAgentDefinitions()`\n';
|
|
62
62
|
markdown += '- Recursive scanning with YAML frontmatter parsing\n';
|
|
63
63
|
markdown += '- In-memory caching after first load\n';
|
|
@@ -72,7 +72,7 @@ const categoriesMatch = rawOutput.match(/(\d+) categories/);
|
|
|
72
72
|
if (discoveredMatch && loadedMatch) {
|
|
73
73
|
markdown += '## Discovery Statistics\n\n';
|
|
74
74
|
markdown += '```\n';
|
|
75
|
-
markdown += `🔍 Discovered ${discoveredMatch[1]} agent files in .claude/agents
|
|
75
|
+
markdown += `🔍 Discovered ${discoveredMatch[1]} agent files in .claude/agents/\n`;
|
|
76
76
|
markdown += `✅ Loaded ${loadedMatch[1]} agents (${skippedMatch ? skippedMatch[1] : '?'} skipped)\n`;
|
|
77
77
|
markdown += `📋 ${categoriesMatch ? categoriesMatch[1] : '?'} categories\n`;
|
|
78
78
|
markdown += '```\n\n';
|
|
@@ -126,9 +126,9 @@ markdown += '## Usage\n\n';
|
|
|
126
126
|
markdown += '### CLI Commands\n\n';
|
|
127
127
|
markdown += '```bash\n';
|
|
128
128
|
markdown += '# List all agents (flat view)\n';
|
|
129
|
-
markdown += '
|
|
129
|
+
markdown += 'node src/cli/hybrid-routing/spawn-workers.js --list-agents\n\n';
|
|
130
130
|
markdown += '# List agents by category\n';
|
|
131
|
-
markdown += '
|
|
131
|
+
markdown += 'node src/cli/hybrid-routing/spawn-workers.js --agents-by-category\n\n';
|
|
132
132
|
markdown += '# Regenerate this documentation file\n';
|
|
133
133
|
markdown += '/list-agents-rebuild\n';
|
|
134
134
|
markdown += '```\n\n';
|
|
@@ -136,12 +136,12 @@ markdown += '```\n\n';
|
|
|
136
136
|
markdown += '### Coordinator Usage\n\n';
|
|
137
137
|
markdown += '```bash\n';
|
|
138
138
|
markdown += '# Automatic selection (keyword-based)\n';
|
|
139
|
-
markdown += '
|
|
139
|
+
markdown += 'node src/cli/hybrid-routing/spawn-workers.js "Build auth" --max-agents=3\n\n';
|
|
140
140
|
markdown += '# Coordinator override (manual agent types)\n';
|
|
141
|
-
markdown += '
|
|
141
|
+
markdown += 'node src/cli/hybrid-routing/spawn-workers.js "Task" \\\n';
|
|
142
142
|
markdown += ' --agents=architect,coder,tester\n\n';
|
|
143
143
|
markdown += '# Full override (custom agents + subtasks)\n';
|
|
144
|
-
markdown += '
|
|
144
|
+
markdown += 'node src/cli/hybrid-routing/spawn-workers.js "Task" \\\n';
|
|
145
145
|
markdown += ' --agents=coder,security-specialist \\\n';
|
|
146
146
|
markdown += ' --subtasks="Subtask 1|Subtask 2"\n';
|
|
147
147
|
markdown += '```\n\n';
|
|
@@ -149,10 +149,10 @@ markdown += '```\n\n';
|
|
|
149
149
|
// Add notes
|
|
150
150
|
markdown += '---\n\n';
|
|
151
151
|
markdown += '## Notes\n\n';
|
|
152
|
-
markdown += '- **Live Discovery**: Coordinators read from `.claude/agents
|
|
152
|
+
markdown += '- **Live Discovery**: Coordinators read from `.claude/agents/` folder directly\n';
|
|
153
153
|
markdown += '- **This File**: Documentation snapshot for human reference\n';
|
|
154
154
|
markdown += '- **Regenerate**: Run `/list-agents-rebuild` to update this documentation\n';
|
|
155
|
-
markdown += '- **Agent Files**: Add/modify agents in `.claude/agents
|
|
155
|
+
markdown += '- **Agent Files**: Add/modify agents in `.claude/agents/` folder (auto-discovered)\n';
|
|
156
156
|
markdown += '- **Caching**: Agent definitions cached after first load (lazy loading)\n';
|
|
157
157
|
markdown += '- **Missing Keywords**: Some agents without keywords can be used via coordinator override\n\n';
|
|
158
158
|
|
|
@@ -184,7 +184,7 @@ echo ""
|
|
|
184
184
|
echo "📋 Agent list regenerated: src/cli/hybrid-routing/AVAILABLE-AGENTS.md"
|
|
185
185
|
echo ""
|
|
186
186
|
echo "Architecture:"
|
|
187
|
-
echo " • Source: .claude/agents/
|
|
187
|
+
echo " • Source: .claude/agents/ folder (50+ agent .md files)"
|
|
188
188
|
echo " • Coordinators: Load agents dynamically via HybridWorkerSpawner"
|
|
189
189
|
echo " • This file: Documentation snapshot for human reference"
|
|
190
190
|
```
|
|
@@ -199,7 +199,7 @@ echo " • This file: Documentation snapshot for human reference"
|
|
|
199
199
|
📋 Agent list regenerated: src/cli/hybrid-routing/AVAILABLE-AGENTS.md
|
|
200
200
|
|
|
201
201
|
Architecture:
|
|
202
|
-
• Source: .claude/agents/
|
|
202
|
+
• Source: .claude/agents/ folder (50+ agent .md files)
|
|
203
203
|
• Coordinators: Load agents dynamically via HybridWorkerSpawner
|
|
204
204
|
• This file: Documentation snapshot for human reference
|
|
205
205
|
```
|