---
name: "CRDT state backend replacing filesystem pipeline state"
agent: coder-opus
---

# Story 477: CRDT state backend replacing filesystem pipeline state

## User Story

As a developer, I want the pipeline state (stages, agent assignments, retry counts, blocked flags) stored in a BFT JSON CRDT document backed by SQLite instead of filesystem directories, so the state model is ready for multi-node distribution.

## Acceptance Criteria

- [ ] Pipeline state (which stage a story is in, agent assignments, retry counts, blocked flags) stored in CRDT doc, not .huskies/work/ directories
- [ ] CRDT state persisted to SQLite so it survives container restarts
- [ ] BFT CRDT crate integrated from crates/bft-json-crdt/
- [ ] Story markdown files (content/AC), worktrees, and config remain on filesystem
- [ ] All existing pipeline operations (move story, start agent, block, unblock) work against the CRDT backend
- [ ] Single-node behaviour unchanged from the user's perspective
- [ ] Rollback commit: 5561b9c6

## Out of Scope

- TBD
