A GitHub Action and local CLI for automated style guide compliance checking of QuantEcon lecture materials using AI-powered analysis.
What It Does¶
The style checker reviews MyST Markdown lecture files against the QuantEcon Style Guide, ensuring consistency across all lecture series. It uses Claude Sonnet 4.5 with extended thinking to check 49 style rules covering writing, mathematics, code, JAX patterns, figures, and more.
Key Features¶
AI-Powered Review — Uses Claude Sonnet 4.5 with extended thinking for zero false positives
49 Style Rules — Covering 8 categories: writing, math, code, JAX, figures, references, links, admonitions
Automated Fixes — Applies rule-type fixes programmatically for reliable results
Local CLI —
qestylecommand runs the same engine locallyGitHub Integration — Creates labeled PRs with detailed explanations
How It Works¶
Trigger a review via issue comment (
@qe-style-checker lecture_name) or scheduled workflowThe action checks each rule individually using Claude with extended thinking
Rule-type violations are fixed automatically; style-type suggestions are reported for human review
A PR is created with all fixes and a detailed summary
Quick Start¶
Comment on any issue in your lecture repository:
@qe-style-checker lecture_nameWith specific categories:
@qe-style-checker lecture_name writing,mathSee Getting Started for full setup instructions.
Install and run locally:
pip install git+https://github.com/QuantEcon/action-style-guide.git
export ANTHROPIC_API_KEY='your-key-here'
qestyle lecture.md --categories writingSee CLI Guide for full usage documentation.