Shown·Hermes Agent·Software companies
Million-line codebase refactor
Hermes Agent split a million-line Python repo into 36 groups and dispatched 1,393 subagents in git worktrees to refactor it.
Non-test Python fell from 1,063,826 to 698,363 lines (34.4%), gateway/run.py from 34,847 to 5,512 lines, and functions over 300 lines from 192 to 2.
Overview
How it was set up
Hermes Agent with a /goal objective and a hermes-agent-dev skill. Workers ran in git worktrees, checked against a frozen baseline, with tool schemas and CLI help output compared to the original.
Worth knowing
Reviewers caught removed public names and altered exception handling that tests missed. Fixes took two review rounds, plus more after merge.
A prompt to start from
Set a standing goal: reduce non-test source by at least [percent]. Break up god files, unify duplicate helpers, replace long if/elif chains with dispatch tables, and keep public interfaces identical. Split the code into non-overlapping groups, assign each to a worker in its own git worktree, and require verified commits.Written by Agentic Feats from the source. Not the author's exact prompt.
Sources 1
History
- Source published
- 2026-09-15
- Added to Agentic Feats
- 2026-10-13
- Pick
- No
- Markdown copy
- /c/million-line-codebase-refactor-hermes-agent.md
More in software companies
17 featsResultAchieved root on Metasploitable2 in about 3 minutes and Domain Admin on a Samba AD lab in about 14 minutes.
ResultThe first version of Petal took under eight weeks, versus almost six years for CoScreen, and runs on macOS, Windows and the web.
ResultDb2 support shipped in under two days for a $4172 token bill, versus 9 months and about $160K for Oracle; 27 PRs merged.