The Advisor Loop

Maturity is not something you wait for — it is produced by a four-step cycle run on every task. Store what was decided, link it to what it relates to, let engrams surface it at the right moment, and act on better information. The outcome of step four is the input to step one. The loop compounds.

1Storethe agent logs decisions, patterns, progress as work happens
→
2Linkconnect them with refines, extends, depends_on
→
3Surfaceprime and advise deliver active playbooks & rules before edits
→
4Close & Compoundsession close tallies saved reads & proposes new playbooks

…and step 4 feeds straight back into step 1.

1 · Store — capture reasoning at the moment it exists

The agent logs while the context is hot, not at session end:engrams decision log --summary "…" --rationale "…" for choices,engrams pattern log for conventions worth enforcing,engrams progress log for the work itself. Rationale is the payload — a decision without its why is just a fact; with it, it is advice waiting to happen.

2 · Link — turn records into reasoning

engrams link add --rel … connects what was just stored to what it builds on. The nine relationship types — depends_on, extends,implements, part_of, refines, relates_to,supersedes, supports, uses — are a validated ontology, not free text: disjoint pairs, domain/range constraints, and cardinality are rejected at link time unless you pass --force. Links are where the graph stops being a pile of notes and starts being an argument.

3 · Surface — the right playbook before a line is written

This is the step that makes Engrams an advisor rather than an archive.engrams prime loads active playbooks (Schemas), recent decisions, and current focus at session start.engrams advise <paths> fires right before your AI edits or creates a file—returning matching playbooks, contracts, and pattern checks in ~1ms.engrams brief and engrams query handle deep feature questions without exploratory file reads.

4 · Close & Compound — approve new playbooks at session end

At the end of a task, engrams session close records how many file reads your playbooks saved and checks whether 3+ uncovered decisions now form a recurring thread. When they do, your agent drafts a plain-English playbook proposal and asks you to confirm it—making the very next session faster than the last.

Compounding, measuredIn its first 26 days (v0.9.0 milestone), this repository grew from 1 link to 802 derived and manual edges. By v0.17.0, that same daily loop reached 318 nodes, 808 edges, and 3 active playbooks guiding 130+ sessions.

Run the loop

The loop has two operators. You run the surfacing and enforcement side — seeFor You. Your agent runs the storage and linking side — see For Your Agent. For why density makes each turn smarter, read How Memory Matures.