Commit Graph

18 Commits

Author SHA1 Message Date
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 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 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 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 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 2fa3c1f634 refactor: rename teacher → master across all docs, commands, files, and directories 2026-04-04 22:10:41 +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 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
xianren 901fbee3c3 feat: add search_scope to all teachers + cross-reference tool for inter-teacher dialogue
Each teacher's meta.json now includes search_scope with tradition-specific
CBETA/SuttaCentral IDs, dictionary sources, and keywords for focused RAG
retrieval. New tools/cross_reference.py enables lineage queries and
cross-tradition concept comparison via FoJin KG.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 19:57:11 +08:00
xianren ad689a58fe feat: add runtime RAG retrieval — FoJin-powered answers for all teachers
Add rag_query.py CLI tool (search/semantic/dict/kg subcommands) and
rag_instructions.md prompt fragment so every teacher skill queries
FoJin's real Buddhist texts at runtime instead of relying solely on
LLM training data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 19:56:14 +08:00
xianren 29095958bc refactor: rename buddha-skill to Buddha-skill across all files 2026-04-04 18:33:45 +08:00
xianren 7cfe61beb7 feat: add teacher builder orchestrator for skill generation pipeline 2026-04-04 17:36:01 +08:00
xianren d10f55f5db feat: add sutra collector for gathering teacher data from FoJin 2026-04-04 17:35:48 +08:00
xianren 6ea0740336 fix: escape text_id placeholder in SKILL_MD_TEMPLATE to survive .format() 2026-04-04 17:34:45 +08:00
xianren 1f02953d46 feat: add skill writer for teacher directory management 2026-04-04 17:32:39 +08:00
xianren 8db581ca06 feat: add version manager for teacher skill archival and rollback 2026-04-04 17:32:35 +08:00
xianren 67f628a45a feat: add FoJin data bridge with full API coverage 2026-04-04 17:32:06 +08:00