Dynamic Firebase skills: Architecting agent ready codebases

By Google Cloud Tech

Share:

Key Concepts

  • Agentive Development: Designing software architectures specifically to be navigated and manipulated by AI agents.
  • Skills: Modular, context-specific instructions or logic packages that allow AI to perform specialized tasks without overloading the primary context window.
  • Context.md: A documentation strategy involving directory-level markdown files that provide AI agents with summaries and structural context.
  • Brownfield Projects: Existing codebases where AI is used to refactor, add features, or fix bugs, as opposed to starting from scratch (Greenfield).
  • MCP (Model Context Protocol): A standard for connecting AI assistants to external data sources and tools.
  • Vibe Coding: A development approach focusing on high-level intent and rapid iteration, often utilizing AI to bridge the gap between design and implementation.

1. AI-Driven Architecture and "Skills"

Rohde emphasizes the use of "Skills" to manage AI context effectively. By packaging specific logic (e.g., a "refund" skill vs. an "upsell" skill), developers can:

  • Dynamic Context Loading: Load only the relevant skill into the AI’s context window based on the user's current intent.
  • Sandboxing: Prevent different logic sets from "polluting" each other, ensuring the AI remains focused on the specific task at hand.
  • Automation: Rohde utilized automated pipelines where file uploads to Firebase Storage trigger functions that generate the necessary YAML and metadata for these skills, removing the need for manual coding of the infrastructure.

2. Preparing Codebases for AI Agents

To work effectively with AI on existing (Brownfield) projects, Rohde suggests specific engineering practices:

  • Context Documentation: Create context.md files in every directory. These files summarize the directory's purpose and contents, allowing agents to understand the project structure without reading every file.
  • Horizontal/Flat Architecture: Refactor code into smaller, modular functions. This makes it easier for agents to perform refactoring tasks and maintain state across layers.
  • Testing: Robust test suites are essential because AI agents can generate and modify code at high speeds; tests act as a safety net for these rapid changes.

3. The Planning-First Methodology

A significant shift in modern development is the move toward a design-heavy workflow.

  • The 60/40 Rule: Rohde notes that approximately 60% of the development time should be spent in the design and planning phase.
  • Tooling for Planning: Use tools like NotebookLM or the Gemini app to research, scope the problem, and create a clear plan before writing code.
  • Visualization: Use prototyping tools (like Stitch) to visualize ideas. If an idea cannot be described or visualized clearly, it indicates that the concept is not yet fully formed.

4. Practical Workflow for AI Development

Rohde outlines a tiered approach to starting AI projects based on the developer's current phase:

  1. Dreaming/Ideation: Use visualization tools to see if the idea is coherent.
  2. Research/Scoping: Use NotebookLM or Gemini to define the problem space and technical feasibility.
  3. Prototyping: Use AI Studio for quick, shareable prototypes.
  4. Implementation: Use AI-integrated editors (leveraging MCP servers) to connect to real data sources and build out the application.

5. Notable Quotes

  • "Greenfield doesn't really exist because you write the code and then it's Brownfield immediately." — Rohde, on the reality of working with existing codebases.
  • "I like to exploit the fact that humans are really good at pattern matching." — Rohde, regarding the human role in supervising AI agents to ensure they stay on track.
  • "If you can't describe it and make it visually, you're like, oh, maybe I don't know the idea well." — Rohde, on the importance of the planning phase.

Synthesis

The core takeaway is that successful AI-assisted development is less about the raw power of the model and more about architectural preparation and intentional planning. By creating "agent-ready" codebases through modular design, clear documentation (context.md), and a disciplined design-first approach, developers can significantly increase the efficiency and accuracy of AI agents. The transition from "getting it to work" to "designing for agentic success" is the defining shift in modern software engineering.

Chat with this Video

AI-Powered

Load the transcript when you're ready to chat so the initial page stays lighter.

Related Videos

Ready to summarize another video?

Summarize YouTube Video