Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Master-skill 是由 [FoJin](https://fojin.app) 驱动的佛教 AI 祖师人格
- **渐进式披露**:SKILL.md 以决策树 + Quick Ref 为主,`references/`、`sources/` 按需加载,Context 随查随取
- **HARD-GATE 铁律**:`/create-master` 与预置法师内置红线——教义断言、修行指导与文本解释必须引用该 persona 声明的来源(CBETA / BDRC / Toh / SuttaCentral / PTS / 合规编纂开示),不得捏造来源 ID,不得为虚构人物建角色
- **二阶段独立审查**:生成管线在写入前强制经过"教义准确性 → 风格一致性"两轮独立审查,FAIL 自动修复最多 2 轮
- **自动化保真度测试**:每位祖师 `tests/fidelity.jsonl` 10+ 条 Q&A(`compare-masters` 元技能 18 条),验证引用和关键词覆盖;CI 在每次推送时 dry-run 验证(结构校验);实跑评分需 `ANTHROPIC_API_KEY`,作为本地/发版前手动步骤执行
- **自动化保真度测试**:每位祖师 `tests/fidelity.jsonl` 10+ 条 Q&A(`compare-masters` 元技能 18 条),验证引用和关键词覆盖;CI 在每次推送时 dry-run 验证(结构校验);实跑评分需 `ANTHROPIC_API_KEY`,作为本地/发版前手动步骤执行——首份[实测基线](#保真度基线首次实测)已提交:59/84 已测通过(70%),全量 211 条覆盖率 40%(详见 [eval/reports/](eval/reports/))
- **多平台统一插件**:Claude Code、Cursor、Codex CLI、OpenCode、Gemini CLI 共用一份 `prebuilt/`,session-start hook 跨平台注入法师列表
- **NPX 一键安装**:`npx master-skill install master-zhiyi` 直接部署到 Claude Code
- **离线工具链**:`scripts/cite.py`(CBETA 引用查询)、`scripts/query.py`(离线语义检索)、`scripts/validate.py`(frontmatter linter)
Expand All @@ -163,11 +163,24 @@ Master-skill 的核心不是"角色扮演提示词集合",而是一个可验
|---|---|
| 有来源 | 每位祖师声明 `sources[]`、离线 excerpts、FoJin live fallback 与引用自审 |
| 守边界 | `ETHICS.md`、每位祖师 Layer 0 HARD-GATE、版权 Tier 与教界越界报告机制 |
| 可评测 | `tests/fidelity.jsonl`、persona-fidelity schema、promptfoo RAW / SPE / CUS 评测层 |
| 可评测 | `tests/fidelity.jsonl`、persona-fidelity schema、promptfoo RAW / SPE / CUS 评测层,[实测基线见下](#保真度基线首次实测) |
| 可运行 | `prebuilt/master-*` AgentSkills、npm CLI、多平台 hooks、FoJin runtime contract |

后续 v1.0 路线以框架稳定为优先:见 [docs/v1-framework-roadmap.md](docs/v1-framework-roadmap.md) 与 [docs/fojin-runtime-contract.md](docs/fojin-runtime-contract.md)。

### 保真度基线(首次实测)

`tests/fidelity.jsonl` 曾经只是"存在的夹具"——`scripts/test-fidelity.py` 只打印到终端,仓库里从未提交过一次真实评分。2026-08-18 首次跑出并提交了这份基线(commit [`c697d5d`](https://github.com/xr843/Master-skill/commit/c697d5d3be78ce6738cf1f969ca057c7e4c16bb5),模型 `claude-sonnet-4-6`):

| | 数值 |
|---|---|
| 已测通过 / 已测总数 | **59 / 84(70%)** |
| 全量夹具覆盖率 | 84 / 211(40%)—— 运行途中 API 账户余额耗尽(HTTP 400),非限流也非代码缺陷,剩余 127 条**未测**,不计入失败 |
| 真实失败聚集 | 关键词未覆盖 14/25;禁用词命中 12/25;引用缺失 5/25;**零虚构引用** |
| ⚠️ 量具告警 | 12 条禁用词失败里有 **10 条,禁用词本就出现在提问中**(陷阱题),而检查是对回答做纯子串匹配——正确的驳斥与真正的越界会被同等判失败。**故 70% 是下限而非估计值**,详见基线报告 |

这是**关键词/引用字符串覆盖率检查,不是教义正确性或 LLM 判分的答案质量**。完整表格、失败案例与方法论说明见 **[eval/reports/BASELINE.md](eval/reports/BASELINE.md)**。

---

## 开发者安装
Expand Down Expand Up @@ -341,9 +354,9 @@ git clone https://github.com/xr843/Master-skill ~/Master-skill

## 桌面管理器

原生桌面控制台(纯 Rust,egui,单二进制,无 Electron),统一管理 17 个 master skill 的安装状态、fidelity 评测覆盖率、运行追踪与质量门禁:
原生桌面控制台(纯 Rust,egui,单二进制,无 Electron),统一管理 19 个 master skill 的安装状态、fidelity 评测覆盖率、运行追踪与质量门禁:

![Master-skill Desktop Manager](https://raw.githubusercontent.com/xr843/Master-skill/master/docs/assets/desktop-manager.png)
![Master-skill Desktop Manager](https://raw.githubusercontent.com/xr843/Master-skill/main/docs/assets/desktop-manager.png)

**下载**:[Releases](https://github.com/xr843/Master-skill/releases) 提供 Linux / Windows / macOS 预编译二进制,下载后直接运行(仓库根目录下执行,需本地已 clone 本仓库)。Linux / macOS 下载后需先 `chmod +x` 赋予可执行权限;macOS 上二进制未签名,首次运行需右键"打开"或执行 `xattr -d com.apple.quarantine <文件名>` 解除隔离。

Expand Down
21 changes: 17 additions & 4 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ This project is built out of respect for Buddhist traditions. All content is gen
- **Progressive disclosure**: SKILL.md is a decision tree + quick reference; `references/` and `sources/` are loaded on demand to keep context lean
- **HARD-GATE discipline**: Both `/create-master` and every prebuilt master require doctrinal claims, practice guidance, and text interpretation to cite that persona's declared sources (CBETA / BDRC / Toh / SuttaCentral / PTS / compliant compiled teachings); fabricated source IDs and fictional personas are forbidden
- **Two-stage independent review**: The generation pipeline forces a "doctrinal accuracy → voice consistency" review before write; FAIL triggers up to 2 rounds of automatic repair
- **Automated fidelity tests**: Each master's `tests/fidelity.jsonl` holds 10+ Q&A samples (the `compare-masters` meta-skill holds 18) validating citations and keyword coverage; CI runs a dry-run on every push
- **Automated fidelity tests**: Each master's `tests/fidelity.jsonl` holds 10+ Q&A samples (the `compare-masters` meta-skill holds 18) validating citations and keyword coverage; CI runs a dry-run on every push, and a graded run needs `ANTHROPIC_API_KEY` as a manual local/pre-release step — the first committed [baseline](#fidelity-baseline-first-real-run) landed 2026-08-18: 59/84 measured cases passed (70%), covering 40% of all 211 fixtures (see [eval/reports/](eval/reports/))
- **Unified multi-platform plugin**: Claude Code, Cursor, Codex CLI, OpenCode, and Gemini CLI share one `prebuilt/` tree, with a session-start hook injecting the master list on every platform
- **NPX one-shot install**: `npx master-skill install master-zhiyi` drops skills straight into Claude Code
- **Offline toolchain**: `scripts/cite.py` (CBETA lookup), `scripts/query.py` (offline semantic search), `scripts/validate.py` (frontmatter linter)
Expand All @@ -161,11 +161,24 @@ Master-skill is not a prompt pack. It is a verifiable Buddhist AI persona framew
|---|---|
| Source-grounded | `sources[]`, offline excerpts, FoJin live fallback, and citation self-audits per master |
| Boundary-aware | `ETHICS.md`, per-master Layer 0 HARD-GATE rules, copyright tiers, and boundary violation reporting |
| Fidelity-tested | `tests/fidelity.jsonl`, persona-fidelity schema, and promptfoo RAW / SPE / CUS evals |
| Fidelity-tested | `tests/fidelity.jsonl`, persona-fidelity schema, promptfoo RAW / SPE / CUS evals, [real measured baseline below](#fidelity-baseline-first-real-run) |
| Runtime-ready | `prebuilt/master-*` AgentSkills, npm CLI, multi-platform hooks, and a FoJin runtime contract |

The v1.0 track prioritizes framework stability over adding more masters. See [docs/v1-framework-roadmap.md](docs/v1-framework-roadmap.md) and [docs/fojin-runtime-contract.md](docs/fojin-runtime-contract.md).

### Fidelity baseline (first real run)

The 211 fixtures under `tests/fidelity.jsonl` used to be just fixtures — `scripts/test-fidelity.py` only printed to stdout, and no scored run had ever been committed. On 2026-08-18 we ran and committed the first real baseline (commit [`c697d5d`](https://github.com/xr843/Master-skill/commit/c697d5d3be78ce6738cf1f969ca057c7e4c16bb5), model `claude-sonnet-4-6`):

| | Value |
|---|---|
| Passed / measured | **59 / 84 (70%)** |
| Coverage of the full suite | 84 / 211 (40%) — the run stopped partway when the API account's credit balance ran out (HTTP 400), not from rate limiting or a code bug; the remaining 127 cases were never evaluated and are **not** counted as failures |
| Where real failures cluster | Missing expected keyword 14/25; forbidden phrase present 12/25; missing citation 5/25; **zero fabricated citations** |
| ⚠️ Instrument warning | 10 of the 12 forbidden-phrase failures name a term **that already appears in the question** (these are trap questions), and the check is a plain substring match on the response — a correct refusal fails it exactly as hard as a real violation. **So 70% is a floor, not an estimate.** See the baseline report |

This measures **keyword/citation-string coverage, not doctrinal correctness or LLM-judged answer quality**. Full table, failing cases, and methodology notes: **[eval/reports/BASELINE.md](eval/reports/BASELINE.md)**.

---

## Developer Installation
Expand Down Expand Up @@ -328,9 +341,9 @@ The system will guide you through a three-step intake, then automatically collec

## Desktop Manager

A native desktop console (pure Rust, egui, single binary, no Electron) that unifies management of installation status, fidelity evaluation coverage, run tracing, and the quality gate across all 17 master skills:
A native desktop console (pure Rust, egui, single binary, no Electron) that unifies management of installation status, fidelity evaluation coverage, run tracing, and the quality gate across all 19 master skills:

![Master-skill Desktop Manager](https://raw.githubusercontent.com/xr843/Master-skill/master/docs/assets/desktop-manager.png)
![Master-skill Desktop Manager](https://raw.githubusercontent.com/xr843/Master-skill/main/docs/assets/desktop-manager.png)

**Download**: [Releases](https://github.com/xr843/Master-skill/releases) provides pre-built binaries for Linux / Windows / macOS — download and run directly (execute from the repository root; requires a local clone of this repo). On Linux/macOS you'll need to `chmod +x` the downloaded binary first; on macOS it's unsigned, so the first run needs right-click → Open, or `xattr -d com.apple.quarantine <file>` to clear the quarantine flag.

Expand Down
Loading
Loading