Model

From a long chat to a working folder: how AI finds what it needs every time

Why AI needs a folder of plain text files, how it fills the context window by itself every time, and how to start with a single folder.

In this articleWhy a chat forgets

Every new chat starts the same way. You explain who you are, what the company does, how you usually write to clients, what your prices are. An hour into the conversation, AI starts mixing up what you said at the beginning. You open a new chat — and it all starts over again.

The problem is not that AI is stupid; it is how a chat works. The solution is simple: keep your permanent context not in messages but in a folder of plain text files, which AI rereads by itself every time.

Why a chat forgets

The model answers only from what is in front of it right now — the contents of the context window. The window has a limit. In a long conversation, a rule from the first message may simply fall out of view by the hundredth (more on this in the article on the context window). So anything important needs to be stored where AI can retrieve it again.

Vast memory and the frontal lobe

It helps to picture AI as a brain with two parts.

The model is a vast memory. This is covered in detail in the article ‘AI doesn't look up answers — it continues the text’: it holds a great deal of general knowledge, nothing about you, and you cannot add to it from a chat.

The working folder is the frontal lobe. A fast memory about you: who you are, what the rules are, what projects you have, what has been done and what comes next. In a person, the frontal lobe decides what matters right now and what to retrieve from memory. The folder does the same for AI: it signals which knowledge is needed for this question.

When you ask a question, this is what happens:

  1. AI reads the rules in the folder and whatever relates to the question.
  2. From these cues, it works out which of its general knowledge is needed right now: how to write an email to a client, how to calculate, how to read a contract.
  3. All of it goes into the context window together.
  4. The answer is built on your facts, not on general notions.

The better the folder is described, the more precisely AI understands what is needed. Same model — different answers.

The model holds general knowledge; the folder tells it what is needed right now.

A folder wrapped in meaning

You organise the folder itself in whatever way suits how you think: ‘Projects’, ‘Tasks’, ‘Clients’, ‘Rules’. A person understands this structure at a glance. For AI, however, these are just folders with files: it does not know what is where, what matters more and how one thing relates to another.

Short text files with descriptions give the folders their meaning. They act as tables of contents and signposts, and AI reads them before anything else.

The entry file — where everything begins. In the root of the folder sits a file with the main rules. Agents have a convention for what it is called. Codex from OpenAI reads the AGENTS.md file on its own at start-up — an open format that other tools support too. Claude Code from Anthropic likewise reads CLAUDE.md. This file says how to work and what to read next: where the projects are, where the tasks are, where the rules are.

A description in every folder. Every important folder has its own description file: what is stored here, how to use it and which folders it is connected to. For example: ‘Project maps are kept here. Before answering about a project, read its map and the rules for working with clients.’

Beacons at the top of files. At the top of every important file there are a couple of lines: what is in it and when to read it. ‘Rules for working with clients: read before any email to a client.’ AI does not open every file in turn; it goes where the beacons say the right material is.

The result is a web of descriptions: each file tells AI what lies nearby and where to go next. The folders create order for the person, and the descriptions wrap that structure in meaning for AI. That is why AI does not read the whole folder — that would overflow the context window — but follows the threads of the web straight to what it needs.

Why .md

All these descriptions, like the other files in the folder, are usually written in .md (Markdown) format. It is plain text with headings and lists. It needs no special program: it opens in any editor and reads like an ordinary note.

Here is what a project map might look like:

# Website for a café
Client: Swallow Café
Deadline: by 30 November
Done: home page mock-up
Next step: agree on the menu

A file like this is equally easy for you and for AI to read. For a language model it is the most convenient format: there is no layout, no Excel spreadsheets and no images to decipher — only meaning and structure.

What AI will gather for your question

For the question ‘what's next for the café?’, AI itself gathers exactly what is needed into the context window:

  • the rules — how to work and where to ask;
  • information about you and the company — your role, clients, how things are done;
  • the project map — stage, people, money, next step;
  • the current task — what has been done and what comes next;
  • your question.

You used to assemble the context yourself — by hand, in every chat. Now the structure of the folder assembles it the same way every time. That is the whole point: the folder turns the art of filling the context window into a repeatable routine.

The folder structure itself gathers into the context window what the question needs.

A folder that maintains itself

The next step: AI updates the files it reads by itself. After a meeting, it records the decisions and tasks. A deadline moves, and it corrects the project map. A task is completed, and it moves it to ‘Done’.

The result is a management system that AI builds for itself: the next conversation starts from an already updated picture. One important rule: AI shows its changes first and writes them only after your ‘yes’. Otherwise the folder will quickly fill up with things you do not agree with.

Whose computer AI works on

There is a practical detail that is often overlooked. An ordinary chat in a browser runs on the developer's servers and cannot see your folder. You can upload files to it, but it will not work with the folder as a living system.

Agents work with folders: Codex, Claude Cowork, Claude Code. The model itself is still in the cloud, but the agent reads and changes files on your computer if you have allowed it to. There is more you can do, but the responsibility for data and permissions now lies with you. That is why the rules — what it may do on its own and where it must ask — are written into the entry file in advance.

Where a folder won't help

A rules file is a hint, not a lock. AI follows instructions, but that is not technical protection. Dangerous actions, such as payments, deletion and sending, must be restricted through access rights.

The shorter, the better. Instructions have a limit. Codex, for example, reads no more than 32 KB of instructions by default across the whole chain of files — a few pages of text. Files beyond that limit are simply not added. Keep only what is needed all the time in the entry file; put long procedures in separate files that AI will open via a link.

An outdated file does more harm than an empty one. If the project map has not been updated for a month, AI confidently relies on yesterday's picture. That is why files are updated after every event — ideally by AI itself, with your confirmation.

Where to start

You don't need to build a large system. Start with one folder:

  1. Create a folder called ‘My company’ with two files in it: ‘Working rules.md’ (how to answer, what not to do, where to ask) and ‘About the company.md’ (what you sell, who your clients are, how things are done).
  2. Add a ‘Projects’ subfolder, and in it one project folder with a ‘Project map.md’ file.
  3. Open the folder in Codex or Claude Cowork and write: ‘Read the rules and the project map. What's next for the project?’
  4. When AI suggests updating the map after the conversation, check the edit and say ‘yes’.

Within a week, you will notice that you have stopped explaining the same things over and over. The next step is to store recurring work in the folder as well: how you go through meetings or prepare a report. This is called a skill — see the article ‘AI skills in plain words’. And how to set up such a folder for a large project is covered in the article on context engineering.

Finished reading? Mark the step — your path progress will update.

Path · Step 10 of 16I’m just starting with AI
0 of 16

How we can help

If your company faces a similar task, we can show you a first step and the boundaries of a possible solution.

Discuss your task