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,35 +1,4 @@
| 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
## Command Execution
Execute: immediate. --plan→show plan first
@@ -38,23 +7,7 @@ Purpose: "[Action][Subject] in $ARGUMENTS"
Build project/feature based on req in $ARGUMENTS.
## 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
Examples:
- `/build --react --magic` - React app w/ UI gen
@@ -78,81 +31,8 @@ Templates:
**--watch:** Continuous build | Real-time feedback | Incremental | Live reload
**--interactive:** Step-by-step cfg | Interactive deps | Build customization
@include shared/research-patterns.yml#Mandatory_Research_Flows
```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"
```
@include shared/execution-patterns.yml#Git_Integration_Patterns
```yaml
Git_Workflows:
Auto_Safety_Checks:
Before_Commit:
- "git status → Verify intended files"
- "git diff --staged → Review changes"
- "Run tests if available"
- "Check for secrets/credentials"
Before_Push:
- "Verify target branch & remote"
- "Check for force push implications"
- "Ensure CI/CD readiness"
Before_Merge:
- "Test for conflicts"
- "Verify branch policies"
- "Check approval requirements"
Commit_Standards:
Format: "{type}: {description}\n\n{body}\n\n🤖 Generated with [Claude Code]\n\nCo-Authored-By: Claude"
Types: ["feat", "fix", "docs", "style", "refactor", "test", "chore"]
Validation:
- "Type matches change nature"
- "Description < 50 chars"
- "Body explains why, not what"
Branch_Management:
Strategy:
Feature: "feature/{description}"
Bugfix: "bugfix/{description}"
Release: "release/{version}"
Hotfix: "hotfix/{description}"
Protection:
Main: "No direct push, PR required"
Release: "Admin approval required"
Feature: "Auto-delete after merge"
Conflict_Resolution:
Detection: "Auto-detect during pull/merge"
Strategies:
Simple: "Auto-resolve if non-overlapping"
Complex: "Interactive 3-way merge"
Binary: "Choose version explicitly"
Recovery:
Abort: "git merge --abort → restore state"
Stash: "git stash → try different approach"
Branch: "Create conflict-resolution branch"
```
## Success Messages
✅ {operation} completed successfully
📝 Created: {file_path}
✏ Updated: {file_path}
✨ Task completed: {task_title}
@include shared/universal-constants.yml#Success_Messages