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.
refines, extends, depends_on prime, relevant and graph bring it back at the right moment …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 context, unprompted
This is the step that makes engrams an advisor rather than an archive.
engrams prime loads the decisions, patterns, and active work relevant to the
session before anything else runs. engrams relevant <paths> pulls the
reasoning anchored to the exact files about to be edited. engrams graph and
engrams decision search answer the exploratory questions. Nothing here waits
for you to remember that the context exists.
4 · Act — decide with the full picture, then feed the loop
You and the agent act on advice instead of guesses: a settled debate stays settled, a
registered pattern passes engrams check --staged before it can be violated,
a contradiction gets caught while it is still a diff. And whatever you decide next is a
new decision — stored, linked, and ready to advise the next session. The output of the
loop is a smarter loop.
Run the loop
The loop has two operators. You run the surfacing and enforcement side — see For You. Your agent runs the storage and linking side — see For Your Agent. For why density makes each turn smarter, read How Memory Matures.