From d04beca008bee0c29ecc4669ed64be93b950b4bd Mon Sep 17 00:00:00 2001 From: NomenAK Date: Mon, 14 Jul 2025 20:16:57 +0200 Subject: [PATCH] feat: add /sc:implement command and fix documentation consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - NEW COMMAND: /sc:implement for feature and code implementation - Addresses v2 user feedback about /build command functionality change - Updates command count from 15 to 16 across all documentation - Adds comprehensive implementation examples and auto-activation patterns - Includes v2 migration guidance for smooth upgrade path - Fixes numerical inconsistencies in commands-guide.md, CHANGELOG.md, installation-guide.md 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CHANGELOG.md | 3 +- Docs/commands-guide.md | 58 +++++++++++++++++++++++++++++-- Docs/installation-guide.md | 4 +-- Docs/superclaude-user-guide.md | 14 ++++---- README.md | 21 +++++++---- SuperClaude/Commands/implement.md | 54 ++++++++++++++++++++++++++++ SuperClaude/Core/COMMANDS.md | 19 ++++++++-- SuperClaude/Core/ORCHESTRATOR.md | 15 ++++++-- 8 files changed, 164 insertions(+), 24 deletions(-) create mode 100644 SuperClaude/Commands/implement.md diff --git a/CHANGELOG.md b/CHANGELOG.md index a3eda37..cee388e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - **BREAKING**: Commands now use `/sc:` namespace to avoid conflicts with user custom commands - Commands are now installed in `~/.claude/commands/sc/` subdirectory -- All 15 commands updated: `/analyze` `/sc:analyze`, `/build` `/sc:build`, etc. +- All 16 commands updated: `/analyze` � `/sc:analyze`, `/build` � `/sc:build`, etc. - Automatic migration from old command locations to new `sc/` subdirectory ### Added +- **NEW COMMAND**: `/sc:implement` for feature and code implementation (addresses v2 user feedback) - Migration logic to move existing commands to new namespace automatically - Enhanced uninstaller to handle both old and new command locations - Improved command conflict prevention diff --git a/Docs/commands-guide.md b/Docs/commands-guide.md index 7983253..d6e968e 100644 --- a/Docs/commands-guide.md +++ b/Docs/commands-guide.md @@ -2,7 +2,7 @@ ## 💡 Don't Overthink It - SuperClaude Tries to Help -**The truth about these 15 commands**: You don't need to memorize them. Just start with `/sc:analyze` or `/sc:build` and see what happens! +**The truth about these 16 commands**: You don't need to memorize them. Just start with `/sc:analyze` or `/sc:implement` and see what happens! **Here's how it usually works:** - Type `/` in Claude Code → See available commands @@ -20,6 +20,7 @@ ```bash /sc:help # See what's available /sc:analyze src/ # Tries to analyze your code smartly +/sc:implement user-auth # Creates features and components (replaces v2 /build) /sc:build # Attempts intelligent project building /sc:improve messy-file.js # Tries to clean up code /sc:troubleshoot "error" # Attempts to help with problems @@ -29,7 +30,7 @@ --- -A practical guide to all 15 SuperClaude slash commands. We'll be honest about what works well and what's still rough around the edges. +A practical guide to all 16 SuperClaude slash commands. We'll be honest about what works well and what's still rough around the edges. ## Quick Reference 📋 @@ -39,6 +40,7 @@ A practical guide to all 15 SuperClaude slash commands. We'll be honest about wh |---------|---------|-----------------|----------| | `/sc:analyze` | Smart code analysis | Security/performance experts | Finding issues, understanding codebases | | `/sc:build` | Intelligent building | Frontend/backend specialists | Compilation, bundling, deployment prep | +| `/sc:implement` | Feature implementation | Domain-specific experts | Creating features, components, APIs, services | | `/sc:improve` | Automatic code cleanup | Quality experts | Refactoring, optimization, quality fixes | | `/sc:troubleshoot` | Problem investigation | Debug specialists | Debugging, issue investigation | | `/sc:test` | Smart testing | QA experts | Running tests, coverage analysis | @@ -57,6 +59,56 @@ A practical guide to all 15 SuperClaude slash commands. We'll be honest about wh ## Development Commands 🔨 +### `/implement` - Feature Implementation +**What it does**: Implements features, components, and functionality with intelligent expert activation. + +**The helpful part**: SuperClaude auto-activates the right experts (frontend, backend, security) and tools based on what you're implementing! 🎯 + +**When to use it**: +- Creating new features or components (replaces v2's `/build` functionality) +- Implementing APIs, services, or modules +- Building UI components with modern frameworks +- Developing business logic and integrations + +**Basic syntax**: +```bash +/sc:implement user authentication system # Implement complete feature +/sc:implement --type component LoginForm # Create specific component +/sc:implement --type api user-management # Build API endpoints +/sc:implement --framework react dashboard # Framework-specific implementation +``` + +**Useful flags**: +- `--type component|api|service|feature|module` - Implementation type +- `--framework react|vue|express|django|etc` - Target framework +- `--safe` - Conservative implementation approach +- `--iterative` - Step-by-step development with validation +- `--with-tests` - Include test implementation +- `--documentation` - Generate docs alongside code + +**Real examples**: +```bash +/sc:implement user authentication --type feature --with-tests +/sc:implement dashboard component --type component --framework react +/sc:implement REST API for orders --type api --safe +/sc:implement payment processing --type service --iterative +/sc:implement search functionality --framework vue --documentation +``` + +**Auto-activation patterns**: +- **Frontend**: UI components, React/Vue/Angular → frontend persona + Magic MCP +- **Backend**: APIs, services, databases → backend persona + Context7 +- **Security**: Auth, payments, sensitive data → security persona + validation +- **Complex features**: Multi-step implementations → Sequential MCP + architect persona + +**Gotchas**: +- Specify `--type` for better results (component vs service vs feature) +- Use `--framework` when working with specific tech stacks +- Try `--safe` for production code or `--iterative` for complex features +- Remember: this replaces v2's `/build` for actual code implementation + +--- + ### `/build` - Project Building **What it does**: Builds, compiles, and packages projects with smart error handling. @@ -552,7 +604,7 @@ A practical guide to all 15 SuperClaude slash commands. We'll be honest about wh **Gotchas**: - Simple but useful for discovery -- Better than trying to remember all 15 commands +- Better than trying to remember all 16 commands --- diff --git a/Docs/installation-guide.md b/Docs/installation-guide.md index 914f8a1..e24fb89 100644 --- a/Docs/installation-guide.md +++ b/Docs/installation-guide.md @@ -64,7 +64,7 @@ python3 SuperClaude.py install --quick ``` **What you just got:** -- ✅ All 15 smart commands that auto-activate experts +- ✅ All 16 smart commands that auto-activate experts - ✅ 11 specialist personas that know when to help - ✅ Intelligent routing that figures out complexity for you - ✅ About 2 minutes of your time and ~50MB disk space @@ -94,7 +94,7 @@ python3 SuperClaude.py install --minimal ```bash python3 SuperClaude.py install --quick ``` -- **What**: Core framework + 15 slash commands +- **What**: Core framework + 16 slash commands - **Time**: ~2 minutes - **Space**: ~50MB - **Good for**: Most users, general development diff --git a/Docs/superclaude-user-guide.md b/Docs/superclaude-user-guide.md index 27b8cd8..88b7f4f 100644 --- a/Docs/superclaude-user-guide.md +++ b/Docs/superclaude-user-guide.md @@ -48,7 +48,8 @@ A comprehensive guide to understanding and using SuperClaude v3.0 effectively. B # Try these commands in Claude Code: /sc:help # See what's available /sc:analyze README.md # SuperClaude analyzes your project -/sc:build # Smart build with auto-optimization +/sc:implement user-auth # Create features and components (NEW in v3!) +/sc:build # Smart build with auto-optimization /sc:improve messy-file.js # Clean up code automatically ``` @@ -76,12 +77,13 @@ SuperClaude makes Claude Code smarter for development work. Instead of generic r ### What SuperClaude Adds ✨ -**🛠️ 15 Specialized Commands** *(that auto-activate intelligently)* -- Development tools: `/build`, `/design` +**🛠️ 16 Specialized Commands** *(that auto-activate intelligently)* +- Development tools: `/implement`, `/build`, `/design` - Analysis tools: `/analyze`, `/troubleshoot`, `/explain` - Quality tools: `/improve`, `/cleanup`, `/test` - Plus utilities for documentation, git, deployment, and more -- **You just use them** - SuperClaude handles the complexity automatically +- **You just use them** - SuperClaude handles the complexity automatically +- **NEW**: `/implement` command for feature creation (restores v2 functionality) **🎭 11 Smart Personas** *(that know when to jump in)* - AI specialists that adapt behavior for different domains @@ -113,7 +115,7 @@ SuperClaude makes Claude Code smarter for development work. Instead of generic r **✅ What's Working Well:** - Installation system (completely rewritten, much more reliable) -- Core framework with 15 commands and 11 personas +- Core framework with 16 commands and 11 personas - MCP server integration (mostly working) - Basic task management and workflow automation - Documentation and user guides @@ -2746,7 +2748,7 @@ SuperClaude v3.0 is fresh out of beta, and we're honest about what that means: i - Will return in v4 with improved reliability and simpler configuration **Some Advanced Commands** -- Consolidated 20+ commands down to 15 essential ones +- Consolidated 20+ commands down to 16 essential ones - Removed experimental commands that weren't stable enough - Focus on making core commands excellent rather than having many mediocre ones diff --git a/README.md b/README.md index 796b8ce..47249e8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A framework that extends Claude Code with specialized commands, personas, and MC ## What is SuperClaude? 🤔 SuperClaude tries to make Claude Code more helpful for development work by adding: -- 🛠️ **15 specialized commands** for common dev tasks (some work better than others!) +- 🛠️ **16 specialized commands** for common dev tasks (some work better than others!) - 🎭 **Smart personas** that usually pick the right expert for different domains - 🔧 **MCP server integration** for docs, UI components, and browser automation - 📋 **Task management** that tries to keep track of progress @@ -25,7 +25,7 @@ This is what we've been building to make development workflows smoother. Still r ✅ **What's Working Well:** - Installation suite (rewritten from the ground up) - Core framework with 9 documentation files -- 15 slash commands for various development tasks +- 16 slash commands for various development tasks - MCP server integration (Context7, Sequential, Magic, Playwright) - Unified CLI installer for easy setup @@ -38,9 +38,9 @@ This is what we've been building to make development workflows smoother. Still r ## Key Features ✨ ### Commands 🛠️ -We focused on 15 essential commands for the most common tasks: +We focused on 16 essential commands for the most common tasks: -**Development**: `/sc:build`, `/sc:design` +**Development**: `/sc:implement`, `/sc:build`, `/sc:design` **Analysis**: `/sc:analyze`, `/sc:troubleshoot`, `/sc:explain` **Quality**: `/sc:improve`, `/sc:test`, `/sc:cleanup` **Others**: `/sc:document`, `/sc:git`, `/sc:estimate`, `/sc:task`, `/sc:index`, `/sc:load`, `/sc:spawn` @@ -80,6 +80,13 @@ If you're coming from SuperClaude v2, you'll need to clean up first: This is because v3 has a different structure and the old files can cause conflicts. +### 🔄 **Key Change for v2 Users** +**The `/build` command changed!** In v2, `/build` was used for feature implementation. In v3: +- `/sc:build` = compilation/packaging only +- `/sc:implement` = feature implementation (NEW!) + +**Migration**: Replace `v2 /build myFeature` with `v3 /sc:implement myFeature` + ## Installation 📦 ### Quick Start @@ -128,7 +135,7 @@ The installer handles everything: framework files, MCP servers, and Claude Code SuperClaude tries to enhance Claude Code through: 1. **Framework Files** - Documentation installed to `~/.claude/` that guides how Claude responds -2. **Slash Commands** - 15 specialized commands for different dev tasks +2. **Slash Commands** - 16 specialized commands for different dev tasks 3. **MCP Servers** - External services that add extra capabilities (when they work!) 4. **Smart Routing** - Attempts to pick the right tools and experts based on what you're doing @@ -158,7 +165,7 @@ Most users probably won't need to change anything - it usually works okay out of Want to learn more? Check out our guides: - 📚 [**User Guide**](Docs/superclaude-user-guide.md) - Complete overview and getting started -- 🛠️ [**Commands Guide**](Docs/commands-guide.md) - All 15 slash commands explained +- 🛠️ [**Commands Guide**](Docs/commands-guide.md) - All 16 slash commands explained - 🏳️ [**Flags Guide**](Docs/flags-guide.md) - Command flags and options - 🎭 [**Personas Guide**](Docs/personas-guide.md) - Understanding the persona system - 📦 [**Installation Guide**](Docs/installation-guide.md) - Detailed installation instructions @@ -182,7 +189,7 @@ SuperClaude/ ├── SuperClaude.py # Main installer CLI ├── SuperClaude/ # Framework files │ ├── Core/ # Behavior documentation (COMMANDS.md, FLAGS.md, etc.) -│ ├── Commands/ # 15 slash command definitions +│ ├── Commands/ # 16 slash command definitions │ └── Settings/ # Configuration files ├── setup/ # Installation system └── profiles/ # Installation profiles (quick, minimal, developer) diff --git a/SuperClaude/Commands/implement.md b/SuperClaude/Commands/implement.md new file mode 100644 index 0000000..45b478f --- /dev/null +++ b/SuperClaude/Commands/implement.md @@ -0,0 +1,54 @@ +--- +allowed-tools: [Read, Write, Edit, MultiEdit, Bash, Glob, TodoWrite, Task] +description: "Feature and code implementation with intelligent persona activation and MCP integration" +--- + +# /sc:implement - Feature Implementation + +## Purpose +Implement features, components, and code functionality with intelligent expert activation and comprehensive development support. + +## Usage +``` +/sc:implement [feature-description] [--type component|api|service|feature] [--framework react|vue|express|etc] [--safe] +``` + +## Arguments +- `feature-description` - Description of what to implement +- `--type` - Implementation type (component, api, service, feature, module) +- `--framework` - Target framework or technology stack +- `--safe` - Use conservative implementation approach +- `--iterative` - Enable iterative development with validation steps +- `--with-tests` - Include test implementation +- `--documentation` - Generate documentation alongside implementation + +## Execution +1. Analyze implementation requirements and detect technology context +2. Auto-activate relevant personas (frontend, backend, security, etc.) +3. Coordinate with MCP servers (Magic for UI, Context7 for patterns, Sequential for complex logic) +4. Generate implementation code with best practices +5. Apply security and quality validation +6. Provide testing recommendations and next steps + +## Claude Code Integration +- Uses Write/Edit/MultiEdit for code generation and modification +- Leverages Read and Glob for codebase analysis and context understanding +- Applies TodoWrite for implementation progress tracking +- Integrates Task tool for complex multi-step implementations +- Coordinates with MCP servers for specialized functionality +- Auto-activates appropriate personas based on implementation type + +## Auto-Activation Patterns +- **Frontend**: UI components, React/Vue/Angular development +- **Backend**: APIs, services, database integration +- **Security**: Authentication, authorization, data protection +- **Architecture**: System design, module structure +- **Performance**: Optimization, scalability considerations + +## Examples +``` +/sc:implement user authentication system --type feature --with-tests +/sc:implement dashboard component --type component --framework react +/sc:implement REST API for user management --type api --safe +/sc:implement payment processing service --type service --iterative +``` \ No newline at end of file diff --git a/SuperClaude/Core/COMMANDS.md b/SuperClaude/Core/COMMANDS.md index 8edf28c..2cc4251 100644 --- a/SuperClaude/Core/COMMANDS.md +++ b/SuperClaude/Core/COMMANDS.md @@ -59,6 +59,21 @@ performance-profile: "optimization" - **Tool Orchestration**: [Read, Grep, Glob, Bash, TodoWrite, Edit, MultiEdit] - **Arguments**: `[target]`, `@`, `!`, `--` +**`/implement $ARGUMENTS`** +```yaml +--- +command: "/implement" +category: "Development & Implementation" +purpose: "Feature and code implementation with intelligent persona activation" +wave-enabled: true +performance-profile: "standard" +--- +``` +- **Auto-Persona**: Frontend, Backend, Architect, Security (context-dependent) +- **MCP Integration**: Magic (UI components), Context7 (patterns), Sequential (complex logic) +- **Tool Orchestration**: [Read, Write, Edit, MultiEdit, Bash, Glob, TodoWrite, Task] +- **Arguments**: `[feature-description]`, `--type component|api|service|feature`, `--framework `, `--` + **`/dev-setup $ARGUMENTS`** - **Purpose**: Development environment configuration - **Category**: Development & Infrastructure @@ -174,7 +189,7 @@ complex: "Resource-intensive with comprehensive analysis" ``` ### Command Categories -- **Development**: build, dev-setup, design +- **Development**: build, implement, dev-setup, design - **Analysis**: analyze, troubleshoot, explain, review - **Quality**: improve, scan, cleanup - **Testing**: test @@ -186,5 +201,5 @@ complex: "Resource-intensive with comprehensive analysis" - **Meta**: index, loop, spawn ### Wave-Enabled Commands -8 commands: `/analyze`, `/build`, `/design`, `/improve`, `/review`, `/scan`, `/task` +9 commands: `/analyze`, `/build`, `/design`, `/implement`, `/improve`, `/review`, `/scan`, `/task` diff --git a/SuperClaude/Core/ORCHESTRATOR.md b/SuperClaude/Core/ORCHESTRATOR.md index 5b7f37d..0800fd7 100644 --- a/SuperClaude/Core/ORCHESTRATOR.md +++ b/SuperClaude/Core/ORCHESTRATOR.md @@ -72,12 +72,12 @@ complex: #### Domain Identification ```yaml frontend: - keywords: [UI, component, React, Vue, CSS, responsive, accessibility] + keywords: [UI, component, React, Vue, CSS, responsive, accessibility, implement component, build UI] file_patterns: ["*.jsx", "*.tsx", "*.vue", "*.css", "*.scss"] - typical_operations: [create, style, optimize, test] + typical_operations: [create, implement, style, optimize, test] backend: - keywords: [API, database, server, endpoint, authentication, performance] + keywords: [API, database, server, endpoint, authentication, performance, implement API, build service] file_patterns: ["*.js", "*.ts", "*.py", "*.go", "controllers/*", "models/*"] typical_operations: [implement, optimize, secure, scale] @@ -121,6 +121,11 @@ creation: outputs: [new files, features, components] typical_tools: [Write, Magic, Context7] +implementation: + verbs: [implement, develop, code, construct, realize] + outputs: [working features, functional code, integrated components] + typical_tools: [Write, Edit, MultiEdit, Magic, Context7, Sequential] + modification: verbs: [update, refactor, improve, optimize, fix] outputs: [edited files, improvements] @@ -193,6 +198,10 @@ wave-strategies: |---------|------------|---------|----------------|------------| | "analyze architecture" | complex | infrastructure | architect persona, --ultrathink, Sequential | 95% | | "create component" | simple | frontend | frontend persona, Magic, --uc | 90% | +| "implement feature" | moderate | any | domain-specific persona, Context7, Sequential | 88% | +| "implement API" | moderate | backend | backend persona, --seq, Context7 | 92% | +| "implement UI component" | simple | frontend | frontend persona, Magic, --c7 | 94% | +| "implement authentication" | complex | security | security persona, backend persona, --validate | 90% | | "fix bug" | moderate | any | analyzer persona, --think, Sequential | 85% | | "optimize performance" | complex | backend | performance persona, --think-hard, Playwright | 90% | | "security audit" | complex | security | security persona, --ultrathink, Sequential | 95% |