Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Nominal Refactor Advisor

AST-driven refactoring advisor and proof-gated codemod engine for nominal architecture, SSOT recovery, and aggressive slop removal in Python systems.

Every restated fact outside its owning declaration is slop. NRA finds restated families, capabilities, boundaries, and copies, synthesizes whole-batch proof-gated codemods, and groups every remaining finding in synthesis_report.action_frontier by who moves next (ready_to_apply, owner_picks, nra_backlog, source_overhaul).

Run and apply (do not hand-edit proved codemods)

# 1. Synthesize and apply every proved codemod in one transaction
python -m nominal_refactor_advisor path/to/package \
  --codemod-synthesize-plan --codemod-apply --json

# 2. Emit a ready-to-fill picks template for any remaining owner_pick findings,
#    fill names/docstrings, and apply in one pass
python -m nominal_refactor_advisor path/to/package \
  --codemod-synthesize-plan --emit-owner-picks-template picks.json --json
python -m nominal_refactor_advisor path/to/package \
  --codemod-synthesize-plan --codemod-owner-picks picks.json --codemod-apply --json

# 3. Plain markdown scan with execution directives
nominal-refactor-advisor path/to/package

Build the Sphinx docs with:

pip install -e .[docs]
python -m sphinx -b html docs/source docs/_build/html

The docs are intentionally code-derived where possible:

  • pattern docs are generated from PatternId declarations
  • detector docs are generated from the registered IssueDetector family

Start with:

  • skills/nra-refactoring/SKILL.md
  • docs/source/api/getting_started.rst
  • docs/source/api/codemod_catalog.rst
  • docs/source/api/public_api.rst
  • docs/source/api/pattern_catalog.rst
  • docs/source/api/detector_catalog.rst

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages