Skip to content

shigel/autoforge

Repository files navigation

autoforge

Tests Python 3.11+ License: MIT SWE-bench Lite autoforge health

The only OSS toolchain that measures, recommends, and fixes repository health in a single deterministic invocation — across Python, JavaScript/TypeScript, Go, and Rust.

One command to improve any repo

pip install -e .
autoforge-improve --dir /path/to/any-repo --apply --pr-summary PR.md

This runs the full closed loop:

score  →  suggest  →  fix  →  re-score  →  PR summary

No LLM. No API key. Deterministic and reproducible.

Proven on Django (80K stars)

Before:  51% D
After:   72% C  (+21 points, 487 fixes applied, ~45 seconds)

Full case study with before/after breakdowns and reproduction instructions.

What makes autoforge unique

Capability autoforge SonarQube CodeClimate Snyk ruff/ESLint
Measure (whole-repo rubric) 6 dimensions Issues only Grades Security only Per-file
Recommend (file:line targets) Ranked by impact Issues Grades Advisories Warnings
Fix (deterministic auto-apply) AST/regex + templates --- --- Deps only Per-rule
Orchestrate (one-command loop) autoforge-improve --- --- --- ---
Polyglot Py + JS/TS + Go + Rust Paid SaaS Paid SaaS --- Single-lang
OSS MIT Partial --- --- Per-tool

The 6-dimension health rubric

Dimension What it measures
Docs README, CONTRIBUTING, SECURITY, LICENSE, AGENTS.md (md/rst/adoc)
Testing Test framework detection + file count tiers (1/5/20/50)
CI/CD GitHub Actions, GitLab CI, Jenkins, CircleCI, Travis
Security SECURITY policy + dependency manifest for audit
Quality Lint config, test/source ratio, file size, comment-marker debt
AI-Readiness Agent instructions + type-hint coverage + docstring coverage + examples dir

AI-Readiness is unique to autoforge. No other health scorer measures how prepared a repo is for AI coding assistants.

Public leaderboard (8 major Python OSS, ~197K combined stars)

Rank Repository Stars Total Grade
1 autoforge new 100% A
2 matplotlib 20K 77% B
3 astropy 4.5K 70% C
4 sphinx 6.7K 62% C
5 pytest 12K 59% D
6 scikit-learn 61K 59% D
7 sympy 13K 59% D
8 django 80K 51% D

Full leaderboard with AI-Readiness column

CLI tools (11 entry points)

Command Purpose
autoforge-improve Full closed loop: score + suggest + fix + re-score + PR summary
autoforge-score 6-dimension health score with badge/JSON output
autoforge-suggest Prescriptive improvement plan (file:line targets, ranked by impact)
autoforge-fix Deterministic auto-fix (docstrings, AGENTS.md, SECURITY.md, lint config, ...)
autoforge-leaderboard Multi-repo ranked health comparison
autoforge-compare Side-by-side score comparison of 2+ repos
autoforge-history Score trend chart over time
autoforge-init Analyze any repo and propose improvement goals
autoforge-tools SWE-bench harness tools (search, view, edit, run-cmd)
autoforge-solve SWE-bench task resolver
autoforge Full SDLC pipeline (Survey + Idea + Implement + Test + Security + Stage + Approval)

What autoforge-fix auto-applies

Fixer Language Action
AGENTS.md All (language-aware) Creates a stub agent briefing with correct build/test commands
CONTRIBUTING.md All Creates a contributor guide stub
SECURITY.md All Creates a vulnerability reporting policy
examples/ All Creates examples/hello.py
Lint config Python Appends [tool.ruff] to pyproject.toml
Docstrings Python AST-driven """docstring""" insertion
JSDoc JS / TS Regex-driven /** comment */ insertion
godoc Go // comment insertion above each func
rustdoc Rust /// comment insertion above each fn

All fixers are idempotent, process functions in descending line order (so earlier insertions don't corrupt later ones), and use a shared _docstring_text_for(name) to produce the same phrasing across all four languages.

Architecture

SDLC pipeline (7 agents)

Survey → Idea (tree search) → Implement → Test → Security (OWASP) → Stage → Approval

SWE-bench resolver stack

Component Based on
Multi-stage Localizer MASAI (75% localization rate)
Reproducer SWE-agent fail-to-pass pattern
ACI Toolkit SWE-agent Agent-Computer Interface
Search Subagent WarpGrep (isolated context)
Interactive Resolver ReAct tool-use loop

Harness mode (no API key)

autoforge runs within Claude Code's subscription — no ANTHROPIC_API_KEY needed.

Development

# Install
pip install -e .

# Run tests (494 tests, ~20s)
PYTHONPATH=. python3 -m pytest tests/ -v

# Score this repo
autoforge-score --dir .

# See what to improve
autoforge-suggest --dir . --top 5

# Auto-fix (dry-run by default)
autoforge-fix --dir . --apply

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages