// MAKING-OF · PET PLANNER · TECHNICAL CASE STUDY

This app was built by
a fleet of AI agents.
And we measured every token.

Pet Planner is a real multi-platform SaaS, running in production. But what it proves is not on the user's screen — it is in how it was made: 10 AI agent personas, a 7-phase pipeline with human approval between each one, and a cost log that records token by token. This is not a pet app. It is proof that the agent factory delivers.

10 AI personas 7 phases · human approval 385 measured LLM calls AI + People
10
AI agent personas
7
phases with a human approval gate
385
LLM calls in an 8-story sprint
71%
cache hit — measured savings
// The product (just the context)

What the fleet built

To understand the telemetry, first the object. Pet Planner is a multi-platform pet health and routine SaaS for pet parents in Brazil, delivered as a PWA on the web and a native app on mobile, both on top of the same API. Five repositories, one product — and this page is about how they were built.

🧩
API
.NET 10
🌐
Web
Nuxt · PWA
📱
Mobile
Flutter
☁️
Infra
Bicep
🤖
AgentWorkspace
the AI factory
// Contract-first

One contract, three clients

OpenAPI and AsyncAPI events are the end-to-end source of truth. The same contracts become contract tests in CI for API, Web and Mobile — the PWA and Flutter speak the same language because they validate the same contract.

// Security & LGPD by design

A posture defined before the first line

Encrypted PII (AES-256), per-IP rate limiting, mandatory e-mail verification and a leaked-password blocklist. It is not a patch applied later: the agents follow this posture as part of the organization's standard.

🔎

The honesty that opens this page

Pet Planner's AI is in the build, not in the runtime. The product's API ships no AI — no LLM answers the end user. It is an app built by AI agents, not an app with AI features. Saying that out loud is part of the brand: where there is AI, we point at it; where there is none, we say so.

// How it was built

A fleet of 10 personas in a 7-phase pipeline

The AgentWorkspace is a spec-driven multi-agent environment. Each persona has a defined role; none works alone and no phase moves forward until a person approves. It is the ZDZCloud method in practice: copilot first, AI + People, evidence-based decisions.

// The fleet
🎯
Orchestrator
orchestrator
📋
Product Owner
product-owner
📐
Architect
architect
🧩
API Dev
dev-api
🌐
Web Dev
dev-web
📱
Mobile Dev
dev-mobile
🔍
Reviewer
reviewer
🧪
QA
qa
🛡️
Security Auditor
security-auditor
⚙️
DevSecOps
devsecops
// The pipeline (SDD · spec-driven development)
1

Spec

The Product Owner and the Architect turn the story into a specification: contracts, acceptance criteria and ADRs. The source of truth is born here — not in the code.

Human approval before planning
2

Plan

The Orchestrator designs the execution plan and syncs it with Azure Boards. The work becomes an auditable map before any agent writes code.

Human approval before slicing into tasks
3

Tasks

The plan is broken down into parallelizable tasks, each with a clear contract and scope — ready to be routed to the right devs.

Human approval before development
4

Dev (parallel)

API Dev, Web Dev and Mobile Dev work in parallel on the same contract. Code and tests ship together; the contract tests keep the three clients aligned.

Human approval before review
5

Review

Reviewer, QA and Security Auditor go over everything with a fine-tooth comb: quality, coverage and security/LGPD posture. It is where the machine challenges the machine — and the person arbitrates.

Human approval before merging
6

Merge

With the gates green, the delivery is merged into the base. Contracts and ADRs remain as the record of what was decided and why.

Human approval before publishing
7

Deploy

DevSecOps drives the release. The cycle closes with the story in production — and its token cost log already accounted for.

// The telemetry

The honest numbers of one sprint

Every campaign talks about "AI savings". We show the log. These are the real numbers from one 8-story sprint of Pet Planner — savings measured, not estimated. It is the same auditability instinct we apply to code: if we cannot point at the number, it does not go in.

cost-log · sprint = 8 stories · Pet Planner AgentWorkspace
8
stories in the sprint
385
LLM calls
3.28 M
input tokens
71%
cache hit
Cache reuse on input tokens71%
71% served from cache
Cache hit — 71% New tokens — 29%
Derived: ≈ 8.5K input tokens per call (average) ≈ 2.33M tokens served from cache ≈ 0.95M new tokens
📌

Where this AI runs — and where it does not

These 3.28 million tokens were spent building Pet Planner: writing spec, code, tests and reviews. None of them runs in the app the user opens — the AI is in the BUILD, not in the product's runtime. Measuring the cost of building is what lets us say that with numbers in hand.

// Why this matters to you

The same factory builds your software

Pet Planner is not a one-off assembled for the portfolio: it is the agent factory running the way it runs every day. What you saw here — the fleet, the gates, the cost log — is the process that goes on to build your product.

Fleet speed

API, Web and Mobile devs work in parallel on a single contract. Several streams move forward at once without going off the rails, because they all validate the same source of truth.

🧭

Governance, not a black box

Seven phases, human approval between each one, ADRs and contracts as the record. You approve, reject or request changes — the weighty decision always belongs to a person. AI + People.

📊

Cost measured, not promised

Every story has its token cost log. You do not get an opaque "AI" invoice: you get the number — calls, tokens, cache hit — to decide with evidence.

// What we learned

Three lessons the log left us

♻️

Cache is not a detail — it is the bill

71% of input tokens came from cache. Structuring the work to reuse context is what separates an expensive agent fleet from a viable one. Cache is an architecture decision, not luck.

  • Stable context = reused tokens

Human approval is the right brake

A gate between each phase keeps a spec mistake from becoming deploy rework. The person does not slow the fleet down: they keep the fleet from racing in the wrong direction. Copilot first, autonomy proven later.

  • Cheap mistakes: caught early, in the right phase
🔬

Measure to decide

Without the cost log, "AI saves money" is faith. With it, it is a spreadsheet. Instrumenting tokens per story turns the AI cost discussion into something auditable — and honest about where the AI is and where it is not.

  • The number gets in; the assumption does not
// Bring your project to the factory

Your next software, built like this

Multi-platform on one contract, an agent fleet doing the development, human approval between phases and every token measured. Let's talk about your project — and show you the process, not just the slide.