# TypeScript codegen for the propose_action diff schema

**Captured:** 2026-05-06 (auto-extracted from harness build of BUILD_SPEC v3 — embedded-claude-terminal)

## Why deferred

The `propose_action` diff schema is pinned in JSON in BUILD_SPEC §5 + lib/exceptions corruption family. Both sides currently re-declare the shape:
- Backend: Pydantic `_DiffEntry` in `recoil/api/proposals_routes.py`
- Frontend: inline `Array<{kind, before?, after?, text?, key?}>` in `ProposalTray.tsx` + `SpecCard.tsx`

Long-term Law-12 resolution: codegen the TypeScript shape from the JSON Schema in §5 so adding a new diff field is a one-line schema change, not a four-site grep. v3 punts because the existing dual-declaration is short and the codegen pipeline isn't set up.

## Prior decisions
- BUILD_SPEC v3 §"Future work" item 7
- v3 §9 anti-patterns ("Type Duplication") explicitly acknowledges this as a known instance with deferral.

## Status
- [ ] Defer until the next time the diff schema needs a new field. Then either codegen or split the diff schema out into a shared package.
