Integrate ts_knowledge_graph with Claude Code (Graphify-style)

Abierto
#10 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript

Línea de trabajo

Empieza leyendo los métodos existentes de GraphQuery y los comandos de consulta de la CLI que admiten --json. Después, revisa la integración propuesta de .claude/skills/SKILL.md y determina cómo expondría el adaptador MCP previsto las mismas operaciones. Se considera terminado cuando la integración acordada con Claude Code esté documentada y se pueda usar sin cambios en la capa central de consultas del grafo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

competitor

Goal

Integrate ts_knowledge_graph with Claude Code (and other agents) the way Graphify is — let the agent query the knowledge graph instead of blindly grepping the codebase.

How Graphify does it

Graphify's Claude Code integration is a bundle of three standard Claude Code extension points:

  1. A CLAUDE.md directive — tells Claude to read the generated graph report before answering architecture/dependency questions.
  2. A PreToolUse hook in settings.json — fires before every Grep/Glob call so the graph is consulted first (the "always-on" angle they advertise).
  3. An MCP server exposing the graph as callable tools — the most agent-native path, still on Graphify's roadmap (their issue #146), not shipped.

Why we are well positioned

The query layer is already designed as "JSON in, JSON out" agent tools:

  • GraphQuery methods (whoCalls, blastRadius, deadExports, neighborhood, references) map one-to-one onto agent tools.
  • Every CLI query command accepts --json.

The hard part (a clean, machine-readable query surface) is done; integration is plumbing on top.

Options (lowest to highest effort)

Approach What it is Effort Best when
CLAUDE.md + slash commands A directive telling Claude to run ts-knowledge-graph blast-radius <id> --json for impact questions, plus optional /blast-radius commands in .claude/commands/ Tiny Just want Claude to know the tool exists and use it
A Skill A .claude/skills/ skill documenting when/how to invoke the CLI via Bash Small Want automatic triggering + self-documentation — closest to how Graphify ships
PreToolUse hook Intercept Grep/Glob, inject graph context or remind Claude to query the graph first Small–medium Want it consulted before search, not on demand
MCP server Wrap GraphQuery as MCP tools (who_calls, blast_radius, dead_exports, …) so Claude calls them natively, no Bash Medium The most native, portable path — works across Claude Code, Cursor, etc.

Proposed plan

  1. Start with a Skill — matches Graphify's actual shipping form, fastest to value. Wraps the existing --json CLI; zero changes to core code, just a SKILL.md teaching Claude the commands and when to reach for blast-radius / dead-exports / who-calls.
  2. Then add an MCP server — thin adapter over GraphQuery (already JSON-in/JSON-out) for tool-native, cross-agent use.
  3. Skip the PreToolUse always-on hook initially — clever but adds latency to every search and is the easiest piece to add later.

References

Lenguaje dominante
TypeScript
Estrellas
7
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de jeromeetienne/codespine

Todos los issues de jeromeetienne/codespine

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.