Skip to content

feat(perception): observations carry craft facts — style subset per node + WCAG contrast criterion - #2397

Merged
joelteply merged 1 commit into
canaryfrom
feat/observe-craft-facts
Aug 23, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/observe-craft-facts

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The iterate-like-an-engineer loop's first instrument: per-node computed-style subset on the observe wire (additive, optional, no knob — the DOM surface captures what it sees), and UiCheck.min_contrast grading the official WCAG ratio with the unmeasured-never-passes honesty rail. Both TS packages compile; 71 perception tests green; bindings regenerated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…e subset on every DOM node, and the first measured-craft criterion (WCAG contrast)

Joel: 'make all the feedback and positronic controls to see and manipulate
what it needs to iterate like an engineer.' The engineer-loop's first
instrument: perception/observe now returns, per node, a DECLARED subset of
computed style (color, background-color, font-size/-weight/-family, margin,
padding, display, overflow, z-index) beside the rects it already carried —
the fact sheet a design grade measures and a citizen self-checks against.
No knob: the DOM surface simply captures what it can see (it was already
calling getComputedStyle per node for visibility); scene surfaces and the
static-html prober omit it; the wire field is optional so every existing
adapter stays compatible.

First consumer, per the design-bench build order's outlier test: UiCheck
gains min_contrast — the official WCAG 2.x ratio (relative luminance;
4.5 = AA), pinned by test at the formula's anchors (black-on-white 21:1,
identical 1:1). The honesty rail: a node with NO measurable pair (missing
styles, transparent background, unparseable color) never PASSES a craft
check — unmeasured craft is unmet craft, never green-lit.

design-bench V2 (StyleCheck class, rhythm/hierarchy/reflow/theme) builds
on this seam; hot-edit controls are the named next instrument.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) August 23, 2026 11:35
@joelteply
joelteply merged commit 2bcbcdb into canary Aug 23, 2026
5 checks passed
@joelteply
joelteply deleted the feat/observe-craft-facts branch August 23, 2026 11:46
joelteply added a commit that referenced this pull request Aug 23, 2026
The design-bench's second positronic integration (§5): a content region
whose payload is the persona's rendered artifact, live — the walk-in sees
the design evolve. Define-once in patterns (CanvasContentBody: artifact
html/url/screenshot, observing persona, viewport, revision pulse, V1/V2
scorecard + V3 judge weight), projected in chat-view (arena-precedent
push-feed shape, failures sorted first, no fabricated zeros), rendered in
the web app (sandboxed iframe stage — allow-scripts only, never
allow-same-origin; screenshot fallback with a pixels-only chip; gates
chip in success/alarm tone), with the required positronic ground state
(?fixture=canvas — headless-verified).

Core-side wiring documented, deliberately not parallel-built: a ninth
positron ViewState (canvas source) folding observe results + grades into
CanvasViewState envelopes; the web host then sets widget.canvas exactly
as bench is wired.

Rides: StyleCheck ts-rs bindings from #2398 (generated, keeps the tree
drift-free).

Built by a worktree agent; integrated onto post-#2397 canary.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant