Skip to content

worked: add opencode TypeScript corpus (406 files, 12.6x reduction, honest review)#400

Open
sdeonvacation wants to merge 1 commit intosafishamsi:v4from
sdeonvacation:feat/serve-improvements
Open

worked: add opencode TypeScript corpus (406 files, 12.6x reduction, honest review)#400
sdeonvacation wants to merge 1 commit intosafishamsi:v4from
sdeonvacation:feat/serve-improvements

Conversation

@sdeonvacation
Copy link
Copy Markdown

What this adds

A new worked example in worked/opencode/ — a real production run on the opencode codebase (packages/opencode/src/, 406 TypeScript/TSX files).

Why opencode

  • Real production code, not synthetic. A TypeScript AI coding assistant using Effect-ts, Solid.js, SQLite, Vercel AI SDK.
  • Different failure modes than the existing examples (Python/karpathy). Shows how graphify behaves on a functional TypeScript codebase with short common method names.
  • Honest review — scores 4.3/10 overall, calls out 3 specific bugs with repro steps.

Results

Metric Value
Files 406 TypeScript/TSX/JS
Nodes / Edges 1,772 / 2,958
Token reduction 12.6x
Extraction cost 0 (AST-only)
Real communities 38 of 213 (175 single-file isolates)

Bugs found and documented in review.md

  1. Generic method names dominate god nodespush(), get(), set() with 40–72 edges each. Useless for TypeScript codebases with functional patterns. All 10 god nodes are JavaScript built-in method names, none are architectural concepts.

  2. INFERRED edges appear in AST-only graphify update run — 34% of 2,958 edges are INFERRED (avg confidence 0.8) after an AST-only update. Expected: 0% INFERRED. At least one verified false positive: killTree() --calls--> sleep().

  3. TypeScript barrel file re-exports not resolved — Modules using index.ts re-exports appear as isolated single-file communities. 175 of 213 communities are single-file isolates.

Checklist

  • Real run (not simulated)
  • Honest scores with specific findings
  • Bugs documented with repro steps
  • README.md, GRAPH_REPORT.md, graph.json, review.md all present

Real production run on opencode/packages/opencode/src (406 TS/TSX files).
12.6x token reduction. Honest review calling out 3 bugs:
- Generic method names dominate god nodes (push/get/set useless)
- INFERRED edges appearing in AST-only update run
- TypeScript barrel file re-exports not resolved

Score: 4.3/10 overall. Useful as search index, misleading as arch map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant