Skip to content

Add hooks, agents, rules, and gitignore cleanup#339

Merged
philoserf merged 5 commits intomainfrom
feat/hooks-agents-config
Mar 25, 2026
Merged

Add hooks, agents, rules, and gitignore cleanup#339
philoserf merged 5 commits intomainfrom
feat/hooks-agents-config

Conversation

@philoserf
Copy link
Copy Markdown
Owner

@philoserf philoserf commented Mar 25, 2026

Summary

  • gitignore: Reorganize into logical sections, add .ruff_cache/, session-data/, session-aliases.json, metrics/
  • hooks: Add config-protection (warns on linter config edits) and suggest-compact (nudges /compact every 30 tool calls); wire into settings.json along with log-event for new lifecycle events
  • agents: Rewrite code-reviewer with severity tiers and confidence filtering; add loop-operator for autonomous loop safety
  • rules: Add research-first rule (research before recommending libraries/tools)

Test plan

  • Verify config-protection hook fires a warning when editing biome.json or similar
  • Verify suggest-compact counter resets on session start and nudges at 30 calls
  • Verify code-reviewer agent produces severity-tiered output
  • Verify research-first rule loads in new sessions

🤖 Generated with Claude Code

philoserf and others added 5 commits March 25, 2026 14:39
Reorganize into four logical sections (runtime state, caches, logs/telemetry,
user config) with entries alphabetized. Add .ruff_cache/, session-data/,
session-aliases.json, and metrics/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
config-protection.sh: PreToolUse guard that warns when editing
linter/formatter configs (exit 0, advisory only).

suggest-compact.sh: PostToolUse counter that nudges /compact every
30 tool calls, with SessionStart reset.

Wire both hooks into settings.json. Also add log-event to Setup,
CwdChanged, and FileChanged lifecycle events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
code-reviewer: replace flat checklist with confidence-based filtering
(>80% threshold), severity tiers (critical/high/medium/low),
language-specific checks, and AI-generated code detection.

loop-operator: new agent that monitors autonomous loops for stalls,
repeated failures, and scope creep with structured escalation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Operationalizes "never invent technical details" — requires checking
GitHub, official docs, and package registries before writing new code
or recommending libraries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standardize indentation from tabs to 2-space across all hook scripts.
Also fix SC2012 in suggest-compact.sh (use find instead of ls).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@philoserf philoserf merged commit 68c0128 into main Mar 25, 2026
1 check passed
@philoserf philoserf deleted the feat/hooks-agents-config branch March 25, 2026 18:57
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