How we built a wallet feature with AI writing 100% of the code

How we built a wallet feature with AI writing 100% of the code

by Rui Magalhães -

AI wrote 100% of the code for our latest feature on a client’s platform. A cross-platform wallet system where users load funds, manage their balance, and use it to pay for services. Real money, real users, zero room for error.

That’s a big claim, so here’s exactly how we got there.

Before this feature, our work was more siloed

Before AI became part of our workflow, feature work was more compartmentalised. Mobile developers stayed on mobile, backend engineers stayed on backend.

Now, any engineer can use agents to identify changes in parts of the system they wouldn’t normally touch. This benefits flexibility, speed, and overall knowledge of the system as a whole.

That said, it’s not always possible or ideal. For the wallet, we needed to lean on our individual expertise to keep things moving. But AI still helped tremendously with our planning and execution of the work.

The PRD as shared ground: how we plan AI-assisted development

Our Product Requirements Document is the starting point. We have a robust template built over years of iteration. To fill it, we run a discovery phase designed to produce a solid solution.

We use AI extensively here: all our discussions are saved as transcripts, then processed by AI to structure the information, cut the noise, and surface blind spots. During this process, we treat agents as teammates. They have the same context we do: our understanding of the problem, our codebase, and our documentation. We go back and forth until the PRD is solid enough for agents to read and know exactly what needs to be built.

One thing we learned quickly: it’s not enough to describe what you want. You also need to describe the constraints.

This service handles a huge volume of transactions, and financial correctness is non-negotiable. When agents understand the impact and scale of what they’re building, the quality of their output significantly improves.

The PRD is a high-level shared document that covers all the components of the system. This matters because we want to avoid silos. With AI, we can have agents learn the quirks of multiple components, suggest how they communicate, and flag pitfalls that used to surface much later in the process.
Our PRD is not set in stone. Scope changes, requirements shift and AI absorbs much of the cognitive load when we need to figure out what to adapt.

Safeguards: validating AI-generated code for production

AI wrote 100% of the code for this epic. We validated and trusted it, but we didn’t write it. Even compared to a couple of years ago, this is a significant shift in how we work. And this is a wallet. A bug here doesn’t mean a broken layout; it means a user gets double-charged or loses their balance. You can’t afford to get that wrong! To keep this process reliable and our cognitive load under control, we have safeguards in place.

We all have particular ways of working with AI agents, but a couple of practices help with team collaboration. During this development cycle, we used agents to generate acceptance criteria documents. We then handed them back and forth for review, and had the agents handling the other pieces check whether everything still held together.

Think API additions, payload changes, and interactions across applications that needed updates. While staying focused on our assigned work, agents helped us keep things synced and aligned with the original plan.

This was especially important because AI-generated code is not always production-ready out of the box. The code agents produce works, but it’s not always how we’d do it ourselves. It can be more complex than necessary or not optimised for our scale. Our review process is where that gap gets closed.

Closing the loops: verification and documentation

We believe agents’ success in our context is tied to how well we close feedback loops. Can the agents verify if the work they produced is correct?

At the micro level, we power agents with tools to complete verification. We use tests of various kinds, all to ensure that changes are correct and that nothing already in place has broken. At a higher level, we’re also experimenting with agents that control the browser and mobile apps to support manual testing. This increases our confidence in the work we produce. If you’re curious, we wrote about how agents can QA a mobile app.

Finally, documentation. With agents here, we’re much better at keeping docs up to date. Maintaining cards over the development cycle is easier and more robust. As with committed code, we’re always fully responsible for what’s written in PRDs, cards, pull requests, and reviews. The goal isn’t to offload this work entirely. It’s to do it with support that keeps us fast and precise.

What we shipped and what we learned

The wallet is now live! We’re confident we shipped it faster and with higher quality because of the processes described above.

If there’s one takeaway from this experience: AI amplifies clarity just as much as it amplifies ambiguity. The better your specs, your criteria, and your planning, the better the output. The process around AI matters as much as the AI itself.

We’re still refining how we work. But the level of alignment and speed we got on this epic isn’t going back. The next one will only build on it! If you’re working through a similar shift in your team, we’ve written about the practical workflows that make AI code agents reliable.


Rui Magalhães

More posts

Share This Post

Webinar: May 20

AI for Organisations: from personal use to company-wide capability

AI for Organisations: from personal use to company-wide capability
Free webinar - May 20

Register Now