Files
t3code/docs/reference
Theo BrowneandClaude Opus 5 18aadeff7c Add dev:seed to populate an isolated dev database
An isolated dev database starts empty, which makes any list- or
thread-shaped UI impossible to look at without hand-writing fixtures.
`dev:seed` copies the newest threads and their projects out of the
shared home into the worktree's own database.

Projections only — `orchestration_events` is never copied. The projector
cursor is exclusive, so an empty event log means bootstrap streams
nothing and leaves the copied rows alone; a partial event range is the
real hazard, since the projector would replay a tail whose creating
events are missing.

Details that matter for a usable copy:
- writes all nine projection_state rows, or computeSnapshotSequence
  reports 0 for every shell snapshot
- forces sessions to stopped with no active turn, since a copied
  "running" session has no agent behind it and the reaper skips
  anything with an active turn
- zeroes pending approval/input counts, as approvals are not copied
- copies the intersection of columns, because the two databases are
  routinely on different migrations
- refuses to write to the shared home

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-25 19:27:47 -07:00
..