This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Checks appellate brief PDFs for compliance with North Dakota Rules of Appellate Procedure. Analyzes formatting (margins, fonts, spacing, page limits) and semantic content (required sections). Produces HTML compliance reports with recommendations: Accept, Correction Letter, or Reject. Also deployable as a Claude Code skill.
# Setup
uv venv && uv pip install -r skill/requirements.txt
source .venv/bin/activate
# Run web interface
python app.py
# Deploy as Claude Code skill
python deploy_skill.py
# Run tests
pytest tests/app.py— Flask entry point (web interface)skill/— Deployable skill content (symlinked to~/.claude/skills/jetbriefcheck/):SKILL.md— Claude Code skill workflow definitioncore/— Analysis engine:pdf_extract.py— Extract text/images, measure formatting via PyMuPDFbrief_classifier.py— Detect brief type (appellant, appellee, reply, amicus, petition for rehearing)checks_mechanical.py— Paper size, margins, fonts, spacing, page limitschecks_semantic.py— Required sections, adequate contentreport_builder.py— Generate HTML compliance reportmodels.py— Data structures for checks and resultsrecommender.py— Accept/Correction Letter/Reject determination
scripts/— CLI entry points for skill pipelinereferences/rules/— Bundled rule text: N.D.R.App.P. 14, 21, 28, 29, 30, 32, 34, 40; N.D.R.Ct. 3.4, 11.6
web/— Flask templates and static assets
- Python 3.9+, PyMuPDF >= 1.24.0
- Optional Anthropic API key for AI-enhanced analysis
- Known false positives: font size (headers/footers/superscripts), line spacing (encoding issues), bottom margins (page numbers)
- Test data in
test-data/(~76 sample PDFs) - Skill deploys to
~/.claude/skills/jetbriefcheck/