5-Minute Quick Start

Go from an empty folder to an active reusable playbook (called a Schema) in five copy-pasteable steps. Every command below runs cleanly on a brand-new repository after installing Engrams.

Before You Start: Give Your AI the Operating Rules

Engrams includes a built-in instructions command that prints the complete agent workflow. Append it to AGENTS.md, CLAUDE.md, or your editor rules file:

engrams instructions >> AGENTS.md

Runnable 5-Minute Walkthrough

1

Initialize your project database

Create the local SQLite database at engrams/context.db (zero background processes or ports):

engrams init
2

Log three related decisions across two files

In normal work, your AI logs architecture decisions as you build features. Including --contract records exact function signatures so future sessions don't need to re-read source files:

engrams decision log \
  --summary "All payment adapters implement a shared PaymentProvider trait" \
  --contract "fn charge(amount_cents: u64, idempotency_key: &str) -> Result<Receipt, PayError>" \
  --rationale "Keep checkout code independent of Stripe or PayPal SDKs" \
  --tags payment,adapter \
  --anchor src/adapters/stripe.rs

engrams decision log \
  --summary "Forward caller idempotency_key on every outbound provider request" \
  --rationale "Prevent duplicate customer charges when network retries fire" \
  --tags payment,adapter \
  --anchor src/adapters/paypal.rs

engrams decision log \
  --summary "Never log raw card or bank account tokens in adapter errors" \
  --rationale "Keep sensitive payment credentials out of application logs" \
  --tags payment,adapter,security \
  --anchor src/adapters/stripe.rs
3

Turn those 3 notes into one reusable Schema (mental model)

Once 3+ notes span at least 2 files (or 2 days), propose a reusable playbook with a plain-English claim, trigger, rule, and directory scope—then confirm it:

engrams schema propose \
  --members decision:1,decision:2,decision:3 \
  --name payment-adapters \
  --statement "Payment adapters share one idempotent trait and redact credentials from all error paths" \
  --trigger "adding or editing a payment provider under src/adapters" \
  --rule "implement PaymentProvider::charge with idempotency_key and redact raw payment tokens from logs" \
  --scope-paths src/adapters \
  --scope-tags payment,adapter

engrams schema confirm proposal:1
4

Watch engrams advise guide a brand-new file before any edit

Suppose next week your AI creates a brand-new src/adapters/adyen.rs file that doesn't even exist yet. Running advise matches scope.paths in ~1 millisecond and hands the AI the complete playbook upfront:

engrams advise src/adapters/adyen.rs
{
  "schemas": [
    {
      "id": 1,
      "name": "payment-adapters",
      "statement": "Payment adapters share one idempotent trait and redact credentials from all error paths",
      "summary": "Fires when adding or editing a payment provider under src/adapters: implement PaymentProvider::charge with idempotency_key and redact raw payment tokens from logs.",
      "scope": { "tags": ["adapter", "payment"], "paths": ["src/adapters"] },
      "matched_by": { "via": "scope_path", "value": "src/adapters" }
    }
  ],
  "constraints": [],
  "violations": []
}
5

Close the session and export to Git

At the end of a session, session close tallies how many times your schemas guided the AI and surfaces any new recurring storylines ready to become your next schema. (Pass --pr <number> once a Pull Request is linked to your decisions.)

engrams session close --reads-skipped 6 --tokens-saved 12000
engrams export

What to try next