Module 08 · Lesson 8.1
README and Operating Notes
On this page
- What you will learn
- Why a README and operating notes matter
- What goes in a README
- Operating notes for running and supporting the project
- Check that the documents match the project
- Step-by-step workflow: write, test and keep the documents
- What the assistant does and what you do
- Conclusion and your next step
- Reusable prompt
- Expected output
- Common errors and fixes
- Validation checklist
- Hands-on exercise
- Knowledge check
- Frequently asked questions
- References
Think of a holiday rental. The owner leaves a welcome folder: how to get in, how to work the heating and who to phone if the boiler stops. Without it, every guest sends the owner the same questions. A software project needs the same folder.
In this lesson you write two documents for Tidewell's booking system. The README tells a new person how to run and change the project. The operating notes tell whoever is on duty what to do when something goes wrong. You also run a small checker that catches commands and links that do not exist, and you test the documents on someone who did not write them.
What you will learn
- Explain what a README and operating notes are for, and who reads each one.
- Write a README with a quick start, a settings table, checks, deploy notes, a docs map and owners.
- Write operating notes for the smoke test, logs, common problems, rollback, backups and escalation.
- Test both documents with a fresh pair of eyes, and check them against the project with a script.
Before you start
- Completed Releasing and Rolling Back, or have a project that you can release.
- Access to any capable AI assistant.
- Optional: Node.js and the project from earlier lessons, if you want to run the examples.
Why a README and operating notes matter
A README is the first file a person opens in a project. It answers one question: how do I get this running and find my way around? Without it, the only way to learn the project is to ask the person who built it.
Operating notes answer a different question: how do I keep this running, and what do I do when it breaks? You read them under pressure, often at a bad moment. They must be short, exact and easy to scan. Some teams call them a runbook.
- README
- A plain text file at the top of a project. It is the welcome folder: what the project is, how to start it, where everything else is.
- Operating notes
- A document for people who run and support the project. It is the 'what to do if the boiler stops' sheet.
- Quick start
- The shortest list of steps that takes a new person from nothing to a running copy.
- Fresh pair of eyes
- Someone who did not write the document and tries to follow it. They find the gaps that the writer can no longer see.
| README | Operating notes | |
|---|---|---|
| Reader | A new developer, a contractor, you in six months. | Whoever is on duty, perhaps in a hurry. |
| Question | How do I run and change this? | How do I keep it running, and fix it? |
| When it is read | On day one, and when setting up a new machine. | At release time, and when something is wrong. |
| File | README.md in the repository root. | docs/operations.md. |
These are not the same as the AGENTS.md file from Assistant Context Files. That file is written for an assistant and holds rules. The README is written for people. Keep both short, and let each one link to the other documents instead of copying them. The Diátaxis framework (opens in a new tab) explains why different readers need different kinds of document.
What goes in a README
This is the README for tidewell-booking. It has one paragraph on what the project is, then the sections named in the module checklist. Every command in it exists in the project, and no real value appears in it. The Make a README (opens in a new tab) guide has more ideas if your project needs them.
# Tidewell booking
A web application where patients of Tidewell Physiotherapy (a fictional clinic) see free appointment slots and move or cancel their own bookings. Front-desk staff change bookings for patients. It is a Next.js application with a PostgreSQL database.
## Quick start
You need Node.js and a PostgreSQL database that you can use for development.
1. Clone the repository and open its folder.
2. Run `npm ci` to install the exact packages from the lock file.
3. Copy `.env.example` to `.env.local`, then replace each fake value with your own.
4. Run `npm run migrate` to apply the database changes in `db/migrations/`.
5. Run `npm run dev` and open http://localhost:3000.
## Configuration
Settings are read once at start-up in `src/lib/config.ts`. The app stops with a message that names any missing setting. Real values live in `.env.local`, which is never committed.
| Setting | What it is for |
| --- | --- |
| `DATABASE_URL` | Address of the PostgreSQL database. |
| `APP_BASE_URL` | Public address of the site. Sign-in links use it. |
| `EMAIL_API_KEY` | Key for the email-sending service. |
| `AUTH_SECRET` | Secret the sign-in library uses to protect its data. |
## Checks and tests
- `npm run check` runs lint, format check and type check.
- `npm test` runs the automated tests. They need no outside service.
## Deploy and roll back
The steps are in [operating notes](docs/operations.md). In short: run `npm run smoke` after every release, and roll back by redeploying the previous version.
## Where the docs live
- [Requirements](docs/requirements.md) and [acceptance criteria](docs/acceptance-criteria.md)
- [Architecture](docs/architecture.md) and the decision records in [docs/adr](docs/adr)
- [API contract](docs/api/openapi.yaml)
- [Operating notes](docs/operations.md)
- [Record of AI assistance](docs/ai-assistance.md)
- [Ownership and review rules](docs/governance.md)
## Who owns what
| Area | Owner (by role) |
| --- | --- |
| Code and database migrations | Developer |
| Booking rules, such as the 24-hour notice period | Practice manager |
| Hosting, backups and data-protection decisions | Clinic owner |Fifty lines. A new person can run the project from this file alone.
What each part does
- The opening paragraph says what the project is, who uses it and what it is built with. A newcomer knows in ten seconds whether they are in the right place.
- Quick start is a numbered list, because order matters.
npm ciinstalls the exact packages in the lock file, which is safer thannpm installfor a fresh copy. - Configuration lists every setting by name with its purpose. It never shows a value. The names must match
.env.examplefrom Configuration and Secrets. - Checks and tests names the two commands a developer runs before asking for review.
- Deploy and roll back gives the short version and points to the operating notes.
- Where the docs live is a map. The README links to the other documents instead of repeating them, so there is one true copy of each.
- Who owns what names an owner by role for each area, so people know whom to ask.
Operating notes for running and supporting the project
Operating notes list the jobs that come up again and again after launch. They gather things from earlier lessons. The smoke test and rollback come from Releasing and Rolling Back. The reference ids come from Error Handling and Backend Review. The email outbox comes from Module 6.
# Operating notes
Read this when you release or when something is wrong. Run commands from the project folder.
## Smoke test
Run `npm run smoke` after every release. It checks the home page, the clinician list, the sign-in page and that a signed-out request for bookings is refused. If any check fails, go to Rollback.
## Logs and reference ids
Logs are on the logs page of the hosting service the clinic owner chose. A 500 response shows a reference such as `K7QX-29PD`. Search the logs for it. The line names the route, the error kind and the database code. It never holds personal data.
## Common problems
### Emails are not arriving
1. Look for stuck messages: `SELECT id, attempts, last_error FROM email_outbox WHERE status = 'failed' ORDER BY id;`
2. Read `last_error`. Usual causes are a wrong or expired `EMAIL_API_KEY` or an outage at the email service.
3. Fix the cause. Then set the rows back to pending: `UPDATE email_outbox SET status = 'pending', attempts = 0 WHERE status = 'failed';`
4. Ask front-desk staff to phone any patient whose message was urgent.
### Sign-in links do not work
Check that `APP_BASE_URL` is the real public address, that the email service is up and that the key is valid. Ask the patient to look in their spam folder.
### A migration failed
The runner rolls the failed file back and records nothing. Stop the release. Fix the cause and run `npm run migrate` again. Never edit a migration that has been applied. Add a new numbered file.
## Rollback
1. Redeploy the previous version. Migrations are additive, so it still works.
2. Run `npm run smoke`.
3. Undo a data change with a new migration, never by editing an old one.
4. Tell the practice manager what happened.
## Backups and restore test
The hosting service takes daily backups. The clinic owner confirms the schedule and the region. Every quarter, restore the latest backup into a separate empty database, check the row counts, run the app against it, then delete the copy. It holds real personal data.
## Who to tell
- Developer: first contact for any technical fault.
- Practice manager: when patients are affected or the phone line needs a message.
- Clinic owner: for any loss or leak of personal data, and for hosting or backup problems.Forty-five lines. Each problem has steps, not a story.
What each part does
- Smoke test says when to run it and what to do if it fails. A smoke test is a quick check that the main parts of the live system respond, like switching a machine on to see if smoke comes out.
- Logs and reference ids says where logs are and how to use the short reference that a patient or colleague quotes from a 500 error. The log line never holds personal data.
- Common problems gives the real fixes for the three faults that are most likely: stuck emails, sign-in links that fail and a failed migration. Each one starts with how to look, then how to fix.
- Rollback is the plan from Module 7. Redeploy the previous version, check it, and undo data changes with a new migration, never by editing an old one.
- Backups and restore test says who confirms the schedule and how to prove a backup works. A backup you have never restored is only a hope.
- Who to tell names the roles to contact. The clinic owner decides anything about personal data and hosting, as set out in the clinic's data-protection duties (CON-01).
Check that the documents match the project
Documents go wrong quietly. A command is renamed, a setting is added, a file moves, and the README stays the same. This small checker reads a README or operating notes file and compares it with the real project. It checks the section headings, every npm run command, every link to a file, and the settings table against .env.example.
// scripts/check-docs.ts: checks a README or operating notes against the real project.
import { existsSync, readFileSync } from "node:fs";
import { basename, dirname, join } from "node:path";
const REQUIRED: Record<string, string[]> = {
"README.md": ["Quick start", "Configuration", "Checks and tests", "Deploy and roll back", "Where the docs live", "Who owns what"],
"operations.md": ["Smoke test", "Logs and reference ids", "Common problems", "Rollback", "Backups and restore test", "Who to tell"],
};
export function checkDoc(file: string): string[] {
const text = readFileSync(file, "utf8");
const dir = dirname(file);
const root = basename(dir) === "docs" ? dirname(dir) : dir;
const problems: string[] = [];
const headings = text.split("\n").filter((l) => l.startsWith("## ")).map((l) => l.slice(3).trim());
for (const wanted of REQUIRED[basename(file).startsWith("README") ? "README.md" : basename(file)] ?? []) {
if (!headings.includes(wanted)) problems.push(`Missing section: ${wanted}`);
}
const scripts = Object.keys(JSON.parse(readFileSync(join(root, "package.json"), "utf8")).scripts);
for (const m of text.matchAll(/npm run ([a-z:-]+)/g)) {
if (!scripts.includes(m[1])) problems.push(`Command not in package.json: npm run ${m[1]}`);
}
for (const m of text.matchAll(/\]\(([^)#\s]+)(?:#[^)]*)?\)/g)) {
if (/^(https?:|mailto:)/.test(m[1])) continue;
if (!existsSync(join(dir, m[1]))) problems.push(`Link points to a missing file: ${m[1]}`);
}
if (basename(file).startsWith("README")) {
const example = readFileSync(join(root, ".env.example"), "utf8")
.split("\n")
.map((l) => l.match(/^([A-Z][A-Z0-9_]*)=/)?.[1])
.filter((n): n is string => Boolean(n));
const documented = [...text.matchAll(/^\| `([A-Z][A-Z0-9_]*)` \|/gm)].map((m) => m[1]);
for (const name of example) if (!documented.includes(name)) problems.push(`Setting not in the README table: ${name}`);
for (const name of documented) if (!example.includes(name)) problems.push(`README names a setting that .env.example lacks: ${name}`);
}
return problems;
}
if (process.argv[1] && import.meta.filename === process.argv[1]) {
for (const file of process.argv.slice(2)) {
const problems = checkDoc(file);
console.log(`${file}: ${problems.length === 0 ? "OK" : problems.length + " problem(s)"}`);
for (const p of problems) console.log(` - ${p}`);
}
}Tested with the TypeScript compiler and run below. The section names are this project's choice, not a standard.
What each part does
REQUIREDlists the sections each kind of file must have.- The first loop reports any missing section.
- The second loop finds every
npm run namein the text and reports names that are not inpackage.json. - The third loop finds every link to a file and reports any file that does not exist.
- For a README, the last part compares the setting names in the table with the names in
.env.example, in both directions.
Here it runs on a rushed first draft, then on the real README and operating notes. The draft misses three sections, names a command that does not exist, links to a missing file and forgets a setting. Your run will print the same lines.
npx tsx scripts/check-docs.ts README.draft.md README.md docs/operations.mdRun from the project folder.
README.draft.md: 6 problem(s)
- Missing section: Checks and tests
- Missing section: Deploy and roll back
- Missing section: Who owns what
- Command not in package.json: npm run start:dev
- Link points to a missing file: docs/setup.md
- Setting not in the README table: AUTH_SECRET
README.md: OK
docs/operations.md: OKStep-by-step workflow: write, test and keep the documents
Step 1: List the facts
Collect the commands you have run, the settings names, the folders and the owners by role. Write only what is true today.
What you should see: A list of facts, each one checked.
Step 2: Draft the README
Use the sections from this lesson. Ask an assistant for a first draft from your facts with the prompt card, then cut anything it invented.
What you should see: A README under about sixty lines.
Step 3: Draft the operating notes
Start from the faults you have already seen, such as failed emails or a bad migration. Write the steps in the order you would do them.
What you should see: A short list of problems, each with how to look and how to fix.
Step 4: Run the checker
Run the docs checker and fix every line it reports. Then run each command in the documents yourself.
What you should see: The checker prints OK, and the commands work.
Step 5: Do a fresh-eyes run
Ask someone who did not write the README to follow it on a clean machine. Say nothing. Write down every place they got stuck, hesitated or guessed.
What you should see: A list of gaps in the document, not faults in the person.
Step 6: Fix, then keep it current
Fix the document for each gap. From now on, a change that touches a command, a setting or a procedure updates the document in the same pull request.
What you should see: The documents stay true as the project changes.
- Facts
Run and confirmed
- Draft
README and notes
- Checker
Commands, links, settings
- Fresh eyes
Someone else follows it
- Fix
Change the document
- Same change
Updated with the code
The fresh-eyes run is the step that finds what the writer cannot see.
What the assistant does and what you do
| Task | Assistant's part | Your part |
|---|---|---|
| Drafting the README | Can draft it from the facts and the file tree you supply. | Run every command. Remove steps it invented. |
| Drafting operating notes | Can turn your known faults into numbered steps. | Confirm each fix is right for your system. Add faults it did not know. |
| Tidying the wording | Can shorten text and use plainer words. | Check that the meaning did not change. |
| Testing the documents | Cannot stand in for a new person. | Arrange the fresh-eyes run, and act on what it shows. |
| Deciding who is told and who owns what | Not its job. | Decide by role, with the practice manager and the clinic owner. |
Conclusion and your next step
A README helps a new person run the project. Operating notes help whoever is on duty keep it running. Both stay short, name only commands and settings that exist, and hold no secrets. A script catches commands and links that drifted, and a fresh-eyes run catches the gaps a writer cannot see.
Your next step: the README links to the API contract and the decision records. Keep those true as the code changes in API and Architecture Documentation.
For more help with handover writing, see the prompt Operational Runbook Draft and Module Documentation for New Joiners. The module overview, Documentation and Governance, lists the assignment and checklist.
Reusable prompt
Draft a README from facts
Gets a first README from facts you supply, with anything it is unsure of listed for you to check.
You are helping me write a README.md for a software project. Use only the facts below. Do not invent commands, files, settings or people.
Project: tidewell-booking. A Next.js and PostgreSQL web app where patients of Tidewell Physiotherapy (a fictional clinic) see free slots and move or cancel their own bookings; front-desk staff change bookings for patients.
Commands that exist: npm ci, npm run migrate, npm run dev, npm run check, npm test, npm run smoke.
Settings (names only): DATABASE_URL, APP_BASE_URL, EMAIL_API_KEY, AUTH_SECRET. They go in .env.local, copied from .env.example.
Docs: docs/requirements.md, docs/acceptance-criteria.md, docs/architecture.md, docs/adr/, docs/api/openapi.yaml, docs/operations.md, docs/ai-assistance.md, docs/governance.md.
Owners by role: developer owns code and migrations; practice manager owns booking rules; clinic owner owns hosting, backups and data protection.
Tasks:
1. Write one paragraph on what the project is, then these sections: Quick start, Configuration, Checks and tests, Deploy and roll back, Where the docs live, Who owns what.
2. Make the quick start a numbered list. Show setting names in a table with their purpose, and never show a value.
3. Link to documents instead of copying them. Keep it under 60 lines.
4. After the README, list anything you were unsure of, so that I can check it.Show the reusable template
Replace each {{placeholder}} with your own details.
You are helping me write a README.md for a software project. Use only the facts below. Do not invent commands, files, settings or people.
Project: {{project_description}}.
Commands that exist: {{commands}}
Settings (names only): {{setting_names}}. {{where_values_live}}
Docs: {{document_list}}
Owners by role: {{owners_by_role}}
Tasks:
1. Write one paragraph on what the project is, then these sections: Quick start, Configuration, Checks and tests, Deploy and roll back, Where the docs live, Who owns what.
2. Make the quick start a numbered list. Show setting names in a table with their purpose, and never show a value.
3. Link to documents instead of copying them. Keep it under {{max_lines}} lines.
4. After the README, list anything you were unsure of, so that I can check it.Expected output and limitations
A short README with the six sections, a numbered quick start, a settings table without values, links to your documents, and a separate list of things the assistant was unsure of.
# Tidewell booking
A web app where patients of a fictional clinic see free slots and move or cancel bookings.
## Quick start
1. Run `npm ci`.
2. Copy `.env.example` to `.env.local` and fill in the values.
3. Run `npm run migrate`, then `npm run dev`.
## Configuration
| Setting | What it is for |
| `DATABASE_URL` | Address of the database. |
Unsure, please check: whether a database must be created before `npm run migrate`, and which Node.js version is needed.Limitations to keep in mind
- The assistant may add a step that sounds normal, such as 'create the database', that your project does not need or does not say how to do. Run the steps.
- It may not know which Node.js version or database setup you need unless you say so. Its list of doubts is worth reading.
- It cannot tell whether a new person will understand the text. Only a fresh-eyes run shows that.
Common errors and how to fix them
The README says npm run start:dev, but the project has no such script.
Why it happens: It was written from memory or from a typical project, and a script was renamed later.
Fix: Run every command in the file, and run a checker like the one in this lesson in your pipeline.
The settings table is missing a setting, or shows a real value.
Why it happens: A setting was added to the code but not to .env.example or the README, or a value was pasted to make the example work.
Fix: Keep .env.example and the table in step. Show names and purposes only, and rotate any real value that was pasted.
Operating notes exist but nobody has ever tried them.
Why it happens: They were written once, in calm, and never used.
Fix: Walk through a problem with someone else. Rehearse the rollback and the restore test, then fix every step that did not work.
Validation checklist
Tick each item once you have confirmed it.
Hands-on exercise
A README and operating notes for Ferngate Cycle Repairs
Write a README and short operating notes for Ferngate's parts tracker. Then run a fresh-eyes test with someone who did not write them, and record every place they got stuck.
You will need
- Commands that exist: npm ci, npm run dev, npm run check and npm test.
- Settings: DATABASE_URL and APP_BASE_URL.
- Mechanics share one tablet with greasy hands, and the workshop's internet connection is unreliable.
- The low-stock threshold is 'to be agreed' with the owner. Owner roles: developer, workshop owner.
Acceptance criteria
Your work is done when every one of these is true.
Hints (2)
- Ask what a mechanic sees on the tablet when the connection drops, and what they should do next.
- Keep the fresh-eyes tester quiet and let them struggle. Your notes are the result.
Show a model answer
A strong answer has a short README that a stranger can follow, with commands that exist and a settings table with no values. The operating notes cover a lost connection in steps a mechanic could do, such as checking the tablet's connection and telling the owner what was recorded on paper meanwhile. The threshold appears as an open decision, owned by the workshop owner. The fresh-eyes list shows real stumbles, for example an unexplained term, and each one has a fix in the text. The answer does not hide gaps by assuming the reader already knows the project.
Knowledge check
Choose an answer, then check it. Nothing is recorded — this is for you.
Show the answer and explanation
Answer: A. The names and purposes are what a new person needs, and they are safe. Showing the real key is tempting because it makes setup quick, but the README is committed and widely read. Leaving settings out entirely means a new person cannot start the app.
Show the answer and explanation
Answer: B. The author knows the project, so they fill every gap without noticing. A newcomer cannot. Elegance is tempting to check but does not matter if the steps fail, and a README run does not test the code.
Show the answer and explanation
Answer: B. A restore test proves that the backup can really be used. Backups can be taken without it, so the first answer is wrong. The third is a tempting guess, but the clinic owner decides the schedule and the practice with proper advice.
Frequently asked questions
What should a README contain?
A short description of the project and a quick start with exact commands. Then the settings it needs (names only), how to run checks and tests, and how to deploy. Add where the other documents are and who owns what. Keep it short and link to longer documents.
What are operating notes or a runbook?
They are a short guide for people who run and support a system. They list the jobs and faults that come up, such as a failed email or a bad release, with the exact steps to check and fix each one. A runbook is another name for the same idea.
How do I know my README works?
Ask someone who did not write it to follow it on a clean machine, and note every place they get stuck. Also run every command in it and use a script to check commands, links and settings. Fix the document, not the person.
Should a README include passwords or API keys?
No. A README is committed and widely read. List the setting names and what they are for, and say where the real values come from. If a key is ever pasted into a file, revoke it first and then replace it.
- Written by
- PromptFable Editorial
- Last updated 19 Nov 2026
- Review
- Reviewed by Waseem Nadir, Technical Reviewer
- Last reviewed 27 Nov 2026
References
Primary sources for the technical details in this lesson. Vendor platforms change — check the official page if anything here looks different from what you see.
- Make a README(opens in a new tab)
Make a README · A community guide to what a README can contain.
- Diátaxis(opens in a new tab)
Diátaxis · A way of thinking about documents for different readers: tutorials, how-to guides, reference and explanation.
- Logging - OWASP Cheat Sheet Series(opens in a new tab)
OWASP · What to record in logs, and what to keep out of them.
PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.