Top Score Opportunities
Highest-leverage changes ordered by weighted Lighthouse score gain across Uphill categories.
src/compiled_code.zig
src/opcode.zig
src/u256_math.zig
src/storage_injector.zig
src/evm.zig
src/root_c.zig
src/simulation.zig
Safety & TigerStyle
Crash-free EVM execution, error propagation, and type-safety across Zig and TypeScript.
Zig no panic 48 / 48 pass w2 100
Never use @panic or unreachable in production src/ Zig code; validate and return typed errors.
All 48 measured check(s) passed target thresholds.
Zig no debug print 48 / 48 pass w1 100
Replace std.debug.print in production src/ Zig modules with logger.zig.
All 48 measured check(s) passed target thresholds.
Zig no swallowed errors 48 / 48 pass w2 100
Never swallow errors with empty catch {} or leave error.NotImplemented stubs in production Zig code.
All 48 measured check(s) passed target thresholds.
Zig assertion density 0.41 (target 20) w1 55
Add invariant assertions to production Zig functions to raise assertion density toward TigerStyle targets.
All 1 measured check(s) passed target thresholds.
Ts no explicit any 11 / 11 pass w1.5 100
Replace explicit `any` annotations and `as any` casts in ts/ with narrow types.
All 11 measured check(s) passed target thresholds.
Ts no suppress 11 / 11 pass w1 100
Fix underlying TypeScript errors instead of using @ts-ignore, @ts-expect-error, or @ts-nocheck.
All 11 measured check(s) passed target thresholds.
Style & Limits
TigerStyle structural bounds (70-line functions, 120-char lines) and canonical Zig formatting.
Zig fmt 75 / 75 pass w2 100
Keep all Zig files in src/ formatted with `zig fmt`.
All 75 measured check(s) passed target thresholds.
Function length 125 (target 70) w2 64
Keep every production Zig runtime function at or below 70 lines (TigerStyle limit).
| Item | Measured | Target | Diagnostic |
|---|---|---|---|
src/compiled_code.zig |
250 | 70 | compile() is 250 lines (TigerStyle limit 70) |
src/opcode.zig |
159 | 70 | getOpName() is 159 lines (TigerStyle limit 70) |
src/u256_math.zig |
130 | 70 | divRem() is 130 lines (TigerStyle limit 70) |
src/storage_injector.zig |
125 | 70 | writeChangesJson() is 125 lines (TigerStyle limit 70) |
src/trace_store.zig |
112 | 70 | filter() is 112 lines (TigerStyle limit 70) |
src/simulation.zig |
85 | 70 | executeOnOverlay() is 85 lines (TigerStyle limit 70) |
src/debugger.zig |
79 | 70 | writeCurrentStateSummary() is 79 lines (TigerStyle limit 70) |
Line length 33 / 48 pass w1 69
Keep production Zig lines at or below 120 characters (TigerStyle limit).
| Item | Measured | Target | Diagnostic |
|---|---|---|---|
src/async_executor.zig |
fail | - | line 219: 121 chars (limit 120) |
src/call_result.zig |
fail | - | line 87: 124 chars (limit 120) |
src/debugger.zig |
fail | - | line 567: 128 chars (limit 120) |
src/evm.zig |
fail | - | line 281: 123 chars (limit 120) |
src/evm_config.zig |
fail | - | line 9: 133 chars (limit 120) |
src/frame.zig |
fail | - | line 103: 130 chars (limit 120) |
src/inspector.zig |
fail | - | line 330: 123 chars (limit 120) |
src/instructions/frame_interface.zig |
fail | - | line 58: 128 chars (limit 120) |
src/instructions/handlers_context.zig |
fail | - | line 40: 151 chars (limit 120) |
src/instructions/handlers_log.zig |
fail | - | line 61: 127 chars (limit 120) |
src/instructions/handlers_storage.zig |
fail | - | line 245: 136 chars (limit 120) |
src/instructions/handlers_system.zig |
fail | - | line 374: 124 chars (limit 120) |
src/precompiles/wasm_host.zig |
fail | - | line 13: 182 chars (limit 120) |
src/simulation.zig |
fail | - | line 188: 123 chars (limit 120) |
src/storage.zig |
fail | - | line 54: 125 chars (limit 120) |
No todo markers 59 / 59 pass w1 100
Resolve TODO, FIXME, XXX, and HACK markers in production Zig and TypeScript modules.
All 59 measured check(s) passed target thresholds.
Footprint & Minimalism
Minimal EVM source footprint, WASM surface compactness, and module size budgets.
Zig file lines 1634 (target 400) w2 24
Keep production Zig files concise (<=400 lines) to preserve guillotine-mini's minimal architecture.
All 48 measured check(s) passed target thresholds.
Wasm surface bytes 73727 B (target 16000 B) w1.5 33
Keep core EVM modules under src/ and wasm/ compact to protect the <=2.5 MiB WASM binary budget.
All 49 measured check(s) passed target thresholds.
Ts file lines 295 (target 300) w1 90
Keep TypeScript modules under ts/ concise (<=300 lines per file).
All 11 measured check(s) passed target thresholds.
Verification & Tests
Lean 4 formal oracle proofs, Zig inline unit tests, and TypeScript test coverage.
Lean no sorry 8 / 8 pass w2 100
Never leave `sorry` or unproved `axiom` declarations in spec/lean/**/*.lean.
All 8 measured check(s) passed target thresholds.
Lean theorems 210 (target 120) w1 98
Expand Lean 4 reference specification proofs in spec/lean/ toward complete opcode/fork coverage.
All 1 measured check(s) passed target thresholds.
Zig inline test coverage 45.8 (target 95) w1.5 11
Include inline `test` blocks inside production src/ Zig modules.
All 1 measured check(s) passed target thresholds.
Ts test ratio 70 (target 100) w1 22
Pair every production TypeScript module in ts/ with dedicated unit tests.
All 1 measured check(s) passed target thresholds.
Documentation
Companion *.zig.md design docs and local markdown link integrity.
Broken links 45 / 45 pass w2 100
Fix broken relative and root-relative links in root Markdown files and docs/**/*.md.
All 45 measured check(s) passed target thresholds.
Companion doc coverage 100 (target 90) w1 94
Maintain companion `*.zig.md` design documentation alongside top-level production `src/*.zig` modules.
All 1 measured check(s) passed target thresholds.
Factory & Trust
Smithers Cloud projections, cache-poisoning trust boundaries, Obsidian wiki links, and MCP agent readiness.
Factory projection sync 2 / 2 pass w2 100
Keep .smithers/factory.json and .smithers/home.json valid and projected from FACTORY.ts and HOME.ts.
All 2 measured check(s) passed target thresholds.
Trust boundary guard 4 / 4 pass w2 100
Enforce cache-write isolation, canonical main release gating, protected trust roots, and person-only merge policy.
All 4 measured check(s) passed target thresholds.
Wiki link integrity 15 / 15 pass w1.5 100
Maintain all core .smithers/wiki pages and Mythical History with zero broken Obsidian wikilinks.
All 15 measured check(s) passed target thresholds.
Mcp and agent readiness 3 / 3 pass w1 100
Keep .mcp.json, AGENTS.md, and one-time sandbox auth tooling wired to smithers.sh/evmts/guillotine-mini/mcp.
All 3 measured check(s) passed target thresholds.