agentleFS
jonathascostajonathascosta/claude-code-workflow/.claude/CLAUDE.md

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…

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
  1. Distinctive:

    Continue on your own between approval points: When a step of the loop is finished, start the next one without being asked and without …

    line 21
  2. Distinctive:

    Work already in flight comes before new work: When several things could be done, the order is:

    line 45
  3. Very specific:

    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.

    line 54
  4. Distinctive:

    Ask before every pipeline or job run, merge, and force-push, each time.

    line 58
  5. Distinctive:

    Ask before cancelling any run.

    line 59
  6. Distinctive:

    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 …

    line 60
  7. Distinctive:

    Before running an experiment that costs money or changes shared data, say what it will cost and what it will touch.

    line 62
  8. Distinctive:

    Do not assume: check the live system or the code, and say where each fact came from (checked now, or remembered from earlier).

    line 67
  9. Distinctive:

    When describing a plan, separate what exists today from what is proposed.

    line 70
  10. Distinctive:

    Search thoroughly before saying something does not exist.

    line 71
  11. Distinctive:

    When there is a choice to make, give labelled options (A, B, C) with your recommendation and what each can break.

    line 77
  12. Distinctive:

    Follow the pattern the codebase already uses, and the way the teammate who owns that part does it.

    line 78
  13. Distinctive:

    Prefer a check that needs no deploy over one that does.

    line 79
  14. Distinctive:

    No ticket numbers, story numbers, PR numbers or people's names in code, comments or documentation.

    line 83
  15. Distinctive:

    No names, e-mail addresses or business values as fallbacks in code.

    line 84
  16. Distinctive:

    Use the real technical terms.

    line 85
  17. Very specific:

    No worktrees. Feature branches derive from the latest base branch and are merged with the method project.md sets (squash unless it says …

    line 89
  18. Distinctive:

    After a squash merge, delete the feature branch, remote and local.

    line 91
  19. Distinctive:

    Before a force-push or a branch rebuild, show that nothing is lost and keep a backup ref.

    line 92
  20. Distinctive:

    Before proposing a review comment, read what others already wrote on the pull request and drop any point already raised, even if worded …

    line 99
  21. Distinctive:

    Do not present work as complete while another person's part is pending.

    line 109
  22. Distinctive:

    Stop probes, background runs and local servers when the task is done.

    line 113
  23. Distinctive:

    Remove test data left in shared environments, and say what was left behind if any.

    line 114
  24. Distinctive:

    When a login expires, give the user the complete command to sign in again.

    line 115

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 doneGo on to
The plan of story-start is approveddevelopment
The code is written and its tests passself-review
A review round is cleanpr-open, which stops at its first approval point
The pull request is openpr-watch
The watcher reports a reviewpr-answer, which analyses at once and stops at its first approval point
The watcher reports the last approvalrelease, which stops at the merge question
A deploy stage finishesthe tests in that environment, then the next gate's approval request
The task is closedstory-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.md is 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:

  1. remind the user of what is waiting for their approval;
  2. answer reviewers on our own pull requests, while their working day lasts;
  3. the next release step that is ready: an approval request, the tests after a deploy, a promotion;
  4. a teammate's pull request waiting for the user's review;
  5. the task in development;
  6. 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.md sets (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 fetch and git show <ref>:<path>, never a checkout of their branch.

Reviews

  • Use self-review for your own change before it becomes a pull request, pr-review for a pull request nobody has reviewed yet, and pr-recheck when its author has answered a review. They use the atlas (with context) and spock (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.md sets for artifacts, English unless it says otherwise: code, comments, commit messages, pull requests, review comments, messages, stories and documentation.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.