Rules the AI reads: the instructions file and tasks
I do not write a good prompt again every time. I write it once into a file the AI reads at the start of every job, and I change it whenever something breaks.
As of November 2026. The examples are shortened and rewritten for a made-up project, not quoted from my real files. My files are in Slovak; the examples here are translated.
The situation
Some instructions apply to every job: answer in Slovak, no passwords in files, send nothing out, save only your own changes. Writing them again every time across dozens of projects does not work. And an agent running at five in the morning has nobody to ask.
The solution is an instructions file. Claude Code reads it by itself at the start of every session. What is in it, I do not have to repeat.
What I gave the AI and what I did not
The AI reads and follows my rules, and when something is missing it proposes an addition. It may not change a rule without a recorded decision with a reason. The rules are my decisions, not its.
Prompt and rule
A prompt is an instruction for one job. A rule is an instruction that applies to every job. What always applies belongs in the rules file, not in the prompt.
Three levels
- Instructions for everything. A file at the root of the repository. It applies to all projects: language, folder structure, what must never be written down, how changes are saved, boundaries between projects, and what I expect from the AI.
- Project instructions. A file in the project folder. It refines the root file for one project: commands, reading order, what is not allowed in this project. In a conflict the root file wins. A session opened directly in the project folder sees both, because Claude Code also looks for instruction files in parent folders.
- The task. A file for one session. It says exactly what should be done now and what not.
I keep the root file deliberately short, because it is loaded into every session. It holds only what applies to all projects and without which a session would make a mistake. Details live in separate files, and the root file only has a table: for which kind of work to read which of them.
What the instructions contain
The skeleton of the root file, rewritten as a generic example:
# Instructions for the AI
Answer in Slovak.
## Structure
Each folder is one project. A project has an overview file
(status, decisions, open questions) and a folder with tasks.
## Never write down
Passwords, keys, tokens, public IP addresses, receipts, other people's data.
If I send you any, warn me and do not write them down.
## Saving changes
Save on your own after each logical unit, only the files you changed,
named one by one. Description in the form "project: what was done".
## Questions
Ask only in one form: question, context, options A/B/C, proposal.
## What I expect from you
Be critical, not encouraging. Finishing comes before starting something new.
Under “what I expect from you” I have a few more sentences that have proven useful. With a multi-point or unclear instruction, the AI should first repeat in its own words how it understood it, and only then work. I type fast and often without diacritics, so a word that does not fit is more likely a typo than a new term. And when I propose a new tool, it should tell me in one sentence which unfinished thing I am pushing back with it.
Project, module, task
My work has three levels. A project is the vision. A module is a complete function. A task is the work for one session, one to two hours. Whatever cannot be done in one session is not a task but a module, and it is split into more tasks. When I plan, I count on one hour a day, which is why a task is exactly that size.
The task template
# Task: [name]
**Project:** [folder] / Module: [number]
**Created:** YYYY-MM-DD
**Status:** proposal | approved | in progress | blocked: <what is missing> | done
**On its own:** yes | no - [one sentence why]
## Goal
One verifiable sentence.
## Context
What already exists, what this builds on, what is tricky.
## Output
What exactly should be created and where it is saved.
## Constraints
What must hold and what must not be used or changed.
## Definition of done
A test: I run X and Y happens.
## What NOT to do
Where not to wander off.
Three sections do most of the work:
- Goal has to fit into one verifiable sentence. “Improve the website” is not a goal. If the sentence cannot be written, the task is not ripe yet.
- Definition of done is a test, not an impression. Not “it will work”, but “I run X and Y happens”. Without it a task is never closed, only improved forever.
- What NOT to do exists because both the AI and I tend to wander off. It lists specific things that are tempting and belong elsewhere.
The header as an interface for a machine
The lines at the top of a task (status, on its own, model, folders, what it waits for) are not read only by me. They are read by a program that builds the queue for morning processing without a human. So every line has to stand on its own from the start of the line in the exact form. A deviation does not mean an error; it means the task silently drops out of the queue. When the template changes, the program that reads it has to change too.
The only form of a question
The AI may ask me questions in only one way:
- **[BLOCKS blog/04]** Should the blog have an English version too?
*Where it is:* two or three lines of context.
*Options:* A) yes, right away · B) yes, after ten articles · C) no
*Proposal:* B, because ...
*Unblocks:* task 04
The example is made up. My answer is one sentence, for example “1: B”. The default answer is agreement with the proposal, which is why the AI always has to propose something. Questions without the tag block nothing and I do not have to deal with them.
Memory between sessions
The AI does not remember by itself from one session to the next what was done. So the memory lives in files. The overview of every project has three lines right under its title: the status in one sentence with a date, the current task, and what the project has to be aligned with. The date in the status moves forward with every session, and a regular check uses it to recognise that a project is stuck.
At the end of every session the AI does four things on its own: it adds what is done, moves the task status and the date in the overview, records decisions with their reasons, and saves the changes. A session without a save does not exist for the overview.
Rules are born from failures
Most of my rules have a date and a story. Three examples:
- A push that deploys. A push to GitHub once deployed code that was not finished yet. Since then a separate command runs before every push to show whether anything would be deployed, and for code a human decides.
- Automation is done only when it runs. In October 2026 I missed a deadline twice because the automation that was supposed to watch it was “done” but was not in the system scheduler. Since then automation with a deadline is done only when it is in the main branch, is scheduled, has passed a test run started from the scheduler, and is checked the day before.
- Dashes. The long and medium dash are a typical sign of text written by AI; people normally type the hyphen from the keyboard. So I do not want them in any of my texts, and the website check looks for them automatically.
What went wrong
On 6 September 2026 three approved tasks silently dropped out of morning processing. “On its own: yes” was written inside the sentence of the “Status” line, not on its own line, and the program did not find it. For a human the text was clear, for the machine it was not. Since then the header is an interface with an exact form, and after a manual edit a validator checks it.
How to check
- At the start of a new session, ask the AI which rules apply to the project. If it does not know, it is not reading the instructions file or the file is in the wrong place.
- For every task, read the definition of done and attempt to run it. If it cannot be run, it is not a definition of done.
What to watch out for
- An instruction is not a lock. The agent mostly follows a rule in the file, but that is not certain. What must never happen is held, in my unattended work, by a list of forbidden commands, not by a sentence in a file.
- The root file is always loaded. What applies to only one project belongs in its own file, not in the root one.
- Conflicts between files. When the same rule appears in two places and changes in only one, the AI gets two instructions. When changing a rule, it is worth searching for every place it appears.
- Secrets do not belong in the instructions. The file is read by AI and sits in the repository.
Takeaways
What applies to every job belongs in a file, not in the prompt. The instructions file has three levels: for everything, for the project, for one session. A task has six sections, and the most important are a verifiable goal, a definition of done and “what not to do”. A rule changes whenever something breaks, and with each change it gets a date and a reason.
Exercise for today: from the last three conversations with AI, write down the sentences I typed more than once. They are the first content of my own instructions file.
Previous episode: While I sleep: the morning batch and the checker. The series starts with A map of my workshop.
I prepared this text with the help of AI from my own notes.