Skip to content

chore(claude): run complexity-hints from this repo's own agent hook - #62

Merged
afterimaginary merged 1 commit into
mainfrom
chore/dogfood-hook
Oct 26, 2026
Merged

afterimaginary merged 1 commit into
mainfrom
chore/dogfood-hook

Conversation

@afterimaginary

Copy link
Copy Markdown
Owner

Summary

This repository now runs its own checker the way the README tells users to. A PostToolUse hook on Edit, Write and Bash runs src/checker/cli.ts --claude-code-hook from source, so when a change is responsible for an over-max function, the agent working here is blocked.

Changes

  • .claude/settings.json gets a second PostToolUse group alongside the existing format-and-lint hook. It runs the checker with node straight from source, through Node's type stripping, the same way the lint config loads the plugin from src/.
  • A CLAUDE.md project note records the new hook.

Verification

  • A Bash call that changed no files exits 0.
  • An Edit of an unchanged src/hint.ts exits 0.
  • A Write of a new file with a function scoring 37 exits 2 and prints the diagnostic with its fix hint.
  • Pre-push vp run ready passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@afterimaginary
afterimaginary marked this pull request as ready for review October 26, 2026 18:48
@afterimaginary
afterimaginary merged commit 28c7d1a into main Oct 26, 2026
1 check passed
@afterimaginary
afterimaginary deleted the chore/dogfood-hook branch October 26, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant