claude-code-workflow
CLAUDE.md2 starsChanged 13 days agoMITView on GitHub
These rules apply to every task in this repository. Everything specific to this project (board, repository conventions, pipelines, environments, approvers, extra steps) is in .claude/project.md; read it before any task that touches the board, a pull request or a deploy. Nothing is committed, pushed, or published on a pull request without the user's approval. This comes before every other rule and before any skill's instructions. Work follows one loop, and each step has a skill (see docs/workflow.svg): story-start (pick the…
In this repository13 other files it gives its agents.
- messageSkill
- pr-answerSkill
- pr-openSkill
- pr-recheckSkill
- pr-reviewSkill
- pr-watchSkill
- releaseSkill
- self-reviewSkill
- smoke-testSkill
- statusSkill
- story-startSkill
- story-writeSkill
- worklogSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
24 rules. About 0 are common, 22 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Continue on your own between approval points: When a step of the loop is finished, start the next one without being asked and without …
- Distinctive: line 45
Work already in flight comes before new work: When several things could be done, the order is:
- Very specific: line 54
When news arrives for a task that was put aside, go back to it: the task in hand is parked as pr-answer describes, and resumed afterwards.
- Distinctive: line 58
Ask before every pipeline or job run, merge, and force-push, each time.
- Distinctive: line 59
Ask before cancelling any run.
- Distinctive: line 60
Ask before writing to a shared tool (the board, the wiki, a chat channel), except the board changes a skill names as part of a step the …
- Distinctive: line 62
Before running an experiment that costs money or changes shared data, say what it will cost and what it will touch.
- Distinctive: line 67
Do not assume: check the live system or the code, and say where each fact came from (checked now, or remembered from earlier).
- Distinctive: line 70
When describing a plan, separate what exists today from what is proposed.
- Distinctive: line 71
Search thoroughly before saying something does not exist.
- Distinctive: line 77
When there is a choice to make, give labelled options (A, B, C) with your recommendation and what each can break.
- Distinctive: line 78
Follow the pattern the codebase already uses, and the way the teammate who owns that part does it.
- Distinctive: line 79
Prefer a check that needs no deploy over one that does.
- Distinctive: line 83
No ticket numbers, story numbers, PR numbers or people's names in code, comments or documentation.
- Distinctive: line 84
No names, e-mail addresses or business values as fallbacks in code.
- Distinctive: line 85
Use the real technical terms.
- Very specific: line 89
No worktrees. Feature branches derive from the latest base branch and are merged with the method project.md sets (squash unless it says …
- Distinctive: line 91
After a squash merge, delete the feature branch, remote and local.
- Distinctive: line 92
Before a force-push or a branch rebuild, show that nothing is lost and keep a backup ref.
- Distinctive: line 99
Before proposing a review comment, read what others already wrote on the pull request and drop any point already raised, even if worded …
- Distinctive: line 109
Do not present work as complete while another person's part is pending.
- Distinctive: line 113
Stop probes, background runs and local servers when the task is done.
- Distinctive: line 114
Remove test data left in shared environments, and say what was left behind if any.
- Distinctive: line 115
When a login expires, give the user the complete command to sign in again.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working rules
These rules apply to every task in this repository. Everything specific to this project (board, repository conventions, pipelines, environments, approvers, extra steps) is in .claude/project.md; read it before any task that touches the board, a pull request or a deploy.
The golden rule
Nothing is committed, pushed, or published on a pull request without the user's approval. This comes before every other rule and before any skill's instructions.
- Approval is explicit, for that action, in this conversation. An earlier yes does not cover the next commit, the next push or the next comment. One yes may cover several actions only when they were all shown together in the same question (for example a commit, its push and the replies that go with it).
- Show exactly what will be committed (files and message) or published (the text) before asking.
- The user may forget that something is waiting for them. Whenever work is waiting for an approval, say so at the end of each update, as a short list: what is waiting, since when, and what happens once they say yes. Repeat it until it is answered; never take silence as a yes. Record it too (
worklog.py start <task> waiting_user --note "<what>"), so a later session can still remind them. - An event the user reports ("approved", "merged", "it finished") is information, not approval of an action. When it could be either, ask.
- Commits are made in the user's identity, never with the assistant named as author or co-author.
The workflow
Work follows one loop, and each step has a skill (see docs/workflow.svg): story-start (pick the next story, tasks, board, branch, plan), development, self-review (two reviewers until clean), pr-open (commit and pull request, each after approval), pr-watch (notice the review at once), pr-answer (reviewers' comments), release (merge, deploys, approvals, tests, closing). status says where everything stands; worklog times every stage; message, story-write and smoke-test cover what is written and tested along the way. Use the skill for the step instead of improvising it.
Keeping the loop moving
Continue on your own between approval points. When a step of the loop is finished, start the next one without being asked and without asking "shall I continue?". The order is fixed:
| When this is done | Go on to |
The plan of story-start is approved | development |
| The code is written and its tests pass | self-review |
| A review round is clean | pr-open, which stops at its first approval point |
| The pull request is open | pr-watch |
| The watcher reports a review | pr-answer, which analyses at once and stops at its first approval point |
| The watcher reports the last approval | release, which stops at the merge question |
| A deploy stage finishes | the tests in that environment, then the next gate's approval request |
| The task is closed | story-start, for the story's next task or the next story |
Continuing is not approving. Every approval point of every skill still stops and waits, and the golden rule is untouched: moving to the next step never commits, pushes, publishes, merges or starts a run by itself. If the next step cannot start (a missing value in project.md, a failing test, a decision the user must take), say what is in the way instead of stopping silently.
Do not sit through a long wait. A wait is long when it is expected to last more than the long-wait threshold in project.md:
- a review was requested after the reviewers' cut-off, or their working day has ended: nothing comes back before the next working day;
- a release gate is waiting for an approver;
- a deploy whose usual duration in
project.mdis over the threshold has started; - the task is blocked on someone else.
When a long wait begins, say how long it is likely to last and what will end it, and propose the next piece of work at once: run story-start as far as its plan, which is where it stops for the user anyway. If the limit of tasks in flight in project.md is reached, say so and do not start a new task: propose the most useful thing that is not one, such as reviewing a teammate's pull request, going through the backlog, or writing up the next stories (story-write).
Work already in flight comes before new work. When several things could be done, the order is:
- remind the user of what is waiting for their approval;
- answer reviewers on our own pull requests, while their working day lasts;
- the next release step that is ready: an approval request, the tests after a deploy, a promotion;
- a teammate's pull request waiting for the user's review;
- the task in development;
- a new task or story.
When news arrives for a task that was put aside, go back to it: the task in hand is parked as pr-answer describes, and resumed afterwards.
Asking before acting
- Ask before every pipeline or job run, merge, and force-push, each time.
- Ask before cancelling any run. Look at its timeline first (approvals, stages already done): a run that was already approved is expensive to restart.
- Ask before writing to a shared tool (the board, the wiki, a chat channel), except the board changes a skill names as part of a step the user already agreed to. Report every board change you make.
- A question is not a request to implement. When the user asks "what if" or "how would", answer and discuss; change code only when asked to.
- Before running an experiment that costs money or changes shared data, say what it will cost and what it will touch.
- At the end of a task, suggest a one-line commit message. Do not commit.
Evidence
- Do not assume: check the live system or the code, and say where each fact came from (checked now, or remembered from earlier).
- A cause is a hypothesis until it is reproduced. Present it as one.
- Numbers (costs, timings, counts) come with their source and how they were derived.
- When describing a plan, separate what exists today from what is proposed. Never present an example name or a proposal as something that already exists.
- Search thoroughly before saying something does not exist.
Scope and decisions
- Stay inside the requested scope. Flag an extra you think is worth doing; do not build it unasked. Unrelated ideas become separate stories.
- One task, one branch, one pull request.
- When there is a choice to make, give labelled options (A, B, C) with your recommendation and what each can break.
- Follow the pattern the codebase already uses, and the way the teammate who owns that part does it.
- Prefer a check that needs no deploy over one that does.
Code and documents
- No ticket numbers, story numbers, PR numbers or people's names in code, comments or documentation. Refer to roles and decisions instead.
- No names, e-mail addresses or business values as fallbacks in code. Missing configuration is an error.
- Use the real technical terms; do not invent simpler names for them.
Branches and merges
- No worktrees. Feature branches derive from the latest base branch and are merged with the method
project.mdsets (squash unless it says otherwise). - Set and verify the upstream the first time a branch is pushed.
- After a squash merge, delete the feature branch, remote and local. Keep release branches and shared integration branches.
- Before a force-push or a branch rebuild, show that nothing is lost and keep a backup ref.
- Review other people's changes read-only:
git fetchandgit show <ref>:<path>, never a checkout of their branch.
Reviews
- Use
self-reviewfor your own change before it becomes a pull request,pr-reviewfor a pull request nobody has reviewed yet, andpr-recheckwhen its author has answered a review. They use theatlas(with context) andspock(without context) reviewers; a small pull request may be read directly. - Any code change after a review restarts the tests and both reviews. The review must cover the final diff.
- Before proposing a review comment, read what others already wrote on the pull request and drop any point already raised, even if worded differently.
- Review subagents write and delete probe files only in their own scratchpad subfolder, never anywhere else.
- The whole team is one team. Write review comments and requests to teammates as a colleague, never as us-versus-them.
Writing for other people
- Short, always. Pull request descriptions say what was done and the test results. Replies to review comments are one or two sentences.
- Deliver anything meant to be pasted elsewhere (a PR description, a story, a message) as raw markdown inside a code fence, not rendered.
- Messages for a chat tool are plain text: no emojis, no markdown, no backticks. Humble, no blame, and non-technical when the reader is a manager.
- Reports for a client state facts only, and are written as the first and only version.
- Do not present work as complete while another person's part is pending.
Housekeeping
- Stop probes, background runs and local servers when the task is done.
- Remove test data left in shared environments, and say what was left behind if any.
- When a login expires, give the user the complete command to sign in again.
- End each update with what is needed from the user, including approvals still waiting.
Language
- Talk to the user in the chat language set in
.claude/project.md(for example Portuguese (Brazil)). - Everything written for other people or kept in the repository is in the language
project.mdsets for artifacts, English unless it says otherwise: code, comments, commit messages, pull requests, review comments, messages, stories and documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

