Agent Orchestration
Paperclip Integration
SourcePrep is the knowledge backbone for Paperclip's autonomous agent teams — providing structural codebase intelligence that agents use to understand, plan, and execute.
Why Paperclip + SourcePrep
Paperclip orchestrates autonomous agent teams — hiring AI agents to work on goals, issues, and routines. But agents working without codebase knowledge make shallow changes and miss architectural context. SourcePrep gives every Paperclip agent deep structural awareness of the codebase they're working in.
Structural Context
Agents see imports, call chains, and hub files — not just flat file contents
Role-Scoped
Security agents see auth code. UI agents see components. Automatically.
Always Current
File watcher keeps the index fresh. Stale observations are flagged.
Hybrid MCP + REST Architecture
SourcePrep connects to Paperclip through two complementary layers, giving agents both on-demand intelligence and proactive discovery.
Pull: MCP Server
Agents call SourcePrep tools on demand during their work.
- prep — structural overview
- prep_search — semantic search
- prep_impact — blast radius
- prep_audit — enriched findings
- prep_observe — persistent memory
- prep_concepts — design rationale
Push: REST API
SourcePrep proactively pushes discoveries to Paperclip.
- Audit findings become Paperclip issues
- Coupling hotspots become refactoring goals
- Import cycles become architectural tasks
- Resolved items auto-close in Paperclip
SourcePrep Addresses
Every finding pushed to Paperclip carries a SourcePrep address — a stable URI that agents can use to verify freshness and fetch updated context at work-time.
This means agents never act on stale intelligence. If the codebase changed since the finding was created, the agent knows before it starts work.
Auto-Push Findings
SourcePrep's background intelligence engine (Pi Agent) continuously discovers structural issues and pushes them to Paperclip as actionable items — grouped by module or category.
Every Agent Gets Smarter
When a Paperclip agent starts work on a goal, it calls prep to instantly understand the codebase's structure, hub files, and module boundaries. No ramp-up time, no context window waste.
