Point it at your project and it runs a fleet of cheap health scanners in parallel, predicts what to build next, and grows its own checklist over time.
Megacycle is a continuous self-improvement engine for a codebase. Each round it runs a fleet of tiny, $0, local scanners in parallel — test coverage, doc freshness, dependency drift, TODO/FIXME debt, untested files — each of which reads real on-disk state and PREDICTS the highest-leverage builds to do next. Predictions merge into a ranked, deduplicated backlog; anything that keeps recurring is PROMOTED into a new standing scanner, so the checklist grows itself. Scanners are just objects with scan() and predict(); bring your own, and plug in any LLM to enrich predictions. Runs once, N rounds, or forever.
Each cycle reads real on-disk state — test files present, README age, dependency count, TODO/FIXME debt, source files without a matching test — and returns metrics + a health color. The whole fleet runs in a bounded parallel pool, so a round is fast and offline-safe ($0).
Every cycle proposes concrete future builds with a why, a leverage tag, and a confidence. Predictions merge into a backlog keyed by build, deduplicated, with a seen-count that bumps on every recurrence — so the signal that keeps mattering rises to the top.
A prediction seen past a threshold — and not already a cycle — is minted into a new dynamic cycle in ./data. The registry expands toward the work that recurs. Run one round, N rounds, or a forever loop on an interval; wire in any LLM to enrich predictions.
Every value comes from .env. Nothing here is tied to any account — bring your own.
# 1. no install needed — pure Node builtins node lib/megacycle.cjs --dir=. # one round against the current project ($0, local) # 2. compound over several rounds (backlog + registry may grow) node lib/megacycle.cjs --dir=. --rounds=3 # 3. see the ranked backlog it built node examples/demo.cjs # 4. run forever on an interval (great as a cron / service) node lib/megacycle.cjs --dir=. --loop --interval=900