Added in git-flow

This commit is contained in:
Your Name
2025-08-10 00:36:36 +00:00
parent 20d6c2549d
commit 896859d83a
110 changed files with 17310 additions and 1 deletions
@@ -0,0 +1,54 @@
# Analysis Commands Compliance Report
## Overview
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of:
- `mcp__claude-flow__*` tools (preferred)
- `npx claude-flow` commands (as fallback)
- No direct implementation calls
## Files Reviewed
### 1. token-efficiency.md
**Status**: ✅ Updated
**Changes Made**:
- Replaced `npx ruv-swarm hook session-end --export-metrics` with proper MCP tool call
- Updated to: `Tool: mcp__claude-flow__token_usage` with appropriate parameters
- Maintained result format and context
**Before**:
```bash
npx ruv-swarm hook session-end --export-metrics
```
**After**:
```
Tool: mcp__claude-flow__token_usage
Parameters: {"operation": "session", "timeframe": "24h"}
```
### 2. performance-bottlenecks.md
**Status**: ✅ Compliant (No changes needed)
**Reason**: Already uses proper `mcp__claude-flow__task_results` tool format
## Summary
- **Total files reviewed**: 2
- **Files updated**: 1
- **Files already compliant**: 1
- **Compliance rate after updates**: 100%
## Compliance Patterns Enforced
1. **MCP Tool Usage**: All direct tool calls now use `mcp__claude-flow__*` format
2. **Parameter Format**: JSON parameters properly structured
3. **Command Context**: Preserved original functionality and expected results
4. **Documentation**: Maintained clarity and examples
## Recommendations
1. All analysis commands now follow the proper pattern
2. No direct bash commands or implementation calls remain
3. Token usage analysis properly integrated with MCP tools
4. Performance analysis already using correct tool format
The analysis directory is now fully compliant with the Claude Flow command standards.
@@ -0,0 +1,59 @@
# Performance Bottleneck Analysis
## Purpose
Identify and resolve performance bottlenecks in your development workflow.
## Automated Analysis
### 1. Real-time Detection
The post-task hook automatically analyzes:
- Execution time vs. complexity
- Agent utilization rates
- Resource constraints
- Operation patterns
### 2. Common Bottlenecks
**Time Bottlenecks:**
- Tasks taking > 5 minutes
- Sequential operations that could parallelize
- Redundant file operations
**Coordination Bottlenecks:**
- Single agent for complex tasks
- Unbalanced agent workloads
- Poor topology selection
**Resource Bottlenecks:**
- High operation count (> 100)
- Memory constraints
- I/O limitations
### 3. Improvement Suggestions
```
Tool: mcp__claude-flow__task_results
Parameters: {"taskId": "task-123", "format": "detailed"}
Result includes:
{
"bottlenecks": [
{
"type": "coordination",
"severity": "high",
"description": "Single agent used for complex task",
"recommendation": "Spawn specialized agents for parallel work"
}
],
"improvements": [
{
"area": "execution_time",
"suggestion": "Use parallel task execution",
"expectedImprovement": "30-50% time reduction"
}
]
}
```
## Continuous Optimization
The system learns from each task to prevent future bottlenecks!
@@ -0,0 +1,45 @@
# Token Usage Optimization
## Purpose
Reduce token consumption while maintaining quality through intelligent coordination.
## Optimization Strategies
### 1. Smart Caching
- Search results cached for 5 minutes
- File content cached during session
- Pattern recognition reduces redundant searches
### 2. Efficient Coordination
- Agents share context automatically
- Avoid duplicate file reads
- Batch related operations
### 3. Measurement & Tracking
```bash
# Check token savings after session
Tool: mcp__claude-flow__token_usage
Parameters: {"operation": "session", "timeframe": "24h"}
# Result shows:
{
"metrics": {
"tokensSaved": 15420,
"operations": 45,
"efficiency": "343 tokens/operation"
}
}
```
## Best Practices
1. **Use Task tool** for complex searches
2. **Enable caching** in pre-search hooks
3. **Batch operations** when possible
4. **Review session summaries** for insights
## Token Reduction Results
- 📉 32.3% average token reduction
- 🎯 More focused operations
- 🔄 Intelligent result reuse
- 📊 Cumulative improvements