<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rulesets/hooks, branch main</title>
<subtitle>Claude Code skills, rules, and language bundles
</subtitle>
<id>https://git.cjennings.net/rulesets/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/rulesets/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/'/>
<updated>2026-04-19T22:39:33+00:00</updated>
<entry>
<title>feat(hooks+skills): destructive-bash confirm + architecture suite + problem-solving routing</title>
<updated>2026-04-19T22:39:33+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-19T22:39:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=560c29ade19be74968d8fec26d469913d383f2e8'/>
<id>urn:sha1:560c29ade19be74968d8fec26d469913d383f2e8</id>
<content type='text'>
Three improvements bundled together:

1. New hook — `destructive-bash-confirm.py` (PreToolUse/Bash):
   Gates `git push --force`, `git reset --hard`, `git clean -f`,
   `git branch -D`, and `rm -rf` behind a confirmation modal with the
   command, local context (branch, uncommitted counts, targeted paths),
   and a severity banner. Elevates severity when force-pushing protected
   branches (main/master/develop/release/prod) or when rm -rf targets
   root, home, or wildcard paths. Reuses _common.py.

2. Architecture suite rename — the "Part of the arch-* suite" footer in
   arch-design, arch-decide, arch-document, arch-evaluate descriptions
   now reads "Part of the architecture suite (arch-design / arch-decide
   / arch-document / arch-evaluate + c4-analyze / c4-diagram for
   notation-specific diagramming)." Matching footers added to c4-analyze
   and c4-diagram. c4-* keep their framework-specific prefix (C4 is a
   notation, arch-* is framework-agnostic workflow) but are now
   discoverable as suite members.

3. Problem-solving cluster routing — added YAML frontmatter with
   descriptions (including "Do NOT use for X (use Y)" clauses) to
   debug/SKILL.md and fix-issue/SKILL.md. Previously both had no
   frontmatter at all, which broke skill-router discovery. The four
   cluster members (debug, fix-issue, root-cause-trace, five-whys) now
   route unambiguously by description alone.
</content>
</entry>
<entry>
<title>feat(hooks): shared _common.py helpers + systemMessage AI-attribution warning</title>
<updated>2026-04-19T22:14:54+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-19T22:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=208a079f4230edd520f5aa92288ae48247340910'/>
<id>urn:sha1:208a079f4230edd520f5aa92288ae48247340910</id>
<content type='text'>
Consolidates stdin-parse and response-emit across the two confirm hooks
into `hooks/_common.py` (stdlib-only, sibling symlinked alongside the
hooks it serves). Net ~28 lines less duplication.

Adds a `systemMessage` banner alongside the confirmation modal when the
commit message or PR title/body contains AI-attribution patterns:

  - Co-Authored-By: Claude|Anthropic|GPT|AI trailers
  - 🤖 robot emoji
  - "Generated with Claude Code" / similar footers
  - "Created with …" / "Assisted by …" variants

Scanning targets structural leak patterns only — bare mentions of
"Claude" or "Anthropic" in diff context don't fire, so discussing the
tools themselves in a commit message doesn't false-positive.

Clean-room synthesis from GowayLee/cchooks (MIT) — specifically, the
systemMessage-alongside-reason pattern and event-aware stdin helpers.
</content>
</entry>
<entry>
<title>feat(hooks): add global hooks — PreCompact priorities + git/gh confirm modals</title>
<updated>2026-04-19T22:06:10+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-19T22:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=4957c60c9ee985628ad59344e593d20a18ca8fdb'/>
<id>urn:sha1:4957c60c9ee985628ad59344e593d20a18ca8fdb</id>
<content type='text'>
Three new machine-wide hooks installed via `make install-hooks`:

- `precompact-priorities.sh` (PreCompact) — injects a priority block into
  the compaction prompt so the generated summary retains information most
  expensive to reconstruct: unanswered questions, root causes with
  file:line, subagent findings as primary evidence, exact numbers/IDs,
  A-vs-B decisions, open TODOs, classified-data handling.

- `git-commit-confirm.py` (PreToolUse/Bash) — gates `git commit` behind a
  confirmation modal showing parsed message, staged files, diff stats,
  author. Parses both HEREDOC and `-m`/`--message` forms.

- `gh-pr-create-confirm.py` (PreToolUse/Bash) — gates `gh pr create`
  behind a modal showing title, base ← head, reviewers, labels,
  assignees, milestone, draft flag, body (HEREDOC or quoted).

Makefile: adds `install-hooks` / `uninstall-hooks` targets and extends
`list` with a Hooks section. Install prints the settings.json snippet
(in `hooks/settings-snippet.json`) to merge into `~/.claude/settings.json`.

Also: `languages/elisp/claude/hooks/validate-el.sh` now emits JSON with
`hookSpecificOutput.additionalContext` on failure (via new `fail_json()`
helper) so Claude sees a structured error in context, in addition to
the existing stderr output and exit 2.

Patterns synthesized clean-room from fcakyon/claude-codex-settings
(Apache-2.0). Each hook is original content.
</content>
</entry>
<entry>
<title>chore: remove non-functional hooks template</title>
<updated>2026-04-14T05:17:58+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-14T05:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=f8c593791ae051b07dba2606c18f1deb7589825e'/>
<id>urn:sha1:f8c593791ae051b07dba2606c18f1deb7589825e</id>
<content type='text'>
The hooks/settings.json template was broken since day one:
- PostEditTool is not a valid Claude hook event
- PreCommit is not a Claude concept at all
- matcher was used as a glob, not a tool-name regex
- $FILE was never substituted from stdin JSON

Hooks never fired. Formatting and secret-scanning belong in CI and
pre-commit frameworks, not per-developer Claude config. Remove the
template and its install-hooks Makefile target.
</content>
</entry>
<entry>
<title>Add hooks settings.json with install-hooks target</title>
<updated>2026-03-29T21:27:59+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-03-29T21:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/rulesets/commit/?id=f894e07ea3c39620e37245f1e1bf829e853bbe5b'/>
<id>urn:sha1:f894e07ea3c39620e37245f1e1bf829e853bbe5b</id>
<content type='text'>
Hooks provide:
- PostEditTool: ruff format/check on Python, terraform fmt on .tf
- PreCommit: block commits containing hardcoded secrets (AWS keys, API tokens, passwords)

Install per-project with: make install-hooks TARGET=/path/to/project
Won't overwrite existing settings.json — shows diff command instead.

Co-Authored-By: Claude Opus 4.6 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
