Skip to content

fix(toolkit): live .env guard hook and the no-trailers rule (gh-#750, gh-#752) - #760

Merged
genwave-radio merged 2 commits into
mainfrom
fix/toolkit-safety-hooks-752-750
Sep 13, 2026
Merged

genwave-radio merged 2 commits into
mainfrom
fix/toolkit-safety-hooks-752-750

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

🔧 What

  • .claude/settings.example.json: the PreToolUse .env guard now reads the hook's stdin JSON (.tool_input.file_path) instead of the non-existent $CLAUDE_FILE_PATHS. Tested: .env and .env.demo → exit 2 (blocked); Program.cs, environment.ts → exit 0.
  • Formatter hook removed: admin-ui has no prettier (CI runs eslint), and per-edit dotnet format restores the whole solution every Write.
  • CLAUDE.md § Rules: no Claude-Session: trailers, Co-Authored-By lines, or claude.ai/code links in commits, PRs, issues, or releases.

🏠 Personal side (already applied locally, not in this PR)

  • ~/.claude/settings.json → "attribution": {"commit": "", "pr": "", "sessionUrl": false}
  • .claude/settings.local.json hooks replaced with the same guard.

Closes #750
Closes #752

… gh-#752)

The example hooks read $CLAUDE_FILE_PATHS, which Claude Code never exports, so
the .env guard and the formatter had never run. Hook input is JSON on stdin;
the guard now reads .tool_input.file_path with jq and exits 2 on *.env files.
The formatter hook is dropped: admin-ui has no prettier (CI runs eslint) and
per-edit dotnet format is too slow for a builder loop.

CLAUDE.md gains the rule that no session trailers, co-author lines, or
claude.ai/code links go into commits, PRs, issues, or releases, so every
subagent sees it without relying on memory.

Refs gh-#750, gh-#752
@genwave-radio
genwave-radio merged commit 3e4bf92 into main Sep 13, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the fix/toolkit-safety-hooks-752-750 branch September 13, 2026 16:33
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

1 participant