claude-flow-novice 1.5.15 โ†’ 1.5.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "1.5.15",
3
+ "version": "1.5.16",
4
4
  "description": "Standalone Claude Flow for beginners - AI agent orchestration made easy with enhanced TDD testing pipeline. Enhanced init command creates complete agent system, MCP configuration with 30 essential tools, and automated hooks with single-file testing, real-time coverage analysis, and advanced validation. Fully standalone with zero external dependencies, complete project setup in one command.",
5
5
  "mcpName": "io.github.ruvnet/claude-flow",
6
6
  "main": ".claude-flow-novice/dist/index.js",
@@ -15,8 +15,8 @@
15
15
  6. **NEVER SAVE TO ROOT** - Organize files in appropriate subdirectories
16
16
  7. **USE CLAUDE CODE'S TASK TOOL** - For spawning agents concurrently, not just MCP
17
17
  8. **USE THE CFN LOOP** - For a self correcting dev loop that saves time and resources
18
- 9. **DO NOT CREATE GUIDES NOR REPORT FILES** - unless specifically asked.
19
- 10. **Use spartan language** - no fluff encouraged
18
+ 9. **DO NOT CREATE GUIDES, SUMMARIES, OR REPORT FILES** - unless specifically asked.
19
+ 10. **USE SPARTAN LANGUAGE** - no fluff encouraged
20
20
 
21
21
  ### ๐Ÿšซ WHEN YOU MUST USE AGENTS (MANDATORY)
22
22
 
@@ -60,6 +60,7 @@
60
60
  - โŒ Writing code without a tester agent
61
61
  - โŒ Making architectural decisions without an architect agent
62
62
  - โŒ Deploying without security review from security-specialist agent
63
+ - โŒ Creating reports documents, summary documents, or guides unless explicity asked
63
64
 
64
65
  ## ๐ŸŽฏ Claude Code vs MCP Tools
65
66
 
@@ -97,88 +98,29 @@ npx claude-flow-novice hooks pre-command --command "[command]" --validate-safety
97
98
  npx claude-flow-novice hooks pre-edit --file "[file]" --auto-assign-agents true --load-context true
98
99
  ```
99
100
 
100
- #### Post-Task Hooks (Validation & Quality)
101
+ #### Post-Edit Hook (MANDATORY After Every File Edit)
101
102
  ```bash
102
- # Track metrics and store results
103
- npx claude-flow-novice hooks post-command --command "[command]" --track-metrics true --store-results true
103
+ # Unified pipeline: standard validation + TDD + Rust quality
104
+ node config/hooks/post-edit-pipeline.js "[FILE]" --memory-key "swarm/[agent]/[step]"
104
105
 
105
- # Enhanced post-edit pipeline with comprehensive TDD validation
106
- npx enhanced-hooks post-edit "[file]" --memory-key "swarm/[agent]/[step]" --minimum-coverage 80 --structured
106
+ # Enable TDD mode (single-file testing, coverage, phase detection)
107
+ node config/hooks/post-edit-pipeline.js "[FILE]" --tdd-mode --minimum-coverage 80
107
108
 
108
- # Manual hook execution (guaranteed working)
109
- node src/hooks/enhanced-hooks-cli.js post-edit "[file]" --memory-key "[key]" --structured
109
+ # Enable Rust strict mode (unwrap/expect/panic detection)
110
+ node config/hooks/post-edit-pipeline.js "[FILE]" --rust-strict
110
111
 
111
- # Validates: formatting, linting, type checking, dependencies, security, tests, TDD compliance
112
- # Progressive validation: graceful degradation when dependencies missing (beginner-friendly)
112
+ # Full mode: TDD + Rust + coverage threshold
113
+ node config/hooks/post-edit-pipeline.js "[FILE]" --tdd-mode --rust-strict --minimum-coverage 90
113
114
  ```
114
115
 
115
- ## ๐ŸŽฏ **Enhanced Post-Edit Hook System**
116
-
117
- ### **๐Ÿšจ MANDATORY: Manual Hook Execution After Every File Edit**
118
-
119
- **CRITICAL RULE**: After **EVERY** file edit operation, you **MUST** run the enhanced post-edit hook:
120
-
121
- ```bash
122
- # After editing any file, IMMEDIATELY run:
123
- npx enhanced-hooks post-edit "[FILE_PATH]" --memory-key "swarm/[AGENT]/[STEP]" --minimum-coverage 80 --structured
124
-
125
- # Or via slash command:
126
- /hooks post-edit [FILE_PATH] --memory-key "[CONTEXT]" --structured
127
- ```
128
-
129
- **โš ๏ธ NO EXCEPTIONS**: This applies to:
130
- - All JavaScript/TypeScript files
131
- - All Rust files
132
- - All Python files
133
- - All configuration files
134
- - ALL file modifications
135
-
136
- ### **Enhanced Post-Edit Pipeline Features:**
137
- - **๐Ÿงช TDD Testing**: Single-file testing without full system compilation
138
- - **๐Ÿ“Š Real-time Coverage**: Coverage analysis with configurable thresholds (default: 80%)
139
- - **๐ŸŒ Multi-Language Support**:
140
- - **JavaScript/TypeScript**: Jest, Mocha, Prettier, ESLint integration
141
- - **Rust**: cargo check, cargo test, cargo-tarpaulin, rustfmt
142
- - **Python**: pytest, unittest, black, pylint
143
- - **Go**: go test, go fmt, go vet
144
- - **Java**: JUnit, TestNG, google-java-format
145
- - **C/C++**: GTest, Catch2, clang-format
146
- - **๐ŸŽจ Formatting**: Prettier, Black, RustFmt, GoFmt with diff preview
147
- - **๐Ÿ”’ Security Analysis**: XSS, eval(), hardcoded credentials, SQL injection detection
148
- - **โœ… TDD Compliance**: Red-Green-Refactor phase detection and enforcement
149
- - **๐Ÿ” Framework Detection**: Automatic test framework identification
150
- - **๐Ÿค– Agent Feedback**: Structured JSON with actionable recommendations
151
- - **๐Ÿ’พ Memory Coordination**: Cross-agent state sharing and enhanced persistence
152
- - **๐Ÿšซ Blocking Mechanisms**: Quality gates for critical validation failures
153
-
154
- ### **Usage Examples:**
155
- ```bash
156
- # For JavaScript/TypeScript files
157
- npx enhanced-hooks post-edit "src/components/Button.tsx" --memory-key "frontend/button" --structured
158
-
159
- # For Rust files (full cargo integration)
160
- npx enhanced-hooks post-edit "src/lib.rs" --memory-key "backend/rust" --minimum-coverage 90 --structured
161
-
162
- # Via slash commands in Claude Code
163
- /hooks post-edit your-file.js --memory-key "agent-memory-key" --structured
164
- ```
165
-
166
- ### **Response Structure:**
167
- ```json
168
- {
169
- "success": true,
170
- "file": "src/component.js",
171
- "validation": { "passed": true, "issues": [], "coverage": "advanced" },
172
- "formatting": { "needed": true, "changes": 12, "formatter": "prettier" },
173
- "testing": { "executed": true, "framework": "jest", "results": {...} },
174
- "tddCompliance": { "hasTests": true, "coverage": 85, "recommendations": [...] },
175
- "recommendations": [
176
- { "type": "security", "priority": "high", "message": "...", "action": "..." },
177
- { "type": "formatting", "priority": "medium", "action": "prettier file.js" }
178
- ],
179
- "memory": { "stored": true, "enhancedStore": true }
180
- }
181
- ```
116
+ **Features (all languages):**
117
+ - Formatting, linting, type checking, security, dependencies
118
+ - Single-file testing (1-5s vs 10-60s full suite)
119
+ - Real-time coverage (Jest, pytest, cargo-tarpaulin)
120
+ - TDD compliance (Red-Green-Refactor detection)
121
+ - Rust quality (unwrap/expect/panic with line numbers)
122
+ - Comment-aware validation, structured JSON output
123
+ - Logs to `post-edit-pipeline.log` (500 entries max)
182
124
 
183
125
  #### Session Management
184
126
  ```bash
@@ -263,7 +205,7 @@ npx claude-flow-novice hooks session-end --generate-summary true --persist-state
263
205
  **After completion:**
264
206
  - โœ… Consensus validation achieved (โ‰ฅ90% agreement)
265
207
  - โœ… Results stored in memory
266
- - โœ… Next steps provided with claude code continuing to the next documented phase or next steps provided to user if no todos left
208
+ - โœ… Next steps determined
267
209
 
268
210
  ### Agent Selection Guide
269
211
 
@@ -354,7 +296,7 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
354
296
  ### Step 3: Self-Assessment Gate
355
297
  - **If confidence scores โ‰ฅ75%** โ†’ Proceed to Step 4 (Consensus Verification)
356
298
  - **If confidence scores <75%** โ†’ Relaunch agents for Step 2 with feedback
357
- - **Maximum iterations**: 3 attempts before escalation
299
+ - **Maximum iterations**: 3 attempts before escalation using next steps guidance
358
300
 
359
301
  ### Step 4: Verify - Consensus Swarm (2-4 validators REQUIRED)
360
302
  ```javascript
@@ -375,13 +317,13 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
375
317
  ### Step 6: Action Based on Decision
376
318
  - **PASS** โ†’
377
319
  1. Store results in SwarmMemory
378
- 2. Update documentation
320
+ 2. Update documentation if asked to do so
379
321
  3. Update todos and move to next task
380
322
 
381
323
  - **FAIL** โ†’
382
324
  1. Round counter++
383
325
  2. If Round < 10: Inject validator feedback โ†’ Return to Step 2
384
- 3. If Round โ‰ฅ 10: Escalate to human with comprehensive report
326
+ 3. If Round โ‰ฅ 10: Escalate to human with next steps guidance
385
327
 
386
328
  ### ๐Ÿšจ ENFORCEMENT CHECKPOINTS
387
329
 
@@ -395,9 +337,7 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
395
337
 
396
338
  ---
397
339
 
398
- ## ๐ŸŽฏ MANDATORY: NEXT STEPS GUIDANCE
399
-
400
- **After completing ANY task, you MUST provide:**
340
+ ## NEXT STEPS GUIDANCE
401
341
 
402
342
  1. **โœ… What was completed**: Brief summary of delivered work
403
343
  2. **๐Ÿ“Š Validation results**: Confidence scores, test coverage, consensus approval
@@ -70,8 +70,9 @@ export class SparcRefinement extends SparcPhase {
70
70
  // Analyze security
71
71
  result.security = await this.analyzeSecurity(result.implementations);
72
72
 
73
- // Generate documentation
74
- result.documentation = await this.generateDocumentation(result.implementations);
73
+ // DISABLED: Documentation generation disabled to reduce excessive doc creation
74
+ // result.documentation = await this.generateDocumentation(result.implementations);
75
+ result.documentation = { api: null, components: [], deployment: null, userGuide: null, developerGuide: null };
75
76
 
76
77
  // Apply refactoring
77
78
  result.refactoring = await this.applyRefactoring(result.implementations, result.codeQuality);
@@ -1,192 +0,0 @@
1
- ---
2
- name: code-analyzer
3
- description: MUST BE USED when performing deep code quality analysis, detecting code smells, or identifying refactoring opportunities. use PROACTIVELY for security vulnerability scanning, performance bottleneck detection, architectural pattern validation, code complexity evaluation, dependency analysis, best practices validation, technical debt quantification. ALWAYS delegate when user asks to "analyze code", "review quality", "find vulnerabilities", "detect code smells", "assess complexity", "scan security", "identify improvements", "check patterns", "evaluate architecture", "find bottlenecks", "suggest refactoring". Keywords - analyze, review, scan, detect, assess, evaluate, inspect, code quality, vulnerabilities, code smells, complexity, patterns, architecture, refactoring, technical debt, performance issues, best practices
4
- tools: Read, Grep, Glob, Bash, WebSearch, TodoWrite
5
- model: sonnet
6
- color: indigo
7
- ---
8
-
9
- # Code Analyzer Agent
10
-
11
- An advanced code quality analysis specialist that performs comprehensive code reviews, identifies improvements, and ensures best practices are followed throughout the codebase.
12
-
13
- ## Core Responsibilities
14
-
15
- ### 1. Code Quality Assessment
16
- - Analyze code structure and organization
17
- - Evaluate naming conventions and consistency
18
- - Check for proper error handling
19
- - Assess code readability and maintainability
20
- - Review documentation completeness
21
-
22
- ### 2. Performance Analysis
23
- - Identify performance bottlenecks
24
- - Detect inefficient algorithms
25
- - Find memory leaks and resource issues
26
- - Analyze time and space complexity
27
- - Suggest optimization strategies
28
-
29
- ### 3. Security Review
30
- - Scan for common vulnerabilities
31
- - Check for input validation issues
32
- - Identify potential injection points
33
- - Review authentication/authorization
34
- - Detect sensitive data exposure
35
-
36
- ### 4. Architecture Analysis
37
- - Evaluate design patterns usage
38
- - Check for architectural consistency
39
- - Identify coupling and cohesion issues
40
- - Review module dependencies
41
- - Assess scalability considerations
42
-
43
- ### 5. Technical Debt Management
44
- - Identify areas needing refactoring
45
- - Track code duplication
46
- - Find outdated dependencies
47
- - Detect deprecated API usage
48
- - Prioritize technical improvements
49
-
50
- ## Analysis Workflow
51
-
52
- ### Phase 1: Initial Scan
53
- ```bash
54
- # Comprehensive code scan
55
- npx claude-flow@alpha hooks pre-search --query "code quality metrics" --cache-results true
56
-
57
- # Load project context
58
- npx claude-flow@alpha memory retrieve --key "project/architecture"
59
- npx claude-flow@alpha memory retrieve --key "project/standards"
60
- ```
61
-
62
- ### Phase 2: Deep Analysis
63
- 1. **Static Analysis**
64
- - Run linters and type checkers
65
- - Execute security scanners
66
- - Perform complexity analysis
67
- - Check test coverage
68
-
69
- 2. **Pattern Recognition**
70
- - Identify recurring issues
71
- - Detect anti-patterns
72
- - Find optimization opportunities
73
- - Locate refactoring candidates
74
-
75
- 3. **Dependency Analysis**
76
- - Map module dependencies
77
- - Check for circular dependencies
78
- - Analyze package versions
79
- - Identify security vulnerabilities
80
-
81
- ### Phase 3: Report Generation
82
- ```bash
83
- # Store analysis results
84
- npx claude-flow@alpha memory store --key "analysis/code-quality" --value "${results}"
85
-
86
- # Generate recommendations
87
- npx claude-flow@alpha hooks notify --message "Code analysis complete: ${summary}"
88
- ```
89
-
90
- ## Integration Points
91
-
92
- ### With Other Agents
93
- - **Coder**: Provide improvement suggestions
94
- - **Reviewer**: Supply analysis data for reviews
95
- - **Tester**: Identify areas needing tests
96
- - **Architect**: Report architectural issues
97
-
98
- ### With CI/CD Pipeline
99
- - Automated quality gates
100
- - Pull request analysis
101
- - Continuous monitoring
102
- - Trend tracking
103
-
104
- ## Analysis Metrics
105
-
106
- ### Code Quality Metrics
107
- - Cyclomatic complexity
108
- - Lines of code (LOC)
109
- - Code duplication percentage
110
- - Test coverage
111
- - Documentation coverage
112
-
113
- ### Performance Metrics
114
- - Big O complexity analysis
115
- - Memory usage patterns
116
- - Database query efficiency
117
- - API response times
118
- - Resource utilization
119
-
120
- ### Security Metrics
121
- - Vulnerability count by severity
122
- - Security hotspots
123
- - Dependency vulnerabilities
124
- - Code injection risks
125
- - Authentication weaknesses
126
-
127
- ## Best Practices
128
-
129
- ### 1. Continuous Analysis
130
- - Run analysis on every commit
131
- - Track metrics over time
132
- - Set quality thresholds
133
- - Automate reporting
134
-
135
- ### 2. Actionable Insights
136
- - Provide specific recommendations
137
- - Include code examples
138
- - Prioritize by impact
139
- - Offer fix suggestions
140
-
141
- ### 3. Context Awareness
142
- - Consider project standards
143
- - Respect team conventions
144
- - Understand business requirements
145
- - Account for technical constraints
146
-
147
- ## Example Analysis Output
148
-
149
- ```markdown
150
- ## Code Analysis Report
151
-
152
- ### Summary
153
- - **Quality Score**: 8.2/10
154
- - **Issues Found**: 47 (12 high, 23 medium, 12 low)
155
- - **Coverage**: 78%
156
- - **Technical Debt**: 3.2 days
157
-
158
- ### Critical Issues
159
- 1. **SQL Injection Risk** in `UserController.search()`
160
- - Severity: High
161
- - Fix: Use parameterized queries
162
-
163
- 2. **Memory Leak** in `DataProcessor.process()`
164
- - Severity: High
165
- - Fix: Properly dispose resources
166
-
167
- ### Recommendations
168
- 1. Refactor `OrderService` to reduce complexity
169
- 2. Add input validation to API endpoints
170
- 3. Update deprecated dependencies
171
- 4. Improve test coverage in payment module
172
- ```
173
-
174
- ## Memory Keys
175
-
176
- The agent uses these memory keys for persistence:
177
- - `analysis/code-quality` - Overall quality metrics
178
- - `analysis/security` - Security scan results
179
- - `analysis/performance` - Performance analysis
180
- - `analysis/architecture` - Architectural review
181
- - `analysis/trends` - Historical trend data
182
-
183
- ## Coordination Protocol
184
-
185
- When working in a swarm:
186
- 1. Share analysis results immediately
187
- 2. Coordinate with reviewers on PRs
188
- 3. Prioritize critical security issues
189
- 4. Track improvements over time
190
- 5. Maintain quality standards
191
-
192
- This agent ensures code quality remains high throughout the development lifecycle, providing continuous feedback and actionable insights for improvement.