refactor(hosted): the plan wire carries the document alone, with the fixed template's fields and their edit forms gone (plan as one document cleanup)
Merged
DA
7d ago+147+147+012345678901234567890123456789-2167-2167-0123456789012345678901234567890123456789
Cleanup after the plan as one document rollout. The wire carries the document alone; the fixed template's fields and their edit forms are gone.
What's dropped
- Wire (
plan-wire.ts,live-contract.ts):planFieldsSchema,PlanFields,planFieldEditSchema,PLAN_FIELD_BOUNDS, and the optionalfields/fieldEditskeys on the plan and on theplan.draftframe. Nothing sends them since PR 10; nothing reads them since PR 12. - Edit (
plan-edit.ts):planEditRequestSchemais the document form alone,{ document: { base, value } }, and a conflict answers the text.applyDeveloperEdit, the field lenses, andPlanFieldEditRequestare deleted. A field-shaped edit is refused at decode (400, same as before), and the server'sFIELD_EDITrefusal goes too. - Copy (
plan-markdown.ts):planMarkdownis the plan's name as a title over its text.PLAN_MARKDOWN_MAX_CHARSis that title plus the longest text. - Template (
plan-template.ts): the fields formatter is gone (planBody,planDocumentOf,PlanContent, the empty fields,PLAN_EMPTY_TEXT, the text-field helpers).
What stays, and why
PLAN_FIELD(the default sections' keys) andPLAN_HEADING/PLAN_FIELD_HEADING/PLAN_FIELD_PURPOSE/PLAN_FIELD_BAR: the default template's guidance and the prompts use them, and so does the older-agent note reader (its TODO is for after 2026-10-14 00:00Z). I didn't rename them to template/section vocabulary; the keys run through the prompts, their test, and that reader, which is not a trivial rename.planDocumentSchema.assumptions(always[]): a desktop through v0.11.0 requires the key.
Tests and goldens
- Tests of the removed behaviour are deleted (field edits and their merge, the fields-to-document render, Copy's assumptions list). The document merge, Copy, and the client's edit tests use the document form.
- Goldens re-recorded with
LUKE_UPDATE_FIXTURES=1: the plan, plan answer, draft frame, and edit request/answer/value lose the field shapes;planFieldsSchemaandplanFieldEditSchemagoldens are deleted.
./scripts/check.sh passes locally. The desktop only changes two type imports; CI cannot verify the Mac UI and verify.sh was not run (LUKE-159).
š¤ Generated with Claude Code