Skip to main content

check-geometric-figures.yml

Diff-scoped, blocking check that flags a geometric claim in prose with no figure nearby. The lab’s rule (Ezra, 2026-11-16) is that every geometric claim in course notes, such as “the loss term has elliptical contours”, is paired with a graphical illustration nearby.

A line is a geometric claim when its prose (outside code, comments, and math) says contour, ellipse, circle, level set, level curve, tangent line, tangent plane, hyperplane, decision boundary, perpendicular, “projects onto”, “geometrically”, “geometric interpretation”, or right angle. The list is narrow on purpose: convex, angle, orthogonal, and projection alone are ordinary algebra.

The claim is paired when an image, a fig- chunk, a fig- div, an @fig- reference, or an include of a _fig subfile lies within window lines (default 40) or in a div that encloses the claim. <!-- no-figure: reason --> nearby exempts a claim no figure can show. Only claims on lines a pull request adds are reported, one per paragraph.

The check sees that a figure is near, not that it shows this claim, so the Claude review prompt carries the rule too.

jobs:
  check:
    uses: Morrison-Lab/gha/.github/workflows/check-geometric-figures.yml@v3
    # with:
    #   window: 40          # lines either side searched for a figure
    #   fail: true          # set false to warn only (defaults to true)

See examples/check-geometric-figures.yml for the full caller stub.