Skip to Content
Behind the Algorithm

Building a Quality Culture With AI

Writing code got cheap. Checking it did not. Here is what one team changed so quality became everyone’s job, not just QA’s.

Building a Quality Culture With AI

A year ago, writing the code was the slowest part of shipping a feature. Today it is often the fastest. But how do we measure the quality of our output? How do we ship fast, but not break things? These are some of the questions that all companies are juggling with.

At Keychain, we are building software for consumer packaged goods (CPG) manufacturers and brands. What we ship drives real sales conversations, real production runs and real stock on real shelves. The margin for error is close to zero.

This is the story of how we have been trying to build a quality culture in a world where AI lets everyone ship more code than ever, and without the right guardrails, it is easy to turn AI output into AI slop. It is not a success story yet. Some things are working, some are still rough, and we have changed course more than once. These are the lessons so far.

Speed first, until AI moved the bottleneck

Every startup makes the same trade. Early on, speed beats almost everything. Quality lags behind and becomes the thing you will fix “once things settle down”. Things never settle down.

We were no different. We relied heavily on manual testing: a feature was built, someone clicked through it, and it shipped. Regression depended on people remembering what might break. This is how a lot of startups run, and while it is not the best approach, it ends up being the default because automation often lags behind in priority over shipping new features. Manual testing was never enough, but slow building hid how far behind it was. AI made the gap impossible to ignore: building got much faster, and checking did not.

AI made writing code much faster. It did not make reviewing or testing manually any faster. Both became queues, and when a queue gets long enough, people start skipping it. Pull requests got bigger, reviews got shallower, and customers started finding issues we should have found first.

Old wisdom: “Quality and speed are a trade-off.” With AI this flips.

Writing is cheap now. Reviewing, testing and fixing what escaped is the slow part, so poor quality is what slows you down.

Quality is everyone’s responsibility

Our first real step was not a tool. It was alignment.

We started by being explicit about what quality means, and about who it belongs to. At most places, the default answer is “QA”. We believe:

Quality is not a QA responsibility. It is everyone’s responsibility.

It sounds obvious, but without clear accountability/ownership “everyone” can easily mean “someone else, not me”. And you cannot say who owns what until you agree on what quality is made of.

Quality comes in layers. Each layer answers a different question, catches a different kind of bug, and costs more than the one above it. Above all of them sit the test scenarios: a precise description of what the feature should do, which every layer tests against.

Read across a row and one owner is accountable for it. Read down a column and every role has something specific to own, which is what turned “quality is everyone’s responsibility” from a slogan into a working agreement.

Stop the leak, then bail out the boat

While we had a big backlog, we also wanted to ensure that we do not keep increasing it further. With ownership agreed, execution split into two fronts: code we were about to write, and code we had already shipped. Each needed a different starting point.

New development: shift left

For anything new, we wanted quality decided before the first line of code:

•  Test cases come first. At PRD sign-off, a skill drafts the test scenarios from the PRD, so the expected behavior is written down before development starts.

•  Test-driven development for all new work. Developers write failing unit tests first, and tooling enforces it.

•  One source for every layer. The same scenarios feed unit and integration tests, so the fast, cheap layers carry most of the weight.

Already-shipped features: start at the top

Here we had no such luxury. Hundreds of features had shipped with little automated coverage, and a lot of business logic had drifted into the frontend. An API test cannot see a rule that lives in a UI component, so API tests alone could not protect us from regressions. We started with end-to-end regression in the browser, and used gap analysis on existing test suites to find what they miss. As logic moves back to the backend, the tests move down the layers with it.

Old wisdom: “Build the test pyramid from the bottom up.” Right for new work. For what’s already shipped, your architecture decides where you can start.

Everyone agreed, until it was their job

Asking every role to own a piece of quality meant asking every role to change a habit. And changing behavior turned out to be harder than we expected.

Developers: test first, keep it small

The first reaction: Developers will have a bias and will miss scenarios, so we should have an independent checker (QA).

So we changed where developers’ tests come from. Developers now get the end-to-end scenarios from the PM, and use them as the basis for their unit and integration tests. To take bias out of the loop, we switched to test-driven development: tests are written before the code, so they describe what the feature should do rather than what the code happens to do.

PMs: the spec becomes the test

The first reaction: writing tests is not a PM’s job.

We chose Gherkin (Given, When, Then) as the one way to describe expected behavior, readable by PMs, developers and QA alike, and used Claude to generate scenarios from the PRD, so the PM’s job became reviewing and sharpening them rather than writing from scratch.

To help PMs write meaningful tests, we built a set of skills that draft test cases across a wide range of scenarios and validate them against the code. A useful side effect: PMs started catching obvious gaps in their own PRDs before handing them to developers. We also built a skill that finds gaps between the design and the PRD, so those are resolved before developers start on a feature.

The Catch-22

Even with all of this in place, the first few weeks were bumpy. PMs and developers were each waiting for the other to prove the new way was worth the effort. Developers were not used to testing their own features, and when QA stepped back from small features, quality dipped for a few releases.

What helped most was looking at outcomes instead of effort. We now review production issues one by one and ask a simple question of each: was this case missing from the scenarios, or was it covered but missed in execution?

•  A missing scenario is a gap on the PM side.

•  A scenario that existed but whose tests were never written or run is a gap on the engineering side.

That turned a debate about whose effort was worth it into a specific list of fixes on both sides, and every finding feeds back into our skills, so the next set of scenarios covers what the last one missed. It is still a work in progress, but the question has moved from “why should I write these?” to “are the scenarios good enough?”

QA: from manual testers to automation

Our QA engineers were keen to automate, but many came from manual testing and did not yet have deep automation skills. Relying blindly on Claude would only generate more AI slop. So we invested in a framework and skills that turn their scenarios into tests, so that knowing the product mattered more than coding speed. It has produced more than 3,000 automated tests across our products in the last 4 months, and reduced our regression issues by more than 90%.

The first generated suites were wide but shallow. Almost every flow had tests, but most covered only the happy path. The test count went up quickly, but we still kept running into frequent production issues.

So we stopped celebrating test counts and started looking at depth on the flows that matter most: errors, edge values, two users acting at once, the same request sent twice. And because an agent will happily report success, the test runner, not the agent, decides whether a test passes. The true north star was reducing the number of issues reported by customers in production.

Solving the review bottleneck

Tests are one half of catching slop. Review is the other. With so much AI-written code, it is hard to rely completely on human reviews, so we built a stronger review into every stage: review skills for PRDs and technical designs, scenarios reviewed before any code exists, and, at the pull request, automated AI review, mutation tests that check whether tests can actually fail, and security checks that run as pre-commit hooks and in CI.

Even with all of that, human review cannot cover every line. So we asked which parts of review need a human, and which parts we can hand to machines.

The left column only works if people trust what the machines say. That turned out to be the hard part.

Our first AI reviewer was too noisy. Engineers learned to silence it: hundreds of “ignore” comments in a single week, as a lot of findings turned out to be false positives. Nobody was being lazy. When most warnings are wrong, people stop reading warnings. So, we built an AI telemetry layer, which would capture the following for every gate:

•  How many issues were reported by that gate?

•  What % of findings were accepted/rejected by team?

This has provided us the right feedback loop to iteratively improve our gates incrementally and weed out bad gates faster. It has helped us cut the noise by about 90%, and we now roll out every automated check the same way.

Noise does not just waste time. It trains people to step over the gate, and then it catches nothing.

A gate is only as strong as people’s trust in it.

Measuring outcomes: one north star

Everything above is activity. What matters is the outcome: do our customers run into fewer bugs? So the number we hold ourselves to is the number of bugs reported by customers every month. It lags, and it is imperfect, but it cannot be improved by writing more tests that check nothing.

The supporting signals tell us whether we are heading the right way before the north star moves. Finding more bugs ourselves is good news, even when it makes the internal bug count go up for a while. We deliberately do not set goals on test counts or coverage: they are easy to grow, and they say little about whether customers are safe.

Lessons Learned

•  Culture moves slower than tooling. We can build a new skill in a week. Changing who feels responsible for quality takes months, and it moves at a different pace in every team.

The tools were rarely the bottleneck; habits were.

•  Review did not go away. It moved. AI made producing code, tests and scenarios cheap. It did not make checking them cheap.

Reviewing a generated PRD, design or test suite properly is real work, and most of our attention now goes into verifying rather than producing.

•  Common tooling beats individual effort. When the same gaps show up in every team’s work, the fix is shared tooling, not more care from each person. But shared tools need clear owners, and need to adapt to each team through configuration rather than copies that drift apart.

What’s next?

We are still quite early in the entire journey, and “what’s possible” continues to evolve every month. All of these are baby steps towards building a better harness engineering layer, which can enable longer running humans and agents to produce high quality code faster.

The question we keep coming back to: when AI can produce a feature, its tests and its review in an afternoon, what is the human’s job? Our answer for now is  We will see how well that holds up.

that humans decide what “right” means, and build the checks that can tell the difference.

Kapil Kaushik

The Author

Kapil Kaushik

Chief Technology Officer, Keychain

Kapil has spent two decades building and scaling technology at high-growth startups. In his current avatar, he leads the entire technology function at Keychain, from frontend and backend to data and AI, and drives the engineering behind the company’s 10x growth goals. A firm believer that AI is redefining how software gets built, he rejects the old trade-off between speed and quality. In his view, the companies that pair AI with the right guardrails will ship faster and better, and pull decisively ahead of everyone else.

Disclaimer

The views in this article are the author's own. They are not the views of Renous, its affiliates, its employees or its associates, nor of The Renous Vantage or the author's employer, and publication here should not be read as endorsement of them.

The Renous Vantage publishes the writing of senior leaders in their own names, and edits only for clarity and length. The author is responsible for the accuracy of what is written here.

Nothing in this article is professional advice, whether legal, financial, tax, medical or otherwise. It is general commentary, and it is no substitute for advice from a qualified adviser who knows your circumstances. Readers should carry out their own research and due diligence before acting on anything they read here.

The article is accurate to the best of the author's knowledge on the date of publication. Neither the author nor Renous undertakes to update it as circumstances change. Any third party names, products or links are referenced by the author and are not endorsements.

Where a collection carries a partner, that partnership has no bearing on what is commissioned, written or published.

More in Behind the Algorithm

The GCC Mandate for India

BEHIND THE ALGORITHM

The GCC Mandate for India

Jaspreet Singh 4 Dec 2026 39 views

Arts Graduates Can Win in the AI Era. Here's How.

BEHIND THE ALGORITHM

Arts Graduates Can Win in the AI Era. Here's How.

Amit Gupta 30 Nov 2026 110 views

All of Behind the Algorithm

Attend our initiatives Join our WhatsApp channel
RENOUS WhatsApp Channel

Join 1,500+ of India's C-Suite.

Join the channel →