docs: research, spec, plan, and PRD for cde, the Gas City rewrite #1

Open
forgejo-admin wants to merge 3 commits from pbanka/cde-design into main

Problem

Gas City's loop (bead → polecat → refinery) is worth keeping, but the implementation cannot be handed to a team: measured on 2026-09-11, gc supervisor run averaged 97% of a core idle, 12 per-session pollers each spawn a bd subprocess every 2 s, and dolt takes 20 new connections and 130 selects per second with nothing to do. Upstream's fix is only proposed. The work store is one dolt server per machine, so a team cannot share a queue.

Solution

Design artifacts for cde (celilo development environment), a Bun rewrite of the core loop:

  • docs/research/2026-09-11-gascity-rewrite-feasibility.md: measurements, feature inventory, beads Store interface, runtime providers, pack layer, and sizing.
  • CONTEXT.md: the vocabulary (bead, rig, yard, role, session, flow, handoff, home yard, bundle).
  • docs/adr/00010005: rewrite over fixing upstream; one SQLite service instead of dolt; home yard runs singleton roles; roles and flows ship as celilo bundle modules; yards act as the developer who logged in.
  • projects/2026-09-11-bead-orchestrator/spec.md: 9 user stories, 40 Gherkin scenarios, testing seams, decisions, scope.
  • projects/2026-09-11-bead-orchestrator/plan.md: 11 vertical slices with interface contracts, PR delivery, parallel streams.
  • projects/2026-09-11-bead-orchestrator/prd.md: goals with measured baselines, personas, success metrics.

Settled in the grilling interview: Authentik OIDC from day one with device-flow login; the bead service, cde-yard, cde-configuration, and per-rig bundles are celilo modules; WebSocket change feed; no delete; a cele2e gate that runs the real claude and pi CLIs against a fake vendor API.

No code yet. Next: /to-tasks on Slice 1 (service core).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PQ5MNJaNiL6dqFHT4pL63W

## Problem Gas City's loop (bead → polecat → refinery) is worth keeping, but the implementation cannot be handed to a team: measured on 2026-09-11, `gc supervisor run` averaged 97% of a core idle, 12 per-session pollers each spawn a `bd` subprocess every 2 s, and dolt takes 20 new connections and 130 selects per second with nothing to do. Upstream's fix is only proposed. The work store is one dolt server per machine, so a team cannot share a queue. ## Solution Design artifacts for `cde` (celilo development environment), a Bun rewrite of the core loop: - `docs/research/2026-09-11-gascity-rewrite-feasibility.md`: measurements, feature inventory, beads Store interface, runtime providers, pack layer, and sizing. - `CONTEXT.md`: the vocabulary (bead, rig, yard, role, session, flow, handoff, home yard, bundle). - `docs/adr/0001`–`0005`: rewrite over fixing upstream; one SQLite service instead of dolt; home yard runs singleton roles; roles and flows ship as celilo bundle modules; yards act as the developer who logged in. - `projects/2026-09-11-bead-orchestrator/spec.md`: 9 user stories, 40 Gherkin scenarios, testing seams, decisions, scope. - `projects/2026-09-11-bead-orchestrator/plan.md`: 11 vertical slices with interface contracts, PR delivery, parallel streams. - `projects/2026-09-11-bead-orchestrator/prd.md`: goals with measured baselines, personas, success metrics. Settled in the grilling interview: Authentik OIDC from day one with device-flow login; the bead service, `cde-yard`, `cde-configuration`, and per-rig bundles are celilo modules; WebSocket change feed; no delete; a cele2e gate that runs the real `claude` and `pi` CLIs against a fake vendor API. No code yet. Next: `/to-tasks` on Slice 1 (service core). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PQ5MNJaNiL6dqFHT4pL63W
Measured on 2026-09-11: gc supervisor at 97% CPU average, 12 per-session
nudge pollers ticking every 2 s, dolt taking 20 new connections and 130
selects per second while idle. Upstream's own design doc attributes the
load to the fixed-tick full sweep and the fix is unshipped. The document
inventories Gas City's features, the beads Store interface, runtime
providers, and the pack layer, and sizes a Bun rewrite. 1 file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQ5MNJaNiL6dqFHT4pL63W
Five ADRs: rewrite over fixing upstream, one SQLite service instead of
Dolt, the home yard runs singleton roles, roles and flows ship as celilo
bundle modules, yards act as the developer who logged in. CONTEXT.md
pins the vocabulary (bead, rig, yard, role, session, flow, handoff,
bundle) so later work does not reintroduce Gas City's terms. 6 files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQ5MNJaNiL6dqFHT4pL63W
spec.md: problem, solution, 9 user stories, 40 Gherkin scenarios across
bead service, orchestrator, flows, CLI, and end to end, two testing
seams, implementation decisions, and scope. plan.md: 11 vertical slices
with interface contracts, PR delivery, and three parallel streams.
prd.md: goals with measured baselines, personas, and success metrics.
3 files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQ5MNJaNiL6dqFHT4pL63W
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin pbanka/cde-design:pbanka/cde-design
git switch pbanka/cde-design

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff pbanka/cde-design
git switch pbanka/cde-design
git rebase main
git switch main
git merge --ff-only pbanka/cde-design
git switch pbanka/cde-design
git rebase main
git switch main
git merge --no-ff pbanka/cde-design
git switch main
git merge --squash pbanka/cde-design
git switch main
git merge --ff-only pbanka/cde-design
git switch main
git merge pbanka/cde-design
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
celilo/celilo-development-environment!1
No description provided.