You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--force`| Force full re-index even if up to date |
23
23
|`--embeddings`| Enable embedding generation for semantic search (off by default) |
24
+
|`--drop-embeddings`| Drop existing embeddings on rebuild. By default, an `analyze` without `--embeddings` preserves them. |
24
25
25
-
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook runs `analyze` automatically after `git commit` and `git merge`, preserving embeddings if previously generated.
26
+
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook detects staleness after `git commit` and `git merge` and notifies the agent to run `analyze` — the hook does not run analyze itself, to avoid blocking the agent for up to 120s and risking KuzuDB corruption on timeout.
Copy file name to clipboardExpand all lines: AGENTS.md
+5-63Lines changed: 5 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This version has breaking changes — APIs, conventions, and file structure may
7
7
<!-- gitnexus:start -->
8
8
# GitNexus — Code Intelligence
9
9
10
-
This project is indexed by GitNexus as **9ruby-home** (400 symbols, 569 relationships, 5 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
10
+
This project is indexed by GitNexus as **9ruby-site** (2306 symbols, 3512 relationships, 113 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
11
11
12
12
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
13
13
@@ -19,79 +19,21 @@ This project is indexed by GitNexus as **9ruby-home** (400 symbols, 569 relation
19
19
- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
20
20
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`.
21
21
22
-
## When Debugging
23
-
24
-
1.`gitnexus_query({query: "<error or symptom>"})` — find execution flows related to the issue
25
-
2.`gitnexus_context({name: "<suspect function>"})` — see all callers, callees, and process participation
26
-
3.`READ gitnexus://repo/9ruby-home/process/{processName}` — trace the full execution flow step by step
27
-
4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed
28
-
29
-
## When Refactoring
30
-
31
-
-**Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`.
32
-
-**Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code.
33
-
- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed.
34
-
35
22
## Never Do
36
23
37
24
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
38
25
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
39
26
- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph.
40
27
- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope.
41
28
42
-
## Tools Quick Reference
43
-
44
-
| Tool | When to use | Command |
45
-
|------|-------------|---------|
46
-
|`query`| Find code by concept |`gitnexus_query({query: "auth validation"})`|
47
-
|`context`| 360-degree view of one symbol |`gitnexus_context({name: "validateUser"})`|
48
-
|`impact`| Blast radius before editing |`gitnexus_impact({target: "X", direction: "upstream"})`|
Before completing any code modification task, verify:
73
-
1.`gitnexus_impact` was run for all modified symbols
74
-
2. No HIGH/CRITICAL risk warnings were ignored
75
-
3.`gitnexus_detect_changes()` confirms changes match expected scope
76
-
4. All d=1 (WILL BREAK) dependents were updated
77
-
78
-
## Keeping the Index Fresh
79
-
80
-
After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it:
81
-
82
-
```bash
83
-
npx gitnexus analyze
84
-
```
85
-
86
-
If the index previously included embeddings, preserve them by adding `--embeddings`:
87
-
88
-
```bash
89
-
npx gitnexus analyze --embeddings
90
-
```
91
-
92
-
To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.**
93
-
94
-
> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`.
33
+
|`gitnexus://repo/9ruby-site/context`| Codebase overview, check index freshness |
34
+
|`gitnexus://repo/9ruby-site/clusters`| All functional areas |
35
+
|`gitnexus://repo/9ruby-site/processes`| All execution flows |
Copy file name to clipboardExpand all lines: CLAUDE.md
+5-63Lines changed: 5 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
<!-- gitnexus:start -->
4
4
# GitNexus — Code Intelligence
5
5
6
-
This project is indexed by GitNexus as **9ruby-home** (400 symbols, 569 relationships, 5 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
6
+
This project is indexed by GitNexus as **9ruby-site** (2306 symbols, 3512 relationships, 113 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
7
7
8
8
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
9
9
@@ -15,79 +15,21 @@ This project is indexed by GitNexus as **9ruby-home** (400 symbols, 569 relation
15
15
- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
16
16
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`.
17
17
18
-
## When Debugging
19
-
20
-
1.`gitnexus_query({query: "<error or symptom>"})` — find execution flows related to the issue
21
-
2.`gitnexus_context({name: "<suspect function>"})` — see all callers, callees, and process participation
22
-
3.`READ gitnexus://repo/9ruby-home/process/{processName}` — trace the full execution flow step by step
23
-
4. For regressions: `gitnexus_detect_changes({scope: "compare", base_ref: "main"})` — see what your branch changed
24
-
25
-
## When Refactoring
26
-
27
-
-**Renaming**: MUST use `gitnexus_rename({symbol_name: "old", new_name: "new", dry_run: true})` first. Review the preview — graph edits are safe, text_search edits need manual review. Then run with `dry_run: false`.
28
-
-**Extracting/Splitting**: MUST run `gitnexus_context({name: "target"})` to see all incoming/outgoing refs, then `gitnexus_impact({target: "target", direction: "upstream"})` to find all external callers before moving code.
29
-
- After any refactor: run `gitnexus_detect_changes({scope: "all"})` to verify only expected files changed.
30
-
31
18
## Never Do
32
19
33
20
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
34
21
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
35
22
- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph.
36
23
- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope.
37
24
38
-
## Tools Quick Reference
39
-
40
-
| Tool | When to use | Command |
41
-
|------|-------------|---------|
42
-
|`query`| Find code by concept |`gitnexus_query({query: "auth validation"})`|
43
-
|`context`| 360-degree view of one symbol |`gitnexus_context({name: "validateUser"})`|
44
-
|`impact`| Blast radius before editing |`gitnexus_impact({target: "X", direction: "upstream"})`|
Before completing any code modification task, verify:
69
-
1.`gitnexus_impact` was run for all modified symbols
70
-
2. No HIGH/CRITICAL risk warnings were ignored
71
-
3.`gitnexus_detect_changes()` confirms changes match expected scope
72
-
4. All d=1 (WILL BREAK) dependents were updated
73
-
74
-
## Keeping the Index Fresh
75
-
76
-
After committing code changes, the GitNexus index becomes stale. Re-run analyze to update it:
77
-
78
-
```bash
79
-
npx gitnexus analyze
80
-
```
81
-
82
-
If the index previously included embeddings, preserve them by adding `--embeddings`:
83
-
84
-
```bash
85
-
npx gitnexus analyze --embeddings
86
-
```
87
-
88
-
To check whether embeddings exist, inspect `.gitnexus/meta.json` — the `stats.embeddings` field shows the count (0 means no embeddings). **Running analyze without `--embeddings` will delete any previously generated embeddings.**
89
-
90
-
> Claude Code users: A PostToolUse hook handles this automatically after `git commit` and `git merge`.
29
+
|`gitnexus://repo/9ruby-site/context`| Codebase overview, check index freshness |
30
+
|`gitnexus://repo/9ruby-site/clusters`| All functional areas |
31
+
|`gitnexus://repo/9ruby-site/processes`| All execution flows |
0 commit comments