Skip to content

refactor: 0.6.x cleanup batch — cross-surface policy single-sourcing (architecture review F4/F5/F7) - #52

Merged
silversurfer562 merged 2 commits into
mainfrom
claude/forms-cleanup-batch
Aug 20, 2026
Merged

refactor: 0.6.x cleanup batch — cross-surface policy single-sourcing (architecture review F4/F5/F7)#52
silversurfer562 merged 2 commits into
mainfrom
claude/forms-cleanup-batch

Conversation

@silversurfer562

Copy link
Copy Markdown
Member

Summary

Batch A of the 2026-08-20 dynamic-forms architecture review — the successor to the 0.5.0 cleanup batches (#34/#36). Output is byte-identical; the characterization suite plus a new pin file prove it.

Changes

  • Policy duplications single-sourced into models (F4b): BOOLEAN_OPTIONS (was defined independently in bridge and widget), recommended_first() (was implemented three times — widget, markdown surface, inline in to_ask_user_format), RATIONALE_HEADERS and PROGRESS_STATUS_ICONS (each surface carried its own copy guarded only by a "matches the widget" comment). New tests/test_single_sourcing.py pins each surface to the shared source.
  • bridge._CONFIRM_DEFAULT_OPTIONS deleted (F4a): the bridge now consumes models.CONFIRM_DEFAULT_OPTIONS — the 0.5.0 changelog's single-sourcing claim is now true.
  • MCP _field_schema hygiene (F5): object-array extras typed (progress_items, triage_items, consequences, assumptions) plus a drift test — every QuestionType value must appear in the schema's type enum and every FormQuestion field in its properties. The prose description stays hand-written on purpose (the review explicitly rejected generating the schema from models).
  • Stale docstrings fixed (F7): keyboard_mode_enabled and the package overview now document ATTUNE_FORMS_KEYBOARD_MODE (preferred) with ATTUNE_KEYBOARD_MODE as legacy fallback, matching the code.

Deviations from the approved plan (recorded)

  • _EXTRAS_PARSERS registry dropped: form_from_dict's parsers are interdependent (confirm reassigns options; ranking/assumption override suggested) — a uniform-signature registry would hide that dataflow behind a protocol, exactly the abstraction the house philosophy prohibits. The completeness risk it was meant to pin lands in Batch C's grammar-completeness test instead.
  • response_id uuid suffix (F8): already fixed on main (discovery-sweep finding, same day) — no change needed.

Verification

Full suite: 689 passed (existing characterization pins untouched and green).

🤖 Generated with Claude Code

silversurfer562 and others added 2 commits August 20, 2026 09:12
…(architecture review F4/F5/F7)

Move the last policy duplications into models (BOOLEAN_OPTIONS,
recommended_first, RATIONALE_HEADERS, PROGRESS_STATUS_ICONS), delete
the bridge's shadow of CONFIRM_DEFAULT_OPTIONS so the 0.5.0
single-sourcing claim is true, type the MCP field schema's object
arrays with a grammar-coverage drift test, and fix the stale
ATTUNE_KEYBOARD_MODE docstrings. Output byte-identical — pinned by the
characterization suite plus the new tests/test_single_sourcing.py.

Deviation from the review plan, recorded: the _EXTRAS_PARSERS registry
was dropped. form_from_dict's parsers are interdependent (confirm
reassigns options; ranking/assumption override suggested) — a
uniform-signature registry would hide that dataflow behind a protocol,
which is the abstraction the house philosophy prohibits. The
completeness risk it was meant to pin is covered by Batch C's
grammar-completeness test instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@silversurfer562
silversurfer562 force-pushed the claude/forms-cleanup-batch branch from e47d35b to 614cb2b Compare August 20, 2026 13:13
@silversurfer562
silversurfer562 merged commit fc7c653 into main Aug 20, 2026
7 checks passed
@silversurfer562
silversurfer562 deleted the claude/forms-cleanup-batch branch August 20, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant