docs(roadmap): re-analyze codebase readability program against current codebase#334
Merged
Merged
Conversation
21f22ad to
32968f8
Compare
…t codebase Deep audit of the entire codebase (~91K lines production Rust, 116 files) found: stale LOC counts (app/mod.rs doubled to 2767L, launch.rs grew 38% to 7575L), pervasive TUI/auth/Docker duplication (120 Style chains, 44 inline container name derivations, 11 mock structs), a false claim about console/runtime boundary cleanliness (2 production dependencies exist), and the need for a new Phase 1.5 DRY extraction phase. Updates all 14 roadmap files with current metrics, new file split targets, duplication findings, and corrected structural assumptions. Also adds OpenCode (GLM) commit attribution trailer to AGENTS.md and COMMITS.md, matching the GitHub App identity used by the anomalyco/opencode repository. Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
32968f8 to
385f2a6
Compare
donbeave
added a commit
that referenced
this pull request
May 18, 2026
…t codebase (#334) Re-analyzed the codebase readability roadmap against the current codebase (~91K lines production Rust, 116 files) after 82% growth since the original analysis (~50K lines). Updated all 14 roadmap files with current metrics, corrected structural assumptions, and added a new Phase 1.5 DRY extraction phase grounded in measured duplication findings. Key findings: stale LOC counts across all files (app/mod.rs +123%, launch.rs +38%), false console/runtime boundary claim (2 production deps exist), pervasive TUI duplication (120 Style chains, 192 Span constructions), auth provision copy-paste across 5 agent runtimes, Docker command entropy (40 invocations with no shared builder), and test infrastructure sprawl (11 independent mock structs). Also adds the OpenCode (GLM) commit attribution trailer to AGENTS.md and COMMITS.md, matching the GitHub App identity from the anomalyco/opencode repository. Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-analyzed the entire codebase readability roadmap against the current codebase (~91K lines production Rust, 116 files) after significant growth since the original analysis (~50K lines). Updated all 14 roadmap files with current metrics, corrected structural assumptions, and added a new Phase 1.5 DRY extraction phase grounded in measured duplication findings.
Key findings that drove the updates
Stale LOC counts everywhere —
app/mod.rsmore than doubled (1243L → 2767L, +123%),runtime/launch.rsgrew 38% (5494L → 7575L), 13 files now exceed 1000 lines (was 4 at original analysis).False structural claim — the claim "console/ has zero imports from runtime/ in production code" is false. Two production dependencies exist in
console/manager/input/editor.rs:crate::runtime::register_agent_repoandcrate::runtime::RepoError. The Cargo workspace split (Phase 3) needs these resolved first.Pervasive TUI duplication — 120
Style::default()chains, 18Block::default()constructions, 192Spanconstructions, 4 identical header/body/footer layout triples across render files. Named style constants and atitled_block()helper would collapse 78+ boilerplate sites.Auth provision copy-paste — 5 near-identical provision functions in
instance/auth.rs(2607L), 3 identical model accessor methods, 12 duplicated match arms betweenlaunch.rsandconfig/roles.rs.Docker command entropy — 40
runner.run("docker", ...)calls with no shared builder, 44 inlineformat!("{name}-dind")derivations across 5 files, identical DinD sidecar launch args copy-pasted betweenlaunch.rsandattach.rs.Test infrastructure sprawl — 11 independent mock/fake struct definitions,
FROM projectjackin/construct:trixie\nappears 100+ times, 41+ copy-pasted role-repo seeding blocks, a subtle trailing-newline difference between twofake_runner_with_runninghelpers.What changed
launch_dind.rsto proposed splitdocs/superpowers/specs/reference (directory no longer exists)What's deferred
Verify locally
Checkout
Paste this first to bypass the
tirithpaste scanner for the rest of the session:export TIRITH=0Then paste the checkout block:
Documentation
cd docs bun install --frozen-lockfile bun run devAstro serves at
http://localhost:4321/. Pages to walk:http://localhost:4321/reference/roadmap/codebase-readability/
UPDATED umbrella page. Check: current metrics table, Phase 1.5 section with extraction tables, corrected structural insight, Phase 2 expanded table with growth percentages.
http://localhost:4321/reference/roadmap/
UPDATED overview. Check: Codebase health section mentions re-analysis and current scope.
http://localhost:4321/reference/roadmap/split-runtime-launch/
UPDATED. Check: 7575L current size, duplication findings section, launch_dind.rs in proposed split.
http://localhost:4321/reference/roadmap/split-app-mod/
UPDATED. Check: 2767L (+123% growth), new proposed sub-files.
http://localhost:4321/reference/roadmap/module-contracts/
UPDATED. Check: new priority files table with growth metrics.
Migration notes
None — documentation-only changes.