skills/lenses/bloat.md
dan fb15000877 refactor: restructure for cross-repo deployment
- Rename reviews/ to lenses/ (clearer terminology)
- Add workflows/ for beads proto templates
- Extract code-review proto to workflows/molecules.jsonl
- Update ai-skills.nix module:
  - Add enableLenses option (deploys to ~/.config/lenses/)
  - Add enableWorkflows option (deploys to ~/.beads/molecules.jsonl)
  - Derive repoRoot from skillsPath for sibling directories
- Update lens paths in proto to use deployed location

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 01:18:19 -05:00

1 KiB

Bloat Review Lens

Review the provided code for size and complexity bloat.

What to Look For

File-Level

  • Files over 300 lines (warning) or 500 lines (critical)
  • Files with multiple unrelated responsibilities (SRP violations)
  • God objects or god modules that do too much

Function-Level

  • Functions over 50 lines
  • Functions with more than 5 parameters
  • Functions that could be split into smaller, named steps

Complexity

  • Cyclomatic complexity hotspots (many branches/loops)
  • Deeply nested logic (3+ levels of indentation)
  • Long method chains that obscure intent

Output Format

For each finding:

[BLOAT] <severity:HIGH|MED|LOW> <file:line>
Issue: <what's bloated>
Why: <why this is a problem>
Suggest: <concrete action - split into X, extract Y, etc.>

Guidelines

  • Be specific about line counts and locations
  • Prioritize by impact (high-traffic code > rarely-used)
  • Don't flag intentionally comprehensive files (test fixtures, generated code)
  • Focus on actionable splits, not just complaints