Ruby on Rails
Automated agent harnesses commoditize routine coding, making human design taste and engineering judgment more valuable rather than obsolete.
AI-assisted summary of How a Designer started shipping production Rails - Alicia Rojas & Arely Rivera — original source. Check the original for full context.
Source published:
Key ideas
- Telos Labs engineer Alicia Rojas and designer Arely Rivera demonstrated how a 68-line harness—comprising design tokens, a shared partial, and a 10-line markdown contract—enabled a designer to ship thousands of lines of production Rails code. (2:38)
- An initial 7,000-line pull request passed all CI checks and tests but still introduced four escaped visual and structural defects, underscoring that unenforced design guidelines function merely as suggestions. (5:53)
- The team introduced the Onion Design Framework, a five-layer model spanning tokens, primitives, patterns, written rules, and screens, designed to make system rules legible to autonomous coding agents. (8:23)
- In a 33-agent benchmark, correcting a single inadvertently biasing sentence in the agent instructions increased design system adherence from an 18% baseline to 100%. (14:04)
Detailed notes
## Background Published on YouTube by the Ruby on Rails channel on October 1, 2026, this Rails World 2026 presentation features Telos Labs software engineer Alicia Rojas and lead product designer Arely Rivera. According to the description, the talk covers what occurred when Rivera shipped a 7,000-line pull request to production using an AI agent harness, introducing the Onion Design Framework and sharing findings from running 33 agents against vague prompts.
## TL;DR Software engineer Alicia Rojas and product designer Arely Rivera examine how a lightweight harness enabled Rivera to contribute directly to a production Rails codebase, resulting in a 7,000-line pull request that passed automated CI but escaped four subtle UI defects. To prevent drift and make UI systems legible to AI agents, they established the Onion Design Framework, a five-layer architecture spanning from tokens and primitives to composed patterns, written rules, and screens used for diagnostic feedback. Through an empirical benchmark of 33 agent runs, they reveal how a single phrasing error derailed visual layout generation and how correcting the harness achieved reliable results. Ultimately, they argue that while harnesses standardize repetitive execution, human taste and judgment remain essential for deciding what deserves to be built.
## Atmosphere & style The presentation carries an energetic, candid, and collegial dynamic that playfully bridges the traditional divide between software engineers and product designers. Opening with the humorous, slightly alarming admission of merging a massive designer-authored pull request that broke in four distinct ways, the talk establishes an honest, post-mortem tone rather than presenting an idealized success story. The speakers balance technical rigor—such as decomposing git diffs and schema benchmarks—with thoughtful real-world metaphors like window-washer safety harnesses, leaving the audience with a grounded, empowering, and pragmatic perspective on working alongside AI.
## Bulletin - [02:38](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=158s) Telos Labs engineer Alicia Rojas and designer Arely Rivera demonstrated how a 68-line harness—comprising design tokens, a shared partial, and a 10-line markdown contract—enabled a designer to ship thousands of lines of production Rails code. - [05:53](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=353s) An initial 7,000-line pull request passed all CI checks and tests but still introduced four escaped visual and structural defects, underscoring that unenforced design guidelines function merely as suggestions. - [08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) The team introduced the Onion Design Framework, a five-layer model spanning tokens, primitives, patterns, written rules, and screens, designed to make system rules legible to autonomous coding agents. - [14:04](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=844s) In a 33-agent benchmark, correcting a single inadvertently biasing sentence in the agent instructions increased design system adherence from an 18% baseline to 100%.
## Key takeaways - [00:12](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=12s) A 7,000-line pull request generated primarily by a designer passed all CI suites, tests, and engineering code reviews, yet broke visually and structurally across four areas in production. - [00:12](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=12s) Standard engineering code reviews focus on architecture and syntax rather than QA or visual edge cases, creating a blind spot when reviewing agent-generated frontend code. - [02:38](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=158s) The operational core of the design harness required only 68 lines: 46 lines of tokens, a single shared partial across 50 call sites, and a 10-line natural-language contract in a markdown file. - [02:38](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=158s) Robust repository guardrails—including strict branch rules, custom hooks, and CI suites—allowed non-engineer designers to operate directly in a production codebase safely. - [05:53](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=353s) Unenforced rules inevitably degrade into suggestions, as seen when hard-coded hexes and a global form label sizing bug bypassed automated checks. - [08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) The Onion Design Framework arranges frontend architecture into five concentric layers: Core Tokens, Primitives, Composed Patterns, Written Rules, and Screens. - [08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) Agent-generated screens provide critical diagnostic evidence, allowing engineers and designers to trace visual errors back to ambiguous rules or missing tokens in inner layers. - [12:01](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=721s) Comparative prompt benchmarking showed that strict schemas delivered high accuracy while optimizing token consumption, whereas lint-annotated instructions performed poorest. - [12:01](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=721s) Testing 33 agent runs against a vague prompt initially achieved only an 18% success rate due to the model defaulting to tabular engineering conventions rather than user-centric card layouts. - [14:04](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=844s) Extreme literalism in LLMs means subtle phrasing mistakes can misdirect agents; eliminating a single sentence restored benchmark adherence to 100%. - [14:04](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=844s) Stripping away the agent harness while maintaining identical model access and prompts caused generated output to degrade immediately into disjointed, unstyled HTML. - [15:02](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=902s) As automated tools commoditize routine code execution, human taste, context, and user advocacy become significantly more valuable. - [15:02](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=902s) Working directly in code rather than relying exclusively on Figma mockups eliminated fidelity loss and grounded design decisions in real production constraints. - [17:10](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=1030s) Engineering teams must treat harnesses like mandatory safety gear for high-rise workers, mechanically enforcing constraints rather than relying on human babysitting.
## Detailed walkthrough ### [00:12](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=12s) Introduction and the 7,000-Line Pull Request
Alicia Rojas, a software engineer who has been developing software at Telos Labs for about five years, opens the talk alongside lead product designer Arely Rivera, who has been designing for eight years and collaborating with Alicia at Telos Labs for the past three. After thanking the conference organizers for slightly bending the rules to let an engineer and a designer share the stage, Alicia sets up the central premise of their story: how Arely started shipping production Rails code directly.
To frame the story, Alicia asks the audience to imagine being handed a pull request with over 7,000 lines added, almost 2,000 lines deleted, and 153 files touched. "Would you merge this?" she asks. She admits that three or four years ago, her reaction would have been, "Are you insane? Especially coming from a designer. Why on earth wouldn't you split this into several PRs, especially if we're talking about front-end code?" Yet she did merge it. As the reviewing engineer, she ran the code locally, verified critical flows, and performed an end-to-end review. Looking at the diff, she saw mostly markup and CSS and figured, "Worst-case scenario, something will look ugly, so not too bad." All four automated CI suites—including security checks, linters, and automated tests—were completely green.
So Alicia shipped it—and it immediately broke in four ways. Despite the breakage, she still believes merging the PR was the right decision for structural reasons. As she points out, an engineering code review is fundamentally different from a QA review; it does not ask the same questions a QA review asks, and she hadn't thought to ask herself several of those questions before hitting merge.
[02:38](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=158s) Decomposing the Diff and Building the Harness
When decomposed, the 7,000-line diff was far less intimidating than it looked at first glance. A full 64% of the diff was a dev-only component catalog that was never served to end users, and there were only about 100 lines of net new production markup. The most critical piece of the entire PR, however, was a tiny 60-to-68-line "harness":
- **46 lines of design tokens** defining core values. - **A shared partial** called across 50 different call sites. - **A 10-line contract** in a `CLAUDE.md` file (which could equivalently live in an `AGENTS.md` file) containing natural-language rules for AI agents to follow—something the team simply referred to as "the contract."
Alicia explains how a designer came to ship a 7,000-line PR in the first place. She had been tinkering with the concept of agent harnesses in a codebase that served as an experimental playground for working safely with AI agents. Because the repository was already fairly agent-friendly, it was naturally "Arely-friendly" as well: it had solid branch protection rules, trustworthy CI checks, and custom bash hooks and permission settings that Alicia had configured so both she and Arely could work with agents without posing a threat to production.
While the team had already figured out how to use harnesses to guide agents on backend Ruby architecture and patterns, they hadn't quite cracked how to make agents do what they wanted on frontend screens. Their philosophy became: "let's try to enforce mechanically what can be mechanically enforced, and encode the rest of the patterns and the taste in written rules, natural language rules"—which Alicia jokes is "DHH's favorite language, we learned this morning." To kick things off so Arely could work directly in the codebase, Alicia committed an initial foundation of about 1,600 lines establishing the design harness. Arely then took over and contributed more than 6,000 lines—accounting for 94% of the branch additions. As Alicia summarizes the division of labor: "I built a track so Arely could drive."
[05:53](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=353s) The Four Escaped Defects and the Cost of Unenforced Rules
Even with the harness in place, four defects escaped into production—some of which were actually visible in the diff if a reviewer had known where to look:
| Escaped Defect | Cause & Impact | How It Was Caught | |:--- |:--- |:--- | | **24 hard-coded hex values** | Violated the exact token rule the PR was introducing for the first time (2 of the 24 were in files touched by the PR). | Post-merge design review | | **Duplicate canonical tag** | Introduced on a genuinely new page; rendered as nothing visually so there was zero user-facing impact. | SEO audit | | **Shrunken form labels** | A single line changed in one form builder propagated across every form label in the app. It was token-compliant and CI stayed green. | Human UX audit | | **White navbar on a white page** | Placed correctly in 4 places but missed on the 5th—an edge case where scrolling to a specific point turned the navbar white against a white background. | Human visual inspection |
At the same time, the structure of the harness *did* prevent a massive amount of drift. Hard-coded hex values across the codebase dropped from 119 down to just 24, and the agent introduced zero invented components and no arbitrary fonts or spacings. Still, the escaped defects carried a real cost: out of the 68-line harness, one unplanned UX audit, and four follow-up bug-fix PRs, only the harness itself had been planned. Reflecting on the experience, Alicia shares their biggest takeaway: "Yes, you can have a ton of rules, but a rule that is not enforced is not a rule. It's a suggestion."
[08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) The Onion Design Framework
Picking up the story, Arely explains a fundamental realization she had while generating screens with AI: the consumer of a design system is no longer just a human—sometimes it is an agent. When generating screens with agents, designers have to ensure that agents can read, understand, and apply the design system accurately. To make their system legible to agents, Arely and Alicia created a five-layer architecture where every outer layer depends on the decisions made in the inner layers. Because of its concentric structure, Alicia named it the **Onion Design Framework**.
```mermaid flowchart LR accTitle: The Onion Design Framework and Feedback Loop accDescr: Five concentric design system layers flowing from Tokens to Screens, with diagnostic evidence from Screens feeding back to fix inner layers.
subgraph Inner["Core Foundation"] L1["1. Tokens<br/>(Values: spacing, radius)"] --> L2["2. Primitives<br/>(Buttons, inputs, states)"] L2 --> L3["3. Composed Patterns<br/>(Working detail panels)"] end
subgraph Outer["Context & Output"] L4["4. Written Rules<br/>(Context & taste)"] --> L5["5. Screens<br/>(Assembled output)"] end
L3 --> L4 L5 -.->|"Diagnostic evidence<br/>(Fix root cause)"| L1 L5 -.->|"Diagnostic evidence<br/>(Fix root cause)"| L4 ```
Arely walks through each of the five layers from the inside out:
- **Layer 1: Core Tokens** — The innermost layer consists of strict value definitions—such as spacing, corner radius, and elevations—telling the agent: "you can build, but you can build only using these values." - **Layer 2: Primitives** — Built directly from the inner token values, primitives are the smallest functional building blocks, such as buttons, cards, and text inputs. Crucially, they are not just visually reusable; they also carry interactive states, accessibility, and special requirements. - **Layer 3: Composed Patterns** — Larger building blocks assembled from primitives that are already proven to work, such as a detail panel. Because the pattern already works, the agent shouldn't reinvent a new one every time—it should simply reuse the existing pattern and swap out the copy or specific content. - **Layer 4: Written Rules** — Arely's favorite layer, "because here is where all the magic happens. All the design decisions happen here." Written rules give the agent situational context so it knows which pattern to apply. To illustrate how Layers 2, 3, and 4 interact, Arely offers an analogy: in Layer 2 (Primitives), you have a big piece of wood, a frame, and a knob; in Layer 3 (Composed Patterns), those pieces form a working door that every user intuitively knows how to walk through; in Layer 4 (Written Rules), the agent is given the context to know *when* to use a solid wooden door versus a sliding glass door. - **Layer 5: Screens** — The outermost layer is the fully assembled screen output. Beyond delivering the UI, Arely emphasizes that the true value of the Screens layer is that it provides **evidence**. When an agent generates a flawed screen, you could simply patch the screen right away, "but that's not the value. The value is actually understanding why the agent made that mistake." By diagnosing the error on the screen, the team can trace the failure back to the responsible inner layer—whether that means fixing a broken or missing token in Layer 1 or clarifying an ambiguous instruction in Layer 4's written rules.
[12:01](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=721s) Benchmarking Harness Communication and the 33-Agent Experiment
To determine how to communicate the design system most effectively to AI agents, the team ran an empirical evaluation across three formats: Option A (a strict schema), Option B (a written prose style), and Option C (lint-annotated rules). Despite the initial hypothesis that lint annotations would perform best, Option C proved to be the worst performer. Both written style and strict schemas achieved strong results, but strict schemas were chosen for ongoing development because they proved significantly more cost-effective in token consumption.
```mermaid flowchart TD accTitle: Testing Communication Formats for Agents accDescr: Comparison of three prompt schemas for communicating design systems to AI models. subgraph Testing["Evaluation Methods"] A["Option A: Strict Schema"] -->|"Selected (Cost-effective)"| Success["High Accuracy"] B["Option B: Written Style"] -->|"High Accuracy"| Success C["Option C: Lint-Annotated"] -->|"Failed Expectations"| Worst["Worst Performer"] end ```
The team then set out to test a core question: can an agent adhere to a design system when given only a single, deliberately vague prompt? They tasked the models with a broad prompt: *"Build a product page for this app. Someone using it needs to see the products, edit one, and delete one."* A product page was specifically selected because human UX logic dictated that users needed to visually scan items as image cards rather than text rows in a table, even though software engineering convention defaults to tabular data representations.
The initial rollout was a frustrating failure across 33 separate agent runs. Only 18% of the executions produced the desired card-based layout; the other 82% fell back to standard tables. While the agent had technically followed the design system without human intervention—assembling a valid side panel, top bar, and table components from the repository—it missed the higher-level design intention entirely.
- The evaluated communication schemas: Strict Schema (Option A), Written Style (Option B), and Lint Annotated (Option C). - Benchmark sample size: 33 automated agent runs against the identical vague prompt. - Baseline success rate for expected visual patterns (cards vs. tables): 18%.
---
[14:04](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=844s) The Rookie Mistake and the Power of the Harness
Investigating the persistent failure revealed what Arely Rivera termed a "really rookie mistake": a single sentence in the agent instructions. Because LLMs operate with extreme literalism, the wording had inadvertently biased the agent toward generating a tabular structure. Once that single phrasing flaw was corrected, the benchmark achieved a 100% success rate across runs, reliably generating image cards instead of data tables.
To prove the utility of the scaffolding, the team ran a comparison test removing the harness entirely while maintaining the exact same model, repository access, design system, and prompt. Without the harness, the agent output degraded visibly into unstyled, disjointed HTML. Rivera noted that while the harness does not produce code that is immediately ready to deploy to production without review, it yields a dramatically superior starting baseline compared to unconstrained generation.
---
[15:02](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=902s) Taste, Judgment, and a Designer in the Rails Codebase
Evaluating these results led Rivera to confront an uncomfortable professional question: if an agent equipped with an effective harness can reliably reproduce design systems, does that make the human designer replaceable? Her conclusion was nuanced: repetitive, procedural execution is absolutely replaceable, but human judgment, taste, and user advocacy are not. "Repeatable is not the same as good," Rivera explained. The harness standardizes execution, but humans remain essential for deciding what deserves to be built, understanding real user constraints, and steering how the design system evolves.
```mermaid flowchart LR accTitle: Separation of Execution and Human Judgment accDescr: The division of labor between AI execution harnesses and human engineering judgment. subgraph AgentRole["The Harness & Agent"] H1["Repeatable Execution"] H2["Token & Component Adherence"] end subgraph HumanRole["Human Designer / Engineer"] J1["Taste & User Context"] J2["System Evolution & Strategy"] J3["Safety & Wiring Verification"] end AgentRole -->|"Provides Base Code"| HumanRole ```
This dynamic fundamentally altered Rivera’s own day-to-day work. At the start of the year, she did not know how to run a Rails application locally. Empowered by agents and engineering scaffolding introduced by Alicia Rojas, she now works directly within production Rails repositories across client projects. While Figma and traditional prototyping tools attempt to simulate realities, working directly in code exposed live platform constraints immediately. Because execution has become cheap and commoditized, human judgment and taste from both designers and developers have become significantly more valuable.
---
[17:10](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=1030s) Fidelity Testing, Window Washers, and Client Case Studies
Alicia Rojas rejoined the presentation to discuss how engineering teams can run fidelity testing on their own codebases to see whether an agent can survive their architecture. The speakers shared a public GitHub Gist providing their standardized testing prompt and framing guidelines. Rojas emphasized that teams should not view agent failures as prompting errors or LLM deficiencies, but rather as diagnostic feedback exposing missing constraints, ambiguities, or architectural gaps in their harness.
The framework, built on the five-layer "Onion Design Framework," was applied successfully across several client engagements at their software agency, Telos Labs:
- **Legal Tech Client:** Rivera designed directly in the application codebase using the harness, handing off functional PRs to engineers. This minimized fidelity loss between design intent and production implementation, serving as a functional foundation rather than an abstract mock-up. - **Rapid Turnaround Client:** Facing strict budget and time constraints, the team delivered a completely new product experience in under four days within a legacy repository that had a weak pre-existing design system by working backward from solutions.
Rojas closed with a safety analogy: window washers working on high-rise buildings are trusted for their skill, experience, and survival instinct, but buildings still mandate physical harnesses because "safety cannot be relying on trust alone." In software, "a rule that is not enforced, it's not a rule. It's a suggestion. And production can certainly not run on suggestions."
Rather than continuing decades of mutual babysitting—engineers policing designers' code contributions or designers scrutinizing production apps to see if their hex codes survived—the system itself should enforce baseline constraints. By delegating compliance checking to automated harnesses, engineers and designers can focus their time on taste, judgment, and high-level problem solving. Rojas challenged the Rails World audience with a parting question: *"Who on your team could be shipping if the harness were better?"*
## Notable quotes > [00:12](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=12s) Would you merge this? — Alicia Rojas
> [00:12](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=12s) Worst-case scenario, something will look ugly, so not too bad. — Alicia Rojas
> [02:38](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=158s) let's try to enforce mechanically what can be mechanically enforced, and encode the rest of the patterns and the taste in written rules, natural language rules — Alicia Rojas
> [02:38](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=158s) I built a track so Arely could drive. — Alicia Rojas
> [05:53](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=353s) Yes, you can have a ton of rules, but a rule that is not enforced is not a rule. It's a suggestion. — Alicia Rojas
> [08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) you can build, but you can build only using these values. — Arely Rivera
> [08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) because here is where all the magic happens. All the design decisions happen here. — Arely Rivera
> [08:23](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=503s) but that's not the value. The value is actually understanding why the agent made that mistake. — Arely Rivera
> [12:01](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=721s) Build a product page for this app. Someone using it needs to see the products, edit one, and delete one.
> [14:04](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=844s) really rookie mistake — Arely Rivera
> [15:02](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=902s) Repeatable is not the same as good. — Arely Rivera
> [17:10](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=1030s) safety cannot be relying on trust alone. — Alicia Rojas
> [17:10](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=1030s) a rule that is not enforced, it's not a rule. It's a suggestion. And production can certainly not run on suggestions. — Alicia Rojas
> [17:10](https://www.youtube.com/watch?v=D1Y3tzhiAkw&t=1030s) Who on your team could be shipping if the harness were better? — Alicia Rojas
## Mentioned Alicia Rojas, Arely Rivera, Telos Labs, Ruby on Rails, Rails World, Rails World 2026, Shopify, DHH, CLAUDE.md, AGENTS.md, Onion Design Framework, Figma, GitHub Gist
## Video description What happens when a designer ships a 7,000-line PR to production? At #RailsWorld 2026, Telos Labs software engineer Alicia Rojas and lead product designer Arely Rivera share the story of how a harness (design tokens, shared partials, and a short natural-language contract for AI agents) let Arely work directly in a Rails codebase, and what broke when it shipped anyway.
They introduce the Onion Design Framework, five layers running from tokens and primitives to composed patterns, written rules, and screens, built so that agents can read and follow a design system. They also share results from running 33 agents on a single vague prompt, the one-sentence mistake that changed the outcome, and why cheaper execution makes human judgment and taste more valuable, not less.
*** Thank you Shopify for sponsoring the editing and post-production of these videos. Check out insights from the Engineering team at: https://shopify.engineering/
[Source](https://www.youtube.com/watch?v=D1Y3tzhiAkw)