Everyone talks about the "second brain" pattern for AI dev. Here's my actual one-file implementation.
▲ 3 r/ContextEngineering+1 crossposts

Everyone talks about the "second brain" pattern for AI dev. Here's my actual one-file implementation.

There's been a lot of discussion here about giving LLMs persistent context across sessions. Most solutions I see are over-engineered: vector databases, embeddings, memory plugins.

Here's what actually works for me as a solo developer. Two files:

CHANGELOG.md An append-only architectural decision ledger. Single-line entries, newest at top. When you load this at session start, the model immediately knows your project's history, every decision, and why things are the way they are, without a single word of re-explanation.

.dory/agents.md Operational directives. Intent-first. Zero padding. Decompose before implementing. Verify state before acting. These aren't prompt hacks, they're constraints that make the model faster and more precise on engineering work.

The key insight: sessions should be atomic. Start fresh, work fast, persist state locally, close the tab. Context doesn't live in the chat thread, it lives in your repo, in version control, where it belongs.

Works with Claude, ChatGPT, or any local model. With Claude Code, agents.md injects into the system prompt automatically.

I'll paste the full agents.md in the comments for anyone who wants to see the actual directives.

github.com/tjqscott/dory

# Apathy Esports Changelog
- Architecture — single `run.py` with five sequential phases: Scan → Sync → Execute → Settle → Email.
- Scheduling — hourly cron job on Raspberry Pi via `crontab`.
- Persistence — `state.json` as sole persistence layer; rolling 7-day window, pruned each run. No database; Polymarket tracks full bet history independently.
- Volume module — `volume_model.py` as a separate module for volume projection (later inlined).
- Market scanning — polls `gamma-api.polymarket.com/markets` for 4 game tags: LoL (65), Dota 2 (102366), CS2 (100780), Valorant (101672).
- Scan params — 48h end-date window, `volume_num_min=1000` floor to avoid pagination cap issues, `limit=1000` per tag.
u/tjqscott — 6 days ago