Skip to content
Back to the blog
  • IA no Desenvolvimento
  • Inteligência Artificial
  • AI code generation
  • workflow de desenvolvimento
  • vibe coding
  • TDD
  • Produtividade
  • qualidade de software
  • Automação
  • Comunidade Dev
  • Futuro do Trabalho
  • Desenvolvimento Pessoal
  • Impacto da IA
  • Projetos Pessoais
  • test driven development

My AI Development Workflow

From PRD to Deployment in Hours

It used to take me weeks, sometimes months, to build a complete system. Today I do the same thing in hours or a few days. Not because I type faster. Because I changed how I think about development. This post isn't about asking ChatGPT for isolated functions. It's about the AI development workflow I use to build systems from scratch, with planning, specialized agents, TDD and deployment, told step by step.

From Chaos to Orchestration: How My Role Changed

In the beginning, I missed getting my hands on the code. I often tweaked what the AI generated. Partly because AI back then wasn't as good as it is today. Partly because I felt I had lost control.

Over time, I understood that the problem wasn't the AI. It was the lack of a system. I asked for things at random, with no direction and no validation. The result was code that seemed to work and fell apart at the first integration.

Today I don't write code. I orchestrate. I think about the architecture, define the requirements, create specialized agents, and the AI executes. That doesn't mean I need to know less. I need to know more.

Code was never the most important part. Anyone who has opened an open source project to study it knows that large systems are made of improvised solutions that work. What always mattered was understanding what the code does, not writing it. Now that we no longer write it, understanding code has become even more critical.

To get out of the chaos, I needed a process that repeats. That's what I show next.

My AI Workflow, Step by Step

The flow always follows the same order:

Idea → PRD → GitHub Issues → TASKS.md → TDD (tests + execution) → Deploy

Each step has a reason. Skipping one creates problems that only show up later, and fixing things later costs much more than preventing them up front.

1. Idea: discuss before asking for code

It all starts with a sentence like "I want to build a complete RBAC authentication system, where do I go from here?". From there it's a back-and-forth with the AI, usually in a web chat. The questions I ask look like these:

  • "Is this idea feasible with this stack?"
  • "Even with significant trade-offs, could we do it with stack X?"
  • "Is this necessary, or is it over-engineering?"
  • "Aren't we thinking too small?"
  • "Aren't we thinking bigger than we should?"

2. PRD: the AI interviews me

Once the idea is solid at a high level, I flip the game: I ask the AI to ask me a series of questions about the system. These are the questions needed to build the full PRD. They're no longer about the idea, but about execution: what the system will do and what it won't.

3. Issues and TASKS.md: extreme granularity

With the PRD ready, I generate the issues on GitHub. From them, I create a TASKS.md file split into stages, with what will be done in each one.

This file sometimes goes past 200 tasks. And each task is small, along the lines of "now create this function".

4. Execution: a fresh session for each group of tasks

For each group of tasks, I open a new AI session with a clean context. Before anything else, I use the tool's planning mode. This reduces hallucinations and makes sure the result is what I want.

I don't carry context over from previous sessions because the functions need to be independent. I plan how that function will work, execute it, and only then start connecting the functions.

5. TDD: no test, no merge

TDD is mandatory in all my projects today. For each group of tasks, the test defines the expected behavior before the code exists. If the AI-generated code doesn't pass the test, the code changes, not the test. I explain this cycle in more detail below and in the post about my journey with TDD.

6. Deploy

Only after that does the code go to production. If you want to see how code gets from my machine to production, I wrote about it in Git Flow to GitHub Flow.

That's the skeleton. Two decisions, though, are what make it work: the order in which I build and the way I set up the agents.

Backend First, Frontend Later

This change took me a while to accept. I used to build the frontend first and only then think about the backend, and I let a lot slip through. When you start with the visuals, it's easy to get excited about the interface and forget to check whether the data structure makes sense, whether the business rules are well defined and whether the integrations will work.

Today I always start with the backend: entities, APIs, business rules and tests. Only with that foundation in place do I move to the frontend. For this, I have backend-specific agents, frontend agents and agents that work on both.

Specialized Agents: the Secret Is in the Limits

An agent is a prompt. And a good agent prompt, for me, follows two rules:

  • Markdown is mandatory.
  • Well-defined sections, including what the agent can and cannot do.

The second rule is the most important. For an agent to be a specialist, it has to know very clearly what not to do. That's what keeps it focused on its job.

A generic agent only has two ways out: either it stays shallow on everything, or it gets so big that it doesn't fit well in an AI session, and then the risk of hallucinations and generic results goes up.

That's why I create separate agents for code review, security and accessibility. Each one has a bounded context, clear rules and knows exactly where its responsibility ends.

Limits on the agent and tests on the code are the two forms of validation in this workflow. And validation is exactly what vibe coding lacks.

Why Vibe Coding Doesn't Work for Critical Systems

The problem with vibe coding isn't AI. It's the absence of validation. When you ask for code without a test that says what's correct, you're trusting that the model understood your intent. That rarely happens consistently. I went into how AI behaves without that anchor in the post about TDD.

Out of curiosity, I've looked at applications built with vibe coding and gained full access to more than one. That's not the exception. It's the consequence of not validating.

For a static site or a personal project, this may not be a problem. When that mindset reaches critical systems, with users and sensitive data, it becomes a security problem.

"The fundamental difference between those who use AI well and those who use it poorly is knowledge. We need a pragmatic, not romanticized, view of AI's limits and strengths."

With that view, besides building better systems, you can apply the same workflow with any tool or LLM. People who vibe code become dependent on the AI and the tool, and don't know how to think without them.

Concept Over Tool

I specialize in the concept, not in a specific tool or LLM. I can run this workflow anywhere. Today I mostly use Claude Code or OpenCode with Alibaba's plan. Tomorrow it could be another tool. The workflow stays the same.

What changed was how I split my time. I used to plan very little. Today I spend much more time preparing a well-documented environment before executing. That trade is what made the jump from weeks to hours possible.

And the TDD cycle still doesn't feel natural to me. I'm still learning, and I often feel slower than before. The results say otherwise: fewer bugs, less refactoring later and more confidence to change the code.

Conclusion

This workflow wasn't born ready. It came from mistakes, from code that fell apart in production and from integrations that failed because I hadn't planned enough. Trial and error took me from chaos to orchestration.

The main lesson is that AI doesn't replace thinking, it amplifies it. If you think in a disorganized way, AI generates disorganized code faster. If you think in a structured way, it executes in a structured way, and even faster.

If you want to start tomorrow, do it in this order:

  • Plan before asking for a single line of code. Define what the system does and what it doesn't.
  • Break the work into small tasks. One task, one function.
  • Use TDD to validate. The test comes first, and the code adapts to it.
  • Never trust AI output without validation.

The difference between vibe coding and professional AI-assisted development isn't the tool. It's the process.

References

Matheus Mierzwa

AI Enablement Lead & Frontend Tech Lead

I write about what I build and lead in practice.