claude-flow-novice 2.12.0 → 2.13.0
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/README.md +177 -129
- package/claude-assets/commands/cfn/README.md +177 -129
- package/claude-assets/commands/cfn/cfn-loop-cli.md +268 -0
- package/claude-assets/commands/cfn/cfn-loop-document.md +20 -1
- package/claude-assets/commands/cfn/cfn-loop-frontend.md +17 -2
- package/claude-assets/commands/cfn/cfn-loop-task.md +442 -0
- package/claude-assets/commands/cfn/context-curate.md +27 -38
- package/claude-assets/commands/cfn/context-inject.md +14 -25
- package/claude-assets/commands/cfn/context-query.md +40 -45
- package/claude-assets/commands/cfn/context-reflect.md +40 -38
- package/claude-assets/commands/cfn/context-stats.md +13 -38
- package/claude-assets/commands/cfn/launch-web-dashboard.md +0 -295
- package/claude-assets/commands/cfn/list-agents-rebuild.md +18 -18
- package/claude-assets/commands/cfn/write-plan.md +246 -75
- package/dist/cli/config-manager.js +109 -91
- package/package.json +1 -1
- package/claude-assets/commands/cfn/auto-compact.md +0 -80
- package/claude-assets/commands/cfn/cfn-loop-epic.md +0 -478
- package/claude-assets/commands/cfn/cfn-loop-single.md +0 -256
- package/claude-assets/commands/cfn/cfn-loop-sprints.md +0 -396
- package/claude-assets/commands/cfn/cfn-loop.md +0 -518
- package/claude-assets/commands/cfn/claude-md.md +0 -64
- package/claude-assets/commands/cfn/claude-soul.md +0 -22
- package/claude-assets/commands/cfn/cost-savings-off.md +0 -35
- package/claude-assets/commands/cfn/cost-savings-on.md +0 -35
- package/claude-assets/commands/cfn/cost-savings-status.md +0 -34
- package/claude-assets/commands/cfn/custom-routing-activate.md +0 -55
- package/claude-assets/commands/cfn/custom-routing-deactivate.md +0 -46
- package/claude-assets/commands/cfn/dependency-recommendations.md +0 -171
- package/claude-assets/commands/cfn/fullstack.md +0 -179
- package/claude-assets/commands/cfn/github.md +0 -221
- package/claude-assets/commands/cfn/hooks.md +0 -38
- package/claude-assets/commands/cfn/metrics-summary.md +0 -58
- package/claude-assets/commands/cfn/neural.md +0 -39
- package/claude-assets/commands/cfn/parse-epic.md +0 -357
- package/claude-assets/commands/cfn/performance.md +0 -41
- package/claude-assets/commands/cfn/sparc.md +0 -46
- package/claude-assets/commands/cfn/suggest-improvements.md +0 -95
- package/claude-assets/commands/cfn/suggest-templates.md +0 -147
- package/claude-assets/commands/cfn/swarm.md +0 -24
|
@@ -1,157 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CFN Loop Commands - Quick Reference
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Workflows vs Skills vs Playbooks - When to Use What
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Skills (Most Common) - Building Blocks
|
|
6
|
+
**What:** Single-purpose bash scripts in `.claude/skills/`
|
|
7
|
+
**When:** Most tasks - they're the building blocks
|
|
8
|
+
**Example:** `cfn-redis-coordination`, `cfn-agent-spawning`, `cfn-loop-validation`
|
|
6
9
|
|
|
7
|
-
## 📋 Features
|
|
8
|
-
|
|
9
|
-
### ✅ **Simple Slash Command**
|
|
10
10
|
```bash
|
|
11
|
-
|
|
12
|
-
/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/claude-md --no-backup # Skip backup creation
|
|
11
|
+
# Direct skill invocation
|
|
12
|
+
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh enter \
|
|
13
|
+
--task-id "task-123" \
|
|
14
|
+
--agent-id "coder-1"
|
|
16
15
|
```
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
17
|
+
**Use skills when:**
|
|
18
|
+
- Single, focused operation needed
|
|
19
|
+
- Called by agents or coordinators
|
|
20
|
+
- Part of larger workflow
|
|
21
|
+
- Reusable across different tasks
|
|
22
|
+
|
|
23
|
+
### Playbooks (Not Currently Used) - Pre-Configured Sequences
|
|
24
|
+
**What:** JSON files defining skill sequences for common patterns
|
|
25
|
+
**When:** Repeating the same skill sequence often
|
|
26
|
+
**Status:** Not implemented yet, use skills directly
|
|
27
|
+
|
|
28
|
+
### Workflows - Complex Automation
|
|
29
|
+
**What:** Event-driven, multi-step automation with conditions/branching
|
|
30
|
+
**When:** Complex sequences with conditional logic
|
|
31
|
+
**Example:** CI/CD pipelines, feature development workflows
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
name: "feature-development"
|
|
35
|
+
trigger: "branch-created"
|
|
36
|
+
steps:
|
|
37
|
+
- name: "analyze"
|
|
38
|
+
agent: "researcher"
|
|
39
|
+
|
|
40
|
+
- name: "implement"
|
|
41
|
+
agent: "backend-dev"
|
|
42
|
+
depends: ["analyze"]
|
|
43
|
+
parallel: true # Multiple agents in parallel
|
|
44
|
+
|
|
45
|
+
- name: "test"
|
|
46
|
+
agent: "tester"
|
|
47
|
+
depends: ["implement"]
|
|
48
|
+
condition: "if tests_exist" # Conditional execution
|
|
49
|
+
```
|
|
22
50
|
|
|
23
|
-
|
|
51
|
+
**Use workflows when:**
|
|
52
|
+
- Event-driven automation (git hooks, CI/CD)
|
|
53
|
+
- Conditional branching logic needed
|
|
54
|
+
- Multi-agent parallel execution
|
|
55
|
+
- Long-running background processes
|
|
56
|
+
- Integration with external systems
|
|
24
57
|
|
|
25
|
-
|
|
26
|
-
1. User runs `/claude-md`
|
|
27
|
-
2. System detects project type
|
|
28
|
-
3. Generates appropriate CLAUDE.md
|
|
29
|
-
4. Creates backup if file exists
|
|
58
|
+
## Decision Tree
|
|
30
59
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
```
|
|
61
|
+
Need to automate something?
|
|
62
|
+
├─ Single operation?
|
|
63
|
+
│ └─ Use SKILL directly
|
|
64
|
+
├─ Complex logic (conditionals, events, parallel)?
|
|
65
|
+
│ └─ Create WORKFLOW (YAML via /workflow)
|
|
66
|
+
└─ CFN Loop execution?
|
|
67
|
+
├─ Planning first? → /write-plan then /cfn-loop-cli
|
|
68
|
+
├─ Production? → /cfn-loop-cli
|
|
69
|
+
├─ Debugging? → /cfn-loop-task
|
|
70
|
+
└─ Frontend? → /cfn-loop-frontend
|
|
71
|
+
```
|
|
37
72
|
|
|
38
|
-
##
|
|
73
|
+
## Examples
|
|
39
74
|
|
|
40
|
-
###
|
|
41
|
-
|
|
42
|
-
- `register-claude-md.js` - Slash command registration
|
|
43
|
-
- `../npx/claude-md-protection.js` - NPX protection logic
|
|
44
|
-
- `../../scripts/post-install-claude-md.js` - Post-install hook
|
|
75
|
+
### Example 1: Simple Task (Use Skill)
|
|
76
|
+
**Goal:** Enter waiting mode for agent
|
|
45
77
|
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
- **Package.json**: `postinstall` script triggers protection
|
|
78
|
+
```bash
|
|
79
|
+
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh enter \
|
|
80
|
+
--task-id "task-123" --agent-id "coder-1"
|
|
81
|
+
```
|
|
51
82
|
|
|
52
|
-
|
|
83
|
+
### Example 2: CFN Loop Execution
|
|
84
|
+
**Goal:** Implement JWT authentication
|
|
53
85
|
|
|
54
|
-
|
|
86
|
+
**Option 1: Plan First (Recommended for Complex Tasks)**
|
|
55
87
|
```bash
|
|
56
|
-
#
|
|
57
|
-
/
|
|
88
|
+
# Step 1: Generate plan
|
|
89
|
+
/write-plan "Implement JWT authentication" --mode=standard
|
|
90
|
+
# Reviews: planning/PLAN_jwt_authentication.md
|
|
58
91
|
|
|
59
|
-
#
|
|
60
|
-
|
|
61
|
-
# ✅ CLAUDE.md generated successfully
|
|
92
|
+
# Step 2: Execute
|
|
93
|
+
/cfn-loop-cli "Implement JWT authentication" --mode=standard
|
|
62
94
|
```
|
|
63
95
|
|
|
64
|
-
|
|
96
|
+
**Option 2: Direct Execution (Simple Tasks)**
|
|
65
97
|
```bash
|
|
66
|
-
#
|
|
67
|
-
/
|
|
68
|
-
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
# ══════════════════════════════════════════════════
|
|
72
|
-
# # Claude Code Configuration - JavaScript Project
|
|
73
|
-
# ...
|
|
74
|
-
# ══════════════════════════════════════════════════
|
|
75
|
-
# 📊 Total length: 2,847 characters
|
|
98
|
+
# Production execution (cost-optimized)
|
|
99
|
+
/cfn-loop-cli "Implement JWT authentication" --mode=standard
|
|
100
|
+
|
|
101
|
+
# OR debugging (full visibility)
|
|
102
|
+
/cfn-loop-task "Implement JWT authentication" --mode=standard
|
|
76
103
|
```
|
|
77
104
|
|
|
78
|
-
###
|
|
105
|
+
### Example 3: Complex Automation (Use Workflow)
|
|
106
|
+
**Goal:** Full feature development (analyze → implement → test → deploy)
|
|
107
|
+
|
|
79
108
|
```bash
|
|
80
|
-
#
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# Output:
|
|
84
|
-
# 🛡️ NPX Protection Activated
|
|
85
|
-
# 📄 Generated: claude-copy-to-main.md
|
|
86
|
-
# 💡 Your existing CLAUDE.md is protected from overwrite
|
|
87
|
-
# 🔄 Review and merge changes manually as needed
|
|
88
|
-
```
|
|
109
|
+
# Create workflow (via /workflow)
|
|
110
|
+
/workflow create feature-pipeline
|
|
89
111
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
### **Project Type Detection:**
|
|
93
|
-
- Analyzes `package.json`, file patterns, and directory structure
|
|
94
|
-
- Detects frameworks (React, Express, Django, etc.)
|
|
95
|
-
- Suggests appropriate CLAUDE.md configurations
|
|
96
|
-
|
|
97
|
-
### **Confidence Levels:**
|
|
98
|
-
- **High (>70%)**: Automatic generation recommended
|
|
99
|
-
- **Medium (30-70%)**: Generate with user confirmation
|
|
100
|
-
- **Low (<30%)**: Manual review suggested
|
|
101
|
-
|
|
102
|
-
## 🔧 Configuration
|
|
103
|
-
|
|
104
|
-
### **Generation Preferences:**
|
|
105
|
-
`.claude-flow-novice/preferences/generation.json`:
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"autoGenerate": true,
|
|
109
|
-
"includeFrameworkSpecific": true,
|
|
110
|
-
"includeBestPractices": true,
|
|
111
|
-
"backupExisting": true,
|
|
112
|
-
"confidenceThreshold": 0.3
|
|
113
|
-
}
|
|
112
|
+
# Execute workflow
|
|
113
|
+
/workflow execute feature-pipeline
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
|
|
116
|
+
## Quick Reference Table
|
|
117
|
+
|
|
118
|
+
| Type | Files | Complexity | Conditional Logic | Parallel Execution | Event-Driven |
|
|
119
|
+
|------|-------|------------|-------------------|-------------------|--------------|
|
|
120
|
+
| **Skill** | `.sh` scripts | Low | No | No | No |
|
|
121
|
+
| **CFN Loop** | Slash commands | Medium | Yes (built-in) | Yes (agents) | No |
|
|
122
|
+
| **Workflow** | `.yaml` definitions | High | Yes | Yes | Yes |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## CFN Loop Commands (Current)
|
|
127
|
+
|
|
128
|
+
### Execution Commands
|
|
129
|
+
- `/cfn-loop-task` - Task mode (debugging, full visibility, Main Chat coordinates)
|
|
130
|
+
- `/cfn-loop-cli` - CLI mode (production, cost-optimized, coordinator spawns CLI agents)
|
|
131
|
+
- `/cfn-loop-frontend` - Visual iteration (screenshot + video validation, supports both modes)
|
|
132
|
+
|
|
133
|
+
### Planning & Documentation
|
|
134
|
+
- `/write-plan` - Pre-planning phase (generates TDD implementation plan)
|
|
135
|
+
- `/cfn-loop-document` - Documentation generation (updates `/readme`)
|
|
136
|
+
|
|
137
|
+
### Configuration
|
|
138
|
+
- `/cfn-mode` - Toggle CLI vs Task spawning mode
|
|
139
|
+
- `/cfn-optimize-agents` - Agent optimization settings
|
|
140
|
+
- `/cfn-claude-sync` - Sync rules from CLAUDE.md to commands
|
|
141
|
+
|
|
142
|
+
### Infrastructure
|
|
143
|
+
- `/switch-api` - Switch between Z.ai and Anthropic providers
|
|
144
|
+
|
|
145
|
+
### Automation
|
|
146
|
+
- `/workflow` - Event-driven workflow automation (complex multi-step)
|
|
147
|
+
|
|
148
|
+
### Testing & Utilities
|
|
149
|
+
- `/hello-world-tests` - CFN coordination validation tests (4 layers)
|
|
150
|
+
- `/github-commit` - Git commit with CI/CD monitoring
|
|
151
|
+
- `/launch-web-dashboard` - Start web portal (http://localhost:3000)
|
|
152
|
+
- `/list-agents-rebuild` - Regenerate agent list from discovery
|
|
153
|
+
|
|
154
|
+
### Adaptive Context (ACE System)
|
|
155
|
+
- `/context-stats` - View adaptive context statistics
|
|
156
|
+
- `/context-reflect` - Extract lessons from task execution
|
|
157
|
+
- `/context-query` - Query context bullets by category/tags
|
|
158
|
+
- `/context-inject` - Inject context into CLAUDE.md dynamically
|
|
159
|
+
- `/context-curate` - Merge reflection deltas with deduplication
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## When to Use Each Command
|
|
164
|
+
|
|
165
|
+
### /write-plan (Pre-Planning)
|
|
166
|
+
**Use before complex CFN Loop tasks:**
|
|
167
|
+
- Security-critical features
|
|
168
|
+
- Complex architecture decisions
|
|
169
|
+
- Team collaboration (plan review)
|
|
170
|
+
- Learning CFN Loop workflow
|
|
171
|
+
|
|
172
|
+
### /cfn-loop-cli (Production)
|
|
173
|
+
**Use for:**
|
|
174
|
+
- Production features
|
|
175
|
+
- Long-running tasks (>10 min)
|
|
176
|
+
- Multi-iteration workflows
|
|
177
|
+
- Cost-sensitive projects
|
|
178
|
+
- **Cost:** $0.054/iteration with Z.ai routing
|
|
179
|
+
|
|
180
|
+
### /cfn-loop-task (Debugging)
|
|
181
|
+
**Use for:**
|
|
182
|
+
- Debugging CFN Loop issues
|
|
183
|
+
- Learning agent interactions
|
|
184
|
+
- Prototyping configurations
|
|
185
|
+
- Short tasks (<5 min)
|
|
186
|
+
- **Cost:** $0.150/iteration (3x CLI, but full visibility)
|
|
187
|
+
|
|
188
|
+
### /cfn-loop-frontend (Visual Iteration)
|
|
189
|
+
**Use for:**
|
|
190
|
+
- React/Vue/Angular components
|
|
191
|
+
- UI implementation with mockups
|
|
192
|
+
- Accessibility validation
|
|
193
|
+
- Visual regression testing
|
|
194
|
+
- **Supports:** Both CLI and Task modes
|
|
195
|
+
|
|
196
|
+
### /workflow (Complex Automation)
|
|
197
|
+
**Use for:**
|
|
198
|
+
- CI/CD pipelines
|
|
199
|
+
- Event-driven automation
|
|
200
|
+
- Multi-step with conditionals
|
|
201
|
+
- External system integration
|
|
154
202
|
|
|
155
203
|
---
|
|
156
204
|
|
|
157
|
-
**
|
|
205
|
+
**Version:** 3.0.0 (2025-10-31) - Consolidated command structure with workflows/skills guide
|
|
@@ -1,157 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CFN Loop Commands - Quick Reference
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Workflows vs Skills vs Playbooks - When to Use What
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Skills (Most Common) - Building Blocks
|
|
6
|
+
**What:** Single-purpose bash scripts in `.claude/skills/`
|
|
7
|
+
**When:** Most tasks - they're the building blocks
|
|
8
|
+
**Example:** `cfn-redis-coordination`, `cfn-agent-spawning`, `cfn-loop-validation`
|
|
6
9
|
|
|
7
|
-
## 📋 Features
|
|
8
|
-
|
|
9
|
-
### ✅ **Simple Slash Command**
|
|
10
10
|
```bash
|
|
11
|
-
|
|
12
|
-
/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/claude-md --no-backup # Skip backup creation
|
|
11
|
+
# Direct skill invocation
|
|
12
|
+
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh enter \
|
|
13
|
+
--task-id "task-123" \
|
|
14
|
+
--agent-id "coder-1"
|
|
16
15
|
```
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
17
|
+
**Use skills when:**
|
|
18
|
+
- Single, focused operation needed
|
|
19
|
+
- Called by agents or coordinators
|
|
20
|
+
- Part of larger workflow
|
|
21
|
+
- Reusable across different tasks
|
|
22
|
+
|
|
23
|
+
### Playbooks (Not Currently Used) - Pre-Configured Sequences
|
|
24
|
+
**What:** JSON files defining skill sequences for common patterns
|
|
25
|
+
**When:** Repeating the same skill sequence often
|
|
26
|
+
**Status:** Not implemented yet, use skills directly
|
|
27
|
+
|
|
28
|
+
### Workflows - Complex Automation
|
|
29
|
+
**What:** Event-driven, multi-step automation with conditions/branching
|
|
30
|
+
**When:** Complex sequences with conditional logic
|
|
31
|
+
**Example:** CI/CD pipelines, feature development workflows
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
name: "feature-development"
|
|
35
|
+
trigger: "branch-created"
|
|
36
|
+
steps:
|
|
37
|
+
- name: "analyze"
|
|
38
|
+
agent: "researcher"
|
|
39
|
+
|
|
40
|
+
- name: "implement"
|
|
41
|
+
agent: "backend-dev"
|
|
42
|
+
depends: ["analyze"]
|
|
43
|
+
parallel: true # Multiple agents in parallel
|
|
44
|
+
|
|
45
|
+
- name: "test"
|
|
46
|
+
agent: "tester"
|
|
47
|
+
depends: ["implement"]
|
|
48
|
+
condition: "if tests_exist" # Conditional execution
|
|
49
|
+
```
|
|
22
50
|
|
|
23
|
-
|
|
51
|
+
**Use workflows when:**
|
|
52
|
+
- Event-driven automation (git hooks, CI/CD)
|
|
53
|
+
- Conditional branching logic needed
|
|
54
|
+
- Multi-agent parallel execution
|
|
55
|
+
- Long-running background processes
|
|
56
|
+
- Integration with external systems
|
|
24
57
|
|
|
25
|
-
|
|
26
|
-
1. User runs `/claude-md`
|
|
27
|
-
2. System detects project type
|
|
28
|
-
3. Generates appropriate CLAUDE.md
|
|
29
|
-
4. Creates backup if file exists
|
|
58
|
+
## Decision Tree
|
|
30
59
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
60
|
+
```
|
|
61
|
+
Need to automate something?
|
|
62
|
+
├─ Single operation?
|
|
63
|
+
│ └─ Use SKILL directly
|
|
64
|
+
├─ Complex logic (conditionals, events, parallel)?
|
|
65
|
+
│ └─ Create WORKFLOW (YAML via /workflow)
|
|
66
|
+
└─ CFN Loop execution?
|
|
67
|
+
├─ Planning first? → /write-plan then /cfn-loop-cli
|
|
68
|
+
├─ Production? → /cfn-loop-cli
|
|
69
|
+
├─ Debugging? → /cfn-loop-task
|
|
70
|
+
└─ Frontend? → /cfn-loop-frontend
|
|
71
|
+
```
|
|
37
72
|
|
|
38
|
-
##
|
|
73
|
+
## Examples
|
|
39
74
|
|
|
40
|
-
###
|
|
41
|
-
|
|
42
|
-
- `register-claude-md.js` - Slash command registration
|
|
43
|
-
- `../npx/claude-md-protection.js` - NPX protection logic
|
|
44
|
-
- `../../scripts/post-install-claude-md.js` - Post-install hook
|
|
75
|
+
### Example 1: Simple Task (Use Skill)
|
|
76
|
+
**Goal:** Enter waiting mode for agent
|
|
45
77
|
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
- **Package.json**: `postinstall` script triggers protection
|
|
78
|
+
```bash
|
|
79
|
+
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh enter \
|
|
80
|
+
--task-id "task-123" --agent-id "coder-1"
|
|
81
|
+
```
|
|
51
82
|
|
|
52
|
-
|
|
83
|
+
### Example 2: CFN Loop Execution
|
|
84
|
+
**Goal:** Implement JWT authentication
|
|
53
85
|
|
|
54
|
-
|
|
86
|
+
**Option 1: Plan First (Recommended for Complex Tasks)**
|
|
55
87
|
```bash
|
|
56
|
-
#
|
|
57
|
-
/
|
|
88
|
+
# Step 1: Generate plan
|
|
89
|
+
/write-plan "Implement JWT authentication" --mode=standard
|
|
90
|
+
# Reviews: planning/PLAN_jwt_authentication.md
|
|
58
91
|
|
|
59
|
-
#
|
|
60
|
-
|
|
61
|
-
# ✅ CLAUDE.md generated successfully
|
|
92
|
+
# Step 2: Execute
|
|
93
|
+
/cfn-loop-cli "Implement JWT authentication" --mode=standard
|
|
62
94
|
```
|
|
63
95
|
|
|
64
|
-
|
|
96
|
+
**Option 2: Direct Execution (Simple Tasks)**
|
|
65
97
|
```bash
|
|
66
|
-
#
|
|
67
|
-
/
|
|
68
|
-
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
# ══════════════════════════════════════════════════
|
|
72
|
-
# # Claude Code Configuration - JavaScript Project
|
|
73
|
-
# ...
|
|
74
|
-
# ══════════════════════════════════════════════════
|
|
75
|
-
# 📊 Total length: 2,847 characters
|
|
98
|
+
# Production execution (cost-optimized)
|
|
99
|
+
/cfn-loop-cli "Implement JWT authentication" --mode=standard
|
|
100
|
+
|
|
101
|
+
# OR debugging (full visibility)
|
|
102
|
+
/cfn-loop-task "Implement JWT authentication" --mode=standard
|
|
76
103
|
```
|
|
77
104
|
|
|
78
|
-
###
|
|
105
|
+
### Example 3: Complex Automation (Use Workflow)
|
|
106
|
+
**Goal:** Full feature development (analyze → implement → test → deploy)
|
|
107
|
+
|
|
79
108
|
```bash
|
|
80
|
-
#
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# Output:
|
|
84
|
-
# 🛡️ NPX Protection Activated
|
|
85
|
-
# 📄 Generated: claude-copy-to-main.md
|
|
86
|
-
# 💡 Your existing CLAUDE.md is protected from overwrite
|
|
87
|
-
# 🔄 Review and merge changes manually as needed
|
|
88
|
-
```
|
|
109
|
+
# Create workflow (via /workflow)
|
|
110
|
+
/workflow create feature-pipeline
|
|
89
111
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
### **Project Type Detection:**
|
|
93
|
-
- Analyzes `package.json`, file patterns, and directory structure
|
|
94
|
-
- Detects frameworks (React, Express, Django, etc.)
|
|
95
|
-
- Suggests appropriate CLAUDE.md configurations
|
|
96
|
-
|
|
97
|
-
### **Confidence Levels:**
|
|
98
|
-
- **High (>70%)**: Automatic generation recommended
|
|
99
|
-
- **Medium (30-70%)**: Generate with user confirmation
|
|
100
|
-
- **Low (<30%)**: Manual review suggested
|
|
101
|
-
|
|
102
|
-
## 🔧 Configuration
|
|
103
|
-
|
|
104
|
-
### **Generation Preferences:**
|
|
105
|
-
`.claude-flow-novice/preferences/generation.json`:
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"autoGenerate": true,
|
|
109
|
-
"includeFrameworkSpecific": true,
|
|
110
|
-
"includeBestPractices": true,
|
|
111
|
-
"backupExisting": true,
|
|
112
|
-
"confidenceThreshold": 0.3
|
|
113
|
-
}
|
|
112
|
+
# Execute workflow
|
|
113
|
+
/workflow execute feature-pipeline
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
|
|
116
|
+
## Quick Reference Table
|
|
117
|
+
|
|
118
|
+
| Type | Files | Complexity | Conditional Logic | Parallel Execution | Event-Driven |
|
|
119
|
+
|------|-------|------------|-------------------|-------------------|--------------|
|
|
120
|
+
| **Skill** | `.sh` scripts | Low | No | No | No |
|
|
121
|
+
| **CFN Loop** | Slash commands | Medium | Yes (built-in) | Yes (agents) | No |
|
|
122
|
+
| **Workflow** | `.yaml` definitions | High | Yes | Yes | Yes |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## CFN Loop Commands (Current)
|
|
127
|
+
|
|
128
|
+
### Execution Commands
|
|
129
|
+
- `/cfn-loop-task` - Task mode (debugging, full visibility, Main Chat coordinates)
|
|
130
|
+
- `/cfn-loop-cli` - CLI mode (production, cost-optimized, coordinator spawns CLI agents)
|
|
131
|
+
- `/cfn-loop-frontend` - Visual iteration (screenshot + video validation, supports both modes)
|
|
132
|
+
|
|
133
|
+
### Planning & Documentation
|
|
134
|
+
- `/write-plan` - Pre-planning phase (generates TDD implementation plan)
|
|
135
|
+
- `/cfn-loop-document` - Documentation generation (updates `/readme`)
|
|
136
|
+
|
|
137
|
+
### Configuration
|
|
138
|
+
- `/cfn-mode` - Toggle CLI vs Task spawning mode
|
|
139
|
+
- `/cfn-optimize-agents` - Agent optimization settings
|
|
140
|
+
- `/cfn-claude-sync` - Sync rules from CLAUDE.md to commands
|
|
141
|
+
|
|
142
|
+
### Infrastructure
|
|
143
|
+
- `/switch-api` - Switch between Z.ai and Anthropic providers
|
|
144
|
+
|
|
145
|
+
### Automation
|
|
146
|
+
- `/workflow` - Event-driven workflow automation (complex multi-step)
|
|
147
|
+
|
|
148
|
+
### Testing & Utilities
|
|
149
|
+
- `/hello-world-tests` - CFN coordination validation tests (4 layers)
|
|
150
|
+
- `/github-commit` - Git commit with CI/CD monitoring
|
|
151
|
+
- `/launch-web-dashboard` - Start web portal (http://localhost:3000)
|
|
152
|
+
- `/list-agents-rebuild` - Regenerate agent list from discovery
|
|
153
|
+
|
|
154
|
+
### Adaptive Context (ACE System)
|
|
155
|
+
- `/context-stats` - View adaptive context statistics
|
|
156
|
+
- `/context-reflect` - Extract lessons from task execution
|
|
157
|
+
- `/context-query` - Query context bullets by category/tags
|
|
158
|
+
- `/context-inject` - Inject context into CLAUDE.md dynamically
|
|
159
|
+
- `/context-curate` - Merge reflection deltas with deduplication
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## When to Use Each Command
|
|
164
|
+
|
|
165
|
+
### /write-plan (Pre-Planning)
|
|
166
|
+
**Use before complex CFN Loop tasks:**
|
|
167
|
+
- Security-critical features
|
|
168
|
+
- Complex architecture decisions
|
|
169
|
+
- Team collaboration (plan review)
|
|
170
|
+
- Learning CFN Loop workflow
|
|
171
|
+
|
|
172
|
+
### /cfn-loop-cli (Production)
|
|
173
|
+
**Use for:**
|
|
174
|
+
- Production features
|
|
175
|
+
- Long-running tasks (>10 min)
|
|
176
|
+
- Multi-iteration workflows
|
|
177
|
+
- Cost-sensitive projects
|
|
178
|
+
- **Cost:** $0.054/iteration with Z.ai routing
|
|
179
|
+
|
|
180
|
+
### /cfn-loop-task (Debugging)
|
|
181
|
+
**Use for:**
|
|
182
|
+
- Debugging CFN Loop issues
|
|
183
|
+
- Learning agent interactions
|
|
184
|
+
- Prototyping configurations
|
|
185
|
+
- Short tasks (<5 min)
|
|
186
|
+
- **Cost:** $0.150/iteration (3x CLI, but full visibility)
|
|
187
|
+
|
|
188
|
+
### /cfn-loop-frontend (Visual Iteration)
|
|
189
|
+
**Use for:**
|
|
190
|
+
- React/Vue/Angular components
|
|
191
|
+
- UI implementation with mockups
|
|
192
|
+
- Accessibility validation
|
|
193
|
+
- Visual regression testing
|
|
194
|
+
- **Supports:** Both CLI and Task modes
|
|
195
|
+
|
|
196
|
+
### /workflow (Complex Automation)
|
|
197
|
+
**Use for:**
|
|
198
|
+
- CI/CD pipelines
|
|
199
|
+
- Event-driven automation
|
|
200
|
+
- Multi-step with conditionals
|
|
201
|
+
- External system integration
|
|
154
202
|
|
|
155
203
|
---
|
|
156
204
|
|
|
157
|
-
**
|
|
205
|
+
**Version:** 3.0.0 (2025-10-31) - Consolidated command structure with workflows/skills guide
|