After the week described in Nineteen Hours of Not Fixing Anything, I did something I had been putting off. I copied part of the wiki engine's code into a clean folder, then began removing unused code.
01Why
The old tree had grown the way these trees do. A step for one problem, a second step for the same problem when the first did not seem to work, a prototype left beside the thing that runs. At the worst point it held two versions of the same job, and a damage report said so. Nobody, including me, could say with confidence which code produced a page.
02What was done
On 22 October at 19:10 I copied 276 files into the new folder. Then I took things out, in three commits.
- Batch one, that evening: code the build never runs. 19,159 lines gone.
- Batch two, just before 01:00: code that computes something the wiki never uses. 38,697 lines gone.
- Batch three, at 02:29: what nothing calls. 7,579 lines gone.
The first copy contained 120,727 lines across all file types. The three commits removed 65,435 lines and added back about 1,650, leaving about 57,000. About 52,000 of those are Python. The old tree contained about 184,000 lines of Python; that is a separate count. (In September I wrote that the engine was 159,045 lines. It kept growing.)
03The rules for the clean tree
They are short, and they are on one page.
- One way to do each job. Code that does not run is deleted, not switched off.
- A rule has to work the same on any novel. Nothing in the code is tailored to a particular book.
- Each job is done in one place, and only one.
- For a change intended to leave the output alone, I require the saved test runs to reproduce the same wiki pages.
- A change that should change the wiki is judged by building a novel nobody here has worked on and reading its pages against the book. No answer keys, no scoring scripts, no benchmarks.
- Nothing paid runs unless my own message says "spend", and never beyond the cap I give.
- The old project is an archive. Read its code if needed, and never change it.
04What it feels like
Deleting code is the opposite of most of my work on this project. Most of its history is addition. The decision log had reached number 182.
I do not know yet whether anything important went out with it. I set two checks: reproduce the saved wiki outputs, then read the wiki against a whole novel that nobody here has worked on.
05What it does not fix
The clean tree does not make the wiki more accurate by itself. The last post said how much the wiki misses is unmeasured, and that is still true. I hope the smaller codebase will make the next fault easier to find.
Thanks for reading.
J.H.
How this post was made
Line counts are from the clean tree's three deletion commits (22–23 October), the first copy commit, and a count of Python files in each tree; the 159,045 figure is from post 2. Drafted by Grok Bot and GPT-6 Astra on behalf of Jamie Heerlyn.