Skip to content

Monorepo map

OpenCodeHub is a pnpm workspace under packages/*. Seventeen TypeScript packages plus the documentation site. The CLI is the only binary; every other package is a library imported by cli, mcp, ingestion, or analysis.

PackageFolderPurpose
@opencodehub/analysispackages/analysisimpact, rename, detect_changes, staleness, group cross-repo links.
@opencodehub/clipackages/cliThe codehub binary (analyze, setup, mcp, query, context, impact, sql, group, scan, verdict, code-pack, …).
@opencodehub/cobol-proleappackages/cobol-proleapOptional JVM ProLeap deep-parse bridge for COBOL — gated behind --allow-build-scripts=proleap.
@opencodehub/core-typespackages/core-typesShared graph schema, LanguageId, RelationType, determinism primitives.
@opencodehub/embedderpackages/embedderDeterministic ONNX embedder (gte-modernbert-base), modelId fingerprint, three-backend cascade.
@opencodehub/frameworkspackages/frameworksFive-stage framework detector (manifest → lockfile → config-AST → folder → import/SCIP) over a curated registry.
@opencodehub/ingestionpackages/ingestionThe indexing pipeline (parse, resolve, scip-index, embeddings, communities, processes, summaries, …).
@opencodehub/mcppackages/mcpThe stdio MCP server, 29 tool registrations, 7 resources, the error envelope, the staleness _meta block.
@opencodehub/packpackages/packDeterministic 9-item code-pack BOM (the artifact attached to every release).
@opencodehub/policypackages/policyopencodehub.policy.yaml loader, validator, evaluator.
@opencodehub/sarifpackages/sarifSARIF 2.1.0 Zod schemas, merge + enrich, suppressions, baseline diffing.
@opencodehub/scannerspackages/scannersTwenty scanner wrappers (semgrep, osv-scanner, bandit, ruff, grype, vulture, pip-audit, npm-audit, biome, betterleaks, detect-secrets, trivy, checkov, hadolint, tflint, spectral, radon, ty, clamav, och self-scan).
@opencodehub/scip-ingestpackages/scip-ingest.scip protobuf reader + per-language indexer runners (TypeScript, Python, Go, Rust, Java, .NET, clang, Kotlin, Ruby).
@opencodehub/searchpackages/searchHybrid BM25 + RRF search.
@opencodehub/storagepackages/storageThe IGraphStore / ITemporalStore interface segregation, the LadybugDB and DuckDB adapters, the resolver that picks between them.
@opencodehub/summarizerpackages/summarizerStructured per-symbol summarizer (Haiku 4.5 via Bedrock Converse + Zod 4).
@opencodehub/wikipackages/wikiMarkdown wiki renderer (architecture, api-surface, dependency-map, ownership-map, risk-atlas) over the graph.
@opencodehub/docspackages/docsThis Starlight documentation site.

The only packaged executable is codehub under @opencodehub/cli. Every other package is a library imported by cli, mcp, ingestion, or analysis.

Think of it as two layers:

  • Leaf libraries. core-types, sarif, embedder, storage, search, summarizer, scip-ingest, frameworks, pack, policy, cobol-proleap.
  • Orchestrators. ingestion, analysis, scanners, mcp, wiki, cli.

Orchestrators import leaves; leaves do not import orchestrators. The TypeScript project-references graph enforces this via tsc --noEmit.

@opencodehub/storage exposes two narrow interfaces — IGraphStore (graph workload: nodes, edges, embeddings, multi-hop traversal) and ITemporalStore (temporal workload: cochanges, summary cache). Two adapters implement them:

  • LadybugDB graph store + DuckDB temporal store — the default. Two artifacts on disk (graph.lbug + temporal.duckdb), backed by a Cypher-emitting dialect for the graph half and DuckDB SQL for the temporal half.
  • Single DuckDB file — the opt-in fallback. One artifact (graph.duckdb) backs both interfaces.

See Storage backend for the resolver, the dual-artifact precedence rule, and the community-adapter escape hatch (AGE / Memgraph / Neo4j / Neptune).

  • pnpm-workspace.yamlpackages/* glob.
  • .release-please-config.json — which packages are versioned.
  • packages/*/package.json — per-package name and description.