bobleson
One exhausted founder
- Joined
- Nov 20, 2026
Comments
What's the most useful rule in your system prompt or AGENTS.md?
There's a ton of stale docs (I used to write the entries by hand!), but the stale parts are always superseded by why we fixed it. I still find it useful even as ai improves mainly for onboarding new engineers. Agents can usually remember the "what changed" parts but not the "why it changed." A brand new engineer can find out in a few seconds now instead of doom scrolling through my chicken scratch notes for hours:-)
What's the most useful rule in your system prompt or AGENTS.md?🤖
The most useful rule in my CLAUDE.md is "Duty to Document":
When a change alters database schemas, API routes, payment logic, native mobile config, AI/MCP surfaces, or core architectural flows, append a concise summary to
FULLSTACK-LOGIC.mdin the same response as the code. Skipping this drifts the SSOT. Enforced in CI byscripts/check-fullstack-log.js. PRs that reference a Linear ticket and modify audit-worthy paths without a log entry will fail the build. Bypass with[skip-audit-log]in the PR title.Regenerate the index on every entry — not just at rollover. After adding or editing any
FULLSTACK-LOGIC.mdentry, runnpm run build:audit-indexand commit the regenerateddocs/fullstack-logic-archives/INDEX.md+INDEX.jsonin the same PR.github/workflows/audit-index.yml(npm run check:audit-index) fails the build otherwise.Agents don't remember why a change was made, so the agent records the reason in the project log in the same response as the code. My CLAUDE.md treats rules without an enforcing script as optional in practice. For this rule, CI fails the PR if a required entry is missing.
The log grew to about 10,000 lines, far more than an agent reads in one pass. Each layer below builds on the previous one to keep the log usable:
Rollover. The active log's target is ~600–700 lines. CI fails any PR that leaves it over 750 lines, and the error tells the agent exactly how to roll it into the next numbered archive. The rollover happens in the PR that adds the entry that exceeds the limit, so nobody has to remember it. There are now 54 frozen archives.
Generated index. The index groups all 1,983 entries by tag (payments, data, AI, security…) and ticket, with file:line deep links. CI fails if the index is stale.
RAG. On every push to master that touches the log, CI reads new or changed entries directly from the CI-gated index and embeds them into pgvector, one chunk per entry. That keeps the tags from ever drifting from the index. Agents query the store through an MCP tool that fuses vector and full-text search and supports filters for tag, ticket or date. "Why do refunds work this way?" returns the three entries that explain it.
Bugs from using position as a key
Historical tags. A keyword heuristic assigned tags. Tweaking one regex silently reclassified 720 historical entries in archives I treat as frozen audit evidence. Each rollover now records tags in an append-only snapshot, and a gate rejects any change to a frozen tag.
RAG entries. The store used line numbers as keys. Each new entry at the top shifted every line below it, so each sync re-embedded and pruned the whole active log: about 1,400 inserts and 1,400 deletes a week. The store now uses a hash of the entry title as the key. A rollover only updates metadata, and a typical sync embeds 0–2 chunks.
My CLAUDE.md also requires entries to be 15–25 lines. The log once rolled over twice in one day because agents averaged 63 lines per entry.
(Nov 16) What are you building this week?
I'm building the software for a coffee shop in Philadelphia that doesn't exist yet.
BrewHub PHL is a café, parcel hub and mailbox service opening in 2027 in Point Breeze. The contractor is still working through permits; the software is already in production: POS and kitchen display, a parcel counter with a scale and locker grants a Raspberry Pi verifies offline, loyalty and wallet, a voice concierge, and an MCP server so AI assistants can order coffee for their humans. It's just me and one other developer and a lot of Claude Code. The coding agents keep a diary, which I publish on Substack.
The part that makes me nervous is agent commerce: an agent spending someone's money. What ended up holding was boring code, not prompts. OAuth consent per assistant. A $50/day cap checked in the same locked transaction as the order insert, because the first version let two parallel agent calls both pass. Server-side repricing, so the agent's total is never trusted. A kill switch. Checkout is gated until we open, so right now it's a very well-tested way to not buy coffee. (VIP access for me and appletest@brewhubphl.com for app store review)
Curious how others are bounding what an agent can do on a user's behalf, and where you put the enforcement.
brewhubsystems.com · brewhub.substack.com