c4flowcodelisted
Install: claude install-skill tunneleven/C4Flow
# /c4flow:code — Strict Serial Task Loop
**Phase**: 3: Implementation
**Agent type**: Main agent (coordinator), dispatches sub-agents per task
**State**: `CODE_LOOP` in `.state.json`
One task at a time. Each task is a complete cycle: pickup → branch → TDD → verify → review → PR/merge → close. No task starts until the previous one is merged.
```
┌──────────────────────────────────────────────────────┐
│ while bd ready --assignee $ACTOR has tasks: │
│ │
│ 1. PICKUP bd ready → claim → dolt push │
│ 2. BRANCH git checkout -b feat/<id>-<slug> │
│ 3. TDD RED gate pause → GREEN → REFACTOR │
│ 4. VERIFY tests + coverage + bd preflight │
│ 5. REVIEW c4flow:review (CRITICAL/HIGH blocks) │
│ 6. PR/MERGE c4flow:pr → merge to main │
│ 7. CLOSE bd close --reason → dolt push │
│ │
│ no tasks left → advance currentState to INFRA │
└──────────────────────────────────────────────────────┘
```
---
## Step 0: Read State and Resolve Actor
### Read .state.json
```bash
STATE=$(cat docs/c4flow/.state.json 2>/dev/null)
CURRENT_STATE=$(echo "$STATE" | jq -r '.currentState // empty')
EPIC_ID=$(echo "$STATE" | jq -r '.beadsEpic // empty')
FEATURE_SLUG=$(echo "$STATE" | jq -r '.feature.slug // empty')
TASK_LOOP=$(echo "$STATE" | jq '.taskLoop // null')
```
**Legacy migration**: if `cur