To improve the performance of AI coding agents in small projects, developers can implement a lightweight Spec-Driven Development (SDD) approach. Instead of relying on full RAG systems or extensive documentation, this method uses four specific Markdown files to provide the agent with project intent and constraints.

The recommended structure includes 'index.md' for navigation, 'domain.md' for business rules and invariants, 'contracts.md' for external behavior, and a feature-specific file for current tasks. These files help the agent understand project logic that is not explicitly visible in the source code, such as business requirements or specific aggregation rules.

The author suggests that developers should avoid feeding the entire repository into the agent's context window. Instead, they should provide a clear route: reading the documentation files first, mapping criteria to tests, and only then accessing relevant source code. This process helps prevent regressions when agents modify modules.

For larger projects or those with long-term memory requirements, the author mentions OpenViking as a more robust solution involving indexing and virtual file systems. However, for smaller repositories, the four-file approach is presented as a sufficient and efficient way to manage project semantics without unnecessary complexity.