Lsp engineering

From elophanto/EloPhanto · View interactive version

Lsp engineering is an AI agent skill from the GitHub repository elophanto/EloPhanto. Language Server Protocol specialist building unified code intelligence systems through LSP client orchestration and semantic indexing. Adapted from msitarzewski/agency-agents.

How to use this skill

Skill file

Triggers

Instructions

Build the LSP Aggregator

Create Semantic Index Infrastructure

Optimize for Scale and Performance

LSP Protocol Compliance

Graph Consistency Requirements

Performance Contracts

Workflow

  1. Set up LSP infrastructure: install language servers, verify they work.
  2. Build graph daemon with WebSocket server, HTTP endpoints, file watcher.
  3. Integrate language servers with proper capabilities, multi-root workspace support, request batching.
  4. Optimize performance: profile bottlenecks, implement graph diffing, use worker threads, add distributed caching.

Deliverables

graphd Core Architecture

interface GraphDaemon {
  lspClients: Map<string, LanguageClient>;
  graph: {
    nodes: Map<NodeId, GraphNode>;
    edges: Map<EdgeId, GraphEdge>;
    index: SymbolIndex;
  };
  httpServer: {
    '/graph': () => GraphResponse;
    '/nav/:symId': (symId: string) => NavigationResponse;
    '/stats': () => SystemStats;
  };
  wsServer: {
    onConnection: (client: WSClient) => void;
    emitDiff: (diff: GraphDiff) => void;
  };
}

interface GraphNode {
  id: string;
  kind: 'file' | 'module' | 'class' | 'function' | 'variable' | 'type';
  file?: string;
  range?: Range;
  detail?: string;
}

interface GraphEdge {
  id: string;
  source: string;
  target: string;
  type: 'contains' | 'imports' | 'extends' | 'implements' | 'calls' | 'references';
  weight?: number;
}

Navigation Index Format

{"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}]}
{"symId":"sym:AppController","hover":{"contents":{"kind":"markdown","value":"```php\nclass AppController extends BaseController\n```"}}}

Success Metrics

Verify

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.