4137043be2
- 鋪檔 SDD-LIFECYCLE.md / pending-changes.md / 新版 sdd-guard.sh / sdd-check.md / sdd-active-check.sh - ingest-pipeline design.md 掛 status: paused(實作 18/19 完成、部署收尾懸置、無現行開發)→ 0 active 合法 - CLAUDE.md 加 SDD 鐵律段(濃縮五條+現況註記) - wiki status 更新+記 PR #3 src 管線只在 github-dead/main 的斷層 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
48 lines
2.0 KiB
Markdown
48 lines
2.0 KiB
Markdown
---
|
||
status: paused
|
||
superseded_by: ""
|
||
---
|
||
|
||
<!-- status 判定(2026-07-17 SDD 生命週期遷移):實作 18/19 完成(PR #3 merge 於舊 GitHub main、
|
||
gitea main 另有 CLI 路徑 B 07-05),剩「Worker 部署+端到端 ingest→graph 驗證」自 06-26 懸置,
|
||
目前無進行中開發 session → paused。恢復部署收尾時由人升回 active(全 repo 同時最多一份 active)。 -->
|
||
|
||
# ingest pipeline — Design
|
||
|
||
> 對應 requirements.md。**架構設計(envelope 契約、職責切割、normalize 歸屬、MCP 邊界、模型策略)在 InkStoneCo `docs/3-specs/mira-dissolve/design.md`。本檔只放 ingest 內部設計。**
|
||
|
||
## 1. 資料流
|
||
|
||
```
|
||
GitHub repo MD(精耕 LLM Wiki)
|
||
│ commit / content-hash 變動
|
||
▼
|
||
SourceAdapter(拉 + content-hash)
|
||
│
|
||
├─ 路徑 A:本地已建三元組+gloss → 採取(拉)
|
||
└─ 路徑 B:裸原文 → extract(text, model) → 候選 (s,p,o)+gloss
|
||
│
|
||
▼ 跨 repo 匯總(織跨庫關聯)
|
||
▼ POST envelope(contracts/ingest-candidate.json)
|
||
graph 寫入端 POST /triplets/ingest
|
||
```
|
||
|
||
## 2. envelope(= contracts/ingest-candidate.json)
|
||
|
||
形狀與職責切割見 InkStoneCo design §3。ingest 給:原始 s/p/o + source.* + extractor.* + nodes[].gloss/type + confidence。**禁送**:id / clusters / bridge_score / 時間戳 / 邊上 type(graph 算)。
|
||
|
||
## 3. extract 模型策略
|
||
|
||
見 InkStoneCo design §6.6:用戶選意圖非型號、品質門檻白名單(深層暗示+中文)、預設 Haiku、深萃 Claude via CC、難度隨來源分層(AI 報告弱模型夠/人類 vault 須好模型)。
|
||
|
||
## 4. 觸發
|
||
|
||
被 KBDB MCP `refresh` 代轉(人發起,非自動 fan-out)。flag 紅線見 InkStoneCo design §6.7:禁 Actions/webhook 自動觸發。
|
||
|
||
## 5. cherry-pick 來源
|
||
|
||
- `polaris/mira/tools/_kbdb_client.py` → 純餵食器 client。
|
||
- `polaris/mira/arcrun/wiki_synthesis.yaml` classify 節點 → extract。
|
||
- 兩個 KBDB skill block(精耕規則 prompt)。
|
||
詳 InkStoneCo requirements §6。
|