From Request to Deliverable: The Marg Manual
Keep context across sessions
What you'll get
Continuity. A Marg that remembers last month's pricing decision gives sharper answers than one that meets you fresh every morning, and that memory is yours to maintain with two commands and a light habit.
The model is three layers, and it helps to hold them in mind. Your profile keeps the facts about your business (chapter 5). A memory file keeps the compounded lessons: decisions you made, approaches that worked, context worth carrying forward. Under both, raw observations pile up on their own as you work. The two commands below move material up from one layer to the next so the useful parts survive and the noise does not.
The steps
1. Flush before long runs.
/marg:compactEvery session has a finite context, and when it fills, the oldest material gets summarized away whether it mattered or not. Compact gets ahead of that by writing the current state to the memory file now: the active work, the key findings, any pending approvals. Run it before you kick off a long multi-team sequence, or any time a session has been going for hours, so summarization never takes something you needed.
2. Run the heartbeat at natural pauses.
/marg:heartbeatWhere compact protects one session, the heartbeat is upkeep across many. It promotes stable patterns from raw observations into the memory file, flags what has gone stale, and surfaces problems worth turning into permanent knowledge (chapter 23). On a new workspace it also creates the memory file itself, which is why the first heartbeat is the one that matters most.
3. Trust the rhythm, not the ceremony. Compact when a session runs long, heartbeat when a body of work wraps, roughly weekly. Marg runs fine without either, so treat them as the maintenance that compounds answer quality over weeks rather than as required steps.
What comes back
Compact confirms what it saved. Heartbeat reports what it promoted, what it pruned, and anything it thinks is worth compounding. The real effect is indirect and cumulative: over time, the teams stop asking you questions you already answered, because the answers are now in memory where they read them.
Variations
- Fresh workspace, no memory file yet: expected. Work a few sessions, solve one real problem, then run your first heartbeat to bootstrap the file. If you stack up several tasks without ever running one, Marg nudges you once at session start.
- Parallel experiments: each working folder keeps its own profile and memory, so an experimental copy of your project starts clean rather than inheriting the original. Knowledge meant to cross folders belongs in compounded solutions (chapter 23).
If something goes wrong
- Answers ignore something you said weeks ago: the observation never got promoted. Run
/marg:heartbeat, and if it is a hard business fact, state it through/marg:btwso it lands in the profile directly. - A session truncated before you compacted: chapter 7's resume command recovers the in-flight work, and the takeaway is to compact earlier next time.
- Memory has grown stale or self-contradictory: say so. The heartbeat audits for staleness, and you can always tell Marg which entries to retire.