Repository navigation
feat(perception): observations carry craft facts — style subset per node + WCAG contrast criterion - #2397
Merged
Conversation
…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
enabled auto-merge (squash)
August 23, 2026 11:35
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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