<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yadira Garnica Bonome on Medium]]></title>
        <description><![CDATA[Stories by Yadira Garnica Bonome on Medium]]></description>
        <link>https://medium.com/@ygarnicab?source=rss-c6cf0a2c9a62------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0epfDhyago7hcAZNWSke2g.png</url>
            <title>Stories by Yadira Garnica Bonome on Medium</title>
            <link>https://medium.com/@ygarnicab?source=rss-c6cf0a2c9a62------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:44:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ygarnicab/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Going AI-first in a payments team, part 6: measuring what changed, and what the numbers can’t tell…]]></title>
            <link>https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-6-measuring-what-changed-and-what-the-numbers-cant-tell-18aea0c92e01?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/18aea0c92e01</guid>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[engineering-metrics]]></category>
            <category><![CDATA[performance-management]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 11:42:55 GMT</pubDate>
            <atom:updated>2026-11-19T11:42:55.685Z</atom:updated>
            <content:encoded><![CDATA[<h3>Going AI-first in a payments team, part 6: measuring what changed, and what the numbers can’t tell you</h3><p><em>How we know if going AI-first is working: the metrics of the team, the signals from the product, the targets of our plan, and why, for each person, the data is only the beginning of the conversation.</em></p><p>In the <a href="https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-5-testing-what-the-agents-build-0e9746ad81f5">previous article</a> I described how we test what the agents build. This is the last article of the series, and it’s about the question I get most often when I talk about all of this: how do you know it’s working?</p><p>It’s a fair question. In the first article I shared our results: cycle time down 25%, pull request throughput up 5%, and change-failure rate down 30%, from one quarter to the next, without adding people or hours. But a number like that is only useful if you trust how it was measured, and if you know what it leaves out.</p><p>So in this article I’ll show you how we measure, at four levels: the team, the product, the strategy, and each person. And I’ll try to be honest about the limits of each one, because the more human the question gets, the less the data can answer on its own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M39YWrxCH8kLGBzMN2B4kA.png" /><figcaption><em>The closer the question gets to a person, the more the conversation matters and the less the number does.</em></figcaption></figure><h3>The team: one report per quarter</h3><p>The main tool is a skill that generates our quarterly metrics report. It reads Jira and GitHub, read-only, and it produces a short report for leadership and a one-page dashboard.</p><p>The first part of the report answers a simple question: where does our time go? Every ticket and pull request falls into one of four groups, week by week:</p><ul><li><strong>New product development</strong>: the features</li><li><strong>Operational excellence</strong>: refactors, performance, tests, technical debt</li><li><strong>Keeping the lights on</strong>: bugs and vulnerabilities</li><li><strong>AI contribution</strong>: the work on our metarepo that changes how we work, like a tool, an agent or a skill. A pull request that only updates a spec or a cycle doesn’t count here.</li></ul><p>The second part has four engineering metrics, each one with a target:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ImmWJzQuj4HDUJdRN7YurA.png" /><figcaption><em>Four numbers, each with a target, every week and for the whole quarter.</em></figcaption></figure><p>A few details matter more than they seem. Cross-stack counts technologies, not repositories: three of our repositories use the same backend language, so moving between them doesn’t count as crossing a boundary. And its denominator is the whole team, so a person who shipped nothing that week stays visible instead of disappearing from the figure.</p><h3>The engine calculates, the AI writes, a person decides</h3><p>The way the report is built is close to everything I described in this series. The engine is deterministic: the same data always gives the same numbers. The AI comes after it, and it has clear limits.</p><p>It can choose and order the highlights of each week for the audience, and write the text around them. But it must never add an item that isn’t in the data: if a ticket is not there, it didn’t ship that week. When a ticket stays open for an unusually long time, the engine takes it out of the totals and lists it as an outlier, and a person checks whether it was real work or a ticket that was left in the wrong state. And nobody, human or agent, can change a threshold or a definition in passing: that’s a change to how we measure, and it needs a person’s explicit approval.</p><h3>Measure honestly, even when it looks worse</h3><p>There is one story about our change-failure rate that taught me a lot.</p><p>Our first version counted every bug-fix pull request as a failure. With that definition, one quarter showed a change-failure rate of 17.7%, which looked terrible. But when we looked closely, almost none of those pull requests were real production failures: only 4 were real reverts, none came from a hotfix branch, and many were bugs found and fixed during the development of a feature, before it ever reached a customer. So we redefined the metric: a failure is now a revert, a hotfix, or a fix linked to a real production bug. For the same quarter, the honest figure was 8.1%.</p><p>That was still above our target, but now it was a number we could act on. And we kept the old calculation in the report, renamed as “bug-fix PR rate”, so we didn’t lose the history. A metric you can’t trust is worse than no metric.</p><h3>What each metric doesn’t measure</h3><p>My favourite part of our metrics documentation is a short section under every metric called “What it doesn’t measure”. Lead time counts the hours a ticket was open, not the hours someone worked on it. Cross-stack counts one small pull request in a technology the same as fifty. Spec coverage counts a three-line request the same as a complete plan. The change-failure rate doesn’t say how serious a failure was, or how fast we fixed it.</p><p>Writing these limits down next to the formulas keeps us humble when we read the dashboard. And it prepares the ground for the last section of this article.</p><h3>The product: what our users experience</h3><p>The quarterly report looks at us. But a payments team also needs to look at what doctors and patients experience, and for that we use a second tool: a product signal report.</p><p>It reads the support tickets of the last three months and groups them into the areas of our product, like onboarding, transactions, payouts or invoicing, each one split into smaller clusters. It also shows which stage of the customer lifecycle each problem affects, and whether the doctor or the patient feels it. The goal is to see the biggest sources of friction, so we can decide what to improve and what to build next.</p><p>There is one number in this report that I find especially useful: the share of bug tickets that are closed as “not a bug”. When a person reports a bug and the system is working as designed, nothing is broken in the code. But something is broken in the experience: the product was not clear enough. So the report shows that rate month by month, with its trend, and it names the three clusters that produce the most “not a bug” tickets. For the clusters where we know the fix, it also suggests one, for example a self-service guide that explains the status of a payment.</p><p>And, like everything else, the AI helps but doesn’t decide. The classification is deterministic and has its own tests. When too many tickets end up in the “other” bucket, or a ticket lands in the wrong cluster, a skill reads them and proposes new clusters or rule fixes, and nothing changes until a person approves it.</p><p>We also use this to measure the effect of one specific change. For example, a page counts the payment-status tickets every month, with a marker on the month a change reached production, so you can see the before and the after on the same chart. One rule there says a lot about how we think: never place the marker before the change is really released, because a marker for something that isn’t live claims an effect that doesn’t exist.</p><h3>The strategy: is AI-first working?</h3><p>When I wrote our AI-first plan, I included a section called “Success definition”. It says we succeed when delivery improves without increasing risk, and it defines a target for each metric. These are the main ones:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RI0DX4l8NxtP6-t67-MnqQ.png" /><figcaption><em>The targets we wrote down in the plan, before we started.</em></figcaption></figure><p>Comparing Q2 with Q3 2026, our cycle time went down 25%, inside the range the plan set. Pull request throughput went up 5%, and the change-failure rate went down 30%, so we delivered more without breaking more. That was the one condition I cared about most: speed with more risk would not have been a success.</p><p>Some metrics of the plan, like onboarding time or the accuracy of the plans that the AI proposes, are not part of the quarterly report, so I’m not sharing a number for them here.</p><h3>Each person: the data is only part of the story</h3><p>This is the part I care about most, and the one where it’s easiest to get wrong.</p><p>With all this data, it would be easy to turn people into a ranking. But the numbers only show patterns. They can’t tell us why something happened, and in a team, the why is almost everything.</p><p>These are the signals I look at for each person:</p><ul><li><strong>delivery</strong>: how often they open pull requests, and how big they are</li><li><strong>quality</strong>: how much of their work had to be rewritten, and the change-failure rate of their changes</li><li><strong>AI contribution</strong>: their pull requests to the metarepo, the tools, agents and skills that make everyone faster</li><li><strong>collaboration</strong>: their reviews, with comments and approvals, and the customer care tickets they helped solve</li><li><strong>ownership</strong>: the initiatives they own end to end, as I described in the second article</li><li><strong>range</strong>: their cross-stack work</li></ul><p>And to see growth, I compare each person with themselves, between the first and the second half of the performance cycle.</p><p>But the data is only one part. The rest comes from outside the dashboards: our one-to-ones, personal goals that we set every quarter as OKRs (an objective and a few key results that show if we reached it) and track together, feedback from peers, and feedback from the stakeholders they work with. A person who spent a month unblocking others, or deep in a difficult incident, can have quiet numbers and still have had their best month. Only a conversation shows that.</p><p>And there is one more thing I like a lot: the data is not only mine. Each person can look at their own numbers and compare them with the team metrics on their own. Then they can bring that to the one-to-one: a blocker they found, a conflict, or an idea that would help them grow. When the person who brings the number is the person it’s about, the conversation is very different. It’s not an evaluation anymore, it’s a plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9QwH8CQfrU4619fhbmtE1g.png" /><figcaption><em>The numbers start the conversation. They never end it.</em></figcaption></figure><h3>Closing the series</h3><p>When we started, our bottleneck was not writing code. It was understanding a system whose context lived in a few people’s heads. Six articles later, I think that’s still the best summary of what we changed. We wrote the knowledge down, we gave agents the skills to use it, we surrounded them with guardrails and tests, and we measured the result.</p><p>The agents changed how fast we can turn a decision into code. But the decisions, the reviews, the trade-offs and the growth of each person on the team are still human. And I think that’s exactly how it should be.</p><p>Thank you for reading the whole series, and for all your comments along the way. If you’re starting something similar in your team, I’d love to hear how it goes :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18aea0c92e01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going AI-first in a payments team, part 5: testing what the agents build]]></title>
            <link>https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-5-testing-what-the-agents-build-0e9746ad81f5?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e9746ad81f5</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-testing]]></category>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 10:00:51 GMT</pubDate>
            <atom:updated>2026-11-19T10:40:12.808Z</atom:updated>
            <content:encoded><![CDATA[<p><em>When agents write code this fast, “it works on my machine” is not a strategy. This is how we test their work: a test plan before the code, a baseline for every application, end-to-end tests written in Markdown, and checks that never get tired.</em></p><p>In the <a href="https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-4-the-guardrails-3418d5ccfd23">previous article</a> I described the guardrails that keep our agents safe: rules, hooks, checks and a person who merges.</p><p>But a guardrail tells you what an agent must not do. It doesn’t tell you that what it did actually works. And when each engineer runs five or six agents in parallel, the amount of code that needs to be proven grows a lot faster than the time we have to look at it.</p><p>So we asked ourselves two questions. Does each change come with the tests that prove it? And do the tests we already have stay, or do they quietly disappear one pull request at a time? In this article I’ll show you how we answer both.</p><h3>The test plan comes before the code</h3><p>In our workflow, the tests are decided in the plan, before anyone writes a line of code. Every acceptance criterion of the change gets a row in the plan’s test scenarios, and every row says which kind of test proves it:</p><p>Test typeWhat it reachesunitone class or component, nothing outside its processin-processone service, with its own database where the suite already uses ite2e-playwrighta committed browser test against a test environmente2e-mobilea committed test on a devicee2e-aia Markdown scenario that an agent runs, across all our applications</p><p>The rule to choose is simple: the lowest layer that can see the behaviour. An end-to-end test is slow, it breaks for reasons that have nothing to do with the change, and it doesn’t run on every change, so we use it only when no lower layer can reach the truth. And when a criterion really can’t be tested automatically, the plan says so: the row gets a dash, and the gap is written down as an accepted risk, so a missing test is a decision someone made and not something we forgot.</p><h3>Four kinds of tests a cycle can owe</h3><p>Choosing the layer is only half of the plan. The other half is deciding what to test, and “write tests for the change” means very different things depending on the change. So we split it into four kinds of tests. Each one applies only when the change needs it, and each one has its own table in the plan.</p><p><strong>Criterion cases.</strong> “The happy path plus one failure” is not enough, so for each acceptance criterion the plan names four cases: positive, negative, edge and boundary. Our testing guide has an example that I like a lot. Imagine the criterion “a refund is refused once the visit has started”:</p><ul><li><strong>positive:</strong> a refund after the start is refused</li><li><strong>negative:</strong> a refund one day before the start is not refused</li><li><strong>boundary:</strong> a refund one minute before the start is accepted, and one exactly at the start is refused</li><li><strong>edge:</strong> a visit with no start time is handled the way the criterion says</li></ul><p>Happy path plus one failure would have tested one refused refund, and it would never have tried the minute where a bug in the comparison would show. And a case that can’t happen is not just skipped: the plan writes one line saying why it doesn’t apply.</p><p><strong>Access and ownership.</strong> For every endpoint the change creates, or where it changes who can call it or what it can reach, the plan names three cases: a caller who is allowed succeeds, a caller who is not allowed is refused, and a signed-in caller who asks for another person’s resource is refused too. That last one is the classic insecure direct object reference, where you change an id in the request and you see someone else’s data. In a payments system, that’s not a case you want to find in production. A message handler that acts on an id that the caller sends counts as an endpoint here too.</p><p><strong>New behaviours.</strong> For every behaviour the change adds, like a new rule, a new field that someone reads or a new screen, there is one row with the test that proves it. One row per behaviour, not per criterion and not per file. And the proof is written before the behaviour exists, so we see it fail while the behaviour is missing.</p><p><strong>Behaviours at risk.</strong> For every behaviour that already works for someone and that the change modifies or removes, there is a regression guard: a test that fails if that behaviour breaks. The agent searches the existing tests first, because the best guard is often one we already have. And if the search finds nothing, that’s a finding too: the row says “create”, and it never stays empty.</p><p>The four tables share one vocabulary for each row: covered by an existing test, covered (in flight) by a test in another open pull request, extend an existing test, create a new one, or not suitable, with a written reason. And they share one important rule: a test that replaces the very thing it should check with a fake, like a test that stubs the ownership check, proves the fake, not the behaviour, and it doesn&#39;t count.</p><p>When the plan is written, a second agent, the Test Plan Reviewer, challenges it with fresh eyes. It never wrote the plan, so it reads only what the plan says, and it asks if every criterion is tested at the right layer and if the cases are complete. Then the engineer agrees the approach, and that agreement is recorded in the plan with their name and the date. And from that moment, a check in CI refuses a plan that is missing any of these answers. It can’t tell if the answers are right, that’s the job of the reviewer and the person, but it makes sure nobody skips the question.</p><h3>During the build: see it fail first</h3><p>A test that has never failed proves nothing. You don’t know if it tests your code or if it would pass anyway. So the Build Agent follows one rule that I think is the most important of this whole article: a test counts only after someone saw it fail. For a regression guard, that means it writes the guard before it changes the behaviour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEY-BCOcVtBmjG7BbiYTyg.png" /><figcaption><em>A guard counts only after we saw it fail.</em></figcaption></figure><p>It writes the test against the code as it is now, runs it, and commits it alone, with test files only. Then it breaks the behaviour on purpose, checks that the guard fails, and reverts the break. Only then does it make the real change. A new behaviour follows the same idea from the other side: the proof is written first, it fails because the behaviour doesn’t exist yet, and then the behaviour makes it pass. In both cases the proof is recorded in three parts: what was broken, what ran, and what it reported. And the agent runs that check locally: it opens a pull request only to see an end-to-end test fail, because that test runs nowhere else.</p><p>At the end of the build, the agent writes a test record in the cycle’s tasks.md, with one row per test the plan promised: whether it was written, extended, reused or dropped (with a reason), and where it lives. The Validation Agent then checks each row and writes its verdict: does the test exist, and does it really validate the criterion? A &quot;no&quot; fails the cycle, unless a person accepts it with a reason. And the same check in CI reads this record again when the build ends, and again when the cycle closes.</p><h3>A baseline for every application</h3><p>That covers the tests of each change. But what about the tests we already have? Before, a pull request could remove a test, and nothing would say so. With agents producing big diffs every day, that’s easy to miss in a review. So the second question needed a different answer: a test coverage baseline for each application, and a check that never lets it go down.</p><p>It started in March 2026 with one application. Today ten applications measure their coverage on every pull request, and seven of them reject a merge that goes below the floor. The mechanism is a ratchet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nz8Y66X3BWmBP_q3VyRSmA.png" /><figcaption><em>The floor only goes up. Tests can arrive, but they can’t quietly leave.</em></figcaption></figure><p>The first floor is set a bit below the coverage we measured, so nothing that was already in progress breaks on the first day. From then on:</p><ul><li>if a pull request brings the coverage below the floor, the build fails, and it says the current figure, the floor and the exact drop</li><li>if a pull request tries to lower the floor itself, the build fails too, because CI compares the floor file with the one on the integration branch</li><li>if coverage climbs more than three points above the floor, a job opens one pull request that raises it, and a person merges it</li><li>and on top of that, a comment on the pull request points to every changed file below 80%, without blocking anything</li></ul><p>An engineer can also run the same check locally before pushing, and lock in an improvement in the same pull request:</p><pre>composer coverage                          # runs the suite with coverage and compares it with the floor<br>bin/coverage-check --update-baseline       # raises the floor when coverage improved</pre><p>The interesting part was that the same model doesn’t fit every application. We share some repositories with other teams, and a hard gate there would reject their pull requests for code we don’t own. So the model depends on who owns the code. Where we own the whole application, the floor blocks the merge. Where we share it, we use softer options: a report that never blocks, a gate only on the files a pull request changes (“cover what you touch”), or a hard floor measured only over the areas our team owns. In the one shared repository where we chose a hard gate over the whole application, the other team approved the change themselves.</p><p>And we learned one lesson the hard way. Some test runners silently drop a file that no test imports, so an untested screen simply doesn’t count. In one application, our first measurement said 42.75%, but it was only counting half of the files. After we added a test that imports every file and checks the count against the disk, the real figure was 27.35%. Since then, before we record any floor, we check that the runner reports the files that no test touches.</p><p>There is one more thing we decided on purpose: no application has a coverage target. We don’t ask for “80% by the end of the quarter”. The floor rises as tests arrive, and that’s it. Instead, we run a test-gap programme: the coverage report ranks the code that changes the most and is tested the least, and we close those gaps one small pull request at a time, with tests only and no production change. In one of those pull requests, we put back each of the 13 bugs fixed in the past in that file, one at a time, and each one made a test fail.</p><h3>End-to-end tests, written in Markdown</h3><p>Some behaviours can only be proven across all our applications: a patient books, pays, the doctor cancels, and the money goes back. For those, we use the e2e-ai type from the table above: end-to-end tests written as Markdown documents that an agent runs.</p><p>Each scenario is a document with blocks: setup, action, assertions and teardown. The agent opens a real browser in a test environment, follows the steps, and after each important step it queries the database to check the expected state, for example that a payment is captured or a hold was released. It finishes with a pass or fail verdict. The common steps, like logging in or booking an appointment, are helpers that scenarios combine like Lego, so when a flow changes we fix it once.</p><p>A scenario has a status: draft until it passes as written, then green. And here we found a nice way to control costs: the first runs of a draft run on our most capable model, and the green re-runs run on a faster and cheaper one. A green scenario can also become a committed Playwright test, generated from the scenario and checked against the same environment, so the most stable flows end up in the deterministic suite.</p><p>Today we have 159 scenarios across 15 features: 79 green, 76 still in draft and 8 blocked. Every scenario also declares which user journeys it proves, from a catalogue of 22 journeys, and a check refuses a scenario that declares none. This gave us something we didn’t have before: a map. The first time we measured it, seven journeys had no AI scenario at all, and now we know exactly where they are.</p><h3>The checks we added along the way</h3><p>All of this would be just good intentions without checks that run every time. These are the ones that run around a change today:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvYcyR3nZNcNW9O4zW7HYQ.png" /><figcaption><em>No check gets tired at the end of the day.</em></figcaption></figure><p><strong>Before the push</strong>, a git hook builds everything and runs all the tests of the metarepo.</p><p><strong>On every pull request</strong>, our validator checks the rules of the repository, including the test strategy of a new plan, the test record of a build, and the close of a cycle. In the applications, the coverage gate checks the floor. The end-to-end suite has a contract check that refuses a test with no journey. And there are the checks from the previous articles: the tests of our hooks, a secret scanner, the ticket key, the LLM evaluations when a skill or an agent changes, and the AI review.</p><p><strong>Every night</strong>, before the workday starts, the end-to-end suite runs in every market where we have checks. A market whose environment doesn’t start gets one second attempt, and the report says the cause in one line when a market produced nothing.</p><p><strong>On demand</strong>, a person can write /e2e &lt;markets&gt; on a pull request, and the end-to-end suite runs against an environment built from that branch, before the merge.</p><p>And here is a small story about why the checks also need checks. One morning, our channel got a “the suite is green again” message while the suite was still red. It came from a run of thirteen seconds that ran nothing. Now the recovery rule ignores a run that executed nothing. A check that lies is worse than no check at all.</p><h3>What is still hard</h3><p>I don’t want to make this sound finished, because it isn’t.</p><p>End-to-end tests are still slow, and they still fail for reasons that have nothing to do with the change, like a test environment that never starts. Half of our AI scenarios are still drafts. Seven user journeys had no AI scenario the first time we measured. We built a pool of test environments that are created every weekday morning, so a pull request doesn’t have to wait for one, but it’s not live yet. And the coverage of some applications is still low: the ratchet makes sure it doesn’t go down, but it doesn’t make it go up by itself.</p><p>But there is one big difference from before. Today we know all of this, with numbers, and every gap has a name and a place. That’s what makes it possible to improve.</p><p>In the next and last article of this series, I’ll show you how we measure all of this: the quarterly metrics we use to know if this new way of working actually makes us better, and the targets we set for ourselves. See you there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e9746ad81f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going AI-first in a payments team, part 4: the guardrails]]></title>
            <link>https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-4-the-guardrails-3418d5ccfd23?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/3418d5ccfd23</guid>
            <category><![CDATA[db-migration-safety]]></category>
            <category><![CDATA[ai-safety]]></category>
            <category><![CDATA[agent-guardrails]]></category>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 09:46:25 GMT</pubDate>
            <atom:updated>2026-11-19T09:51:46.808Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Agents with access to our code, our databases and our tickets need limits that don’t depend on their memory or their good intentions. This is how we built them, in layers.</em></p><p>In the <a href="https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-3-the-foundations-skills-and-connectors-1fa338516c9c">previous article</a> I described the foundations: about 90 skills and the connectors that let our agents read Jira, query databases, open Figma designs and create test environments.</p><p>After the first article, a reader left a comment that stayed with me: a system that moves real money is where all of this gets tested. And that’s true. Speed means nothing if one wrong migration or one leaked secret costs more than everything we gained.</p><p>So how do you give agents this much access and still sleep at night? In this article I’ll walk you through the guardrails we built, and why most of them are not written as advice to the agent.</p><h3>A rule the agent reads is not enough</h3><p>The easiest guardrail is a rule in Markdown: “never read the secrets”, “never merge a pull request”, “always include the ticket key”. The agent reads it in every session, and most of the time it follows it.</p><p>But “most of the time” is not good enough for payments. An agent can lose a rule in a long session, or follow a newer instruction that contradicts it. So for every important rule we ask one question: what stops the change if the agent forgets this?</p><p>The answer became four layers, and each one catches what the previous one missed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VxcujiN113q7biCkpwuyPg.png" /><figcaption><em>Each layer catches what the previous one missed. The last one is always a person.</em></figcaption></figure><p>The first layer is the rules, the ones the agent reads in every session. The second layer is the hooks, small scripts that run before the agent uses a tool and can stop it. The third layer is the checks that run on every push and every pull request, no matter who or what wrote the code. And the last layer is a person, because an agent never merges.</p><h3>What must never break</h3><p>At the top of the rules there is one file: INVARIANTS.md. It holds the constraints that are not negotiable, for example that secrets never go into a tracked file, that the spec is updated after every cycle, and that the tests always pass on our integration branch.</p><p>And because rules can contradict each other, we also wrote down which document wins:</p><pre>1. INVARIANTS.md   # what must never break<br>2. SPEC.md         # the detailed rule tables<br>3. docs/           # the guides<br>4. source code     # if it contradicts the rows above, the agent flags it</pre><p>The interesting part is how we protect that file. The agent can’t edit it on its own, not even when a person asks for a change. First it has to stop, show the exact lines before and after the change, and ask one direct question:</p><pre>Can I really change INVARIANTS.md? Are you sure?</pre><p>Then it waits for the answer in the next message, and it applies exactly what the person approved, nothing more. Without that confirmation, it can only point out a problem in the file and propose new wording in the chat.</p><p>For the product itself we have something similar, but about money. We wrote a catalogue of 20 financial invariants, each one classified by severity, like “the amount of a captured payment never changes” or “the total refunded can never exceed the amount captured”. And here I have to be honest: writing them down showed us that some of them were a convention, not something the code enforced. So each invariant also records its known gaps, and that made the catalogue even more useful, because now the agents, and the people, know exactly where to be careful.</p><h3>Hooks: rules that don’t depend on memory</h3><p>A hook is a script that runs before the agent uses a tool, like reading a file or running a command. It receives the action that the agent wants to do, and it can let it through, block it, or stop and ask a person. And it does the same thing every time, whatever the agent remembers. This is our configuration for Claude Code, a bit simplified:</p><pre>{<br>  &quot;permissions&quot;: {<br>    &quot;deny&quot;: [&quot;Read(**/.env)&quot;, &quot;Read(**/.env.*)&quot;, &quot;Edit(**/.env)&quot;, &quot;Edit(**/.env.*)&quot;]<br>  },<br>  &quot;hooks&quot;: {<br>    &quot;PreToolUse&quot;: [<br>      { &quot;matcher&quot;: &quot;Read|Edit|Write|Bash|Grep&quot;,<br>        &quot;hooks&quot;: [{ &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;node .claude/hooks/block-env-access.mjs&quot; }] },<br>      { &quot;matcher&quot;: &quot;Bash|PowerShell&quot;,<br>        &quot;hooks&quot;: [{ &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;node .claude/hooks/require-jira-key.mjs&quot; }] },<br>      { &quot;matcher&quot;: &quot;Edit|Write&quot;,<br>        &quot;hooks&quot;: [{ &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;node .claude/hooks/guard-human-lines.mjs&quot; }] }<br>    ]<br>  }<br>}</pre><p>Each of those three hooks protects one thing.</p><p><strong>Secrets.</strong> The first hook blocks any access to the environment files that hold the secrets: reading them, editing them, and also commands that touch them, like cat .env. This one doesn&#39;t ask. It just says no, and it explains why, so the agent can continue the right way: the only env files it may open are the templates, and it refers to a secret only by the name of its variable.</p><p><strong>The ticket key.</strong> The second hook checks every command that creates a branch or a pull request. If there is no ticket key in the name or in the title, it stops and asks for the ticket first. This is how the key that I described in the second article travels through everything.</p><p><strong>Human decisions.</strong> The third hook protects the lines that a person approved. In our specs, those lines live between two markers, &lt;!-- human --&gt; and &lt;!-- /human --&gt;. If an agent&#39;s edit touches one of them, the hook stops it and asks the agent to quote the exact lines before and after the change, so the person can approve it. The agent can change everything else in the spec freely. The decisions belong to people.</p><p>Notice the difference between the three: the first one denies, and the other two ask. Some actions are never acceptable, and others only need a person to say yes.</p><p>There is a fourth one that runs when a session starts: it checks that the git hooks are installed in that checkout, and it warns the engineer if they aren’t, because without them a push skips our checks. And the hooks are code too, so each one has its own tests.</p><h3>Database migrations: the most careful part</h3><p>In a payments system, few changes are as hard to undo as a database migration. You can roll back code in minutes, but you can’t always roll back a schema, especially when several services and several databases depend on it. So migrations have their own rule, and it’s one of the strictest we have.</p><p>It starts with a question before any migration: is it really needed? The agent must first check if the requirement fits the current schema, for example with an existing nullable column or an existing table. A migration is allowed only when reuse is not possible, and the plan has to say which options were checked and why they didn’t work.</p><p>Then every migration gets a risk level, and the risk decides who has to approve it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QezXtT5IOIVr_4UoFBdNXg.png" /><figcaption><em>The more a change can break, the more people have to agree before it runs.</em></figcaption></figure><p>A HIGH-risk change, like dropping or renaming a column, can’t be executed by the Build Agent until a person signs off.</p><p>On top of that, every migration must be backward compatible with the previous version of the code, because during a deployment both versions run at the same time. In practice this means a few habits: add before you remove, expand before you contract, never rename in one step, and make new columns nullable or give them a default. A rename, for example, becomes four steps across at least two releases: add the new column, copy the data, update the code that reads it, and only then drop the old one.</p><p>And there is one idea in this rule that is worth repeating: a database rollback is not our recovery path. Some of our services run one database per country, so a migration can succeed in some databases and fail in others. The recovery is to turn off the feature flag, deploy a fix, and correct the data with a compensating action, never to revert the schema.</p><p>The best part is that this doesn’t depend on the agent remembering any of it. Every new migration must carry a header with its risk level, and if it touches one of our most critical financial tables, also the list of financial invariants that were reviewed:</p><pre>/**<br> * @migration-risk MEDIUM<br> * @financial-invariants FI-001, FI-014<br> */</pre><p>A check in CI reads that header. A migration without it fails. And a HIGH-risk migration without a second line, saying who approved it, is blocked.</p><h3>Smaller rules for risky moments</h3><p>There are a few more rules that only apply in specific situations, when a small mistake can have a big effect.</p><p><strong>A bug fix is surgery.</strong> When the agent fixes a bug, it proposes the smallest fix first, touches at most four production files unless the ticket needs more, and does no refactors on the way. A broader fix goes to a follow-up ticket.</p><p><strong>Feature toggles.</strong> Most of our important features ship behind a feature toggle that is turned on per country. In our test environments the toggles are always on, so a feature can work perfectly there and still be dark in production, because nobody turned it on. So when a change depends on a toggle, the agent reminds the engineer and adds the rollout instructions to the ticket.</p><h3>Agents never merge, and they assume they are not alone</h3><p>I mentioned both of these in the second article, but they are guardrails too, so here is a bit more detail.</p><p><strong>Agents never merge.</strong> They create pull requests, but only a person merges, and a request to “create the PR and merge it” still stops after the PR and asks. Pushing has a similar rule: the agent asks before a push, with one exception. When a person asks it to fix a specific pull request, that request already includes pushing the fix to that pull request, so the agent doesn’t ask twice. A force-push, or a push to any other branch, still needs a yes.</p><p><strong>Assume you are not alone.</strong> With five or six agents per engineer, our worktree rule starts with that sentence. Another agent’s branches, worktrees and pull requests are live work: an agent may read them, but it must never switch, reset, force-push or delete them. And if it finds uncommitted changes in the main checkout, it doesn’t mix its work with them. It moves to its own worktree and tells the engineer.</p><p>The cleanup at the end follows the same thinking. A cleanup that is only recommended doesn’t happen, so we made it a gate that fails closed. Before it removes anything, the agent must prove three things: the worktree is clean, the branch exists on the remote, and the open pull request points to that exact branch. If one of them fails, it removes nothing and reports it. Then, after the cleanup, it must prove three more: the worktree is no longer registered, its folder is gone from disk, and the local branch is gone. Only then is the task finished.</p><h3>Guardrails for words, not only for code</h3><p>Some of our guardrails are not about code at all. They are about how the agents write.</p><p>Many people who read what the agents write are not engineers: our Product Manager, customer support, analysts. So every reply, ticket comment or pull request description starts with the business outcome, uses everyday words, and explains every technical term the first time. Every reference is a full link, never a bare number. And when the agent suggests a next step, it writes the complete prompt, ready to paste into a new session.</p><p>For everything an agent publishes on GitHub, we go one step further, with Simplified Technical English (ASD-STE100): one idea per sentence, short sentences, active voice, one word for one meaning. It sounds strict, but it makes a pull request description easy to read, and easy to check.</p><p>And in the code itself, the agent writes no comments to explain what the code does. The names and the structure must explain it. The reasoning that would have been a comment goes to the pull request instead, as a review comment on that exact line, so the reviewer sees it in context and the code doesn’t carry it forever.</p><h3>A guardrail on the guardrails</h3><p>In the previous article I described how agents fix what they trip over: when they find a defect in a tool, a skill or a rule, they open a separate pull request with the fix. That’s great for keeping everything alive, but it could also become a way to change the rules quietly. So that habit has its own limits:</p><ul><li>one defect, one pull request, and first it checks if a pull request for the same defect already exists</li><li>a ticket first, and the engineer agrees before the agent starts</li><li>never a change to INVARIANTS.md, never a change to how a feature behaves, and never a fix that only matters for the current task: those go to the engineer instead</li></ul><p>And, like everything else, the agent never merges that pull request.</p><h3>The last safety net</h3><p>Finally, some checks don’t care who wrote the change. The repository has a pre-push hook that builds everything and runs all the tests before any push. And on GitHub, every pull request goes through our validator, a secret scanner, a check of the ticket key in the title and the branch, and, when a skill or an agent file changes, the LLM evaluations I described in the previous article.</p><p>None of these layers is perfect on its own. But together they mean that, for something to go wrong, an agent has to forget a rule, a hook has to miss it, every check has to pass, and a person has to review it and merge it anyway. That’s not zero risk, but it’s a risk we understand.</p><p>In the next article I’ll go into how we test what the agents build: the test plan that comes before the code, the AI end-to-end tests written in Markdown, and the CI checks we added along the way. See you there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3418d5ccfd23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going AI-first in a payments team, part 3: the foundations, skills and connectors]]></title>
            <link>https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-3-the-foundations-skills-and-connectors-1fa338516c9c?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fa338516c9c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 09:59:26 GMT</pubDate>
            <atom:updated>2026-11-18T09:59:26.385Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Before an AI agent can be useful in a real system, it needs what any new engineer needs: access to the right tools, and someone who explains how to use them. This is how we built that.</em></p><p>In the <a href="https://medium.com/@ygarnicab/going-ai-first-in-a-payments-team-part-2-specs-cycles-and-a-team-of-agents-3feeea5d3200">previous article</a> I described our workflow: a request becomes a plan, the plan becomes code, and the spec is updated every time, with a team of agents doing the work and a person deciding at every step.</p><p>But there is something that article took for granted. When the Plan Agent “reads the code of the affected applications”, or when an agent investigates a bug, how does it actually get there? How does it know which database to query, how to find a ticket, or how to create a test environment?</p><p>In our AI-first plan there was one sentence about this that I keep coming back to: without these foundations, AI cannot reason safely. And this is what this article is about: the skills and the connectors that we built before we asked the agents to do any real work.</p><h3>Think of a new engineer</h3><p>When a new engineer joins the team, we don’t just give them the code. We give them access to Jira, to the repositories, to the databases, to the logs and to a test environment. And then, for weeks, someone explains to them how all of it works: which database holds what, which logs to check first, and what they must never do in production.</p><p>An AI agent needs exactly the same, with one difference: it doesn’t remember any of it the next day. So everything that a senior engineer would explain once has to be written down in a place where the agent can read it every time.</p><p>That’s why our plan listed the enablers before any workflow change: a skill for databases, a skill for logs, a skill for the message queue, connectors to our monitoring tools, all our repositories in one workspace, and skills to create test environments, so the AI could test its own work.</p><h3>What a skill is</h3><p>A skill is a Markdown file that teaches the agent how to do one specific, repeatable task. It’s the written version of what a senior engineer would explain to you in your first weeks. Today we have about 90 of them.</p><p>The most important part of a skill is the short header at the top, because the agent reads it to decide when the skill applies:</p><pre>---<br>name: prod-db<br>description: Query production databases read-only through short-lived<br>  credentials. Use when investigating live data for a support ticket.<br>  NOT for development data or analytics (use the warehouse skill).<br>---</pre><p>Notice the last line. A good description says when to use the skill, but also when not to use it, and which skill to use instead. Below the header comes the body: the prerequisites, the commands, the examples, and the rules that the agent must never break.</p><p>A skill can be started in two ways. A person can call it by name, like a command, or the agent can decide to use it on its own when the task fits its description.</p><h3>A CLI below every skill</h3><p>Here is a design decision that made a big difference for us: a skill rarely talks to a system directly. Below most skills there is a small command-line tool, written in TypeScript and with its own tests, that does the actual work.</p><p>For example, this is the tool behind our development database skill:</p><pre>db-cli databases                 # list the databases<br>db-cli tables &lt;db&gt;               # list the tables of one database<br>db-cli describe &lt;db&gt; &lt;table&gt;     # show the columns of a table<br>db-cli query &lt;db&gt; &quot;&lt;sql&gt;&quot;        # run a read-only query</pre><p>This split gives each part one job. The tool is deterministic: it handles the connection, the credentials and the output format, and it does the same thing every time. The skill carries the judgment: when to use the tool, how to read the result, and what to do next. And as a bonus, every tool also works without AI, so an engineer can run it by hand when they want to.</p><p>For some systems we didn’t need to write a tool at all, because they already offer an MCP server, a standard way for AI tools to connect to external systems. In those cases, the skill explains how to use the MCP connector instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5xUseVInmhJ-u8NT8c1IQ.png" /><figcaption><em>The engineer asks in plain words. The skills tell the agent which connector to use and how.</em></figcaption></figure><h3>The connectors</h3><p>These are the systems our agents can reach today, and what they do with each one.</p><p><strong>Code.</strong> All our repositories are cloned and kept up to date in one workspace, so an agent can follow a change across applications. On GitHub, agents create branches and pull requests that follow our conventions, read the CI checks, and run the reviews that I described in the previous article.</p><p><strong>Work.</strong> The Jira connector searches tickets, reads their history and comments, moves them through the workflow, and adds comments and links. As I described in the previous article, it also creates the epics of an initiative, but only after the engineer says yes.</p><p><strong>Data.</strong> This is the one that needed the most care, so it gets its own section below.</p><p><strong>Design.</strong> Through the Figma connector, an agent can read a design and build it with the components of our own design system, instead of creating new ones. It can also write into a design board, for example to draw a diagram for a discussion.</p><p><strong>Testing.</strong> This is the enabler our plan called “so AI can test itself”. An agent can create a temporary test environment, deploy the branches it needs, extend its lifetime, and check its status. It can also query the databases of that environment to create mock data and test accounts for a scenario. And on top of that, we have end-to-end tests written as Markdown documents that an agent runs step by step in a real browser, checking the expected state of the database after each step.</p><p><strong>Observability.</strong> For logs, errors and metrics, we use one MCP entry point that the company provides. It gives our agents access to monitoring, logs, infrastructure and messaging tools, with the same single sign-on we use every day.</p><p>And around these, there are smaller skills for the things that used to interrupt a whole afternoon: feature flags, translations, the message queue, notification templates, the sandbox of our payment provider, and about a dozen skills that turn warehouse queries into reports for our experiments.</p><h3>Data: three databases, three levels of trust</h3><p>Giving an AI agent access to databases in a payments system sounds scary, and it should. So we didn’t give it one access. We gave it three, and each one has its own rules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CuTlme0nvThXaiVGcPfxOQ.png" /><figcaption><em>The closer the data is to real customers and real money, the stricter the access.</em></figcaption></figure><p>The <strong>development database</strong> holds anonymized data, and the agent can only read from it. This is where it explores schemas and tries queries.</p><p>The <strong>test environment databases</strong> hold test data only, so here the agent can also write. It creates the mock data and the test accounts that a scenario needs, across the four database engines our applications use.</p><p><strong>Production</strong> is where it gets serious. The agent can investigate real tickets there, but only read. The tool accepts only read statements, like SELECT or DESCRIBE, and production writes are out of its scope on purpose: a person does them by hand, with explicit approval. The credentials come from our secrets vault, they are short-lived, and they are never printed. And there is one more rule that applies to production and to our data warehouse: the agent selects only the columns it needs, and it never fetches personal data, like names or emails, unless a person explicitly asks for that value.</p><h3>Making it work for everyone</h3><p>Ninety skills and dozens of tools are worth nothing if every engineer has to spend a day setting them up. So the whole setup is one command:</p><pre>npm run setup        # installs, builds the tools, checks everything and fixes what it can</pre><p>It installs the dependencies, builds all the tools, runs a health check that repairs what it can, and prepares one environment file per tool. Then it tells you exactly which manual steps are left, for example which tokens you still have to fill in. You can run it again at any time to check or repair your setup.</p><p>The secrets live in those per-tool files, outside of git. And the agents are not allowed to read them at all: the only environment files an agent may open are the templates, which contain the names of the variables but never their values.</p><h3>Testing the skills themselves</h3><p>When a skill is part of how your team works every day, a broken skill is a broken process. So we test our skills too, in three layers.</p><p>The first layer checks the structure: that every skill has a valid header, that the files follow our conventions, and that the index of skills matches the files on disk. The second layer runs scenarios against the tools. And the third layer is an LLM-graded evaluation, where a model scores the behaviour of a skill or an agent prompt against a rubric. That one costs money, so it runs only when a skill or an agent file changes.</p><p>And there is one more habit that keeps the skills alive. When an agent trips over a defect in a tool or a skill, like a command that fails or an instruction that is out of date, it doesn’t just work around it. It proposes a ticket, and once the engineer agrees, it opens a separate pull request with the fix, in parallel with the task it was doing. Every person who uses a skill makes it a little better for the next one.</p><p>In the next article I’ll go into the guardrails: the hooks, the rules and the invariants that keep agents with this much access safe, in a system that moves real money. See you there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fa338516c9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going AI-first in a payments team, part 2: specs, cycles and a team of agents]]></title>
            <link>https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-2-specs-cycles-and-a-team-of-agents-3feeea5d3200?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/3feeea5d3200</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[spec-driven-development]]></category>
            <category><![CDATA[ai-workflow]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 09:35:51 GMT</pubDate>
            <atom:updated>2026-11-18T09:45:29.561Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How a change goes from an idea to production in our team: one repository for knowledge, specs that stay true, a team of AI agents, and a person who decides at every step.</em></p><p>In the <a href="https://medium.com/@ygarnicab/going-ai-first-in-a-payments-team-part-1-why-we-changed-the-way-we-work-7032d87d4b31">first article</a> of this series I told you why we moved our payments team to an AI-first way of working. Our bottleneck was never writing code. It was understanding a system whose context lived in a few people’s heads and in old Slack threads.</p><p>The answer we chose was to treat the persistent spec as the real asset, not the code. But that leaves the practical question: how do you turn that idea into something a team of about 8 engineers uses every day, on a system that moves real money?</p><p>In this article I’ll walk you through our workflow: where the knowledge lives, where the work comes from, how a change goes from a request to production, which agents work on each step, and where a person always makes the decision.</p><h3>A separate repository for knowledge</h3><p>The first decision we made was to not start inside our application repositories. Those repositories have long deployments, strict approvals and many stakeholders, so every experiment there would be slow and risky.</p><p>So we created a metarepo. It’s a repository that never deploys anything. It holds the specs of our features, the history of every change, the templates, the definitions of our agents, the skills and the rules. It started in February 2026 and today it has about 1,800 commits, so it’s not a side project anymore. It’s where our team thinks.</p><p>One detail that turned out to be important: we use more than one AI tool, mainly Cursor and Claude Code. Instead of keeping one copy of the agents and skills per tool, there is one source of truth, and each tool reads it through a thin adapter. In Claude Code’s case, the adapter folders are just symlinks to the same files that Cursor reads. An agent improved on Monday is improved for everyone, whatever tool they use.</p><h3>The spec: a hub and its spokes</h3><p>Each business capability, like a checkout or a refund flow, has its own folder in the metarepo, and it looks like this:</p><pre>specs/features/&lt;feature&gt;/<br>├── readme.md                 # what the feature does, and why<br>├── acceptance-criteria.md    # the rules it must always keep<br>├── test-coverage.md          # which test proves each rule<br>├── &lt;app-name&gt;.md             # how each application implements it<br>└── cycles/&lt;MMDD&gt;-&lt;slug&gt;/<br>    ├── request.md            # the why and the what, written by the engineer<br>    ├── plan.md               # the how: only the change, not the whole feature<br>    └── tasks.md              # the checklist the agents execute</pre><p>The files at the top are the hub: the persistent spec, the current truth of the feature. The cycles folder holds the spokes: one folder per change, with the request, the plan and the tasks of that change. A cycle is temporary, and the spec stays.</p><p>And there is a rule that makes a big difference: the business files of a spec are written in business words only, with no code, no class names and no file paths. Only the per-application file and the test coverage can point to code. This way a Product Manager can read and validate the spec, and the spec doesn’t break every time someone renames a class.</p><h3>Where the work comes from</h3><p>Our Product Manager doesn’t write requests anymore. The PM writes one thing: an initiative in Jira, with the problem, the number it should move, and what is out. The PM can start from a few rough lines, and a skill sorts them into that shape and asks only for what is missing. But it never slices the work and never assigns anyone, because that’s the engineer’s job.</p><p>When an engineer takes an initiative, the agent proposes how to slice it into epics of two to four weeks, each one shipping on its own, and posts the proposal as a comment on the initiative so the PM can say yes or no. It creates only the first epic, the one the engineer starts now, and assigns it to them. The others wait for the PM’s answer, and none of them gets a date until someone starts it, because a date for work that hasn’t started is just a guess. And this is not one-way: any engineer can also propose new work, like a feature or an improvement, and align it with the PM.</p><p>From there, the ticket key travels through everything: the request, the branch, the commits and the pull requests. If an agent tries to create a branch or a pull request without one, a hook stops it and asks for the ticket first.</p><h3>A change, step by step</h3><p>Every change, whether it’s a new feature or an improvement, goes through the same cycle of four steps. Each step is a command that the engineer runs, and each command starts the agent, or agents, responsible for that step:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAXki2sCvc33hzorUvWlHA.png" /><figcaption><em>Every change goes through the same four steps. The agents do the work, and a person decides at every step.</em></figcaption></figure><p><strong>1. Request.</strong> The engineer who owns the epic writes the request, with the help of the PM Agent. Despite its name, this agent doesn’t replace our Product Manager. It plays that role inside the cycle, making sure the request has a clear intent, a clear scope and testable acceptance criteria. Before it writes anything, it looks for the existing feature that owns the change, because we reuse a feature before we create a new one. Then it asks questions about scope and edge cases. And when the epic belongs to an initiative, it copies the PM’s text word for word into the request, so the reason for the work stays next to the work. The most important part of the request is the one at the top: why the change is needed and what the system should do afterwards, again in business language.</p><p><strong>2. Plan.</strong> The Plan Agent reads the request, the persistent spec and the code of the affected applications. It asks its own implementation questions, checks its plan for consistency, and writes two files: plan.md, with only the delta from the current state, and tasks.md, a checklist the build agents can execute. Then a second agent, the Test Plan Reviewer, reviews the testing approach with fresh eyes, and the engineer agrees it before anything gets committed.</p><p>At this step there is also a check that I like a lot: the fit test. If the request or the plan is too big for one cycle, it gets split into a map of smaller cycles, and each one has to ship value on its own. And it’s never split by layer, so “the backend first, then the frontend” is not allowed.</p><p><strong>3. Build.</strong> The Build Agent implements the tasks in the application repositories, while the Validation Agent runs quality checks in parallel. At the end there are two pull requests: one in the metarepo with the cycle, and one in each application repository with the code and the tests. The application pull request opens as a draft, and only the engineer can mark it as ready for review, after looking at it.</p><p><strong>4. Update spec.</strong> This is the step that makes everything else work, and it’s mandatory, every time. The Spec Divergence Agent reads what changed and updates the persistent spec, so the next person or agent that touches this feature starts from the truth. Then the engineer reviews both pull requests and merges them.</p><p>The status of each cycle lives in tasks.md, in one line like ## Status: in-progress (YYYY-MM-DD), and nobody updates it by hand: each command moves it to the next state. That also means we always know where every change is, without asking anyone.</p><h3>What stays human</h3><p>In the diagram above, the orange boxes are not decoration. They are the points where a person decides, and the workflow has a few rules to make sure it stays that way.</p><p>The first one is simple: <strong>AI agents never merge</strong>. They create pull requests, but only a person reviews and merges them.</p><p>The second one is about decisions. When a person makes a decision during a cycle, for example “we keep the old behaviour for existing customers”, the agent records it in the request and in the spec, using the wording that person approved, in a fixed shape:</p><pre>&lt;decision&gt;. Owner: &lt;role&gt; (&lt;name&gt;), &lt;YYYY-MM-DD&gt;. Reason: &lt;why&gt;.<br>- Changed by &lt;role&gt; (&lt;name&gt;), &lt;YYYY-MM-DD&gt;: &lt;new decision, or &quot;dropped&quot;&gt;. Reason: &lt;why&gt;.</pre><p>The original line is never edited. A change is a new line under it, so the history of a decision is always visible. And if an agent tries to edit one of those lines, a hook stops it and asks the person first.</p><h3>Five or six agents at the same time</h3><p>On average, each engineer runs five or six agents in parallel. That’s only possible if the agents don’t step on each other, so every unit of work runs in its own git worktree, created from an up-to-date remote branch:</p><pre>git fetch --prune<br>git worktree add .claude/worktrees/&lt;short-name&gt; -b &lt;branch&gt; origin/develop</pre><p>The main checkout stays clean all the time, and each agent works in its own isolated copy. And when the pull request is open, a cleanup step removes the worktree and the local branch, and it doesn’t consider the task finished until it can prove that both are gone.</p><h3>The new bottleneck: reviews</h3><p>Here I have to be honest. When every engineer has several agents producing work, the bottleneck moves again, this time to the pull request reviews. Keeping pace with them was the hardest part of the whole change.</p><p>The first thing that helped us was to make the first review automatic. When a pull request opens, or a draft is marked as ready, an AI review starts on its own, and anyone can ask for another one by commenting /review on the pull request:</p><pre>on:<br>  pull_request:<br>    types: [opened, ready_for_review, review_requested]<br>  issue_comment:<br>    types: [created]   # a &quot;/review&quot; comment asks for a new review</pre><p>The second thing was to turn reviews into short rounds with a clear goal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZeIWrIj4IlGx7T1DfDcGw.png" /><figcaption><em>Each round has one goal: the next review must find the change safer than the previous on</em></figcaption></figure><p>There are a few rules behind this loop. The review is done by a fresh agent, never by the session that helped write the change, because an agent that wrote the code is not a good judge of it. The review treats the pull requests of several repositories as one logical change, checks it against the intent of the ticket, and scales its depth to the size of the diff. Then the fix round closes every finding in one of two ways: it’s fixed, or it’s answered with a reason. And a new problem found during a round goes to a follow-up ticket instead of growing the current round, so reviews don’t turn into an endless loop.</p><p>This improved a lot how we review, but it’s still a work in progress, and it’s probably the part of the workflow that we’ll change the most in the next months.</p><p>In the next article I’ll go into the foundations that make all of this possible: the skills and connectors that let our agents read Jira, query databases, open Figma designs and create test environments. See you there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3feeea5d3200" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going AI-first in a payments team, part 1: why we changed the way we work]]></title>
            <link>https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-1-why-we-changed-the-way-we-work-7032d87d4b31?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/7032d87d4b31</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[spec-driven-development]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[ai-agent-workflow]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 13:36:49 GMT</pubDate>
            <atom:updated>2026-11-18T09:46:25.808Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>What happened when a team of about 8 engineers working on a 5-year-old payments system rebuilt its day-to-day around AI, and what it did to our numbers.</em></strong></p><p>When we talk about AI in software development, the conversation usually starts with how fast it can write code. But when you work on a payments system that has been in production for more than five years, writing code was never the real problem.</p><p>I’m the Engineering Manager of a payments team at a health-tech company. Our system spans several repositories and shared monoliths, it has active customers every day, and it has strict reliability requirements, because it moves real money.</p><p>This year we moved the team to an AI-first way of working. This is the first article in a series about how we did it. Here I cover why we made the change and how our day-to-day looks now. The next ones go into our workflow, the skills and guardrails that keep it safe, and how we measure whether it is working.</p><h3>The real bottleneck</h3><p>Before we wrote any plan, we looked at our own pull requests across the payment repositories. What we found was not a speed problem. It was a knowledge problem.</p><p>Critical parts of the system could be safely changed by only two or three people. What took one of them a day took a newcomer weeks. Most of the time went into understanding context, not writing code, and that context lived in Slack threads, in people’s memory, and in behaviour that was only implicit in the code.</p><p>On top of that, large changes had been merged without descriptions, and many business rules were not written down anywhere anyone could find them. Working across the stack was impractical. That wasn’t because people lacked the skills; the context was missing. And with no contract tests between services, a change in one place could silently break another.</p><p>When we put all of this together, the root cause was clear: there was no written contract between what the business expects and what the code actually does.</p><p>And this is where the big question comes in: if AI makes writing code cheap, what happens when the hard part was never writing the code?</p><h3>Execution is cheap, understanding is not</h3><p>The idea behind our strategy is simple: AI doesn’t just speed up coding, it shifts where engineering value lives. Execution becomes cheap, and understanding the system becomes the bottleneck.</p><p>So the goal was never “use AI to code faster”. The goal was to give both the AI and the people the understanding they were missing, and the answer for us was spec-anchored development. Each core flow has a persistent spec that describes its current behaviour. Every change is planned against that spec, and the spec is updated after every change. The repository where all this lives opens with a line that sums it up well: <em>“Execution is abundant; judgment is scarce. The persistent spec is the real asset, not the code.”</em></p><p>It’s important to say that this was not a greenfield rewrite. It was a structured evolution of a system that was already running, with customers on it every day. And we were honest from the first page of the plan: we didn’t know if this was the best approach. We had signals from the industry and from other teams in the company, and we committed to learn and adapt along the way.</p><h3>Four phases, no big bang</h3><p>We split the change into four phases so that we never had to bet the whole system on it at once.</p><p>The first phase was foundations, with no change to how we worked yet. We wrote the base documentation and the specs of the core flows, added safety tests for database migrations and a baseline of test coverage, and gave the AI the skills it needs to test its own work in test environments.</p><p>The second phase was a pilot: the spec-anchored flow on one or two initiatives of medium complexity and low risk, measuring speed, bugs, clarity and effort. In the third phase every new initiative started to use the spec model, and legacy code got documented only when someone touched it. The fourth phase is where the AI takes the routine work, like tests, scaffolding and migrations, and developers focus on architecture and spec quality.</p><p>Today we are in that fourth phase.</p><p>We also set the targets before we started, so that we couldn’t move the goalposts later. Among them: 20–30% less lead time within three to six months, no increase in regressions while going faster, more than 80% of engineers using AI tools every week, and 30–50% less time for a new engineer to ship their first independent change to production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*37r94BfwPGcY2jl-GbBPCQ.png" /></figure><h3>Our day-to-day, before</h3><p>Before the change we worked with Kanban and the full set of ceremonies: dailies, planning, refinements and retrospectives. Several developers worked on the same feature, and each one was a specialist in one area, like frontend or backend.</p><p>It worked, but it had a cost. A lot of the week went into coordinating people around a feature, and the knowledge of each part of the system stayed with the specialist who usually touched it.</p><h3>Our day-to-day, now</h3><p>Today we keep meetings to a minimum. When someone is blocked, we have optional ad-hoc syncs, and we keep a slot free in the calendar for exactly that. The only fixed meeting is one retro and sync per week. Its focus is not only the product: it’s about improving the whole process, especially how we work with AI.</p><p>How work reaches a developer also changed, in two steps. At first, the Product Manager wrote a request and posted it in the team channel. The request was committed to our metarepo as part of the specs, and the developer who was free took it and continued the workflow: planning, building and releasing. Any developer could also write a request to propose a new feature or an improvement, and align it with the PM.</p><p>Recently we went one step further. Now the PM writes only the <em>why</em>: an initiative with the problem and the number it should move. The engineer who takes it slices it into pieces of two to four weeks that can each ship on their own, and owns every piece from the first question to the measured result. The rule of thumb for every contact with product, design or another team is <em>propose, don’t ask</em>. A prototype or a recommendation costs the other person a minute to say yes or no to. An open question costs them your work.</p><p>Each developer works with Cursor and Claude Code, and runs five or six agents in parallel on average. And the PMs can now ship small, low-risk changes on their own, which was one of the two main use cases in our plan from day one.</p><p>Not everything was easy. The hardest part was keeping pace with pull request reviews, because when every developer has several agents producing work, review becomes the new bottleneck. AI-assisted review improved this a lot, but it’s still a work in progress, and I’ll come back to it in the next article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a9gwy3O4ikgsOCWUJDD4WA.png" /></figure><h3>The numbers</h3><p>Comparing Q2 with Q3 2026, with about 8 engineers and without adding headcount or hours:</p><ul><li><strong>Cycle time</strong> went down <strong>25%</strong>, inside the 20–30% range we set as a target.</li><li><strong>Change-failure rate</strong> went down <strong>30%</strong>.</li><li><strong>PR throughput</strong> went up <strong>5%</strong>.</li></ul><p>And maybe the change I like most doesn’t fit in a percentage. As a team we used to deliver two or three initiatives per quarter. Now each developer carries their own initiative, with several iterations.</p><p>The throughput number is modest, and that’s fine. Our goal was never only to go faster. It was to build with more clarity and confidence, and a team that ships faster while breaking less is exactly what we were looking for.</p><p>How we measure all of this is a story of its own, and it gets its own short article in this series.</p><p>In the <a href="https://ygarnicab.medium.com/going-ai-first-in-a-payments-team-part-2-specs-cycles-and-a-team-of-agents-3feeea5d3200">next article</a> I’ll go into the workflow itself: the metarepo, how a request becomes a plan, code and an updated spec, and the team of agents that works on each step, with a person deciding at every checkpoint. See you there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7032d87d4b31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Usando Azure Cosmos DB Change Feed para sincronizar datos en arquitecturas de microservicios]]></title>
            <link>https://ygarnicab.medium.com/usando-azure-cosmos-db-change-feed-para-sincronizar-datos-en-arquitecturas-de-microservicios-8660ca81d14?source=rss-c6cf0a2c9a62------2</link>
            <guid isPermaLink="false">https://medium.com/p/8660ca81d14</guid>
            <category><![CDATA[azure-cosmos-db]]></category>
            <category><![CDATA[sincronizar]]></category>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[microservicios]]></category>
            <dc:creator><![CDATA[Yadira Garnica Bonome]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 23:28:44 GMT</pubDate>
            <atom:updated>2021-02-03T12:58:49.181Z</atom:updated>
            <content:encoded><![CDATA[<p>Cuando nos planteamos pasar a una arquitectura de microservicios, o hasta una arquitectura <em>serverless</em>, uno de los desafíos más críticos es la consistencia de los datos, ya que uno de los principios de este tipo de arquitectura es que cada servicio posee su propio almacenamiento de datos.</p><p>Supongamos que estamos en la clásica Universidad de Contoso y que tenemos, entre otros, dos servicios: uno para manejar los estudiantes, y otro para manejar los cursos.</p><p>El servicio de cursos nos permite crear cursos, y sobre ellos tenemos datos como el título, la descripción, los profesores, y los estudiantes matriculados.</p><p>El servicio de estudiantes nos permite registrar nuevos estudiantes, editar sus informaciones, así como mostrar todos sus datos y sus cursos matriculados.</p><p>Cuando pensamos en un modelo relacional podemos identificar claramente una relación de muchos a muchos entre los cursos y los estudiantes, pero recordemos que tenemos como objetivo que cada servicio maneje sus propios datos y la solución para esto viene en forma de duplicación de información, algo que en el mundo de Bases de Datos relacionales sería un no gigante, pero que en el mundo no relacional es perfectamente posible y una buena práctica con el objetivo de ganar en <em>performance </em>en el momento de acceder a esos datos.</p><p>Nuestros dos servicios de ejemplo podrían tener cada uno su propia <em>Azure Cosmos DB</em>, con un contenedor “<em>Students</em>” y otro “<em>Courses</em>” cada una. Y aquí es donde entra la gran cuestión, cómo mantenemos la consistencia de los datos?</p><p>Una de las herramientas que <em>Azure Cosmos DB</em> nos ofrece para resolver este problema y que quizás sea de las que menos atención recibe es el <em>Change Feed</em>.</p><p>El Change Feed es un log ordenado de los cambios que ocurren en los documentos de un contenedor, y es una funcionalidad que esta incluida de forma predeterminada en nuestras Cosmos DBs. Los cambios almacenados en este log son la creación y edición de documentos, ya que la eliminación aún no está soportada.</p><p>El Change Feed se puede consumir usando la clase ChangeFeedProcessor que forma parte del SDK de Cosmos. Durante el registro de la clase en el sistema de inyección de dependencias que usemos, podemos definir un método delegado que será el responsable del procesamiento de los elementos que hayan sufrido algún cambio.</p><p>En nuestro caso de ejemplo el objetivo de este pequeño bloque de código sería que cada vez que un curso es actualizado con nueva información de estudiantes matriculados seamos capaces de sincronizar esa información en el contenedor de estudiantes para que cuando se consulte los datos de un estudiante podamos ver todos los cursos en que se ha registrado.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*eRsID0yn4vRp_GPSLZmmtA.png" /></figure><p>Y la buena noticia es que existe una forma aún más simple de reaccionar a estos cambios, y es integrando el <em>Change Feed</em> con <em>Azure Functions</em> usando el <em>binding </em><strong><em>CosmosDBTrigger </em></strong>somos capaces de recibir en como entrada de nuestra <em>function </em>los documentos de cursos que se han se han actualizado:</p><pre>[CosmosDBTrigger(databaseName: &quot;ContosoCourses&quot;, collectionName: &quot;Courses&quot;, ConnectionStringSetting = &quot;CosmosDBConnection&quot;, LeaseCollectionName = &quot;leases&quot;, CreateLeaseCollectionIfNotExists = true)]IReadOnlyList&lt;Document&gt; documents</pre><p>Con el <em>binding </em><strong><em>CosmosDB </em></strong>podemos acceder a los documentos de los estudiantes que necesitamos actualizar. Con este <em>binding </em>podemos tanto leer usando el <em>DocumentClient, </em>como hacer actualizaciones de los documentos usando <em>IAsyncCollector</em>.</p><pre>[CosmosDB(databaseName: &quot;ContosoStudents&quot;, collectionName: &quot;Students&quot;, ConnectionStringSetting = &quot;CosmosDBConnection&quot;)] DocumentClient studentsClient            </pre><pre>[CosmosDB(databaseName: &quot;ContosoStudents&quot;, collectionName: &quot;Students&quot;, ConnectionStringSetting = &quot;CosmosDBConnection&quot;)] IAsyncCollector&lt;StudentServiceModels.Student&gt; studentsCollector            </pre><p>Les dejo por aquí el código de ejemplo :)</p><p><a href="https://github.com/yadygarnica/cosmos-change-feed-example">yadygarnica/cosmos-change-feed-example</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8660ca81d14" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>