stagehub

A staging environment for code

Repo
stagehub banner

About

## What is the deployed URL for this project? https://github.com/NightWing1998/stagehub

## How Did You Use Claude? ## Claude is the intelligence layer

We used Claude in two distinct ways, and the distinction is the most important design decision in the project.

### 1. In the product: Claude explains what the graph proved

When a push produces findings, stagehub makes **one** `claude-opus-5` call for the whole review. Each finding is sent with its proof chain and ±8 lines of real source around the impacted call site. We use **structured output** (`output_config.format` with a JSON schema) so the response maps directly onto database rows, and `effort: "low"` because a live demo is waiting on it.

What comes back is a reviewer, not a summarizer:

> "parseBackendFreelistType references bbolt.FreelistArrayType, which no longer exists, so etcd-server's embed package fails to compile (undefined: bbolt.FreelistArrayType)." > > **fix** — In etcd-server/embed/config.go, drop the bbolt.FreelistArrayType reference and return the new FreelistKind value, matching bbolt's renamed field.

It names the exact compiler error, which is checkable. And two hops out at `StartEtcd()` it correctly says **"no change needed here"**, pointing the fix back at the real site instead of proposing an edit where the symptom merely surfaced. Distinguishing a direct user from a transitive caller is the difference between a reviewer and a search result.

### 2. The deliberate constraint: severity is never asked of the model

**Claude finds how the bug impacts the system**

Reachability is proven by recursive Cypher over the call graph, so severity is graph-derived and never asked of the model. Claude's job is prose: *why does this break*, and *what should I change*.

## How you are solving it? ## A staging environment for code

You push to **stagehub** instead of your upstream remote. On every push to master it reviews the change **against every other repo in the org**, then an admin merges upstream or blocks.

### The pipeline

**1. Index the org (once per repo set).** Every repo is parsed into a symbol graph. Go uses Go's own stdlib `go/parser`; TypeScript uses ts-morph. Both emit the *same* index shape, so everything downstream is language-agnostic.

**2. Link across repo boundaries.** This is the hard part, and we solve it three ways: - **Go** — import paths are fully qualified, so the module path is a prefix and the remainder is the package directory. An exact id match, not a heuristic. - **npm** — `package.json` name matched against the bare import specifier. - **HTTP** — an endpoint becomes a graph node with a *globally shared id* (`http:POST /v1/charge`). Two repos indexed independently write the same node and converge with no join at all. This is how we catch wire-contract breaks that no compiler sees.

Crucially, **each repo is indexed in isolation** — we deliberately do not resolve `node_modules`. Anything crossing a package boundary becomes a pending import for the link pass. Resolving through a symlink would work on a laptop and prove nothing.

**3. On push: AST-diff, not text-diff.** We `git archive` both the old and new sha, index both sides, and diff the symbol tables. A rename is a *rename*, not two unrelated text edits. Deltas are typed: `field-rename`, `enum-change`, `signature-change`, `symbol-removed`.

**4. Query the graph.** A recursive Cypher query over an embedded Kuzu graph does reverse reachability, up to 6 hops, with one predicate that defines the entire product:

```cypher

WHERE caller.repo <> changed.repo ```

That single line is what makes this cross-repo analysis rather than a linter.

### Stack

Next.js + TypeScript · embedded Kuzu graph database · Postgres · Go stdlib parser · ts-morph · Claude Opus 5. 15 regression tests covering extraction, cross-repo linking and AST diffing.

## What is the problem your project solves? ## Every repo is green. The system is broken.

Large engineering orgs do not live in one repository. Prometheus, Docker, Kubernetes, etcd — each is **dozens of separately versioned repos**. Every one has its own CI, its own reviewers, its own release cycle.

And that is exactly the problem: **code review is scoped to a single repository.** A pull request is reviewed against the repo it lands in. CI runs the tests of the repo it lands in. Nobody — no human, no compiler, no test suite — reviews the *seams between* repos.

### Why it matters

This class of bug is expensive precisely because it is invisible at review time. The person best equipped to fix it — the author, at the moment of the change, with full context — never learns it exists. Instead it surfaces as a mysterious build failure in a repo they may not own.

The wire-contract version is worse still: rename a JSON field or re-case an enum value and *nothing* fails to compile. A producer and a consumer simply stop agreeing, silently, in production.

We staged prod. Nobody staged code.

Screenshots

stagehub screenshot 1stagehub screenshot 2stagehub screenshot 3

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.