Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,34 @@ bin/coverage_check app/controllers/users_controller.rb
- **Priority files**: Controllers, services, models with business logic
- **Low coverage files**: Immediate attention required for < 80% coverage

### Code Quality Grading

**Jev Grader** (`bin/grade-code`) - scores source and spec files against the
house rules with Jev, one file per call. No mechanical checks: those are
CodeStandardsChecker, standardrb and `bin/lint`.

- **Usage**: `bin/grade-code [files or dirs]` - defaults to `app spec lib`
- **Single file**: prints the full per-check report; **2+ files**: worst-first
ranked table with the most-failed checks across the batch

```bash
bin/grade-code # whole source and test tree
bin/grade-code app/models --workers 6 # parallel sweep of a directory
bin/grade-code --kinds model,controller # only these kinds
bin/grade-code app/models/inspection.rb # one file in detail
bin/grade-code spec --limit 20 --csv tmp/grades.csv # first 20, written to CSV
bin/grade-code --list-checks # the rubric
```

- **What it scores**: idiomatic Rails, nice simple methods, short comments that
explain WHY with no history notes, plain technical English, no dead code or
defensive fallbacks, I18n for user-facing strings, semantic HTML, form
partial conventions, and for specs: not tautological, succinct names, happy
path plus edge cases
- **Needs** `OPENCODE_API_KEY` (or `/run/secrets/opencode_api_key`, or `.env`)
- **Cost**: ~80s for the whole 560-file tree at `--workers 6`; advisory only,
nothing is blocked on the score

### Code Organization

- **Create partials for repeated code** - DRY principle
Expand Down
Loading
Loading