codeflash/.claude/rules/debugging.md
Kevin Turcios e4b1fb854b chore: rebuild .claude config from scratch
Delete all existing .claude/ tracked files and recreate from scratch,
adapting patterns from codeflash-agent.

Hooks (6, up from 1):
- bash-guard: blocks grep/find/cat in Bash, redirects to dedicated tools
- require-read + track-read: enforces Read-before-Write/Edit
- post-compact: injects git state + project conventions into compaction
- post-edit-lint: runs prek on edited Python files (kept)
- status-line: shows user, area, branch, dirty state

Rules (10, up from 8):
- New: sessions, debugging, github (from codeflash-agent)
- Rewrote: code-style (absorbed source-code), git (added sizing/hygiene)
- Removed: source-code (folded into code-style)

Settings: permissions allowlist, attribution, includeCoAuthoredBy, full
hook wiring, status line, enableAllProjectMcpServers.

.gitignore: whitelist .claude/skills/ for tracking.
2026-04-23 04:31:04 -05:00

798 B

Debugging

Root cause first

When encountering a bug, investigate the root cause. Don't patch symptoms. If you're about to add a try/except, a fallback default, or a defensive check — ask whether the real fix is upstream.

Isolated testing

Prefer running individual test functions over full suites. Only run the full suite when explicitly asked or before pushing.

  • Single function: uv run pytest tests/test_foo.py::TestBar::test_baz -v
  • Single module: uv run pytest tests/test_foo.py -v
  • Full suite: only when asked, or before git push

When debugging a specific endpoint or integration, test it directly instead of running the entire pipeline end-to-end.

Subprocess failures

When a subprocess fails, always log stdout and stderr. "Exit code 1" with no output is useless.