Making the repository the single source of truth
For an agent, project knowledge outside the repository does not exist. The repo must become the map, spec, state, and handoff.
Notes from Learn Harness Engineering - Lecture 03
The agent only sees three inputs.
System prompts and task descriptions, repository file contents, and tool execution output. Slack history, Confluence pages, Jira context, and hallway decisions are invisible unless they are written into the repo.
Near code
API constraints belong next to API code, not buried in a global archive.
Entry file
AGENTS.md should answer what this is, how to run it, and how to verify it.
Minimal complete
Keep only decision-useful knowledge, but answer every fresh-session question.
Updated with code
Docs decay unless knowledge updates are tied to implementation changes.
Run the fresh session test.
Open a new session with only repository contents. If it cannot answer these five questions, your map has blank spots and the agent must guess.
Core concepts
A repository becomes useful to agents when it lowers discovery cost and survives session boundaries.
Draw the map in the repo.
A 50-line module-local architecture file beats a 500-page external document the agent cannot see or trust.
project/
├── AGENTS.md # overview, commands, hard constraints
├── src/
│ ├── api/
│ │ └── ARCHITECTURE.md
│ └── db/
│ └── CONSTRAINTS.md
├── PROGRESS.md # done / active / blocked
└── Makefile # setup, test, lint, checkManage agent state with ACID thinking.
The database analogy gives a practical standard for cross-session reliability.
Atomicity
One logical operation becomes one commit; half-done work rolls back or stays uncommitted.
Consistency
Tests and lint define consistent state; inconsistent states do not get committed.
Isolation
Concurrent agents avoid racing through branches or separated progress files.
Durability
Knowledge that must survive sessions lives in git-tracked files.
Before
A 30-microservice e-commerce platform kept architecture decisions in Confluence, Slack, senior engineers' heads, and scattered comments. After agents arrived, 70% of tasks required human intervention.
Transformation steps
Create root AGENTS.md with overview, stack versions, and hard constraints.
Add service-local ARCHITECTURE.md files for responsibilities, interfaces, and dependencies.
Create centralized CONSTRAINTS.md with explicit MUST / MUST NOT language.
Add PROGRESS.md in each service so fresh sessions know current state.