---
name: commands-index
description: Complete reference for all development automation commands. Each command is interactive, action-oriented, and self-verifying.
---

# Commands Index

Complete reference for all development automation commands. Each command is interactive, action-oriented, and self-verifying.

## 🎯 Core Orchestration

### `/project-orchestrator`

**Purpose**: Complete project automation from requirements to deployment
**Process**: Interactive Q&A → Implementation → Testing → Deployment
**Use when**: Starting new features or major changes

## 📋 Planning & Requirements

### `/gather-requirements`

**Purpose**: Interactive requirements gathering with validation
**Process**: 30 structured questions → Technical spec → Implementation plan
**Use when**: Beginning any new feature or enhancement

### `/write-code`

**Purpose**: Generate new code and implement fixes
**Process**: Understand requirements → Generate implementation → Integrate → Verify
**Use when**: Creating new features or implementing suggested fixes

### `/generate-tests` (also `/write-tests`)

**Purpose**: Automatic test generation with full coverage
**Process**: Analyze code → Generate tests → Run → Fix failures
**Use when**: After writing new code or before deployment

## 🔧 Development & Quality

### `/auto-fix`

**Purpose**: Automatically fix all code issues
**Process**: Detect problems → Apply fixes → Verify → Repeat until clean
**Use when**: Before commits, after merges, or when builds fail

### `/code-review`

**Purpose**: Automated code review with fixes
**Process**: Analyze code → Identify issues → Suggest fixes → Apply changes
**Use when**: Before PRs or after completing features

### `/refactor-suggestions`

**Purpose**: Improve code quality and maintainability
**Process**: Identify patterns → Suggest improvements → Refactor → Verify
**Use when**: Code feels messy or complex

### `/trial-period-verification-orchestrator`

**Purpose**: End-to-end verification of the 14-day trial change across core logic, content, and quality gates
**Process**: Core config checks → content audit → lint/tsc/search verification
**Use when**: Auditing 7→14 day trial updates or preparing a validation report

### `/trial-period-core-verifier`

**Purpose**: Verify Stripe trial period logic, pricing constants, and test expectations
**Process**: Inspect core files → confirm 14-day values → check tests
**Use when**: Ensuring trial period logic is correct

### `/trial-period-content-auditor`

**Purpose**: Audit English/Arabic free-trial copy for canonical phrasing and bilingual consistency
**Process**: Scan UI pages → verify phrases → flag variants
**Use when**: Validating user-facing trial copy

### `/trial-period-quality-checker`

**Purpose**: Run lint/typecheck/search checks for trial-period changes and counts
**Process**: Lint → typecheck → search for 7-day references → count 14-day occurrences
**Use when**: Final validation before sign-off

## 🔒 Security & Performance

### `/security-audit`

**Purpose**: Find and fix security vulnerabilities
**Process**: Scan code → Identify risks → Apply patches → Verify security
**Use when**: Before deployment or after adding auth features

### `/performance-optimizer`

**Purpose**: Optimize speed and resource usage
**Process**: Profile → Identify bottlenecks → Optimize → Benchmark
**Use when**: App feels slow or uses too much memory

## 🚀 Deployment & Operations

### `/deployment-validator`

**Purpose**: Ensure safe, zero-downtime deployments
**Process**: Pre-checks → Deploy → Monitor → Rollback if needed
**Use when**: Releasing to production

### `/dependency-manager`

**Purpose**: Update and manage package dependencies
**Process**: Check outdated → Test updates → Apply → Verify compatibility
**Use when**: Monthly or when security updates available

### `/error-analyzer`

**Purpose**: Debug and fix production errors
**Process**: Collect errors → Analyze patterns → Fix → Deploy patches
**Use when**: Users report issues or error monitoring alerts

## 📚 Documentation & API

### `/api-documenter`

**Purpose**: Generate and maintain API documentation
**Process**: Scan endpoints → Generate docs → Add examples → Publish
**Use when**: After API changes or for new integrations

### `/generate-docs`

**Purpose**: Create comprehensive documentation
**Process**: Analyze code → Generate docs → Add examples → Format
**Use when**: Before release or for onboarding

## 🔄 Git & Workflow

### `/git-workflow`

**Purpose**: Manage git operations and branching
**Process**: Create branch → Commit → Review → Merge → Tag
**Use when**: Starting new work or managing releases

### `/pr-assistant`

**Purpose**: Create and manage pull requests
**Process**: Prepare changes → Create PR → Address feedback → Merge
**Use when**: Code ready for review

### `/merge-assistant`

**Purpose**: Handle complex merges and conflicts
**Process**: Analyze conflicts → Resolve → Test → Complete merge
**Use when**: Merge conflicts occur

## 💡 Quick Usage Examples

### Starting a New Feature

```bash
# Complete workflow
/project-orchestrator

# Or step by step
/gather-requirements
/generate-tests
/code-review
/deployment-validator
```

### Fixing Issues

```bash
# Automatic fixing
/auto-fix

# Or investigate first
/error-analyzer
/security-audit
/performance-optimizer
```

### Preparing for Release

```bash
# Full validation
/deployment-validator

# Or individual checks
/generate-tests
/security-audit
/generate-docs
```

## 🎨 Command Features

All commands include:

- **Interactive Mode**: Ask questions when needed
- **Automatic Execution**: Fix issues without manual work
- **Verification Loops**: Continue until everything passes
- **Memory Integration**: Learn from previous runs
- **Progress Tracking**: Real-time status updates
- **Rollback Support**: Undo if something breaks

## 🔍 Choosing the Right Command

### "I want to build something new"

→ Use `/project-orchestrator` for complete automation
→ Or `/gather-requirements` to start planning

### "My code has issues"

→ Use `/auto-fix` to fix everything automatically
→ Or `/code-review` for suggestions

### "I need to deploy"

→ Use `/deployment-validator` for safe deployment
→ Run `/auto-fix` first to ensure clean code

### "Something is broken"

→ Use `/error-analyzer` to investigate
→ Then `/auto-fix` to resolve

### "I need documentation"

→ Use `/generate-docs` for code documentation
→ Use `/api-documenter` for API docs

## 📈 Best Practices

1. **Start with orchestrator**: Let it guide the entire process
2. **Fix before deploy**: Always run `/auto-fix` before `/deployment-validator`
3. **Test everything**: Use `/generate-tests` for comprehensive coverage
4. **Document as you go**: Run `/generate-docs` after major changes
5. **Security first**: Run `/security-audit` before any auth changes

## 🚦 Command Status Indicators

Each command provides clear status:

- 🟢 **Success**: Everything passed
- 🟡 **Warning**: Non-critical issues found
- 🔴 **Failed**: Critical issues need attention
- 🔄 **In Progress**: Currently executing
- ✅ **Complete**: Finished successfully

## 🔗 Command Chaining

Commands can be chained for workflows:

```bash
# Development pipeline
/gather-requirements && \
/generate-tests && \
/auto-fix && \
/deployment-validator

# Fix everything pipeline
/error-analyzer && \
/auto-fix && \
/security-audit && \
/performance-optimizer
```

## 💾 Configuration

Each command supports configuration via:

- `.claude/config.json` - Global settings
- `.commandrc` - Command-specific settings
- Environment variables - Runtime overrides
- Interactive prompts - On-the-fly changes

Remember: All commands are designed to be **interactive** when gathering info and **automatic** when fixing issues. They won't just tell you what's wrong - they'll fix it!
