Skip to content

wujiajun4/brain-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Brain Sync

Fast reflexes. Deep memory. No drift.

ๅฐ่„‘ๅฟซๅๅบ”ใ€‚ๅคง่„‘ๆทฑ่ฎฐๅฟ†ใ€‚้›ถๆผ‚็งปใ€‚

version platform license lang

Features ยท Install ยท Architecture ยท Contributing


npx skills add wujiajun4/brain-sync -g


Screenshot


About

You have three memory systems. They don't talk to each other. Brain Sync fixes that โ€” extracts triggers and relations for your fast-twitch Memory MCP, keeps deep docs in your Obsidian brain. TRUST 5 quality gate on every sync.

Brain Sync keeps your three-layer AI memory stack in sync without duplication. It reads your Obsidian knowledge base, extracts the "how to use" information (triggers, relations, orchestras), and stores it in Memory MCP for 0.1-second reflexes. Full documentation stays in Obsidian for deep reasoning.

ไฝ ๆœ‰ไธ‰ไธช่ฎฐๅฟ†็ณป็ปŸใ€‚ๅฎƒไปฌไบ’็›ธไธ่ฏด่ฏใ€‚ Brain Sync ไฟฎๅค่ฟ™ไธช้—ฎ้ข˜โ€”โ€”ๆๅ–่งฆๅ‘่ฏๅ’Œๅ…ณ็ณปๅˆฐ ๅฟซๅๅบ”ๅฐ่„‘๏ผŒๆŠŠๆทฑๅบฆๆ–‡ๆกฃ็•™ๅœจๅคง่„‘ใ€‚ๆฏๆฌกๅŒๆญฅ้ƒฝ่ฟ‡ TRUST 5 ่ดจ้‡้—จใ€‚

Key Features

Feature What it does
๐Ÿ” Drift Detection Compares Obsidian skill count vs Memory MCP entity count
โž• Auto-sync Missing Creates entities for skills not yet in Memory MCP
๐Ÿ”— Auto-relations Links every new tool to its orchestra
๐Ÿ‘ป Ghost Pruning Removes entities that no longer exist in Obsidian
โœ‚๏ธ obs Compress Auto-split observations โ‰ค 200 chars (TRUST 5 R dimension)
๐Ÿ“‘ Drift Check CLI tool: scan Memory MCP โ†” MEMORY.md, find missing entities
๐ŸŽฏ Hot-Trigger Audit CLI tool: static analysis of CLAUDE.md hot-trigger list health
โœ… TRUST 5 Quality Gate Tested ยท Readable ยท Unified ยท Secure ยท Trackable
๐Ÿ“Š Sync Report Before/after table with pass/fail for each dimension
๐ŸŽš๏ธ Progressive Disclosure L1 150-token summary โ†’ L2 4000-token full spec

Tech Stack

Category Technology
Platform Claude Code ยท Agent Skills (67+ platforms)
Language Markdown (SKILL.md)
Runtime Memory MCP ยท Obsidian knowledge base
Design Reference MoAI-ADK TRUST 5 ยท Progressive Disclosure
Dependencies Zero โ€” pure instruction skill

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 Brain Sync                  โ”‚
โ”‚                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    extract     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ Obsidian โ”‚ โ”€โ”€triggersโ”€โ”€โ†’ โ”‚ Memory    โ”‚  โ”‚
โ”‚  โ”‚ (Brain)  โ”‚  +relations   โ”‚ MCP       โ”‚  โ”‚
โ”‚  โ”‚          โ”‚               โ”‚ (Cereb.)  โ”‚  โ”‚
โ”‚  โ”‚ Deep     โ”‚  don't sync   โ”‚ Fast      โ”‚  โ”‚
โ”‚  โ”‚ docs     โ”‚ โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚ reflexes  โ”‚  โ”‚
โ”‚  โ”‚ logs     โ”‚  code blocks  โ”‚ triggers  โ”‚  โ”‚
โ”‚  โ”‚ specs    โ”‚  trade data   โ”‚ relations โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚         TRUST 5 Gate                 โ”‚   โ”‚
โ”‚  โ”‚  Tested ยท Readable ยท Unified ยท       โ”‚   โ”‚
โ”‚  โ”‚  Secure ยท Trackable                  โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚         Sync Report                  โ”‚   โ”‚
โ”‚  โ”‚  Tools: 10+  Prefs: 12  Ghosts: 0   โ”‚   โ”‚
โ”‚  โ”‚  + bin/compress-obs + check-drift    โ”‚   โ”‚
โ”‚  โ”‚  + bin/hot-trigger-audit (v1.2)     โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Project Structure

brain-sync/
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ LICENSE               # MIT
โ”œโ”€โ”€ README.md             # โ† You are here
โ”œโ”€โ”€ SKILL.md              # Runtime spec โ€” L1/L2 progressive disclosure
                          #   5-step pipeline + TRUST 5 gate + sync report template
โ””โ”€โ”€ bin/                  # CLI helpers (v1.2.0+)
    โ”œโ”€โ”€ compress-obs.mjs      # Auto-split long observations to โ‰ค200 chars
    โ”œโ”€โ”€ check-drift.mjs       # Memory MCP โ†” MEMORY.md drift detection
    โ””โ”€โ”€ hot-trigger-audit.mjs # Static analysis of CLAUDE.md hot-trigger list

Getting Started

Prerequisites

  • Claude Code or any Agent Skills-compatible platform
  • Memory MCP configured and running
  • Obsidian knowledge base at ~/obsidian/knowledge-base/

Install

# Claude Code (one command / ไธ€่กŒๅ‘ฝไปค)
mkdir -p ~/.claude/skills && git clone https://github.com/wujiajun4/brain-sync.git ~/.claude/skills/brain-sync

# Agent Skills (any platform / ๅ…จๅนณๅฐ)
npx skills add wujiajun4/brain-sync -g

Usage

You say What happens
/brain-sync Manual sync
sync memory ยท ๆ›ดๆ–ฐๅฐ่„‘ ยท ๅŒๆญฅ่ฎฐๅฟ† Chinese/English triggers
(auto) After orchestra-intake ยท skill created ยท preference written

TRUST 5 Quality Gate

Every sync passes through five automated checks. If any fail, the report tells you exactly what to fix.

Dimension Check Failure means
T Tested Can search_nodes find the new entity? Write failed โ€” entity not persisted
R Readable Observations โ‰ค 3 each, โ‰ค 200 chars each Small brain overloaded โ€” trim it
U Unified Obsidian count โ‰ˆ Memory MCP count? Brains drifted โ€” gap > 2 warns, > 5 fails
S Secure No ghp_ / sk- / token leaks in observations? Immediate fix โ€” expose credential
T Trackable Sync report output? No audit trail

Pair with Your Other Skills

tool-eval      โ†’ Evaluate someone else's tool (should I install this?)
preflight      โ†’ Check your own project (is this ready to ship?)
brain-sync     โ†’ Sync small brain and big brain (memory consistent?)

All three belong to Orchestra โ‘ฎ AI/ML โ€” your skill development toolchain.


Contributing

Issues and PRs welcome. Before submitting โ€” eat your own dog food:

/preflight --strict

Changelog

v1.2.0 (2026-06-08) โ€” Bin Helpers

+ 3 CLI tools to automate the most common TRUST 5 dimensions:

  • bin/compress-obs.mjs โ€” Smart-split observations to โ‰ค200 chars (preserves .md/URL paths, handles CJK punctuation)
  • bin/check-drift.mjs โ€” Drift detection between Memory MCP entities and MEMORY.md index (filter-prefix support)
  • bin/hot-trigger-audit.mjs โ€” Static analysis of CLAUDE.md hot-trigger list (total / active / dead / duplicate / bloat)

Zero new dependencies. Pure Node.js, runs in CI.

v1.1.1 (2026-06-07)

  • SKILL.md frontmatter standardization (MoAI progressive disclosure + triggers)

v1.1.0 (2026-05-XX)

  • TRUST 5 quality gate

v1.0.0 (2026-05-XX)

  • Initial release

Acknowledgements

  • TRUST 5 quality gate adapted from MoAI-ADK (Apache 2.0)
  • Progressive Disclosure pattern from MoAI-ADK's three-tier knowledge delivery design
  • Built with Agent Skills specification

License

MIT โ€” ยฉ 2026 wujiajun4

Releases

No releases published

Packages

 
 
 

Contributors