π§ Synapse Kit (synapse-kit)
AI-Native Unified Twin-Core: Polyglot Compiler Engine & Causal Memory 2.0 Brain
π Language / μΈμ΄: English (Global) | νκ΅μ΄ (Korean)
Official Website: https://synapse.minseok.online | Memory Portal: https://synapse.minseok.online/memory/
Synapse Kit is a next-generation AI-native twin-core framework coupling a blazing-fast 10-language compiler engine (compiler/) with an AI agent 0-token causal memory brain (memory/).
π Table of Contents
- ποΈ Top-Level Twin-Core Architecture
- πΎ Causal Memory 2.0 & 3 Core Safeguards
- π Empirical Benchmarks (800K Monorepo & 100K Memory)
- π Quick Start
- π» Dual Independent CLI Commands
- π¦ Sub-path Imports Support
- License
ποΈ Top-Level Twin-Core Architecture
The repository and package layout strictly decouples the compiler and memory into equal peer modules at the root:
synapse-kit/
βββ compiler/ β β‘ [Synapse Compiler] Concurrent polyglot check, build & bundle
βββ memory/ β πΎ [Synapse Memory] 100,000-rule SQLite WAL causal memory brain
βββ db/ β ποΈ [Synapse DB] Universal Markdown-First & In-Memory Connectome DB
synapse-compiler(synapse-kit/compiler): For teams and CI pipelines wanting pure, ultra-fast monorepo build acceleration.synapse-causal-memory(synapse-kit/memory): For Claude Code, Cursor, and Antigravity agents seeking 99.2% token compression.synapse-db(synapse-kit/db): Universal Markdown-First & In-Memory Connectome Database with Wikilink Auto-Wiring, Korean 2-gram BM25 search, SQLite/JSON migrator, and Obsidian.canvasexporter.
πΎ Causal Memory 2.0 & 3 Core Safeguards
Replaces unindexed text-dumping graphs with a structured Cause β Invariant β Effect resonance engine.
- π‘οΈ 2-Tier Hybrid Architecture (Zero Memory Loss)
- Tier 1 (Global Invariants): Constant 50 tokens (preserves terminal prefs and global constraints in zero-shot tasks).
- Tier 2 (Domain Resonance): 10~30 tokens precisely injected only upon matched files/keywords; 0.00s skip for unrelated work.
- βοΈ Git & AST Auto-Harvesting (Zero Maintenance Cost)
- Automatically harvests and tunes file triggers from Git diffs and AST symbols upon passing
synapse check/build.
- Automatically harvests and tunes file triggers from Git diffs and AST symbols upon passing
- π Single SQLite WAL Mode (Atomic Concurrency)
- Guarantees non-blocking concurrent reads and ACID atomic writes across multi-agent and dashboard environments via
PRAGMA journal_mode = WAL.
- Guarantees non-blocking concurrent reads and ACID atomic writes across multi-agent and dashboard environments via
π Empirical Benchmarks
| Domain | Scenario | Traditional CI / Toolchains | Synapse Kit v0.2.2 | Improvement |
|---|---|---|---|---|
| Compiler | 7-Language 800K LOC Full Check | 28.13s (Sequential sum) | 1.54s ~ 19.92s (Parallel) | Up to 28x faster |
| Compiler | Svelte 5 + TS 7.1 Native Fusion | 149.21s (Legacy tsc) | 0.78s (Native Oxc) | -99.5% reduction |
| Compiler | Single-File Edit Causal Skip | 28.13s (Full rerun) | 0.31s (700K lines 0.00s) | -98.9% faster |
| Memory | 500-Warning Burst Context Diet | 42,673 Tokens (Raw ANSI) | 351 Tokens (Min JSON) | -99.2% diet (121.6x) |
| Memory | 100,000 Causal Rules Evaluation | 450 ms (JSON parse) | 1.72 ms (SQLite WAL) | 261x faster |
π Quick Start
# 1. Install package
bun add -d synapse-kit
# 2. Initialize configuration
bunx synapse init
# 3. Run causal verification (0.00s skip on clean files)
bunx synapse check
# 4. Minimal compact JSON mode for AI agents
bunx synapse check --compact
π» Dual Independent CLI Commands
1. Compiler CLI (synapse)
bunx synapse check # Everyday causal smart check
bunx synapse check --all # Full verification across all 10 checkers
bunx synapse check -i # Live in-memory hotfix watcher (0.05s upon save)
bunx synapse build # Multi-track incremental parallel build
bunx synapse package # Single NSIS target + zlib high-speed streaming
bunx synapse sign # Cryptographic Minisign Ed25519 binary signing
2. Causal Memory CLI (synapse-memory)
bunx synapse-memory query --files "compiler/core/engine.ts" # Query active invariants
bunx synapse-memory audit # Integrity audit of 100k rules
bunx synapse-memory harvest # Auto-harvest Git triggers
bunx synapse-memory serve --port 4242 # Start local daemon & MCP stdio
π¦ Sub-path Imports Support
Import only what you need:
// 1. Unified Entrypoint
import { defineConfig, CausalMemoryStore } from 'synapse-kit';
// 2. Pure Compiler Module
import { rustChecker, svelteChecker, executeChecks } from 'synapse-kit/compiler';
// 3. Pure Causal Memory Module
import { CausalMemoryStore, runCausalQuery } from 'synapse-kit/memory';
π License
MIT License Β© 2026 Vesper & Project Synapse Authors.