Skip to main content
Handbook/Read/Chapter 41 · Files

What Each One Is For

Share

Share this page

Pass it to someone who needs it.

Key takeaway: Know what each file type is for

You open the project your agent built and the sidebar is a wall of files: a .ts here, a .json there, a .env, a README.md, a Dockerfile with no extension at all. Most of them you will never edit by hand. This chapter gives you the quick read: glance at any file and know what it is for, and whether it is yours to touch.

4.3.1Every file is code, config, or data

Almost every file falls into one of three buckets, and sorting them is most of the battle:

KindHoldsLooks like
Codethe logic that runs.ts, .js, .py
Configsettings and wiring.env, .yaml
Datainformation the app reads.json

Name the bucket first and no file looks like noise.

4.3.2JSON and YAML hold your data

Two formats carry most of the data and settings you will see. JSON is the everyday one, used by data files and by package.json:

{ "name": "Ada", "active": true, "roles": ["admin", "editor"] }

YAML says the same kind of thing with less punctuation, and shows up in config and deploy files:

name: Ada active: true roles: - admin - editor

Both just store labeled values. You can read them straight off the page, which is the whole point of them.

4.3.3Config and secrets stay out of the code

Configuration is everything that changes between your laptop and the live server: the database address, an API key, a feature toggle. It lives apart from the code so the same code runs anywhere.

The values that differ per machine are environment variables, usually listed in a file named .env:

DATABASE_URL=postgres://localhost/myapp STRIPE_KEY=sk_live_not_a_real_key

A secret like that key lives in .env, never pasted into the code, because code gets shared and read while .env stays private. The Secure part covers why that line matters and how to keep it airtight.

Code is shared and read by others; secrets sit in a separate, private env file.

4.3.4The rest you just need to recognize

A handful more you only need to recognize, not master:

  • Markdown (.md) is plain text with light formatting. Your README, the front-door notes for a project, is Markdown.
  • package.json and its lockfile list the outside code your app depends on, and pin the exact versions.
  • A Dockerfile and other infra files describe how the app is packaged and run on a server. Your agent writes these, and the Ship part is where they matter.

You recognize the shape and move on. The agent handles the contents.

Ready prompt
Act as a senior engineer giving me a tour of my repo. List every distinct file type in the project and, for each, say in one plain sentence what it is for and whether I would ever edit it by hand. Group them as code, config, or data. Flag any file that holds secrets so I know to keep it private. My project:

Do this now: paste the prompt over your repo and have the agent label every file type in plain words, so the sidebar stops being a wall of unknowns.

Mahmoud Zalt

Mahmoud Zalt

Software engineer, 16+ yrs · built Sistava.com in 3 months, idea to production, using these methods

Resources
Contribute
Donate

Support my work

A small tip keeps the free work coming.

© 2026 Mahmoud Zalt. Free to read, not to republish.
Copyright & license