Skip to content
FeaturesPricingBlogDownload

← All posts

A folder structure AI agents can navigate

A folder structure for AI agents is shallow, named for its contents and indexed: clear file names, an index.md per area and instruction files where agents look.

Diagram card on a light background showing a notes folder with a README that maps each subfolder for an AI agent

A folder structure AI agents can navigate is one where the names alone tell an agent where to look: shallow folders named for what they contain, descriptive file names, an index.md at the top of each area, and instruction files placed where the agent's tool expects them. Agents find things the way a new colleague with a terminal would, by listing folders, matching names, searching text and opening the files that look right. Every step depends on names and structure, so the layout does more for an agent's accuracy than any prompt.

This post covers how agents move through a folder, a layout to start from, naming rules, what to put in index files and where instruction files go.

How do AI agents move through a folder?

They do not read everything. An agent working on a task usually lists a directory, picks likely candidates by name, searches for a term, and reads a handful of files. Anthropic describes Claude Code's approach in how Claude Code works in large codebases (May 2026): it "traverses the file system, reads files, uses grep to find exactly what it needs."

Some tools cannot even search text. The MCP filesystem server, which connects chat apps to local folders, has a search_files tool that its README says matches "by name ... not by content." An assistant using it has only folder names, file names and whatever it chooses to open.

So the questions an agent asks of your folder are simple ones. Which folder is this about? Which file in it? Is there a file that tells me where things are? A structure that answers them quickly wastes fewer reads and produces fewer wrong guesses.

What folder structure works for AI agents?

Group by topic or area, keep it to two or three levels, and separate finished material from work in progress.

workspace/
  AGENTS.md                instructions for every agent
  index.md                 map of the whole folder
  reference/
    index.md
    glossary.md
    pricing.md
    style-guide.md
  projects/
    launch-2027/
      index.md
      plan.md
      decisions.md
      meetings/
        2026-11-12-kickoff.md
  inbox/                   unsorted notes; agents may file these
  archive/                 finished work; read, do not edit
  assets/                  images and PDFs referenced by notes

The choices behind it:

  • Few top-level folders. An agent's first ls should show about five to ten names it can tell apart.
  • reference/ apart from projects/. Settled facts and work in progress need different treatment. An agent asked for "our current price" should not land on a brainstorm.
  • An inbox/. Unsorted notes go somewhere explicit, so they do not leak into folders that are meant to be trusted.
  • An archive/. Old material stays searchable without being mistaken for current material, and an instruction can say "do not edit archive/."
  • assets/ for binaries. Images, PDFs and exports kept in one place stay out of text searches and listings.

How should files be named?

So that a name-only search finds them and a reader knows what is inside without opening them.

Weak name Better name Why
notes.md launch-pricing-options.md Says the topic
meeting (2).md 2026-11-12-kickoff.md Dated, unique, sorts in order
final_v3_REAL.md pricing.md Versions belong in Git, not names
Q4.md 2026-q4-goals.md No missing year or subject
Untitled.md (rename or delete) Unfindable by anyone

Lowercase, hyphenated names avoid quoting problems in shell commands, which agents run constantly. Dates go first, as YYYY-MM-DD, so files sort by time. One topic per file matters for the same reason: an agent that opens pricing.md should find pricing, not pricing plus hiring plus a recipe.

What goes in an index file?

A list of what is in the folder and what each file answers, in a few lines each. It is the cheapest file an agent can read, and it can save it from opening twenty others.

# Reference

Settled facts. If something here is wrong, fix it here first.

- [glossary.md](glossary.md): internal names and what they mean
- [pricing.md](pricing.md): current plans and prices, updated 2026-11-20
- [style-guide.md](style-guide.md): writing rules for public text

Not here: drafts (see ../inbox/), project plans (see ../projects/).

The last line is often the most useful one. Saying where things are not stops a search from going in circles. The same idea at web scale is llms.txt, a proposed index file for websites. Keep the index updated in the same edit that adds, renames or removes a file, or it starts pointing at things that no longer exist.

Where do instruction files go?

Where each agent looks for them, and as close as possible to the files they govern.

  • Root. AGENTS.md is read by many coding agents; Claude Code reads CLAUDE.md and, when there is no CLAUDE.md, AGENTS.md. Put the rules for the whole folder here: what each area is for, naming conventions, what not to edit.
  • Subfolders. Both formats support nesting. Claude Code's memory documentation says a CLAUDE.md in a subdirectory loads once Claude reads, writes or edits a file there, so rules for projects/launch-2027/ can live in that folder and stay out of context until they matter. AGENTS.md explained covers how nested AGENTS.md files work.
  • Path-scoped rules. Some tools scope rules by pattern instead of folder, such as Claude Code's .claude/rules/ files with a paths field and Cursor's rules with globs.

Keep instructions about the structure itself in the root file. A line such as "Meeting notes go in projects/<name>/meetings/, named YYYY-MM-DD-topic.md" is what lets an agent put new files in the right place.

How do you keep agents out of the wrong folders?

By putting things out of reach, not just by asking. Instructions in AGENTS.md or CLAUDE.md are read as guidance. For a hard boundary, use the tool's own settings: Claude Code's Read deny rules, the filesystem server's list of allowed directories, or simply a folder the agent is never started in. Private notes, credentials and client material belong outside the workspace entirely.

Generated and bulky files are the other half. Build output, exported PDFs, node_modules and backups add noise to every listing and search. Keep them in an ignored folder, or outside the workspace.

How do you check that the structure works?

Ask an agent a question and watch what it does. "Where is our current refund policy?" in a coding agent shows each listing, search and read as it happens. If it opens six files to find one, a name or an index is missing. If it lands on an archived file, the archive is not separated clearly enough. Fixing what you see in two or three of these runs does more than redesigning the tree on paper. For the human side of the same structure, how to organize Markdown notes covers folders, tags and links.

Building the folder in Noteline

Noteline, which we make, opens a folder like this with File > Open Folder… (Cmd+O on a Mac, Ctrl+O on Windows and Linux) and shows the file system as it is: subfolders in the sidebar, each note a plain .md file, nothing imported or converted. The desktop app watches the folder, so files that an agent or another app adds or removes appear in the sidebar without a restart, and Find in Folder (Cmd+Shift+F or Ctrl+Shift+F) finds the notes that mention a file name before you rename the file. Hidden folders such as .git and .claude are skipped. Noteline has no AI features; it keeps the folder readable for you while agents work in it.

Give your next idea a Markdown file.

Write a note, copy it into your prompt, and keep the original as a plain .md file.

Try desktop free for 14 days ↓Free on iPhone, iPad and Android →

Desktop: 14-day trial, then $9.99 once. Mobile apps: free. No account.

Keep reading

  • Local Markdown files
  • How to keep AI meeting notes as Markdown files you own
  • AI memory files: what your assistant should remember, kept in Markdown
  • An AI research workflow in Markdown: sources, summaries and claims

A Markdown note editor with everything you need

We’re listening

Tell us what you need or what gets in your way. If something isn’t working, write to us any time.

contact@noteline.io→

Product

  • Download
  • Pricing
  • Features
  • Changelog

Learn

  • Markdown syntax
  • Use cases
  • Blog

Compare

  • vs Obsidian
  • vs Notion

Support

  • Help
  • Support
  • Privacy
  • Terms

© 2026 Notelinecontact@noteline.io