nexus

Persistent memory system template for AI coding agents (OpenCode). Obsidian vault + Graphify + wikilinks. Survives session boundaries without daemons.

🏛️ Nexus 3.0 — Autonomous AI Control Plane, Memory Hub & Capability Registry

Personal Context, Project Hub, Cross-Project Gotchas, Personal Plugins & Universal MCP Bridge
Dynamic Memory Engine, Central Capability Registry, and Stack-Aware Gotchas Library working in synergy with Apex-core 5.

Version Status MCP License


🏛️ Twin-Engine Architecture: Nexus 3.0 & Apex-core 5

Nexus 3.0 and Apex-core 5 form an integrated Developer Productivity & Autonomous AI Agent Ecosystem:

┌─────────────────────────────────────────────────────────────────┐
│         🤖 Autonomous AI Agent & Engineering Ecosystem           │
├────────────────────────────────┬────────────────────────────────┤
│ 🏛️ Nexus 3.0 (Memory Hub)      │ ⚡ Apex-core 5 (Protocol Engine)│
│ (Central Brain & Knowledge OS) │ (Deterministic Control Plane)  │
├────────────────────────────────┼────────────────────────────────┤
│ • Dynamic Memory Vault         │ • 4 Core Domain Skills         │
│ • Stack-Aware Gotchas Library  │ • AST Cartography (-80.7%)     │
│ • Personal Capability Registry │ • In-RAM Fast Check (1-3s)     │
│ • Resumable Session Handoffs   │ • Hard Intent Lock (Read-Only) │
│ • Bridge MCP 3.0 (10 Tools)    │ • 2-Strike Circuit Breaker     │
│ • JIT Context Compiler         │ • Empirical -58.4% Token Diet  │
└────────────────────────────────┴────────────────────────────────┘
  • Apex-core 5 serves as the Deterministic Execution Engine (HOW to build & verify): Enforces strict TypeScript, surgical diffs, fast in-RAM typechecks, AST context diet, and 2-strike loop breaking.
  • Nexus 3.0 serves as the Memory OS & Hub (WHAT we know & learned): Manages project contexts, architecture decisions (ADRs), cross-stack lessons, reusable personal plugins, and MCP integration.

⚡ 6 เสาหลักของ Nexus 3.0 (Core Pillars)

  1. ⚠️ Stack-Aware Gotchas & Confidence Scoring (Knowledge/Patterns/):
    • คลังรวบรวมข้อควรระวังและบั๊กจริงที่สกัดจากประวัติการทำงาน (Nuxt 4, Prisma, TypeScript, Windows Dev)
    • ใช้ระบบ Frontmatter Tagging & Confidence Scoring (confidence: 0.0-1.0, times_applied) เพื่อจัดลำดับความน่าเชื่อถือ
  2. 📦 Personal Plugins Hub (plugins/):
    • ศูนย์รวมปลั๊กอินและสกิลเฉพาะทางของ Jack (เช่น saijai-thesis, cmru-drought) ที่เรียกใช้ได้ทันทีโดยไม่ต้องกระจายไฟล์หลายที่
  3. 🔌 Universal MCP Server: เชื่อมต่อ Memory Vault เข้ากับ Google Antigravity, Cursor, Claude Code, Windsurf ผ่าน MCP Tools:
    • nexus_get_state — ดึง Operating State ปัจจุบันและ Task Queue
    • nexus_get_project_brief — ดึง Context บรีฟของโปรเจกต์ที่ระบุในรูปแบบ High-Density
    • nexus_save_session — บันทึกประวัติ Session จบงานเข้า Vault
    • nexus_record_decision — บันทึก Architecture Decision Record (ADR)
    • nexus_synthesize_pattern — สกัด Production Blueprint ส่งต่อคลังความรู้
    • nexus_doctor — ตรวจสอบสุขภาพและคุณภาพของ Codebase ตามมาตรฐาน 6 เสาหลัก
    • nexus_get_executive_brief — สรุปรายงานสถานะผู้บริหาร
    • nexus_install_git_hook — ติดตั้ง Auto Checkpoint Hook
  4. 🔄 Resumable Session Handoff Engine: รองรับการบันทึก Checkpoint แบบมีโครงสร้าง เพื่อให้ Agent เซสชันถัดไปทำงานต่อได้ทันที
  5. 🎯 JIT Context Compiler: รวบรวมบริบทโปรเจกต์ + ADRs + Tech Stack เป็น High-Density Prompt ภายใน 1 วินาที ลดภาระ Token Consumption
  6. 🧬 Cross-Project Pattern Synthesizer: สกัดโค้ดจริงที่ทดสอบผ่านแล้ว ส่งเข้าไปเป็น Reusable Blueprints ในคลังความรู้ส่วนกลาง

📌 โครงสร้างระบบ (Vault, Plugins & Engine Structure)

Nexus/
├── plugin.json                 # 🔌 Manifest ประกาศตัวตนเป็น Memory Plugin
├── mcp_config.json             # ⚡ เปิด Nexus Universal MCP Server อัตโนมัติ!
├── _index.md                   # Quick Dashboard & Current Focus
├── AGENTS.md                   # Master Agent Operating Rules
├── CLAUDE.md                   # System Constitution & Engineering Standards
├── USER.md                     # Owner Preferences & Personal Tone
├── Vault Structure Map.md      # แผนผังและขอบเขตหน้าที่ของโฟลเดอร์
│
├── plugins/                    # 📦 [Personal Plugins Hub] รวมปลั๊กอินส่วนตัวทั้งหมด
│   ├── saijai-thesis/          # ปลั๊กอินจัดเล่มธีสิสและเอกสารโครงงาน
│   │   ├── plugin.json
│   │   └── skills/format-saijai-document/
│   └── cmru-drought/           # ปลั๊กอินงานวิจัยภัยแล้ง (Streamlit + GEE)
│       ├── plugin.json
│       └── skills/cmru-drought-paper/
│
├── bridge/                     # 🚀 Nexus 3.0 Engine & MCP Server (Node.js + TS)
│   ├── src/core/compiler.ts    # 🎯 JIT Context Compiler
│   ├── src/core/checkpoint.ts  # 🔄 Closed-Loop Memory Engine
│   ├── src/core/synthesizer.ts # 🧬 Cross-Project Pattern Synthesizer
│   └── src/mcp-server.ts       # 🔌 Universal MCP Server
│
├── Knowledge/
│   └── Patterns/               # 🌍 [Public] คลัง Gotchas & System Blueprints
│       ├── _Index.md           # สารบัญกลางเชื่อมโยง Gotchas & Confidence Policy
│       ├── gotchas-nuxt4-nitro.md     # ข้อควรระวัง Nuxt 4 + Nitro + Vue 3
│       ├── gotchas-prisma-postgres.md # ข้อควรระวัง Prisma & Database
│       ├── gotchas-coding-and-typescript.md # ข้อควรระวัง TypeScript & Async State
│       ├── gotchas-agent-behavioral-anti-patterns.md # ข้อห้ามเชิงพฤติกรรมของ AI Agent
│       ├── gotchas-windows-dev.md     # ข้อควรระวัง Windows Path, Robocopy, PTY
│       ├── gotchas-ai-memory-tools.md # ข้อควรระวัง AI Agents & Single-committer Git
│       └── anti-patterns-security.md  # กฎเหล็ก OWASP & Secrets Prevention
│
├── Decisions/                  # 🔒 [Local] บันทึกการตัดสินใจทางสถาปัตยกรรม (ADRs)
├── Projects/                   # 🔒 [Local] บรีฟและสถานะแต่ละโปรเจกต์ (Active / Maintenance)
├── Sessions/                   # 🔒 [Local] ประวัติการทำงานย้อนหลัง (Action-First Session Logs)
├── Shared/                     # 🔒 [Local] ข้อมูลส่วนกลาง (Operating State, Task Queue)
└── Templates/                  # 📐 แม่แบบเอกสารมาตรฐาน (Session, Handoff, ADRs)

⚙️ การเชื่อมต่อกับ Google Antigravity & IDEs

🌟 ติดตั้งผ่าน plugins.json (แนะนำที่สุด 🏆)

เพิ่ม Path ของ Nexus และ Nexus/plugins ลงใน ~/.gemini/config/plugins.json:

{
  "entries": [
    { "path": "C:/Users/Admin/Desktop/work/Apex-core" },
    { "path": "C:/Users/Admin/Desktop/work/Nexus" },
    { "path": "C:/Users/Admin/Desktop/work/Nexus/plugins" }
  ]
}
  • ✨ ผลลัพธ์: Antigravity จะโหลดความจำ, เครื่องมือ MCP 10 ตัว, และปลั๊กอินทั้งหมดใน Nexus/plugins/ มาให้ใช้งานอัตโนมัติทันที 100%!

🚀 Quick Commands (CLI)

# 1. ตรวจสอบสถานะภาพรวมและงานค้างใน Task Queue
node bridge/dist/cli.js status

# 2. เสิร์ฟบริบทโปรเจกต์แบบ High-Density JIT Context
node bridge/dist/cli.js brief [ProjectName]

# 3. บันทึก Checkpoint จบงาน (Auto Git Commit & Session Log)
node bridge/dist/cli.js checkpoint [ProjectName] "[Work Summary]"

# 4. ตรวจสุขภาพ Codebase ตามเกณฑ์ Apex 6 เสาหลัก
node bridge/dist/cli.js doctor [ProjectName]

# 5. แบ็กอัปข้อมูล Private Memory Vault ทั้งหมด (Sessions + Decisions + Projects)
powershell.exe -ExecutionPolicy Bypass -File scripts/backup-vault.ps1
# หรือดับเบิลคลิก scripts/backup.bat ได้ทันที (Auto-target Google Drive / OneDrive)

# 6. เริ่มรัน Universal MCP Server
node bridge/dist/cli.js mcp

🔗 Repository Links & Ecosystem

How to Install

  1. Download the ZIP or clone the repository
  2. Open the folder as a vault in Obsidian (File → Open Vault)
  3. Obsidian will prompt you to install required plugins

Stats

Stars

0

Forks

0

License

MIT

Last updated 2d ago