Created: October 6, 2025
Status: Ready for Implementation
Timeline: 7-9 days to working MVP
Complete specifications for building an autonomous RAG system powered by Claude Agent SDK with multi-project support, local embeddings, and MCP integration.
-
00_START_HERE.md← Read this first- Overview and quick navigation
- Success criteria
- High-level architecture
-
01_TECH_STACK.md- All technologies and versions
- Dependencies with rationale
- Installation checklist
-
02_ARCHITECTURE.md- System design and components
- Data flow diagrams
- Docker architecture
-
03_DATABASE_SCHEMA.md- Complete schema with migrations
- Key queries
- Performance tuning
-
04_AGENT_TOOLS.md- Claude Agent SDK tool specifications
- Implementation examples
- Conversation patterns
-
05_API_SPEC.md- All REST endpoints
- Request/response formats
- Error handling
-
09_BUILD_PLAN.md← Your roadmap- Day-by-day tasks
- Acceptance criteria
- Risk mitigation
-
10_ENV_SETUP.md- Complete setup guide
- Docker configuration
- Troubleshooting
-
11_GIT_WORKFLOW.md- Branch strategy (main/develop/feature)
- Commit conventions
- PR process
-
12_CICD_PLAN.md
- GitHub Actions workflows
- Linting and testing
- Docker builds
13_REPO_SETUP.md
- GitHub repository creation
- Branch protection
- Secrets configuration
14_GITHUB_ISSUES.md
- Issue templates (epics and stories)
- All issues for Phases 1-9
- Quick creation scripts
15_AGENT_PROMPTS.md⭐ IMPORTANT
- Copy-paste prompts for agents
- Project kickoff prompt
- Per-phase prompts
- Between-phase prompts
AGENTS.mdanddocs/Agent-Collaboration-Workflow.md
- Contributor guidelines and agent collaboration workflow
- Review process
- MCP server usage
PHASE_SUMMARY_TEMPLATE.md
- Template for phase summaries
.coderabbit.yml
- CodeRabbit configuration
FINAL_CHECKLIST.md
- Pre-build checklist
SUMMARY_FOR_USER.md
- Complete package summary
An autonomous agent that:
✅ Manages documentation across multiple projects
✅ Autonomously fetches docs from the web
✅ Processes everything (PDF, DOCX, Markdown)
✅ Searches semantically with vector similarity
✅ Chats naturally with citations
✅ Accessible via MCP for IDE agents
Multi-Project Collections
- Separate collections per project (Flutter, Supabase, etc.)
- Easy switching in UI
- Isolated search contexts
Autonomous Agent (Claude SDK)
- Natural conversation
- Multi-step workflows
- Web crawling
- Proactive suggestions
Local-First Architecture
- Ollama for free embeddings (your GPU)
- Toggle to Claude for chat
- Everything runs on your PC
- Docker-ready for deployment
MCP Integration
- stdio mode for IDE agents (Cursor, Windsurf)
- SSE mode for Claude Desktop (Windows)
- Same backend, different entry points
- Backend: Fastify + TypeScript
- Frontend: React + Vite + Tailwind
- Database: Postgres 16 + pgvector
- Embeddings: Ollama (nomic-embed-text)
- Agent: Claude 3.5 Sonnet with Agent SDK
- Deployment: Docker Compose
- Day 0: Setup (2-3 hours)
- Days 1-2: Database + ingestion pipeline
- Days 3-4: Search + autonomous agent
- Day 5: Basic UI
- Day 6: MCP server (both modes)
- Day 7: Docker integration
- Days 8-9: Polish + testing
- Development: ~$50-100 (Claude API)
- Monthly usage: ~$200-300 (Claude) + $0 (Ollama)
- Infrastructure: $0 (local/Docker)
Start with 00_START_HERE.md and read in order through 10_ENV_SETUP.md.
Follow 10_ENV_SETUP.md to install:
- Node 22.x + pnpm
- Docker + WSL2 (if Windows)
- Ollama + models
- Postgres with pgvector
Work through 09_BUILD_PLAN.md day by day:
- Each day has clear goals
- Test as you build
- Don't skip ahead
# Setup
cp .env.example .env
docker compose up -d
pnpm install
pnpm --filter @synthesis/db migrate
# Develop
pnpm --filter @synthesis/server dev
pnpm --filter @synthesis/web devYour MVP is done when:
✅ Upload 20+ documents (PDF, DOCX, MD) across 3 collections
✅ Agent autonomously fetches docs from URLs
✅ Search returns relevant results with citations
✅ Chat with agent works smoothly
✅ IDE agents can access via MCP
✅ Claude Desktop can access via MCP
✅ Toggle between Claude and Ollama works
✅ Everything runs with docker compose up
Not included in MVP (add later if needed):
- Multi-user authentication
- Billing/licensing
- Advanced UI (your mockups are Phase 2)
- Reranking
- Full-text search hybrid
- Scheduled doc updates
- Export conversations
- SaaS deployment
Why? Focus on working first, beautiful second.
True autonomy. The agent makes decisions, executes multi-step workflows, and manages your knowledge base proactively. Worth the $200-300/month.
Free + private. Your 16GB GPU handles embeddings locally. No API costs, no data leaving your PC. Quality is good enough for personal use.
You said you have 2-3 projects. Collections isolate contexts so searches don't mix Flutter and Supabase docs inappropriately.
- stdio: For IDE agents in WSL (Cursor, Windsurf, etc.)
- SSE: For Claude Desktop on Windows
- Same backend, just different communication protocols
You asked for it. Also makes deployment consistent and easy to share with team later if needed.
Yes! The plan is prioritized. Core is Days 1-5. MCP and Docker can be deferred if time-constrained.
Over-engineering
- Stick to the plan
- Don't add "nice to have" features yet
- Optimize AFTER it works
Integration debt
- Test after each feature
- Don't accumulate bugs
- Fix issues immediately
Scope creep
- MVP means minimum
- Beautiful UI comes later
- Focus on function over form
- Build vertically - Complete features end-to-end
- Test constantly - Don't wait for "integration day"
- Use the agent - Let Claude help you build (use your RAG once it works!)
- Keep notes - Track blockers and solutions
- Take breaks - This is a sprint, not a marathon
Once you have a working system:
Phase 2 (Weeks 2-3):
- Implement your beautiful UI mockups
- Add collection management features
- Better chunking strategies
- Reranking
Phase 3 (Months 2-3):
- Multi-user support
- Team features
- Advanced search
- Export/import
SaaS Transition (Future):
- Authentication
- Billing
- Hosted deployment
- Marketing site
- Re-read the relevant doc
- Check troubleshooting in
10_ENV_SETUP.md - Test each component independently
- Check Docker logs:
docker compose logs -f
- Don't guess - test systematically
- Isolate the problem
- Check your assumptions
- Sometimes you just need a break
Before Day 1:
- Read all docs (00-10)
- Understand the architecture
- Have API keys ready
- Development environment set up
- Docker running
- Ollama installed with models
- Clear 7-9 days in your schedule
- Ready to build!
This plan is:
- ✅ Complete but not over-engineered
- ✅ Realistic for 7-9 days
- ✅ Focused on YOUR needs (not SaaS)
- ✅ Built for autonomy (agent-first)
- ✅ Local-first with cloud options
- ✅ Extensible for future growth
You have everything you need to build a working autonomous RAG system.
Now go build it! 🚀
NEW-RAG-PLAN/
├── 00_START_HERE.md ← Read first
├── 01_TECH_STACK.md ← Technologies
├── 02_ARCHITECTURE.md ← System design
├── 03_DATABASE_SCHEMA.md ← DB structure
├── 04_AGENT_TOOLS.md ← Agent capabilities
├── 05_API_SPEC.md ← REST endpoints
├── 09_BUILD_PLAN.md ← Day-by-day roadmap
├── 10_ENV_SETUP.md ← Setup guide
└── README.md ← This file
All files included! Complete planning package with 21 documents total.
Ready to start Day 0? Go to 10_ENV_SETUP.md and begin!