Skip to content

AI Compass / Knowledge cards

Project start with rules and plan files

Checked Prompting Automation

An agent that starts without a plan has to guess. A project starts better with a few files: a requirements document, or PRD (Product Requirements Document: what is being built and in which phases), a short CLAUDE.md with rules, and one file each for progress, lessons and decisions. On top of that come four basic rules that a well-known collection derived from observations by Andrej Karpathy.

What it is for

Every new session knows what is being built, what is already done and what must never happen. You don’t have to explain your project from scratch in every chat.

Steps

  1. Put the four basic rules in the CLAUDE.md of a parent folder rather than installing them as a skill: state assumptions instead of guessing. Choose the simplest solution. Change nothing outside the task. Before “done”, define a check and keep working until it passes. According to the docs, Claude Code reads the CLAUDE.md in the working folder and in all folders above it.
  2. Clarify the requirements in conversation: a planner agent keeps asking until you say “that’s it”. Then it writes the PRD with phases and design decisions into the project folder.
  3. Keep the project’s CLAUDE.md short: one sentence at the top on what it is about, then the pointer to the PRD and only rules the agent can’t work out itself, such as an unusual test tool. According to the docs, under 200 lines.
  4. Put rules per area into separate files and link them, plus a file of negative rules: what must never be built or used. Claude Code has the folder .claude/rules/ for this. According to the docs, it loads rules with a path scope only when Claude works on matching files.
  5. Create three working files and state in the CLAUDE.md that the agent maintains them: progress, lessons and decisions. After each correction from you, the agent writes the lesson into the lessons file.
  6. Have the tests derived from the PRD before building, and run them at the end. Commit after each implementation step.
  7. Regulate risky commands and, where necessary, block them outright. The video of 28 April writes force-push, reset, merge and rm -f into the CLAUDE.md as a rule: only after asking. According to the docs, however, the CLAUDE.md is context, not a block. What must never happen therefore belongs in a hook, a script that Claude Code runs before every tool call.

Limits

Sources

Status

Checked 17 Oct 2026 · Maturity new (built-in tools described in the docs; effect of the basic rules attested by the creators only)

Want to try this with your team? That’s what the AI Lab is for. See the AI Lab