Skip to content

feat: Synapse Universal Context Broker#1

Merged
daniel-harperdb merged 6 commits intomainfrom
feature/synapse
Mar 6, 2026
Merged

feat: Synapse Universal Context Broker#1
daniel-harperdb merged 6 commits intomainfrom
feature/synapse

Conversation

@daniel-harperdb
Copy link
Collaborator

Summary

  • Adds Synapse, a Universal Context Broker that ingests AI coding assistant rules (CLAUDE.md, Cursor .mdc, Windsurf .md, Copilot instructions) into a shared vector store and emits unified context back to any target tool
  • Implements SynapseIngest, SynapseSearch, and SynapseEmit Harper resource classes with full classification (Claude Haiku), embedding (Voyage AI), and HNSW vector search
  • Adds synapse CLI (bin/synapse.js) with sync, emit, search, watch, and status commands
  • Extends schema.graphql with SynapseEntry table (HNSW vector index, 7 indexed attributes)
  • Ships synapse-mcp.yaml MCP server config for agent connectivity
  • Adds dprint formatter, oxlint linter, commitlint, and semantic-release tooling
  • 82 tests (up from 35 pre-Synapse), all passing

What's included

  • Phases 1–3: Schema, resource classes, tests
  • Phase 4: CLI (bin/synapse.js) + MCP config
  • Phase 5: Documentation (docs/synapse-design.md, docs/mcp-setup.md, updated README)
  • Tooling: dprint, oxlint, commitlint, semantic-release, GitHub Actions
  • Review fixes: emit target validation, server-side type filter, content hash deduplication, preamble parsing, engines field, mock resets, CLI status query

Test plan

  • npm test — 82/82 tests pass
  • npm run format:check — clean
  • npm run lint:check — 0 warnings, 0 errors

🤖 Generated with Claude Code

daniel-harperdb and others added 6 commits March 6, 2026 10:58
- docs/synapse-design.md: Full architecture spec for Universal Context Broker
- CLAUDE.md: Synapse section with new key files, resource classes, and conventions
- Branch: feature/synapse

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SynapseEntry table to schema.graphql with HNSW vector index
- Add SynapseEntry, SynapseSearch, SynapseIngest, SynapseEmit to resources.js
- Add classifySynapseEntry, synapseparsers, synapseEmitters helpers
- Update existing tests to include SynapseEntry in harperdb mock
- Add 4 new Synapse test files (77 tests total, all pass)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Zero-dependency Node.js CLI using process.argv and fetch
- sync: discovers CLAUDE.md, .cursor/rules/*.mdc, .windsurf/ and POSTs to SynapseIngest
- emit: queries SynapseEmit and prints or writes files (--write flag)
- search: semantic search via SynapseSearch with --limit and --type filters
- watch: fs.watch with 2s debounce for auto-sync on file changes
- status: shows entry counts by type and source from a search sample
- Add "bin" field to package.json
- Add SYNAPSE_ENDPOINT, SYNAPSE_PROJECT, SYNAPSE_AUTH to .env.example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- README.md: add Synapse section with architecture diagram, context types,
  CLI examples, API endpoints table, project structure, and env vars
- docs/architecture.md: add Synapse data flow diagram and SynapseEntry schema table
- CLAUDE.md: update key files list, test count (35 → 77), remove branch qualifier

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- dprint: code formatter (tabs, single quotes, useBraces:always) for JS, JSON, Markdown, GraphQL
- oxlint: fast linter with test-file overrides for no-new-array and require-yield
- semantic-release: automated versioning and GitHub releases from conventional commits
- commitlint: enforce conventional commit format
- GitHub Actions: ci.yml (lint+test on all branches) and release.yml (release on main)
- New scripts: format:check, format:fix, format:staged, lint:check, lint:fix, test:watch, test:coverage, commitlint
- Fix lint warnings in resources.js: prefix unused embedding and projectId params with _

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add VALID_EMIT_TARGETS set; reject slack/manual as emit targets, accept markdown
- Push single-type filter to server-side search conditions in SynapseEmit
- Deduplicate ingested entries using deterministic content hash as record ID
- Fix parseClaudeCode/parseWindsurf to preserve preamble before first ## heading
- Update engines.node to >=22.0.0 (required for --experimental-test-module-mocks)
- Combine table destructures into single line
- Add beforeEach mock resets to synapse-search and synapse-emit test files
- Broaden CLI status command query; document as approximate

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@daniel-harperdb daniel-harperdb merged commit a6336c0 into main Mar 6, 2026
0 of 2 checks passed
@daniel-harperdb daniel-harperdb deleted the feature/synapse branch March 6, 2026 18:51
github-actions bot pushed a commit that referenced this pull request Mar 6, 2026
# [0.2.0](v0.1.0...v0.2.0) (2026-03-06)

### Bug Fixes

* add harperdb as devDependency to fix CI test failures ([12a3197](12a3197))

### Features

* Synapse Universal Context Broker ([#1](#1)) ([a6336c0](a6336c0))
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant