Gating — what Rung 6 actually did
Current rule (owner, 2026-08-31): nothing in the app may read projects.phase to decide what a user can do. Phase is a manually-set ops label. The four project-detail tabs (Decide / Work / File / Money) are always reachable.
This is the current-system pointer. The design discussion of candidate preconditions that do not read phase — closing a project, completing an inspection — lives in docs/history/DESIGN-C.md. That file is still under history/ because it is a proposal: none of those candidates have shipped as enforcement.
What was deleted
Rung 6 removed the entire phase-transition engine:
| Gone | What it used to do |
|---|---|
domain/src/phases/gates.ts + domain/src/docs/gate.ts / field/gate.ts / billing/gate.ts | "Can this project move from phase X to phase Y?" |
src/data/projectTransitions.ts | Client snapshot + previewGateStatus |
supabase/functions/advance-project-status/ | Sole writer of projects.phase |
PhaseStepper.tsx | UI that treated phase as a pipeline |
setProjectPhase / setProjectSideState (src/data/projects.ts) now write the columns directly. The projects_log_phase_transition trigger still appends project_phase_transitions.
Do not restore a generic gate registry keyed on phase. If a future check is wanted, DESIGN-C's recommendation is a narrow named function (e.g. "undecided orders at close") evaluated at the action, never if (phase === …).
What still looks like a gate (and isn't)
| Surface | Reality |
|---|---|
| Header phase dropdown | Any phase to any phase, either direction. advance_projects is a UI-only permission check; RLS does not enforce it. |
closed badge | Tone change only. Edit controls stay live. |
| File-tab required-document checklist | Surfaces missing slots. assemble-filing-package does not consult it. |
| Work-tab inspector picker | Filters to licensed staff. Empty if licenses is unseeded — not a phase gate. |
| Clearance-independence warnings | Warn-only. See docs/CLEARANCE_INDEPENDENCE.md. |
Pass/fail of a real project walk-through: docs/LIFECYCLE_ASSESSMENT.md.