Code: 02_ai-engineering-code/atomic-media-generator/scripts/run-vision-bridge.mjs + README.md
Problem. Generate learning media (infographics, step-flows, tables, formulas) at scale and verify each asset actually matches its spec.
What I built. A spec-driven asset factory with a two-model verification bridge:
Hard invariants (from the repo). No legacy coordinate fallback · no heuristic pixel guessing · missing gate evidence = failure · spec-derived prompts are canonical · no idle waiting during API cooldown if other work is queued. 43 imported assets validate against a JSON schema (Zod/Ajv); Vitest-backed.
Why it matters. Multi-model consensus + fail-closed gating is exactly the "make the model trustworthy" problem applied-AI engineers get hired to solve. Also shows creative cost engineering (free primary, paid verify).
The hard part of generating media isn't generating it, it's trusting it. So I run two models: ChatGPT does the primary generation through browser automation, which is free, and the Gemini API independently verifies the result. Then I reconcile them with consensus math, an 85-pixel drift threshold, and it fails closed: if they disagree, the asset halts instead of shipping. Everything is spec-driven against a JSON schema, and I made the invariants explicit in the repo, no heuristic guessing, missing evidence equals failure. This is the make-the-model-trustworthy problem, which is most of applied AI.
GG · Applied AI Engineering portfolio · synced to youdontneedmy.help design