Claude
Skills
Sign in
Back

feature-workflow

Included with Lifetime
$97 forever

Orchestrate complete or partial feature implementation workflow with configurable phases. This skill should be used to run the full workflow (specification → research → plan → implement → test → fix) or specific phases, coordinating between all feature-implementation skills automatically.

Code Reviewscripts

What this skill does


# Feature Workflow Orchestrator Skill

## Purpose

Orchestrate the complete feature implementation workflow or run specific phases, coordinating between `feature-specification`, `feature-research`, `implementation-planner`, `feature-implementer`, `test-executor`, and `test-fixer` skills. Manages state passing between phases and enables both autonomous and manual workflows.

**Support skill:** `workflow-challenger` can be invoked at any stage to challenge decisions, identify gaps, and verify coherence.

## IMPORTANT: User Interaction

**ALWAYS use the `request_user_input` tool for workflow configuration questions.**

When starting a workflow or needing user decisions, use structured questions:

```
request_user_input:
  questions:
    - question: "Do you need to clarify requirements first?"
      header: "Specification"
      options:
        - label: "Yes, start with CDC"
          description: "Requirements are unclear, need specification phase"
        - label: "No, requirements are clear"
          description: "Skip specification, go directly to research"
      multiSelect: false
    - question: "Should we create a POC during research?"
      header: "POC"
      options:
        - label: "If needed"
          description: "Create POC only if technical feasibility is uncertain"
        - label: "Always"
          description: "Always create POC for validation"
        - label: "Never"
          description: "Skip POC, documentation is sufficient"
      multiSelect: false
```

This ensures clear workflow configuration with explicit user choices.

## When to Use This Skill

Use this skill when:

- Want to run the complete feature workflow end-to-end
- Need to run specific phases (e.g., skip research, go straight to implementation)
- Want autonomous iteration through implementation-test-fix cycles
- Need to coordinate multiple skills systematically
- Want configurable workflow behavior (stop points, iteration limits)

## Workflow Phases

The feature implementation workflow consists of 7 phases:

```
Phase 0: Specification (feature-specification)
   ↓ CDC.md
Phase 1: Research (feature-research)
   ↓ findings.md
Phase 2: Planning (implementation-planner)
   ↓ Plan.md
Phase 3: Implementation (feature-implementer)
   ↓ code + test-plan.md
Phase 4: Testing (test-executor)
   ↓ test-failures.md (if failures)
Phase 5: Fixing (test-fixer)
   ↓
   └─→ If tests still fail, loop back to Phase 5
Phase 6: Documentation (feature-implementer - doc phase)
   ↓ updated [DOC]-* vault
```

## Workflow Modes

### Mode 1: Full Workflow (Autonomous)

Execute all 6 phases automatically:

```
User: "Implement email notifications feature"

Orchestrator:
0. Specification → CDC.md (iterative clarification)
1. Research → findings.md
2. Plan → Plan.md
3. Implement → code + test-plan.md
4. Test → test-failures.md (if any)
5. Fix → iterate until tests pass
6. Documentation → update [DOC]-* vault
7. Complete!
```

**Use When:**
- Starting from scratch with unclear requirements
- Want complete hands-off implementation
- Need to clarify feature scope before research

### Mode 2: Partial Workflow

Execute specific phases:

**Example: Skip Research (already done)**
```
User: "I've done research. Here's findings.md. Implement the feature."

Orchestrator:
1. [Skip Phase 1]
2. Plan → Plan.md
3. Implement → code + test-plan.md
4. Test → test-failures.md (if any)
5. Fix → iterate until tests pass
```

**Example: Implementation-Test-Fix Only**
```
User: "Here's the implementation plan. Execute steps 1-3, then test."

Orchestrator:
1. [Skip Phases 1-2]
2. Implement steps 1-3
3. Test → test-failures.md (if any)
4. Fix → iterate until tests pass
```

**Use When:**
- Some phases already complete
- Want control over specific phases
- Iterating on existing work

### Mode 3: Single Phase

Execute one phase only:

```
User: "Just run the tests from test-plan.md"

Orchestrator:
1. [Run test-executor only]
2. Generate test-failures.md
3. Done (no auto-fix)
```

**Use When:**
- Manual workflow
- Need to inspect results between phases
- Debugging specific phase

### Mode 4: Manual Workflow (No Orchestrator)

User invokes each skill individually:

```
User: "Use feature-research to research email notifications"
→ [feature-research runs] → findings.md

User: "Now use implementation-planner to create a plan"
→ [implementation-planner runs] → Plan.md

User: "Implement Phase 1 of the plan"
→ [feature-implementer runs] → implementation

User: "Run the tests"
→ [test-executor runs] → test results
```

**Use When:**
- Want maximum control
- Learning the workflow
- Complex scenario requiring intervention

## Configuration

Workflow behavior is configurable via JSON or interactive prompts.

### Configuration Schema

```json
{
  "workflow": {
    "phases": ["specification", "research", "plan", "implement", "test", "fix", "documentation"],
    "skip_phases": [],
    "stop_after": null,
    "auto_iterate": true,
    "max_iterations": 3,
    "parallel_implementation": false
  },
  "specification": {
    "output_file": "CDC.md",
    "require_approval": true,
    "max_question_iterations": 5
  },
  "research": {
    "create_poc": "if_needed",
    "output_file": "findings.md"
  },
  "planning": {
    "output_file": "Plan.md",
    "validate": true
  },
  "implementation": {
    "use_worktree": false,
    "worktree_name": null,
    "build_after_each_step": false,
    "test_after_each_step": false
  },
  "testing": {
    "test_plan_file": "test-plan.md",
    "failure_report_file": "test-failures.md",
    "stop_on_first_failure": false
  },
  "fixing": {
    "max_fix_iterations": 3,
    "auto_retest": true
  },
  "documentation": {
    "enabled": true,
    "vault_pattern": "[DOC]-*",
    "doc_types": ["feat", "adr", "db", "arch", "api", "dev", "moc"],
    "language": "fr"
  }
}
```

### Configuration Options

**Global Options:**

- **`phases`**: List of phases to run (default: all including specification)
- **`skip_phases`**: Phases to skip (e.g., `["specification"]` if requirements are clear)
- **`stop_after`**: Stop after specific phase (e.g., `"specification"` to get CDC only)
- **`auto_iterate`**: Automatically iterate fix→test loop (default: true)
- **`max_iterations`**: Max fix-test iterations before stopping (default: 3)
- **`parallel_implementation`**: Implement multiple steps in parallel worktrees (advanced)

**Specification Options:**

- **`output_file`**: CDC document filename (default: "CDC.md")
- **`require_approval`**: Require user approval before proceeding (default: true)
- **`max_question_iterations`**: Max questioning rounds (default: 5)

**Research Options:**

- **`create_poc`**: When to create POC ("always", "if_needed", "never")
- **`output_file`**: Findings document filename

**Planning Options:**

- **`output_file`**: Plan document filename
- **`validate`**: Run validate_plan.py after generation

**Implementation Options:**

- **`use_worktree`**: Create git worktree for implementation
- **`worktree_name`**: Worktree name (auto-generated if null)
- **`build_after_each_step`**: Build after each implementation step
- **`test_after_each_step`**: Run tests after each step (slower but catches issues early)

**Testing Options:**

- **`test_plan_file`**: Test plan filename
- **`failure_report_file`**: Failure report filename
- **`stop_on_first_failure`**: Stop testing on first failure (for debugging)

**Fixing Options:**

- **`max_fix_iterations`**: Max attempts to fix failing tests
- **`auto_retest`**: Automatically re-run tests after fixes

### Configuration Examples

**Example 1: Full Autonomous Workflow**
```json
{
  "workflow": {
    "phases": ["research", "plan", "implement", "test", "fix"],
    "auto_iterate": true,
    "max_iterations": 3
  }
}
```

**Example 2: Skip Research, Stop After Planning**
```json
{
  "workflow": {
    "phases": ["plan", "implement", "test", "fix"],
    "skip_phases": ["research"],
    "stop_after": "plan"
  }
}
```

**Example 3: Implementation Only (with Worktree)**
```js
Files: 4
Size: 39.3 KB
Complexity: 61/100
Category: Code Review

Related in Code Review