Structuring documents for AI agents

ChatGPT and Gemini, which I’d been talking to while preparing the project, are AI chatbots: you ask a question or give an instruction, and they respond. Go a step beyond answering questions — give it a goal and hand it development work to carry forward — and you have an AI agent.

For an AI agent to carry out development work consistently, its documents need to spell out exactly what to build, which decisions are current, and what procedures and rules to follow. Since I’d decided to use GitHub, the next step was to organize the product ideas and requirements I had refined in conversations with AI and move them into the repository. At first I tried to merge the conversations by hand and write the product spec myself, but so much of it was duplicated or outdated that it was a real hassle. Then it occurred to me: isn’t this exactly the kind of work AI does best? I converted the documents I’d been writing in Microsoft Word, without giving it much thought, into Markdown, a format AI agents can easily read and write. I had all my past conversations exported as Markdown files, downloaded them, handed ChatGPT the whole folder, and asked it to propose a structure that would let AI run the project well. It came back with the structure below: conversation summaries kept for reference, a decision log that builds up what was chosen, and a current-state document with the standards to follow now.

/
  README.md
  AGENTS.md

  archive/
    sessions/
      2026-06-09-mvp-discussion.md
      2026-06-10-cost-analysis.md
      2026-06-11-chat-distillation-plan.md

  docs/
    00-current-state.md
    01-decision-log.md
    02-open-questions.md
    03-conflicts-and-reconciliation.md
    04-project-journal.md
    05-glossary.md

    architecture/
      overview.md
      data-model.md

    adr/
      ADR-0001-project-name.md
      ADR-0002-mvp-foundation.md

    agent-prompts/
      conversation-distillation-prompt.md
      doc-update-prompt.md
      adr-generation-prompt.md

    research/
      competitors.md
      technical-options.md
      storage-cost-model.md

README.md tells both people and AI agents what the project is, what has been decided so far, and where to start reading. AGENTS.md holds the operating rules for AI agents. ADR stands for Architecture Decision Record, and it’s where major design decisions are recorded.

Now, when I hand off a task, AI agents can read the documents in the docs folder and get up to speed on the project. Because an AI agent can only read and remember so much at once (its context window), I had to make sure it read only the documents it really needed. I kept the brainstorming conversations from the start of the project as summaries in archive, and added a rule to the AI working files (AGENTS.md, .aiignore, .cursorignore, and so on) to consult them only when explicitly asked.

With the document structure settled, I no longer had to re-explain the background and context every time I discussed the project with AI. As long as I gave AI permission to read the GitHub repository and told it the conversation was about that project, I could pick up the discussion anytime from the state laid out in the repository. Keeping the repository’s documents up to date, though, was a different problem. As the project moved forward and grew, I kept finding things to improve in how the documents were managed — I plan to cover that in a separate post.

Stay in the loop

Get new posts by email, plus launch news when it's ready. No spam.