Skip to content

Monorepo map

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

PackageFolderPurpose
@opencodehub/analysispackages/analysisimpact, 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 (F2LLM-v2-80M, 320-dim), 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, 28 tool registrations (all read-only with respect to user source), 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/scannersNineteen scanner wrappers (semgrep, betterleaks, osv-scanner, bandit, biome, pip-audit, npm-audit, trivy, checkov, checkov-docker-compose, hadolint, tflint, spectral, ruff, grype, vulture, radon, ty, clamav).
@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 graph adapter and DuckDB temporal adapter, and openStore() that composes 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). The single shipping pair implements them:

  • LadybugDB graph store + DuckDB temporal store — always. 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. IGraphStore lives only on GraphDbStore; DuckDbStore implements ITemporalStore only; openStore() composes them. There is no backend selector and no fallback (ADR 0016) — a missing LadybugDB binding throws GraphDbBindingError.

See Storage backend for how openStore() composes the pair and the community-adapter escape hatch (AGE / Memgraph / Neo4j / Neptune via the segregated interfaces).

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