Rails World 2026: How a Designer started shipping production Rails (Alicia Rojas and Arely Rivera) Video: https://www.youtube.com/watch?v=D1Y3tzhiAkw Talk page: https://www.rubyevents.org/talks/layered-design-layered-trust-how-a-designer-started-shipping-production-rails Unedited machine transcript, generated with Whisper. It contains recognition errors (names, technical terms). Check the video before quoting. ---- I'm Alicia Rojas. I'm a software engineer. I've been developing software with Telos Labs for about five years. I'm super excited to be here. Also big thanks to the organization who slightly bent the rules to allow me to be here today with this wonderful designer, Arely. Hi, everybody. I am a lead product designer. I've been designing for the last eight years, and the last three years I've been working with Alicia in Telos Labs. So today we're going to talk about the story of how this designer here started shipping Rails into production. So imagine your hand at this PR. 7,000 lines added, almost 2,000 lines deleted, and 153 files touched. Would you merge this? Okay, maybe three or four years ago I would have seen this and I would have thought, like, 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? Nonetheless, I did merge it. I did merge it. I did merge it. It was reviewed. It was reviewed. I was the engineer who reviewed it. I run it locally. I made sure everything was working well. The critical flows. I did end-to-end review. It was fine. I looked at the diff and saw mostly markup on CSS. So I thought, worst case scenario, something will look ugly. So not too bad. It had four CI checks working well. So all green. So all green. Security, security, linters, automated tests, all looking good. So I shipped it. So I shipped it. And it broke. In four ways. I still think it was the right thing to do, to merge it. And the reason of that is structural. And that's what we're going to talk about today. So an engineer review is not the same as a QA review. It doesn't ask the same questions. So yeah. It did break. It did break. So what these over 7,000 lines actually were. When you look at the decompose diff, it's a bit less impressive than it seems at first impression. So 64% of it, it was a dev-only catalogue that was never served to a user. It only had about 100 lines of net new production markup. And here's the data. And here's the interesting number. And here's the interesting number. And here's the interesting number. It had 60 lines of a harness. This harness was 46 lines of tokens. A partial that was called across 50 sites. And a 10-line contract in a cloud MD file. So natural language rules for the agent to follow. It could be also an agent's MD or whatever you use. We just call it the contract. So let's take a step back. So let's take a step back. So let's take a step back and talk about how this come to happen. How did designers ship a 7,000 lines PR. I had been tinkering and playing around with this idea of harnesses for a while now. And we had this code base which was kind of a playground to experiment and implement harnesses to be able to work with agents in a safe way. So it was already fairly friendly as well. So it had decent branch protection rules. So it had decent branch protection rules. CI checks that were trustworthy. And I had personally set up some bash hooks and permission settings that allowed me to work safely with agents in it and also allowed me to trust that Adeli could work on it without presenting like a threat to production. So we have been thinking about the idea of harnessing harnesses for software and patterns. And we came to the idea of the idea of the idea of harnesses for design work. So how do we make the agents do what we want in terms of the screens and the front end stuff. We had been kind of achieving that goal in the Ruby part, but not quite in the front end part. So we took this idea of let's try to enforce what can be mechanically enforced, and like encode the rest of the patterns and the taste in like written rules, language rules. DHA's favorite language we learned this morning. So I started this so I really could work in the front end right directly in the code. So I did this harness commit, which was about 600 lines with the foundations of the idea of harness the designer. And then I really took it and she like overtook it and did more than 6,000 lines. So 94% of the branch additions were hers. This split is kind of the story and the kind of core of this idea here. I built a track so I really could drive. But yeah, as I said earlier, four defects escaped. And to be honest, some of them were actually interesting. First, it had 24 hard-coded hex values, which is kind of awkward because it was violating the same rule this PR was implementing for the first time. Two of those hard-coded hex values were in files it had touched. And a design review caught it afterwards. There was a generally new page introduced which had a duplicate canonical tag. It was rendered as nothing, so there was no one user impact. It was a user impact visually. And an SEO audit caught it. And an SEO audit caught it. Then there were two other defects that were only visible by a human or an agent looking at the page. So one of them was that every form label in the app shrank. It was one line in one form builder that propagated elsewhere. This was token compliant. The CI was green. No one caught it. It was a human afterwards. Doing a human afterwards. Doing a UX audit. Then we had a white nav bar on a white page. Then we had a white nav bar on a white page. But to be fair, it had been correctly placed in four other places, but missed on the fifth. And it was like a weird edge case where scrolling at a certain point would render the nav bar white. And again, only a human look caught it. What the structure did caught it. We had no other things. We had no other things. We had no other things. We had no other things. We had no other things. So we went down from 119 hard-coded hex values to just 24, which is good. We had no invented components. No arbitrary fonts or spacing. So the harness kind of did what it had to do. But yeah, these defects occurred. And they had a cost. We had one unplanned UX audit. And four follow-up PRs to fix these defects. And only one of these three things. And only one of these three things. And only one of these three things was planned. And only one of these three things was actually planned, which is the harness. The 68 lines of harness. So what we learned from this exercise is that yes, you can have a ton of rules. But a rule that is not enforced is not a rule. It's a suggestion. And with all that said, we came to a realization. Now that I've been working with agents, I've been generating screens with agents with agents. The design system with agents. The main reader is not a person anymore. It's not a person anymore. Sometimes it can be an agent. Sometimes it can be an agent. And when we are generating screens with agents, we need to make sure that they understand the system, that they can apply the system correctly, and that they can read the system. That's why we came with this system of five layers. Each of these layers has their own function, and they all depend on the decision in the inner layer. And Alicia, they came with the name because it came with the name because it kind of looks like an onion, right? So Alicia named it the onion design framework. So let's go layer by layer. The core layer, which is basically telling the agents that you can build, but you can build only using these values. They are just value definitions that you can -- some examples will be spacing, corner radius, elevations, and stuff like that. And then we have the next layer, which is primitives. This layer, of course, has the values of the inner layer tokens. Basically, you will find the smallest building block that we have. Buttons, think about cards, think about input text, all those small values. And they're not only visually reusable, they are actually - they carry states, they carry accessibility, and they can carry special requirements. The next layer is called compose patterns. Think about building blocks that are built of, of course, the smallest building blocks of primitives. But these building blocks already work. Let's say that you have a detailed panel that you know it works, so the agents shouldn't be inventing a new one all the time. So just use where it already works and just change the copy or whatever you're changing. But that's basically compose patterns. And then we go to my favorite layer, which is written rules. That's my favorite layer because here is where it all the magic happens. All the design decisions happens here. And in written rules, you will find the context for the agent. The agent will know what situation they're in so that they can make the right decision to follow the right pattern. And I want to make an analogy. Think about in layer two, primitives, you have a piece of wood, a big piece of wood, a frame, and a knob. And in layer three, compose patterns, you have a door. You know a door works, that pattern, every user knows how to enter a door. Every user knows how to enter a door. But in written rules, you will find the agent will know when to use a wooden door versus a sliding glass door. That's basically the magic of written rules. And then the last layer is screens. Screens is the output, everything assembled. But there is something really valuable about this layer is that you can find evidence. And what do I mean by evidence. Evidence is when we have a generated screen by an agent. Evidence is when we have a generated screen by an agent, we can see what went wrong. But we can, of course, fix it right away. But that's not the value. The value is actually understanding why the agent made that mistake. Once you do, you can actually go to our layers and fix it. Was it a broken token? We were missing something on tokens. Was it something wrong with written rules? So, after all these layers came through, we still wanted to come through, we still wanted to answer the question, we still wanted to answer the question, like, how do we communicate this effectively with the agents? So, we run three tests. So, we run three tests. Option A was a strict schema. Option B was a written style. And option C was a linked annotated. My assumption was that option C was going to win, but it actually was the worst. And written style and strict schema did great, actually. But we decided the strict schema because it's more cost effective. And now that we have all this. And now that we have all this, we wanted actually to test it to answer the next question. Can an agent follow a design system from one prompt? And we selected a really vague prompt intentionally, and this is it. Build a product page for this app. Someone using it needs to see the products, edit one and delete one. Pretty vague, just to see can the agents actually follow the system and make the right decisions and exceed my expectations. And the reason why we selected the product page. And the reason why we selected product page is because in this case, in this case, in this case, in this case, for users, it was better to have scanning products as cards as images than rows as a table, because the expected pattern is to do a table. But we have everything ready and set up and where expectations were high, but it failed 33 times. We run 33 agents with that same prompt. And so, in this case, in this case, only 18% of the time, they actually followed the pattern that we were expecting. And if we take out that we were expecting to have cards instead of a table, it's great. Look at it. It's actually, I mean, there's no human intervention. It made a great result. We have a side panel, a top bar, we have a table. A table you're looking at is part of the design system. So it was making great decisions, but it was still wrong. So, I was just getting really frustrated about it. So I was getting really frustrated about it, not understanding what was going on. I was getting really frustrated about it, not understanding what was going on. I run a lot of agents and then I realized that I made a really rocky mistake. And it was a sentence. And because I forgot that I was talking to agents, agents are quite literal. So whatever, what I was telling them to do, they were actually doing it, but that was my mistake. So after changing it, 100% of the runs actually exceed the same, it was my expectation. It gave me a cards over table. So now that we have this framework. So now that we have this framework, what will happen if we remove the harness and just keep the same prompt, the same model, the same access to the design system, the same repository, and I think you can see it for yourself, these images speak from themselves. I'm not saying that with the harness it's perfect. I'm not saying that this is ready for users, that this is ready for deploy, no. But I think it's a better start than with no good harness. Looking at this. Looking at this, looking at this, I started to question, I started to ask this question that is really uncomfortable. Does this mean that having a good harness, having a good design system, understanding agents and agents actually knowing your system, does this mean that I am replaceable? And to be honest, they're a pretty process, yes, definitely. But the judgment, no. And I think that's a great thing. Because repeatable because repeatable because repeatable because repeatable is not the same as good and the harness has made execution repeatable. We still need someone to determine what's worth being repeated. We still need to understand users. We still need to understand users. We still need to evolve the system to apply taste, to know the system, to grow the system. And I want to share something that in the beginning of this year, I didn't even know how to run a Rails project. And that's honest. But now I've been working. But now I've been working. But now I've been working in a lot of Rails repositories. I've been working in a lot of Rails repositories. Thanks to that I can work with agents. And thanks to Alicia, that door has been open for me. And I've been doing more impact and impact more in a better way products because I can actually work in the repository. I can actually work in the product. Because I can see at live, like constraints, I can actually experience it. And it's not that I couldn't before. We had other tools. And it's not that I could replicate it. But at the end of the day. But at the end of the day, a prototype is still a prototype. And that's why I feel that being able to work in a repo has made me a better designer. And after doing, working all these months this way, I came to a realization and to answer the question if I am repeatable, if I am replaceable, I came to a conclusion that now that execution has been cheaper, it definitely made the value of made the value of judgment of developers and designer way more valuable. So, are you ready to test whether your Rails codebase will survive a code agent or the other way around? Like, will a code agent survive your codebase? If you're interested in doing this fidelity testing at Elie just showed, we have a guest prepared for you with the prompt. And it's kind of broad framing for an agent to just go and implement something with the least context given. So, you may treat defects in the result, not as a defect in your prompt, not as a defect in the agent, but as a gap in your system, right? A gap in your harness. So, do it a couple of times. Don't stay with the first result. You might have different results, but it will for sure give you an idea of where you might improve your harness. So, for sure give you an idea of where you might improve your harness. So, this framework travels. So, this framework travels. We are a software agency, so we work with different clients. We have implemented parts of this framework, this onion layer design in different products. We have a product from the legal tech industry in which the design team, AKA Arely, has been designing directly in code and handing the software to the design in code. So, so there is much less. There is much less loss between the mock-up and the actual code that is built. So, there is much less loss between the mock-up and the actual code that is built. This, again, doesn't mean this will be shipped straight to production without an engineer actually looking at it and actually making the wire, but it definitely is a better starting point for a developer than a Figma thing, right? Then we had another case study where in under four days, working from their own code base, we developed a code base, we developed a whole new experience. We developed a whole new experience. It had a very poor design system. It had a very poor design system, but with this harness, it was way faster to build it, which was important because we had kind of severe budget constraints with this client. So, in this case, we started from the solution and worked backwards. So, let's take a step back and be philosophical for a moment. And I'm going to use an analogy here, because analogies are on trend. Let's think of a window washer, right? He or she is standing in a high-rise. We trust their judgment that they're not going to throw themselves into the void. We trust their experience that they're not going to fall, but we do still install the harness, right? Because safety cannot be relying on trust alone. And in software, it's kind of the same. We have learned that a rule that is not not enforced. It's not a rule. It's not a rule. It's a suggestion. It's a suggestion. And production can certainly not run on suggestions. This has been kind of never one-directional, though. Like, we tend to think that developers are babysitting designers in this, but designers have been babysitting us for years. Like, checking that the colors they picked, the fonts they picked, and Figma survived into the code. And I don't really want to work in a team. I don't really want to work in a team where anyone babysits anyone, right? So, we build the harness, we build the system, we build the system, we let it do the checking, and then we keep the people for judgment and taste. So, open your repo this week and ask yourself the question we came here to ask you. Who on your team could be shipping if the harness were better? Thank you. Thank you. Thank you. Thank you. Thank you so much for being here. Thank you so much for being here. If you love this talk, we have the written version of it in this QR. So, take the button home. This contains the examples, the prompt, what broke, so you can bring it to your own repository and tell us how it went. I have another talk that I did before on harness engineer for Rails specifically. You can check in later and I can share the information that you where it is. Thank you where it is. Thank you so much. Thank you so much. Thank you so much.