Skip to content

Commit a3330e5

Browse files
authored
[ENG-3666] Add comment and explanation guidance for agents (#163)
Adds a Comments and Explanations section to CLAUDE.md, matching saas and hub: no ticket IDs in the tree, comments describe the code that is there rather than the code that used to be, and explanations stay in plain language. This repo is public, so the section also says that nothing committed here may carry customer names, internal URLs or internal hostnames. No references needed removing — the tree was already clean.
1 parent 921c878 commit a3330e5

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎CLAUDE.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,29 @@ Invariants when touching it:
2323
- A new real-world refusal report becomes a persona in `field-test/personas/` so the regression stays covered.
2424
- The fixture installs the *published* package, so an unpublished `guide`/CLI change can't be exercised end-to-end — publish first, or accept the run validates only the prompt shape.
2525

26+
## Comments and Explanations
27+
28+
**Keep ticket references out of the code.** No `ENG-1234`, `LAB-567` or `Nightwatch #12`
29+
anywhere in the tree — not in comments, docblocks, test names, config files or strings.
30+
The ID goes in the PR title (`[ENG-1234] …`) and the PR description (`Closes ENG-1234`),
31+
and nowhere else. That is where someone looks for the backstory, and `git blame` takes them
32+
there from any line. In the code it is dead weight: it means nothing without Linear open,
33+
and nothing at all once the ticket is archived.
34+
35+
**Comments describe the code that is there, not the code that used to be.** Don't narrate
36+
the old behaviour, the bug, or how the fix was reasoned about — that is the PR's job. A
37+
comment earns its place by telling the reader something the code cannot: a non-local
38+
constraint, an invariant, why an unusual choice was made. If it restates the signature or
39+
the line below it, delete it.
40+
41+
**Explain things plainly.** In PR descriptions, review comments and replies: short
42+
sentences, ordinary words, no jargon where a plain word works. Lead with what changed and
43+
why it matters, then the detail. Assume the reader is capable but has not seen this code
44+
today.
45+
46+
This repo is public. Nothing committed here — code, comments, docs or commit messages — may
47+
contain customer names, internal URLs or internal hostnames.
48+
2649
## Releasing
2750

2851
The git tag is the source of truth (`gh release create vX.Y.Z`); `package.json`'s version is a placeholder. See `RELEASING.md`.

0 commit comments

Comments
 (0)