Commit Graph

12 Commits

Author SHA1 Message Date
xianren d441c5d7dc fixup: address review — sectarian wording, stragglers, quote framing
- prebuilt/ajahn-chah/sources/sutta-excerpts.md: drop comparative
  claim against 摩诃僧祇律 / 四分律, switch to non-comparative
  description of Pali Vinaya core rules. Was a self-violation of
  ajahn-chah's own NO SECTARIAN JUDGMENT HARD-GATE.

- prebuilt/compare/SKILL.md: 可用祖师 table reorganized 8→10 by
  tradition (汉传 / 藏传 / 南传) — milarepa and ajahn-chah now
  surfaceable in cross-tradition compare. Add 跨传统对比注意事项
  block + extend 禁忌 with comparative-judgment ban.

- gemini-extension.json: description updated 8 → 10 / Chinese →
  Buddhist + version 0.3.0 → 0.4.0 (was missed by the v0.4 commit;
  reviewer flagged).

- README.md: "安装全部 8 位" → "安装全部 10 位(三大传统)".

- ETHICS.md: Tier A table now lists milarepa as 9th PD master with
  BDRC sourcing note. Tier B table adds Ajahn Chah (1918–1992,
  ~2042). New Tier B 特例 section codifies the ajahn-chah inclusion
  rationale: authorized non-commercial Forest Sangha translations,
  summary-only (no full passages), HARD-GATE-enforced provenance,
  24h takedown commitment. Fixes ETHICS being misaligned with the
  v0.4 reality.

- prebuilt/ajahn-chah/sources/teachings-excerpts.md: prominent
  banner at top clarifying that all > blockquote blocks are
  summarizations (主旨), not verbatim quotes, plus citation format
  bumped to require "(开示要旨)" suffix. Closes ambiguity that
  could lead downstream LLMs / readers to treat blocks as direct
  Ajahn Chah speech.

Validation
----------
• python scripts/validate.py --strict →  11 masters
• python scripts/validate-fidelity.py →  11 masters
• pytest tests/ →  31 passed, 6 skipped

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 13:01:32 +08:00
xianren 5b46be9890 feat: expand to Tibetan + Theravada — 10 masters across 三大传统 (v0.4)
Adds the project's first non-Chinese masters, taking the scope from
"Chinese Buddhist" to "Buddhist" and matching the project name's
broader implication.

New masters
-----------
• prebuilt/milarepa — Tibetan Kagyu yogi (1052–1135). Sources:
  The Hundred Thousand Songs of Milarepa (mGur 'bum, BDRC W1KG14334)
  and The Life of Milarepa (rNam thar, BDRC W22272). Coverage:
  Mahāmudrā view, Naro Chodruk (name-level only — no esoteric steps),
  retreat & austerity, guru yoga, karma & purification.

• prebuilt/ajahn-chah — Thai Forest Tradition founder of Wat Pah Pong
  (1918–1992). Sources: Pali Canon (SuttaCentral SC IDs) plus
  authorized English collections Food for the Heart, A Still Forest
  Pool, Living Dhamma. Coverage: sati & satipaṭṭhāna, ānāpānasati,
  three characteristics, letting go, sīla-samādhi-paññā, middle way.

HARD-GATE additions
-------------------
• no_esoteric_instruction — Tibetan tantric practice steps (tummo,
  generation/completion stages, empowerment-required visualizations
  and mantras) are never disclosed; queries are redirected to
  qualified teachers. Boundary registered in
  scripts/validate-fidelity.py.

• No fabricated quotes for Theravāda discourses — Ajahn Chah quotes
  must trace to authorized publications; no synthesized "Ajahn Chah
  said" dialogue.

Citation system
---------------
BDRC:Wxxxxx (Tibetan canon) and SuttaCentral SC IDs are now
first-class alongside CBETA Txxnxxxx in frontmatter sources lists.
validate.py already accepts non-cbeta sources via the existing
title-or-cbeta_id check, no schema change required.

Cross-tradition compare-masters mappings
----------------------------------------
prebuilt/compare/SKILL.md gets new fallback rows for: 苦行/闭关
(xuyun + milarepa), 正念/觉知 (huineng + ajahn-chah + xuyun),
出离心/无常 (yinguang + milarepa + ajahn-chah), 三大传统对比
(huineng + milarepa + ajahn-chah), and adds milarepa to 般若/空性,
ajahn-chah to 戒律/行持.

Surface updates
---------------
• Description across package.json, .claude-plugin/{plugin,marketplace}.json,
  .cursor-plugin/plugin.json: "Chinese Buddhist" → "Buddhist",
  "8 prebuilt masters" → "10 prebuilt masters across 汉传/藏传/南传".
• README.md + README_EN.md: cross-tradition rows in the situational
  guidance table; new master cards for Milarepa and Ajahn Chah with
  appropriate provenance notes; v0.4 release banner replaces v0.3.
• SKILL.md preset list reorganized by tradition.
• CHANGELOG.md gets a [0.4.0] section.
• package.json keywords add tibetan-buddhism, theravada, bdrc,
  suttacentral.

Validation
----------
• python scripts/validate.py --strict →  11 masters pass
• python scripts/validate-fidelity.py →  11 masters validated
  (12 + 13 fidelity cases for the two new masters)
• python scripts/test-fidelity.py --all --dry-run → 
• pytest tests/ →  31 passed, 6 skipped

The progressive-disclosure shape of v0.3 is preserved exactly, so
the fidelity-smoke CI cost cap is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 12:56:56 +08:00
xianren 28e5436ff9 feat(compare): divergence radar + labeled differences + classic debate templates
Upgrade /compare-masters from a loose comparison table to a structured
divergence analysis framework. Core changes:

- 5-dim radar (否定/安立/入手处/根器/终极表达): force the LLM to locate
  exactly which layer the disagreement sits on, not just "A thinks X,
  B thinks Y" without axis.
- Mandatory divergence labels: every concrete difference must be tagged
  [宗派性] / [侧重性] / [表达性] / [根器性]. This prevents the most
  common mistake — treating a 根器性 difference as a 宗派性 conflict.
- Classic debate templates: 禅净之争 / 性相之辩 / 空有之争 / 顿渐之辩.
  Pre-load the real historical disputes so the LLM does not invent
  fake controversy and knows the actual cruxes.
- Meta-question follow-ups (Step 4): generate "why are they different"
  prompts to turn a single comparison into a learning session.
- HARD-GATE additions: NO UNLABELED DIVERGENCE, NO EMPTY RADAR CELL,
  with rationalization defenses and red flags.

Rationale: the loose 共通点/差异点 template was too permissive — it
let the LLM produce shallow "each has their own merits" summaries.
Forcing a 5-axis radar + typed labels surfaces the actual structural
divergence, which is the real educational value of multi-master
comparison.

Validated: scripts/validate.py --strict passes (9/9 masters).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:42:58 +08:00
xr843 a0c367c058 fix(lint): exempt meta-skills from lineage/source checks
The compare-masters skill is an aggregate meta-skill that borrows from
other masters and has no single lineage, dates, sources, or own corpus
directories. Treating it as a regular master made --strict CI fail on
all branches since 2026-04-08.

Introduce a kind field (default master) and skip the lineage/dates/
sources/citation_format and references/sources directory checks when
kind == meta-skill. compare/SKILL.md gains kind: meta-skill.

Required fields (name, description) and version/license are still
enforced for all skills.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 09:18:59 +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 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 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 02d1069c46 feat: add /compare-masters skill for multi-master comparison (P1) 2026-04-05 08:05:46 +08:00