class-ai-agent 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/SESSION.md +1 -0
- package/.agent/rules/codegraph.md +2 -0
- package/.agent/rules/ontosight.md +55 -12
- package/.agents/references/codegraph.md +3 -1
- package/.agents/references/ontosight.md +40 -16
- package/.agents/skills/ui-ux-pro-max/IMPACT-DEMO.md +7 -6
- package/.claude/references/ontosight.md +40 -16
- package/.claude/rules/codegraph.md +2 -0
- package/.claude/rules/ontosight.md +55 -12
- package/.claude/skills/ui-ux-pro-max/IMPACT-DEMO.md +7 -6
- package/.cursor/references/codegraph.md +3 -1
- package/.cursor/references/ontosight.md +40 -16
- package/.cursor/rules/codegraph.mdc +2 -0
- package/.cursor/rules/ontosight.mdc +55 -12
- package/.cursor/skills/ui-ux-pro-max/IMPACT-DEMO.md +7 -6
- package/.kiro/references/codegraph.md +3 -1
- package/.kiro/references/ontosight.md +40 -16
- package/.kiro/skills/ui-ux-pro-max/IMPACT-DEMO.md +7 -6
- package/.kiro/steering/codegraph.md +2 -0
- package/.kiro/steering/ontosight.md +55 -12
- package/README.md +20 -7
- package/bin/class-ai-agent.cjs +3 -1
- package/package.json +1 -1
package/.agent/SESSION.md
CHANGED
|
@@ -46,6 +46,7 @@ Maintain and ship **class-ai-agent** — production-grade AI agent scaffolding f
|
|
|
46
46
|
|
|
47
47
|
- Calling `codegraph_context` with `{ "query": "...", "limit": 15 }` → `task must be a non-empty string`.
|
|
48
48
|
- CodeGraph MCP may need `projectPath` if workspace root is not detected.
|
|
49
|
+
- OntoSight with bare `.` may load the wrong project's graph — pass absolute workspace root as `[project-path]`; run `codegraph_status` first.
|
|
49
50
|
- CLI smoke test: `npm run test:cli`
|
|
50
51
|
- `npx class-ai-agent` runs CodeGraph init by default; set `CODEGRAPH_SKIP_INIT=1` to skip.
|
|
51
52
|
|
|
@@ -32,6 +32,8 @@ For interactive call-graph UI (user asks to "show the graph" or explore architec
|
|
|
32
32
|
|
|
33
33
|
For **impact demonstration** requests ("show impact", "blast radius", "what breaks if I change X"), run `codegraph_impact` first, present a text summary, then open OntoSight — never stop at MCP text alone when the user wants to see or show impact.
|
|
34
34
|
|
|
35
|
+
**Project graph fidelity:** OntoSight is a separate CLI — MCP `${workspaceFolder}` binding does not apply automatically. Pass the **same workspace root** to OntoSight's `[project-path]` as you use for `projectPath` on `codegraph_*` calls when MCP cwd detection is wrong. Run `codegraph_status` before opening OntoSight; seeds (`--symbol`, `--task`) must come from queries against that same index. See **Project graph fidelity** in **`.agent/rules/ontosight.md`**.
|
|
36
|
+
|
|
35
37
|
### Tool parameters (do not mix)
|
|
36
38
|
|
|
37
39
|
| Tool | Required arg | Optional cap | Wrong args → error |
|
|
@@ -20,6 +20,44 @@ See **`.agent/rules/codegraph.md`** for MCP usage and **`.agents/references/onto
|
|
|
20
20
|
|
|
21
21
|
Rule of thumb: gather facts with CodeGraph MCP; open OntoSight when visualization helps the human explore complexity you already identified.
|
|
22
22
|
|
|
23
|
+
### Project graph fidelity
|
|
24
|
+
|
|
25
|
+
OntoSight reads nodes from `.codegraph/codegraph.db` under the **`[project-path]`** argument (default: shell `cwd`). The browser must show **this workspace's** project graph — never a foreign repo or auto-init index from the wrong directory.
|
|
26
|
+
|
|
27
|
+
**Mandatory preflight** (before any OntoSight run):
|
|
28
|
+
|
|
29
|
+
1. Resolve **workspace root** (Cursor `${workspaceFolder}` / absolute path from user context).
|
|
30
|
+
2. `codegraph_status({ projectPath: "<workspace-root>" })` when MCP may be on wrong cwd; otherwise default.
|
|
31
|
+
3. If index missing → `npx @colbymchenry/codegraph init -i` **in workspace root** (ask user on large repos).
|
|
32
|
+
4. If MCP returns "wrong project" / path mismatch → pass `projectPath` on all subsequent `codegraph_*` calls.
|
|
33
|
+
|
|
34
|
+
**Hard rule:** Do not open OntoSight until `.codegraph/codegraph.db` exists under the **target workspace root**.
|
|
35
|
+
|
|
36
|
+
**Absolute project path** — never rely on bare `.` when workspace root is known:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Required when workspace root is known
|
|
40
|
+
npx @royalsolution/ontosight@0.2.0 "/absolute/path/to/workspace" \
|
|
41
|
+
--symbol <name> --path <dir>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Pass workspace root as the **first positional `[project-path]`** argument. Optionally set shell `cwd` to workspace root as well — but always pass the absolute path.
|
|
45
|
+
|
|
46
|
+
**Seed binding** — seeds must come from the same project's CodeGraph index:
|
|
47
|
+
|
|
48
|
+
| Seed mode | Requirement |
|
|
49
|
+
|-----------|-------------|
|
|
50
|
+
| `--symbol` | Name **must** come from `codegraph_search` / `codegraph_context` with the **same** `projectPath`; `--path` must match the directory prefix of the returned file path |
|
|
51
|
+
| `--task` | Only after `codegraph_context({ task, maxNodes })`; prefer `--symbol` when user named a symbol |
|
|
52
|
+
| Default (no seed) | Full-project exploration only; still require absolute workspace path |
|
|
53
|
+
|
|
54
|
+
**Anti-patterns (explicit ban):**
|
|
55
|
+
|
|
56
|
+
- Do not use README/doc example symbols (`view_graph`, `deleteUser`) unless `codegraph_search` confirms they exist in **this** project.
|
|
57
|
+
- Do not run OntoSight from a subdirectory with bare `.` — auto-init may index the wrong tree.
|
|
58
|
+
|
|
59
|
+
**After launch:** confirm OntoSight terminal output shows the correct **project path** and topology symbols under that project. If mismatch → stop and re-run with corrected absolute path.
|
|
60
|
+
|
|
23
61
|
### When to run OntoSight
|
|
24
62
|
|
|
25
63
|
Run (or suggest) OntoSight when the user:
|
|
@@ -41,12 +79,13 @@ Do **not** run OntoSight to collect agent context — that duplicates CodeGraph
|
|
|
41
79
|
|
|
42
80
|
**Workflow** (mandatory order):
|
|
43
81
|
|
|
44
|
-
|
|
45
|
-
|
|
82
|
+
0. `codegraph_status({ projectPath: "<workspace-root>" })` — verify index at workspace root
|
|
83
|
+
1. `codegraph_search({ query: "<symbol>", projectPath: "<workspace-root>" })` — confirm name, file, kind
|
|
84
|
+
2. `codegraph_impact({ query: "<symbol>", projectPath: "<workspace-root>" })` — ranked blast radius (chat facts)
|
|
46
85
|
3. Read **`.agents/skills/ui-ux-pro-max/IMPACT-DEMO.md`** — presentation checklist (use your tool's skills path: `.agents/skills/`, `.agents/skills/`, `.agents/skills/`)
|
|
47
86
|
4. Optional: run ui-ux-pro-max searches from the playbook for chart/UX framing
|
|
48
87
|
5. Summarize in chat: seed symbol, top impacted callers, risk tier, what the graph will highlight
|
|
49
|
-
6. `npx @royalsolution/ontosight@0.2.0
|
|
88
|
+
6. `npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200`
|
|
50
89
|
|
|
51
90
|
**Hop guidance:** use `--hops 3` (or `4` for deep trees) for impact demos; prefer `--path` over raising `--max-nodes` when truncated.
|
|
52
91
|
|
|
@@ -56,25 +95,29 @@ Do **not** run OntoSight to collect agent context — that duplicates CodeGraph
|
|
|
56
95
|
|
|
57
96
|
**Symbol the user named:**
|
|
58
97
|
|
|
59
|
-
|
|
98
|
+
0. `codegraph_status({ projectPath: "<workspace-root>" })`
|
|
99
|
+
1. `codegraph_search({ query: "<name>", projectPath: "<workspace-root>" })` → confirm file + kind
|
|
60
100
|
2. Summarize in chat
|
|
61
|
-
3. `npx @royalsolution/ontosight@0.2.0
|
|
101
|
+
3. `npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir-from-search>`
|
|
62
102
|
|
|
63
103
|
**Feature area ("how does auth work?"):**
|
|
64
104
|
|
|
65
|
-
|
|
105
|
+
0. `codegraph_status({ projectPath: "<workspace-root>" })`
|
|
106
|
+
1. `codegraph_context({ task: "authentication flow", maxNodes: 20, projectPath: "<workspace-root>" })`
|
|
66
107
|
2. Summarize key symbols in chat
|
|
67
|
-
3. `npx @royalsolution/ontosight@0.2.0
|
|
108
|
+
3. `npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "authentication flow" --hops 2 --max-nodes 200`
|
|
68
109
|
|
|
69
110
|
**Large repo:** prefer `--path` or `--symbol` before raising `--max-nodes`.
|
|
70
111
|
|
|
71
112
|
### Commands
|
|
72
113
|
|
|
114
|
+
Replace `<workspace-root>` with the absolute path to the open workspace (never bare `.` when root is known):
|
|
115
|
+
|
|
73
116
|
```bash
|
|
74
|
-
npx @royalsolution/ontosight@0.2.0
|
|
75
|
-
npx @royalsolution/ontosight@0.2.0
|
|
76
|
-
npx @royalsolution/ontosight@0.2.0
|
|
77
|
-
npx @royalsolution/ontosight@0.2.0
|
|
117
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>"
|
|
118
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir>
|
|
119
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "auth flow" --hops 2 --max-nodes 200
|
|
120
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200
|
|
78
121
|
```
|
|
79
122
|
|
|
80
123
|
Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unless `ONTOSIGHT_SKIP_AUTO_INIT=1`). Ask the user before auto-init on very large repos.
|
|
@@ -86,4 +129,4 @@ Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unle
|
|
|
86
129
|
| Node 20+ | For `npx @royalsolution/ontosight@0.2.0` |
|
|
87
130
|
| Python 3.11+ | Used by `ontosight-codegraph` |
|
|
88
131
|
| uv (recommended) or pipx | Wrapper tries `uvx` first, then `pipx run` |
|
|
89
|
-
| CodeGraph index | `.codegraph/codegraph.db` in
|
|
132
|
+
| CodeGraph index | `.codegraph/codegraph.db` in workspace root |
|
|
@@ -83,12 +83,14 @@ Example — correct:
|
|
|
83
83
|
|-------|--------|
|
|
84
84
|
| `task must be a non-empty string` | Use `task` (not `query`) on `codegraph_context`; use `maxNodes` (not `limit`). For `/resume`, read `.agent/SESSION.md` instead. |
|
|
85
85
|
| MCP “not initialized” | Run `npx @colbymchenry/codegraph init -i` in project root |
|
|
86
|
+
| MCP wrong project / path mismatch | Pass `projectPath: "<workspace-root>"` on all `codegraph_*` calls; use the same root for OntoSight `[project-path]` |
|
|
86
87
|
| MCP not connecting | Reload Cursor; verify `.cursor/mcp.json`; test `npx @colbymchenry/codegraph serve --mcp` |
|
|
87
88
|
| Stale symbols after edit | Wait ~2s for watcher sync, or check staleness banner in tool output |
|
|
88
89
|
| Init failed during install | Run `npx @colbymchenry/codegraph init -i` manually |
|
|
90
|
+
| OntoSight shows wrong project's graph | Pass absolute workspace root to OntoSight (not bare `.`); run `codegraph_status` first — see [`.cursor/references/ontosight.md`](ontosight.md) |
|
|
89
91
|
|
|
90
92
|
## Visualization (OntoSight)
|
|
91
93
|
|
|
92
|
-
For interactive call-graph exploration in the browser, use **[OntoSight](https://www.npmjs.com/package/@royalsolution/ontosight)** (`npx @royalsolution/ontosight@0.2.0`). Gather facts with `codegraph_*` first; open OntoSight when the user wants a visual UI. See [`.cursor/references/ontosight.md`](ontosight.md).
|
|
94
|
+
For interactive call-graph exploration in the browser, use **[OntoSight](https://www.npmjs.com/package/@royalsolution/ontosight)** (`npx @royalsolution/ontosight@0.2.0`). Gather facts with `codegraph_*` first; open OntoSight when the user wants a visual UI. Pass the **absolute workspace root** as `[project-path]` (not bare `.`) so the browser loads this project's graph. See [`.cursor/references/ontosight.md`](ontosight.md).
|
|
93
95
|
|
|
94
96
|
Upstream: [colbymchenry/codegraph](https://github.com/colbymchenry/codegraph)
|
|
@@ -15,17 +15,32 @@ OntoSight complements CodeGraph MCP — use `codegraph_*` for structural facts i
|
|
|
15
15
|
| Kiro | `.kiro/steering/ontosight.md` | `.kiro/references/ontosight.md` |
|
|
16
16
|
| Antigravity | `.agent/rules/ontosight.md` | `.agents/references/ontosight.md` |
|
|
17
17
|
|
|
18
|
+
## Project graph fidelity
|
|
19
|
+
|
|
20
|
+
OntoSight loads nodes from `.codegraph/codegraph.db` under **`[project-path]`** (default: shell `cwd`). To ensure the browser shows **this workspace's** graph:
|
|
21
|
+
|
|
22
|
+
1. Resolve workspace root (absolute path).
|
|
23
|
+
2. Run `codegraph_status({ projectPath: "<workspace-root>" })` before OntoSight.
|
|
24
|
+
3. Pass **absolute workspace root** as `[project-path]` — never bare `.` when root is known.
|
|
25
|
+
4. Seed `--symbol` / `--task` from `codegraph_*` queries using the **same** `projectPath`.
|
|
26
|
+
5. After launch, verify terminal output: printed project path and topology symbols belong to this repo.
|
|
27
|
+
|
|
28
|
+
See **Project graph fidelity** in [`.cursor/rules/ontosight.mdc`](../rules/ontosight.mdc).
|
|
29
|
+
|
|
18
30
|
## Quick start
|
|
19
31
|
|
|
32
|
+
Replace `<workspace-root>` with the absolute path to the open workspace:
|
|
33
|
+
|
|
20
34
|
```bash
|
|
21
35
|
# Full project — seeds from highest fan-in symbols
|
|
22
|
-
npx @royalsolution/ontosight@0.2.0
|
|
36
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>"
|
|
23
37
|
|
|
24
38
|
# Seed around a symbol (optionally scoped to a path)
|
|
25
|
-
|
|
39
|
+
# --symbol must exist in this project (confirm via codegraph_search first)
|
|
40
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path src/auth/
|
|
26
41
|
|
|
27
42
|
# Task-scoped subgraph (keyword FTS seeding)
|
|
28
|
-
npx @royalsolution/ontosight@0.2.0
|
|
43
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "auth flow" --hops 2 --max-nodes 200
|
|
29
44
|
```
|
|
30
45
|
|
|
31
46
|
Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unless `ONTOSIGHT_SKIP_AUTO_INIT=1`).
|
|
@@ -34,7 +49,7 @@ Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unle
|
|
|
34
49
|
|
|
35
50
|
| Flag | Description | Default |
|
|
36
51
|
|------|-------------|---------|
|
|
37
|
-
| `[project-path]` | Project root containing `.codegraph/` | `.` (cwd) |
|
|
52
|
+
| `[project-path]` | Project root containing `.codegraph/` | `.` (cwd) — **prefer absolute workspace root** |
|
|
38
53
|
| `--path <dir>` | Limit symbols to files under this path | — |
|
|
39
54
|
| `--symbol <name>` | Seed symbol for BFS subgraph expansion | auto (fan-in) |
|
|
40
55
|
| `--task <text>` | Natural-language seed (keyword match) | — |
|
|
@@ -48,17 +63,19 @@ Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unle
|
|
|
48
63
|
### Symbol the user named
|
|
49
64
|
|
|
50
65
|
```text
|
|
51
|
-
|
|
66
|
+
0. codegraph_status({ projectPath: "<workspace-root>" })
|
|
67
|
+
1. codegraph_search({ query: "<name>", projectPath: "<workspace-root>" }) → confirm file + kind
|
|
52
68
|
2. Tell user what you found
|
|
53
|
-
3. npx @royalsolution/ontosight@0.2.0
|
|
69
|
+
3. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir-from-search>
|
|
54
70
|
```
|
|
55
71
|
|
|
56
72
|
### Feature area ("how does auth work?")
|
|
57
73
|
|
|
58
74
|
```text
|
|
59
|
-
|
|
75
|
+
0. codegraph_status({ projectPath: "<workspace-root>" })
|
|
76
|
+
1. codegraph_context({ task: "authentication flow", maxNodes: 20, projectPath: "<workspace-root>" })
|
|
60
77
|
2. Summarize key symbols in chat
|
|
61
|
-
3. npx @royalsolution/ontosight@0.2.0
|
|
78
|
+
3. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "authentication flow" --hops 2 --max-nodes 200
|
|
62
79
|
```
|
|
63
80
|
|
|
64
81
|
### Impact analysis demonstration
|
|
@@ -70,18 +87,19 @@ When the user wants to **know** or **see** impact (blast radius, what breaks, do
|
|
|
70
87
|
**Workflow:**
|
|
71
88
|
|
|
72
89
|
```text
|
|
73
|
-
|
|
74
|
-
|
|
90
|
+
0. codegraph_status({ projectPath: "<workspace-root>" })
|
|
91
|
+
1. codegraph_search({ query: "<symbol>", projectPath: "<workspace-root>" }) → confirm file + kind
|
|
92
|
+
2. codegraph_impact({ query: "<symbol>", projectPath: "<workspace-root>" }) → ranked blast radius
|
|
75
93
|
3. Read skills/ui-ux-pro-max/IMPACT-DEMO.md → UX presentation checklist
|
|
76
94
|
4. Optional: ui-ux-pro-max chart/ux searches (see playbook)
|
|
77
95
|
5. Summarize in chat (seed, ranked table, what graph shows)
|
|
78
|
-
6. npx @royalsolution/ontosight@0.2.0
|
|
96
|
+
6. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200
|
|
79
97
|
```
|
|
80
98
|
|
|
81
|
-
**Example
|
|
99
|
+
**Example** (replace paths and symbol with values from `codegraph_search` in **this** project):
|
|
82
100
|
|
|
83
101
|
```bash
|
|
84
|
-
npx @royalsolution/ontosight@0.2.0
|
|
102
|
+
npx @royalsolution/ontosight@0.2.0 "/path/to/workspace" --symbol deleteUser --path src/services/ --hops 3 --max-nodes 200
|
|
85
103
|
```
|
|
86
104
|
|
|
87
105
|
**UX:** Always text summary before opening the browser; include a ranked table of top impacted symbols (accessible alternative to graph-only). See [IMPACT-DEMO.md](../skills/ui-ux-pro-max/IMPACT-DEMO.md).
|
|
@@ -91,8 +109,9 @@ npx @royalsolution/ontosight@0.2.0 . --symbol deleteUser --path src/services/ --
|
|
|
91
109
|
### Index missing
|
|
92
110
|
|
|
93
111
|
```bash
|
|
112
|
+
cd "<workspace-root>"
|
|
94
113
|
npx @colbymchenry/codegraph init -i
|
|
95
|
-
# or let the OntoSight wrapper auto-init (default)
|
|
114
|
+
# or let the OntoSight wrapper auto-init (default) — only when [project-path] is correct
|
|
96
115
|
```
|
|
97
116
|
|
|
98
117
|
## Environment variables
|
|
@@ -109,7 +128,7 @@ npx @colbymchenry/codegraph init -i
|
|
|
109
128
|
| Node 20+ | For `npx @royalsolution/ontosight@0.2.0` |
|
|
110
129
|
| Python 3.11+ | Used by `ontosight-codegraph` |
|
|
111
130
|
| uv (recommended) or pipx | Wrapper tries `uvx` first, then `pipx run` |
|
|
112
|
-
| CodeGraph index | `.codegraph/codegraph.db` in
|
|
131
|
+
| CodeGraph index | `.codegraph/codegraph.db` in workspace root |
|
|
113
132
|
|
|
114
133
|
## What the user sees
|
|
115
134
|
|
|
@@ -117,11 +136,16 @@ npx @colbymchenry/codegraph init -i
|
|
|
117
136
|
2. OntoSight opens in the browser with the call subgraph, critical-node highlights, and a CodeGraph query panel for live reloads.
|
|
118
137
|
3. Process stays running until the user closes the server (Ctrl+C in terminal).
|
|
119
138
|
|
|
139
|
+
**Verify fidelity:** confirm the printed **project path** matches workspace root and topology symbols are files under that project — not another repo. If mismatch, stop and re-run with the corrected absolute path.
|
|
140
|
+
|
|
120
141
|
## Troubleshooting
|
|
121
142
|
|
|
122
143
|
| Issue | Action |
|
|
123
144
|
|-------|--------|
|
|
124
|
-
|
|
|
145
|
+
| Browser shows symbols from another repo | Re-run with absolute workspace root as `[project-path]`; delete stray `.codegraph/` in wrong cwd if auto-init ran there |
|
|
146
|
+
| Empty or generic graph | Run `codegraph init -i` in workspace root; seed with `--symbol` from `codegraph_search` in this project |
|
|
147
|
+
| MCP and OntoSight disagree | Align paths: same root for MCP `projectPath` and OntoSight `[project-path]` |
|
|
148
|
+
| `CodeGraph index not found` | Run `npx @colbymchenry/codegraph init -i` in workspace root or remove `ONTOSIGHT_SKIP_AUTO_INIT` |
|
|
125
149
|
| `Neither uv nor pipx found` | Install uv: `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
|
|
126
150
|
| Subgraph truncated warning | Add `--symbol`, `--task`, or `--path`; lower scope before raising `--max-nodes` |
|
|
127
151
|
| Stale symbols after edits | Wait ~2s for CodeGraph watcher sync, or re-run init |
|
|
@@ -46,7 +46,7 @@ Use for: summary-before-graph; tell the user what OntoSight is loading and what
|
|
|
46
46
|
|
|
47
47
|
## Chat summary template
|
|
48
48
|
|
|
49
|
-
Present this **before** running `npx @royalsolution/ontosight@0.2.0
|
|
49
|
+
Present this **before** running `npx @royalsolution/ontosight@0.2.0` (with absolute workspace root as `[project-path]`):
|
|
50
50
|
|
|
51
51
|
### 1. Seed
|
|
52
52
|
|
|
@@ -71,10 +71,10 @@ Group by risk: **direct callers** (highest) vs **transitive** (lower).
|
|
|
71
71
|
|
|
72
72
|
### 4. Action
|
|
73
73
|
|
|
74
|
-
Short line: *"Opening interactive impact graph…"* then run:
|
|
74
|
+
Short line: *"Opening interactive impact graph…"* then run (replace `<workspace-root>` with absolute workspace path):
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
npx @royalsolution/ontosight@0.2.0
|
|
77
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir-from-search> --hops 3 --max-nodes 200
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
---
|
|
@@ -90,12 +90,13 @@ npx @royalsolution/ontosight@0.2.0 . --symbol <name> --path <dir-from-search> --
|
|
|
90
90
|
## Full agent workflow
|
|
91
91
|
|
|
92
92
|
```text
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
0. codegraph_status({ projectPath: "<workspace-root>" }) → verify index at workspace root
|
|
94
|
+
1. codegraph_search({ query: "<symbol>", projectPath: "<workspace-root>" })
|
|
95
|
+
2. codegraph_impact({ query: "<symbol>", projectPath: "<workspace-root>" })
|
|
95
96
|
3. Read this file (IMPACT-DEMO.md)
|
|
96
97
|
4. Optional: ui-ux-pro-max chart/ux searches above
|
|
97
98
|
5. Chat summary (template sections 1–3)
|
|
98
|
-
6. npx @royalsolution/ontosight@0.2.0
|
|
99
|
+
6. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200
|
|
99
100
|
```
|
|
100
101
|
|
|
101
102
|
See **`.agents/references/ontosight.md`** for flags and troubleshooting.
|
|
@@ -15,17 +15,32 @@ OntoSight complements CodeGraph MCP — use `codegraph_*` for structural facts i
|
|
|
15
15
|
| Kiro | `.kiro/steering/ontosight.md` | `.kiro/references/ontosight.md` |
|
|
16
16
|
| Antigravity | `.agent/rules/ontosight.md` | `.agents/references/ontosight.md` |
|
|
17
17
|
|
|
18
|
+
## Project graph fidelity
|
|
19
|
+
|
|
20
|
+
OntoSight loads nodes from `.codegraph/codegraph.db` under **`[project-path]`** (default: shell `cwd`). To ensure the browser shows **this workspace's** graph:
|
|
21
|
+
|
|
22
|
+
1. Resolve workspace root (absolute path).
|
|
23
|
+
2. Run `codegraph_status({ projectPath: "<workspace-root>" })` before OntoSight.
|
|
24
|
+
3. Pass **absolute workspace root** as `[project-path]` — never bare `.` when root is known.
|
|
25
|
+
4. Seed `--symbol` / `--task` from `codegraph_*` queries using the **same** `projectPath`.
|
|
26
|
+
5. After launch, verify terminal output: printed project path and topology symbols belong to this repo.
|
|
27
|
+
|
|
28
|
+
See **Project graph fidelity** in [`.cursor/rules/ontosight.mdc`](../rules/ontosight.mdc).
|
|
29
|
+
|
|
18
30
|
## Quick start
|
|
19
31
|
|
|
32
|
+
Replace `<workspace-root>` with the absolute path to the open workspace:
|
|
33
|
+
|
|
20
34
|
```bash
|
|
21
35
|
# Full project — seeds from highest fan-in symbols
|
|
22
|
-
npx @royalsolution/ontosight@0.2.0
|
|
36
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>"
|
|
23
37
|
|
|
24
38
|
# Seed around a symbol (optionally scoped to a path)
|
|
25
|
-
|
|
39
|
+
# --symbol must exist in this project (confirm via codegraph_search first)
|
|
40
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path src/auth/
|
|
26
41
|
|
|
27
42
|
# Task-scoped subgraph (keyword FTS seeding)
|
|
28
|
-
npx @royalsolution/ontosight@0.2.0
|
|
43
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "auth flow" --hops 2 --max-nodes 200
|
|
29
44
|
```
|
|
30
45
|
|
|
31
46
|
Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unless `ONTOSIGHT_SKIP_AUTO_INIT=1`).
|
|
@@ -34,7 +49,7 @@ Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unle
|
|
|
34
49
|
|
|
35
50
|
| Flag | Description | Default |
|
|
36
51
|
|------|-------------|---------|
|
|
37
|
-
| `[project-path]` | Project root containing `.codegraph/` | `.` (cwd) |
|
|
52
|
+
| `[project-path]` | Project root containing `.codegraph/` | `.` (cwd) — **prefer absolute workspace root** |
|
|
38
53
|
| `--path <dir>` | Limit symbols to files under this path | — |
|
|
39
54
|
| `--symbol <name>` | Seed symbol for BFS subgraph expansion | auto (fan-in) |
|
|
40
55
|
| `--task <text>` | Natural-language seed (keyword match) | — |
|
|
@@ -48,17 +63,19 @@ Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unle
|
|
|
48
63
|
### Symbol the user named
|
|
49
64
|
|
|
50
65
|
```text
|
|
51
|
-
|
|
66
|
+
0. codegraph_status({ projectPath: "<workspace-root>" })
|
|
67
|
+
1. codegraph_search({ query: "<name>", projectPath: "<workspace-root>" }) → confirm file + kind
|
|
52
68
|
2. Tell user what you found
|
|
53
|
-
3. npx @royalsolution/ontosight@0.2.0
|
|
69
|
+
3. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir-from-search>
|
|
54
70
|
```
|
|
55
71
|
|
|
56
72
|
### Feature area ("how does auth work?")
|
|
57
73
|
|
|
58
74
|
```text
|
|
59
|
-
|
|
75
|
+
0. codegraph_status({ projectPath: "<workspace-root>" })
|
|
76
|
+
1. codegraph_context({ task: "authentication flow", maxNodes: 20, projectPath: "<workspace-root>" })
|
|
60
77
|
2. Summarize key symbols in chat
|
|
61
|
-
3. npx @royalsolution/ontosight@0.2.0
|
|
78
|
+
3. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "authentication flow" --hops 2 --max-nodes 200
|
|
62
79
|
```
|
|
63
80
|
|
|
64
81
|
### Impact analysis demonstration
|
|
@@ -70,18 +87,19 @@ When the user wants to **know** or **see** impact (blast radius, what breaks, do
|
|
|
70
87
|
**Workflow:**
|
|
71
88
|
|
|
72
89
|
```text
|
|
73
|
-
|
|
74
|
-
|
|
90
|
+
0. codegraph_status({ projectPath: "<workspace-root>" })
|
|
91
|
+
1. codegraph_search({ query: "<symbol>", projectPath: "<workspace-root>" }) → confirm file + kind
|
|
92
|
+
2. codegraph_impact({ query: "<symbol>", projectPath: "<workspace-root>" }) → ranked blast radius
|
|
75
93
|
3. Read skills/ui-ux-pro-max/IMPACT-DEMO.md → UX presentation checklist
|
|
76
94
|
4. Optional: ui-ux-pro-max chart/ux searches (see playbook)
|
|
77
95
|
5. Summarize in chat (seed, ranked table, what graph shows)
|
|
78
|
-
6. npx @royalsolution/ontosight@0.2.0
|
|
96
|
+
6. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200
|
|
79
97
|
```
|
|
80
98
|
|
|
81
|
-
**Example
|
|
99
|
+
**Example** (replace paths and symbol with values from `codegraph_search` in **this** project):
|
|
82
100
|
|
|
83
101
|
```bash
|
|
84
|
-
npx @royalsolution/ontosight@0.2.0
|
|
102
|
+
npx @royalsolution/ontosight@0.2.0 "/path/to/workspace" --symbol deleteUser --path src/services/ --hops 3 --max-nodes 200
|
|
85
103
|
```
|
|
86
104
|
|
|
87
105
|
**UX:** Always text summary before opening the browser; include a ranked table of top impacted symbols (accessible alternative to graph-only). See [IMPACT-DEMO.md](../skills/ui-ux-pro-max/IMPACT-DEMO.md).
|
|
@@ -91,8 +109,9 @@ npx @royalsolution/ontosight@0.2.0 . --symbol deleteUser --path src/services/ --
|
|
|
91
109
|
### Index missing
|
|
92
110
|
|
|
93
111
|
```bash
|
|
112
|
+
cd "<workspace-root>"
|
|
94
113
|
npx @colbymchenry/codegraph init -i
|
|
95
|
-
# or let the OntoSight wrapper auto-init (default)
|
|
114
|
+
# or let the OntoSight wrapper auto-init (default) — only when [project-path] is correct
|
|
96
115
|
```
|
|
97
116
|
|
|
98
117
|
## Environment variables
|
|
@@ -109,7 +128,7 @@ npx @colbymchenry/codegraph init -i
|
|
|
109
128
|
| Node 20+ | For `npx @royalsolution/ontosight@0.2.0` |
|
|
110
129
|
| Python 3.11+ | Used by `ontosight-codegraph` |
|
|
111
130
|
| uv (recommended) or pipx | Wrapper tries `uvx` first, then `pipx run` |
|
|
112
|
-
| CodeGraph index | `.codegraph/codegraph.db` in
|
|
131
|
+
| CodeGraph index | `.codegraph/codegraph.db` in workspace root |
|
|
113
132
|
|
|
114
133
|
## What the user sees
|
|
115
134
|
|
|
@@ -117,11 +136,16 @@ npx @colbymchenry/codegraph init -i
|
|
|
117
136
|
2. OntoSight opens in the browser with the call subgraph, critical-node highlights, and a CodeGraph query panel for live reloads.
|
|
118
137
|
3. Process stays running until the user closes the server (Ctrl+C in terminal).
|
|
119
138
|
|
|
139
|
+
**Verify fidelity:** confirm the printed **project path** matches workspace root and topology symbols are files under that project — not another repo. If mismatch, stop and re-run with the corrected absolute path.
|
|
140
|
+
|
|
120
141
|
## Troubleshooting
|
|
121
142
|
|
|
122
143
|
| Issue | Action |
|
|
123
144
|
|-------|--------|
|
|
124
|
-
|
|
|
145
|
+
| Browser shows symbols from another repo | Re-run with absolute workspace root as `[project-path]`; delete stray `.codegraph/` in wrong cwd if auto-init ran there |
|
|
146
|
+
| Empty or generic graph | Run `codegraph init -i` in workspace root; seed with `--symbol` from `codegraph_search` in this project |
|
|
147
|
+
| MCP and OntoSight disagree | Align paths: same root for MCP `projectPath` and OntoSight `[project-path]` |
|
|
148
|
+
| `CodeGraph index not found` | Run `npx @colbymchenry/codegraph init -i` in workspace root or remove `ONTOSIGHT_SKIP_AUTO_INIT` |
|
|
125
149
|
| `Neither uv nor pipx found` | Install uv: `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
|
|
126
150
|
| Subgraph truncated warning | Add `--symbol`, `--task`, or `--path`; lower scope before raising `--max-nodes` |
|
|
127
151
|
| Stale symbols after edits | Wait ~2s for CodeGraph watcher sync, or re-run init |
|
|
@@ -28,6 +28,8 @@ For interactive call-graph UI (user asks to "show the graph" or explore architec
|
|
|
28
28
|
|
|
29
29
|
For **impact demonstration** requests ("show impact", "blast radius", "what breaks if I change X"), run `codegraph_impact` first, present a text summary, then open OntoSight — never stop at MCP text alone when the user wants to see or show impact.
|
|
30
30
|
|
|
31
|
+
**Project graph fidelity:** OntoSight is a separate CLI — MCP `${workspaceFolder}` binding does not apply automatically. Pass the **same workspace root** to OntoSight's `[project-path]` as you use for `projectPath` on `codegraph_*` calls when MCP cwd detection is wrong. Run `codegraph_status` before opening OntoSight; seeds (`--symbol`, `--task`) must come from queries against that same index. See **Project graph fidelity** in **`.claude/rules/ontosight.md`**.
|
|
32
|
+
|
|
31
33
|
### Tool parameters (do not mix)
|
|
32
34
|
|
|
33
35
|
| Tool | Required arg | Optional cap | Wrong args → error |
|
|
@@ -16,6 +16,44 @@ See **`.claude/rules/codegraph.md`** for MCP usage and **`.claude/references/ont
|
|
|
16
16
|
|
|
17
17
|
Rule of thumb: gather facts with CodeGraph MCP; open OntoSight when visualization helps the human explore complexity you already identified.
|
|
18
18
|
|
|
19
|
+
### Project graph fidelity
|
|
20
|
+
|
|
21
|
+
OntoSight reads nodes from `.codegraph/codegraph.db` under the **`[project-path]`** argument (default: shell `cwd`). The browser must show **this workspace's** project graph — never a foreign repo or auto-init index from the wrong directory.
|
|
22
|
+
|
|
23
|
+
**Mandatory preflight** (before any OntoSight run):
|
|
24
|
+
|
|
25
|
+
1. Resolve **workspace root** (Cursor `${workspaceFolder}` / absolute path from user context).
|
|
26
|
+
2. `codegraph_status({ projectPath: "<workspace-root>" })` when MCP may be on wrong cwd; otherwise default.
|
|
27
|
+
3. If index missing → `npx @colbymchenry/codegraph init -i` **in workspace root** (ask user on large repos).
|
|
28
|
+
4. If MCP returns "wrong project" / path mismatch → pass `projectPath` on all subsequent `codegraph_*` calls.
|
|
29
|
+
|
|
30
|
+
**Hard rule:** Do not open OntoSight until `.codegraph/codegraph.db` exists under the **target workspace root**.
|
|
31
|
+
|
|
32
|
+
**Absolute project path** — never rely on bare `.` when workspace root is known:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Required when workspace root is known
|
|
36
|
+
npx @royalsolution/ontosight@0.2.0 "/absolute/path/to/workspace" \
|
|
37
|
+
--symbol <name> --path <dir>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Pass workspace root as the **first positional `[project-path]`** argument. Optionally set shell `cwd` to workspace root as well — but always pass the absolute path.
|
|
41
|
+
|
|
42
|
+
**Seed binding** — seeds must come from the same project's CodeGraph index:
|
|
43
|
+
|
|
44
|
+
| Seed mode | Requirement |
|
|
45
|
+
|-----------|-------------|
|
|
46
|
+
| `--symbol` | Name **must** come from `codegraph_search` / `codegraph_context` with the **same** `projectPath`; `--path` must match the directory prefix of the returned file path |
|
|
47
|
+
| `--task` | Only after `codegraph_context({ task, maxNodes })`; prefer `--symbol` when user named a symbol |
|
|
48
|
+
| Default (no seed) | Full-project exploration only; still require absolute workspace path |
|
|
49
|
+
|
|
50
|
+
**Anti-patterns (explicit ban):**
|
|
51
|
+
|
|
52
|
+
- Do not use README/doc example symbols (`view_graph`, `deleteUser`) unless `codegraph_search` confirms they exist in **this** project.
|
|
53
|
+
- Do not run OntoSight from a subdirectory with bare `.` — auto-init may index the wrong tree.
|
|
54
|
+
|
|
55
|
+
**After launch:** confirm OntoSight terminal output shows the correct **project path** and topology symbols under that project. If mismatch → stop and re-run with corrected absolute path.
|
|
56
|
+
|
|
19
57
|
### When to run OntoSight
|
|
20
58
|
|
|
21
59
|
Run (or suggest) OntoSight when the user:
|
|
@@ -37,12 +75,13 @@ Do **not** run OntoSight to collect agent context — that duplicates CodeGraph
|
|
|
37
75
|
|
|
38
76
|
**Workflow** (mandatory order):
|
|
39
77
|
|
|
40
|
-
|
|
41
|
-
|
|
78
|
+
0. `codegraph_status({ projectPath: "<workspace-root>" })` — verify index at workspace root
|
|
79
|
+
1. `codegraph_search({ query: "<symbol>", projectPath: "<workspace-root>" })` — confirm name, file, kind
|
|
80
|
+
2. `codegraph_impact({ query: "<symbol>", projectPath: "<workspace-root>" })` — ranked blast radius (chat facts)
|
|
42
81
|
3. Read **`.claude/skills/ui-ux-pro-max/IMPACT-DEMO.md`** — presentation checklist (use your tool's skills path: `.claude/skills/`, `.kiro/skills/`, `.agents/skills/`)
|
|
43
82
|
4. Optional: run ui-ux-pro-max searches from the playbook for chart/UX framing
|
|
44
83
|
5. Summarize in chat: seed symbol, top impacted callers, risk tier, what the graph will highlight
|
|
45
|
-
6. `npx @royalsolution/ontosight@0.2.0
|
|
84
|
+
6. `npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200`
|
|
46
85
|
|
|
47
86
|
**Hop guidance:** use `--hops 3` (or `4` for deep trees) for impact demos; prefer `--path` over raising `--max-nodes` when truncated.
|
|
48
87
|
|
|
@@ -52,25 +91,29 @@ Do **not** run OntoSight to collect agent context — that duplicates CodeGraph
|
|
|
52
91
|
|
|
53
92
|
**Symbol the user named:**
|
|
54
93
|
|
|
55
|
-
|
|
94
|
+
0. `codegraph_status({ projectPath: "<workspace-root>" })`
|
|
95
|
+
1. `codegraph_search({ query: "<name>", projectPath: "<workspace-root>" })` → confirm file + kind
|
|
56
96
|
2. Summarize in chat
|
|
57
|
-
3. `npx @royalsolution/ontosight@0.2.0
|
|
97
|
+
3. `npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir-from-search>`
|
|
58
98
|
|
|
59
99
|
**Feature area ("how does auth work?"):**
|
|
60
100
|
|
|
61
|
-
|
|
101
|
+
0. `codegraph_status({ projectPath: "<workspace-root>" })`
|
|
102
|
+
1. `codegraph_context({ task: "authentication flow", maxNodes: 20, projectPath: "<workspace-root>" })`
|
|
62
103
|
2. Summarize key symbols in chat
|
|
63
|
-
3. `npx @royalsolution/ontosight@0.2.0
|
|
104
|
+
3. `npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "authentication flow" --hops 2 --max-nodes 200`
|
|
64
105
|
|
|
65
106
|
**Large repo:** prefer `--path` or `--symbol` before raising `--max-nodes`.
|
|
66
107
|
|
|
67
108
|
### Commands
|
|
68
109
|
|
|
110
|
+
Replace `<workspace-root>` with the absolute path to the open workspace (never bare `.` when root is known):
|
|
111
|
+
|
|
69
112
|
```bash
|
|
70
|
-
npx @royalsolution/ontosight@0.2.0
|
|
71
|
-
npx @royalsolution/ontosight@0.2.0
|
|
72
|
-
npx @royalsolution/ontosight@0.2.0
|
|
73
|
-
npx @royalsolution/ontosight@0.2.0
|
|
113
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>"
|
|
114
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir>
|
|
115
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --task "auth flow" --hops 2 --max-nodes 200
|
|
116
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200
|
|
74
117
|
```
|
|
75
118
|
|
|
76
119
|
Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unless `ONTOSIGHT_SKIP_AUTO_INIT=1`). Ask the user before auto-init on very large repos.
|
|
@@ -82,4 +125,4 @@ Auto-creates the CodeGraph index when `.codegraph/codegraph.db` is missing (unle
|
|
|
82
125
|
| Node 20+ | For `npx @royalsolution/ontosight@0.2.0` |
|
|
83
126
|
| Python 3.11+ | Used by `ontosight-codegraph` |
|
|
84
127
|
| uv (recommended) or pipx | Wrapper tries `uvx` first, then `pipx run` |
|
|
85
|
-
| CodeGraph index | `.codegraph/codegraph.db` in
|
|
128
|
+
| CodeGraph index | `.codegraph/codegraph.db` in workspace root |
|
|
@@ -46,7 +46,7 @@ Use for: summary-before-graph; tell the user what OntoSight is loading and what
|
|
|
46
46
|
|
|
47
47
|
## Chat summary template
|
|
48
48
|
|
|
49
|
-
Present this **before** running `npx @royalsolution/ontosight@0.2.0
|
|
49
|
+
Present this **before** running `npx @royalsolution/ontosight@0.2.0` (with absolute workspace root as `[project-path]`):
|
|
50
50
|
|
|
51
51
|
### 1. Seed
|
|
52
52
|
|
|
@@ -71,10 +71,10 @@ Group by risk: **direct callers** (highest) vs **transitive** (lower).
|
|
|
71
71
|
|
|
72
72
|
### 4. Action
|
|
73
73
|
|
|
74
|
-
Short line: *"Opening interactive impact graph…"* then run:
|
|
74
|
+
Short line: *"Opening interactive impact graph…"* then run (replace `<workspace-root>` with absolute workspace path):
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
npx @royalsolution/ontosight@0.2.0
|
|
77
|
+
npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir-from-search> --hops 3 --max-nodes 200
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
---
|
|
@@ -90,12 +90,13 @@ npx @royalsolution/ontosight@0.2.0 . --symbol <name> --path <dir-from-search> --
|
|
|
90
90
|
## Full agent workflow
|
|
91
91
|
|
|
92
92
|
```text
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
0. codegraph_status({ projectPath: "<workspace-root>" }) → verify index at workspace root
|
|
94
|
+
1. codegraph_search({ query: "<symbol>", projectPath: "<workspace-root>" })
|
|
95
|
+
2. codegraph_impact({ query: "<symbol>", projectPath: "<workspace-root>" })
|
|
95
96
|
3. Read this file (IMPACT-DEMO.md)
|
|
96
97
|
4. Optional: ui-ux-pro-max chart/ux searches above
|
|
97
98
|
5. Chat summary (template sections 1–3)
|
|
98
|
-
6. npx @royalsolution/ontosight@0.2.0
|
|
99
|
+
6. npx @royalsolution/ontosight@0.2.0 "<workspace-root>" --symbol <name> --path <dir> --hops 3 --max-nodes 200
|
|
99
100
|
```
|
|
100
101
|
|
|
101
102
|
See **`.cursor/references/ontosight.md`** for flags and troubleshooting.
|
|
@@ -80,12 +80,14 @@ Example — correct:
|
|
|
80
80
|
|-------|--------|
|
|
81
81
|
| `task must be a non-empty string` | Use `task` (not `query`) on `codegraph_context`; use `maxNodes` (not `limit`). For `/resume`, read `.agent/SESSION.md` instead. |
|
|
82
82
|
| MCP “not initialized” | Run `npx @colbymchenry/codegraph init -i` in project root |
|
|
83
|
+
| MCP wrong project / path mismatch | Pass `projectPath: "<workspace-root>"` on all `codegraph_*` calls; use the same root for OntoSight `[project-path]` |
|
|
83
84
|
| MCP not connecting | Reload Cursor; verify `.cursor/mcp.json`; test `npx @colbymchenry/codegraph serve --mcp` |
|
|
84
85
|
| Stale symbols after edit | Wait ~2s for watcher sync, or check staleness banner in tool output |
|
|
85
86
|
| Init failed during install | Run `npx @colbymchenry/codegraph init -i` manually |
|
|
87
|
+
| OntoSight shows wrong project's graph | Pass absolute workspace root to OntoSight (not bare `.`); run `codegraph_status` first — see [`.cursor/references/ontosight.md`](ontosight.md) |
|
|
86
88
|
|
|
87
89
|
## Visualization (OntoSight)
|
|
88
90
|
|
|
89
|
-
For interactive call-graph exploration in the browser, use **[OntoSight](https://www.npmjs.com/package/@royalsolution/ontosight)** (`npx @royalsolution/ontosight@0.2.0`). Gather facts with `codegraph_*` first; open OntoSight when the user wants a visual UI. See [`.cursor/references/ontosight.md`](ontosight.md).
|
|
91
|
+
For interactive call-graph exploration in the browser, use **[OntoSight](https://www.npmjs.com/package/@royalsolution/ontosight)** (`npx @royalsolution/ontosight@0.2.0`). Gather facts with `codegraph_*` first; open OntoSight when the user wants a visual UI. Pass the **absolute workspace root** as `[project-path]` (not bare `.`) so the browser loads this project's graph. See [`.cursor/references/ontosight.md`](ontosight.md).
|
|
90
92
|
|
|
91
93
|
Upstream: [colbymchenry/codegraph](https://github.com/colbymchenry/codegraph)
|