---
name: jacobobryant-biff-code-review
description: "Review Clojure code to ensure it matches Biff conventions."
license: "MIT"
metadata:
  decimalai-skill-id: "83edb14b-8260-4584-aaaa-d5b43c4570f4"
  decimalai-version-id: "88e98643-e783-49fa-87b1-444ee14be3a5"
  decimalai-version: "1"
  decimalai-body-sha256: "a471d9415259150b99a8058766e20d26a004249fb67a87051fff9146106c85ae"
  decimalai-name: "jacobobryant/biff-code-review"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "code-review"
  decimalai-source: "https://app.decimal.ai/s/jacobobryant-biff-code-review@1/SKILL.md"
---
# Biff code review

Copy the `checklist.txt` file to `.biff/review/<current date>/<n>.txt`, e.g.
`.biff/review/2020-01-01/0.txt`. `n` starts at 0 and should be 1 higher than the
highest number already in the folder for the current date.

Read rules.md for a description of each of the points in the checklist. Then
review the recently written code against the points in the checklist. Check off
points (replace `[ ]` with `[x]`) in the checklist for which there are no
violations. Leave other points unchecked. For each unchecked point, include a
bulleted list underneath with filenames and line numbers for violations.

Tell the user the path for the new review checklist file and ask them to verify
the checklist is correct. After this point, you should never edit the checklist.
The user may make edits to the checklist, and they are responsible for signing
off on each point.

When the user has verified the checklist is ready, go through each point
one-by-one and fix the violations. Do not stop until you've gone through all the
unchecked points in the checklist. Do not skip a violation for any reason; you
must fix each violation even if it requires a large code change. Do not try fix
violations via workarounds; it's better to do a large principled change than a
small stupid change.

Then repeat: ask the user to update the checklist as needed. If any points are
still unchecked, you will need to revisit those points and fix the violations.
Repeat until the user verifies the checklist is complete.

## Code to review

If there are uncommitted code changes, review those. Otherwise, review commits
from the current branch that aren't on the main/master branch. Otherwise, ask
the user what you should review.

## Auto mode

If the user includes "auto" as an argument to this skill, then after you've
reviewed the code and created a new checklist, proceed to fix the violations
instead of waiting for the user to edit the checklist. You should still leave
the originally violated points in the checklist unchecked so that the user
afterward can sign off on the checklist or request additional changes if they
want.

## Continuing

If the user says "fix" when invoking this skill, then find the most recent
review file and fix the violations in that file as described above.

## Biff docs

See the docs located at `.biff/docs/` in the project directory for more
information about Biff patterns. If that directory isn't present, run `clojure
-M:run init`.
