---
description: Template for creating new commands following lean orchestration pattern
usage: Use as starting point for new slash commands
version: 1.0
date: 2025-11-06
---

# Lean Orchestration Command Template

**Template Version:** 1.0
**Pattern:** Lean Orchestration
**Budget:** <15,000 characters (target 6-12K)
**Token Efficiency:** 67-80% reduction in main conversation

This template provides a proven structure for creating new DevForgeAI slash commands that comply with the lean orchestration pattern. Use this as your starting point rather than building commands from scratch.

---

## Quick Reference

### Pattern Summary

```
Command responsibilities:  Parse args → Load context → Set markers → Invoke skill → Display result
Skill responsibilities:    Extract params → Execute workflow → Invoke subagents → Return results
Subagent responsibilities: Specialized tasks → Isolated context → Return structured data
```

### Budget Limits

| Limit | Threshold | Action |
|-------|-----------|--------|
| Hard Limit | 15,000 chars | MUST refactor |
| Warning | 12,000 chars | SHOULD refactor |
| Target | 6,000-10,000 chars | Optimal |
| Minimum | 1,000 chars | Avoid over-optimization |

### Success Criteria

- [ ] Lines: 150-300 (lean but complete)
- [ ] Characters: <12K (target) or <15K (max)
- [ ] Phases: 3-5 (streamlined workflow)
- [ ] Business logic: ZERO (all in skill)
- [ ] Display templates: ZERO (generated by skill/subagent)
- [ ] Error handling: Minimal (3-5 types)
- [ ] Token budget: <3K in main conversation
- [ ] Tests: 30+ cases (unit, integration, regression)

---

## Template Structure

### File Header (COPY & CUSTOMIZE)

```markdown
---
description: [One-sentence command description]
argument-hint: [ARG1] [ARG2]
model: opus|haiku
allowed-tools: Read, Skill, [others as needed]
---

# /command-name - [Descriptive Title]

[One-paragraph overview of what command does and when to use it]

---

## Quick Reference

\`\`\`bash
# Most common usage example
/command ARG1 ARG2

# Alternative with default
/command ARG1

# Complex example with options
/command ARG1 ARG2 [optional]
\`\`\`

---
```

**Values to customize:**
- `description`: Brief, user-facing
- `argument-hint`: Show expected arguments
- `model`: sonnet (complex), haiku (simple)
- `allowed-tools`: Minimal set needed (Read, Glob, Grep, Skill, etc.)

---

## Phase 0: Argument Validation and Context Loading

**Responsibility:** Validate user input and load required context files

**Target lines:** 20-40

### Argument Validation Pattern

```markdown
### Phase 0: Argument Validation and Context Loading

**Validate required argument:**
\`\`\`
IF $1 empty OR invalid format:
  AskUserQuestion:
    question: "What [ARG1] should I use?"
    header: "[Argument Name]"
    options:
      - "[Option 1] - [Brief description]"
      - "[Option 2] - [Brief description]"
    multiSelect: false

  EXTRACT [ARG1] from response OR exit if cancelled
\`\`\`

**Load context file (if needed):**
\`\`\`
@devforgeai/specs/Stories/$1.story.md
\`\`\`

**Validate optional arguments:**
\`\`\`
[ARG2] = $2 or [DEFAULT_VALUE]
\`\`\`

**Validation summary:**
\`\`\`
Display: "✓ [Argument 1]: ${VALUE1}"
Display: "✓ [Argument 2]: ${VALUE2}"
Display: "Proceeding with [skill] invocation..."
\`\`\`
```

**Key points:**
- Use AskUserQuestion for ALL missing required arguments (better UX)
- Load context files via @file references (cleaner than Read tool)
- Parse optional arguments with sensible defaults
- Minimal validation logic (defer complex checks to skill)

### Common Validation Patterns

**Pattern 1: Story ID Validation**
```markdown
IF $1 is empty OR does NOT match pattern "STORY-[0-9]+":
  AskUserQuestion: [as above]
  EXTRACT STORY_ID from response OR exit

Glob: devforgeai/specs/Stories/$1*.story.md
IF no match found:
  AskUserQuestion:
    question: "Story '$1' not found. What should I do?"
    options:
      - "List available stories"
      - "Cancel command"
```

**Pattern 2: Mode/Environment Selection**
```markdown
MODE = $2 or infer_from_context()

IF MODE not valid:
  AskUserQuestion:
    question: "Choose validation mode:"
    options:
      - "deep - Comprehensive validation"
      - "light - Quick syntax check"
```

**Pattern 3: File Existence Check**
```markdown
IF story file not found:
  Display: "❌ Story file not found: $1"
  AskUserQuestion:
    question: "What should I do?"
    options:
      - "Try different story ID"
      - "Cancel"
```

---

## Phase 1: Set Context and Invoke Skill

**Responsibility:** Provide context for skill execution and invoke skill

**Target lines:** 15-25

### Context Markers Pattern

```markdown
### Phase 1: Set Context and Invoke Skill

**Provide context markers for skill to extract:**
\`\`\`
**Story ID:** STORY-001
**Mode:** deep
**[Additional Param]:** [value]
\`\`\`

**Invoke skill:**
\`\`\`
Skill(command="devforgeai-[skillname]")
\`\`\`

**What the skill does:**
[Brief description of what skill will execute - 3-5 sentences]
- Phase 1: [First phase]
- Phase 2: [Second phase]
- Phase N: [Final phase]

[Link to skill documentation if substantial]
```

**Key points:**
- **One Skill() call only** - Never invoke multiple skills in sequence
- **Explicit context markers** - Use `**Parameter:** value` format (easy for skill to parse)
- **No business logic** - This phase is JUST orchestration
- **Brief description** - Help user understand what's happening

### Context Marker Pattern Examples

```markdown
# For story-based commands
**Story ID:** $1
**Status:** [extracted from story file]

# For mode-based commands
**Story ID:** $1
**Validation Mode:** $2

# For orchestration commands
**Epic Name:** $1
**Command:** create-epic
**[Additional Params]:** [values]

# Pattern for multiple optional parameters
**Primary Parameter:** $1
**Secondary Parameter:** $2 (or default)
**[Optional Feature]:** [enabled/disabled]
```

---

## Phase 2: Display Results and Next Steps

**Responsibility:** Output skill results and guide user to next action

**Target lines:** 15-30

### Results Display Pattern

```markdown
### Phase 2: Display Results and Next Steps

**Display results from skill:**
\`\`\`
[Output skill_result directly - no parsing or transformation]

OR

Display: skill_result.display_template
\`\`\`

**Provide next steps:**
\`\`\`
Based on result:
- [Action 1]: [Brief description]
- [Action 2]: [Brief description]
- [Action 3]: [Brief description]

[Command/helpful reference for next step]
\`\`\`
```

**Key points:**
- **Display directly** - Don't parse or reformat skill output
- **Minimal interpretation** - Let skill provide complete results
- **User-friendly next steps** - Guide to obvious next action
- **Reference commands** - Suggest what to run next

---

## Error Handling Section

**Responsibility:** Minimal error documentation for common issues

**Target lines:** 20-40 (keep to 3-5 error types)

### Error Handling Template

```markdown
## Error Handling

### Error Type 1: [Error Name]

**Symptoms:**
- [How user sees this error]

**Root Cause:**
- [Why it happens]

**Resolution:**
- [What to do]

**Example:**
\`\`\`
Error: Story file not found: STORY-999
Action: Check story ID format or run /list-stories
\`\`\`

### Error Type 2: [Another Error]

[Repeat structure above]

### Error Type 3: [Another Error]

[Repeat structure above]
```

**Guidelines:**
- Document ONLY the 3-5 most common errors
- Keep descriptions brief and actionable
- Provide specific next steps for each error
- Reference skill/subagent for complex errors

### Common Error Patterns

**Pattern 1: Argument Validation Errors**
```markdown
### Error: Invalid Argument Format

**Symptoms:** "Story ID '$1' doesn't match format STORY-[0-9]+"
**Root Cause:** User provided wrong format
**Resolution:** Run `/command STORY-001` with correct format
```

**Pattern 2: File Not Found Errors**
```markdown
### Error: Required File Not Found

**Symptoms:** "Story file not found: devforgeai/specs/Stories/STORY-001.story.md"
**Root Cause:** Story doesn't exist yet or wrong story ID
**Resolution:** Create story first with `/create-story` or verify ID
```

**Pattern 3: Skill Execution Errors**
```markdown
### Error: Skill Failed

**Symptoms:** Skill returned error during execution
**Root Cause:** Complex error from skill's business logic
**Resolution:** Review skill error message for details, contact maintainer if persistent
```

---

## Integration Notes Section

**Responsibility:** Help developers understand command's place in framework

**Target lines:** 200-350 (educational content is acceptable if command <12K)

### Integration Template

```markdown
## Integration

**Invoked by:** [Who uses this command]
- User via `/command`
- [Other commands that invoke this]
- [Skills that coordinate]

**Invokes:** [What this command calls]
- devforgeai-[skillname] skill (main business logic)
- [Subagents that skill will invoke]

**Updates:** [What files change]
- [Story files updated]
- [Context files modified]
- [Generated artifacts created]

**Related commands:**
```
workflow → this command → next command
\`\`\`

**Token efficiency:**
- Command overhead: ~[X]K tokens
- Skill execution: ~[X]K tokens (isolated context)
- Total main conversation: ~[X]K tokens

**Execution time:**
- Typical: [X-Y] minutes
- Complex scenarios: [Y-Z] minutes

---

## Success Criteria

- [ ] All story acceptance criteria implemented
- [ ] [Quality metric 1]
- [ ] [Quality metric 2]
- [ ] [Quality metric 3]
- [ ] Token budget <3K in main conversation
- [ ] Character count <12K (or <15K max)
- [ ] 30+ test cases passing
- [ ] Zero business logic in command

---

## Workflow States

**Typical story progression:**
```
Backlog → Ready for Dev → In Development → Dev Complete →
QA In Progress → QA Approved → Releasing → Released
```

**This command transitions story from:** [STATE A] → [STATE B]

---

## Examples

### Example 1: [Common Use Case]

\`\`\`bash
$ /command STORY-042 deep

✓ Story ID: STORY-042
✓ Mode: deep
Proceeding with validation...

[Skill output...]

Next steps:
- Review QA report in devforgeai/qa/reports/
- Run /release STORY-042 to deploy
\`\`\`

### Example 2: [Alternative Use Case]

\`\`\`bash
$ /command STORY-043

✓ Story ID: STORY-043
✓ Mode: light (default)
Proceeding with quick validation...

[Skill output...]

Next steps:
- Continue development with /dev
- Rerun with /qa STORY-043 deep when ready
\`\`\`

---

## Performance Characteristics

**Character Budget:** [X]K / 15K (X%)
**Token Usage (Main):** ~[X]K
**Token Usage (Skill):** ~[X]K (isolated)
**Execution Time:** [X-Y] minutes

---

## References

**Lean Orchestration Pattern:**
- `devforgeai/protocols/lean-orchestration-pattern.md` - Core principles
- `devforgeai/protocols/refactoring-case-studies.md` - Real examples
- `devforgeai/protocols/command-budget-reference.md` - Budget monitoring

**Similar Commands (Reference Implementations):**
- `.claude/commands/qa.md` - Best reference (48% budget, 295 lines)
- `.claude/commands/create-sprint.md` - Good reference (53% budget, 250 lines)
- `.claude/commands/dev.md` - Standard reference (84% budget, 513 lines)

**Skill Documentation:**
- `.claude/skills/devforgeai-[skillname]/SKILL.md` - Your paired skill
```

**Notes:**
- Reference implementations demonstrate proven patterns
- Use them as guides for structure and examples
- Adapt patterns to your specific command needs

---

## Lean Orchestration Constraints Checklist

**BEFORE COMMITTING, verify all constraints:**

### Command Structure (MANDATORY)

- [ ] **Phase 0 only:** Argument validation (20-40 lines max)
  - [ ] Validates required arguments
  - [ ] Loads context via @file
  - [ ] Uses AskUserQuestion for missing args
  - [ ] NO business logic
  - [ ] NO complexity scoring
  - [ ] NO validation algorithms

- [ ] **Phase 1 only:** Invoke skill (15-25 lines max)
  - [ ] Sets explicit context markers (`**Parameter:** value`)
  - [ ] ONE Skill(command="...") call
  - [ ] No subagent invocation (skill handles)
  - [ ] Brief description of what skill does

- [ ] **Phase 2 only:** Display results (15-30 lines max)
  - [ ] Outputs skill results directly
  - [ ] Provides next steps guidance
  - [ ] No parsing of skill output
  - [ ] No template generation
  - [ ] No result interpretation

- [ ] **Error Handling:** Minimal (20-40 lines)
  - [ ] Maximum 5 error types
  - [ ] Each error <10 lines
  - [ ] Clear root cause and resolution
  - [ ] Reference skill for complex errors

- [ ] **Integration Notes:** Optional (200-350 lines)
  - [ ] Explains command's place in framework
  - [ ] Lists invoked skills/subagents
  - [ ] Shows workflow integration
  - [ ] Acceptable if total <12K chars

### Budget Compliance (MANDATORY)

- [ ] **Total lines:** 150-300 (lean)
- [ ] **Total characters:** <12K (target) or <15K (max)
  - Run: `wc -c .claude/commands/command.md`
  - If >15K: Refactor immediately
  - If 12-15K: Monitor and optimize
  - If <12K: Compliant ✓
- [ ] **Token overhead:** <3K in main conversation
- [ ] **No business logic:** All in skill
- [ ] **No duplication:** Not repeating skill content

### Skill and Subagent Delegation (MANDATORY)

- [ ] **Business logic in skill:** NOT in command
  - [ ] Validation algorithms → Skill
  - [ ] Report parsing → Skill/Subagent
  - [ ] Template generation → Subagent
  - [ ] Decision logic → Skill
  - [ ] Error recovery → Skill

- [ ] **Subagents framework-aware:** NOT operating in silos
  - [ ] Subagent knows context files
  - [ ] Subagent knows quality gates
  - [ ] Subagent knows workflow states
  - [ ] Subagent references guardrails

- [ ] **No command → subagent:** Always use skill as intermediary
  - [ ] ✅ Command → Skill → Subagent
  - [ ] ❌ Command → Subagent (violates pattern)

### User Interaction (CLEAR RULES)

- [ ] **AskUserQuestion in command:** For UX decisions only
  - [ ] Missing required arguments
  - [ ] Mode/environment selection
  - [ ] File disambiguation
  - [ ] Recovery from errors
  - [ ] NOT for business logic decisions

- [ ] **AskUserQuestion NOT in skill:** Skill doesn't ask, only executes
  - [ ] ✅ Skill executes workflow
  - [ ] ❌ Skill asks for user input (move to command)

### Documentation Standards (QUALITY)

- [ ] **Descriptive title:** Matches `/command` function
- [ ] **Quick reference:** 3-5 usage examples
- [ ] **Each phase clear:** What it does, not how
- [ ] **Error types documented:** 3-5 realistic errors
- [ ] **Integration notes:** Shows command's place in framework
- [ ] **Success criteria:** Clear definition of "done"
- [ ] **Performance metrics:** Token usage, timing

### Testing Requirements (VALIDATION)

- [ ] **Unit tests (10-15):** Argument validation edge cases
- [ ] **Integration tests (8-12):** Full workflows
- [ ] **Regression tests (8-10):** Behavior unchanged
- [ ] **Performance tests:** Token budget and execution time
- [ ] **All tests passing:** 100% pass rate required

### Framework Compliance (IMMUTABLE CONSTRAINTS)

- [ ] **No context file violations:** Respects tech-stack.md, dependencies.md, etc.
- [ ] **No anti-patterns:** Nothing from anti-patterns.md list
- [ ] **Follows standards:** Naming, structure from coding-standards.md
- [ ] **Correct placement:** In .claude/commands/ per source-tree.md
- [ ] **No hardcoded values:** Configuration via environment variables

---

## Anti-Patterns to Avoid

### Anti-Pattern 1: Business Logic in Command

**WRONG (DON'T DO THIS):**
```markdown
### Phase 2: Calculate Metrics

FOR each file in project:
  - Read file
  - Count lines
  - Estimate complexity
  - IF complexity > 10: Add to violations
  - Generate complexity report

Display: violation_list
```

**Problem:** This is business logic (complexity calculation) that belongs in skill

**CORRECT:**
```markdown
### Phase 1: Invoke Skill

**Set context:**
\`\`\`
**Story ID:** $1
**Mode:** $2
\`\`\`

**Invoke skill:**
\`\`\`
Skill(command="spec-driven-qa")
\`\`\`

Skill handles: Metrics calculation, complexity analysis, report generation
```

**Lesson:** If it involves algorithms, calculations, or business rules → Move to skill

---

### Anti-Pattern 2: Reading Files Command Didn't Create

**WRONG (DON'T DO THIS):**
```markdown
### Phase 2: Parse QA Report

Read: devforgeai/qa/reports/STORY-001-qa-report.md

FOR each line in report:
  IF line contains "VIOLATION":
    Extract violation type
    Count occurrences
    Update totals

Display: violation_summary
```

**Problem:** Command is reading and parsing skill's output (duplication)

**CORRECT:**
```markdown
### Phase 1: Invoke Skill

Skill(command="spec-driven-qa")

[Skill generates report AND invokes qa-result-interpreter subagent]

### Phase 2: Display Results

Display: skill_result.display_template
```

**Lesson:** If skill generates a file, skill should parse it too (not command)

---

### Anti-Pattern 3: Multiple Display Templates in Command

**WRONG (DON'T DO THIS):**
```markdown
### Phase 2: Display Results

IF mode == "deep" AND status == "PASS":
  Display: "\n✅ **Deep QA PASSED**\n[full metrics]..."
  Display: "Coverage: ${coverage}%"
  Display: "Anti-patterns: ${count}"
  ...

IF mode == "light" AND status == "PASS":
  Display: "\n✅ **Light QA PASSED**\n[basic info]..."
  ...

IF mode == "deep" AND status == "FAIL":
  Display: "\n❌ **Deep QA FAILED**\n[violations]..."
  ...

[10 more if/else combinations] ← 161 LINES OF TEMPLATES!
```

**Problem:** Command has business logic for template selection (belongs in subagent)

**CORRECT:**
```markdown
### Phase 1: Invoke Skill

Skill(command="spec-driven-qa")

[Skill determines mode/status, invokes qa-result-interpreter subagent]
[Subagent generates appropriate template based on mode/result/violations]

### Phase 2: Display Results

Display: skill_result.display_template
```

**Lesson:** Template generation logic → Create subagent, command displays only

---

### Anti-Pattern 4: Complex Error Handling Matrix

**WRONG (DON'T DO THIS):**
```markdown
## Error Handling

### Error: Story not found
  [10 lines of diagnosis]

### Error: Invalid status
  [12 lines of recovery options]

### Error: Skill failed
  [19 lines of investigation steps]

### Error: Missing context
  [18 lines of setup instructions]

### Error: Invalid mode
  [11 lines of mode documentation]

[10 more error scenarios] ← 97 LINES TOTAL!
```

**Problem:** Complex error matrix duplicates skill's error handling

**CORRECT:**
```markdown
## Error Handling

### Error: Story ID Invalid

**Symptoms:** "Story ID '$1' doesn't match format STORY-[0-9]+"
**Resolution:** Provide correct format: /command STORY-001

### Error: Story File Not Found

**Symptoms:** "Story file not found"
**Resolution:** Create story first with /create-story

### Error: Skill Failed

**Symptoms:** Skill returns error message
**Resolution:** Review skill's error message (skill handles complex diagnostics)

[3-5 critical errors only, 5-10 lines each]
```

**Lesson:** Keep error handling minimal, defer complex cases to skill

---

### Anti-Pattern 5: Invoking Subagents Directly from Command

**WRONG (DON'T DO THIS):**
```markdown
### Phase 1: Validate Coverage

Task(
  subagent_type="coverage-validator",
  description="Validate coverage thresholds",
  prompt="Check if coverage meets requirements..."
)

### Phase 2: Parse Results

[Command reads task output and interprets it]

### Phase 3: Generate Report

[Command formats results into report]
```

**Problem:** Violates skills-first architecture (command → subagent directly)

**CORRECT:**
```markdown
### Phase 1: Invoke Skill

Skill(command="spec-driven-qa")

[Skill invokes coverage-validator subagent internally]
[Skill interprets subagent results]
[Skill generates report]

### Phase 2: Display Results

Display: skill_result.report
```

**Lesson:** Commands orchestrate skills, not subagents. Skill is intermediary.

---

### Anti-Pattern 6: Argument Parsing with All Edge Cases

**WRONG (DON'T DO THIS):**
```markdown
### Phase 0: Parse Arguments

IF $1 empty:
  AskUserQuestion... [15 lines]

ELIF $1 invalid format:
  AskUserQuestion... [12 lines]

ELIF story file not found:
  AskUserQuestion... [18 lines]

ELIF $2 is flag (--mode):
  Parse flag syntax... [8 lines]
  IF flag invalid:
    AskUserQuestion... [10 lines]

ELIF $2 is value:
  Validate value... [12 lines]
  IF invalid:
    AskUserQuestion... [8 lines]

[More edge cases...] ← 99 LINES!
```

**Problem:** Excessive edge case handling bloats command

**CORRECT:**
```markdown
### Phase 0: Argument Validation

IF $1 empty OR invalid format:
  AskUserQuestion: "What story ID?"
  EXTRACT from response OR exit

Glob: devforgeai/specs/Stories/$1*.story.md
IF not found:
  AskUserQuestion: "Story not found. Try again or cancel?"

MODE = $2 or infer_from_context()

[20 lines total, covers 90% of cases]
```

**Lesson:** Handle most common case simply, defer edge cases to skill

---

## Refactoring Decision Tree

**Use this to decide if your command needs refactoring:**

```
Is command >15,000 characters?
    ├─ YES → MUST refactor (budget violation)
    │
    └─ NO → Is command >12,000 characters?
              ├─ YES → SHOULD refactor (approaching limit)
              │
              └─ NO → Is command >10,000 characters?
                        ├─ YES → CONSIDER refactoring (optimization opportunity)
                        │
                        └─ NO → COMPLIANT (no action needed) ✓
```

**When refactoring:**

1. **Identify top-heavy sections** (>50 lines)
   - Business logic → Move to skill
   - Display templates → Create subagent
   - Complex validation → Move to skill or subagent
   - Error handling matrix → Simplify

2. **Extract to appropriate layer**
   - Skill: Business logic, workflow coordination, validation algorithms
   - Subagent: Specialized tasks (parsing, interpretation, generation)
   - Command: User input, context loading, result display

3. **Test thoroughly**
   - 30+ test cases (unit, integration, regression)
   - 100% pass rate required
   - Behavior must be identical to original

4. **Document refactoring**
   - Create `devforgeai/specs/enhancements/[COMMAND]-refactoring-analysis.md`
   - Explain what was moved and why
   - Record lessons learned

---

## Implementation Checklist

Before committing your command:

**Pre-Implementation**
- [ ] Analyzed similar commands (/qa, /dev, /create-sprint)
- [ ] Identified paired skill (devforgeai-[skillname])
- [ ] Planned business logic distribution
- [ ] Identified if new subagents needed

**During Implementation**
- [ ] Created .claude/commands/command.md
- [ ] Created skill if needed (or verified existing)
- [ ] Created subagents if needed
- [ ] Created reference files for subagents
- [ ] Verified <15K character budget
- [ ] Wrote 30+ test cases

**After Implementation**
- [ ] All tests passing (100%)
- [ ] Character budget verified: `wc -c .claude/commands/command.md`
- [ ] Updated .claude/memory/commands-reference.md
- [ ] Updated .claude/memory/subagents-reference.md (if applicable)
- [ ] Created analysis document in devforgeai/specs/enhancements/
- [ ] Git commit with descriptive message
- [ ] Tested command 3+ times manually
- [ ] Verified token efficiency (~2-5K in main conversation)

---

## Token Efficiency Checklist

**Optimization strategies for your command:**

- [ ] Using Read, not cat (40% savings)
- [ ] Using Glob, not find (73% savings)
- [ ] Using Grep, not grep command (60% savings)
- [ ] Using Edit, not sed (75% savings)
- [ ] Skill invocation happens (not duplicating skill logic)
- [ ] Subagents in isolated context (main conversation stays clean)
- [ ] Progressive disclosure used (load only needed reference files)
- [ ] No verbose documentation (keep to 300 lines max)
- [ ] No business logic parsing (skill handles complex results)
- [ ] No template generation (subagents handle this)

**Token savings achieved:**
- Pre-refactoring /dev: 15K tokens → Post: 5K tokens (67% savings)
- Pre-refactoring /qa: 8K tokens → Post: 2.7K tokens (66% savings)
- Target: 60%+ reduction in main conversation token usage

---

## Summary

**Lean orchestration is proven pattern:**
- 5 commands refactored successfully (40-57% reduction)
- Token efficiency improvement: 37-80% across all commands
- All maintain 100% backward compatibility
- Average implementation time: 2-3 hours per command

**Template usage:**
1. Copy this template to `.claude/commands/your-command.md`
2. Customize each section (header, phases, examples)
3. Implement paired skill and subagents
4. Test thoroughly (30+ test cases)
5. Verify budget compliance (<15K chars)
6. Commit with confidence

**Questions?** Reference:
- `devforgeai/protocols/lean-orchestration-pattern.md` (core principles)
- `devforgeai/protocols/refactoring-case-studies.md` (real examples)
- `devforgeai/protocols/troubleshooting-lean-orchestration-violations.md` (common issues)
