Files
noteflow/.claude/hooks/hookify.warn-baselines-edit-bash.local.md
Travis Vasceannie 1ce24cdf7b feat: reorganize Claude hooks and add RAG documentation structure with error handling policies
- Moved all hookify configuration files from `.claude/` to `.claude/hooks/` subdirectory for better organization
- Added four new blocking hooks to prevent common error handling anti-patterns:
  - `block-broad-exception-handler`: Prevents catching generic `Exception` with only logging
  - `block-datetime-now-fallback`: Blocks returning `datetime.now()` as fallback on parse failures to prevent data corruption
  - `block-default
2026-01-15 15:58:06 +00:00

1.4 KiB

name, enabled, event, action, pattern
name enabled event action pattern
warn-baselines-edit-bash true bash warn (sed|awk|echo|cat|tee|>|>>|cp|mv).*tests/quality/baselines.json

⚠️ Warning: Editing Quality Baselines via Bash

You are about to modify tests/quality/baselines.json using a bash command.

Before You Run This Command

Ask yourself: Am I lowering baselines because I fixed the root cause, or because I want to bypass the quality check?

Legitimate Reasons to Edit

  • You fixed violations in source code and baselines now need updating to reflect lower counts
  • You added new checks and need to establish initial baselines
  • A false positive was identified and documented

Signs You Should Write Better Tests Instead

  • Editing baselines to make a failing test pass without fixing the underlying code
  • Increasing violation counts to "allow" more issues
  • Avoiding the effort of fixing actual code quality problems

What You Should Do Instead

  1. Run /test-extender to write better tests that satisfy the quality gates
  2. Fix the actual violations in source code (the quality checks exist for a reason)
  3. Only then update baselines.json to reflect the improved state

Remember

The quality gate exists to maintain code health. Editing baselines to bypass checks is cheating the system and will accumulate technical debt.

If you proceed, be prepared to justify why this baseline change is legitimate.