How a Designer Started Shipping Production Rails: The Harness Behind a 7,000-Line PR

Open on YouTube ↗
Overview

At Rails World, Telos Labs software engineer Alicia Rojas and product designer Arely Rivera described how Arely went from not knowing how to run a Rails project to shipping front-end changes into production. The work ran through AI agents, guarded by what they call a "harness." Their central claim is that safety and quality cannot depend on trust in a person or an agent. They have to be built into the system. They also argue that as execution becomes cheaper, human judgment and taste become more valuable. They told the story through one large pull request, including what went wrong after it shipped.

13 min read
0:58

The PR: 7,000 Lines From a Designer

Rojas, who has developed software with Telos Labs for about five years, opened with the pull request itself. It added more than 7,000 lines, deleted almost 2,000, and touched 153 files. She said that three or four years earlier she would have reacted with disbelief, especially because a designer wrote it, and would have asked why it wasn't split into several PRs.

She merged it anyway. She was the reviewing engineer. She ran the branch locally, checked the critical flows, and did an end-to-end review. The diff was mostly markup and CSS, so she reasoned that the worst case was "something will look ugly." Four checks passed: security, linters, automated tests, and the rest of CI.

It broke in four ways. Rojas still thinks merging was the right call, and she says the reason is structural. An engineering review asks different questions from a QA review, and she hadn't asked herself some of the questions a QA reviewer would.

2:44

What the 7,000 Lines Really Were

Rojas said the decomposed diff is less impressive than the headline number:

  • 64% of the PR was a dev-only component catalog that is never served to users.
  • About 100 lines were net-new production markup.
  • About 60 lines were what she called the harness, made up of:
    • 46 lines of design tokens
    • a shared partial called from about 50 sites
    • a 10-line "contract" in a CLAUDE.md file, written as natural-language rules for the agent to follow. She noted it could equally be an AGENTS.md or whatever file a team uses.

She later gave the harness size as roughly 60 to 68 lines. Either way, she treats this small piece as the most interesting part of the PR.

3:41

How the Codebase Got Ready for a Designer

The PR was possible because the codebase was already a playground for Rojas's experiments with agent harnesses. It had decent branch protection rules and trustworthy CI checks. She had also set up her own bash hooks and permission settings so she could work safely with agents. Because of that, she says, the codebase was already "agent-friendly," and so it was also friendly to Arely. Rojas could trust that Arely working in it would not threaten production.

The team had already applied the harness idea to software architecture and patterns on the Ruby side with some success. Front-end work was different: they had not managed to get agents to reliably produce the screens they wanted. So they carried the same principle over to design work. They enforce mechanically whatever can be enforced mechanically. Everything else, including patterns and taste, goes into written natural-language rules. Rojas joked that this is "DHH's favorite language," referring to that morning's keynote.

Rojas wrote the first harness commit, about 1,600 lines that laid the foundations, so Arely could work directly in the front-end code. Arely then built on it with more than 6,000 lines, so 94% of the branch's additions were hers. Rojas said this split is the core of the story: she built a track so Arely could drive.

6:05

The Four Defects That Escaped

Rojas admitted that some of the defects were visible in the diff.

  1. 24 hard-coded hex color values remained. This was awkward, since the PR was introducing the very rule against them. Two of the 24 were in files the PR had touched. A later design review caught them.
  2. A new page had a duplicate canonical tag. It rendered as nothing, so users saw no impact. An SEO audit caught it.

The other two could only be seen by a human, or an agent, actually looking at the page:

  1. Every form label in the app shrank. One line in one form builder propagated everywhere. The change complied with the tokens and CI was green. Nobody noticed until a human ran a UX audit afterwards.
  2. A white navbar appeared on a white page. The navbar had been placed correctly in four places but not in a fifth. It was an edge case where scrolling to a certain point turned the navbar white. Again, only a human caught it.

What the Harness Did Catch, and What It Cost

Rojas also reported what the structure did catch. Hard-coded hex values dropped from 119 to 24. There were no invented components and no arbitrary fonts or spacing. In her view, the harness did its job.

The defects still had a cost: one unplanned UX audit and four follow-up PRs. Of the three things she listed (the harness, the audit, the follow-ups), only the harness was planned. Her lesson: "you can have a ton of rules, but a rule that is not enforced is not a rule. It's a suggestion."

8:29

The Design System's Reader Is No Longer Only a Person

Rivera, a product designer for eight years who has worked with Rojas at Telos Labs for the last three, explained the conclusion she reached from generating screens with agents. The reader of a design system is no longer always a person. Sometimes it is an agent. For agents to generate good screens, they must be able to read the system, understand it, and apply it correctly.

That led to a five-layer model. Each layer has its own function and depends on the decisions in the layers inside it. Rojas named it the Onion Design Framework because of its shape.

9:19

Layers 1–3: Tokens, Primitives, Composed Patterns

Tokens are the core. They tell the agent that it may build, but only with these values. They are pure value definitions such as spacing, corner radii, and elevations.

Primitives are built from tokens and are the smallest building blocks: buttons, cards, text inputs. Rivera stressed that they are not just visually reusable. They carry states, accessibility, and any special requirements.

Composed patterns are larger blocks made from primitives, and they are already known to work. Her example was a detail panel that has proven itself. The agent should not invent a new one each time. It should reuse the working pattern and change only the copy or whatever actually needs to change.

Layer 4: Written Rules

Rivera called written rules her favorite layer, "because here is where all the magic happens." This is where design decisions live. It gives the agent context about the situation it is in, so it can choose the right pattern.

She used a door analogy. In the primitives layer you have a large piece of wood, a frame, and a knob. In composed patterns you have a door, which works because every user knows how to go through one. Written rules are what tell the agent when to use a wooden door and when to use a sliding glass door.

Layer 5: Screens as Evidence

The outer layer is screens, where everything is assembled into output. Rivera said this layer is also valuable as evidence. When an agent-generated screen goes wrong, you can fix it immediately, but she said that isn't where the value is. The value is in understanding why the agent made the mistake, then going back into the inner layers to fix the cause. Was a token broken or missing? Was something wrong in the written rules?

How Should the System Be Written for Agents?

With the layers defined, the team still wanted to know how to communicate the system to agents most effectively. They tested three formats:

  • A: a strict schema
  • B: a written style
  • C: lint-annotated

Rivera expected C to win, but it performed worst. A and B both did well. They chose the strict schema because it was more cost-effective.

12:36

33 Agents, One Vague Prompt

Next they tested whether an agent could follow the design system from a single prompt. They deliberately chose a broad one: "Build a product page for this app. Someone using it needs to see the products, edit one, and delete one."

They chose a product page for a specific reason. For these users, scanning products as cards with images was better than reading rows in a table. A table is the conventional pattern, so the test checked whether agents would follow the system's guidance instead of the default.

They ran 33 agents on the same prompt. Only 18% followed the expected cards pattern. Rivera pointed out that apart from the table-versus-cards choice, the output was strong. With no human intervention, the agents produced a side panel, a top bar, and a table that came from the design system itself. The decisions were good, but the result was still wrong.

After much frustration and many more agent runs, Rivera found what she called a rookie mistake: a single sentence in her own instructions. She had forgotten that agents are quite literal, and they were doing exactly what she had told them to. She did not say in the talk what the sentence was. After she changed it, 100% of runs produced cards instead of a table, which she said exceeded her expectations.

14:46

With and Without the Harness

They then removed the harness and kept everything else the same: the prompt, the model, access to the design system, and the repository. Rivera showed the results side by side and said the images speak for themselves. She added that the harnessed version was not perfect and not ready to deploy. Her claim was only that it was a better starting point than the version without a harness.

15:08

"Am I Replaceable?"

Rivera said the results raised an uncomfortable question for her. If a good harness and design system let agents know and apply her system, is she replaceable? Her answer: the process, yes, definitely; the judgment, no. She sees that as a good thing. "Repeatable is not the same as good." The harness made execution repeatable, but someone still has to decide what is worth repeating, understand users, evolve and grow the system, and apply taste.

She also spoke about her own experience. At the start of this year she didn't know how to run a Rails project. Now she works in many Rails repositories, which she credits to working with agents and to Rojas opening that door. Working in the real product lets her see and experience constraints live. She said it wasn't that she couldn't do this before, since other tools roughly replicated it, but "a prototype is still a prototype." Working in the repository has made her a better designer, she said, and has let her have more impact on products. Her conclusion after months of working this way is that cheaper execution has made the judgment of developers and designers much more valuable.

17:22

Fidelity Testing: Will a Cold Agent Survive Your Codebase?

Rojas then turned the question to the audience: will a cold agent survive your codebase? The team has prepared a guide with a prompt and broad framing for this kind of fidelity testing. You ask an agent to implement something with as little context as possible. She suggested treating defects in the result not as flaws in the prompt or the agent, but as gaps in your system and your harness. She advised running it several times rather than trusting the first result, since outcomes vary, as Rivera's had.

18:18

The Framework in Client Work

As a software agency, Telos Labs has applied parts of the framework to several client products. Rojas gave two examples.

On a legal tech product, the design team (meaning Rivera, Rojas joked) has been designing directly in code and handing designs to developers that way, so much less is lost between mockup and built code. Rojas stressed that this still doesn't mean shipping straight to production without an engineer reviewing and wiring things up. She called it a better starting point for a developer than "a Figma thing."

In another case, working from the client's own codebase, they built a whole new experience in under four days. The client's design system was weak, but Rojas said the harness made building much faster. That mattered because the client had severe budget constraints. Here they started from the solution and worked backwards.

19:24

Harnesses Aren't About Distrust

Rojas closed with an analogy. A window washer on a high-rise is trusted not to throw themselves off and trusted to have the experience not to fall, yet we still install a harness, because safety cannot rely on trust alone. Software is the same: a rule that isn't enforced is only a suggestion, "and production can certainly not run on suggestions."

She added that this has never been one-directional. People tend to assume developers babysit designers in this arrangement. But designers have been babysitting developers for years, checking whether the colors and fonts chosen in Figma survived into the code. She said she doesn't want to work on a team where anyone babysits anyone. So the system does the checking, and people are kept for trust, judgment, and taste.

Her closing question to the audience: open your repo this week and ask, "Who on your team could be shipping if the harness were better?"