The technical half of the rebuild. The UI half is PAR-357. The rules are in docs/architecture.md (the 35 commandments, amended 2026-10-18) and the agent workflow is in the root CLAUDE.md.
apps/web, apps/api and contracts/ first, as its own PR.data/ folder exposes server functions and client hooks on one generated client (rule 8).rebuild integration branch, which deploys to dev. One final rebuild → main PR goes to production.rebuild. Rían reviews the final PR.api/ package of controllers and services.tasks/store/PostgresTaskSystem.java (~1,000 lines) holds most of the SQL.ThreadLocal contexts (TenantContext, ActorContext, KeyContext, EventBatch). These already caused an MCP bug.ui/lib/sql, 21 modules used from 47 files). Writes go through the backend API.Foundation runs in order (each depends on the one before):
After that, the domain migrations can run in parallel. Each moves one backend domain to the new structure and moves its UI reads from Kysely to the generated client.
Children are tracked by the Architecture label (subtasks are disabled). They're listed in the "Plan" comment.
Shipped: to production on 2026-10-18 in #37 (merge 3c0d36f). This epic was closed automatically by the new Deployments automation.
End state:
Hotfix: #84 fixed the staff break-glass audit, which was writing inside read-only transactions.
Follow-ups: PAR-445 (drop the release and discord_delivery tables, after production settles), PAR-454 (realtime across replicas), PAR-455 (ops), PAR-442 and PAR-443. All are tracked in PAR-449.
Plan and dependency graph (orchestrated by Claude Opus; work done by Sonnet 5.5 subagents)
Status convention:
rebuild.mainin the final PR.Each agent comments its plan, its PR link and the lint-ratchet deltas on its ticket.
Wave 0: in order, one at a time
apps/. Blocks everything.Wave 1: after A1, in parallel
Wave 2: after A2
Wave 3: after A3 and A4
Wave 4: after A5, in parallel
Wave 5: in parallel as their dependencies land
Wave 6
rebuild→mainPR for Rían.UI screen work (PAR-357 children) runs alongside, gated on the domain that provides its data. See the plan comment on PAR-357.