Commands below run against an ML-shaped fixture in the repo
(examples/scenarios/ml_pipeline — a live
run → ingest → features → train → evaluate pipeline plus deliberately
orphaned experiment code). Output is verbatim.
See the pipeline that actually runs
Canonical stats: 16 functions, 13 calls, 0 cycles, 0 ambiguous edges — in one
self-contained offline file. The map shows one clean spine from
pipeline.run through each stage — and an island of experiment functions
connected to nothing. That island is your cleanup backlog, made visible.
List the graveyard, with proof
Deliberately conservative: _fit_legacy is not listed even though
it's effectively dead, because the (dead) legacy trainer still calls it — the tool
reports what it can prove, and once you delete the trainer, the next run flags its
helper too. A review list you can trust, not a chainsaw.
Refactor the training loop with an agent — safely
"Refactor train_model to support checkpointing" is
a classic agent task. Give the agent verified facts about who calls it and what it
calls, instead of letting it guess from a repo dump:
The agent knows — with provenance — that only pipeline.run depends on the
signature it's about to change. See the
full agent-context walkthrough.
What you got. The live pipeline mapped and separated
from the experiment graveyard (2 orphaned functions found here, each with a
file:line), zero dependencies installed, and verified context for
AI-assisted refactoring of the training loop. The mess every ML repo carries, finally
measurable.
Fixture: examples/scenarios/ml_pipeline. Output shown verbatim
except lists trimmed with … and repeated path prefixes shortened to …/ for
width. Scales: a measured 98,669-line project maps in ~4.9 s.