writing.md: add the code comments rule #63

Merged
vnprc merged 3 commits from agent/code-comments-rule into master 2026-09-22 13:30:30 +01:00
Member

writing.md gains a short "Code comments" section, and nix.md gains the long form of one trap the comment-cutting PRs cite by pointer: a comment in code is a contract, a trap, or a pointer, and everything else moves out or is deleted. Nothing changes for any running machine; this is a memory rule that the comment-cutting PRs in allod/archetypes cite and that outlives them. What proves it is the diff itself, ten lines of prose, and the tracked memory-budget hook passing. If it is wrong, revert the one commit.

What changed

  • nix.md: a new entry, "An agenix ciphertext argument is a path, never a string", the reasoning that nix/builders/dev.nix now cites as (nix.md) instead of carrying inline.

  • A new ## Code comments section in writing.md, placed before "Where this applies", stating the three kinds of comment that survive and five rules: name the thing, never its position; one paragraph per binding; an enforceable "don't" becomes the check (architecture.md principle 14); the test for a block is whether a good reader would plausibly make a wrong edit without it; no trap is lost when comments are cut.

  • The section is the rule allod/archetypes#101 asks for, so it opens first and that issue's PRs cite it.

Risk

R0. Prose only; the memory budget hook (.hooks/memory-budget --worktree) passes, writing.md is 3.9 KB and nix.md 18.3 KB against a 24 KB cap.

Validation

  • .hooks/memory-budget --worktree: exit 0.

Refs allod/archetypes#101

`writing.md` gains a short "Code comments" section, and `nix.md` gains the long form of one trap the comment-cutting PRs cite by pointer: a comment in code is a contract, a trap, or a pointer, and everything else moves out or is deleted. Nothing changes for any running machine; this is a memory rule that the comment-cutting PRs in allod/archetypes cite and that outlives them. What proves it is the diff itself, ten lines of prose, and the tracked memory-budget hook passing. If it is wrong, revert the one commit. ## What changed - `nix.md`: a new entry, "An agenix ciphertext argument is a path, never a string", the reasoning that `nix/builders/dev.nix` now cites as `(nix.md)` instead of carrying inline. - A new `## Code comments` section in `writing.md`, placed before "Where this applies", stating the three kinds of comment that survive and five rules: name the thing, never its position; one paragraph per binding; an enforceable "don't" becomes the check (`architecture.md` principle 14); the test for a block is whether a good reader would plausibly make a wrong edit without it; no trap is lost when comments are cut. - The section is the rule allod/archetypes#101 asks for, so it opens first and that issue's PRs cite it. ## Risk R0. Prose only; the memory budget hook (`.hooks/memory-budget --worktree`) passes, `writing.md` is 3.9 KB and `nix.md` 18.3 KB against a 24 KB cap. ## Validation - `.hooks/memory-budget --worktree`: exit 0. Refs allod/archetypes#101
A comment is a contract, a trap, or a pointer; everything else moves out or goes. Names, never positions; one paragraph per binding; an enforceable don't becomes the check; no trap is lost.

Refs allod/archetypes#101
The long form of the trap that nix/builders/dev.nix now cites by pointer.

Refs allod/archetypes#101
vnprc approved these changes 2026-09-22 13:30:24 +01:00
vnprc merged commit 9c41ce8965 into master 2026-09-22 13:30:30 +01:00
vnprc deleted branch agent/code-comments-rule 2026-09-22 13:30:30 +01:00
Sign in to join this conversation.
No description provided.