Skip to content

OpenSIN-Code/SIN-Code-SCKG-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCKG — Semantic Codebase Knowledge Graphs

Python-native code intelligence graph. Replaces GitNexus with a lightweight, stable indexing engine built on the ast module.

Status

  • Version: v0.6.1
  • Maturity: Beta
  • Language: Python
  • Tests: 96 tests passing (18 test files)
  • CI: ❌ Missing (placeholder — wire up GitHub Actions)

Installation

git clone https://github.com/OpenSIN-Code/SIN-Code-SCKG-Tool.git
cd SIN-Code-SCKG-Tool
pip install -e .

Usage

sckg --help
sckg index ./my-project --output graph.json
sckg query ./my-project "helper function"
sckg graph ./my-project --output graph.html
sckg dashboard

MCP Integration

  • MCP/HTTP Server: src/sckg/api/server.py (FastAPI + Strawberry GraphQL)
  • Tools: 4 CLI tools (index, query, graph, dashboard) plus GraphQL queries
  • Register: Exposed via the sin code hub as sin code sckg <command>. Start the HTTP server with python -m sckg.api.server <graph.json> or use the GraphQL endpoint at /graphql.

Architecture

  • parser.py — AST visitor extracting symbols and edges
  • graph.py — adjacency-list graph with community detection
  • html_generator.py — D3.js force-directed single-file HTML
  • cli.py — Typer CLI (index, query, graph, dashboard, …)
  • server.py — FastAPI + Strawberry GraphQL endpoint

See AGENTS.md for the full key-files map (14 subcommands + 96 tests).

Integration

This tool is exposed in the unified sin code hub:

sin code sckg index .           # alias of: sckg index .
sin code sckg query . "main"    # alias of: sckg query . "main"
sin code sckg dashboard         # alias of: sckg dashboard

Development

  • CoDocs: 30 .doc.md companions
  • AGENTS.md: ✅ Present
  • Tests: pytest tests/ -q
  • Lint: ruff check .
  • Compliance: This repository follows the OpenSIN-Code CoDocs/AGENTS.md standard.

License

MIT — see LICENSE. (LICENSE file is currently missing from the repo.)

About

Semantic Codebase Knowledge Graphs (structural code intelligence) for AI coding agents — extracted from SIN-Code-Bundle (issue #28)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages