Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Design model

Platform spec article

Design model

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Nexus must align with tracker and site chrome:

ElementContract
LayoutTop navbar (not sidebar)
KickerBeskid / Nexus / {repo}
Repo switch<Select> bound to public catalog
SearchSymbol search over active graph
ThemeLight/dark toggle
HubBeskidHub launcher from @beskid/beskid-ui

Interactive UI must use @beskid/ui-react primitives via the #/components/ui alias. Styles must import @beskid/ui-react/styles/shadcn-entry.css and @beskid/beskid-ui/styles/hub.css.

RuleBehavior
N-01/ must load the first enabled, indexed catalog entry by ascending sortOrder
N-02When no indexed entry exists, show empty state with sign-in CTA for repo owners
N-03Deep link ?repo=<catalog-id> must select that entry and load its graph
N-04Default view must be the graph explorer — not a catalog home grid

Admin flows (add repo, re-index, delete) must appear as dialog or sheet overlays, not separate full-page phases.

The server maintains catalog.json — the authoritative list of public Nexus entries.

FieldRole
idStable catalog identifier; used in ?repo= and admin routes
displayName, description, gitUrl, defaultBranchPublic metadata
sortOrderLanding and selector ordering
indexed, registryNameWhether a LadybugDB export exists and its storage key
lastIndexedCommit, indexedAt, statsIndex freshness and graph size
docStatusCoarse doc pipeline state (idle | running | failed | ready) — no AI vendor details

Index pipeline: clone → analyze worker → .gitnexus/ index → optional code-doc maintenance worker.

Two distinct layers. Implementations must never merge or paraphrase platform spec into code documentation.

LayerSourceStored inPublic exposure
Code documentationGraph + source snippetscode-docs/{registryName}.jsonproperties.codeDoc on graph nodes/clusters
Platform specsite/website/.../platform-spec/Site only — not copiedNever inlined
Spec linksRead-only spec index searchSame JSON sidecarproperties.specLinks{ title, href }[]
interface CodeDocRecord {
entityId: string;
entityKind: 'node' | 'cluster';
/** Repo-scoped explanation. Must NOT contain platform-spec prose. */
codeDoc: string;
/** 0–3 canonical platform-spec URLs. href must exist in spec index. */
specLinks: Array<{ title: string; href: string }>;
contentHash: string;
updatedAt: string;
}

Doc worker rules:

  1. Code doc text is generated solely from graph context and file snippets.
  2. Spec search is used only by resolve_spec_links to propose canonical URLs — models must not invent paths.
  3. When a spec page fully covers a topic, codeDoc stays brief and points via specLinks.
  4. Anti-copy validation rejects records where codeDoc contains long n-grams matching spec index chunks.

Public graph API must merge codeDoc and specLinks as separate node properties. UI must render them in distinct sections.

┌─────────────────────────────────────────────────────────────┐
│ gitnexus serve (single process) │
├─────────────────────────────────────────────────────────────┤
│ /api/catalog public registry + graph metadata │
│ /api/graph cached LadybugDB export (stream) │
│ /api/admin/catalog/* repo-owner gated CRUD + analyze │
│ /api/mcp StreamableHTTP (Bearer token) │
│ /api/internal/code-docs/* server-only job status (no UI) │
├─────────────────────────────────────────────────────────────┤
│ catalog.json → clone → analyze → .gitnexus/ index │
│ post-analyze → doc-maintenance (OpenRouter, hidden) │
│ code-docs/{registryName}.json │
│ spec-index.json (read-only link resolution) │
└─────────────────────────────────────────────────────────────┘
RuleContract
N-MCP-01MCP endpoint must be same-origin {origin}/api/mcp
N-MCP-02Transport must require Authorization: Bearer $NEXUS_MCP_AUTH_TOKEN
N-MCP-03Header button Connect MCP must be visible when user is signed in
N-MCP-04Dialog must show endpoint URL, auth header template, copy actions, and link to MCP contracts

Token value is a deployment secret — UI shows placeholder guidance for operators, not the live secret.

On mutating catalog operations the server must call GitHub GET /repos/{owner}/{repo} with the user’s hub token and require permissions.admin or owner login match. Env-based admin rosters must not gate per-repo CRUD (operator setup endpoints excepted).