## What should RAG retrieve from?

This defines the knowledge base — what the agents search when generating code, plans, or reviews

A

### Your Codebase

Index existing source files so the Engineer and Architect agents can find relevant code, patterns, and APIs before generating new code. Best for projects building on top of an existing repo.

B

### Past Pipeline Runs (Memory)

Semantically search past PRDs, designs, and summaries stored in the MemoryStore. Agents recall what worked before. Best for teams running many pipeline cycles and wanting institutional memory.

C

### External Docs / Knowledge Base

Index external documentation (API docs, internal wikis, architecture guides) so agents reference authoritative specs rather than hallucinating. Best for domain-specific or regulated projects.

D

### All of the Above

A unified retrieval layer that indexes codebase + past runs + external docs. Agents query a single endpoint and get ranked results from all sources. Most powerful, most complex to set up.