feat: Optimize all 18 command files using @include reference system

Major streamlining achievement:
- Eliminate 2,733 lines of duplicate content across commands
- Reduce individual command files by ~70% (130-150 → 35-60 lines)
- Leverage existing shared/*.yml reference patterns
- Maintain full Claude Code compliance

Benefits:
• Single source of truth for universal content
• Guaranteed consistency across all commands
• Dramatically reduced maintenance overhead
• Massive token efficiency improvements

Implementation:
- Universal Legend: @include shared/universal-constants.yml#Universal Legend
- Universal Flags: @include shared/flag-inheritance.yml#Universal_Always
- Command patterns: References to appropriate shared/*.yml files
- Template system: Enhanced command-patterns.yml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
NomenAK
2025-06-24 22:46:52 +02:00
parent d8727a6a07
commit 219ff3905a
20 changed files with 1127 additions and 3860 deletions

View File

@@ -1,37 +1,6 @@
# /dev-setup - Configure development environment and CI/CD
| Symbol | Meaning | | Abbrev | Meaning |
|--------|---------|---|--------|---------|
| → | leads to | | cfg | configuration |
| & | and/with | | impl | implementation |
| w/ | with | | perf | performance |
| @ | at/located | | ops | operations |
| > | greater than | | val | validation |
| ∀ | for all/every | | req | requirements |
| ∃ | exists/there is | | deps | dependencies |
| ∴ | therefore | | env | environment |
| ∵ | because | | db | database |
| ≡ | equivalent | | api | interface |
| ≈ | approximately | | docs | documentation |
| 📁 | directory/path | | std | standard |
| 🔢 | number/count | | def | default |
| 📝 | text/string | | ctx | context |
| ⚙ | setting/config | | err | error |
| 🎛 | control/flags | | exec | execution |
| 🔧 | configuration | | qual | quality |
| 📋 | group/category | | rec | recovery |
| 🚨 | critical/urgent | | sev | severity |
| ⚠ | warning/caution | | resp | response |
| 🔄 | retry/recovery | | esc | escalation |
| ✅ | success/fixed | | tok | token |
| ❌ | failure/error | | opt | optimization |
| | information | | UX | user experience |
| ⚡ | fast/quick | | UI | user interface |
| 🐌 | slow/delayed | | C | critical |
| ✨ | complete/done | | H | high |
| 📖 | read operation | | M | medium |
| ✏ | edit operation | | L | low |
| 🗑 | delete operation | | |
@include shared/universal-constants.yml#Universal_Legend
## Purpose
Configure comprehensive development environments and CI/CD pipelines based on project requirements in $ARGUMENTS.
@@ -39,213 +8,102 @@ Configure comprehensive development environments and CI/CD pipelines based on pr
## Syntax
`/dev-setup [flags] [target]`
## Universal Flags
--plan: "Show execution plan before running"
--uc: "UltraCompressed mode (~70% token reduction)"
--ultracompressed: "Alias for --uc"
--think: "Multi-file analysis w/ context (4K tokens)"
--think-hard: "Deep architectural analysis (10K tokens)"
--ultrathink: "Critical system redesign (32K tokens)"
--c7: "Enable Context7→library documentation lookup"
--seq: "Enable Sequential→complex analysis & thinking"
--magic: "Enable Magic→UI component generation"
--pup: "Enable Puppeteer→browser automation & testing"
--all-mcp: "Enable all MCP servers"
--no-mcp: "Disable all MCP servers (native tools only)"
--no-c7: "Disable Context7 specifically"
--no-seq: "Disable Sequential thinking specifically"
--no-magic: "Disable Magic UI builder specifically"
--no-pup: "Disable Puppeteer specifically"
@include shared/flag-inheritance.yml#Universal_Always
## Command-Specific Flags
Thinking flags (optional):
- --think→environment configuration & dependency analysis
- --think-hard→complex CI/CD pipelines & multi-stage builds
- --ultrathink→complete development ecosystem design
**Setup Types:**
- `--install`: Install and configure development tools (Node.js, Git, Docker, databases)
- `--ci`: Configure CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins)
- `--monitor`: Setup observability tools (logging, monitoring, error tracking)
- `--docker`: Configure Docker development environment
- `--env`: Setup environment configuration and secrets management
## Core Flags
**Development Tools:**
- `--ide`: Configure IDE settings and extensions
- `--git`: Setup Git workflows, hooks, and repository configuration
- `--deps`: Configure dependency management and security scanning
- `--testing`: Setup testing frameworks and coverage tools
- `--linting`: Configure code quality tools (ESLint, Prettier, etc.)
--type flag:
- node: Node.js/TypeScript project setup
- python: Python virtual environment & tooling
- react: React + Vite/Next.js configuration
- fullstack: Complete full-stack environment
- monorepo: Multi-package monorepo setup
**Infrastructure:**
- `--local`: Local development environment setup
- `--cloud`: Cloud development environment configuration
- `--database`: Database setup and migration tools
- `--security`: Security tools and vulnerability scanning
--ci flag:
- github: GitHub Actions workflows
- gitlab: GitLab CI/CD pipelines
- jenkins: Jenkins pipeline configuration
- circleci: CircleCI configuration
- custom: Custom CI/CD solution
--tools flag:
- Include dev tools: linters, formatters, pre-commit hooks
- Configure VS Code settings & extensions
- Setup debugging configurations
- Install recommended tooling
## Setup Components
Environment Configuration:
- Package manager setup (npm/yarn/pnpm)
- Version management (.nvmrc, .python-version)
- Environment variables & .env structure
- Docker configuration if needed
Code Quality:
- ESLint/Prettier configuration
- Pre-commit hooks (husky, lint-staged)
- Test framework setup (Jest, Pytest, etc)
- Code coverage configuration
CI/CD Pipeline:
- Build & test workflows
- Deployment configurations
- Security scanning (SAST/DAST)
- Dependency vulnerability checks
- Release automation
Development Tools:
- VS Code workspace settings
- Debug configurations
- Task runners & scripts
- Documentation generation
## Best Practices
Security:
- Never commit secrets or credentials
- Use environment variables for sensitive data
- Configure security scanning in CI
- Implement dependency vulnerability checks
Performance:
- Cache dependencies in CI
- Parallelize test execution
- Optimize build processes
- Use appropriate resource limits
Maintainability:
- Consistent tooling across team
- Clear documentation
- Automated quality checks
- Reproducible environments
## Examples
- `/dev-setup --install --docker --think` → Docker dev environment with analysis
- `/dev-setup --ci --security --think-hard` → Secure CI/CD pipeline design
- `/dev-setup --monitor --cloud --ultrathink` → Enterprise observability infrastructure
- `/dev-setup --git --testing --linting` → Complete development workflow
- `/dev-setup --env --database --local` → Local development with database
## Installation Setup (--install)
```bash
# Node.js project with GitHub Actions
/dev-setup --type node --ci github --tools
**Core Development Tools:**
- Node.js with version management (nvm/fnm)
- Git with global configuration
- Docker and Docker Compose
- Database tools (PostgreSQL, Redis)
- Package managers (npm, yarn, pnpm)
# Python project with comprehensive tooling
/dev-setup --type python --tools --think
**IDE Configuration:**
- VS Code settings and extensions
- Consistent formatting and linting
- Debugging configurations
- Integrated terminal setup
# Full-stack monorepo with GitLab CI
/dev-setup --type monorepo --ci gitlab --think-hard
**Development Scripts:**
- npm/yarn scripts for common tasks
- Pre-commit hooks for code quality
- Git hooks for automated checks
- Build and deployment scripts
## CI/CD Setup (--ci)
**Pipeline Stages:**
- **Build**: Compile, bundle, and optimize code
- **Test**: Unit, integration, and E2E testing
- **Security**: Vulnerability scanning and code analysis
- **Deploy**: Automated deployment to environments
- **Monitor**: Post-deployment verification
**Platform Configurations:**
- GitHub Actions workflows
- GitLab CI/CD pipelines
- Jenkins pipeline scripts
- Azure DevOps pipelines
**Environment Management:**
- Development, staging, production environments
- Secret management and environment variables
- Infrastructure as Code (Terraform, CloudFormation)
- Container orchestration (Kubernetes, Docker Swarm)
## Monitoring Setup (--monitor)
**Observability Stack:**
- Application performance monitoring (APM)
- Centralized logging (ELK stack, Splunk)
- Metrics collection (Prometheus, Grafana)
- Distributed tracing (Jaeger, Zipkin)
- Error tracking (Sentry, Rollbar)
**Alerting & Notifications:**
- Critical issue alerts
- Performance threshold monitoring
- Service health checks
- Deployment notifications
# React project with all quality tools
/dev-setup --type react --tools --ci github
```
## Deliverables
- **Configuration Files**: Complete development and CI/CD configurations
- **Documentation**: Setup guides, workflows, and best practices
- **Scripts**: Automation scripts for environment setup
- **Templates**: Reusable configurations for new projects
- **Security Policies**: Development security guidelines and tools
```yaml
Mandatory_Research_Flows:
External_Library_Research:
Step_1: "Identify library/framework mentioned"
Step_2: "Context7 lookup for official documentation"
Step_3: "Verify API patterns and examples"
Step_4: "Check version compatibility"
Step_5: "Document findings in implementation"
Pattern_Research:
Step_1: "Search existing codebase for similar patterns"
Step_2: "Magic component search if UI-related"
Step_3: "WebSearch for official documentation"
Step_4: "Validate approach with Sequential thinking"
Step_5: "Document pattern choice rationale"
API_Integration_Research:
Step_1: "Official documentation lookup"
Step_2: "Authentication requirements"
Step_3: "Rate limiting and error handling"
Step_4: "SDK availability and examples"
Step_5: "Integration testing approach"
```
```yaml
Standard_Notifications:
Operation_Start: "▶ Starting {operation}"
Operation_Complete: "✅ {operation} completed successfully"
File_Created: "📝 Created: {file_path}"
File_Updated: "✏ Updated: {file_path}"
Report_Generated: "📄 Report saved to: {path}"
Error_Occurred: "❌ {operation} failed: {reason}"
Warning_Issued: "⚠ {warning_message}"
Info_Message: " {information}"
Output_Notifications:
Success_Format: "✅ {operation} completed in {duration}"
Error_Format: "❌ {operation} failed: {error_details}"
Warning_Format: "⚠ {warning}: {details}"
Info_Format: " {message}"
Progress_Format: "🔄 {operation}: {current}/{total} ({percentage}%)"
```
## Best Practices & Security
**Security First:**
- Secure secret management (never commit secrets)
- Vulnerability scanning in CI/CD
- Code analysis and security linting
- Environment isolation and access controls
- Regular security updates and patches
**Development Standards:**
- Consistent code formatting and linting
- Automated testing at all levels
- Git workflow with protected branches
- Code review requirements
- Documentation standards
**Performance & Reliability:**
- Fast feedback loops in CI/CD
- Efficient caching strategies
- Parallel execution where possible
- Robust error handling and recovery
- Monitoring and observability from day one
## Environment-Specific Configurations
**Local Development:**
- Hot reload and fast refresh
- Local database and service mocking
- Debug-friendly configurations
- Offline-first development tools
**CI/CD Environments:**
- Optimized build times
- Comprehensive testing suites
- Security scanning integration
- Automated deployment gates
**Production Monitoring:**
- Real-time performance metrics
- Error tracking and alerting
- Log aggregation and analysis
- User experience monitoring
## Troubleshooting
- **Installation Issues**: Check system requirements and permissions
- **CI/CD Failures**: Review pipeline logs and dependency conflicts
- **Environment Conflicts**: Use containerization for consistency
- **Complex Setups**: Use `--think-hard` for architectural planning
## Success Messages
✅ {operation} completed successfully
📝 Created: {file_path}
✏ Updated: {file_path}
✨ Task completed: {task_title}
- Complete environment configuration files
- CI/CD pipeline definitions
- Development tool configurations
- Setup documentation & README updates
- Scripts for common development tasks