
rebuilding the factory
we wrote the port plan in march. by april we threw it away and rebuilt on a different runtime.
on 2026-03-21 i wrote a port plan for loswf. it was a thorough document. 3,643 lines across bash and python, mapped one-to-one to a typescript codebase under src/. type-safe label state machine. testable github client. mock pi runtime. the plan compiled in my head and it had an estimated landing window.
i shipped against it for two weeks. by 2026-04-19 i had cut a v1 release banner that said the project was on maintenance only and that new installs should go elsewhere. that elsewhere was a repo i created the day before, on 2026-04-18, whose first commit is labelled chore: initial scaffold for loswf2 and contains no typescript at all.
the rebuild was the second answer to the same question. v1 had proved the thesis — an autonomous, label-driven factory powered by pi cli, sweeping issues through intake, plan, build, review, ship. but the runtime to get there had grown into 1,762 lines of bash in bin/loswf, 211 lines of yaml parser via inline python, 464 lines of prompt templating, and 909 lines of python for the qdrant index. every load-bearing primitive was wrapped in a string-interpolation layer i had written by hand. the port plan tried to retype that layer.
the port plan was not wrong. it was a good engineering plan against the wrong target. while i was writing it, claude code shipped subagents, slash commands, skills, and hooks as first-class primitives. each of those primitives replaced a layer of the runtime i was about to port. typed agents in src/agents.ts became .claude/agents/*.md. the sweep loop in src/sweep.ts became an adw script invoking claude headless. prompt templating became frontmatter on the agent definition. the entire src/ tree i had planned to write was infrastructure the host runtime now owned.
the moment i saw that overlap, the port plan stopped being a building exercise and became a deletion exercise. every box on the architecture diagram was a thing i no longer had to maintain.
i archived the plan and started loswf2. the first commit set up .claude/agents/ with 13 single-purpose subagents, .claude/commands/ with 10 slash commands, .claude/skills/ with 6 reusable context bundles, .claude/hooks/ for the pre-tool guard and post-tool journal, and adws/ for the workflow scripts. no runtime code. no typescript. no bun. the readme said it explicitly: claude code is the runtime.
the v2 vision doc names the non-goal that mattered. not a port of loswf’s typescript codebase — domain content (prompts, agent roles, factory specs) carries over; runtime code does not. that line is the thesis of the rebuild compressed to one sentence. everything in v1 worth keeping was content. everything in v1 not worth keeping was the harness that wrapped it.
the content carried cleanly. all thirteen agent roles, the pipeline shape, the factory specs, the t-shirt sized decomposition convention, the curator-gated proposals — all of that survived the move. what got deleted was the layer translating those concepts into pi invocations.
within a month of that first scaffold, the gear-train integration landed. loswf2 absorbed four sibling repos — intake, research, product, design — into a single plugin install. v0.4.0 through v0.4.4 shipped the research, product, design, and fit-check departments in five consecutive releases. v0.5.0 made product sign-off a mandatory phase gate. by 2026-05-20 the factory had grown beyond what v1 had ever scoped, and most of the new surface was content that the runtime supported without modification.
the rebuild was not a rewrite. a rewrite would have produced the same factory with a cleaner internal structure. the rebuild produced a factory that does work v1 was not capable of, on a runtime someone else maintains, with a surface area i can keep entirely in my head. the port plan and the rebuild were the same project at two different ambition levels.
the lesson the plan archive holds, which i did not have on 2026-03-21, is that infrastructure you write yourself is a debt against the infrastructure your runtime is about to ship. on a six-month horizon that calculation usually breaks toward the runtime. on a one-week horizon it almost never does. the rebuild worked because the runtime moved faster than my port plan could land.
the port plan is still in loswf/docs/plans/archived/ as a fossil. the rebuild is what shipped.