06 / 06 AI
RuleLion
多
Generate, verify and sync AI coding rules across tools
一份
One AGENTS.md, synced to every AI editor — with every claim checked against the repo.

(01) 為什麼Why
Claude
Claude Code, Cursor, Copilot, Windsurf, Cline and Gemini each read rules from a different file, and hand-written rules drift away from the code. RuleLion extracts facts statically, verifies every claim and syncs from a single source.
(02) 06 項items
它做什麼What it does
-
01
靜態
擷取 Static fact extraction事實 套
件 管理 器、 框架 版本、 scripts、 tsconfig、 lint 設定、 目錄 結構、 import / export / 錯誤 處理 模式 與 commit 風格, 每項 都 附 檔案 證據。 Package manager, framework versions, scripts, tsconfig, lint config, directory layout, import / export / error-handling patterns and commit style — each with file evidence.
-
02
校
驗 Claim verification宣稱 產生
的 規則 裡 的 指令、 路徑、 套 件 與 版本 都會 對照 repo 檢查, 查無實據 的 直接 移除。 Commands, paths, packages and versions in generated rules are checked against the repo; unverified ones are removed.
-
03
可
完全 Works offline離線 --no-llm不 發出 任何 網路 請求; 使用 模型 (Anthropic、 OpenAI、 Gemini) 時 只 送出 FactsJSON, 從不 送 原始碼。 --no-llmmakes zero network requests; with a model (Anthropic, OpenAI, Gemini) only theFactsJSON is sent — never source code. -
04
單一
來源 One source, synced同步 維護
AGENTS.md並 同步 到 每個 目標; 只 改寫 <!-- rulelion:start -->與 <!-- rulelion:end -->之間, 手寫 內容 不會 被 覆蓋。 Keep
AGENTS.mdand sync it to every target; only the block between<!-- rulelion:start -->and<!-- rulelion:end -->is rewritten, so hand-written content survives. -
05
CI
評分 CI score, 0–1000– 100 依
可 執行 指令、 目錄 結構、 技術 版本、 具體 慣例、 無 過時 內容、 禁區 清單 與 長度 清晰度 評分, 標 出 過時 的 路徑、 scripts、 版本 與 空泛 建議。 Scores executable commands, verified structure, matching versions, concrete conventions, no stale content, a do-not-touch list and clarity — flagging stale paths, scripts, versions and vague advice.
-
06
內建
MCP Built-in MCP serverServer rulelion mcp提供 get_facts、 check_rules、 get_commands三個 工具。 rulelion mcpexposesget_facts,check_rulesandget_commands.
(03) 怎麼
一個來源,七個目標One source, seven targets
- 01
擷取Extract
rulelion facts讀出 附 證據 的 事實。 rulelion factsreads evidence-backed facts. - 02
產生Generate
離線
模板 或 用 模型 潤飾。 Offline template, or a model to polish.
- 03
校
驗 Verify查無實據
的 宣稱 被 移除。 Unverified claims are removed.
- 04
同步Sync
AGENTS.md
→ CLAUDE.md、 Cursor、 Copilot、 Windsurf、 Cline、 Gemini。 AGENTS.md → CLAUDE.md, Cursor, Copilot, Windsurf, Cline, Gemini.
- 05
檢查Check
CI
以 最低 分數 擋下 過時 規則。 CI blocks stale rules with a minimum score.
| 工具Tool | 檔案File |
|---|---|
| Codex / Amp | AGENTS.md |
| Claude Code | CLAUDE.md |
| Cursor | .cursor/rules/rulelion.mdc |
| Copilot | .github/copilot-instructions.md |
| Windsurf | .windsurfrules |
| Cline | .clinerules |
| Gemini | GEMINI.md |
(04) README
快速開始Quick start
Repo npx
The repo is private for now, so npx works once it is open-sourced. The install is about 35 MB (ts-morph and TypeScript for AST analysis).
npx rulelion init
npx rulelion generate --no-llm --yes
npx rulelion check --ci --min-score 80
npx rulelion sync
npx rulelion facts --json
(05) 實測Measured
真實模型檢查Real-model check
2026-generateclaude-haiku-5-5generate on RuleLion’s own repo · claude-haiku-5-5
| 耗時Time | 被 | 保留 |
|---|---|---|
| 約 | 1 | 每個 |
(06) 安全Security
安全Security
- 從不
讀取 Never reads.env的 值, 只讀 .env.example的 鍵 名。 .envvalues — only key names from.env.example. - 看起來
像 Strings that look like keys or tokens are redacted from金 鑰 或 Token 的 字串 會 從 Facts中 遮蔽。 Facts. - 遵守
Respects.gitignore。 .gitignore. - 金
鑰 Keys live in存在 ~/.config/rulelion/credentials.json(權限 600), 只 顯示 遮罩。 ~/.config/rulelion/credentials.json(mode 600) and are only shown masked.
目前狀態 Status
- Repo
目前 Repo currently private — coming to open source.為 私有, 準備 開源 中。 - README
宣告 README declares the MIT licence.MIT 授權。
想先試用 RuleLion?Want to try RuleLion early?
所有