DEV Community

hao li
hao li

Posted on Originally published at github.com

My agent made 40 decisions today and wrote down zero. So I built dlog.

Coding agents make dozens of decisions per session — which library, which schema, which approach — and never write them down. The next session rediscovers all of it: same debates, same wrong turns, same "wait, why did we do it this way?"

Memory only holds what gets saved. If nobody saves the decision, it isn't there.

dlog is the 30-second habit that fixes this. One line when you decide something:

dlog add "chose sqlite over postgres" -r "single-file, zero deps, enough for v1" -t db,infra
# logged -> ./.dlog.jsonl
Enter fullscreen mode Exit fullscreen mode

Later:

$ dlog list
10-01 00:31  dropped tailwind [css]
10-01 00:30  chose sqlite over postgres [db, infra]

$ dlog search locking
10-01 00:30  chose sqlite over postgres [db, infra]
        single-file, zero deps, enough for v1

$ dlog export-md   # markdown, ready to paste into a handover doc
Enter fullscreen mode Exit fullscreen mode

Each entry records the timestamp, title, reason, tags, working directory, and the git commit sha (or null outside a repo). --global writes to ~/.dlog.jsonl for a personal log across projects. A missing log file prints "no decisions logged yet" and exits 0 — never a traceback.

This is not a memory system. Memory systems try to remember everything automatically and hope retrieval works. dlog is the opposite bet: a 10-second capture habit at the moment a decision is made. Explicit, tiny, human-readable.

It pairs well with session-handover (my other tool): handover summarizes what happened; dlog records why it was decided. Paste dlog export-md into your handoff doc and the next session starts with the reasoning, not just the transcript.

Install — it's one stdlib-only file, no dependencies, no network, no accounts:

curl -O https://raw.githubusercontent.com/hahahahahahahahah6/decision-log/main/dlog.py
chmod +x dlog.py
# optionally: put dlog.py on your PATH as `dlog`
Enter fullscreen mode Exit fullscreen mode

MIT licensed.

Repo: https://github.com/hahahahahahahahah6/decision-log

Do you write your decisions down, or do you also trust future-you to just remember why?

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.