Files
noteflow/.claude/hookify.block-tests-quality-bash.local.md

1.4 KiB

name, enabled, event, action, pattern
name enabled event action pattern
block-tests-quality-bash true bash block (rm|mv|cp|sed|awk|chmod|chown|touch|mkdir|rmdir|truncate|tee|>|>>)\s.*tests/quality/(?!baselines.json)

BLOCKED: Protected Directory (Bash)

Bash commands that modify files in tests/quality/ are not allowed.

Why This Is Blocked

  • The tests/quality/ directory contains protected test infrastructure
  • Commands like rm, mv, cp, sed, echo >, etc. targeting this directory are prohibited
  • The user has explicitly requested that agents may view but never modify these files

What You Should Do Instead

  1. Use the test-extender skill: Run /test-extender to write better tests that pass the existing quality gates
  2. Update baselines.json: If the test-extender skill cannot resolve the issue, update tests/quality/baselines.json to adjust the baseline (this file IS editable)
  3. Report to user: Only if neither approach works, explain the issue and wait for explicit approval

Allowed Operations

  • cat tests/quality/* - viewing file contents
  • ls tests/quality/ - listing files
  • pytest tests/quality/ - running the tests

Blocked Operations

  • Any command that would create, modify, or delete files in this directory
  • Redirecting output to files in this directory (except baselines.json)
  • Moving or copying files into this directory

This rule cannot be bypassed.