Session Process: The Interval Loop

How features get from code to production without orphaned wiring

April 2, 2026

THE PROCESS

The 6-Step Interval Loop

Every feature ships through this cycle. Skip a step and you get orphaned fields, broken optimistic updates, and silent data loss.

CONTINUE feeds back into BUILD — the interval repeats until the session ends
THE CHECKLIST

The 5-Place Wiring Rule

When adding any field to BlockState, it must exist in all 5 places. Miss one and the field is orphaned.

#LocationFileWhat breaks if missing
1BlockState type definitionlib/types.tsTypeScript has no knowledge of the field
2Local BlockState in page.tsxapp/run/[id]/page.tsxClient-side state never includes the field
3Optimistic update handlerapp/run/[id]/page.tsxField reverts on next render after mutation
4update-state whitelistapp/api/factory-run/route.tsAPI silently drops the field on PATCH
5Component prop typescomponents/workbench/*.tsxComponent cannot read or display the field
EVIDENCE

This Session: Two Intervals

Two interval loops ran during this session. The first caught orphans. The second proved the checklist works.

NEXT STEP

What Should Be Automated

The interval loop works manually, but manual processes get skipped under time pressure. This should become infrastructure.

Proposed: /api/session-audit endpoint

A single API call that reads lib/types.ts, scans for every field on BlockState, then checks the 4 downstream locations. Returns a JSON report of orphaned fields with exact file and line number.

Trigger: Run automatically before every git commit via pre-commit hook, or on-demand from the workbench meta-chat panel.

Output: A wiring scorecard — 28/28 wired or 25/28 wired, 3 orphans — with links to the exact locations that need patching.

The interval loop becomes a single API call. The smoke test agent, automated.