Mobinova logo
AI Engineering

Git Is the Memory: How to Build Production-Ready Apps with AI Coding Agents

Mobinova
#ai#coding agents#codex#git#software engineering

When using AI coding agents—especially autonomous tools like OpenAI’s Codex—there is a common trap engineering teams fall into: dumping the entire product architecture, context, and requirements into a massive chat window, hoping the agent will magically output a completed feature. This rarely works well.

In real-world, multi-repository environments spanning mobile apps (iOS and Android), backend services, and web frontends, AI should not be treated merely as a disposable code generator. It must be positioned as a repository-aware engineering partner.

Across thousands of internal AI sessions and months of development, we adopted a core philosophy: put durable context in the repository, keep the conversation focused, and let each AI session operate on a precise piece of work.

Here is how we make it happen in practice.

The Three-Layer AI Engineering Architecture

The heart of the system is removing the burden of memory from the chat interface and making Git the actual memory. This is achieved through three layers.

1. AGENTS.md: The Engineering Operating Manual

Instead of constantly reminding the AI to “use the correct JDK for Android,” “do not hand-edit generated Protobuf code,” or “use this specific analytics abstraction,” we store these rules in a stable AGENTS.md file.

This file acts as the repository’s constitution. A great AGENTS.md rule has four properties:

A build failure caused by a wrong dependency becomes a repository rule once and then disappears as a repeated class of mistake. It is compounding engineering memory.

2. The todo/ Directory: Executable Specifications

These are not loose note dumps. They are state machines for features. Every major epic gets its own Markdown file in this directory.

3. Short, Controlled Agent Turns

Because the context lives safely in Git through AGENTS.md and todo/, our prompts to Codex can be incredibly short.

Looking at our internal telemetry across thousands of successful AI turns, the data is striking:

We do not ask the agent to “build the feature.” We tell it: “Check the epic, pick the next unchecked task group, implement it properly, and verify.”

A short prompt without repository context is ambiguous. A short prompt on top of durable repository context is wildly efficient.

How AI Operates in the Production Workflow

We use Codex across the entire product lifecycle, not just for writing functions.

Codebase Archaeology and Planning

Before writing any code, we ask Codex to explore. It scans existing UI components, view models, database repositories, background workers, and Git history. This prevents designing against an imagined architecture. The plan always starts from the code that actually exists.

Contract-First Multi-Repository Delivery

For features crossing boundaries, the plan is always structured in order: shared contracts such as Protobuf or GraphQL first, then backend logic, and finally clients. Codex is remarkably good at maintaining field names, state machines, error semantics, and idempotency rules across completely different languages such as Go, Swift, Kotlin, and TypeScript.

Cross-Platform Parity

One of our most effective workflows in mobile development is the “parity prompt.” We instruct the agent:

Inspect the iOS app and treat it as the source of truth for UI and routing. Find the parity gaps in the Android app and implement them.

This allows Codex to compare layouts, copy, navigation, and backend assumptions in a single pass, while the human engineer retains control over which platform is authoritative.

Pull Requests and Release Operations

Codex frequently handles the mechanical tail of delivery. It can check worktree status, create branches, commit intentionally, open draft pull requests, and even read review comments. You can instruct the agent to “inspect unresolved review threads, fix them, push, and resolve the threads.”

The engineer remains the decision-maker while the agent carries state across Git.

Pitfalls and Lessons Learned

No workflow is without friction. Here is what we had to fix along the way.

Todo Board Inflation

Epics can easily balloon into hundreds of checkboxes, making the plan obsolete before it is finished.

Solution: Split large epics at contract or release boundaries, keep only the immediate deliverable slice executable, and promptly archive finished work into a docs/ folder.

Verification Timing

In mobile repositories, compiling after every single checkbox dominates the workflow and wastes time.

Solution: Divide implementation into compile-coherent milestones, explicitly asking the agent to verify only at those milestones and reserving the full test matrix for a final pass.

Production Safety

AI can diagnose production logs brilliantly, but mutating live systems is dangerous.

Solution: Enforce strict rules. Diagnose read-only first, sanitize logs, never expose personal data, and prefer reversible changes. Never let the AI execute a database or configuration mutation without explicit human authorization.

Conclusion

The biggest productivity gain in AI-assisted engineering does not come from discovering a magic prompt. It comes from redesigning where your context lives.

Stable rules live beside the code. Feature decisions live in versioned epics. Progress lives in checkboxes, commits, and pull requests. The AI agent can then enter for a two-minute turn, do one well-bounded piece of work, leave evidence, and exit.

The AI sessions might be short, but your engineering memory becomes permanent.

← Back to Blog