# Coding Pipeline - Standard Workflow

*Documented: 2026-02-06*

## Spec Creation Pipeline

```
1. Rivet (Opus) briefs the task with requirements
2. Kimi sub-agent drafts the spec (fast, cheap)
3. Claude Code reviews critically (thorough, catches issues)
4. Rivet/Kimi fixes the issues found
5. Michael approves
6. Implementation begins
```

## Why This Order

**Kimi drafts because:**
- Fast (~5-10 mins for full spec)
- Cheap (basically free)
- Good at generating content quickly
- Fine for first drafts and research

**Claude reviews because:**
- Thorough, catches edge cases
- Better at security and production risks
- Critical analysis > content generation
- Reviewers catch what creators miss (fresh eyes)

## Example Results (2026-02-06)

- Kimi created Stripe payment spec in 8 mins
- Claude Code found 22 issues in 2 mins:
  - 5 Critical (security holes)
  - 5 High (missing edge cases)
  - 6 Medium (technical issues)
  - 6 Low (completeness)

## Commands

**Spawn Kimi for drafting:**
```
sessions_spawn with task description
```

**Run Claude Code for review:**
```
su - ccuser -c "cd /path && cat spec.md | claude -p 'Review thoroughly, be critical'"
```

## When to Skip Claude Review

- Simple documentation updates
- Non-critical scripts
- Research/exploration tasks

## Always Get Claude Review For

- Payment/money handling
- Authentication/authorization
- User data handling
- Production deployments
- Security-sensitive features
