@paulduvall/claude-dev-toolkit 0.0.1-alpha.2 → 0.0.1-alpha.21
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/LICENSE +21 -0
- package/README.md +88 -37
- package/bin/claude-commands +307 -65
- package/commands/active/xarchitecture.md +393 -0
- package/commands/active/xconfig.md +127 -0
- package/commands/active/xcontinue.md +92 -0
- package/commands/active/xdebug.md +130 -0
- package/commands/active/xdocs.md +178 -0
- package/commands/active/xexplore.md +94 -0
- package/commands/active/xgit.md +149 -0
- package/commands/active/xpipeline.md +152 -0
- package/commands/active/xquality.md +96 -0
- package/commands/active/xrefactor.md +198 -0
- package/commands/active/xrelease.md +142 -0
- package/commands/active/xsecurity.md +92 -0
- package/commands/active/xspec.md +174 -0
- package/commands/active/xtdd.md +151 -0
- package/commands/active/xtest.md +89 -0
- package/commands/active/xverify.md +80 -0
- package/commands/experiments/xact.md +742 -0
- package/commands/experiments/xanalytics.md +113 -0
- package/commands/experiments/xanalyze.md +70 -0
- package/commands/experiments/xapi.md +161 -0
- package/commands/experiments/xatomic.md +112 -0
- package/commands/experiments/xaws.md +85 -0
- package/commands/experiments/xcicd.md +337 -0
- package/commands/experiments/xcommit.md +122 -0
- package/commands/experiments/xcompliance.md +182 -0
- package/commands/experiments/xconstraints.md +89 -0
- package/commands/experiments/xcoverage.md +90 -0
- package/commands/experiments/xdb.md +102 -0
- package/commands/experiments/xdesign.md +121 -0
- package/commands/experiments/xdevcontainer.md +238 -0
- package/commands/experiments/xevaluate.md +111 -0
- package/commands/experiments/xfootnote.md +12 -0
- package/commands/experiments/xgenerate.md +117 -0
- package/commands/experiments/xgovernance.md +149 -0
- package/commands/experiments/xgreen.md +66 -0
- package/commands/experiments/xiac.md +118 -0
- package/commands/experiments/xincident.md +137 -0
- package/commands/experiments/xinfra.md +115 -0
- package/commands/experiments/xknowledge.md +115 -0
- package/commands/experiments/xmaturity.md +120 -0
- package/commands/experiments/xmetrics.md +118 -0
- package/commands/experiments/xmonitoring.md +128 -0
- package/commands/experiments/xnew.md +903 -0
- package/commands/experiments/xobservable.md +114 -0
- package/commands/experiments/xoidc.md +165 -0
- package/commands/experiments/xoptimize.md +115 -0
- package/commands/experiments/xperformance.md +112 -0
- package/commands/experiments/xplanning.md +131 -0
- package/commands/experiments/xpolicy.md +115 -0
- package/commands/experiments/xproduct.md +98 -0
- package/commands/experiments/xreadiness.md +75 -0
- package/commands/experiments/xred.md +55 -0
- package/commands/experiments/xrisk.md +128 -0
- package/commands/experiments/xrules.md +124 -0
- package/commands/experiments/xsandbox.md +120 -0
- package/commands/experiments/xscan.md +102 -0
- package/commands/experiments/xsetup.md +123 -0
- package/commands/experiments/xtemplate.md +116 -0
- package/commands/experiments/xtrace.md +212 -0
- package/commands/experiments/xux.md +171 -0
- package/commands/experiments/xvalidate.md +104 -0
- package/commands/experiments/xworkflow.md +113 -0
- package/hooks/.smellrc.example.json +19 -0
- package/hooks/README.md +263 -0
- package/hooks/check-commit-signing.py +127 -0
- package/hooks/check-complexity.py +38 -0
- package/hooks/check-security.py +37 -0
- package/hooks/claude-wrapper.sh +29 -0
- package/hooks/config.py +110 -0
- package/hooks/file-logger.sh +100 -0
- package/hooks/lib/argument-parser.sh +427 -0
- package/hooks/lib/config-constants.sh +230 -0
- package/hooks/lib/context-manager.sh +560 -0
- package/hooks/lib/error-handler.sh +423 -0
- package/hooks/lib/execution-engine.sh +444 -0
- package/hooks/lib/execution-results.sh +113 -0
- package/hooks/lib/execution-simulation.sh +114 -0
- package/hooks/lib/field-validators.sh +104 -0
- package/hooks/lib/file-utils.sh +398 -0
- package/hooks/lib/subagent-discovery.sh +468 -0
- package/hooks/lib/subagent-validator.sh +407 -0
- package/hooks/lib/validation-reporter.sh +134 -0
- package/hooks/on-error-debug.sh +226 -0
- package/hooks/pre-commit-quality.sh +204 -0
- package/hooks/pre-commit-test-runner.sh +132 -0
- package/hooks/pre-write-security.sh +115 -0
- package/hooks/prevent-credential-exposure.sh +279 -0
- package/hooks/security_bandit.py +177 -0
- package/hooks/security_checks.py +97 -0
- package/hooks/security_secrets.py +81 -0
- package/hooks/security_trojan.py +61 -0
- package/hooks/settings.example.json +52 -0
- package/hooks/smell_checks.py +238 -0
- package/hooks/smell_javascript.py +231 -0
- package/hooks/smell_python.py +110 -0
- package/hooks/smell_ruff.py +70 -0
- package/hooks/smell_types.py +72 -0
- package/hooks/subagent-trigger-simple.sh +202 -0
- package/hooks/subagent-trigger.sh +253 -0
- package/hooks/suppression.py +82 -0
- package/hooks/tab-color.sh +70 -0
- package/hooks/verify-before-edit.sh +135 -0
- package/lib/backup-restore-command.js +140 -0
- package/lib/base/base-command.js +252 -0
- package/lib/base/command-result.js +184 -0
- package/lib/config/constants.js +255 -0
- package/lib/config.js +48 -6
- package/lib/configure-command.js +428 -0
- package/lib/dependency-validator.js +64 -5
- package/lib/hook-installer-core.js +2 -2
- package/lib/installation-instruction-generator.js +213 -495
- package/lib/installer.js +134 -56
- package/lib/oidc-command.js +740 -0
- package/lib/services/backup-list-service.js +226 -0
- package/lib/services/backup-service.js +230 -0
- package/lib/services/command-installer-service.js +217 -0
- package/lib/services/logger-service.js +201 -0
- package/lib/services/package-manager-service.js +319 -0
- package/lib/services/platform-instruction-service.js +294 -0
- package/lib/services/recovery-instruction-service.js +348 -0
- package/lib/services/restore-service.js +221 -0
- package/lib/setup-command.js +359 -0
- package/lib/setup-wizard.js +155 -262
- package/lib/uninstall-command.js +100 -0
- package/lib/utils/claude-path-config.js +184 -0
- package/lib/utils/file-system-utils.js +152 -0
- package/lib/utils.js +8 -4
- package/lib/verify-command.js +430 -0
- package/package.json +7 -3
- package/scripts/postinstall.js +172 -157
- package/subagents/debug-specialist.md +7 -0
- package/templates/README.md +115 -0
- package/templates/basic-settings.json +30 -0
- package/templates/comprehensive-settings.json +57 -0
- package/templates/global-claude.md +344 -0
- package/templates/hybrid-hook-config.yaml +132 -0
- package/templates/security-focused-settings.json +62 -0
- package/templates/subagent-hooks.yaml +188 -0
- package/lib/package-manager-service.js +0 -270
- package/subagents/debug-context.md +0 -197
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Comprehensive business metrics tracking, user behavior analysis, and performance analytics for data-driven decisions
|
|
3
|
+
tags: [analytics, metrics, business, performance, reporting, insights]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Analyze business metrics and performance data based on the arguments provided in $ARGUMENTS.
|
|
7
|
+
|
|
8
|
+
First, examine the project for analytics setup:
|
|
9
|
+
!find . -name "*.json" -o -name "*.yml" -o -name "*.yaml" | grep -E "(analytics|metrics|config)" | head -5
|
|
10
|
+
!ls -la package.json requirements.txt 2>/dev/null | head -2
|
|
11
|
+
!ps aux | grep -E "(analytics|prometheus|grafana)" | grep -v grep
|
|
12
|
+
|
|
13
|
+
Based on $ARGUMENTS, perform the appropriate analytics operation:
|
|
14
|
+
|
|
15
|
+
## 1. Business Metrics Analysis
|
|
16
|
+
|
|
17
|
+
If analyzing business metrics (--business, --revenue, --conversion):
|
|
18
|
+
!find . -name "*.sql" -o -name "*analytics*" | head -5 2>/dev/null
|
|
19
|
+
!grep -r "revenue\|conversion\|funnel" . --include="*.py" --include="*.js" | head -5 2>/dev/null
|
|
20
|
+
!python -c "import pandas; print('Analytics libraries available')" 2>/dev/null || echo "Install analytics dependencies"
|
|
21
|
+
|
|
22
|
+
Analyze business performance:
|
|
23
|
+
- Revenue trends and forecasting
|
|
24
|
+
- Conversion funnel optimization
|
|
25
|
+
- Customer retention analysis
|
|
26
|
+
- Churn prediction modeling
|
|
27
|
+
- ROI and profitability metrics
|
|
28
|
+
|
|
29
|
+
## 2. User Behavior Analytics
|
|
30
|
+
|
|
31
|
+
If analyzing user behavior (--users, --journeys, --segments):
|
|
32
|
+
!find . -name "*event*" -o -name "*tracking*" | head -5 2>/dev/null
|
|
33
|
+
!grep -r "user_id\|session\|event" . --include="*.py" --include="*.js" | head -5 2>/dev/null
|
|
34
|
+
!curl -s http://localhost:3000/health 2>/dev/null || echo "Application not running locally"
|
|
35
|
+
|
|
36
|
+
Analyze user patterns:
|
|
37
|
+
- User journey mapping and optimization
|
|
38
|
+
- Behavioral segmentation analysis
|
|
39
|
+
- Engagement and retention metrics
|
|
40
|
+
- A/B test result analysis
|
|
41
|
+
- User acquisition channel performance
|
|
42
|
+
|
|
43
|
+
## 3. Performance Analytics
|
|
44
|
+
|
|
45
|
+
If analyzing performance (--performance, --latency, --throughput):
|
|
46
|
+
!find . -name "*log*" -o -name "*metrics*" | head -5 2>/dev/null
|
|
47
|
+
!netstat -tuln 2>/dev/null | grep -E "(9090|3000|8080)" || echo "No monitoring ports detected"
|
|
48
|
+
!docker ps | grep -E "(prometheus|grafana)" || echo "No monitoring containers running"
|
|
49
|
+
|
|
50
|
+
Analyze system performance:
|
|
51
|
+
- Response time and latency analysis
|
|
52
|
+
- Throughput and capacity planning
|
|
53
|
+
- Error rate and pattern detection
|
|
54
|
+
- Resource utilization optimization
|
|
55
|
+
- SLA compliance monitoring
|
|
56
|
+
|
|
57
|
+
## 4. Custom Analytics Implementation
|
|
58
|
+
|
|
59
|
+
If implementing custom analytics (--custom, --dashboard, --alerts):
|
|
60
|
+
!find . -name "*dashboard*" -o -name "*alert*" | head -5 2>/dev/null
|
|
61
|
+
!python -c "import matplotlib, seaborn; print('Visualization libraries available')" 2>/dev/null || echo "Install visualization dependencies"
|
|
62
|
+
!ls -la config/ analytics/ dashboards/ 2>/dev/null || echo "No analytics configuration found"
|
|
63
|
+
|
|
64
|
+
Implement custom solutions:
|
|
65
|
+
- Custom metric definition and tracking
|
|
66
|
+
- Interactive dashboard creation
|
|
67
|
+
- Alert threshold configuration
|
|
68
|
+
- Data pipeline automation
|
|
69
|
+
- Real-time monitoring setup
|
|
70
|
+
|
|
71
|
+
## 5. Predictive Analytics
|
|
72
|
+
|
|
73
|
+
If running predictive analytics (--predictions, --forecast, --anomaly):
|
|
74
|
+
!python -c "import sklearn, numpy; print('ML libraries available')" 2>/dev/null || echo "Install ML dependencies: pip install scikit-learn numpy"
|
|
75
|
+
!find . -name "*model*" -o -name "*predict*" | head -5 2>/dev/null
|
|
76
|
+
!ls -la data/ models/ predictions/ 2>/dev/null || echo "No ML artifacts found"
|
|
77
|
+
|
|
78
|
+
Perform predictive analysis:
|
|
79
|
+
- Machine learning model training
|
|
80
|
+
- Forecasting and trend prediction
|
|
81
|
+
- Anomaly detection implementation
|
|
82
|
+
- Seasonal pattern analysis
|
|
83
|
+
- Risk assessment modeling
|
|
84
|
+
|
|
85
|
+
Think step by step about analytics requirements and provide:
|
|
86
|
+
|
|
87
|
+
1. **Data Assessment**:
|
|
88
|
+
- Available data sources identification
|
|
89
|
+
- Data quality and completeness evaluation
|
|
90
|
+
- Integration requirements analysis
|
|
91
|
+
- Privacy and compliance considerations
|
|
92
|
+
|
|
93
|
+
2. **Analytics Strategy**:
|
|
94
|
+
- Key performance indicators definition
|
|
95
|
+
- Measurement framework design
|
|
96
|
+
- Dashboard and reporting requirements
|
|
97
|
+
- Alert and notification setup
|
|
98
|
+
|
|
99
|
+
3. **Implementation Plan**:
|
|
100
|
+
- Data pipeline architecture
|
|
101
|
+
- Visualization and dashboard setup
|
|
102
|
+
- Monitoring and alerting configuration
|
|
103
|
+
- Machine learning model development
|
|
104
|
+
|
|
105
|
+
4. **Insights and Recommendations**:
|
|
106
|
+
- Performance trend analysis
|
|
107
|
+
- Optimization opportunities identification
|
|
108
|
+
- Business impact assessment
|
|
109
|
+
- Action plan development
|
|
110
|
+
|
|
111
|
+
Generate comprehensive analytics implementation with data collection, visualization, monitoring, and actionable insights.
|
|
112
|
+
|
|
113
|
+
If no specific operation is provided, perform analytics readiness assessment and recommend implementation strategy based on current setup and business requirements.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Comprehensive code analysis for quality, patterns, and issue identification
|
|
3
|
+
tags: [analysis, quality, refactoring]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Analyze the codebase for quality issues, patterns, and improvements.
|
|
7
|
+
|
|
8
|
+
First, examine the project structure:
|
|
9
|
+
!find . -type f -name "*.py" -o -name "*.js" -o -name "*.ts" | grep -v node_modules | grep -v __pycache__ | head -20
|
|
10
|
+
|
|
11
|
+
Based on the file structure and the arguments provided ($ARGUMENTS), perform the following analysis:
|
|
12
|
+
|
|
13
|
+
1. **Code Structure Analysis**:
|
|
14
|
+
- Identify architectural patterns and anti-patterns
|
|
15
|
+
- Check for circular dependencies
|
|
16
|
+
- Analyze module coupling and cohesion
|
|
17
|
+
- Look for code duplication
|
|
18
|
+
|
|
19
|
+
2. **Quality Metrics**:
|
|
20
|
+
- Calculate cyclomatic complexity for functions
|
|
21
|
+
- Check type annotation coverage
|
|
22
|
+
- Identify functions longer than 50 lines
|
|
23
|
+
- Find classes with more than 10 methods
|
|
24
|
+
|
|
25
|
+
3. **Security Issues**:
|
|
26
|
+
- Look for hardcoded credentials or API keys
|
|
27
|
+
- Check for SQL injection vulnerabilities
|
|
28
|
+
- Identify missing input validation
|
|
29
|
+
- Find exposed sensitive data
|
|
30
|
+
|
|
31
|
+
4. **Performance Concerns**:
|
|
32
|
+
- Identify N+1 query patterns
|
|
33
|
+
- Find inefficient loops or algorithms
|
|
34
|
+
- Check for missing database indexes
|
|
35
|
+
- Look for synchronous operations that could be async
|
|
36
|
+
|
|
37
|
+
For Python projects, run:
|
|
38
|
+
!python -m pylint **/*.py --output-format=json 2>/dev/null || echo "Pylint not available"
|
|
39
|
+
!python -m mypy . --ignore-missing-imports 2>/dev/null || echo "Mypy not available"
|
|
40
|
+
|
|
41
|
+
For JavaScript/TypeScript projects, run:
|
|
42
|
+
!npx eslint . --format json 2>/dev/null || echo "ESLint not available"
|
|
43
|
+
|
|
44
|
+
Think step by step about the analysis results and provide:
|
|
45
|
+
- A quality score (0-10) with justification
|
|
46
|
+
- Top 5 issues to fix with specific file locations
|
|
47
|
+
- Concrete recommendations for each issue
|
|
48
|
+
- Quick wins that can be implemented immediately
|
|
49
|
+
|
|
50
|
+
If specific analysis options were provided in $ARGUMENTS (like --security, --performance, --types), focus the analysis on those areas.
|
|
51
|
+
|
|
52
|
+
Generate a summary report in this format:
|
|
53
|
+
```
|
|
54
|
+
📊 Code Analysis Report
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
Quality Score: X/10
|
|
57
|
+
|
|
58
|
+
🔴 Critical Issues:
|
|
59
|
+
- [Issue description] at file:line
|
|
60
|
+
|
|
61
|
+
🟡 Warnings:
|
|
62
|
+
- [Issue description] at file:line
|
|
63
|
+
|
|
64
|
+
💡 Recommendations:
|
|
65
|
+
1. [Specific actionable recommendation]
|
|
66
|
+
2. [Specific actionable recommendation]
|
|
67
|
+
|
|
68
|
+
⚡ Quick Wins:
|
|
69
|
+
- [Easy fix with high impact]
|
|
70
|
+
```
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Design, implement, test, and document APIs with comprehensive automation and best practices
|
|
3
|
+
tags: [api, development, testing, documentation, openapi, rest, graphql]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Design, implement, test, and document APIs based on the arguments provided in $ARGUMENTS.
|
|
7
|
+
|
|
8
|
+
First, examine the project structure and API configuration:
|
|
9
|
+
!ls -la | grep -E "(api|server|app|openapi|swagger)"
|
|
10
|
+
!find . -name "*.json" -o -name "*.yml" -o -name "*.yaml" | grep -E "(api|openapi|swagger)" | head -10
|
|
11
|
+
!npm list express 2>/dev/null || python -c "import fastapi; print('FastAPI available')" 2>/dev/null || echo "No API framework detected"
|
|
12
|
+
|
|
13
|
+
Based on $ARGUMENTS, perform the appropriate API operation:
|
|
14
|
+
|
|
15
|
+
## 1. API Design and Planning
|
|
16
|
+
|
|
17
|
+
If designing new API (--design):
|
|
18
|
+
!find . -name "*.yml" -o -name "*.yaml" | grep -E "(openapi|swagger)" | head -3
|
|
19
|
+
@openapi.yml 2>/dev/null || @swagger.yml 2>/dev/null || echo "No existing API specification found"
|
|
20
|
+
|
|
21
|
+
Design REST API structure:
|
|
22
|
+
- Analyze resource requirements from $ARGUMENTS
|
|
23
|
+
- Create RESTful endpoint patterns
|
|
24
|
+
- Define request/response schemas
|
|
25
|
+
- Plan authentication and authorization
|
|
26
|
+
- Design error handling patterns
|
|
27
|
+
|
|
28
|
+
## 2. OpenAPI Specification
|
|
29
|
+
|
|
30
|
+
If working with OpenAPI (--openapi):
|
|
31
|
+
!find . -name "openapi.*" -o -name "swagger.*" | head -3
|
|
32
|
+
!python -c "import yaml; print('YAML parsing available')" 2>/dev/null || npm list js-yaml 2>/dev/null || echo "No YAML parser available"
|
|
33
|
+
|
|
34
|
+
Generate or validate OpenAPI spec:
|
|
35
|
+
- Create OpenAPI 3.0 specification
|
|
36
|
+
- Define API paths and operations
|
|
37
|
+
- Document request/response schemas
|
|
38
|
+
- Include authentication schemes
|
|
39
|
+
- Add examples and descriptions
|
|
40
|
+
|
|
41
|
+
## 3. Implementation Generation
|
|
42
|
+
|
|
43
|
+
If generating implementation (--generate):
|
|
44
|
+
!find . -name "package.json" -o -name "requirements.txt" | head -1
|
|
45
|
+
!python -c "import fastapi" 2>/dev/null && echo "FastAPI available" || npm list express 2>/dev/null && echo "Express available" || echo "No API framework detected"
|
|
46
|
+
|
|
47
|
+
Generate server implementation:
|
|
48
|
+
- Create API routes based on specification
|
|
49
|
+
- Generate request/response models
|
|
50
|
+
- Implement middleware stack
|
|
51
|
+
- Add validation and error handling
|
|
52
|
+
- Configure database connections if needed
|
|
53
|
+
|
|
54
|
+
## 4. Testing and Validation
|
|
55
|
+
|
|
56
|
+
If testing API (--test):
|
|
57
|
+
!find . -name "*test*" | grep -E "(api|endpoint)" | head -5
|
|
58
|
+
!python -c "import requests" 2>/dev/null && echo "Python requests available" || npm list axios 2>/dev/null && echo "Axios available" || echo "No HTTP client available"
|
|
59
|
+
|
|
60
|
+
Execute comprehensive API testing:
|
|
61
|
+
- Unit tests for individual endpoints
|
|
62
|
+
- Integration tests with database
|
|
63
|
+
- Contract testing against specification
|
|
64
|
+
- Load testing for performance
|
|
65
|
+
- Security vulnerability scanning
|
|
66
|
+
|
|
67
|
+
## 5. Documentation Generation
|
|
68
|
+
|
|
69
|
+
If generating documentation (--docs):
|
|
70
|
+
!find . -name "*.md" | grep -i api | head -5
|
|
71
|
+
!python -c "import markdown" 2>/dev/null || npm list markdown 2>/dev/null || echo "No markdown processor available"
|
|
72
|
+
|
|
73
|
+
Create comprehensive API documentation:
|
|
74
|
+
- Generate interactive Swagger UI
|
|
75
|
+
- Create developer documentation
|
|
76
|
+
- Add usage examples and code samples
|
|
77
|
+
- Document authentication flows
|
|
78
|
+
- Include troubleshooting guides
|
|
79
|
+
|
|
80
|
+
## 6. Security and Monitoring
|
|
81
|
+
|
|
82
|
+
If adding security (--security):
|
|
83
|
+
!find . -name "*.js" -o -name "*.py" | xargs grep -l "auth" | head -5
|
|
84
|
+
!npm list helmet 2>/dev/null || python -c "import security" 2>/dev/null || echo "No security middleware found"
|
|
85
|
+
|
|
86
|
+
Implement API security:
|
|
87
|
+
- Add authentication middleware (JWT, OAuth)
|
|
88
|
+
- Implement rate limiting
|
|
89
|
+
- Add CORS configuration
|
|
90
|
+
- Include security headers
|
|
91
|
+
- Set up input validation
|
|
92
|
+
|
|
93
|
+
## 7. Performance Optimization
|
|
94
|
+
|
|
95
|
+
If optimizing performance (--optimize):
|
|
96
|
+
!find . -name "*.log" | grep -E "(access|api)" | head -3
|
|
97
|
+
!ps aux | grep -E "(node|python)" | head -5
|
|
98
|
+
|
|
99
|
+
Optimize API performance:
|
|
100
|
+
- Implement caching strategies
|
|
101
|
+
- Add response compression
|
|
102
|
+
- Optimize database queries
|
|
103
|
+
- Configure connection pooling
|
|
104
|
+
- Monitor response times
|
|
105
|
+
|
|
106
|
+
## 8. Client SDK Generation
|
|
107
|
+
|
|
108
|
+
If generating client SDKs (--sdk):
|
|
109
|
+
!find . -name "openapi.*" -o -name "swagger.*" | head -1
|
|
110
|
+
!python -c "import openapi_python_client" 2>/dev/null || npm list swagger-codegen 2>/dev/null || echo "No codegen tools available"
|
|
111
|
+
|
|
112
|
+
Generate client libraries:
|
|
113
|
+
- Create JavaScript/TypeScript SDK
|
|
114
|
+
- Generate Python client library
|
|
115
|
+
- Build Go SDK
|
|
116
|
+
- Add authentication helpers
|
|
117
|
+
- Include usage examples
|
|
118
|
+
|
|
119
|
+
## 9. Deployment and Operations
|
|
120
|
+
|
|
121
|
+
If deploying API (--deploy):
|
|
122
|
+
!find . -name "Dockerfile" -o -name "docker-compose.yml" | head -2
|
|
123
|
+
!kubectl version --client 2>/dev/null || docker --version 2>/dev/null || echo "No deployment tools available"
|
|
124
|
+
|
|
125
|
+
Deploy API services:
|
|
126
|
+
- Create containerized deployment
|
|
127
|
+
- Configure load balancing
|
|
128
|
+
- Set up health checks
|
|
129
|
+
- Add monitoring and logging
|
|
130
|
+
- Configure auto-scaling
|
|
131
|
+
|
|
132
|
+
Think step by step about API development requirements and provide:
|
|
133
|
+
|
|
134
|
+
1. **API Design Analysis**:
|
|
135
|
+
- Resource identification and relationships
|
|
136
|
+
- Endpoint structure and HTTP methods
|
|
137
|
+
- Request/response schema design
|
|
138
|
+
- Authentication and authorization requirements
|
|
139
|
+
|
|
140
|
+
2. **Implementation Strategy**:
|
|
141
|
+
- Framework selection and configuration
|
|
142
|
+
- Middleware stack implementation
|
|
143
|
+
- Database integration patterns
|
|
144
|
+
- Error handling and validation
|
|
145
|
+
|
|
146
|
+
3. **Testing Approach**:
|
|
147
|
+
- Unit testing for business logic
|
|
148
|
+
- Integration testing with dependencies
|
|
149
|
+
- Contract testing against specifications
|
|
150
|
+
- Performance and security testing
|
|
151
|
+
|
|
152
|
+
4. **Documentation and Deployment**:
|
|
153
|
+
- Interactive API documentation
|
|
154
|
+
- Client SDK generation
|
|
155
|
+
- Deployment configuration
|
|
156
|
+
- Monitoring and maintenance
|
|
157
|
+
|
|
158
|
+
Generate comprehensive API implementation with best practices, complete testing suite, and production-ready deployment configuration.
|
|
159
|
+
|
|
160
|
+
If no specific operation is provided, analyze existing API structure and suggest improvements for performance, security, and maintainability.
|
|
161
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Break complex tasks into 4-8 hour atomic units for efficient development workflow
|
|
3
|
+
tags: [planning, decomposition, estimation, dependencies, workflow]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Decompose tasks into atomic units based on the arguments provided in $ARGUMENTS.
|
|
7
|
+
|
|
8
|
+
First, examine the current project context:
|
|
9
|
+
!find . -name "*.md" | xargs grep -l "TODO\|TASK\|FEATURE" | head -5 2>/dev/null
|
|
10
|
+
!ls -la CHANGELOG.md ROADMAP.md PROJECT.md 2>/dev/null || echo "No project documentation found"
|
|
11
|
+
!git log --oneline --since="1 month ago" | head -10
|
|
12
|
+
!find . -name "*spec*" -o -name "*requirement*" | head -5 2>/dev/null
|
|
13
|
+
|
|
14
|
+
Based on $ARGUMENTS, perform the appropriate task decomposition operation:
|
|
15
|
+
|
|
16
|
+
## 1. Task Decomposition
|
|
17
|
+
|
|
18
|
+
If decomposing tasks (--decompose, --breakdown):
|
|
19
|
+
!grep -r "TODO\|FIXME\|FEATURE" . --include="*.md" --include="*.py" --include="*.js" | head -10 2>/dev/null
|
|
20
|
+
!find . -name "*.spec" -o -name "*.feature" | head -5 2>/dev/null
|
|
21
|
+
|
|
22
|
+
Break down complex tasks:
|
|
23
|
+
- Identify core functionality requirements
|
|
24
|
+
- Define clear acceptance criteria
|
|
25
|
+
- Ensure 4-8 hour completion time
|
|
26
|
+
- Create testable deliverables
|
|
27
|
+
- Establish clear boundaries
|
|
28
|
+
|
|
29
|
+
## 2. Time Estimation
|
|
30
|
+
|
|
31
|
+
If estimating time (--estimate, --sizing):
|
|
32
|
+
!git log --pretty=format:"%h %s" --since="1 month ago" | grep -E "(feat|fix|refactor)" | wc -l
|
|
33
|
+
!find . -name "*.py" -o -name "*.js" -o -name "*.ts" | xargs wc -l | tail -1
|
|
34
|
+
!git shortlog -sn --since="1 month ago" | head -5
|
|
35
|
+
|
|
36
|
+
Estimate task complexity:
|
|
37
|
+
- Analyze similar historical tasks
|
|
38
|
+
- Consider team velocity and experience
|
|
39
|
+
- Account for testing and documentation
|
|
40
|
+
- Include buffer for unexpected issues
|
|
41
|
+
- Validate against atomic time constraints
|
|
42
|
+
|
|
43
|
+
## 3. Dependency Analysis
|
|
44
|
+
|
|
45
|
+
If analyzing dependencies (--dependencies, --graph):
|
|
46
|
+
!find . -name "*.py" -o -name "*.js" -o -name "*.ts" | xargs grep -l "import\|require" | head -10
|
|
47
|
+
!find . -name "package.json" -o -name "requirements.txt" | head -2
|
|
48
|
+
!git log --graph --oneline --since="1 month ago" | head -10
|
|
49
|
+
|
|
50
|
+
Analyze task relationships:
|
|
51
|
+
- Identify prerequisite tasks
|
|
52
|
+
- Map data dependencies
|
|
53
|
+
- Find shared resource conflicts
|
|
54
|
+
- Determine integration points
|
|
55
|
+
- Create execution sequence
|
|
56
|
+
|
|
57
|
+
## 4. Parallel Execution Planning
|
|
58
|
+
|
|
59
|
+
If finding parallel tasks (--parallel, --concurrent):
|
|
60
|
+
!git branch -a | wc -l
|
|
61
|
+
!find . -name "*test*" -type d | head -5 2>/dev/null
|
|
62
|
+
!grep -r "@parallel\|@concurrent" . --include="*.py" --include="*.js" | head -5 2>/dev/null
|
|
63
|
+
|
|
64
|
+
Identify parallelizable work:
|
|
65
|
+
- Find independent task clusters
|
|
66
|
+
- Identify shared resource constraints
|
|
67
|
+
- Plan team member assignments
|
|
68
|
+
- Optimize critical path execution
|
|
69
|
+
- Minimize integration conflicts
|
|
70
|
+
|
|
71
|
+
## 5. Atomicity Validation
|
|
72
|
+
|
|
73
|
+
If validating atomicity (--validate, --verify):
|
|
74
|
+
!find . -name "*.md" | xargs grep -l "acceptance criteria\|definition of done" | head -5 2>/dev/null
|
|
75
|
+
!git log --pretty=format:"%h %s %an %ad" --date=short --since="1 month ago" | head -10
|
|
76
|
+
|
|
77
|
+
Validate task structure:
|
|
78
|
+
- Verify 4-8 hour completion target
|
|
79
|
+
- Check clear acceptance criteria
|
|
80
|
+
- Ensure testable outcomes
|
|
81
|
+
- Validate single responsibility
|
|
82
|
+
- Confirm independent execution
|
|
83
|
+
|
|
84
|
+
Think step by step about task decomposition requirements and provide:
|
|
85
|
+
|
|
86
|
+
1. **Task Analysis**:
|
|
87
|
+
- Complex task breakdown identification
|
|
88
|
+
- Scope and boundary definition
|
|
89
|
+
- Acceptance criteria specification
|
|
90
|
+
- Risk and complexity assessment
|
|
91
|
+
|
|
92
|
+
2. **Decomposition Strategy**:
|
|
93
|
+
- Atomic unit identification
|
|
94
|
+
- Logical grouping and sequencing
|
|
95
|
+
- Dependency mapping and analysis
|
|
96
|
+
- Parallel execution opportunities
|
|
97
|
+
|
|
98
|
+
3. **Estimation Framework**:
|
|
99
|
+
- Historical data analysis
|
|
100
|
+
- Complexity factor assessment
|
|
101
|
+
- Team velocity consideration
|
|
102
|
+
- Buffer and risk allocation
|
|
103
|
+
|
|
104
|
+
4. **Execution Planning**:
|
|
105
|
+
- Priority and sequence definition
|
|
106
|
+
- Resource allocation strategy
|
|
107
|
+
- Integration point identification
|
|
108
|
+
- Progress tracking methodology
|
|
109
|
+
|
|
110
|
+
Generate comprehensive task decomposition with atomic units, time estimates, dependency analysis, and execution planning.
|
|
111
|
+
|
|
112
|
+
If no specific operation is provided, perform task complexity assessment and recommend decomposition strategy based on current project state and requirements.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: AWS integration for credentials, services, and IAM testing with moto mocking
|
|
3
|
+
tags: [aws, cloud, testing, security]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Manage AWS services integration and testing based on the arguments provided in $ARGUMENTS.
|
|
7
|
+
|
|
8
|
+
First, check if this is a Python project and if AWS dependencies are available:
|
|
9
|
+
!ls -la | grep -E "(requirements.txt|pyproject.toml|setup.py)"
|
|
10
|
+
!pip list | grep -E "(boto3|moto|pytest)" 2>/dev/null || echo "Missing AWS dependencies"
|
|
11
|
+
|
|
12
|
+
Based on $ARGUMENTS, perform the appropriate AWS operation:
|
|
13
|
+
|
|
14
|
+
## 1. AWS Credentials and Configuration
|
|
15
|
+
|
|
16
|
+
If checking credentials (--credentials):
|
|
17
|
+
!aws configure list 2>/dev/null || echo "AWS CLI not configured"
|
|
18
|
+
!aws sts get-caller-identity 2>/dev/null || echo "Invalid credentials or no access"
|
|
19
|
+
|
|
20
|
+
If setting up profiles (--profiles):
|
|
21
|
+
!aws configure list-profiles 2>/dev/null
|
|
22
|
+
Show available AWS profiles and guide user through profile setup if needed.
|
|
23
|
+
|
|
24
|
+
## 2. AWS Service Testing with Moto
|
|
25
|
+
|
|
26
|
+
If setting up mocking (--mock, --mock-setup):
|
|
27
|
+
!pip install moto[all] boto3 pytest 2>/dev/null || echo "Install required: pip install moto[all] boto3 pytest"
|
|
28
|
+
|
|
29
|
+
Create mock environment setup:
|
|
30
|
+
```python
|
|
31
|
+
# Mock AWS services for testing
|
|
32
|
+
import boto3
|
|
33
|
+
from moto import mock_s3, mock_iam, mock_lambda
|
|
34
|
+
|
|
35
|
+
@mock_s3
|
|
36
|
+
def test_s3_operations():
|
|
37
|
+
s3 = boto3.client('s3', region_name='us-east-1')
|
|
38
|
+
# Add test implementations
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 3. IAM Policy Testing
|
|
42
|
+
|
|
43
|
+
If testing IAM (--test-iam, --test-policies):
|
|
44
|
+
!python -c "import boto3; print('Testing IAM policy simulation...')"
|
|
45
|
+
|
|
46
|
+
Validate IAM policies and permissions:
|
|
47
|
+
- Check policy syntax
|
|
48
|
+
- Test policy simulation
|
|
49
|
+
- Verify least privilege principles
|
|
50
|
+
|
|
51
|
+
## 4. Service Operations
|
|
52
|
+
|
|
53
|
+
For S3 operations (--s3):
|
|
54
|
+
!aws s3 ls 2>/dev/null || echo "S3 access denied or not configured"
|
|
55
|
+
|
|
56
|
+
For Lambda operations (--lambda):
|
|
57
|
+
!aws lambda list-functions --max-items 5 2>/dev/null || echo "Lambda access denied"
|
|
58
|
+
|
|
59
|
+
For DynamoDB operations (--dynamodb):
|
|
60
|
+
!aws dynamodb list-tables 2>/dev/null || echo "DynamoDB access denied"
|
|
61
|
+
|
|
62
|
+
## 5. Security Scanning
|
|
63
|
+
|
|
64
|
+
If running security scan (--security-scan):
|
|
65
|
+
!pip install checkov 2>/dev/null
|
|
66
|
+
!checkov -f terraform/ --framework terraform 2>/dev/null || echo "No Terraform files found"
|
|
67
|
+
|
|
68
|
+
Scan for:
|
|
69
|
+
- Hardcoded credentials in code
|
|
70
|
+
- Overly permissive IAM policies
|
|
71
|
+
- Unencrypted resources
|
|
72
|
+
- Public S3 buckets
|
|
73
|
+
|
|
74
|
+
Think step by step about AWS best practices and security considerations.
|
|
75
|
+
|
|
76
|
+
For integration testing (--integration-test):
|
|
77
|
+
!python -m pytest tests/test_aws*.py -v 2>/dev/null || echo "No AWS tests found"
|
|
78
|
+
|
|
79
|
+
Provide specific recommendations based on findings:
|
|
80
|
+
- Security improvements needed
|
|
81
|
+
- Cost optimization opportunities
|
|
82
|
+
- Performance enhancements
|
|
83
|
+
- Compliance gaps
|
|
84
|
+
|
|
85
|
+
If no specific operation is provided, guide the user through AWS setup and suggest next steps.
|