chore: template 1.9.x 知識庫遷移 → system-dev/

把 system-dev-template 1.9.x 的知識庫基建搬進 git(從功能 PR 拆出,獨立成筆):
- system-dev/wiki/:LLM 記憶系統(principles 鐵律 + 5 張 ingest 卡 + INDEX/TAXONOMY + status/mistakes)
- system-dev/docs/:SDD 新家(3-specs/ + 2-architecture/ + README/SKILL);ingest-pipeline SDD 從 docs/3-specs/ 搬來
- system-dev/scripts/:install/update
- .claude/:wiki/SDD harness(commands + hooks:session-recall / sdd-guard / wiki-secret-scan)

SDD 位置統一:docs/3-specs/ingest-pipeline → system-dev/docs/3-specs/ingest-pipeline
(對齊 SDD guard hook 預期路徑 + template 1.9.x 規約)。

純基建遷移,不含任何功能程式碼(src/tests/contracts 在功能 PR #3)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-26 20:45:18 +08:00
parent dffefdcdc2
commit 06e901f590
36 changed files with 2635 additions and 45 deletions
@@ -0,0 +1,27 @@
# ingest pipeline — Requirements
> 建立:2026-06-26
> **跨專案藍圖在 InkStoneCo `docs/3-specs/mira-dissolve/`R7 攝入分工、§6.6 模型策略、§6.7 MCP 邊界)。本 SDD 只放 ingest 內部實作細節。**
> 凍結契約:`contracts/ingest-candidate.json`(與 graph repo 同一份,唯一耦合面)。
## 範圍
ingest 插件內部:SourceAdapter(拉)+ 採取/extract + 跨庫織網匯總 + POST envelope 給 graph。**不涉**graph 內部圖演算法、不涉 base 儲存。
## 需求
- **R1 SourceAdapter**GitHub 拉 repo + content-hash`source.uri = github:owner/repo@path`)。webhook/排程觸發,或被 KBDB MCP `refresh` 代轉觸發。
- **R2 採取(路徑 A,優先)**:用了 system-dev-template 的 repo → 本地 CC 已建三元組 + gloss → ingest 拉取,不重萃。
- **R3 extract(路徑 Bfallback**:裸原文 → 萃 (s,p,o)+gloss。模型用戶可選(意圖非型號)+ 品質門檻白名單(深層暗示 + 中文);預設 Haiku;深萃 Claude via CCJSON-fail 升級閘。
- **R4 跨 repo 織網**:匯總多 repo 三元組(單 repo 看不到的橋/異見)=主職。
- **R5 輸出**POST envelope(嚴格符合 contract)給 graph `POST /triplets/ingest`,不直連 base。
- **R6 ops CLI**:手動觸發重萃。不帶查詢 MCP。
## 約束(沿用 ingest 鐵律,見 CLAUDE.md
- 純餵食器、不碰儲存、不算向量、不帶查詢 MCP、部署繞 Actions、三守則(無環/純 API/凍結契約)。
## 待對端
- graph 的 `POST /triplets/ingest` 寫入端(InkStoneCo T3.3graph repo 實作)。
- 模型品質門檻測試集(含中文 + 人類暗示樣本,InkStoneCo §6.6)。