Problem
A six-angle tech-debt sweep (scraper/scheduler, pure libs, UI, layout/widget, API/queries, tooling/CI)
found the codebase healthy — disciplined pure/impure split, clean secret handling, strong 5-job CI,
exact-pinned deps, almost no masked checks. The debt is maintainability: a few oversized files,
pervasive small duplication, confirmed-dead code from superseded features, and shallow static analysis.
This epic tracks paying it down in risk-ordered batches (no behavior change unless noted).
Sub-issues (risk-ordered batches)
Batch 1 — quick wins (zero/low risk, no numeric impact):
Batch 2 — tooling hardening (surfaces future debt automatically):
Batch 3 — shared primitives + tests:
Batch 4 — numeric + efficiency (gated on /api/verify):
Batch 5 — large-file decomposition (biggest diffs, laid out last):
Acceptance criteria
- Each sub-issue lands via its own PR through the 5-job CI gate; numeric changes paste
/api/verify.
- No masked checks (standards §9); large refactors are behavior-preserving + visually verified.
Pointers
docs/standards.md, docs/architecture.md — the rules each change must satisfy.
Problem
A six-angle tech-debt sweep (scraper/scheduler, pure libs, UI, layout/widget, API/queries, tooling/CI)
found the codebase healthy — disciplined pure/impure split, clean secret handling, strong 5-job CI,
exact-pinned deps, almost no masked checks. The debt is maintainability: a few oversized files,
pervasive small duplication, confirmed-dead code from superseded features, and shallow static analysis.
This epic tracks paying it down in risk-ordered batches (no behavior change unless noted).
Sub-issues (risk-ordered batches)
Batch 1 — quick wins (zero/low risk, no numeric impact):
Batch 2 — tooling hardening (surfaces future debt automatically):
Batch 3 — shared primitives + tests:
Batch 4 — numeric + efficiency (gated on
/api/verify):Batch 5 — large-file decomposition (biggest diffs, laid out last):
Acceptance criteria
/api/verify.Pointers
docs/standards.md,docs/architecture.md— the rules each change must satisfy.