06e901f590
把 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>
39 lines
1.6 KiB
Markdown
39 lines
1.6 KiB
Markdown
# 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。
|