mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
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.
887 B
887 B
Code Style
- Line length: 120 characters
- Python: 3.9+ syntax
- Package management: Always use
uv, neverpip - Tooling: Ruff for linting/formatting, mypy strict mode, prek for pre-commit checks
- Comments: Minimal — only explain "why", not "what"
- Docstrings: Do not add docstrings unless the user explicitly asks
- Types: Match the type annotation style of surrounding code
- Naming: No leading underscores (
_function_name) — Python has no true private functions - Paths: Always use absolute paths
- Encoding: Always pass
encoding="utf-8"toopen(),read_text(),write_text()in new or changed code - Verification: Use
uv run prek— it handles ruff, ty, mypy in one pass. Don't run them separately - Code transforms: Use
libcstfor code modification/transformation.astis acceptable for read-only analysis