Repository navigation
fix(vibe): Get reference images to the writer and check against them - #293
Merged
Merged
Conversation
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.
A reference image now reaches the vibe writer as an image it reads, and its visual and UX properties become acceptance criteria (operator ruling, 2026-10-15: "we're missing visual cues"). A product-manager session built a page from two screenshots, one of another product, and missed a drop shadow, a larger text size and bold type. The writer got the saved path beside the orchestrator's own description and didn't read it before its first build. Reference mode was scoped to behaviors, every criterion was "met by source trace", and the first ready message said it matched.
scripts/reference-images.mjs.attacheddecodes the person's latest attached images from the harness's own transcript: the Codex rollout forCODEX_THREAD_ID, or the Claude Code transcript forCLAUDE_CODE_SESSION_ID. Images a tool returned are skipped.save --filestores an image file. Both record the image on the session asreferenceImagesin private Git metadata. The Claude launcher (claude-worker.mjs) adds the recorded paths to every writer, requirements and verify turn. Codexwriter-state.mjs take-inputreturns them with the claimed input. The orchestrator forwards every saved path and never its own description in place of it.Readin Claude Code,view_imagein Codex) and logs aReference readline before it plans or builds, including on a correction.vibe-requirements-workerreads the image itself. It always returns visual requirements (elevation, type size and weight, color, spacing, radius, borders, icons, density) and UX requirements (hierarchy, emphasis, hover, selected, disabled, empty, loading and overflow), each mapped to a catalog component and token. The orchestrator may not scope the visual list out. Each requirement becomes an acceptance criterion. One with no equivalent takes the missing-primitive path. A surface without bundled tokens uses the named token's value and is logged for engineering.DONEon a UI change the writer screenshots each touched screen at the reference's viewport. It compares the properties the reference shows plus regressions on the touched element, such as a lost tap-target height. It fixes each difference with tokens and screenshots again. The result gates the ready message, and the orchestrator never says the result matches when it has seen a gap. It's not a design review. With no reference image there is no render or compare.environment.mdcovers capture in both harnesses: local Storybook or the control skill before the deploy, and the Codex in-app browser or Claude in Chrome after it.not met yet, and the person is told engineering must make it. When handoff removes such a path, it tells the person in one plain line, puts the criterion back tonot met yetand renders the screen again.Before this change, the image was not forwarded as an image in either harness. The Claude launcher's
inputis a text string on stdin, and Codex follow-ups were text. Reference mode ran only for a named product, researched public docs, and returned behaviors only.Tests:
test_vibe_visual_cues_contract.py: 13 cases, all fail on 1.0.39 and pass here. It pins both sides: the check runs with a reference image and never without one.reference-images.test.mjs(node): Claude Code and Codex transcripts decode, tool screenshots are skipped, and a non-image is refused.reference-images.test.ts: the saved path reaches the Claude writer and requirements turns and Codextake-input. All three fail on the 1.0.39 bundles. Dist bundles rebuilt.claude plugin evalcases taggedvisual-cues(pm-reference-card,pm-outside-product-cards,pm-two-screenshot-page,exec-described-change-no-reference). They build in a stand-in repo with a Pillow screenshot tool, because the eval sandbox has no browser. Opus, three runs each: this branch 0.931, 1.0.39 0.745.Bumps vibe to 1.0.40 (both manifests) with a CHANGELOG entry.