feat: add local hexagram content for offline reading

Load a versioned Wikisource jing plus project-authored plain drafts so results can show labeled original and vernacular texts without unauthorized modern translations.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
QiuSW
2026-08-19 11:48:16 +08:00
co-authored by Cursor
parent 4235cf9011
commit 534c88993e
33 changed files with 5626 additions and 29 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# 数据、内容与隐私契约
> 状态:结构已定义,内容来源与授权仍为发布阻塞项
> 状态:`zh-Hans-2026.1` 已接入应用;白话为草稿,发布仍待审校
> 适用范围:卦库 assets、Room、DataStore、导入脚本和内容审核
## 1. 数据分类
@@ -58,7 +58,7 @@
示例中的省略号不是可发布内容。禁止由 AI 在构建时临时补齐缺失卦辞或爻辞。
机器契约位于 `content/schema/hexagram-content.schema.json`。`specialUsageTexts` 显式声明当前内容版本是否提供乾“用九”和坤“用六”;声明为 `false` 时对应条目的 `specialUsageText` 必须为 `null`,不能用空字符串暗示内容存在。Android parser 尚未建立前,`scripts/verify-content-contract.mjs` 已提供独立构建期校验、稳定 SHA-256 摘要和不含可发布卦辞的自动化夹具;`HexagramContentRepository` 接口与测试 fake 已建立,缺少 ID 或内容版本不匹配时抛出数据完整性错误,不回退到相邻条目。应用当前只使用文王卦名查找表展示结果,不把未授权卦辞打入 APK。
机器契约位于 `content/schema/hexagram-content.schema.json`。`specialUsageTexts` 显式声明当前内容版本是否提供乾“用九”和坤“用六”;声明为 `false` 时对应条目的 `specialUsageText` 必须为 `null`,不能用空字符串暗示内容存在。`scripts/verify-content-contract.mjs` 校验夹具与 `content/packages/hexagram-content.json`;Kotlin `HexagramContentParser` 用同一套规则加载 assets。`HexagramContentRepository` 在缺少 ID 或内容版本不匹配时抛出数据完整性错误,不回退到相邻条目。来源与审校状态见 [内容审校](content-review.md)。
## 3. 内容完整性门禁