DGC v0.41.1 is out
Navigate
Install DGC
DGC v0.41.1Edit on GitHub ↗
Using DGC/Memory

DGC.md, #fact, and /memory — guidance that loads every session

Memory

#

Memory is a Markdown file the native agent reads at the start of a session: project conventions, commands that actually work here, facts you asked it to keep. It is not the context-notes trace (those are written from tool results — see Context notes), and delegated subscription turns do not receive this DGC injection.

Where it lives

#
  • ProjectDGC.md at the project root. Loaded into every native session in that repo.
  • Personal~/.dgc/DGC.md. Loaded in every project, after the project file.

Both are bounded (about 32k characters of prompt view, 1 MiB on disk) and redacted the same way saved sessions are. Missing files are simply empty.

Writing it

#
  • #a fact in the composer — appends that line to project DGC.md atomically.
  • /memory add TEXT — the same, for project memory.
  • /memory add user TEXT — appends to personal ~/.dgc/DGC.md.
  • /memory — show what is loaded.
  • The model's save_memory tool does the same write, with scope project (default) or user.
  • /init inspects the repo and prepares or updates DGC.md using ordinary edit permissions. In plan mode it proposes the guide first. See Plan mode.

A # line is memory, not a comment: it is written to the file, then the prompt is not sent as a normal question.

What belongs in it

#

Stack, layout, build/test/lint commands, house style, durable facts. Not credentials, personal details, private absolute paths, or a dump of the last session — use Handoff for a continuation document, and /export for a transcript.

Documentation