9.6 KiB
Commands Explorer
Meta
- Version: 1.0
- Category: development-tooling
- Complexity: moderate
- Purpose: Interactive command ecosystem exploration and management
Definition
Purpose: Provides an interactive environment for exploring, understanding, modifying, and creating commands within the .claude/commands/ directory. Enables comprehensive command ecosystem management with guided workflows.
Syntax: /sdd:commands-explorer [query]
Parameters
| Parameter | Type | Required | Default | Description | Validation |
|---|---|---|---|---|---|
| query | string | No | - | Optional natural language query about commands | Free-form text |
Capabilities
The Commands Explorer provides five primary capabilities:
1. Examine Commands
Purpose: Inspect and analyze existing command documentation
Example Queries:
- "Show me the details of
/sdd:story-new" - "What does
/sdd:project-statusactually do?" - "Compare
/sdd:story-reviewand/sdd:story-qa"
Process:
- LOCATE the requested command file(s)
- READ complete command documentation
- EXTRACT key sections (purpose, parameters, behavior)
- PRESENT structured analysis
- IDENTIFY related commands
2. Modify Existing Commands
Purpose: Update and enhance existing command functionality
Example Queries:
- "Update
/sdd:story-implementto include automated testing" - "Add error handling to
/sdd:story-ship" - "Enhance
/sdd:project-statuswith git branch info"
Process:
- READ existing command documentation
- IDENTIFY sections requiring modification
- PROPOSE changes with clear rationale
- PRESERVE existing command structure
- UPDATE command file with enhancements
- VALIDATE syntax and completeness
3. Create New Commands
Purpose: Generate new commands following project conventions
Example Queries:
- "Create a
/sdd:story-debugcommand for troubleshooting" - "Add a
/sdd:story-backupcommand to save work in progress" - "Build a
/sdd:project-cleanupcommand for maintenance"
Process:
- GATHER requirements from user query
- DETERMINE command category (project/story/utility)
- SELECT appropriate naming convention
- GENERATE command structure:
- Command name and description
- Usage patterns
- Parameter definitions
- Behavioral specifications
- Examples and prerequisites
- CREATE command file in
.claude/commands/ - INTEGRATE with existing workflow patterns
4. Optimize Workflows
Purpose: Streamline and improve command usage patterns
Example Queries:
- "Streamline the review process workflow"
- "Add shortcuts for common command sequences"
- "Create aliases for frequently used commands"
Process:
- ANALYZE current workflow patterns
- IDENTIFY bottlenecks or repetitive sequences
- PROPOSE optimization strategies
- IMPLEMENT workflow improvements
- UPDATE related command documentation
5. Analyze Dependencies
Purpose: Map command relationships and requirements
Example Queries:
- "What commands depend on git being clean?"
- "Which commands modify the filesystem?"
- "Show me commands that require manual input"
Process:
- SCAN all command files
- EXTRACT dependency information
- MAP command relationships
- CATEGORIZE by dependency type
- PRESENT structured analysis
Command Categories
The system automatically categorizes commands into logical groups:
Project Management Commands
Purpose: Project-wide operations and initialization
project-brief.md- Project overview and brief generationproject-context-update.md- Update project context and documentationproject-init.md- Initialize new project structureproject-status.md- Check overall project statusproject-stories.md- Manage project stories and workflow
Story Workflow Commands
Purpose: Core story-driven development lifecycle
story-new.md- Create new storystory-start.md- Begin working on a storystory-continue.md- Resume work on current storystory-implement.md- Implement story requirementsstory-review.md- Review story implementationstory-qa.md- Quality assurance validationstory-ship.md- Ship completed storystory-complete.md- Mark story as complete
Story Management Commands
Purpose: Story state and lifecycle management
story-status.md- Check current story statusstory-next.md- Move to next story in workflowstory-save.md- Save current story progressstory-document.md- Document story detailsstory-validate.md- Validate story implementationstory-rollback.md- Rollback story changesstory-blocked.md- Mark story as blocked
Development Support Commands
Purpose: Code quality and technical operations
story-refactor.md- Refactor existing codestory-tech-debt.md- Address technical debtstory-test-integration.md- Integration testing workflowsstory-patterns.md- Code patterns and standardsstory-metrics.md- Development metrics tracking
Utility Commands
Purpose: Development tooling and checks
story-quick-check.md- Quick health checksstory-full-check.md- Comprehensive validationstory-timebox.md- Time management utilitiesstory-today.md- Daily development planning
Common Workflows
Starting New Work
/sdd:story-new → /sdd:story-start → /sdd:story-implement
Review & Ship
/sdd:story-review → /sdd:story-qa → /sdd:story-ship → /sdd:story-complete
Project Management
/sdd:project-status → /sdd:project-stories → /sdd:story-next
Command Modification Guidelines
When modifying or creating commands through the explorer:
Standard Command Structure
# Command Name
Brief description of what the command does.
## Usage
How to use the command and when to use it.
## What it does
Detailed steps the command performs.
## Prerequisites (if any)
What needs to be in place before running.
## Examples
Practical usage examples.
Naming Conventions
- Project commands:
project-*- Project-wide operations - Story commands:
story-*- Story-specific operations - Utility commands: Descriptive names for general utilities
Integration Requirements
- MUST integrate with existing workflows
- SHOULD consider git state requirements
- MUST document dependencies on other commands
- SHOULD maintain consistency with project patterns
Interactive Session Features
When Commands Explorer is invoked, it establishes:
- Command Discovery: Comprehensive catalogue of all commands
- Workflow Understanding: Mapped command relationships and sequences
- Quick Access: Identified common command patterns
- Documentation Access: Full command documentation available
- Interactive Modification: Complete editing capabilities
- Pattern Consistency: Guided creation following standards
Rules
Command Management
- MUST preserve existing command functionality when modifying
- NEVER remove critical command sections without explicit approval
- SHOULD suggest improvements based on command best practices
- MUST maintain consistent formatting across all commands
- SHOULD validate command syntax before saving
File Operations
- MUST use
.claude/commands/directory for all commands - SHOULD create backups before modifying existing commands
- MUST follow markdown naming convention:
command-name.md - NEVER overwrite commands without confirmation
Documentation Standards
- MUST include purpose and usage for all commands
- SHOULD provide multiple examples for complex commands
- MUST document all parameters with types and defaults
- SHOULD explain command relationships and dependencies
- MUST maintain accurate category assignments
Usage Examples
Example 1: Examine a Command
User: "Show me how /sdd:story-new works"
Response:
[Reads story-new.md]
[Presents structured analysis]
━━━━━━━━━━━━━━━━━━━━━━━━
Command: /sdd:story-new
Category: Story Workflow
Purpose: Create new story in development workflow
[... detailed breakdown ...]
Example 2: Create New Command
User: "Create a /sdd:story-debug command for troubleshooting"
Response:
[Gathers requirements]
[Generates command structure]
[Creates story-debug.md with proper format]
✅ Created: /sdd:story-debug
Category: Development Support
Location: .claude/commands/sdd:story-debug.md
Example 3: Analyze Dependencies
User: "Which commands modify the filesystem?"
Response:
Commands that modify the filesystem:
━━━━━━━━━━━━━━━━━━━━━━━━
1. /sdd:story-new - Creates story files
2. /sdd:story-save - Writes progress snapshots
3. /sdd:story-ship - Moves files between directories
4. /sdd:project-init - Creates project structure
[... complete analysis ...]
Getting Started
Quick Start Queries:
- "Show me how
/sdd:story-newworks" - "Create a new command for X"
- "Modify
/sdd:story-implementto do Y" - "What's the difference between review and QA commands?"
- "List all commands that create files"
Notes
- All commands are stored as markdown files in
.claude/commands/ - Command files use kebab-case naming:
command-name.md - Commands are designed to work together in story-driven workflows
- The explorer maintains command ecosystem consistency
- Interactive mode allows natural language queries
- Command modifications follow existing project conventions
Related Commands
/sdd:command-optimise- Optimize command documentation format/sdd:project-status- View overall project and command status/sdd:story-patterns- Understand coding patterns (similar to command patterns)