Beyond Prompts: My 3-Folder System for Effective AI Coding in Flutter

Is there a secret to making your AI agents truly understand your Flutter codebase and massively speed up your development workflow? Well, for me, it's all about these 3 essential folders.

  • ai_toolkit: My collection of LLM-friendly commands and patterns.
  • ai_specs: My prompts and plans for ongoing work.
  • ai_docs: My persistent knowledge base for AI agents.

In the video above, I break down exactly what these folders are, how they fit into my AI-assisted workflow, and how you can make the most of them in your AI coding sessions.

My AI-assisted coding workflow
My AI-assisted coding workflow

You see, in the last few months, I've been leaning heavily into AI agents like Claude code and Codex. These powerful tools are creating a fundamental shift in how we develop software. It's less about directly writing every line of code ourselves, and more about orchestrating AIproviding precise context, and carefully verifying its output. To get the most out of them, we need to rethink our entire workflow.

But here's the thing: even with powerful AI, they won't produce consistently good results unless you give them the right context.

In fact, it's fair to say that the results you get are only as good as your prompts.

So how can you, as an engineer, learn to use AI to its full potential and leverage this context effectively? That's precisely what these 3 essential folders help you do in your Flutter apps.

AI Toolkit: Standardizing AI Interactions

First up is the ai_toolkit folder. This is essentially where I keep all my LLM-friendly commands and patterns specifically tailored for Flutter development. I created this because setting up new projects takes time, boilerplates can be too opinionated, and AI agents, while smart, have a high failure rate without proper guardrails.

Thanks to this toolkit, I can do some really cool things:

  • I can prime my AI agents with relevant breaking changes in Dart and Flutter, so they don't generate outdated code.
  • I can quickly run commands I use often.
  • It helps me enforce consistent project guidelines and code style across all my coding sessions, no matter which AI I'm using.
  • And it lets me quickly scaffold new projects with components and functions in a standardized way.

In practice, I "seed context" into my AI sessions using custom commands from this toolkit. This removes ambiguity, making sure the AI follows my specific code patterns and style. If AI ever misses the mark, I can just add a new guideline to my toolkit and include it in the context. This ensures consistent, higher-quality code. Plus, I've created variants that work across different AI agents, and I include commands for things like conventional commits, planning out features, and even letting the AI know about my local shell aliases to reduce friction.

Ultimately, the ai_toolkit is all about giving AI the right context and removing friction. I use it as a submodule across my projects, which helps accelerate onboarding, enforces code consistency, and reduces my cognitive load by letting AI handle repetitive decisions. It's a personal tool for now, but I might make it available later!

AI Specs: Structured Planning and Execution

Next, we have the ai_specs folder. The main idea here is that while agentic AI can plan, build, and verify, the results are still only as good as my prompts. So, I need guardrails to keep AI agents on track. This folder helps me keep track of all the prompts and plans I use for agentic coding, ensuring I follow a consistent workflow.

My workflow typically involves:

  1. Creating a requirements file: This markdown file outlines everything needed for a feature, bug fix, or refactor – it's the "thinking" part.
  2. Generating a plan: I feed this requirements file to my AI agent, asking it to make a detailed plan. I'll iterate on this plan until I'm happy, then save it as a markdown file right here in ai_specs.
  3. Implementing the plan: I then have the AI implement the plan, ideally one stage at a time, so I can easily review and course-correct.
  4. Verification: I let the AI run tests to ensure they're green, and I also manually test the app myself.

This process is highly iterative, and things don't always go perfectly. I might discover missing requirements, overly complex implementations, or code duplication. The key is to set a high bar for quality. Since producing code with AI is "cheap," I can afford to iterate, correct course, or even restart to ensure the app is maintainable long-term.

Once everything is complete, tests are green, and the app works, I push changes to GitHub. A neat trick is to instruct the AI to include the completed plan as the Pull Request description. The ai_specs folder then becomes a historical record of all my prompts and plans, almost like a local copy of my GitHub issues and PRs.

AI Docs: Persistent Project Knowledge

Finally, let's talk about the ai_docs folder. Think of this as a persistent knowledge base specifically for your AI agents. It's a great place for storing crucial information that AI needs but might not find directly in the code or ai_toolkit.

This includes things like:

  • API documentation and integrations.
  • Architecture and design documents.
  • Hidden non-code business logic (important rules the AI needs to know).
  • Project-specific patterns that might be unique to this project, even if they differ from the general toolkit.

I use this folder in my projects to outline API specifications and UI functionality. As a project grows, I keep this folder updated with all the critical information my AI agents need. For older projects, I've even used AI to help generate this documentation, feeding these documents to the AI when starting a new session so it can understand the project's architecture and generate more consistent code.

Why These Folders Matter

So, to summarize, I use these three essential folders in my Flutter development workflow:

  • ai_toolkit: My collection of LLM-friendly commands and patterns.
  • ai_specs: My prompts and plans for ongoing work.
  • ai_docs: My persistent knowledge base for AI agents.

The main difference is that ai_docs holds knowledge that evolves over time, like living documentation, while ai_specs is more of a historical record of specific tasks, which might become outdated.

Overall, these folders are incredibly helpful because they:

  • Help me stay organized and follow a consistent workflow.
  • Make it much easier for AI to follow my guidelines and stay on track.
  • Reduce a lot of friction by letting me reuse battle-tested patterns, commands, and prompts.

I really encourage you to create your own similar folders. Just think about repetitive tasks or situations where AI gets it wrong, and then write your own guidelines to steer it. While there's an upfront time investment, it absolutely pays off in the long run, leading to faster development, fewer bugs, and more consistent quality.

By the way, in this video, I haven't even touched on advanced topics like MCP servers or sub-agents. Honestly, I feel like I'm just scratching the surface of what's possible with AI agents. But as I keep exploring and learning, I'll be sharing more videos.

Happy coding!

Want More?

Invest in yourself with my high-quality Flutter courses.

Flutter In Production

Flutter In Production

Learn about flavors, environments, error monitoring, analytics, release management, CI/CD, and finally ship your Flutter apps to the stores. 🚀

Flutter Foundations Course

Flutter Foundations Course

Learn about State Management, App Architecture, Navigation, Testing, and much more by building a Flutter eCommerce app on iOS, Android, and web.

Flutter & Firebase Masterclass

Flutter & Firebase Masterclass

Learn about Firebase Auth, Cloud Firestore, Cloud Functions, Stripe payments, and much more by building a full-stack eCommerce app with Flutter & Firebase.

The Complete Dart Developer Guide

The Complete Dart Developer Guide

Learn Dart Programming in depth. Includes: basic to advanced topics, exercises, and projects. Last updated to Dart 2.15.

Flutter Animations Masterclass

Flutter Animations Masterclass

Master Flutter animations and build a completely custom habit tracking application.