Extracted from CLAUDE.md. This is the reference for engineering preferences, code review process, and verification model.
- DRY is important — flag repetition aggressively
- Well-tested code is non-negotiable — too many tests > too few
- "Engineered enough" — not under-engineered (fragile, hacky) and not over-engineered (premature abstraction, unnecessary complexity)
- Handle edge cases — err on the side of more, not fewer; thoughtfulness > speed
- Explicit over clever — bias toward readable, obvious code
For significant changes, work through each stage:
- Overall system design and component boundaries
- Dependency graph and coupling concerns
- Data flow patterns and potential bottlenecks
- Scaling characteristics and single points of failure
- Security architecture (auth, data access, API boundaries)
- Code organization and module structure
- DRY violations — be aggressive here
- Error handling patterns and missing edge cases (call these out explicitly)
- Technical debt hotspots
- Areas that are over-engineered or under-engineered
- Test coverage gaps (unit, integration, e2e)
- Test quality and assertion strength
- Missing edge case coverage — be thorough
- Untested failure modes and error paths
- N+1 queries and database access patterns
- Memory-usage concerns
- Caching opportunities
- Slow or high-complexity code paths
- Describe the problem concretely — with file and line references
- Present 2-3 options — including "do nothing" where reasonable
- For each option specify: implementation effort, risk, impact on other code, maintenance burden
- Give recommended option and why — mapped to engineering preferences above
- Ask for direction — explicitly ask whether to proceed or choose differently
- Do not assume priorities on timeline or scale
- After each section, pause and ask for feedback before moving on
- NUMBER issues (1, 2, 3) and use LETTERS for options (A, B, C)
- Make the recommended option always the 1st option
- BIG CHANGE: Work through interactively, one section at a time with at most 4 top issues per section
- SMALL CHANGE: Work through interactively ONE question per review section
| Tier | When | What | How |
|---|---|---|---|
| Micro | After each file edit | Lint, format, type errors | ReadLints after edits |
| Macro | Before declaring "done" | Tests pass, requirements met | Run tests, verify acceptance criteria |
| Meta | Before task breakdown | Assumptions validated | /explore-codebase before /breakdown-design |
- Run
ReadLintson edited files to catch errors immediately - Fix any errors you introduced (don't leave them for the user)
- Verify the change compiles/runs if possible
- Re-read the acceptance criteria from the task/ticket
- Verify each criterion is actually met (don't assume)
- Run relevant tests if specified
- Check that you didn't break existing functionality
- Verify design doc claims against codebase (don't trust "Not Implemented" labels)
- Confirm file paths exist before editing them
- Check that dependencies are in place before building on them
Before documenting file paths in validation sections, test commands, BATCH_EXECUTION_PLAN.md, or MERGE_POINTS.md:
# Use glob to verify test file paths
ls [service]/tests/[module]/test_*.py
# Use find for fuzzy matching if unsure of exact name
find . -name "*vault*" -path "*/tests/*" -name "*.py"
# Check openapi.json for endpoint paths
curl -s http://localhost:8000/openapi.json | jq '.paths | keys'Prefer glob patterns over specific file names when possible:
# Good - works even if file names change
pytest tests/backends/ -v
# Risky - fails if file is named differently
pytest tests/backends/test_notion_api.py -v| Phase | Question | If "No" |
|---|---|---|
| Planning | "Did I verify this component doesn't already exist?" | Run /explore-codebase |
| Implementation | "Did I run lints after my edits?" | Run ReadLints |
| Implementation | "Did I test this change?" | Run relevant tests |
| Completion | "Does my change actually meet the acceptance criteria?" | Re-read and verify |
| Completion | "Did I introduce any regressions?" | Run make check-all |
| Bad | Good |
|---|---|
| Edit file → Move on | Edit file → ReadLints → Fix errors → Move on |
| "I implemented the feature" | "I implemented the feature and verified: [list of checks]" |
| Trust design doc claims | Verify claims against actual codebase |
| Assume tests will pass | Run tests before declaring done |
| "This should work" | "I verified this works by [specific test]" |
# After modifying Python files
ruff check [modified_file.py]
python -c "import [module]" # Verify imports work
# After modifying tests
pytest [test_file.py] -v
# After modifying demos/scripts
python [script.py] --help # Verify it runs
echo "Exit code: $?" # Must be 0
# Full quality check before completion
make check-all