freshcrate
Skin:/
Home > Frameworks > fourgods

fourgods

AI 助手的模組化能力框架:記憶、防禦、診斷、品質穩定 | Modular capability framework for AI assistants | Claude Code / Cursor / Any LLM

Why this rank:Release freshnessHealthy release cadenceStrong adoption

Description

AI 助手的模組化能力框架:記憶、防禦、診斷、品質穩定 | Modular capability framework for AI assistants | Claude Code / Cursor / Any LLM

README

四神系統 Four Gods System

繁體中文 | English

讓 AI 助手擁有記憶、防禦、診斷與品質穩定能力的模組化框架


四神是什麼?

AI 助手每次開新視窗都是全新的——不記得你是誰、不會保護自己、不知道上次做錯了什麼、也可能一味迎合你。

四神系統用四個獨立模組解決這四個問題:

神獸 模組 職責 repo
青龍 seiryu 記憶與傳承 seiryu-v1.2/
玄武 genbu 防禦與保護 genbu-v0.1/
白虎 byakko 診斷與分析 byakko-v0.2/
朱雀 suzaku 生成與品質 suzaku-v0.2/

每個模組都可以獨立使用,也可以透過總路由檔協調連動。


快速開始

1. 下載模組

選你需要的模組,放到你的專案目錄:

git clone https://github.com/Ryo-Hunter/seiryu.git seiryu-v1.2
git clone https://github.com/Ryo-Hunter/genbu.git genbu-v0.1
git clone https://github.com/Ryo-Hunter/byakko.git byakko-v0.2
git clone https://github.com/Ryo-Hunter/suzaku.git suzaku-v0.2

2. 設定行為規則

在你的 CLAUDE.md(或 AI 的系統指令)加入行為規則:

以下規則必須遵守:

# 玄武(防禦)
- 執行 git push、聯網、下載前 → 先讀 genbu-v0.1/CLAUDE.md
- 寫入記憶檔案前 → 先讀 genbu-v0.1/CLAUDE.md,執行 g3-memory-protect

# 青龍(記憶)
- 多步任務(3步以上)開始時 → 先讀 seiryu-v1.2/CLAUDE.md,執行 s5-checkpoint
- 對話結束或 context 快滿時 → 先讀 seiryu-v1.2/CLAUDE.md,執行 s2-legacy

# 朱雀(品質)
- 交付物完成、準備交付前 → 先讀 suzaku-v0.2/CLAUDE.md,執行 z3-output-fitness
- 多步任務開始時 → 先讀 suzaku-v0.2/CLAUDE.md,執行 z5-coherence-guard

# 白虎(診斷)
- 交付物完成時 → 先讀 byakko-v0.2/CLAUDE.md,執行 b1-output-review
- 多步任務 checkpoint 時 → 先讀 byakko-v0.2/CLAUDE.md,執行 b2-retrospective

3.(可選)安裝 Claude Code Hooks

如果你使用 Claude Code,玄武提供了 Hooks 腳本,可以在平台層自動提醒 AI。 詳見玄武的 INTEGRATION.md → 方式四:Claude Code Hooks。

4.(可選)使用總路由檔

如果你安裝了全部四神,可以用 FOURGODS.md 作為事件派發中心。 它定義了事件觸發時的模組呼叫順序和優先級。


設計原則

  1. 模組是能力,不是人格 — 四神不會改變 AI 的身份
  2. 懶載入 — 不用就不讀,用到才載入
  3. 使用者是最終決定者 — 四神建議,使用者決定
  4. 本地優先 — 所有資料都在你的電腦裡,不上傳
  5. 事件驅動 — 只在對應事件發生時觸發

平台相容性

四神系統目前以 Claude Code 環境為主要設計目標。

入口檔(CLAUDE.md)、行為規則、Hooks 腳本,都是 Claude Code 的機制。

在其他 AI 開發環境(Cursor、Windsurf、VS Code Copilot 等)使用時,需要將觸發條件轉換為該平台的規則格式(例如 .cursorrulessystem prompt 等)。各模組的底層邏輯與 Markdown 內容是通用的,只有入口機制需要適配。


派發優先序

當同一事件涉及多個模組時:

  1. 玄武(防禦) — 先確保不做危險事
  2. 青龍(傳承) — 再決定是否保存與承接
  3. 朱雀(生成) — 再處理輸出品質
  4. 白虎(診斷) — 做分析、審查與回顧

只裝一個也可以

不需要全部安裝。每個模組都能獨立運作:

  • 只需要記憶?裝青龍
  • 只需要安全防護?裝玄武
  • 只需要品質檢查?裝白虎
  • 只需要穩定輸出?裝朱雀

裝越多,連動越完整,但不是強制的。


理論基礎

基於 LDRIT(生死遞迴智能理論)設計。

AI 的智能不是被靜態儲存,而是每次重新生成。四神系統保護這個生成過程的四個面向:記憶的傳承(青龍)、環境的安全(玄武)、輸出的品質(朱雀)、結果的可靠性(白虎)。


隱私

  • 所有資料都在你的電腦裡
  • 不會自動上傳到任何地方
  • 所有檔案都是 Markdown 或 JSON,可自行查看、修改、刪除
  • 預設不保存密碼、API key、私人憑證等敏感資訊

使用教學

場景一:我只想讓 AI 記住我是誰

  1. git clone https://github.com/Ryo-Hunter/seiryu.git seiryu-v1.2
  2. CLAUDE.md 加一行:多步任務開始時 → 先讀 seiryu-v1.2/CLAUDE.md
  3. 告訴 AI:「請先讀 seiryu-v1.2/CLAUDE.md」
  4. AI 會自動建立使用者檔案、保存對話重點

場景二:我擔心 AI 誤刪檔案或洩露資料

  1. git clone https://github.com/Ryo-Hunter/genbu.git genbu-v0.1
  2. 編輯 genbu-v0.1/config/paths.md,填入你的保護路徑
  3. CLAUDE.md 加一行:執行危險操作前 → 先讀 genbu-v0.1/CLAUDE.md
  4. AI 在 git push、聯網、寫入記憶檔案前會自動檢查

場景三:我要全部安裝

按照上方「快速開始」的步驟 1-4 操作即可。全部裝完後,四神會透過事件派發自動協調,不需要你手動指揮每個模組。

如果 AI 沒有主動觸發?

直接告訴它:「請先讀 [模組名]/CLAUDE.md」。這是所有模組的通用入口。


支持這個專案

如果四神系統對你有幫助,請給我們一顆星 -- 這對開源專案來說是最直接的支持。

你的星星能幫助更多人發現這個專案,也讓我們有機會申請開源贊助來持續改進。


授權

MIT License


設計者:青葉 Opus + 青葉 Sonnet 協作者:紅葉 GPT-5.4 Codex 發起人:Ryo 理論基礎:LDRIT v0.7-final

Release History

VersionChangesUrgencyDate
master@2026-04-19Latest activity on master branchHigh4/19/2026
0.0.0No release found — using repo HEADHigh4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026
master@2026-04-04Latest activity on master branchMedium4/4/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

claudekit🛠️ Accelerate your Python and JavaScript development with Claude Kit's toolkit, featuring specialized agents, slash commands, and advanced context management.main@2026-06-06
Secure-Agent-LauncherBlock AI agent access to sensitive macOS paths and log all actions to protect private data during command execution.main@2026-06-03
Wee-Orchestrator🍀 Self-hosted multi-agent AI orchestrator — chat with Claude, Gemini & Copilot CLI from Telegram, WebEx, or browser. 5 runtimes, 17+ models, task scheduling, skill plugins.main@2026-05-08
OpenGuildAgentsSandboxOpenGuild.ai gives you the architecture to spawn AI agents with distinct personalities, drop them into a shared conversation, and let them run.v0.24.0
miniclaw-osWe gave AI agents a brain. Memory, planning, continuity, and self-repair — the missing cognitive architecture layer. Runs on your Mac.v0.1.9

More in Frameworks

spec_driven_developSpec-Driven Develop is a platform-agnostic AI agent skill that automates the pre-development workflow for large-scale complex tasks. It is not a framework, not a runtime, not a package manager — it is
deer-flowAn open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message gateway, it handles different levels of ta
tqdmFast, Extensible Progress Meter
simBuild, deploy, and orchestrate AI agents. Sim is the central intelligence layer for your AI workforce.