claude-flow-novice 2.14.0 → 2.14.2
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/CFN_LOOP_TASK_MODE.md → CFN_LOOP_TASK_MODE.md} +50 -3
- 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/CFN_LOOP_TASK_MODE.md → CFN_LOOP_TASK_MODE.md} +50 -3
- package/claude-assets/commands/auto-compact.md +80 -0
- package/claude-assets/commands/cfn-loop-cli.md +279 -0
- package/{.claude/commands/cfn → claude-assets/commands}/cfn-loop-document.md +20 -1
- package/claude-assets/commands/cfn-loop-epic.md +478 -0
- package/{.claude/commands/cfn → claude-assets/commands}/cfn-loop-frontend.md +17 -2
- package/claude-assets/commands/cfn-loop-single.md +256 -0
- package/claude-assets/commands/cfn-loop-sprints.md +396 -0
- package/claude-assets/commands/cfn-loop-task.md +460 -0
- package/claude-assets/commands/cfn-loop.md +518 -0
- package/claude-assets/commands/claude-md.md +64 -0
- package/claude-assets/commands/claude-soul.md +22 -0
- package/{.claude/commands/cfn → claude-assets/commands}/context-curate.md +27 -38
- package/{.claude/commands/cfn → claude-assets/commands}/context-inject.md +14 -25
- package/{.claude/commands/cfn → claude-assets/commands}/context-query.md +40 -45
- package/{.claude/commands/cfn → claude-assets/commands}/context-reflect.md +40 -38
- package/{.claude/commands/cfn → claude-assets/commands}/context-stats.md +13 -38
- package/claude-assets/commands/cost-savings-off.md +35 -0
- package/claude-assets/commands/cost-savings-on.md +35 -0
- package/claude-assets/commands/cost-savings-status.md +34 -0
- package/claude-assets/commands/custom-routing-activate.md +55 -0
- package/claude-assets/commands/custom-routing-deactivate.md +46 -0
- package/claude-assets/commands/dependency-recommendations.md +171 -0
- package/claude-assets/commands/fullstack.md +179 -0
- package/claude-assets/commands/github.md +221 -0
- package/claude-assets/commands/hooks.md +38 -0
- package/claude-assets/commands/launch-web-dashboard.md +0 -0
- package/{.claude/commands/cfn → claude-assets/commands}/list-agents-rebuild.md +18 -18
- package/claude-assets/commands/metrics-summary.md +58 -0
- package/claude-assets/commands/neural.md +39 -0
- package/claude-assets/commands/parse-epic.md +357 -0
- package/claude-assets/commands/performance.md +41 -0
- package/claude-assets/commands/sparc.md +46 -0
- package/claude-assets/commands/suggest-improvements.md +95 -0
- package/claude-assets/commands/suggest-templates.md +147 -0
- package/claude-assets/commands/swarm.md +24 -0
- package/claude-assets/commands/write-plan.md +275 -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/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +3 -3
- package/.claude/commands/cfn/README.md +0 -157
- package/.claude/commands/cfn/launch-web-dashboard.md +0 -295
- package/.claude/commands/cfn/write-plan.md +0 -104
- 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
- /package/.claude/commands/{cfn/CFN_COORDINATOR_PARAMETERS.md → CFN_COORDINATOR_PARAMETERS.md} +0 -0
- /package/.claude/commands/{cfn/CFN_LOOP_FRONTEND.md → CFN_LOOP_FRONTEND.md} +0 -0
- /package/.claude/commands/{cfn/auto-compact.md → auto-compact.md} +0 -0
- /package/.claude/commands/{cfn/cfn-claude-sync.md → cfn-claude-sync.md} +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/cfn-loop-cli.md +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/cfn-loop-document.md +0 -0
- /package/.claude/commands/{cfn/cfn-loop-epic.md → cfn-loop-epic.md} +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/cfn-loop-frontend.md +0 -0
- /package/.claude/commands/{cfn/cfn-loop-single.md → cfn-loop-single.md} +0 -0
- /package/.claude/commands/{cfn/cfn-loop-sprints.md → cfn-loop-sprints.md} +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/cfn-loop-task.md +0 -0
- /package/.claude/commands/{cfn/cfn-loop.md → cfn-loop.md} +0 -0
- /package/.claude/commands/{cfn/cfn-mode.md → cfn-mode.md} +0 -0
- /package/.claude/commands/{cfn/cfn-optimize-agents.md → cfn-optimize-agents.md} +0 -0
- /package/.claude/commands/{cfn/claude-md.md → claude-md.md} +0 -0
- /package/.claude/commands/{cfn/claude-soul.md → claude-soul.md} +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/context-curate.md +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/context-inject.md +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/context-query.md +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/context-reflect.md +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/context-stats.md +0 -0
- /package/.claude/commands/{cfn/cost-savings-off.md → cost-savings-off.md} +0 -0
- /package/.claude/commands/{cfn/cost-savings-on.md → cost-savings-on.md} +0 -0
- /package/.claude/commands/{cfn/cost-savings-status.md → cost-savings-status.md} +0 -0
- /package/.claude/commands/{cfn/custom-routing-activate.md → custom-routing-activate.md} +0 -0
- /package/.claude/commands/{cfn/custom-routing-deactivate.md → custom-routing-deactivate.md} +0 -0
- /package/.claude/commands/{cfn/dependency-recommendations.md → dependency-recommendations.md} +0 -0
- /package/.claude/commands/{cfn/fullstack.md → fullstack.md} +0 -0
- /package/.claude/commands/{cfn/github-commit.md → github-commit.md} +0 -0
- /package/.claude/commands/{cfn/github.md → github.md} +0 -0
- /package/.claude/commands/{cfn/hello-world-tests.md → hello-world-tests.md} +0 -0
- /package/.claude/commands/{cfn/hooks.md → hooks.md} +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/launch-web-dashboard.md +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/list-agents-rebuild.md +0 -0
- /package/.claude/commands/{cfn/metrics-summary.md → metrics-summary.md} +0 -0
- /package/.claude/commands/{cfn/neural.md → neural.md} +0 -0
- /package/.claude/commands/{cfn/parse-epic.md → parse-epic.md} +0 -0
- /package/.claude/commands/{cfn/performance.md → performance.md} +0 -0
- /package/.claude/commands/{cfn/sparc.md → sparc.md} +0 -0
- /package/.claude/commands/{cfn/suggest-improvements.md → suggest-improvements.md} +0 -0
- /package/.claude/commands/{cfn/suggest-templates.md → suggest-templates.md} +0 -0
- /package/.claude/commands/{cfn/swarm.md → swarm.md} +0 -0
- /package/.claude/commands/{cfn/switch-api.md → switch-api.md} +0 -0
- /package/.claude/commands/{cfn/workflow.md → workflow.md} +0 -0
- /package/{claude-assets/commands/cfn → .claude/commands}/write-plan.md +0 -0
- /package/claude-assets/commands/{cfn/CFN_COORDINATOR_PARAMETERS.md → CFN_COORDINATOR_PARAMETERS.md} +0 -0
- /package/claude-assets/commands/{cfn/CFN_LOOP_FRONTEND.md → CFN_LOOP_FRONTEND.md} +0 -0
- /package/claude-assets/commands/{cfn/README.md → README.md} +0 -0
- /package/claude-assets/commands/{cfn/cfn-claude-sync.md → cfn-claude-sync.md} +0 -0
- /package/claude-assets/commands/{cfn/cfn-mode.md → cfn-mode.md} +0 -0
- /package/claude-assets/commands/{cfn/cfn-optimize-agents.md → cfn-optimize-agents.md} +0 -0
- /package/claude-assets/commands/{cfn/github-commit.md → github-commit.md} +0 -0
- /package/claude-assets/commands/{cfn/hello-world-tests.md → hello-world-tests.md} +0 -0
- /package/claude-assets/commands/{cfn/switch-api.md → switch-api.md} +0 -0
- /package/claude-assets/commands/{cfn/workflow.md → workflow.md} +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "AI-powered project analysis with prioritized improvement recommendations"
|
|
3
|
+
argument-hint: "[--focus=<area>|--quick|--detailed|--security]"
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Glob", "Grep", "mcp__claude-flow__language_detect", "mcp__claude-flow__framework_detect", "mcp__claude-flow__dependency_analyze", "mcp__claude-flow__rust_quality_analyze", "mcp__claude-flow__typescript_validate", "mcp__claude-flow__memory_usage", "mcp__claude-flow__agent_spawn"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI Project Analysis & Improvement Suggestions
|
|
8
|
+
|
|
9
|
+
Provide intelligent, prioritized recommendations for improving your codebase based on AI analysis.
|
|
10
|
+
|
|
11
|
+
**Focus Area**: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
## Analysis Options
|
|
14
|
+
|
|
15
|
+
- `--focus=security` - Focus on security vulnerabilities and best practices
|
|
16
|
+
- `--focus=performance` - Analyze performance bottlenecks and optimizations
|
|
17
|
+
- `--focus=maintainability` - Code quality, readability, and maintainability
|
|
18
|
+
- `--focus=testing` - Test coverage, quality, and missing test scenarios
|
|
19
|
+
- `--quick` - Fast analysis with top 3-5 recommendations
|
|
20
|
+
- `--detailed` - Comprehensive analysis with implementation guides
|
|
21
|
+
- `--security` - Security-focused analysis with CVE scanning
|
|
22
|
+
|
|
23
|
+
## What This Command Does
|
|
24
|
+
|
|
25
|
+
### 🔍 Intelligent Codebase Analysis
|
|
26
|
+
- **Framework-Aware**: Leverages 98.5% accurate framework detection
|
|
27
|
+
- **Language-Specific**: Tailored recommendations for detected languages
|
|
28
|
+
- **Context-Aware**: Understands project structure and patterns
|
|
29
|
+
- **Risk Assessment**: Prioritizes improvements by impact and effort
|
|
30
|
+
|
|
31
|
+
### 🎦 Analysis Categories
|
|
32
|
+
|
|
33
|
+
#### Security Analysis
|
|
34
|
+
- Dependency vulnerability scanning
|
|
35
|
+
- Code security pattern detection
|
|
36
|
+
- Authentication/authorization review
|
|
37
|
+
- Input validation and sanitization
|
|
38
|
+
|
|
39
|
+
#### Performance Analysis
|
|
40
|
+
- Bundle size optimization opportunities
|
|
41
|
+
- Database query optimization
|
|
42
|
+
- Caching strategy improvements
|
|
43
|
+
- Resource usage patterns
|
|
44
|
+
|
|
45
|
+
#### Code Quality Analysis
|
|
46
|
+
- Design pattern recommendations
|
|
47
|
+
- Refactoring opportunities
|
|
48
|
+
- Documentation gaps
|
|
49
|
+
- Type safety improvements
|
|
50
|
+
|
|
51
|
+
#### Testing Analysis
|
|
52
|
+
- Coverage gap identification
|
|
53
|
+
- Missing test scenarios
|
|
54
|
+
- Test quality assessment
|
|
55
|
+
- E2E testing opportunities
|
|
56
|
+
|
|
57
|
+
## Sample Output
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
## 🚨 High Priority (Security)
|
|
61
|
+
1. **Update lodash dependency** - CVE-2021-23337 (Risk: High)
|
|
62
|
+
Command: `npm update lodash@^4.17.21`
|
|
63
|
+
|
|
64
|
+
2. **Add input validation** - Missing sanitization in user routes
|
|
65
|
+
Files: `src/routes/user.js`
|
|
66
|
+
|
|
67
|
+
## 🚀 Medium Priority (Performance)
|
|
68
|
+
1. **Implement code splitting** - Bundle size: 2.3MB
|
|
69
|
+
Framework: React with dynamic imports
|
|
70
|
+
|
|
71
|
+
2. **Add Redis caching** - Database queries: 150ms avg
|
|
72
|
+
Impact: 60% performance improvement
|
|
73
|
+
|
|
74
|
+
## 🛠️ Low Priority (Maintenance)
|
|
75
|
+
1. **Add TypeScript** - 89% of codebase would benefit
|
|
76
|
+
2. **Update documentation** - API docs outdated
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Educational Focus
|
|
80
|
+
|
|
81
|
+
Every recommendation includes:
|
|
82
|
+
- **Why**: Explanation of the problem/opportunity
|
|
83
|
+
- **Impact**: Expected improvement metrics
|
|
84
|
+
- **How**: Specific implementation steps
|
|
85
|
+
- **Resources**: Links to best practices and tutorials
|
|
86
|
+
|
|
87
|
+
## Framework-Specific Recommendations
|
|
88
|
+
|
|
89
|
+
- **Rust**: Clippy suggestions, unsafe code review, performance optimization
|
|
90
|
+
- **JavaScript/Node.js**: NPM audit, bundle analysis, async/await patterns
|
|
91
|
+
- **TypeScript**: Type coverage, strict mode opportunities
|
|
92
|
+
- **Python**: Virtual environment setup, type hints, security scanning
|
|
93
|
+
- **React**: Component optimization, state management, accessibility
|
|
94
|
+
|
|
95
|
+
Get actionable, prioritized recommendations to improve your project's security, performance, and maintainability.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Contextual code templates based on detected project patterns and frameworks"
|
|
3
|
+
argument-hint: "[<component-type>|--list|--search=<pattern>|--category=<type>]"
|
|
4
|
+
allowed-tools: ["Read", "Write", "Bash", "Glob", "Grep", "mcp__claude-flow__language_detect", "mcp__claude-flow__framework_detect", "mcp__claude-flow__memory_usage", "mcp__shadcn_mcp__generate_component"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Contextual Code Templates
|
|
8
|
+
|
|
9
|
+
Generate relevant code templates based on your project's detected frameworks, patterns, and current context.
|
|
10
|
+
|
|
11
|
+
**Template Type**: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
## Template Options
|
|
14
|
+
|
|
15
|
+
- `--list` - Show all available templates for detected framework
|
|
16
|
+
- `--search=<pattern>` - Search templates by keyword or pattern
|
|
17
|
+
- `--category=<type>` - Filter by category (component, service, test, config)
|
|
18
|
+
- `<component-type>` - Generate specific component (e.g., "api-route", "react-component")
|
|
19
|
+
|
|
20
|
+
## What This Command Does
|
|
21
|
+
|
|
22
|
+
### 🎯 Smart Template Selection
|
|
23
|
+
- **Framework Detection**: Automatically detects React, Express, FastAPI, Axum, etc.
|
|
24
|
+
- **Pattern Recognition**: Analyzes existing code patterns and conventions
|
|
25
|
+
- **Context-Aware**: Suggests templates relevant to current file/directory
|
|
26
|
+
- **Best Practices**: Templates follow industry standards and conventions
|
|
27
|
+
|
|
28
|
+
### 📋 Template Categories
|
|
29
|
+
|
|
30
|
+
#### Frontend Templates
|
|
31
|
+
- **React Components**: Functional components, hooks, context providers
|
|
32
|
+
- **Vue Components**: Composition API, reactive patterns
|
|
33
|
+
- **Angular Components**: Services, modules, guards
|
|
34
|
+
- **Styling**: CSS modules, styled-components, Tailwind patterns
|
|
35
|
+
|
|
36
|
+
#### Backend Templates
|
|
37
|
+
- **REST APIs**: Express routes, FastAPI endpoints, Axum handlers
|
|
38
|
+
- **Database**: Models, migrations, queries, repositories
|
|
39
|
+
- **Authentication**: JWT middleware, OAuth flows, session management
|
|
40
|
+
- **Testing**: Unit tests, integration tests, mocks
|
|
41
|
+
|
|
42
|
+
#### Configuration Templates
|
|
43
|
+
- **Build Tools**: Webpack, Vite, Rollup configurations
|
|
44
|
+
- **CI/CD**: GitHub Actions, Docker, deployment scripts
|
|
45
|
+
- **Environment**: .env templates, config management
|
|
46
|
+
- **Documentation**: README patterns, API docs, changelogs
|
|
47
|
+
|
|
48
|
+
## Framework-Specific Examples
|
|
49
|
+
|
|
50
|
+
### React Project Detected
|
|
51
|
+
```bash
|
|
52
|
+
# Available templates:
|
|
53
|
+
/suggest-templates --list
|
|
54
|
+
# Output: react-component, react-hook, context-provider, test-component
|
|
55
|
+
|
|
56
|
+
# Generate a React component
|
|
57
|
+
/suggest-templates react-component
|
|
58
|
+
# Creates: functional component with TypeScript, props interface, styling
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Express.js Project Detected
|
|
62
|
+
```bash
|
|
63
|
+
# Generate API route template
|
|
64
|
+
/suggest-templates api-route
|
|
65
|
+
# Creates: Express route with validation, error handling, documentation
|
|
66
|
+
|
|
67
|
+
# Generate middleware template
|
|
68
|
+
/suggest-templates middleware
|
|
69
|
+
# Creates: Express middleware with proper error handling and logging
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Rust Project Detected
|
|
73
|
+
```bash
|
|
74
|
+
# Generate Axum handler
|
|
75
|
+
/suggest-templates axum-handler
|
|
76
|
+
# Creates: Async handler with proper error handling and serialization
|
|
77
|
+
|
|
78
|
+
# Generate test module
|
|
79
|
+
/suggest-templates rust-test
|
|
80
|
+
# Creates: Test module with common test patterns and mocks
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Template Features
|
|
84
|
+
|
|
85
|
+
### 🛠️ Smart Generation
|
|
86
|
+
- **Project Conventions**: Follows your existing naming and structure patterns
|
|
87
|
+
- **Dependency Integration**: Uses libraries already in your project
|
|
88
|
+
- **Type Safety**: Generates TypeScript/Rust types when applicable
|
|
89
|
+
- **Error Handling**: Includes proper error handling patterns
|
|
90
|
+
|
|
91
|
+
### 📚 Educational Comments
|
|
92
|
+
- **Best Practice Explanations**: Comments explain why patterns are used
|
|
93
|
+
- **Common Pitfalls**: Warnings about potential issues
|
|
94
|
+
- **Extension Points**: Suggestions for how to extend the template
|
|
95
|
+
- **Performance Tips**: Optimization recommendations
|
|
96
|
+
|
|
97
|
+
### 🔄 Template Customization
|
|
98
|
+
- **Variable Substitution**: Replaces placeholders with project-specific values
|
|
99
|
+
- **Conditional Sections**: Includes/excludes code based on project setup
|
|
100
|
+
- **Style Matching**: Matches your existing code style (spaces/tabs, naming)
|
|
101
|
+
|
|
102
|
+
## Sample Template Output
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
// React Functional Component Template
|
|
106
|
+
import React, { useState, useEffect } from 'react';
|
|
107
|
+
import styles from './MyComponent.module.css';
|
|
108
|
+
|
|
109
|
+
interface MyComponentProps {
|
|
110
|
+
// TODO: Define your props here
|
|
111
|
+
title?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* MyComponent - Brief description
|
|
116
|
+
*
|
|
117
|
+
* Best Practices:
|
|
118
|
+
* - Use functional components with hooks
|
|
119
|
+
* - Keep components small and focused
|
|
120
|
+
* - Extract custom hooks for complex logic
|
|
121
|
+
*/
|
|
122
|
+
const MyComponent: React.FC<MyComponentProps> = ({ title = 'Default Title' }) => {
|
|
123
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
124
|
+
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
// TODO: Add your effect logic here
|
|
127
|
+
}, []);
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<div className={styles.container}>
|
|
131
|
+
<h2>{title}</h2>
|
|
132
|
+
{/* TODO: Add your component content */}
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export default MyComponent;
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Integration with Tools
|
|
141
|
+
|
|
142
|
+
- **shadcn/ui Integration**: Generate beautiful UI components when shadcn is detected
|
|
143
|
+
- **Testing Framework**: Include appropriate test templates (Jest, Vitest, pytest)
|
|
144
|
+
- **Documentation**: Generate component documentation and usage examples
|
|
145
|
+
- **Storybook**: Include Storybook stories when detected
|
|
146
|
+
|
|
147
|
+
Get contextual, educational code templates that follow your project's patterns and best practices.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "AI swarm management and coordination"
|
|
3
|
+
argument-hint: "<action> [parameters]"
|
|
4
|
+
allowed-tools: ["mcp__claude-flow-novice__swarm_init", "mcp__claude-flow-novice__agent_spawn", "mcp__claude-flow-novice__task_orchestrate"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI Swarm Management
|
|
8
|
+
|
|
9
|
+
Execute AI swarm coordination and management tasks.
|
|
10
|
+
|
|
11
|
+
**Command**: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
**Available Actions**:
|
|
14
|
+
- `init <topology> <count>` - Initialize swarm (mesh, hierarchical, ring, star)
|
|
15
|
+
- `status` - Show swarm status and health
|
|
16
|
+
- `spawn <type>` - Create specialized agent (researcher, coder, analyst, etc.)
|
|
17
|
+
- `orchestrate "<task>"` - Coordinate task across swarm
|
|
18
|
+
- `scale <count>` - Scale swarm to specified agent count
|
|
19
|
+
- `destroy` - Gracefully shutdown swarm
|
|
20
|
+
|
|
21
|
+
**Swarm Coordination**:
|
|
22
|
+
Use the claude-flow-novice MCP tools to coordinate AI agent swarms for complex task execution. The swarm system supports multiple topologies and can auto-scale based on workload.
|
|
23
|
+
|
|
24
|
+
Execute the requested swarm action and provide status updates on coordination progress.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "CFN Loop pre-planning: Generate structured implementation plans with TDD approach"
|
|
3
|
+
argument-hint: "<task description> [--mode=mvp|standard|enterprise]"
|
|
4
|
+
allowed-tools: ["Task", "TodoWrite", "Read", "Write", "Bash"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Write Plan - CFN Loop Pre-Planning
|
|
8
|
+
|
|
9
|
+
Generate structured implementation plan BEFORE executing CFN Loop. Outputs plan document for review.
|
|
10
|
+
|
|
11
|
+
🎯 **Use this BEFORE /cfn-loop-cli or /cfn-loop-task**
|
|
12
|
+
|
|
13
|
+
**Task**: $ARGUMENTS
|
|
14
|
+
|
|
15
|
+
## What This Does
|
|
16
|
+
|
|
17
|
+
**Pre-planning phase for CFN Loop:**
|
|
18
|
+
1. Analyzes task complexity
|
|
19
|
+
2. Selects appropriate agents
|
|
20
|
+
3. Defines test cases and success criteria
|
|
21
|
+
4. Creates implementation roadmap
|
|
22
|
+
5. Outputs plan document for approval
|
|
23
|
+
|
|
24
|
+
**Then run:**
|
|
25
|
+
```bash
|
|
26
|
+
# After reviewing plan
|
|
27
|
+
/cfn-loop-cli "Implement JWT authentication" --mode=standard
|
|
28
|
+
# OR
|
|
29
|
+
/cfn-loop-task "Implement JWT authentication" --mode=standard
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Command Options
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Standard planning
|
|
36
|
+
/write-plan "Implement JWT authentication"
|
|
37
|
+
|
|
38
|
+
# MVP planning (faster, simpler)
|
|
39
|
+
/write-plan "Build prototype feature" --mode=mvp
|
|
40
|
+
|
|
41
|
+
# Enterprise planning (comprehensive)
|
|
42
|
+
/write-plan "Production security system" --mode=enterprise
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Options:**
|
|
46
|
+
- `--mode=<mvp|standard|enterprise>`: Planning depth (default: standard)
|
|
47
|
+
|
|
48
|
+
## Execution Pattern
|
|
49
|
+
|
|
50
|
+
### Step 1: Analyze Task
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
Task("planner", `
|
|
54
|
+
ANALYZE TASK FOR CFN LOOP PLANNING
|
|
55
|
+
|
|
56
|
+
Task: $ARGUMENTS
|
|
57
|
+
Mode: ${mode}
|
|
58
|
+
|
|
59
|
+
ANALYSIS REQUIRED:
|
|
60
|
+
1. Complexity Assessment:
|
|
61
|
+
- Estimated files: 1-2 (simple) | 3-5 (standard) | >5 (complex)
|
|
62
|
+
- Estimated LOC: <200 (simple) | 200-500 (standard) | >500 (complex)
|
|
63
|
+
- Keywords: security, performance, frontend, mobile, etc.
|
|
64
|
+
|
|
65
|
+
2. Agent Selection:
|
|
66
|
+
- Loop 3 (Implementation): Based on task type
|
|
67
|
+
* Backend: backend-dev, researcher, devops
|
|
68
|
+
* Full-stack: backend-dev, react-frontend-engineer, devops
|
|
69
|
+
* Mobile: mobile-dev, backend-dev
|
|
70
|
+
* Security: security-specialist, backend-dev
|
|
71
|
+
- Loop 2 (Validation): Scale by complexity
|
|
72
|
+
* Simple: reviewer, tester
|
|
73
|
+
* Standard: +architect, +security-specialist
|
|
74
|
+
* Complex: +code-analyzer, +performance-benchmarker
|
|
75
|
+
|
|
76
|
+
3. Test Cases (TDD Approach):
|
|
77
|
+
- Red Phase: Failure scenarios
|
|
78
|
+
- Green Phase: Minimal passing implementation
|
|
79
|
+
- Refactor Phase: Quality improvements
|
|
80
|
+
|
|
81
|
+
4. Success Criteria:
|
|
82
|
+
- Test coverage target (≥80%)
|
|
83
|
+
- Performance benchmarks (if applicable)
|
|
84
|
+
- Security requirements (if applicable)
|
|
85
|
+
- Deliverables list
|
|
86
|
+
|
|
87
|
+
OUTPUT: planning/PLAN_${sanitize($ARGUMENTS)}.md
|
|
88
|
+
`)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 2: Generate Plan Document
|
|
92
|
+
|
|
93
|
+
**Plan Structure:**
|
|
94
|
+
```markdown
|
|
95
|
+
# Implementation Plan: [Task Name]
|
|
96
|
+
|
|
97
|
+
## Task Analysis
|
|
98
|
+
- **Complexity**: Simple | Standard | Complex
|
|
99
|
+
- **Estimated Files**: N
|
|
100
|
+
- **Estimated LOC**: N
|
|
101
|
+
- **Mode**: ${mode}
|
|
102
|
+
|
|
103
|
+
## Agent Configuration
|
|
104
|
+
|
|
105
|
+
### Loop 3 (Implementation)
|
|
106
|
+
- agent-1 (role)
|
|
107
|
+
- agent-2 (role)
|
|
108
|
+
- agent-3 (role)
|
|
109
|
+
|
|
110
|
+
### Loop 2 (Validation)
|
|
111
|
+
- reviewer (code review)
|
|
112
|
+
- tester (quality assurance)
|
|
113
|
+
[+ architect, security-specialist for standard/enterprise]
|
|
114
|
+
|
|
115
|
+
### Product Owner
|
|
116
|
+
- product-owner (PROCEED/ITERATE/ABORT decision)
|
|
117
|
+
|
|
118
|
+
## Test-Driven Development Plan
|
|
119
|
+
|
|
120
|
+
### Phase 1: Red (Failure Scenarios)
|
|
121
|
+
**Deliverables:**
|
|
122
|
+
- [ ] Test script: tests/test-[feature].sh
|
|
123
|
+
- [ ] Failure test cases defined
|
|
124
|
+
|
|
125
|
+
**Test Cases:**
|
|
126
|
+
1. [Test case 1 - expected failure]
|
|
127
|
+
2. [Test case 2 - edge case]
|
|
128
|
+
3. [Test case 3 - performance requirement]
|
|
129
|
+
|
|
130
|
+
### Phase 2: Green (Minimal Implementation)
|
|
131
|
+
**Deliverables:**
|
|
132
|
+
- [ ] Minimal working implementation
|
|
133
|
+
- [ ] All test cases passing
|
|
134
|
+
|
|
135
|
+
**Implementation Steps:**
|
|
136
|
+
1. [Core functionality]
|
|
137
|
+
2. [Basic validation]
|
|
138
|
+
3. [Minimal error handling]
|
|
139
|
+
|
|
140
|
+
### Phase 3: Refactor (Quality Improvement)
|
|
141
|
+
**Deliverables:**
|
|
142
|
+
- [ ] Code quality improvements
|
|
143
|
+
- [ ] Enhanced test coverage (≥80%)
|
|
144
|
+
- [ ] Documentation
|
|
145
|
+
|
|
146
|
+
**Refactoring Goals:**
|
|
147
|
+
1. [Code organization]
|
|
148
|
+
2. [Performance optimization]
|
|
149
|
+
3. [Security hardening]
|
|
150
|
+
|
|
151
|
+
## Success Criteria
|
|
152
|
+
|
|
153
|
+
### Quality Gates
|
|
154
|
+
- Loop 3 Gate: ≥${mode === 'enterprise' ? 0.85 : mode === 'standard' ? 0.75 : 0.70}
|
|
155
|
+
- Loop 2 Consensus: ≥${mode === 'enterprise' ? 0.95 : mode === 'standard' ? 0.90 : 0.80}
|
|
156
|
+
|
|
157
|
+
### Deliverables
|
|
158
|
+
- [ ] All test cases passing
|
|
159
|
+
- [ ] Test coverage ≥80%
|
|
160
|
+
- [ ] Code complexity <15 per function
|
|
161
|
+
- [ ] Security review complete
|
|
162
|
+
- [ ] Documentation updated
|
|
163
|
+
|
|
164
|
+
### Performance Benchmarks (if applicable)
|
|
165
|
+
- [Benchmark 1]
|
|
166
|
+
- [Benchmark 2]
|
|
167
|
+
|
|
168
|
+
## Potential Blockers
|
|
169
|
+
|
|
170
|
+
**Technical:**
|
|
171
|
+
- [Potential blocker 1]
|
|
172
|
+
- [Mitigation strategy]
|
|
173
|
+
|
|
174
|
+
**Dependencies:**
|
|
175
|
+
- [External dependency 1]
|
|
176
|
+
- [Fallback plan]
|
|
177
|
+
|
|
178
|
+
## Iteration Strategy
|
|
179
|
+
- Max iterations: ${mode === 'enterprise' ? 15 : mode === 'standard' ? 10 : 5}
|
|
180
|
+
- Confidence threshold: ${mode === 'enterprise' ? 0.95 : mode === 'standard' ? 0.90 : 0.80}
|
|
181
|
+
- Adaptive agent spawning: YES
|
|
182
|
+
|
|
183
|
+
## Next Steps
|
|
184
|
+
|
|
185
|
+
1. Review this plan
|
|
186
|
+
2. Execute CFN Loop:
|
|
187
|
+
\`\`\`bash
|
|
188
|
+
/cfn-loop-cli "$ARGUMENTS" --mode=${mode}
|
|
189
|
+
# OR for debugging:
|
|
190
|
+
/cfn-loop-task "$ARGUMENTS" --mode=${mode}
|
|
191
|
+
\`\`\`
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Step 3: Output Plan
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
const planPath = `planning/PLAN_${sanitize($ARGUMENTS)}.md`;
|
|
198
|
+
Write(planPath, planContent);
|
|
199
|
+
|
|
200
|
+
console.log(`✅ Implementation plan generated: ${planPath}`);
|
|
201
|
+
console.log('');
|
|
202
|
+
console.log('📋 Plan Summary:');
|
|
203
|
+
console.log(`- Complexity: ${complexity}`);
|
|
204
|
+
console.log(`- Loop 3 Agents: ${loop3Agents.length}`);
|
|
205
|
+
console.log(`- Loop 2 Validators: ${loop2Agents.length}`);
|
|
206
|
+
console.log(`- Test Cases: ${testCases.length}`);
|
|
207
|
+
console.log(`- Success Criteria: ${successCriteria.length}`);
|
|
208
|
+
console.log('');
|
|
209
|
+
console.log('Next: Review plan, then execute CFN Loop');
|
|
210
|
+
console.log(`/cfn-loop-cli "$ARGUMENTS" --mode=${mode}`);
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Integration with CFN Loop
|
|
214
|
+
|
|
215
|
+
**Workflow:**
|
|
216
|
+
```
|
|
217
|
+
1. /write-plan "Task description" --mode=standard
|
|
218
|
+
↓ Generates planning/PLAN_task.md
|
|
219
|
+
|
|
220
|
+
2. Human reviews plan (optional)
|
|
221
|
+
↓ Approve or request changes
|
|
222
|
+
|
|
223
|
+
3. /cfn-loop-cli "Task description" --mode=standard
|
|
224
|
+
↓ Executes implementation following plan
|
|
225
|
+
|
|
226
|
+
4. CFN Loop autonomously implements following TDD phases
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Mode Comparison
|
|
230
|
+
|
|
231
|
+
| Mode | Complexity | Agents | Test Coverage | Use Case |
|
|
232
|
+
|------|------------|--------|---------------|----------|
|
|
233
|
+
| MVP | Low | 3-4 total | ≥70% | Prototypes, proof-of-concept |
|
|
234
|
+
| Standard | Medium | 5-7 total | ≥80% | Production features |
|
|
235
|
+
| Enterprise | High | 8-10 total | ≥90% | Critical systems, compliance |
|
|
236
|
+
|
|
237
|
+
## Example Output
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
Analyzing task...
|
|
241
|
+
|
|
242
|
+
✅ Implementation plan generated: planning/PLAN_jwt_authentication.md
|
|
243
|
+
|
|
244
|
+
📋 Plan Summary:
|
|
245
|
+
- Complexity: Standard
|
|
246
|
+
- Loop 3 Agents: 3 (backend-dev, researcher, devops)
|
|
247
|
+
- Loop 2 Validators: 4 (reviewer, tester, architect, security-specialist)
|
|
248
|
+
- Test Cases: 8
|
|
249
|
+
- Success Criteria: 6
|
|
250
|
+
|
|
251
|
+
Next: Review plan, then execute CFN Loop
|
|
252
|
+
/cfn-loop-cli "Implement JWT authentication" --mode=standard
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Best Practices
|
|
256
|
+
|
|
257
|
+
**When to Use:**
|
|
258
|
+
- ✅ Complex tasks (>3 steps)
|
|
259
|
+
- ✅ Security-critical features
|
|
260
|
+
- ✅ Team collaboration (plan review needed)
|
|
261
|
+
- ✅ Learning CFN Loop workflow
|
|
262
|
+
|
|
263
|
+
**When to Skip:**
|
|
264
|
+
- Simple bug fixes (go straight to /cfn-loop-cli)
|
|
265
|
+
- Urgent hotfixes (no time for planning)
|
|
266
|
+
- Well-understood patterns (agent knows what to do)
|
|
267
|
+
|
|
268
|
+
## Related Commands
|
|
269
|
+
|
|
270
|
+
- **Execute Plan**: `/cfn-loop-cli` (production) or `/cfn-loop-task` (debugging)
|
|
271
|
+
- **Document Results**: `/cfn-loop-document` (after completion)
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
**Version:** 2.0.0 (2025-10-31) - Integrated with CFN Loop v3 architecture
|