Pipeline

Run the complete feature pipeline (align -> implement -> review) in fresh sessions

anh-ht93 updated 5mo ago
Claude CodeGeneric
View source ↗
---
description: "Run the complete feature pipeline (align -> implement -> review) in fresh sessions"
argument-hint: "<feature-id> [new|update]"
---

# /pipeline - Multi-Session Feature Pipeline

Orchestrates feature completion across fresh sessions to maintain quality.

## Usage

/pipeline f1 # New feature implementation /pipeline f2 update # Update existing feature


## What It Does

1. **Phase 1: Alignment** (fresh session)
   - Runs `/align` command for spec verification
   - Outputs alignment report to `.claude/handoff/`
   - Commits docs if ready
   - STOPS if blockers found

2. **Phase 2: Implementation** (fresh session, with iteration)
   - Reads alignment report as input
   - TDD workflow: tests first, then implementation
   - **Build verification** after each attempt
   - **Test verification** after successful build
   - **Retry loop** (max 3 attempts) if build/tests fail
   - Only commits after build + tests pass

3. **Phase 3: Review** (fresh session)
   - Runs `/review` command
   - Verifies implementation matches specs
   - Outputs review report
   - Reports PASS/FAIL

## Configuration

| Setting | Default | Description |
|---------|---------|-------------|
| `MAX_IMPL_ATTEMPTS` | 3 | Max retry attempts for implementation |
| `XCODE_DESTINATION` | iPhone 17 | Simulator for build/test |

## Run Script

```bash
bash .claude/scripts/feature-pipeline.sh $ARGUMENTS

Pipeline Flow

Phase 1: Alignment
    │
    ├── /align <feature>
    ├── Check: Ready to Implement?
    │   ├── NO  → EXIT (fix blockers)
    │   └── YES → Continue
    └── Commit docs
          │
          ▼
Phase 2: Implementation (with iteration)
    │
    ├── Attempt 1/3
    │   ├── Claude implements with TDD
    │   ├── xcodebuild build
    │   │   └── FAIL → Attempt 2/3
    │   └── xcodebuild test
    │       └── FAIL → Attempt 2/3
    │
    ├── Attempt 2/3 (if needed)
    │   ├── Claude reads errors, fixes
    │   ├── xcodebuild build
    │   └── xcodebuild test
    │
    ├── Attempt 3/3 (if needed)
    │   └── Same as above
    │
    ├── All attempts failed? → EXIT
    └── Commit code (only if build+tests pass)
          │
          ▼
Phase 3: Review
    │
    ├── /review <feature>
    ├── Check: Review Result?
    │   ├── FAIL → EXIT (issues to fix)
    │   └── PASS → Continue
    └── Pipeline Complete ✓

Why Fresh Sessions?

Each phase starts with clean context:

  • No accumulated biases from previous work
  • Forces reliance on documentation
  • Validates handoff document quality
  • Prevents quality degradation

Why Iteration in Phase 2?

Inspired by Ralph Wiggum technique:

  • Build/test failures are common on first attempt
  • Retry with error context improves success rate
  • Max 3 attempts prevents infinite loops
  • Only commits verified working code

Maintain Pipeline?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Pipeline on getagentictools](https://getagentictools.com/loops/anh-ht93-pipeline-multi-session-feature-pipeline?ref=badge)
npx agentictools info loops/anh-ht93-pipeline-multi-session-feature-pipeline

The second line is the CLI lookup for this page — handy in READMEs and docs.