Commit Graph
16 Commits
Author SHA1 Message Date
Miguel PalhasandClaude Fable 5 d193df0403 fix(hooks): exported vars judged only by inherited value
ci / nix (pull_request) Successful in 9s
ci / lint (pull_request) Successful in 13s
Raw assignment can hide a short resolved secret or read as a
reference when the exported value is the real literal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 19:20:31 +01:00
Miguel PalhasandClaude Fable 5 e06cbe4217 fix(hooks): classify guard/warn from the resolved value
ci / nix (pull_request) Successful in 8s
ci / lint (pull_request) Successful in 11s
SECRET=$OTHER now guards the inherited value and warns from that
same value; a literal that is only a $-reference is never matched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 19:18:54 +01:00
Miguel PalhasandClaude Fable 5 3b9492f748 feat(hooks): daily warning for env values too short to guard
ci / nix (pull_request) Successful in 8s
ci / lint (pull_request) Successful in 10s
README now states the 6-char guarantee boundary instead of claiming
full coverage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 19:16:45 +01:00
Miguel PalhasandClaude Fable 5 717f8dc07e fix(hooks): floor back to 6 — shorter values are unguardable
ci / lint (pull_request) Successful in 10s
ci / nix (pull_request) Successful in 8s
The 4-char sandbox password matched standalone prose tokens twice
in live use. Matching cannot cover it; rotating it can.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 19:06:19 +01:00
Miguel PalhasandClaude Fable 5 4c8d95dbfd fix(hooks): guard covers short passwords and path-token URLs
ci / lint (pull_request) Successful in 10s
ci / nix (pull_request) Successful in 8s
URL skip now bare origins only; length floor drops to a sanity
minimum, with short values matched as standalone tokens so a 4-char
password doesn't block unrelated text (it did, in live testing).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 19:05:37 +01:00
Miguel PalhasandClaude Fable 5 8266a10a29 fix(hooks): secret-guard covers URLs-with-creds and $-values
ci / nix (pull_request) Successful in 8s
ci / lint (pull_request) Successful in 11s
Exact-name allowlist replaces shape-based skips; $-expansions
resolve from the inherited environment and the literal is scanned
too; only bare endpoints (no userinfo, no query) skip URL matching.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 19:02:29 +01:00
Miguel PalhasandClaude Fable 5 d04ac1bff3 feat(hooks): secret-guard blocks live secret values in tool args
ci / nix (pull_request) Successful in 9s
ci / lint (pull_request) Successful in 10s
Value-based: any ~/.env.claude value in Bash/Write/Edit args blocks
with the var name, never the value. Plus literal token shapes.
Serves Claude Code and Codex. Closes #1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 18:58:44 +01:00
naps62andClaude Opus 5 7cb03f8796 feat: ship the remaining hooks and aoe-register-remote
settings.json references git-autoupdate, tmux-attention, tmux-reset and
scripts/aoe-register-remote.py, but they only existed as untracked files
on one machine, so hooks failed everywhere else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:56:44 +00:00
naps62 60f39cdcbb feat: track both entry files in the repo
~/.claude/CLAUDE.md was in no git repo despite heavy editing, and
~/.codex/AGENTS.md was a hand-synced duplicate of it. Both now live in
entry/ and import the shared fragments; RTK.md moves to claude-md/ so
Codex stops carrying its own copy.

Claude's imports are ~/-anchored so they resolve through the symlink.

Also drops kt from the comment rule scope.
2026-08-01 15:02:28 +00:00
naps62 2f7f512cec fix: exempt doc comments from the code-comment budget
Rustdoc, JSDoc, NatSpec and docstrings document a surface for callers and
are read by tooling — NatSpec ends up in contract metadata. The rule read
as an instruction to delete them, and the linter blocked a legitimate
rustdoc block.

Also: plain block comment bodies were never linted (no per-line marker),
and a literal double-star in a code span was flagged as bold.

Merges the landmine and MUST categories, which said the same thing.
2026-08-01 14:16:48 +00:00
naps62 aacbdc2c43 chore: drop c and h from the comment rule scope 2026-08-01 14:12:43 +00:00
naps62 652b5abceb chore: drop unused languages from the comment rule scope
scala, java, cc, cpp, hpp, swift, php, cs.
2026-08-01 14:12:01 +00:00
naps62 b8d442386b feat: scope the comment rule to yaml, yml, and toml too
Adds them to both the paths glob and the linter's extension set, which
had also drifted apart on scala.
2026-08-01 14:11:08 +00:00
naps62 ccfb5192f8 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.
2026-08-01 14:08:44 +00:00
naps62 a1f95a1161 feat: one writing contract for Claude Code and Codex
Replaces public-comms.md and code-comments.md (749 words, ~25 rules,
almost all prohibitions, no examples) with a single writing.md that
leads with worked examples.

The rule is selection, not compression: keep output short by cutting
whole ideas that don't change what the reader does next, then write what
survives as plain sentences. Not by dropping articles or writing
fragments, which Anthropic's Fable 5 guide calls out as the wrong lever.
Prompt style leaks into output style, so the file is written in the
voice it asks for.

Drops the BLUF ask-line rule entirely: everyone on a PR already knows
who reviews and who merges, and read literally it produced openers like
"Ask: reviewers please merge".

Links the contract to ~/.agents/AGENTS.md, which Codex had nothing in at
all, and to the nix module for the NixOS machine.
2026-08-01 13:06:38 +00:00
naps62andClaude Opus 5 08195c1cd4 feat(hooks): track writing contracts + linters in repo
comms-lint.py and comment-lint.py lived only in ~/.claude, which is not
a git repo. Contract prose lived in ~/.claude/CLAUDE.md. Neither survived
a machine rebuild.

Prose moves to claude-md/ fragments, imported via @name.md. Linters move
to hooks/. link.sh and home.nix distribute both. settings.json wiring
stays manual — it holds machine-local MCP/statusline config this repo
must not own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaGR6ERGCfzWTtuv2rebGe
2026-07-27 14:34:29 +00:00