From 813091bab7eaf78a16c0bc53d63629b305b66373 Mon Sep 17 00:00:00 2001 From: maria-hambardzumian Date: Thu, 25 Jun 2026 12:42:08 +0400 Subject: [PATCH 1/4] EPMRPP-117079 || Introduce a code knowledge graph for search/read operations --- .codegraph/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .codegraph/.gitignore diff --git a/.codegraph/.gitignore b/.codegraph/.gitignore new file mode 100644 index 0000000..d20c0fe --- /dev/null +++ b/.codegraph/.gitignore @@ -0,0 +1,5 @@ +# CodeGraph data files — local to each machine, not for committing. +# Ignore everything in .codegraph/ except this file itself, so transient +# files (the database, daemon.pid, sockets, logs) never show up in git. +* +!.gitignore From cc6faf08fbd4beb57c4eed94263e28331d380088 Mon Sep 17 00:00:00 2001 From: maria-hambardzumian Date: Thu, 25 Jun 2026 13:12:09 +0400 Subject: [PATCH 2/4] EPMRPP-117079 || Add codegraph index generation command (npm run codegraph) --- README.md | 15 +++++++++++++++ package.json | 1 + scripts/codegraph.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100755 scripts/codegraph.sh diff --git a/README.md b/README.md index 6a0a393..ea16418 100644 --- a/README.md +++ b/README.md @@ -266,3 +266,18 @@ For both tests or steps, this is true # Copyright Notice Licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) license (see the LICENSE.txt file). +## Code knowledge graph + +This repo carries a local **code knowledge graph** ([colbymchenry/codegraph](https://github.com/colbymchenry/codegraph)) +that the ReportPortal AI agents (and your own tooling) use to resolve symbols and +references without scanning raw files. + +```bash +npm run codegraph # build it the first time, fast incremental sync after +npm run codegraph -- --force # rebuild from scratch +``` + +The graph lives in `.codegraph/codegraph.db` — it is **gitignored and local to your +machine** (only `.codegraph/.gitignore` is committed). It is a pure derivative of the +source, so regenerate it any time. The engine is fetched on demand via `npx`, so there +is no added project dependency. diff --git a/package.json b/package.json index 9ab5cda..49a281e 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "author": "ReportPortal.io", "license": "Apache-2.0", "scripts": { + "codegraph": "bash scripts/codegraph.sh", "lint": "eslint .", "format": "npm run lint -- --fix", "test": "jest --detectOpenHandles --config ./jest.config.js", diff --git a/scripts/codegraph.sh b/scripts/codegraph.sh new file mode 100755 index 0000000..61d9b9b --- /dev/null +++ b/scripts/codegraph.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Build or update this repo's local code knowledge graph (.codegraph/codegraph.db). +# +# Idempotent — safe to run any time: +# (no args) first run -> init (full index); after that -> sync (fast, incremental) +# --force rebuild the graph from scratch +# +# The DB is gitignored and local to your machine; only .codegraph/.gitignore is +# committed. Engine: https://github.com/colbymchenry/codegraph (run via npx, no +# global or project install required). +set -u +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ENGINE="@colbymchenry/codegraph@^1.1.0" +export CODEGRAPH_TELEMETRY="${CODEGRAPH_TELEMETRY:-0}" + +case "${1:-}" in + --force) + echo "[codegraph] rebuild: $DIR" + npx -y "$ENGINE" index "$DIR" + ;; + *) + if [ -f "$DIR/.codegraph/codegraph.db" ]; then + echo "[codegraph] update (sync): $DIR" + npx -y "$ENGINE" sync "$DIR" + else + echo "[codegraph] init: $DIR" + npx -y "$ENGINE" init "$DIR" + fi + ;; +esac From 4921e909094c72614c71e9aae0cde5d8e5b5297b Mon Sep 17 00:00:00 2001 From: maria-hambardzumian Date: Tue, 7 Jul 2026 16:33:09 +0400 Subject: [PATCH 3/4] EPMRPP-117079 || Move codegraph readme section into DEV_GUIDE.md --- DEV_GUIDE.md | 20 ++++++++++++++++++++ README.md | 15 ++------------- 2 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 DEV_GUIDE.md diff --git a/DEV_GUIDE.md b/DEV_GUIDE.md new file mode 100644 index 0000000..7e47ed3 --- /dev/null +++ b/DEV_GUIDE.md @@ -0,0 +1,20 @@ +# Dev Guide + +Internal notes for contributors. This content is intentionally kept out of +README.md, which is published to package registries. + +## Code knowledge graph + +This repo carries a local **code knowledge graph** ([colbymchenry/codegraph](https://github.com/colbymchenry/codegraph)) +that the ReportPortal AI agents (and your own tooling) use to resolve symbols and +references without scanning raw files. + +```bash +npm run codegraph # build it the first time, fast incremental sync after +npm run codegraph -- --force # rebuild from scratch +``` + +The graph lives in `.codegraph/codegraph.db` — it is **gitignored and local to your +machine** (only `.codegraph/.gitignore` is committed). It is a pure derivative of the +source, so regenerate it any time. The engine is fetched on demand via `npx`, so there +is no added project dependency. diff --git a/README.md b/README.md index ea16418..e4f2978 100644 --- a/README.md +++ b/README.md @@ -266,18 +266,7 @@ For both tests or steps, this is true # Copyright Notice Licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) license (see the LICENSE.txt file). -## Code knowledge graph - -This repo carries a local **code knowledge graph** ([colbymchenry/codegraph](https://github.com/colbymchenry/codegraph)) -that the ReportPortal AI agents (and your own tooling) use to resolve symbols and -references without scanning raw files. -```bash -npm run codegraph # build it the first time, fast incremental sync after -npm run codegraph -- --force # rebuild from scratch -``` +## Code knowledge graph -The graph lives in `.codegraph/codegraph.db` — it is **gitignored and local to your -machine** (only `.codegraph/.gitignore` is committed). It is a pure derivative of the -source, so regenerate it any time. The engine is fetched on demand via `npx`, so there -is no added project dependency. +See [DEV_GUIDE.md](DEV_GUIDE.md#code-knowledge-graph) for details on the local code knowledge graph used by contributor tooling. From 0e6bf659925067d87322c40230e8de825ba9b992 Mon Sep 17 00:00:00 2001 From: maria-hambardzumian Date: Wed, 8 Jul 2026 15:47:25 +0400 Subject: [PATCH 4/4] EPMRPP-117079 || Remove code knowledge graph section from README --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index e4f2978..6a0a393 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,3 @@ For both tests or steps, this is true # Copyright Notice Licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) license (see the LICENSE.txt file). - -## Code knowledge graph - -See [DEV_GUIDE.md](DEV_GUIDE.md#code-knowledge-graph) for details on the local code knowledge graph used by contributor tooling.