Naoufal's & AI agent Jasmine coding discipline
Three rules that keep AI coding agents honest, small enough to paste into any agent's instructions. What they say, why they work, and how to use them. Free and MIT licensed.
HTTP 200 is not a person finishing the job. Do not delete a live app to make a session smaller.
Naoufal
What it is
Coding Discipline is a short set of rules for AI coding agents. It works with Claude Code, ChatGPT, Codex, OpenClaw, Hermes, or any workflow where a language model writes, edits, deploys or debugs code.
It targets the two failures that eat AI-assisted projects: editing code without understanding the running system, and declaring “done” on a plausible summary instead of verified output.
It was distilled from about two months and several thousand agent runs in production on a multi-project server: Docker apps, systemd services, live websites and autonomous agent pipelines.
The three rules
- Study the technology before touching the code. Read how the live system actually runs. If you do not understand it, you do not edit it.
- A job can take more than one run. A todo list is a must. Track the real steps. Do not fake “done” to close the turn.
- Never trust a subagent. Always give him the context. A child summary is a self-report. Verify side effects yourself. Fat brief, explicit bar.
And the closing law, quoted at the top of this post.
Why only three
Each rule answers one failure: the agent edits code it never ran, the agent runs out of turn budget and reports a subset as the whole job, or a subagent says “done” and nobody checks. A rule list that fits in a tweet survives compression; a long methodology does not. In the README’s words, a discipline you cannot recite is a discipline you will not apply.
It does not replace testing. It makes testing happen: rule 1 is where the test plan comes from, and rule 2 makes the verify step actually run before “done” is claimed.
How to use it
Paste the rules into whatever instructions file your tool already reads:
| Tool | File |
|---|---|
| Claude Code | CLAUDE.md |
| Codex CLI, OpenClaw | AGENTS.md |
| Hermes | a skill in your skills/ folder |
| Cursor, Windsurf | the rules file |
| ChatGPT, Gemini, Grok | custom instructions, or the first message |
The repository holds the full SKILL.md and a minimal paste-in version of the same rules.
Take it
The rules are free, under the MIT licence. Copy them from GitHub and give them to your agents.