レッスンのプレビュー

Repository Map for AI Coding Agents: Project Structure and State Without Memory

How to give an AI coding agent a repository map when it has no memory between sessions: what to measure, four principles of a good map, project file structure and ACID-style guarantees for agent state.

the repository as the single source of truth the repository map ACID for agent state
このレッスンで学ぶこと
  • You will be able to audit your repository for blind spots that leave the agent guessing.
  • You will organise your file structure so the agent reads rather than guesses.
  • You will apply ACID principles to how the agent records its progress and decisions.

レッスンの冒頭

📖 The agent reinvents the architecture from scratch — and here's why

  • Architectural decisions live in Confluence, Slack, Jira and in the heads of two senior engineers
  • For humans this works — you can just ask
  • An agent can't ask
  • Every new session is a fresh guess at the project structure

Some of your team's architectural decisions live in Confluence — and half of those are already out of date. Some live in Slack, where nothing can ever be found again. Some sit in Jira, stripped of their context. And the rest live in the heads of two senior engineers. For humans this somehow works: you can wander over and ask. An agent can't ask. It has no memory between sessions and no access to anyone's head. So every time it opens the project afresh, it honestly invents the structure from scratch — and loses track of what lives where, even though, on paper, all the information exists somewhere.

Three sources in total — beyond them, the agent knows nothing

  • The system prompt and the task description
  • The contents of the repository files
  • Tool output
  • There are no other inputs

An agent has exactly three sources of information: the system prompt along with the task description, the contents of the repository files, and the output of whatever tools it calls. This isn't an exaggeration or a metaphor — it's a literal description of its sensory apparatus. Any knowledge that isn't in one of those three places simply doesn't exist for the agent. It can't ring a colleague, flick through a wiki in a browser, or remember yesterday's chat — none of that is available to it.

The OpenAI principle: the repository is the specification

  • The repository is the authoritative source on decisions
  • On constraints and the current state
  • On verification standards
  • Neither Slack nor Confluence gets a say

OpenAI put this bluntly: the repository is the specification. Not a supplement to the specification, not an illustration of it — the authoritative source itself, for decisions, constraints, the current state of the project and verification standards. In this model, Slack and Confluence simply get no say: if a decision lives only there, it doesn't exist for the agent. That changes where you put important things — not wherever happens to be convenient to write, but wherever the agent will actually read.

完全版のレッスンはサブスクリプションで

20 枚のスライドが完全版にはさらにあります。

ログインして購読すると、動画、全スライド、ノート、テスト、AIチューター、面接が利用できます。

ログインまたは新規登録 サブスクリプションに登録

レッスンの内容

  1. 📖 The agent reinvents the architecture from scratch — and here's why
  2. Three sources in total — beyond them, the agent knows nothing
  3. The OpenAI principle: the repository is the specification
  4. 🤔 Myth: if it's in the repository, the agent will see it
  5. What to measure: knowledge visibility gap
  6. What to measure: knowledge decay rate
  7. ❓ Stop-check: how many questions can the agent answer?
  8. Principle 1: knowledge lives next to the code
  9. Principle 2: one standard entry point
  10. Principle 3: minimal, but complete
  11. Principle 4: updated alongside the code
  12. 💡 Debrief: four principles close the gap
  13. A working repository structure for your agent
  14. Top level: entry point, progress, decisions
  15. The service layer: .agent/ and scripts/
  16. Pitfalls: documentation that lies
  17. ACID for agent state
  18. Consistency: a green check after every step
  19. Consistency: a green check after every step
  20. Isolation: two transfers from one account don't clash
  21. Durability: context doesn't count
  22. Homework: close your knowledge gap
  23. The repository as a contract, not an archive

この講義に関する記事

このコースのすべてのレッスン

  1. What Is Harness Engineering? Why AI Coding Agents Fail Because of the Environment
  2. Error Accumulation in AI Agents: Why 95% Per-Step Accuracy Fails by Step 10
  3. AI Agent Reliability Metrics: MTBF, MTTR, Blast Radius and Little's Law
  4. Why AI Agents Fail in Production: Five Failure Layers and a Diagnostic Loop
  5. What an AI Agent Harness Is Made Of: Instructions, Tools, Environment, State, Feedback Loops
  6. Repository Map for AI Coding Agents: Project Structure and State Without Memory
  7. AGENTS.md Best Practices: Why a Giant Instructions File Fails and How to Build a Router
  8. AI Agent Memory Between Sessions: Session Handoff, PROGRESS.md and Bootstrap Contract
  9. feature_list.json for AI Agents: WIP=1, Feature Status and verify.sh Verification
  10. Agent Says 'Done' but the Feature Is Broken: Verification Gap and Definition of Done
  11. All Tests Pass, Feature Is Broken: E2E Tests and Architecture Rules for AI Agents
  12. AI Agent Observability: Sprint Contracts, Evaluator Rubrics and Clean Session Exit
  13. Autonomous AI Coding Agent for Hours: Loop Engineering and Stop Conditions
  14. Graph Engineering for AI Agents: When a Single Loop Is Not Enough and You Need a Task Graph
  15. Building an AI Agent Harness From Scratch: AGENTS.md, feature_list.json, verify.sh and an Autonomous Loop