Skip to content
Ahmet Eren Lapanta

The English site is still catching up with the Turkish one, so a few pages and links are Turkish for now.

A CLAUDE.md for your project

This page is for someone who works in code and has their own repo. Claude Code reads the CLAUDE.md at the root of a repo at the start of every session, so your test command and what the agent must not touch belong there. Answer the questions and add the file to your repo.

Last checked:

What kind of project is it?

The type you pick adds one more rule to the file. If you pick API, that rule starts with "Ask before you change the request or response of an endpoint".

Optional. Say what it does and what it's built with in a sentence or two. The agent reads this at the start of every session.

Which language should the file be in?

The agent reads both. Pick Turkish only if everyone who opens the repo reads it.

The same command you type in the terminal. If you have no tests yet, leave it blank. The file then asks for a test tool to be picked before any code gets written.

Optional, one command per line. Some test tools, like Vitest, don't check types, so the test command can finish clean while typecheck fails.

Separate file and folder names with commas or put each on its own line. They go into the Boundaries section as places the agent must not touch without asking.

How do changes get into main?

If you're not sure, the file asks for a separate branch and PR for every task. Whichever you pick, the file tells the agent to ask you before it pushes.

When does a task count as done?

The condition you pick goes into the file's Definition of done section, and the agent is asked to show the last test output too. Don't call a task done until you've seen that output.

Which language should the agent reply in?

Code, file names, branch names and commit messages stay in English whichever you pick.

Your answers aren't sent anywhere. The file is built on this page, in your browser.

Your file

It updates with every answer.

# Method

Follow this file in order for every task in this repository. If something is unclear, ask one question. Do not guess.

## Project

This repository is a web app.

If the UI changed, tell me where to see the change in the browser.

## Language

Reply to me in English. Keep code, file names, branch names and commit messages in English.

## Commands

This project has no tests yet. Before you write code, suggest a test tool and say why in one sentence. If I agree, install it and add the test command to this section.

## Before you start

First tell me the task in your own words and write down what you will check to call it done. Do not write code until I approve.

## Working order

1. Write the test first and run it. When it fails, tell me why in one sentence.
2. Make the smallest change that turns it green.
3. Run the tests again and tell me what changed in three lines at most.
4. Commit each green step on its own. The commit message is one sentence that describes the change.

Do not change a failing test just to make it pass. If you think the test is wrong, tell me first.

## Branches and pull requests

- Do every task on a new branch. Never commit to main directly.
- Read your whole diff before you push. If you find a missing test or a change nobody asked for, fix it.
- Ask me before you push the branch or open a pull request.
- In the pull request description, write what changed and paste the last test output.
- Do not merge the pull request.

## Boundaries

Do not read or commit a file that holds a password or a key. Ask before you add a dependency. Never run `git push --force`, `git reset --hard`, `git clean` or `rm -rf`.

## Definition of done

A task is not done until every command in the Commands section finishes without errors. When you hand a task back to me, show the last test output.

## When stuck

1. Run the failing command again and read only the first error. Fix that one, then repeat.
2. Do not pile fixes on a broken state. Find the last green commit with `git log --oneline` and start a new branch from it.
3. Ask me what I see on my screen.

If none of this works, say so plainly and propose a smaller version of the task.

After you copy or download it

Save the file at the root of your repo as CLAUDE.md and commit it. If the repo already has a CLAUDE.md, add these sections to the end of it. Claude Code loads the file when a session starts. To see that it loaded, type /context and look at the Memory files list.

Put the commands the agent must never run on the deny list in .claude/settings.json as well. If the ban is only written in CLAUDE.md, the agent can still run a command like gh pr merge, because Claude Code doesn't block it on its own.

Examples

Files the form produces for imaginary projects. Pick one and the form fills in with its answers. You can also copy the file as it is.

  • Web app

    A Next.js app that takes table bookings for cafes. A task is done when the tests and the build pass.

  • API

    A Spring Boot API that serves order and stock data to a mobile app. The file is in English and the agent replies in whatever language you write to it in.

I use most of the rules in this form in my free program too. It takes you step by step through putting a small web app online with AI. If you want to try it, open A live app in 2 hours and start at the first step.