Skip to content

Releases: nosleepman1/SynapseCode

SynapseCode v1.2.0 — BM25 Lexical Engine, 8 Multi-Language ASTs & Full MCP Protocol

Choose a tag to compare

@github-actions github-actions released this 10 Sep 04:24

SynapseCode Architecture

What is SynapseCode?

SynapseCode is an open-source, high-performance AST Code Graph and context optimization engine written in Go. It connects seamlessly to Claude Desktop, Cursor, and AI agents via the Model Context Protocol (MCP) to reduce prompt token consumption by 75% to 95% while eliminating hallucinations.


What's New in v1.2.0

1. Extended Multi-Language & Framework Support (8 Languages)

  • PHP & Laravel: Full support for Eloquent models, controllers, traits, and PHP 8+ attributes (#[Route], #[HttpGet]).
  • Java & Spring Boot: Annotations (@RestController, @Service, @Autowired, @GetMapping), Java records, interfaces, and enums.
  • C# (.NET / ASP.NET Core): Attribute routing, async task methods (Task<T>), records, enums, and interfaces.
  • C & C++: #include resolution, namespaces, classes with multiple inheritance, templates, and structs.
  • Go, TypeScript/JavaScript, Python, and Rust.

2. Okapi BM25 Search Engine & Reciprocal Rank Fusion (RRF)

  • Semantic tokenizer splitting camelCase, PascalCase, snake_case, and acronyms (JSONParser -> ["json", "parser"]).
  • Field-weighted Okapi BM25 lexical scoring with length normalization and suffix stemming.
  • Reciprocal Rank Fusion (RRF) mathematically blending lexical relevance with topological PageRank centrality.

3. Impact Analysis & Blast Radius (get_impact_analysis)

  • Reverse BFS dependency traversal computing direct callers, transitive dependents, affected files, and impacted test suites to verify before refactoring.

4. Persistent Disk Cache & Live File Watcher

  • Sub-20ms incremental startup with SHA-256 integrity cache (.synapse/cache.json).
  • Live event-driven background sync (synapse mcp --watch) using OS kernel hooks (fsnotify).

5. Full Model Context Protocol Implementation

  • 6 Native Tools: get_repo_map, get_context_for_task, get_symbol_callers, get_symbol_definition, get_impact_analysis, get_file_outline.
  • Resources (synapse://graph/...): Virtual file system exploration (summary, languages, symbols, file/{path}, symbol/{name}).
  • Guided Prompts: 1-click contextual workflows (refactor_safe, generate_unit_tests, audit_architecture, explain_symbol).

Quickstart

1. Installation via Go

go install github.com/nosleepman1/SynapseCode/cmd/synapse@latest

2. Claude Desktop Integration (claude_desktop_config.json)

{
  "mcpServers": {
    "synapse-code": {
      "command": "synapse",
      "args": ["mcp", "--path", "/path/to/your/repository", "--watch"]
    }
  }
}

3. CLI Commands

# Search symbols with BM25 + RRF
synapse query "jwt token verification" --path /path/to/repo

# Persist and inspect index
synapse index --path /path/to/repo

# Extract targeted context under token budget
synapse context "fix authentication workflow" --budget 3500

Full Changelog: https://github.com/nosleepman1/SynapseCode/blob/main/CHANGELOG.md

SynapseCode v1.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Sep 05:05

Full Changelog: v1.0.0...v1.1.0

SynapseCode v1.0.0 — High-Performance AST Code Graph & MCP Engine

Choose a tag to compare

@nosleepman1 nosleepman1 released this 27 Aug 04:17

SynapseCode Architecture

SynapseCode v1.0.0

SynapseCode is an open-source, high-performance code intelligence engine and Model Context Protocol (MCP) server designed to eliminate context bloat and reduce token consumption by 75% to 90% in AI coding workflows (Claude 3.5 Sonnet, GPT-4, Cursor, and autonomous agents).


Key Features

  • Multi-Language AST Analysis: High-speed abstract syntax tree parsing for Go, TypeScript / JavaScript, Python, and Rust.
  • In-Memory Dependency Graph: Directed multi-edge relationship graph (CALLS, IMPORTS, DEFINES, IMPLEMENTS, EXTENDS).
  • Personalized PageRank (PPR): Centrality algorithm seeded by user task terms to mathematically isolate relevant functions.
  • Knapsack Token Budgeting: Strict token-bounded selector that packages target full implementations and 1-hop dependency skeletons (e.g., 3,500 tokens max).
  • Model Context Protocol (MCP): Production-ready JSON-RPC 2.0 stdio transport compatible with Claude Desktop, Cursor, and Antigravity.
  • Instant Disk Cache: Serializes state to .synapse/index.json for sub-millisecond warm starts.

Benchmark Results

Evaluation on a 120,000-token codebase refactoring task:

Metric Raw File Injection SynapseCode (MCP) Savings
Token Consumption 124,000 tokens 4,200 tokens -96.6%
Cost (Claude 3.5 Sonnet) $0.372 / request $0.012 / request 31x reduction
Time to First Token (TTFT) 9.4 seconds 1.3 seconds 7.2x faster
Context Accuracy Low (Diluted) High (Deterministic) Zero Hallucination

Installation & Usage

1. Install via Go Toolchain

go install github.com/nosleepman1/SynapseCode/cmd/synapse@v1.0.0