Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ backend in `src-tauri/`.
- `.coderabbit.yaml` — the maintainer's machine-readable review ruleset. It is
the codified answer to questions this file does not cover: settings-store
field invariants, serde/TS boundary rules, and what makes a test worth having.
- `docs/notes/` — design rationale moved out of the code. `//` "why" comments
migrate there (one entry per decision, `Fonte:` file + symbol, pointer left
behind as `// Nota: docs/notes/<area>.md#<anchor>`); directives, Rustdoc,
`/** */` API blocks, and test comments stay in place.
- `docs/notes/` — **all** design rationale lives here, no exceptions. Prose
comments are forbidden in code (`//`, `/* */`, `/** */`, `///`): migrate each
one to an entry (anchor `<a id="..."></a>`, `Fonte:` file + symbol) and leave
only `// Nota: docs/notes/<area>.md#<anchor>` behind. Only machine directives
(`@ts-*`, `eslint-disable`, `#[allow/cfg/derive]`, `#[tauri::command]`),
shebangs, and license headers may appear as comments. Enforced by review,
not by a test: `scripts/notes-anchors.test.mjs` checks that every pointer
resolves to a real anchor, not that prose is absent.

## Commands

Expand Down
9 changes: 9 additions & 0 deletions RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,12 @@ packaging is touched).
(memoized rows, rAF-throttled previews, `content-visibility` discipline).
- Prefer silence-free failure modes: surface a hint instead of dropping
user actions quietly.

## Code has no prose comments

Design rationale lives in `docs/notes/`, never in comments. New `//`,
`/* */`, `/** */` or `///` prose in any PR is a review failure. The rule is
enforced by review: `scripts/notes-anchors.test.mjs` only checks that every
pointer resolves to a real anchor, so it will not catch the prose for you.
Only machine directives, `// Nota: docs/notes/<area>.md#<anchor>` pointers,
shebangs and license headers may appear as comments.
Loading