Skip to harness content
Open technical reference map

Mechanism source reference

GitNexus / Code Intelligence Gate

Complete canonical source reference from docs/CODE_INTELLIGENCE_GRAPH.md.

Canonical pathdocs/CODE_INTELLIGENCE_GRAPH.mdRevision69bab1cInspect source

GitNexus / Code Intelligence Gate

code-intelligence remains the stable harness node ID, but the preferred backend for that node is now GitNexus-backed code intelligence. LLMs should not navigate a non-trivial codebase from vibes, memory, or file-name guesses.

Required flow position

intake → route → code-intelligence → design-anchors → system-design → production-readiness → cloud-platform → implement → redzone → qa-break-it → prove → live-smoke → self-heal → handoff

Artifacts

ArtifactPurpose
graph/gitnexus.jsonGitNexus index evidence: package, license boundary, command, status, output, and index alias.
graph/graph.jsonStable Valdris graph artifact consumed by the harness.
graph/freshness.jsonCommit/freshness proof for the graph.
design/anchors.jsonFiles/symbols the agent must cite before architecture, refactor, debugging, or cross-file implementation claims.

Local commands

npm run code-intelligence:scan
npm run code-intelligence:gate

Use the strict path when fallback is not acceptable:

npm run code-intelligence:scan:strict
npm run code-intelligence:gate

Backend boundary

The harness invokes GitNexus externally:

npx -y gitnexus@latest analyze . --index-only --name <repo-alias> --force --worker-timeout 60

It does not vendor or redistribute GitNexus code. GitNexus is licensed PolyForm Noncommercial 1.0.0, so commercial/product use needs license review or a commercial permission path.

If GitNexus is unavailable, code-intelligence-scan.mjs --fallback local can still produce the stable graph/freshness/anchor artifacts from the local static scanner. That fallback must be disclosed in the handoff; never claim GitNexus-backed analysis unless graph/gitnexus.json says ok: true and code-intelligence-gate passes.

Skip rule

The code-intelligence node may only be skipped for docs-only/non-code work. The run must emit explicit skip reasons for both:

  • code-intelligence
  • design-anchors

Why this exists

The code-intelligence gate is the harness map layer. It helps agents answer:

  • where code lives,
  • what imports/calls what,
  • which files are likely entrypoints,
  • what blast radius a change may have,
  • what concrete files/symbols the design is anchored to.