Skip to content

Releases: QuantEcon/action-style-guide

v0.7.2

15 Feb 23:06

Choose a tag to compare

Fix temperature default for extended thinking

Fixed

  • Fixed temperature default breaking all LLM callsaction.yml defaulted temperature to 0, but extended thinking (enabled in v0.7.0) requires temperature=1 per Anthropic's API. Every rule check silently errored with a 400, causing false "0 issues found" results. Changed default to 1.

Full Changelog: v0.7.1...v0.7.2

v0.7.1

15 Feb 23:00

Choose a tag to compare

Fix circular import

Fixed

  • Fixed circular import crashing all GitHub Action runsstyle_checker/github.py shadowed the PyGithub github package, causing a circular import that crashed every Action run. Renamed to action.py to eliminate the name collision.

Full Changelog: v0.7.0...v0.7.1

v0.7.0

13 Feb 05:57

Choose a tag to compare

qestyle CLI + Extended Thinking + Minimal Prompts

What's New

Extended Thinking (Zero False Positives)

Claude now reasons internally before responding, verifying each candidate violation before including it. This eliminates false positives (0% vs ~43% previously). Requires temperature=1.0 (Anthropic constraint).

Local CLI: qestyle

New command-line tool sharing the same review engine as the GitHub Action.

pip install git+https://github.com/QuantEcon/action-style-guide.git
qestyle lecture.md                    # review + apply fixes + write report
qestyle lecture.md --dry-run          # review only
qestyle lecture.md --categories math  # specific categories

Minimal Rule-Agnostic Prompts

All 8 category prompts replaced with a unified ~40-line template (down from ~120 lines each). Scope and context come from rule definitions, reducing signal dilution.

Category Labels on PRs

When specific categories are requested, category names are added as labels on the generated PR.

Removed

  • tool-style-checker/ directory (replaced by qestyle CLI)
  • tool-style-guide-development/ directory (rules edited directly in style_checker/rules/)

See CHANGELOG.md for full details.

v0.6.0

12 Feb 04:36

Choose a tag to compare

Dead code cleanup, region-based reporting, test improvements

What's Changed

Comprehensive cleanup and improvements — removes dead code, fixes stale documentation, significantly improves test coverage, and upgrades the Applied Fixes report to use accurate region-based diff reporting.

Highlights

  • Region-based Applied Fixes report — Multi-rule edits on the same line are now combined into one entry showing the true original → final text with all contributing rules attributed
  • Configurable temperature — New temperature input (default: 0 for deterministic output)
  • Zero-violation parser fix — Prevents LLM commentary from being applied as content replacements
  • Dead code removal — Deleted unused modules, methods, test files, and dependencies
  • Test coverage: 23% → 45%, tests: 12 → 65

Fixed

  • Region-based combined Applied Fixes report (replaces per-violation reporting)
  • Zero-violation parser bug (short-circuits when Issues Found is 0)
  • review_lecture_smart() architecture bug (now uses single-rule evaluation)
  • migrate type rule extraction (was silently dropping 4 rules)
  • Skip no-op fixes in fix_applier
  • Removed dead code, duplicate methods, unused dependencies
  • Rebuilt RULES.md from source (49 rules, fixed 15+ mismatches)
  • Fixed stale docs: README, CONTRIBUTING, test docs

Added

  • Configurable temperature parameter (default: 0)
  • Prompt version tracking for all 8 prompt files
  • RULE_EVALUATION_ORDER for all 8 categories
  • test_fix_applier.py (13 tests), test_prompt_loader.py (9 tests), test_reviewer.py (15 tests)

Changed

  • Rewrote test_parsing.py to test actual code instead of reimplementation
  • Updated CI: ruff linting, Python 3.11-3.13 matrix

Full Changelog: v0.5.1...v0.6.0

v0.5.1

08 Dec 06:40

Choose a tag to compare

Critical Hotfix

This release fixes a production bug in v0.5.0 that prevented the action from working when creating PRs.

Fixed

  • Critical NameError - Fixed 'NameError: name args is not defined' error
    • Added pr_labels parameter to review_single_lecture() function
    • Function now receives pr_labels as explicit parameter
    • Fixed variable naming conflict by renaming local variable

Full Changelog

https://github.com/QuantEcon/action-style-guide/blob/main/CHANGELOG.md\#051---2025-12-08

v0.5.0

08 Dec 06:21

Choose a tag to compare

Production Testing & Breaking Changes

Production Testing Infrastructure

  • 📚 Production Testing Guide - Comprehensive documentation for testing the action before production deployment
  • 🧪 Test Repository (test-action-style-guide) - Dedicated Jupyter Book repo with test lectures and workflows
  • ✅ Automated regression testing with scheduled workflows

New Features

  • 🏷️ Custom PR Labels - New pr-labels input allows adding custom labels to PRs
  • 🚫 Useful for test repos to add labels like do-not-merge
  • 📋 Custom labels are added to default labels (automated, style-guide, review)

Breaking Changes ⚠️

  • 🎯 Single Comment Trigger - Now only supports @qe-style-checker syntax
  • ❌ Removed legacy @quantecon-style-guide syntax (breaking change)
  • 🧹 Removed experimental @github-actions style-guide syntax
  • 📖 Cleaner codebase and documentation

Migration Guide

If you were using @quantecon-style-guide, update to @qe-style-checker:

# Old (no longer works)
@quantecon-style-guide lecture_name

# New
@qe-style-checker lecture_name
@qe-style-checker lecture_name math,code

Documentation Updates

  • Added docs/production-testing.md - Full testing guide
  • Removed outdated RELEASE-GUIDE.md
  • Updated docs/README.md with production testing link

Full Changelog

See CHANGELOG.md for complete details.


Installation:

- uses: QuantEcon/action-style-guide@v0.5.0

Testing: Try it out in test-action-style-guide

v0.4.0

08 Dec 05:26

Choose a tag to compare

Type Terminology, CLI Tool Integration, Documentation

Changed

  • Renamed rule classification from 'Category' to 'Type' - Clearer terminology throughout prompts, rules, and code
  • tool-style-checker now works as a CLI - Shares prompts/rules with main action for consistent local testing
  • Updated tool-style-guide-development for Type terminology

Added

  • docs/ARCHITECTURE.md - Comprehensive system architecture documentation
  • docs/FUTURE-ENHANCEMENTS.md - Roadmap with GitHub inline suggestions, batch improvements, multi-model support
  • docs/README.md - Documentation index
  • Documented 'migrate' rule type - For legacy pattern updates (e.g., tic/toc → qe.Timer())

Fixed

  • LLM integration tests - Updated to current API, all 30 tests now pass
  • Test coverage improved - 36% → 53%

Removed

  • Duplicate prompts/rules from tool-style-checker (now shared from style_checker/)

Full Changelog: v0.3.24...v0.4.0

v0.3.24 - Fix Rule Conflict (qe-writing-002 vs qe-writing-001)

11 Oct 08:08

Choose a tag to compare

Bug Fix 🐛

Prevents qe-writing-002 from creating violations of qe-writing-001 when suggesting to break up long sentences.

Problem

qe-writing-002 was suggesting to break long sentences into multiple sentences, but NOT adding blank lines between them:

❌ Bad suggestion:
But we can model time series with persistent growth. These models use a law of large numbers.

This violated qe-writing-001 (one sentence per paragraph - separated by blank lines).

Solution

  • ✅ Added inline constraint to qe-writing-002: "Breaking long sentences up can be useful sometimes, but each sentence must be in its own paragraph block separated by blank lines"
  • ✅ Changed category from rule to style (advisory rather than mechanical)
  • ✅ Self-contained explanation (no need for external links)

Correct Behavior Now

✅ Good suggestion:
But we can model time series with persistent growth.

These models use a law of large numbers.

Impact

  • Prevents conflicting edits between rules processed sequentially
  • Maintains consistency with qe-writing-001
  • Clear guidance for LLM on proper sentence breaking

Full Changelog: https://github.com/QuantEcon/action-style-guide/blob/main/CHANGELOG.md

v0.3.23 - Simplify Prompt Instructions

11 Oct 00:33

Choose a tag to compare

Simplification ✨

Removes a redundant and confusing CRITICAL instruction from the writing prompt.

What Changed

  • Removed: "CRITICAL: The 'Current text' and 'Suggested fix' MUST be different (fixes must change something). Even if the visual difference is subtle (like whitespace changes), ensure the suggested fix actually corrects the violation."

Why

  1. Redundant: Obviously fixes should change something - that's what "fix" means!
  2. Confusing: Was causing LLM to second-guess valid fixes, especially whitespace changes
  3. Already handled: The validate_fix_quality() function already checks if current_text == suggested_fix
  4. Simpler is better: Following "simplicity above all" principle

Result

  • ✅ Cleaner, more focused prompt
  • ✅ Less confusion for the LLM
  • ✅ Relies on existing validation logic instead of pre-warning
  • ✅ Updated writing prompt version to 0.3.23

Full Changelog: https://github.com/QuantEcon/action-style-guide/blob/main/CHANGELOG.md

v0.3.22 - Fix Whitespace Violation Reporting

11 Oct 00:30

Choose a tag to compare

Bug Fix 🐛

Fixes issue where whitespace violations (qe-writing-008) were being detected but not applied.

Problem

  • LLM detected 6 whitespace violations
  • All 6 were skipped: "Applied 0/6 fixes"
  • Warning: "Fix quality warnings: 6"
  • Root cause: Prompt instruction "Current text and Suggested fix MUST be different" was interpreted too strictly
  • LLM avoided reporting whitespace fixes because they looked visually "the same"

Solution

  • ✅ Clarified CRITICAL instruction: "must change something" instead of "MUST be different"
  • ✅ Added explicit note: "Even if the visual difference is subtle (like whitespace changes), ensure the suggested fix actually corrects the violation"
  • ✅ LLM now understands that subtle differences (whitespace) are valid and important

Impact

  • Fixes qe-writing-008 (Remove excessive whitespace) rule application
  • Should improve fix application rate for all subtle text changes
  • Updated writing prompt version to 0.3.22

Full Changelog: https://github.com/QuantEcon/action-style-guide/blob/main/CHANGELOG.md