Commit Graph

8 Commits

Author SHA1 Message Date
xianren 9b2039e12a feat(v0.5): expand Tibetan + Theravāda each from 1 → 3 masters (15 total)
Second cross-tradition expansion. v0.4 introduced Milarepa + Ajahn
Chah; this release adds the major foundational figures of each
non-Chinese tradition that were missing.

藏传 (Tibetan): now 3 — Atiśa, Tsongkhapa, Milarepa
南传 (Theravāda): now 3 — Buddhaghosa, Mahasi Sayadaw, Ajahn Chah
汉传 (Chinese): unchanged at 8

New masters
-----------
* prebuilt/atisha/ — Atiśa Dīpaṃkara (982-1054). 噶当派 founder,
  Indo-Tibetan bridge. Sources: Toh 4465 Bodhipathapradīpa + Toh
  3948 self-commentary + 噶当口耳传承 Pha chos / Bu chos. Coverage:
  three scopes, bodhicitta (七因果 + 自他相换 from Suvarṇadvīpa
  Dharmakīrti), 戒律严持, 噶当六论, 依止善知识. HARD-GATE:
  NO_ESOTERIC_INSTRUCTION + NO_ANACHRONISTIC_ATTRIBUTION (don't
  project later Gelug analytical Madhyamaka onto Atiśa's era).

* prebuilt/tsongkhapa/ — Tsongkhapa Lobsang Drakpa (1357-1419).
  Gelug founder, basis of Dalai Lama / Panchen Lama lineages.
  Sources: 宗喀巴全集 gsung 'bum (BDRC searchable) — Lam rim chen
  mo, sNgags rim chen mo, Drang nges legs bshad snying po, 入中论
  善显密意疏, 三主要道. Coverage: 三主要道 (出离心 / 菩提心 / 清净
  见), lamrim, 应成中观, 三聚戒, 闻思修, 五部大论. HARD-GATE:
  NO_ESOTERIC_INSTRUCTION + NO_CROSS_SCHOOL_CONTAMINATION (don't
  blend Dzogchen / Mahāmudrā into Gelug positions) +
  NO_UNVERIFIED_BDRC_W_NUMBERS (descriptive guidance instead of
  fabricated W-IDs; lessons-learned from v0.4 fixup).

* prebuilt/buddhaghosa/ — Buddhaghosa (5th century). 上座部
  commentarial summit. Sources: PTS Vism + four Nikāya aṭṭhakathā
  + Samantapāsādikā (Vinaya) + Atthasālinī (Abhidhamma). Coverage:
  戒定慧三学, 四十种业处, 七清净十六观智, 缘起十二支 (three-life-
  two-causations interpretation), 阿毗达摩 paramattha vs paññatti,
  六义诠释 commentarial method. HARD-GATE:
  NO_MAHAYANA_CONTAMINATION + NO_MAHAVIHARA_PRIMACY_OVERSTATEMENT.

* prebuilt/mahasi-sayadaw/ — Mahāsi Sayādaw U Sobhana (1904-1982).
  Burmese Vipassanā tradition / Mahasi Method. Sources: Manual of
  Insight (Wisdom Publications 2016) + Progress of Insight (BPS
  Sri Lanka Wheel No. 280) + Practical Vipassanā Meditation
  Exercises (Mahasi Sasana Yeiktha) + SC + PTS Vism. Coverage:
  标记法 Noting Method, 腹部起伏 rising-falling primary object,
  七清净十六观智 progress, khaṇika-samādhi & vipassanā-jhāna,
  '初果可证' ethos, MN 10 Satipaṭṭhāna foundation. HARD-GATE:
  NO_FABRICATED_QUOTES + **NO_ATTAINMENT_JUDGMENT** (the strictest
  guardrail in this release — Mahasi's stages-of-insight framework
  is famous for inducing self-attainment delusions; AI is forbidden
  from confirming any individual's observed jhāna stage / fruition).

Each master ships the standard v0.3 progressive-disclosure shape:
SKILL.md (decision tree + HARD-GATE + Quick Reference) + meta.json +
references/{voice,teaching}.md + sources/INDEX.md + ≥1 excerpts file
+ tests/fidelity.jsonl with 12-13 cases each.

ETHICS updates
--------------
* Tier A grows from 9 → 12: Atiśa (>970yr), Tsongkhapa (>600yr),
  Buddhaghosa (>1500yr) all join based on age + open-canon sourcing.
* Tier B 特例 grows from 1 → 2: Mahasi Sayadaw codified under same
  Forest-Sangha-style rationale as Ajahn Chah, with explicit
  NO_ATTAINMENT_JUDGMENT addendum specific to his lineage's risks.
* Sectarian-judgment policy explicit extension: covers Theravāda
  intra-tradition meditation lineages (Mahasi vs Pa-Auk vs Goenka
  vs Thai Forest) — no superiority claims permitted.

compare-masters meta-skill
--------------------------
prebuilt/compare/SKILL.md updated:
* 可用祖师 table now lists all 15 masters by tradition.
* Topic mapping fallback table extended with rows pairing the new
  masters: 中观 (kumarajiva + tsongkhapa), 道次第 (atisha +
  tsongkhapa), 心识 (xuanzang + buddhaghosa + huineng), 戒律
  (xuyun + atisha + buddhaghosa), 禅修方法 (buddhaghosa + mahasi
  + ajahn-chah), 七清净 (buddhaghosa + mahasi), 论师风格 (xuanzang
  + tsongkhapa + buddhaghosa), 三大传统对比 (huineng + tsongkhapa
  + buddhaghosa).
* New cross-tradition guardrails: don't blend traditions (don't
  project Gelug positions onto Atiśa's era; don't put Mahāmudrā
  into Gelug; don't put Tathāgatagarbha into Theravāda).

Surface bumps
-------------
* All 4 plugin manifests + package.json + gemini-extension.json
  bumped 0.4.0 → 0.5.0 with description updated to "15 prebuilt
  masters".
* SKILL.md (project-level) preset list expanded to 8/3/3.
* README.md + README_EN.md: situational guidance table extended
  with cross-tradition rows for the 4 new entries; new master cards
  added with provenance notes; v0.5 release banner appended above
  v0.4 banner.

Validation
----------
* python scripts/validate.py --strict   →  15 masters pass
* python scripts/validate-fidelity.py   →  all valid
* python scripts/test-fidelity.py --all --dry-run  → 
* pytest tests/                          →  31 passed, 6 skipped

Notes
-----
* fojin_text_ids=[] for new masters — FoJin DB still hasn't imported
  BDRC Tibetan canon nor PTS Vism / SuttaCentral Pali full text;
  RAG falls back to the global corpus and each prompt explicitly
  notes this.
* The two Tibetan masters intentionally use descriptive BDRC
  guidance ("BDRC: 见宗喀巴 gsung 'bum") rather than fabricated
  W-numbers, applying lessons learned from the v0.4 fixup where
  W29193 was mistakenly assigned to two different works in early
  drafts. Toh (Tohoku) numbers are kept where they're well-attested
  in 藏学界 (Toh 4465 for Bodhipathapradīpa).
* CompanionPRs in xr843/fojin (#507 + #508) already synchronized
  the chat-mode subset of these 6 cross-tradition masters; v0.5 of
  this repo brings the Master-skill side to parity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 18:39:58 +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 bd04ede817 chore(governance): add ETHICS.md, CHANGELOG.md, and PR fidelity smoke
Three governance-tier additions to convert Master-skill from a demo into a
defensible long-lived project:

**ETHICS.md** — mandatory governance document:
- AI transparency: outputs are AI-synthesized, not masters' own words
- Copyright tiers A (public domain, current 8), B (in-copyright, needs
  license), C (never admit: living masters, Buddhas/bodhisattvas, apocryphal
  figures), D (case-by-case)
- Religious boundary: AI must refuse precept transmission, awakening
  certification, karmic diagnosis, spirit-medium framing, etc.
- Dual-track content license: code MIT, master content CC BY-NC-SA 4.0,
  prompts CC BY 4.0
- Takedown + appeal channel with 48h / 7d SLAs

**CHANGELOG.md** — Keep a Changelog format:
- [Unreleased] captures the current governance + community + npm work
- [0.3.0] retroactively documents the architectural rebuild (provenance,
  fidelity, NPX, multi-platform, HARD-GATE, two-stage review)
- [0.2.0], [0.1.0] historical sections

**CI fidelity smoke** — make HARD-GATE a real gate, not just documentation:
- New `fidelity-smoke` job runs one basic-difficulty fixture against one
  master per PR; picks the master touched by the diff, else rotates by
  day-of-year for uniform coverage
- Cost cap ≈ $0.05/PR (~10k-token system prompt × 1 request × Sonnet 4.6
  pricing). Forks without ANTHROPIC_API_KEY get an advisory pass so
  external PRs can still land
- `scripts/test-fidelity.py` gains `--max-tests N` flag; when capping, it
  sorts by difficulty (basic → intermediate → advanced) so smoke runs hit
  the reliable floor, not stress cases
- Old `fidelity` job renamed to `fidelity-full` (still workflow_dispatch)

README 声明 section now links to ETHICS.md so every reader sees the AI
disclosure and boundary rules before copying master content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:45:56 +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 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 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 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