Remember when I wrote about Documentation as Code as Context? Theory is nice. But you want to see it work.
So I built it.
The Problem Nobody Talks About
Everyone's building RAG pipelines. Vector databases, embedding models, chunking strategies, retrieval algorithms. The infrastructure alone costs more than most side projects make in a year.
But here's what they won't tell you:
for 90% of use cases, you're over engineering it.
You don't need to vectorise your entire codebase. You don't need semantic search over documentation. You just need AI to understand what you're building.
The Stupidly Simple Solution
Create a .context/
folder. Write markdown files. Feed them to AI.
That's it.
.context/
├── project.md # What you're building
├── architecture.md # How it's structured
├── methods.md # Core patterns and approaches
└── rules.md # Constraints and conventions
No vectors. No embeddings. No retrieval. Just text files that travel with your code.
Show Me The Code
I've open-sourced a working example: github.com/andrefigueira/.context
Here's what's inside:
project.md
- Dead simple project overview:
markdown
# Project: AI-Powered Analytics Dashboard
A real-time analytics platform that uses AI to surface insights from user behavior data.
Tech stack: Next.js, PostgreSQL, OpenAI API
methods.md
- Your patterns, your way:
markdown
# Authentication Method
We use JWT tokens with refresh rotation. No sessions. No cookies for auth.
# Data Processing Method
Raw events → Kafka → Processing pipeline → PostgreSQL
Never process synchronously. Always queue.
architecture.md
- The map of your system:
markdown
# System Architecture
- /api - Next.js API routes
- /lib - Shared utilities
- /components - React components
- /workers - Background job processors
Database: Single PostgreSQL instance with read replicas
Caching: Redis for hot data only
The Workflow That Actually Works
Start a new feature? Update
.context/methods.md
with your approachChange architecture? Document it in
.context/architecture.md
Open your AI assistant? It reads these files first
No separate documentation site. No wiki that goes stale. Your context lives with your code, changes with your code, ships with your code.
But Does It Scale?
Fair question. Here's what I've learned:
It works great for:
My projects
Small teams who've tried it
Focused, single-domain applications
Rapid prototyping
You might need RAG when:
You need semantic search across thousands of documents
Multiple systems with conflicting conventions
You literally can't summarise the important parts
But be honest, are you there yet?
The Money Shot
RAG pipeline setup:
Vector database: $200-500/month
Embedding API costs: $50-200/month
Infrastructure maintenance: 10 hours/month
Initial setup: 40-80 hours
Total: $250-700/month + setup time
Context files:
Cost: $0
Setup: 1 hour
Maintenance: Part of normal development
Total: Free
Copy This Right Now
Clone the repo:
git clone https://github.com/andrefigueira/.context
Copy the
.context/
folder to your projectFill in the templates with your project details
Open Claude/GPT/Whatever and paste:
Here's my project context:
[paste your .context files]
Now help me build [whatever you're building]
The Uncomfortable Truth
Most developers won't do this. They'll keep complaining about AI not understanding their codebase while refusing to write three markdown files.
They'll spend weeks building embedding pipelines instead of spending an hour writing clear context.
Don't be most developers.
What's Next
This is version one. The repo is public. Fork it. Make it better.
Share what works. Share what doesn't.
Because the best solution isn't the most sophisticated one, it's the one you'll actually use.