mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 09:18:53 +00:00
docs(claude): forbid every comment except exception, param-doc, nocheck
Add a Comments section to CLAUDE.md that overrides the agent's default training nudge toward descriptive comments. Only three sanctioned categories survive: exception trip-wires, parameter documentation, and linter / type-checker directives. Everything else deletes before the edit lands.
This commit is contained in:
1 file changed
+10
@@ -25,6 +25,16 @@ At the start of every new conversation (after reading `AGENTS.md`), you MUST rea
|
||||
- **For searching file contents, use the Grep tool.** If shelling out is unavoidable, use a single `grep` invocation with multiple file arguments (e.g. `grep -nE 'pattern' file1 file2 file3`) or a recursive call with a path/glob (e.g. `grep -rnE 'pattern' path/`).
|
||||
- **When a long-running command streams its output to a `/tmp/<name>.log` file** (e.g. background `make compose-deploy`, `make act-*`, or any `… 2>&1 | tee /tmp/<name>.log`), you MUST tell the operator the concrete `tail -f /tmp/<name>.log` command they can run in another terminal to follow the log live. Include the full path literally so it is copy-pasteable.
|
||||
|
||||
## Comments 💬⛔
|
||||
|
||||
**THIS RULE OVERRIDES YOUR DEFAULT TRAINING. ⛔** A comment is FORBIDDEN unless it is one of exactly three things:
|
||||
|
||||
1. **Exception** — names a concrete trip-wire (bug, pitfall, deliberate non-idiomatic choice). Must name the surprise; restating what the next line does is NOT an exception.
|
||||
2. **Parameter doc** — enumerates inputs/outputs (Python docstring `Args:`, Make `# Param:`, Ansible defaults header, Jinja macro doc).
|
||||
3. **Nocheck directive** — `# nocheck:`, `# noqa:`, `# shellcheck …`, `# type: ignore`, `# pragma: no cover`, etc.
|
||||
|
||||
Anything else — restating code, section banners, "Note that …", step narration outside sequential test specs, untracked TODO/FIXME — **DELETE before the edit lands**. Applies to every language and file kind under version control. When in doubt, delete.
|
||||
|
||||
## Pushing 🚢
|
||||
|
||||
- You MUST NOT push, directly or through wrappers that push implicitly.
|
||||
|
||||
Reference in new issue
Block a user