The Challenge: AI Context in Fragmented Codebases
Modern software development often involves multiple, distinct code repositories. For instance, a platform might have separate repositories for shared business logic, an iOS presentation layer, and an Android presentation layer. These repositories, often developed over several years, have independent commit histories and CI/CD pipelines. Integrating AI agents, which thrive on comprehensive context, into such fragmented architectures presents a significant challenge. Loading the entirety of three mature, non-mergeable repositories into an AI's context window is impractical and inefficient. This is precisely the problem Jens Reynders tackled, leading to the development of the meta-repo concept.
The initial goal was ambitious: create a truly agentic coding setup. This meant a unified environment where shared documentation, common skills, and overarching rules could be automatically loaded, regardless of which specific platform repository a developer was currently working within. The immediate benefits were clear: onboarding became significantly easier, and the setup process was reduced from multiple commands to a single, streamlined action. This was a direct consequence of structuring the codebase for AI context, a problem that differs fundamentally from traditional human-centric code organization.
Designing the Meta-Repo Solution
The meta-repo isn't a new repository that swallows existing ones. Instead, it acts as an orchestrator, a central point of access that intelligently surfaces relevant context from multiple sources to an AI agent. Think of it less like a giant merge operation and more like a highly organized librarian for your AI assistant, able to fetch the precise books (code snippets, documentation, rules) needed from different shelves (repositories) on demand. This approach respects the existing separation of concerns and independent development lifecycles of the individual repositories.
The setup for this specific project involved three core repositories: one for shared Kotlin Multiplatform code, an iOS presentation layer, and an Android presentation layer. These had been established for 4-5 years, predating widespread AI assistant integration. The meta-repo was designed to bridge the gap, providing AI agents with a unified view of these disparate codebases. This involves defining a clear structure within the meta-repo that references the content of the other repositories. For example, the meta-repo might contain pointers to documentation, common utility functions, or architectural guidelines that are relevant across all three platform repos. When an AI agent needs to understand a piece of code or generate new code, it queries the meta-repo, which then intelligently retrieves and presents the necessary context from the appropriate source repository.

Key Components and Implementation
The success of a meta-repo strategy hinges on several key components:
- Unified Context Loading: The primary function is to load all relevant context automatically. This means the meta-repo must have mechanisms to identify and include shared code, documentation, and architectural rules from its constituent repositories. This could involve symlinks, configuration files, or specialized indexing tools.
- Agentic Workflow Integration: The meta-repo is designed to enhance agentic workflows. Instead of a developer manually feeding code snippets and documentation to an AI, the meta-repo ensures the AI has access to the necessary information preemptively. This allows AI agents to perform more complex tasks, such as refactoring across multiple modules or identifying architectural inconsistencies, with a higher degree of accuracy and efficiency.
- Platform-Specific Overrides and Customization: While the goal is unification, the meta-repo must also respect the nuances of individual repositories. For instance, platform-specific presentation layers will have unique UI components and platform-dependent code. The meta-repo should allow for overrides or specific context loading for these platform-specific areas, ensuring that AI suggestions are relevant to the immediate development environment.
- Simplified Developer Experience: A significant benefit is the improved developer experience. By consolidating setup and context management, developers can focus more on writing code and less on configuring their tools or ensuring the AI has the right information. The reduction from multiple setup commands to one is a tangible improvement that boosts productivity.
The Impact on AI and Development
Structuring codebases for AI context opens up new possibilities. Traditional code organization prioritizes human readability, maintainability, and modularity for developer teams. However, AI agents have different needs. They benefit from flat, comprehensive context that allows them to see the entire system or relevant subsystems at once. The meta-repo approach attempts to reconcile these two paradigms. It allows multiple, distinct codebases to be treated as a single, coherent unit by AI agents, unlocking their potential for more sophisticated code analysis, generation, and refactoring tasks.
This approach fundamentally changes how we think about code architecture in the age of AI. It suggests that for certain projects, especially those with pre-existing, non-mergeable repositories, a meta-repo strategy can act as an AI multiplier. It doesn't require a complete re-architecture of the existing systems but rather an intelligent layer on top that serves AI tools. This is particularly valuable for organizations with complex, legacy systems where merging repositories is not feasible due to technical debt, historical reasons, or team structures.
The surprising detail here is not the ease of onboarding, which was an expected benefit, but the realization that structuring code for AI is a distinct problem from structuring it for humans. The meta-repo, born out of necessity for a specific multi-repo setup, highlights a broader architectural pattern that could benefit many teams grappling with integrating AI into their development workflows without undertaking massive refactoring efforts. The question now is how widely this pattern will be adopted and what tools will emerge to further simplify its implementation across different tech stacks.
