Repository navigation
fix: 理顺首次使用路径(CLI 提示、recommend 危机转介、hook 精简、文档纠错) - #298
Merged
Merged
Conversation
- list shows a human summary (persona name/tradition/school/era from meta.json, catalog summary for modes and the generator) instead of the model-facing trigger text; --json adds displayName/summary only - frontmatter reader unquotes single- and double-quoted scalars and folds continuation lines, so descriptions no longer leak a leading quote - install ends with a next-step hint (new session, /master-help or the installed persona, Codex/Gemini pointer) - doctor with nothing installed prints a warning with the install command; status and exit code stay ok - unknown skill names and commands suggest the closest match
…ments - crisis keywords (自杀/不想活/kill myself...) are checked first and get a referral to emergency and crisis lines, never a master - new situations rows for anxiety/insomnia and grief, each with a line pointing to professional help - an English query with no keyword hit now says matching is Chinese-based and points to /master-help instead of presenting the default pairing - master-help mirrors the crisis step and new rows; validate-routing checks both
Claude Code registers all 20 plugin skills and shows the model their names and descriptions itself; the SessionStart hook repeated that list in 1,548 UTF-8 bytes of context (2,134 bytes of JSON) at every startup/clear/compact. Claude Code now gets a 175-byte pointer to /master-help, emitted by the bash hook before any python interpreter is looked up. Cursor (manifest exposes only ./prebuilt/, so create-master is announced nowhere else; discovery never measured) and unidentified hosts keep the full list. Also stop describing master-debate as fixed 4 rounds: some pairs default to 5 (master-debate/meta.json per_pair_overrides).
- fojin.app/chat offers single-master conversation; the three teaching modes need a terminal install - 「你的状况」 table uses real /master-<name> commands in both languages, plus a crisis-help line - desktop section moves to docs/desktop*.md (maintainer tool; macOS builds are Apple Silicon only)
- replace 'delete ~/.claude/skills/master-<name>/' with update --dry-run / --force, which keep install records and local-edit detection - quote the real offline marker (FoJin 暂不可达,以下为离线资料) - state the fidelity minimum (5 cases, >=1 boundary; shipped masters 10+) the same way in troubleshooting and CONTRIBUTING; link CONTRIBUTING instead of a dangling 'see below' - add Codex/Gemini discovery, missing pypinyin, command-not-found and recommend-language entries - PRD header points to v1-framework-roadmap.md as current
npx users have no local docs/ directory.
CodeQL js/regex/missing-regexp-anchor flagged the URL pattern.
CodeQL js/incomplete-url-substring-sanitization flagged the includes().
- recommend: romanized terms (nianfo, lamrim, huatou …) expand to Chinese keywords; ASCII keywords match whole words so self-harmony no longer trips self-harm; kind none carries no command (master-help would loop) and master-help now asks a clarifying question for it; crisis output adds a pointer for doctrinal questions after the referral - test every documented recommend example routes somewhere - install hint names the requested skill, not a pulled-in dependency - frontmatter: comments after plain scalars, \uXXXX / standard escapes, escaped line breaks, block indentation and chomping; cases checked against PyYAML - did-you-mean uses OSA distance (lsit -> list) and answers instal --dry-run instead of the dry-run refusal
xr843
force-pushed
the
fix/first-run-ux
branch
from
October 3, 2026 06:26
3edbe87 to
95b5e60
Compare
Owner
Author
|
按复审意见修复并 rebase 到 origin/main(含 #299):罗马字术语扩展(nianfo/lamrim/huatou…)与英文整词匹配(self-harmony 不再命中 self-harm);kind none 不再返回 /master-help,master-help 改为自行澄清;危机输出先转介、再给教理问题的去处;安装提示用用户点名的技能;frontmatter 注释/转义/续行/块缩进按 PyYAML 结果测试;did-you-mean 用 OSA 距离并接住 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
第一次使用的人遇到的几处断点:README 说三种教学模式在 fojin.app/chat 可用(实际网页只有 15 位祖师的单人对话),「你的状况」表混着并不存在的
/虚云/印光等中文命令;install之后只打印✓ name → path,doctor在什么都没装时报Status: ok;list显示给模型看的触发词,三个教学模式的描述还带着一个没剥掉的';拼错技能名或命令没有任何提示;recommend对「最近焦虑睡不着」「家人去世很难过」和英文问题都静默回退到默认配对,对「我不想活了」也照样推荐祖师。CLI:
install结束时给出下一步(新会话、/master-help或刚装的祖师、Codex / Gemini 不读~/.claude/skills/)。doctor无安装时打印带安装命令的 warning,status与退出码仍为 ok(桌面端读status == "ok"作 runtime_ok,--json只新增warnings)。list改显示祖师名 · 传统 · 宗派 · 年代(meta.json,即inspect的来源)和 catalog 里新加的教学模式summary;--json只加displayName/summary。frontmatter 读取改为正确处理单 / 双引号标量与折行(新测试抓到第一版对''转义的 bug)。未知技能名与命令按编辑距离给 did-you-mean。recommend:
routing.json新增crisis层,最先检查;命中「自杀 / 不想活 / kill myself」等只输出急救与心理援助热线(中国大陆 12356、findahelpline.com、美国 988),不给任何祖师或模式。新增焦虑失眠、丧亲悲伤两个状况行,并附一句专业求助提示。无汉字且无命中的查询明说「按中文关键词匹配」并指向/master-help。master-help同步第 0 步与新行,validate-routing.py校验两者一致。SessionStart hook:Claude Code 插件实测会把 20 个 skill 的名字与描述交给模型,hook 再列一遍是重复。Claude Code 现在只收到一行指引,由 bash 在查找 Python 之前直接输出;Cursor 的 manifest 只指向
./prebuilt/(create-master别处没有宣告,且其发现机制从未实测)以及无法识别的宿主保留完整列表。/master-debate不再写成固定 4 轮(huineng-vs-tsongkhapa/ouyi-vs-tsongkhapa默认 5 轮)。文档:troubleshooting 改为
update --dry-run/--force(不再建议手删目录丢掉安装记录),离线标注改为实际的「FoJin 暂不可达,以下为离线资料」(原文「当前使用离线片段」在 prebuilt 中 0 处),fidelity 下限统一为「至少 5 条、≥1 boundary,现有祖师均 10+」(与validate-fidelity.py一致),新增 Codex / Gemini 看不到 skill、缺 pypinyin、命令找不到等条目。桌面管理器一节移到docs/desktop*.md(macOS 仅 Apple Silicon)。docs/PRD.md加注已成历史、以v1-framework-roadmap.md为准。SECURITY.md写明安装器威胁模型:已能写入 skills 目录的攻击者不在范围内,不再追加竞态加固。验证
npm test:全部结构门禁(含validate-routing.py:3 mode rules、6 situations、19 topic pairings)、121 个 CLI 测试、1408 个 Python 测试通过,退出码 0;本地跳过 2 个真实 Promptfoo 集成用例。npm run test:hook:29 + 7 + 2 通过,退出码 0(test_run_hook_cmd.sh在 WSL 下经 cmd.exe 实跑)。新增 Case 22/23:Claude 载荷等于 Python 中的CLAUDE_POINTER、< 300 字节、不含祖师列表;Cursor 仍含/create-master与/master-huineng。--json兼容、技能名 / 命令 did-you-mean、焦虑 / 丧亲路由、危机输入不出现任何/master-、英文无命中。CLAUDE_PLUGIN_ROOT指向仓库):additionalContext 1,548 → 175 UTF-8 字节,整段 JSON 2,134 → 258 字节。main852c6b4 的git archivevs 本分支,均用临时 HOME):所有安装测试使用临时 HOME,不触碰实际技能安装。未运行付费模型评测,未发布。12356 热线号码与网页版功能范围请维护者再确认一次。