Tim Ren
7b2af14c7f
Merge pull request #5 from xr843/feat/two-stage-review
...
feat: two-stage review for create-master generation pipeline
2026-04-08 21:45:05 +08:00
xianren
f22204a75e
feat: add two-stage review for create-master generation pipeline
...
Inspired by superpowers' spec-reviewer + code-quality-reviewer pattern,
add mandatory two-stage review between generation and preview:
Stage 1 — Doctrine Review (doctrine_reviewer.md):
- Citation coverage check (target >= 90%)
- CBETA ID attribution accuracy
- Sectarian boundary validation
- Auto-fix with max 2 retry rounds
Stage 2 — Voice Review (voice_reviewer.md):
- Layer 0 hard rules completeness
- Style-to-tradition matching
- Layer structure clarity check
- Historical plausibility
Both stages must PASS before entering Step 4 (preview).
Added as Step 3.5 in create-master SKILL.md workflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-08 21:43:46 +08:00
Tim Ren
a8513910cb
Merge pull request #4 from xr843/feat/multi-platform-plugin
...
feat: multi-platform plugin support (Claude Code, Cursor, Codex, OpenCode, Gemini)
2026-04-08 21:41:56 +08:00
Tim Ren
12020444e0
Merge pull request #3 from xr843/feat/hard-gate-and-pressure-tests
...
feat: HARD-GATE discipline enforcement, pressure tests, and CI pipeline
2026-04-08 21:41:53 +08:00
xianren
f3472d6254
feat: add multi-platform plugin support and session-start hook
...
Add support for 5 platforms beyond NPX:
- Claude Code: .claude-plugin/plugin.json + marketplace.json
- Cursor: .cursor-plugin/plugin.json + hooks-cursor.json
- Codex CLI: .codex/INSTALL.md with symlink setup
- OpenCode: .opencode/INSTALL.md with plugin config
- Gemini CLI: gemini-extension.json + GEMINI.md
Infrastructure:
- SessionStart hook with platform detection (Claude Code,
Cursor, Copilot CLI) that injects available masters list
- Cross-platform run-hook.cmd polyglot wrapper (Windows + Unix)
- .version-bump.json for unified version management across
all platform config files
- Update README/README_EN with multi-platform install instructions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-08 21:38:08 +08:00
xianren
45c0416bc3
feat: add HARD-GATE to compare and create-master skills
...
- compare: add NO COMPARATIVE RANKING and NO FABRICATED DIALOGUE
iron laws with rationalization defense table
- create-master: add NO FABRICATED SOURCES iron law for the
generation pipeline
- Add 2 boundary tests for compare (sectarian ranking, fabricated
dialogue)
- Fix validate-fidelity.py to support compare's assertion fields
and no_fabricated_dialogue boundary type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-08 21:32:13 +08:00
xianren
c654e7440f
feat: add CI validation pipeline and boundary test support
...
- Update test-fidelity.py to support must_not_contain and
must_not_contain_first_turn fields for boundary/pressure tests
- Add validate-fidelity.py for structural validation of all
fidelity.jsonl files (no API needed)
- Add GitHub Actions workflow: runs validate + dry-run on every
push/PR touching prebuilt/scripts/prompts/tools
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-08 21:30:23 +08:00
xianren
da80665fa5
feat: add HARD-GATE discipline enforcement and pressure tests for all 8 masters
...
Inspired by obra/superpowers project patterns, add three-layer defense
to prevent AI hallucination and rule violation:
- Iron Laws: NO DOCTRINAL CLAIM WITHOUT CBETA CITATION,
NO PERSONA BEFORE CONTEXT, NO SECTARIAN JUDGMENT
- Rationalization Defense Table: 6 common AI excuses with rebuttals
- Red Flag List: 5 observable violation signals
Also add 40 pressure test cases (5 per master) covering:
- Sectarian judgment boundary
- No prophecy boundary
- Neutral first turn boundary
- Citation bypass pressure
- Master-specific challenges (meta, hostile, misunderstanding, etc.)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-08 21:28:41 +08:00
xianren
29a17ea281
docs: remove redundant "(手动)" from Claude Code install heading
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-07 14:16:06 +08:00
xianren
7f26cb3239
docs: add online demo section linking to fojin.app/chat
...
Users can now try all pre-built masters directly in the browser
without installing Claude Code or Codex CLI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-07 14:10:38 +08:00
xianren
59767e96b9
docs: update README for v0.3 — NPX install, architecture diagram, provenance features
2026-04-06 07:24:01 +08:00
xianren
623d88aa3e
feat: v0.3 architecture rebuild — progressive disclosure, provenance, fidelity tests, NPX installer
v0.3.0
2026-04-06 07:21:43 +08:00
xianren
88debde58d
refactor(4-masters): rebuild fazang, huineng, kumarajiva, xuanzang to v0.3 architecture
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-06 07:18:52 +08:00
xianren
d88da7b091
feat(scripts): add cite.py and query.py offline tools
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-06 07:13:56 +08:00
xianren
936ce09069
feat: add NPX installer CLI (install/list/uninstall)
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-06 07:13:51 +08:00
xianren
937b642da8
refactor(zhiyi): v0.3 architecture rebuild — progressive disclosure + provenance + fidelity tests
...
Sample master (zhiyi) rebuilt to new architecture:
- SKILL.md slimmed from 225→94 lines with decision tree + Quick Ref
- Provenance frontmatter: CBETA IDs, FoJin text IDs, citation_format
- voice.md/teaching.md moved to references/ (loaded on demand)
- sources/ with canonical excerpts (offline-capable)
- tests/fidelity.jsonl: 5 Q&A pairs with expected citations/keywords
- scripts/validate.py: cross-master frontmatter linter
- scripts/test-fidelity.py: Claude API-based fidelity test runner
Follows Anthropic Agent Skills patterns:
- Progressive disclosure (metadata→body→references)
- Decision tree for branching workflows
- Task-gated reference loading
- Quick Reference table
- Scripts as black boxes (--help, never Read source)
2026-04-06 07:05:43 +08:00
xianren
5b30b081c5
docs: add Codex CLI installation instructions
...
Codex CLI natively supports AgentSkills standard via ~/.codex/skills/.
Verified with codex-cli 0.118.0 — 10 skills registered successfully.
2026-04-05 13:33:50 +08:00
xianren
1de3bb9388
fix: correct FoJin URL format for juan paths
...
FoJin frontend route is '/texts/:id/read?juan=N' (query param),
not '/texts/{id}/juan/{N}' (path segment). Old format fell through
to React router 404.
Verified against FoJin frontend App.tsx route definitions:
- /texts/:id → TextDetailPage
- /texts/:id/read → TextReaderPage (uses ?juan= query)
2026-04-05 12:11:36 +08:00
xianren
eb87794773
docs: simplify Community section wording
2026-04-05 10:50:45 +08:00
xianren
799beb6ba6
docs: add Community section linking to LINUX DO
2026-04-05 10:46:01 +08:00
xianren
1e0947acc4
docs: simplify v0.2 update banner
2026-04-05 10:16:10 +08:00
xianren
1b8554242d
docs: add hero section with Diamond Sutra epigraph, badges, and navigation
...
Inspired by colleague-skill's README layout, adapted with dignified
Buddhist tone:
- Diamond Sutra verse as epigraph (in quotation marks, with source)
- Badges row (License, Python, Claude Code, AgentSkills)
- Scholar-oriented hook paragraphs (studying Yogacara, Chan, etc.)
- Serious tagline (no marketing flourish)
- Navigation quick-links
- v0.2 update banner
2026-04-05 10:13:39 +08:00
xianren
25aea07f6a
refactor: rename Buddha-skill → Master-skill
...
Matches internal architecture (create-master, master_xuanzang, etc.)
and accurately reflects content (historical Chinese Buddhist masters,
not the Buddha himself).
Changes:
- 32 text references across 9 files updated
- Sanskrit terms (buddha-dhātu, buddhatā) preserved in dictionary context
- GitHub repo renamed (preserves stars/forks/history, auto-redirects)
- Internal naming already uses master_* (unchanged)
All 79 tests pass.
2026-04-05 10:03:42 +08:00
xianren
9dffcf3379
fix: enforce per-master RAG queries in /compare-masters with tradition-specific terms
...
Previously LLM might run ONE combined semantic query, causing the non-dominant
master to get fallback search URLs (fojin.app/search?q=...) instead of precise
text_id links.
Now the skill:
- Explicitly requires N separate queries for N masters (emphasized with ⚠️ )
- Provides a query-rewriting table: each master's query uses its tradition's
terminology (唯识/中观/禅宗/天台/华严/净土 terms)
- Example: user asks '因缘果' → xuanzang queries '因缘果 六因 四缘 五果 种子',
kumarajiva queries '因缘所生法 空 中道 无自性 四句'
This ensures both masters get precise text_id citations, not degraded search URLs.
2026-04-05 09:43:31 +08:00
xianren
9873d0514d
feat: add --brief flag to rag_query.py to reduce output verbosity
...
- New --brief flag for semantic/search subcommands outputs one-line-per-result
(title + link + 80-char snippet) instead of full 500-char excerpts
- Reduces output from ~60 lines to ~7 lines per query (3 results)
- /compare-masters now uses --brief by default (multiple queries no longer
flood the terminal with long excerpts)
- Full output (default) preserved for single-master /ask and debugging
2026-04-05 09:32:55 +08:00
xianren
16cbda8e50
fix: robust tool path resolution + precise selection feedback in /compare-masters
...
- Add PROJECT_ROOT discovery with 3 fallback paths (dev/manual/OpenClaw)
- Replace ${CLAUDE_SKILL_DIR}/tools/... with $PROJECT_ROOT/tools/...
(CLAUDE_SKILL_DIR in subskills points to skill dir, not project root)
- Add graceful degradation when rag_query.py unreachable
- Output selection reasoning explicitly (e.g. 'xuanzang: 强关键词匹配(5项)
+ kumarajiva: 主题互补视角') instead of vague '主题映射'
2026-04-05 09:17:11 +08:00
xianren
6446903daf
feat: smart master selection + expanded keywords (6→24 per master)
...
- /compare-masters now uses keyword matching from meta.json search_scope.keywords
- 3-tier selection: user-specified → keyword matching → topic fallback
- Expanded each master's keywords to 15-25 core concepts (avg 24)
- Document --masters manual override in README
Selection improvements verified:
- '遍行因' → xuanzang (5 matches)
- '明心见性' → huineng (3 matches)
- '空性/中观' → kumarajiva + huineng
- '念佛' → yinguang + ouyi + xuyun
2026-04-05 09:07:24 +08:00
xianren
02df9344b5
feat: 首轮身份中立原则 — masters no longer assume user identity on first turn
...
- Add Layer 0 hard rule to all 8 masters' voice.md: first turn must use
neutral address (您/汝/你/问者), forbidden terms include 居士/行者/学人/
善男子/善女人/出家人/师父/大众/道友/善信/道友
- From turn 2+: masters adapt to user's self-disclosed or question-inferred
identity, restoring each master's historical address style
- Layer 2 开场方式/称呼方式 reorganized into 首轮中立 / 身份已知后 tiers
- Update voice_builder.md and voice_analyzer.md templates so future
/create-master runs inherit this rule
- Add tools/sync_skill_from_voice.py to keep SKILL.md PART B in sync
- Add 48 regression tests in test_voice_rules.py (all 79 tests pass)
2026-04-05 08:44:35 +08:00
xianren
e0afab5c9f
fix: slugify now correctly lowercases English names and handles spaces
2026-04-05 08:11:31 +08:00
xianren
2a63a50ed3
test: add basic test suite for fojin_bridge, skill_writer, verify_sources (P1)
...
31 tests across 3 modules; all HTTP calls mocked, no real API dependencies.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-05 08:07:34 +08:00
xianren
6c6e19f2bc
ci: add weekly GitHub Actions workflow for FoJin link verification (P2)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-05 08:06:40 +08:00
xianren
02d1069c46
feat: add /compare-masters skill for multi-master comparison (P1)
2026-04-05 08:05:46 +08:00
xianren
6f34e98508
docs: add complete FoJin API reference for LLM ad-hoc queries (P0)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-05 08:05:25 +08:00
xianren
5688f40c1a
feat: graceful degradation when FoJin API is unavailable (P0)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-05 08:04:24 +08:00
xianren
da2a7f2dc8
refactor: remove 南传/藏传 masters, focus exclusively on 汉传祖师大德
2026-04-05 07:42:00 +08:00
xianren
8da9b47dda
docs: refocus PRD on 汉传佛教 — remove 南传/藏传 sections
2026-04-05 07:41:38 +08:00
xianren
ce8024ac92
docs: simplify analyzer prompts — remove 南传/藏传 sections, focus on 汉传
2026-04-05 07:41:23 +08:00
xianren
4ef0c6fd70
docs: simplify acknowledgments — remove FoJin and colleague-skill
2026-04-05 07:29:07 +08:00
xianren
d881797005
docs: expand SKILL.md with detailed flow control, error handling, and priority rules (P1)
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 22:41:24 +08:00
xianren
d210bbe5fb
feat: add correction handler for real-time user feedback on master personas (P1)
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 22:37:43 +08:00
xianren
35f9425f3a
feat: embed tradition tag behavior mappings into analyzer prompts (P0 fix)
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 22:37:28 +08:00
xianren
864a01be05
docs: rename 严肃性声明 to 声明
2026-04-04 22:23:19 +08:00
xianren
0f53ae0400
docs: update disclaimer — use 佛教经典文献, remove medical/diagnosis/mentor clauses
2026-04-04 22:20:30 +08:00
xianren
2fa3c1f634
refactor: rename teacher → master across all docs, commands, files, and directories
2026-04-04 22:10:41 +08:00
xianren
62b5810854
docs: refine disclaimer — remove redundant statements, highlight RAG capability
2026-04-04 22:01:05 +08:00
xianren
aafcbdf721
refactor: rename teacher_ to master_ in all SKILL.md frontmatter, update descriptions
2026-04-04 21:47:01 +08:00
xianren
8e6a83f55b
docs: remove OpenClaw recommended label, list Claude Code first
2026-04-04 20:41:03 +08:00
xianren
42389040f7
docs: add OpenClaw and Claude Code installation instructions
2026-04-04 20:38:27 +08:00
xianren
d84a6f9040
fix: verify and update 186 FoJin URLs from CBETA IDs to real internal text_ids
2026-04-04 19:58:55 +08:00
xianren
d0709af973
feat: add source verification tool to validate FoJin links
...
Scans all prebuilt teachers for CBETA IDs and fojin.app URLs, verifies
against FoJin API, and can fix URLs to use internal text_ids (--fix flag).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 19:57:48 +08:00