refactor: both tools import the same fragments; scope code comments by path

Codex reads ~/.codex/AGENTS.md, not ~/.agents/AGENTS.md, so the file
generated there last commit was inert. Both tools support @path imports,
which removes the generate-and-drift step entirely.

code-comments.md moves to ~/.claude/rules/ with paths frontmatter, so its
24 lines load only when a source file is read.
This commit is contained in:
naps62
2026-08-01 14:08:44 +00:00
parent 36372f85b2
commit ccfb5192f8
6 changed files with 44 additions and 42 deletions
-20
View File
@@ -81,26 +81,6 @@ Commits: Conventional Commits, subject ≤50 chars, body only when the
"why" is not obvious. Review comments: one line per finding — location,
problem, fix.
### Code comments
Budget: 1-3 lines. Write one only when an agent with the repo and thirty
seconds of grep would still get it wrong. That means one of:
- a landmine no test catches
- a fact not in the repo (deployed bytecode, chain quirk, library bug)
- a unit or epoch the type cannot carry (wei, ms, 18-dp)
- a MUST or MUST NOT a caller can break
Good:
> `// MUST read lastGoodPrice before fetchPrice — same eth_call state.`
Everything else: delete. Design rationale and rejected alternatives go in
`docs/`; leave a path. History is in git. No emphasis; ALL-CAPS only for
MUST / NEVER.
Deleting a comment is cheap and reversible. When unsure, delete.
### Where this does not apply
Security warnings, irreversible-action confirmations, and legal or