Quick Start: Zero-Read Strategy in 5 Minutes
From an empty repository to a self-sufficient architecture graph in five commands. By the end, your AI assistant can plan features, verify contracts, and check Git drift without opening source files. Make sure you have completed the installation first.
Agent Setup
Engrams provides a built-in instructions command designed to output the standardized instruction manual that teaches LLM agents the Strategy-First retrieval protocol:
engrams instructions
Run this in your project root and paste the output directly into your AGENTS.md file, .cursorrules, or system prompt configuration.
5-Minute Walkthrough
Initialize the local database
Create the embedded SQLite database in your workspace:
engrams init Log an architecture decision with an explicit contract
When introducing an interface, behavior, or adapter, embed its contract so future sessions don't need to read implementation files:
engrams decision log \
--summary "Provider behavior for payment adapters" \
--contract "fn process(amount: u64, currency: &str) -> Result<Receipt, PaymentError>" \
--rationale "Pluggable payment processors across Stripe and PayPal" \
--tags payment,adapter,api \
--anchor src/adapters/stripe.rs Rebuild the code graph
Let Engrams scan your repository, extracting exported symbols, docstrings, and line counts onto code nodes:
engrams graph rebuild Retrieve full architectural context in one call
Before writing code, your agent runs brief to get the decision, contract, symbols, and Git staleness drift:
engrams brief "payment provider" {
"brief": {
"summary": "Provider behavior for payment adapters",
"contract": "fn process(amount: u64, currency: &str) -> Result<Receipt, PaymentError>",
"drift": { "stale": false, "checked": 1 }
},
"neighbors": [
{
"node": "code:42",
"path": "src/adapters/stripe.rs",
"symbols": ["StripeAdapter", "process", "refund"],
"line_count": 148
}
]
} Close the session with PR verification
Enforce that PRs are anchored to decisions and record token ROI:
engrams session close --reads-skipped 12 --tokens-saved 60000 --pr 42