Sunday, November 15, 2026

3 Tools to Understand Any GitHub Repo — Tested on a MacBook (Understand Anything, Graphify, GitNexus)

3 Tools to Understand Any GitHub Repo — Tested on a MacBook

This started with a Facebook reel by Shirin Khosravi Jam — "3 tools to help you understand any GitHub repo". The reel names three tools: Understand Anything (a guided tour of a repo in plain English), Graphify (a visual map of how code and docs connect), and GitNexus (dependencies and blast radius before you edit). I took all three, ran them against a sample billing microservice, and wrote down exactly what worked, what did not, and how they fit into a DevOps workflow. Everything below was verified live — the sample outputs are real outputs, not marketing copy.

If you just want the files: the full guide and the three test scripts are at the bottom of this post. Every command is paste-safe for zsh — pure commands, no comment lines.

The three tools at a glance

ToolWhat it doesLicenseCostLinks
Understand AnythingClaude Code / Copilot plugin. Runs a 7-phase pipeline over a repo, builds a knowledge graph, and gives you guided tours ordered by dependency, plus an interactive dashboard.MITFree. Cost is LLM tokens on the first run; local Ollama supported.Site · GitHub · Live demo
GraphifyPython CLI + assistant skill. Tree-sitter parses code locally into a knowledge graph; docs and PDFs get an LLM semantic pass. Outputs an interactive HTML map, a plain-language report, and graph.json.Apache-2.0Free. Code-only mode needs no key at all. Graphify Cloud is a separate paid product you do not need.Site · GitHub · Docs
GitNexusNode CLI + MCP server. Indexes a repo into an embedded graph database and answers "what breaks if I change this?" — impact, context, trace, detect-changes, query.PolyForm Noncommercial 1.0.0 — NOT open sourceFree for noncommercial use only. Commercial use needs a license from Akon Labs.Site · GitHub · Akon Labs

Read the GitNexus license before using it at work. PolyForm Noncommercial does not cover commercial use. Personal learning and evaluation on your own machine are fine; indexing your employer's repos for day-to-day work needs the commercial license. Understand Anything (MIT) and Graphify (Apache-2.0) have no such restriction.

What I verified, and what I did not

Test repo: a small sample microservice (sample-svc) — a Python billing service with a Jenkinsfile, a Groovy shared-library step, a Dockerfile, a Kubernetes Deployment, and a runbook.

ToolVerifiedResult
Graphify 0.9.109Install in a venv, extract --code-only, cluster-only, god-nodes, explain, affected, query — all headless, zero API cost42 nodes, 50 edges, 8 communities, 100% EXTRACTED, 0 tokens. God nodes: charge(), refund(), send_email(), create_order().
GitNexus 1.6.12analyze --index-only, status, impact, context, detect-changesIndex built in 19.9s: 51 nodes, 62 edges, 2 clusters, 2 flows. impact charge → 1 impacted, risk LOW (only create_order). detect-changes on a 1-line edit → 1 file, 1 symbol, risk medium, flow named.
Understand AnythingRepo cloned; 9 skills and the 7-phase pipeline confirmed in the skill files; install script and viewer URL checkedFull /understand run NOT tested here — it only runs inside an AI agent session (Claude Code / Copilot) with a model. That part runs on your machine.

Two honest limits, found by testing: neither tool parses Jenkins Groovy. Graphify skips the Jenkinsfile and extracts no symbols from a .groovy shared-library step; GitNexus indexes the files but the step is not a symbol. Shared-library tracing still starts with git grep across repos — the tools take over on the application code after that. Also, Graphify's code-only mode skips docs entirely, and GitNexus query needs a full-text-search extension that failed to install in my run — fix with npx gitnexus analyze --repair-fts.

Tool 1 — Understand Anything: the guided tour

How it works: you run /understand inside your AI coding agent. A 7-phase pipeline scans the project, extracts structure (files, functions, classes, imports), batches the code through the model for plain-English summaries and architectural layering, merges it into a knowledge graph, and writes .ua/knowledge-graph.json in the project. Guided tours are generated ordered by dependency, so you learn the codebase in the right order. /understand-chat answers questions, /understand-explain deep-dives one component, /understand-onboard is the new-joiner path, and /understand-dashboard opens the interactive graph in a browser. Later runs only re-read changed files.

Setup for VS Code + GitHub Copilot (not Claude Code): VS Code with Copilot v1.108+ auto-discovers the plugin from .copilot-plugin/plugin.json when the repo is cloned. For personal skills across all projects, run the installer with the vscode platform — it symlinks the skills into ~/.copilot/skills.

bash test-understand-anything.sh

Or by hand:

curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s vscode
ls ~/.copilot/skills/ | grep understand

Then, inside VS Code with a project open, in Copilot chat:

/understand
/understand-dashboard

Try it before installing anything: the live demo is a fully interactive graph in the browser. Local-model note: the plugin can point at Ollama instead of a cloud model, which keeps your code on your machine — that matters for work repos. The first run on a large repo is the expensive one, so start on a small repo before pointing it at a 500-file service.

Where it fits: day-one onboarding onto an unfamiliar microservice, and the "explain this repo to me" step before you touch anything. It is the only one of the three that writes guided tours and plain-English summaries for every node.

Tool 2 — Graphify: the map of code (and, with a model, docs)

How it works: graphify extract parses code locally with tree-sitter (no network, no key, deterministic) and, if an LLM backend is configured, sends docs, PDFs and images through it for semantic links. Everything lands in graphify-out/: graph.html (interactive map), GRAPH_REPORT.md (plain-language summary: god nodes, surprising connections, suggested questions), and graph.json (queryable without re-reading the code). Every edge is tagged EXTRACTED (from the source) or INFERRED (guessed by the model), so you can see what is certain and what is a guess.

Install and run:

bash test-graphify.sh

Or by hand (macOS, uv is the documented route; pipx works too):

brew install python@3.12 uv
uv tool install graphifyy
graphify install

Then, in any repo. Headless, no model:

graphify extract . --code-only
graphify cluster-only . --no-label
graphify god-nodes --top 10
graphify explain "charge"
graphify affected "charge"
graphify query "what calls charge"

Note the argument order: the path comes first (extract . --code-only). extract --code-only . fails with "must specify a path to scan". Real output from the sample repo:

[graphify extract] wrote graphify-out/graph.json: 42 nodes, 50 edges, 8 communities
Graph Report - sample-svc
  42 nodes · 50 edges · 8 communities
  Extraction: 100% EXTRACTED · 0% INFERRED · 0% AMBIGUOUS
  Token cost: 0 input · 0 output
God Nodes (most connected - your core abstractions)
  1. charge() - 5 edges
  2. refund() - 5 edges
  3. send_email() - 5 edges
  4. create_order() - 5 edges

The query is the useful one. graphify query "what calls charge" showed the receipt from charge flows into both send_email and send_slack — so changing the receipt shape breaks notifications too. With your local Ollama (the docs + code map from the reel):

uv tool install "graphifyy[ollama]"
graphify extract . --backend ollama

Useful extras: graphifyy[terraform] parses .tf / .tfvars / .hcl files, and graphifyy[mcp] adds an MCP server so an agent can query the graph. No telemetry is collected; query logging can be turned off with GRAPHIFY_QUERY_LOG_DISABLE=1.

Where it fits: the "map the feature" step — pick a feature, open graph.html, and see the code and docs connected to it. Also the cheapest onboarding artifact you can commit: GRAPH_REPORT.md reads like a senior engineer's onboarding notes, and graph.json lets an agent answer questions without re-reading the repo.

Tool 3 — GitNexus: the blast radius before you edit

How it works: gitnexus analyze parses the repo with tree-sitter into an embedded graph database (LadybugDB) in a local .gitnexus/ folder. Then you ask it questions: impact (blast radius of a symbol), context (callers, callees, flows for one symbol), trace (shortest path between two symbols), detect-changes (map a git diff to the flows it touches), query (search the graph). An MCP server (gitnexus mcp) exposes the same tools to an AI agent so it checks impact before editing instead of guessing.

Install and run:

bash test-gitnexus.sh

Or by hand (needs Node 22.18+ on 22.x, or 24.11+):

npx gitnexus analyze --index-only
npx gitnexus status
npx gitnexus impact charge
npx gitnexus context charge

Use --index-only when you just want the index: plain analyze also writes AGENTS.md / CLAUDE.md context files and registers hooks in the repo. For repeated use: npm install -g gitnexus. Real output from the sample repo:

GitNexus Impact (1.6.12)
  target: Function:src/billing.py:charge
  direction: upstream
  impactedCount: 1
  risk: LOW
  summary: direct 1, processes_affected 1, modules_affected 1
  affected_processes: create_order (src/main.py)

GitNexus Detect Changes (1.6.12)
  Changes: 1 files, 1 symbols
  Affected processes: 1
  Risk level: medium
  Changed symbols: Function charge → src/billing.py
  Affected execution flows: Create_order → Gateway_charge (3 steps) — changed: charge

Where it fits: the "change safely" step — before a refactor, a dependency upgrade, or a shared-code edit, run impact on the symbol and read the risk. In CI, gitnexus blastradius --diff HEAD~1 --json (or detect-changes) can flag a PR that touches a high-fan-out function for manual review. The MCP wiring is the real prize for agent work: the agent asks the graph instead of guessing callers. Limits: the noncommercial license (see above); setup does not cover VS Code / Copilot — wire the MCP server into VS Code's mcp.json by hand (gitnexus mcp over stdio); query needs the full-text-search extension — if it returns empty results, run npx gitnexus analyze --repair-fts.

The pipeline: understand → map → change safely

The three tools overlap, but they form a clean sequence on an unfamiliar repo:

1. Understand (Understand Anything): /understand, read the guided tour, ask /understand-chat what the entry points are. You now know what the repo is for and where to start.
2. Map (Graphify): graphify extract + open graph.html or read GRAPH_REPORT.md. Pick the feature you own and trace its nodes. God nodes tell you the core abstractions; surprising connections catch the hidden coupling.
3. Change safely (GitNexus): before editing, gitnexus impact <symbol>. After editing, gitnexus detect-changes on the diff. Merge only when the blast radius matches what you expected.

Worked example on the sample repo — changing charge() in billing.py:

graphify explain "charge"
graphify affected "charge"
npx gitnexus impact charge
npx gitnexus context charge

Expected picture (verified live): charge is called only by create_order in main.py and calls gateway_charge itself. Blast radius is 1 function, risk LOW. The edit is safe as long as the receipt dict shape stays the same — and that shape is exactly what send_email and send_slack consume downstream, which graphify query "what calls charge" shows in one traversal.

DevOps scenarios

1. Onboarding onto an unfamiliar microservice. You inherit a Spring Boot service with 400 files and no README worth reading. Run /understand and /understand-dashboard, then graphify extract . --code-only and graphify god-nodes --top 10. Read the tour first (what the service does, entry points, in dependency order), then the god nodes (the 5–10 functions everything flows through). Thirty minutes later you know where the config lives, where the DB calls are, and which class owns the retry logic — instead of spending a day grepping.

2. Tracing where a Jenkins shared-library step is used. Your deployService step changed, and you need every Jenkinsfile that calls it across 100+ repos. Neither tool parses Groovy, so this starts with text search, and the tools take over after that: git grep -l "deployService" -- '*.groovy' 'Jenkinsfile'. For each repo that calls it, run Graphify on the service code the step deploys and GitNexus impact on the service functions the deploy touches. The tools map the blast radius inside the service; the grep maps the blast radius across repos.

3. Blast radius of a dependency upgrade. You are bumping a shared library (say a payments SDK) across services, and you want to know what breaks before the PR goes out: npx gitnexus analyze --index-only, then npx gitnexus impact <sdk-entry-function>, then npx gitnexus detect-changes on your actual diff, and graphify affected "<sdk-entry-function>". Read impact first (how many callers, how deep, risk level), then detect-changes (which flows the diff touches). If the impacted count is above your comfort line, split the upgrade or add the affected services' owners as reviewers.

Honest limits and what costs money

Understand Anything: free (MIT). The money is LLM tokens on the first run; local Ollama removes that cost. Needs an AI agent — it is not a standalone app, and there is no "paste a GitHub URL, get a tour" mode. Graphify: free (Apache-2.0). Code-only mode is free and fully local. The docs/code semantic map needs a model — Ollama is free and local; a cloud model costs whatever that provider charges. GitNexus: free for noncommercial use only (PolyForm Noncommercial). Work use needs a commercial license from Akon Labs — price not published on the repo; ask them. No account or API key for the core CLI. None of the three is a replacement for SonarQube, Fortify, or Wiz — they map and explain code; they do not scan for vulnerabilities or misconfigurations. All three are young, fast-moving projects (GitNexus 1.6.12, Graphify 0.9.109, Understand Anything v2.9.0 era). Expect CLI flags and skill names to shift.

MacBook checklist

Understand Anything: run bash test-understand-anything.sh, restart VS Code, open a small repo, run /understand, then /understand-dashboard. Point Copilot at Ollama first if you want the run fully local. Graphify: run bash test-graphify.sh. Then try the real thing on one of your microservices: graphify extract . --backend ollama for the full code + docs map. GitNexus: run bash test-gitnexus.sh. If query comes back empty, run npx gitnexus analyze --repair-fts. Decide on the commercial license before indexing work repos; personal repos are fine as-is. All three: keep the graph files out of git unless you want them shared (.ua/, graphify-out/, .gitnexus/ — add to .gitignore).

The full test scripts

Save the three scripts below into one folder (for example ~/github-repo-tools-test/) and run each with bash from that folder. Each script is self-contained: it creates the sample repo if it is missing, installs the tool, and runs the test. Nothing here touches your real repos.

test-understand-anything.sh

#!/usr/bin/env bash
set -euo pipefail
PACK_DIR="$(cd "$(dirname "$0")" && pwd)"
SRC="$PACK_DIR/understand-anything-src"
if [ ! -d "$SRC" ]; then
git clone --depth 1 https://github.com/Egonex-AI/Understand-Anything "$SRC"
fi
ls "$SRC/understand-anything-plugin/skills/understand/SKILL.md"
ls "$SRC/understand-anything-plugin/skills/understand-dashboard/SKILL.md"
ls "$SRC/understand-anything-plugin/skills/understand-chat/SKILL.md"
ls "$SRC/understand-anything-plugin/skills/understand-onboard/SKILL.md"
ls "$SRC/understand-anything-plugin/skills/understand-explain/SKILL.md"
bash "$SRC/install.sh" vscode
ls "$HOME/.copilot/skills/" | grep understand
echo "DONE: skills installed for VS Code + Copilot"
echo "NEXT: restart VS Code, open a project, run /understand in Copilot chat"
echo "NEXT: then run /understand-dashboard to open the interactive graph"
echo "NEXT: no install needed to preview it first: open https://understand-anything.com/demo/ in a browser"

test-graphify.sh

#!/usr/bin/env bash
set -euo pipefail
PACK_DIR="$(cd "$(dirname "$0")" && pwd)"
SAMPLE="$PACK_DIR/sample-svc"
VENV="$PACK_DIR/venv-graphify"
if [ ! -d "$SAMPLE" ]; then
mkdir -p "$SAMPLE/src" "$SAMPLE/vars" "$SAMPLE/k8s" "$SAMPLE/docs"
cat > "$SAMPLE/README.md" << 'EOF'
# billing-svc

A small billing microservice (Python sample) used to demo repo-understanding tools.

## Architecture

- `src/main.py` — entrypoint. `create_order` is the top-level flow.
- `src/billing.py` — `charge` talks to the payment gateway; `refund` reverses it.
- `src/notify.py` — `send_email` and `send_slack` notifications.
- `vars/deployService.groovy` — Jenkins shared-library step used by the `Jenkinsfile`.
- `k8s/deployment.yaml` — Kubernetes Deployment for the service.

## Deploy

The Jenkinsfile calls the shared-library step `deployService` with the app name and environment. See `docs/runbook.md` for the on-call flow.
EOF
cat > "$SAMPLE/src/main.py" << 'EOF'
"""Entrypoint for billing-svc: order flow."""

from billing import charge, refund
from notify import send_email, send_slack


def create_order(order_id, amount, currency, customer_email):
    """Charge the customer, then notify them. Top-level flow."""
    receipt = charge(amount, currency)
    send_email(customer_email, receipt)
    send_slack("#billing", "order %s charged" % order_id)
    return receipt


def cancel_order(order_id, amount, currency, customer_email):
    """Refund the customer and notify them."""
    receipt = refund(amount, currency)
    send_email(customer_email, receipt)
    return receipt
EOF
cat > "$SAMPLE/src/billing.py" << 'EOF'
"""Billing logic: talks to the payment gateway."""

GATEWAY_URL = "https://payments.internal.example.com"


def charge(amount, currency):
    """Charge the gateway and return a receipt dict."""
    txn = gateway_charge(GATEWAY_URL, amount, currency)
    return {"status": "charged", "txn": txn, "amount": amount}


def refund(amount, currency):
    """Reverse a charge through the gateway."""
    txn = gateway_refund(GATEWAY_URL, amount, currency)
    return {"status": "refunded", "txn": txn, "amount": amount}


def gateway_charge(url, amount, currency):
    """Stub for the real gateway call (HTTP POST in production)."""
    return "txn-%s-%s" % (currency, amount)


def gateway_refund(url, amount, currency):
    """Stub for the real gateway refund call."""
    return "rfnd-%s-%s" % (currency, amount)
EOF
cat > "$SAMPLE/src/notify.py" << 'EOF'
"""Notifications: email and Slack."""


def send_email(address, receipt):
    """Send the receipt by email."""
    return "emailed %s receipt %s" % (address, receipt["txn"])


def send_slack(channel, message):
    """Post a message to a Slack channel."""
    return "posted to %s: %s" % (channel, message)
EOF
cat > "$SAMPLE/Jenkinsfile" << 'EOF'
@Library('platform-shared-lib') _

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                sh 'python3 -m compileall src'
            }
        }
        stage('Deploy') {
            steps {
                deployService(app: 'billing-svc', env: 'prod', chart: 'charts/billing')
            }
        }
    }
}
EOF
cat > "$SAMPLE/vars/deployService.groovy" << 'EOF'
def call(Map cfg) {
    echo "Deploying ${cfg.app} to ${cfg.env} with chart ${cfg.chart}"
    sh "helm upgrade --install ${cfg.app} ${cfg.chart} --namespace ${cfg.env} --wait"
    notifySlack("deployed ${cfg.app} to ${cfg.env}")
}

def notifySlack(String message) {
    echo "Slack: ${message}"
}
EOF
cat > "$SAMPLE/Dockerfile" << 'EOF'
FROM python:3.12-slim
WORKDIR /app
COPY src/ ./src/
CMD ["python3", "-m", "src.main"]
EOF
cat > "$SAMPLE/k8s/deployment.yaml" << 'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: billing-svc
spec:
  replicas: 2
  selector:
    matchLabels:
      app: billing-svc
  template:
    metadata:
      labels:
        app: billing-svc
    spec:
      containers:
        - name: billing-svc
          image: registry.internal.example.com/billing-svc:1.4.0
          ports:
            - containerPort: 8080
EOF
cat > "$SAMPLE/docs/runbook.md" << 'EOF'
# Runbook: billing-svc

## If charging fails

1. Check the gateway at `GATEWAY_URL` in `src/billing.py`.
2. `charge` is called by `create_order` in `src/main.py` — a bad receipt shape breaks both the email and the Slack notification.
3. Refunds go through `refund` in the same file; never edit `charge` without checking `refund` and `cancel_order`.

## Deploy

Deploys run through the Jenkins shared-library step `deployService` (`vars/deployService.groovy`), invoked from the `Jenkinsfile`.
EOF
cd "$SAMPLE"
git init -q
git config user.email "test@local"
git config user.name "Test"
git add -A
git commit -qm "sample billing microservice"
cd "$PACK_DIR"
fi
if [ ! -d "$VENV" ]; then
python3 -m venv "$VENV"
fi
"$VENV/bin/pip" install -q --upgrade pip
"$VENV/bin/pip" install -q graphifyy
"$VENV/bin/graphify" --version
cd "$SAMPLE"
"$VENV/bin/graphify" extract . --code-only
"$VENV/bin/graphify" cluster-only . --no-label
"$VENV/bin/graphify" god-nodes --top 5
"$VENV/bin/graphify" explain "charge"
"$VENV/bin/graphify" affected "charge"
"$VENV/bin/graphify" query "what calls charge"
ls graphify-out/
echo "DONE: open graphify-out/graph.html in a browser for the visual map"
echo "DONE: read graphify-out/GRAPH_REPORT.md for the plain-language summary"

test-gitnexus.sh

#!/usr/bin/env bash
set -euo pipefail
PACK_DIR="$(cd "$(dirname "$0")" && pwd)"
SAMPLE="$PACK_DIR/sample-svc"
if [ ! -d "$SAMPLE" ]; then
mkdir -p "$SAMPLE/src" "$SAMPLE/vars" "$SAMPLE/k8s" "$SAMPLE/docs"
cat > "$SAMPLE/README.md" << 'EOF'
# billing-svc

A small billing microservice (Python sample) used to demo repo-understanding tools.

## Architecture

- `src/main.py` — entrypoint. `create_order` is the top-level flow.
- `src/billing.py` — `charge` talks to the payment gateway; `refund` reverses it.
- `src/notify.py` — `send_email` and `send_slack` notifications.
- `vars/deployService.groovy` — Jenkins shared-library step used by the `Jenkinsfile`.
- `k8s/deployment.yaml` — Kubernetes Deployment for the service.

## Deploy

The Jenkinsfile calls the shared-library step `deployService` with the app name and environment. See `docs/runbook.md` for the on-call flow.
EOF
cat > "$SAMPLE/src/main.py" << 'EOF'
"""Entrypoint for billing-svc: order flow."""

from billing import charge, refund
from notify import send_email, send_slack


def create_order(order_id, amount, currency, customer_email):
    """Charge the customer, then notify them. Top-level flow."""
    receipt = charge(amount, currency)
    send_email(customer_email, receipt)
    send_slack("#billing", "order %s charged" % order_id)
    return receipt


def cancel_order(order_id, amount, currency, customer_email):
    """Refund the customer and notify them."""
    receipt = refund(amount, currency)
    send_email(customer_email, receipt)
    return receipt
EOF
cat > "$SAMPLE/src/billing.py" << 'EOF'
"""Billing logic: talks to the payment gateway."""

GATEWAY_URL = "https://payments.internal.example.com"


def charge(amount, currency):
    """Charge the gateway and return a receipt dict."""
    txn = gateway_charge(GATEWAY_URL, amount, currency)
    return {"status": "charged", "txn": txn, "amount": amount}


def refund(amount, currency):
    """Reverse a charge through the gateway."""
    txn = gateway_refund(GATEWAY_URL, amount, currency)
    return {"status": "refunded", "txn": txn, "amount": amount}


def gateway_charge(url, amount, currency):
    """Stub for the real gateway call (HTTP POST in production)."""
    return "txn-%s-%s" % (currency, amount)


def gateway_refund(url, amount, currency):
    """Stub for the real gateway refund call."""
    return "rfnd-%s-%s" % (currency, amount)
EOF
cat > "$SAMPLE/src/notify.py" << 'EOF'
"""Notifications: email and Slack."""


def send_email(address, receipt):
    """Send the receipt by email."""
    return "emailed %s receipt %s" % (address, receipt["txn"])


def send_slack(channel, message):
    """Post a message to a Slack channel."""
    return "posted to %s: %s" % (channel, message)
EOF
cat > "$SAMPLE/Jenkinsfile" << 'EOF'
@Library('platform-shared-lib') _

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                sh 'python3 -m compileall src'
            }
        }
        stage('Deploy') {
            steps {
                deployService(app: 'billing-svc', env: 'prod', chart: 'charts/billing')
            }
        }
    }
}
EOF
cat > "$SAMPLE/vars/deployService.groovy" << 'EOF'
def call(Map cfg) {
    echo "Deploying ${cfg.app} to ${cfg.env} with chart ${cfg.chart}"
    sh "helm upgrade --install ${cfg.app} ${cfg.chart} --namespace ${cfg.env} --wait"
    notifySlack("deployed ${cfg.app} to ${cfg.env}")
}

def notifySlack(String message) {
    echo "Slack: ${message}"
}
EOF
cat > "$SAMPLE/Dockerfile" << 'EOF'
FROM python:3.12-slim
WORKDIR /app
COPY src/ ./src/
CMD ["python3", "-m", "src.main"]
EOF
cat > "$SAMPLE/k8s/deployment.yaml" << 'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: billing-svc
spec:
  replicas: 2
  selector:
    matchLabels:
      app: billing-svc
  template:
    metadata:
      labels:
        app: billing-svc
    spec:
      containers:
        - name: billing-svc
          image: registry.internal.example.com/billing-svc:1.4.0
          ports:
            - containerPort: 8080
EOF
cat > "$SAMPLE/docs/runbook.md" << 'EOF'
# Runbook: billing-svc

## If charging fails

1. Check the gateway at `GATEWAY_URL` in `src/billing.py`.
2. `charge` is called by `create_order` in `src/main.py` — a bad receipt shape breaks both the email and the Slack notification.
3. Refunds go through `refund` in the same file; never edit `charge` without checking `refund` and `cancel_order`.

## Deploy

Deploys run through the Jenkins shared-library step `deployService` (`vars/deployService.groovy`), invoked from the `Jenkinsfile`.
EOF
cd "$SAMPLE"
git init -q
git config user.email "test@local"
git config user.name "Test"
git add -A
git commit -qm "sample billing microservice"
cd "$PACK_DIR"
fi
node --version
cd "$SAMPLE"
npx --yes gitnexus analyze --index-only
npx --yes gitnexus status
npx --yes gitnexus impact charge
npx --yes gitnexus context charge
sed -i.bak 's/"status": "charged"/"status": "billed"/' src/billing.py
rm -f src/billing.py.bak
git diff --stat
npx --yes gitnexus detect-changes
git checkout -- src/billing.py
git status --short
echo "DONE: index lives in sample-svc/.gitnexus (local only, no code leaves the machine)"
echo "DONE: if query returns empty results, run: npx gitnexus analyze --repair-fts"

Links

Understand Anything — understand-anything.com · github.com/Egonex-AI/Understand-Anything · live demo
Graphify — graphify.com · github.com/Graphify-Labs/graphify · docs.graphify.com
GitNexus — gitnexus.app · github.com/abhigyanpatwari/GitNexus · akonlabs.com (commercial licensing)
Source reel — Shirin Khosravi Jam, "3 tools to help you understand any GitHub repo" (Facebook, Nov 1, 2026)

No comments: