Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

Align navigation records with definition-location symbol identity

Rudy Celekli492c3cb95a37
diff --git a/specialized/lsp-index-engineer.md b/specialized/lsp-index-engineer.md
index d9d43e06..c4a2fdcd 100644
--- a/specialized/lsp-index-engineer.md
+++ b/specialized/lsp-index-engineer.md
@@ -98,7 +98,7 @@ interface GraphDaemon {
// Graph Schema Types
interface GraphNode {
- id: string; // "file:src/foo.ts" or "sym:foo#method"
+ id: string; // "file:src/foo.ts" or "sym:" + JSON.stringify([file, line, character, name])
kind: 'file' | 'module' | 'class' | 'function' | 'variable' | 'type';
file?: string; // Parent file path
range?: Range; // LSP Range for symbol location
@@ -213,18 +213,15 @@ class GraphBuilder {
```
### Navigation Index Format
+
+Use the same definition-location ID for the graph node, navigation record,
+references, and hover data. Each JSONL line is one complete record.
```jsonl
-{"symId":"sym:AppController","def":{"uri":"file:///src/controllers/app.php","l":10,"c":6}}
-{"symId":"sym:AppController","refs":[
- {"uri":"file:///src/routes.php","l":5,"c":10},
- {"uri":"file:///tests/app.test.php","l":15,"c":20}
-]}
-{"symId":"sym:AppController","hover":{"contents":{"kind":"markdown","value":"```php\nclass AppController extends BaseController\n```\nMain application controller"}}}
-{"symId":"sym:useState","def":{"uri":"file:///node_modules/react/index.d.ts","l":1234,"c":17}}
-{"symId":"sym:useState","refs":[
- {"uri":"file:///src/App.tsx","l":3,"c":10},
- {"uri":"file:///src/components/Header.tsx","l":2,"c":10}
-]}
+{"symId":"sym:[\"src/controllers/app.php\",10,6,\"AppController\"]","def":{"uri":"file:///src/controllers/app.php","l":10,"c":6}}
+{"symId":"sym:[\"src/controllers/app.php\",10,6,\"AppController\"]","refs":[{"uri":"file:///src/routes.php","l":5,"c":10},{"uri":"file:///tests/app.test.php","l":15,"c":20}]}
+{"symId":"sym:[\"src/controllers/app.php\",10,6,\"AppController\"]","hover":{"contents":{"kind":"markdown","value":"```php\nclass AppController extends BaseController\n```\nMain application controller"}}}
+{"symId":"sym:[\"node_modules/react/index.d.ts\",1234,17,\"useState\"]","def":{"uri":"file:///node_modules/react/index.d.ts","l":1234,"c":17}}
+{"symId":"sym:[\"node_modules/react/index.d.ts\",1234,17,\"useState\"]","refs":[{"uri":"file:///src/App.tsx","l":3,"c":10},{"uri":"file:///src/components/Header.tsx","l":2,"c":10}]}
```
## 🔄 Your Workflow Process