Docs before code.
When I built CrewSync, a multi-tenant maritime crew management SaaS, the first artifact was not a scaffold. It was an Obsidian vault: a folder of linked notes covering architecture, tech stack, and one note per module.
crewsync-vault/
architecture.md
tech-stack.md
modules/
auth-and-authorization.md
company-and-multi-tenancy.md
crew-management.md
certificate-tracking.md
crew-rotations.md
safe-manning-compliance.md
sign-on-sign-off.md
sea-service-records.md
That vault became the agent context. The MVP foundation landed the next day: 196 files, roughly 24,000 lines, built against a written contract instead of improvised scope.
Why this works with agents specifically
Agents fill ambiguity with plausible inventions. A written module map turns "build crew management" from an open-ended prompt into a bounded task with named entities and relationships. The agent is not being careless when it invents. It is answering the question you actually asked.
The spec survives the session. Context windows end. The vault does not. Session N+1 starts from the same source of truth as session 1.
Scope creep becomes visible as a diff. If the agent builds something not in the vault, that is a flag. Either the vault was wrong, so update it, or the agent drifted, so revert it. Both are fixable. A vague feeling that things are getting away from you is not.
The discipline
One note per module, written in plain language, before any code.
The notes state what is out of scope as explicitly as what is in. Omission is not a boundary, agents do not read silence as a limit.
The vault is living, not archival. When implementation teaches you something, the note gets updated in the same session, not later.
This is the same reason CI footguns live in CLAUDE.md: durable context beats repeated explanation.