Cold-Start Onboarding: Ad-Hoc Discovery vs Turn-1 bootstrap_project
| Onboarding Strategy | Initial Turn Count | Token Consumption | Rule Adherence Fidelity | Symbol Discovery |
|---|---|---|---|---|
| Ad-Hoc Manual Prompting | 4 to 8 turns of exploratory questions | 40,000+ tokens burned reading files | Low (agent forgets early rules as context grows) | Hit-or-miss keyword searching |
| Static Memory File (MEMORY.md) | 1 turn reading raw markdown file | 5,000 to 15,000 tokens | Medium (static text without AST linking) | Zero (stores raw prose only, no code symbols) |
| Memoreal bootstrap_project Handshake | 1 deterministic turn on session start | <1,500 tokens structured context payload | 100% (rules anchored as high-salience memories) | 150+ core symbols and relationships seeded |
The Cold-Start Dilemma in Fresh Coding Sessions
Every time a developer opens a new Claude Code, Cursor, or Codex CLI session in a recently cloned repository, the agent starts with complete amnesia. It possesses no awareness of team conventions, architectural boundaries, or core module entrypoints.
To compensate, developers typically spend the first several turns manually explaining the project structure, reminding the model not to use prohibited libraries, and directing it to specific configuration files. If the developer forgets to mention a critical invariant, the agent quickly introduces code that violates team standards.
- Fresh sessions lack context, leading to repetitive manual developer orientation.
- Agents invent patterns that violate unmentioned team engineering standards.
- Manual orientation prompts waste valuable context window space and developer time.
The Deterministic Turn-1 Handshake Protocol
Memoreal solves the cold-start problem through an automated Turn-1 handshake protocol. At session start, the agent invokes build_context to retrieve established facts and recent context for the workspace namespace. If the response indicates memories_used === 0, the server returns a bootstrap_hint.
Upon receiving the hint, the agent reads the repository's rule files (such as CLAUDE.md, AGENTS.md, or .cursorrules) along with key entrypoint source files, and dispatches them to bootstrap_project in a single MCP tool call.
Instant Ingestion of Rules and 150+ Core Symbols
Within under 2.5 seconds, bootstrap_project parses the rule headings into durable semantic memories with high salience (0.9), ensuring they remain pinned in subsequent memory retrievals. Concurrently, the engine parses up to 150 top-level functions, classes, and interfaces into the AST graph.
By Turn 2, the agent operates with full institutional memory and architectural grounding. It knows the exact database version, architectural rules, and entrypoint signatures, ready to deliver production-grade code immediately.
Bootstrapping a Repository Namespace on Turn 1
json{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "bootstrap_project",
"arguments": {
"namespace": "ecommerce-api",
"files": [
{"path": "CLAUDE.md", "content": "# Team Rules\n- Never git rebase\n- PostgreSQL 16 only"},
{"path": "src/index.ts", "content": "export function startServer() {}"}
]
}
}
}
Frequently Asked Questions
When should an agent call bootstrap_project?
An agent should call bootstrap_project on Turn 1 when build_context returns memories_used === 0 or includes a bootstrap_hint.
What files should be included in the bootstrap payload?
Include project guideline files like CLAUDE.md, AGENTS.md, README.md, and primary entrypoint source files representing core interfaces.
Does bootstrap_project overwrite existing memories in the namespace?
No. It seeds initial rules and symbols cleanly, merging with existing records and deduplicating identical facts.
Install Persistent Memory for Your Coding Agent
Sub-15ms deterministic recall, AST symbol navigation, and 70%+ token savings across Claude Code, Cursor, Codex CLI, and Windsurf.
npx -y @kolivri/memoreal-mcp setup