Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default defineConfig({
label: "user-guide",
paths: ["start-here/**", "guides/**"],
description:
"User-facing pages only: install, quick-start, editor integration guides, group + migration guides.",
"User-facing pages only: install, quick-start, editor integration guides, group and indexing guides.",
},
{
label: "agents",
Expand Down
27 changes: 13 additions & 14 deletions packages/docs/src/content/docs/architecture/adrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ DuckDB via `@duckdb/node-api` plus the `hnsw_acorn` community
extension for filter-aware vector search and the official `fts`
extension for BM25. SQLite + `sqlite-vec` was rejected because FTS5
has no filtered-HNSW story. Superseded as the default by ADR 0011 +
ADR 0013 (M7), but DuckDB is still the temporal-store backend and the
legacy single-file fallback.
ADR 0013, but DuckDB is still the temporal-store backend and the
single-file opt-in fallback.

[Read ADR 0001](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0001-storage-backend.md)

Expand Down Expand Up @@ -92,32 +92,31 @@ column, Phase 0 schema preflight.

### ADR 0011 — LadybugDB (phase-1)

Add `@ladybugdb/core` as the opt-in LadybugDB graph backend behind the
existing `IGraphStore` seam. Default stays on DuckDB through M3 – M6.
Motivation: recursive-CTE traversals on the polymorphic `relations`
table do not get faster, and the predicate cannot be pushed into the
graph walk.
Adds `@ladybugdb/core` as the LadybugDB graph backend behind the
`IGraphStore` seam. Motivation: recursive-CTE traversals on the
polymorphic `relations` table do not get faster, and the predicate
cannot be pushed into the graph walk.

[Read ADR 0011](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0011-graph-db-backend.md)

### ADR 0012 — Repo as a first-class graph node

Promote `repo_uri`, `default_branch`, and `group` to typed graph
attributes on a `Repo` node. Backs the M6 federation surface
attributes on a `Repo` node. Backs the cross-repo federation surface
(`group_query`, `group_status`, `group_contracts`, `group_list`,
`group_cross_repo_links`) and the structured `AMBIGUOUS_REPO`
envelope returned by per-repo tools.

[Read ADR 0012](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0012-repo-as-first-class-node.md)

### ADR 0013 — M7 default-flip + storage abstraction
### ADR 0013 — Storage default + interface segregation

Flip the default to LadybugDB and segregate `IGraphStore` from
`ITemporalStore`. The temporal half (cochanges, summary cache) stays
on DuckDB. Adds the community-adapter escape hatch (AGE / Memgraph /
Neo4j / Neptune) so OCH does not lock users into LadybugDB.
LadybugDB is the default backend and `IGraphStore` is segregated from
`ITemporalStore`. The temporal half (cochanges, summary cache) lives
on DuckDB. The community-adapter escape hatch (AGE / Memgraph /
Neo4j / Neptune) keeps OCH from locking users into LadybugDB.

[Read ADR 0013 (M7)](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0013-m7-default-flip-and-abstraction.md)
[Read ADR 0013](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0013-m7-default-flip-and-abstraction.md)

### ADR 0013 — Parse runtime: WASM default, native opt-in

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Cross-repo federation
description: Repo as a first-class graph node, the group registry, the AMBIGUOUS_REPO envelope, and the M5 / M6 design.
description: Repo as a first-class graph node, the group registry, the AMBIGUOUS_REPO envelope, and the cross-repo group_* MCP surface.
sidebar:
order: 27
---
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/content/docs/architecture/determinism.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ are pure: inputs in, relations out, no ambient state.

The `graphHash` invariant is **backend-independent**. A repo indexed
into LadybugDB (`graph.lbug`) and the same repo indexed into the
legacy DuckDB layout (`graph.duckdb`) at the same commit produce the
same hash. The M7 parity gate in CI compares the two hashes on every
single-file DuckDB layout (`graph.duckdb`) at the same commit produce
the same hash. A parity gate in CI compares the two hashes on every
PR that touches the storage layer.

## How we test it
Expand Down
3 changes: 2 additions & 1 deletion packages/docs/src/content/docs/architecture/lessons.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ The lessons that shape this codebase the most include:
- `architecture-patterns/scip-monorepo-dist-src-alias.md` — the
TypeScript monorepo `dist/` ↔ `src/` alias pattern.
- `architecture-patterns/igraphstore-itemporalstore-segregation.md`
— why M7 split the storage interface in two.
— why the storage interface is split into `IGraphStore` and
`ITemporalStore`.
- `architecture-patterns/typed-finders-replace-raw-sql-in-consumers.md`
— the call-site refactor that lets the graph backend swap
underneath consumer packages.
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/content/docs/architecture/monorepo-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Think of it as two layers:
Orchestrators import leaves; leaves do not import orchestrators. The
TypeScript project-references graph enforces this via `tsc --noEmit`.

## Storage — the M7 segregation
## Storage — interface segregation

`@opencodehub/storage` exposes two narrow interfaces — `IGraphStore`
(graph workload: nodes, edges, embeddings, multi-hop traversal) and
Expand All @@ -63,7 +63,7 @@ adapters implement them:
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 legacy fallback. One artifact
- **Single DuckDB file** — the opt-in fallback. One artifact
(`graph.duckdb`) backs both interfaces.

See [Storage backend](/opencodehub/architecture/storage-backend/) for
Expand Down
9 changes: 5 additions & 4 deletions packages/docs/src/content/docs/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ agent queries.
## Where the data lives

The default backend is **LadybugDB**, with **DuckDB** as the temporal
sibling. The legacy single-file DuckDB layout is still supported via
`CODEHUB_STORE=duck`. See [Storage backend](/opencodehub/architecture/storage-backend/).
sibling. A single-file DuckDB layout is the opt-in fallback when the
`@ladybugdb/core` binding cannot load (or when forced via
`CODEHUB_STORE=duck`). See [Storage backend](/opencodehub/architecture/storage-backend/).

```mermaid
flowchart LR
Expand Down Expand Up @@ -173,7 +174,7 @@ cheapest configuration that hits all three:
| 0007–0010 | Artifact factory, document pattern, output conventions, dogfood findings. |
| 0011 | LadybugDB (phase-1) — graph-native backend behind the `IGraphStore` seam. |
| 0012 | Repo as a first-class graph node — `repo_uri`, group registry, `AMBIGUOUS_REPO` envelope. |
| 0013 (M7) | Default-flip + interface segregation — LadybugDB by default, DuckDB temporal sibling. |
| 0013 (storage) | Storage default + interface segregation — LadybugDB by default, DuckDB temporal sibling. |
| 0013 (parse) | WASM-default parse runtime on Node 22 and Node 24. |
| 0014 | SCIP REFERENCES + TYPE_OF emission, embedder modelId stamping. |

Expand All @@ -184,7 +185,7 @@ See [ADRs](/opencodehub/architecture/adrs/) for the full list.
- [Monorepo map](/opencodehub/architecture/monorepo-map/) — every
workspace package and what it owns.
- [Storage backend](/opencodehub/architecture/storage-backend/) — the
M7 default-flip + interface segregation.
graph + temporal interface segregation and the resolver.
- [Cross-repo federation](/opencodehub/architecture/cross-repo-federation/)
— `repo_uri`, the group registry, and the `AMBIGUOUS_REPO` envelope.
- [Determinism](/opencodehub/architecture/determinism/) — the
Expand Down
35 changes: 16 additions & 19 deletions packages/docs/src/content/docs/architecture/storage-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ sidebar:
order: 25
---

OpenCodeHub's M7 storage layer is two narrow interfaces, two adapters,
OpenCodeHub's storage layer is two narrow interfaces, two adapters,
and a probe. The default is LadybugDB for the graph half and DuckDB
for the temporal half. The legacy single-file DuckDB layout is still
available as a fallback.
for the temporal half. A single-file DuckDB layout is available as an
opt-in fallback for environments where the LadybugDB binding cannot
load.

## The interfaces

Expand All @@ -24,10 +25,10 @@ available as a fallback.
Splitting the interfaces lets community adapters implement only the
half they have an engine for. A graph-only Neo4j adapter does not have
to handle cochange queries; a DuckDB-only deployment does not have to
implement Cypher. ADR 0013 (M7) describes the call-site refactor that
made this work — 108 raw-SQL call sites across `analysis/`, `mcp/`,
`pack/`, `wiki/`, and `cli/` now route through the typed finders on
the interfaces.
implement Cypher. ADR 0013 records the call-site refactor that made
this work — 108 raw-SQL call sites across `analysis/`, `mcp/`,
`pack/`, `wiki/`, and `cli/` route through the typed finders on the
interfaces.

## The two adapters that ship

Expand All @@ -41,10 +42,10 @@ Two artifacts on disk:
| `<repo>/.codehub/temporal.duckdb` | Cochanges, symbol-summary cache — everything `ITemporalStore` owns. |

The graph half speaks Cypher natively and stores each edge kind in
its own physical layout, which is the part of the M7 motivation that
DuckDB's polymorphic `relations` table could not match.
its own physical layoutthe part of the motivation that DuckDB's
polymorphic `relations` table could not match.

### Single DuckDB file (legacy / fallback)
### Single DuckDB file (opt-in fallback)

| File | Holds |
|---|---|
Expand Down Expand Up @@ -108,19 +109,15 @@ ADR 0013 names the four explicitly.

The `graphHash` invariant holds across both adapters. A repo indexed
into LadybugDB and the same repo indexed into DuckDB at the same
commit produce the same hash. The CI parity gate that landed with M7
asserts this on every PR that touches `packages/storage`.
commit produce the same hash. A CI parity gate asserts this on every
PR that touches `packages/storage`.

The implication: a developer can switch backends on a working repo
without re-indexing, as long as both artifact files exist. See
[Migrating from DuckDB](/opencodehub/guides/migrating-from-duckdb/)
for the recipe.
without re-indexing, as long as both artifact files exist.

## See also

- [ADR 0011 — LadybugDB (phase-1)](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0011-graph-db-backend.md)
- [ADR 0013 (M7) — Default-flip + interface segregation](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0013-m7-default-flip-and-abstraction.md)
- [ADR 0011 — LadybugDB graph backend](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0011-graph-db-backend.md)
- [ADR 0013 — Storage default + interface segregation](https://github.com/theagenticguy/opencodehub/blob/main/docs/adr/0013-m7-default-flip-and-abstraction.md)
- [Configuration](/opencodehub/reference/configuration/) — env vars
and on-disk layout.
- [Migrating from DuckDB](/opencodehub/guides/migrating-from-duckdb/)
— how to move an existing index.
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,10 @@ Meta-scopes cover cross-cutting changes:
| `repo` | Root-level repo files (`.gitignore`, `mise.toml`, etc.) |
| `release` | Release-please-authored PRs only |

## Breaking changes on 0.x
## Breaking changes

OpenCodeHub is pre-1.0. The breaking-change rule is version-dependent:

- **On 0.x:** `feat!` and a `BREAKING CHANGE:` footer both bump the
**minor** version (0.4.2 → 0.5.0).
- **After 1.0.0:** the same signals bump the **major** version.
A `feat!` and a `BREAKING CHANGE:` footer both bump the **major**
version.

The `!` form is the short one:

Expand Down
13 changes: 4 additions & 9 deletions packages/docs/src/content/docs/contributing/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,11 @@ Hidden sections still land in git history and still trigger a patch bump
format: `<package-name>-v<semver>` (e.g. `@opencodehub/cli-v0.4.2`) plus
a root tag `root-v0.4.2`.

## Breaking changes on 0.x
## Breaking changes

While OpenCodeHub sits on `0.x.y`, a `feat!` or `BREAKING CHANGE:`
footer bumps the **minor** version, not the major. That is intentional:
the 0.x prefix signals "not yet stable" and we want the freedom to break
things without forcing a 1.0 → 2.0 stampede.

After the first 1.0.0 release, the same signals bump the major version.
See the breaking-change section in
[Commit conventions](/opencodehub/contributing/commit-conventions/#breaking-changes-on-0x).
A `feat!` or `BREAKING CHANGE:` footer bumps the major version. See
the breaking-change section in
[Commit conventions](/opencodehub/contributing/commit-conventions/#breaking-changes).

## What you do when your PR lands

Expand Down
7 changes: 3 additions & 4 deletions packages/docs/src/content/docs/guides/indexing-a-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ root.

The default backend is **LadybugDB** for the graph half +
**DuckDB** for the temporal sibling. Set `CODEHUB_STORE=duck` to
force the legacy single-file DuckDB layout. See
[Storage backend](/opencodehub/architecture/storage-backend/) and
[Migrating from DuckDB](/opencodehub/guides/migrating-from-duckdb/).
force the single-file DuckDB layout. See
[Storage backend](/opencodehub/architecture/storage-backend/).

## Basic indexing

Expand Down Expand Up @@ -94,7 +93,7 @@ On the default LadybugDB layout:
| `scan.sarif` | SARIF scan output when `codehub scan` has run. |
| `sbom.cyclonedx.json` / `sbom.spdx.json` | SBOMs when `codehub analyze --sbom` has run. |

On the legacy DuckDB layout, `graph.duckdb` replaces both
On the single-file DuckDB fallback, `graph.duckdb` replaces both
`graph.lbug` and `temporal.duckdb`.

## Other useful flags
Expand Down
Loading
Loading