P1–P3 shipped libraries but kb-app facade is still all `bail!("not yet
wired")` stubs, so the CLI is structurally complete but unusable.
Insert p3-5 between P3-4 and P4-1 to swap the facade bodies — ingest,
search, list_docs, inspect_doc, inspect_chunk — into real
compositions of the libraries shipped through P3-4. `ask` stays
stubbed; P4-3 owns it.
After p3-5 merges:
- `kb index` walks a workspace and persists chunks (SQLite +
optionally LanceDB).
- `kb search --mode {lexical,vector,hybrid}` returns real SearchHits
with citations.
- `kb list` / `kb inspect doc|chunk` round-trip from the store.
Updates:
- New task spec at tasks/p3/p3-5-app-wiring.md (depends_on
p1-6/p2-2/p3-2/p3-3/p3-4; unblocks p4-3/p9-1/p9-2/p9-4).
- tasks/INDEX.md bumps P3 component count 4 → 5 and adds the link.
- tasks/phase-3-vector-hybrid.md replaces the speculative
`embed_index` facade signature with the actual frozen kb-app
surface and updates the phase completion checklist.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.5 KiB
4.5 KiB
title, source, date
| title | source | date |
|---|---|---|
| KB 작업 단위 인덱스 | kb_local_rust_report.md | 2026-04-27 |
KB 작업 단위 인덱스
kb_local_rust_report.md 의 Phase 로드맵을 아키텍처 수준 작업 단위로 분해. 각 task 문서는 독립적으로 착수/검수 가능한 단위.
의존 그래프
P0 ── P1 ── P2 ── P3 ── P4 ── P5
│
├─ P6 (image)
├─ P7 (pdf)
├─ P8 (audio)
└─ P9 (TUI/desktop)
P0P5 는 직렬. P6P9 는 P5 이후 병렬 가능.
작업 단위
| # | 코드 | 제목 | 핵심 산출 crate | 선행 |
|---|---|---|---|---|
| P0 | phase-0-skeleton.md | Workspace 뼈대 + 도메인 계약 | kb-core, kb-parse-types, kb-config, kb-app, kb-cli | – |
| P1 | phase-1-markdown-ingestion.md | Markdown ingestion 파이프라인 | kb-source-fs, kb-parse-md, kb-normalize, kb-chunk, kb-store-sqlite | P0 |
| P2 | phase-2-lexical-search.md | SQLite FTS5 lexical 검색 + citation | kb-search (lexical) | P1 |
| P3 | phase-3-vector-hybrid.md | Local embedding + LanceDB + hybrid | kb-embed, kb-embed-local, kb-store-vector, kb-search | P2 |
| P4 | phase-4-local-llm-rag.md | Local LLM + RAG + grounded answer | kb-llm, kb-llm-local, kb-rag | P3 |
| P5 | phase-5-evaluation.md | Golden query / regression eval | kb-eval | P4 |
| P6 | phase-6-image.md | 이미지 ingestion (OCR + caption) | kb-parse-image | P5 |
| P7 | phase-7-pdf.md | PDF text + page citation | kb-parse-pdf | P5 |
| P8 | phase-8-audio.md | 음성 transcription + timestamp citation | kb-parse-audio | P5 |
| P9 | phase-9-ui.md | TUI + desktop app | kb-tui, kb-desktop | P5 |
Component task decomposition (per phase)
각 phase 의 component-level 분해. AI sub-agent 1세션 = 1 task 가 sweet spot.
- P0 — p0/ — 1 component
- P1 — p1/ — 6 components
- P2 — p2/ — 2 components
- P3 — p3/ — 5 components
- P4 — p4/ — 3 components
- P5 — p5/ — 2 components
- P6 — p6/ — 3 components
- P7 — p7/ — 2 components
- P8 — p8/ — 2 components
- P9 — p9/ — 5 components
모든 task 공통 규약
- 의존성 경계 (
Allowed/Forbidden) 위반 금지. report §19 참조. - citation 없는 검색 결과 / RAG 응답 금지.
- 원본 파일 파괴 금지. 파생물만 재생성.
- 모든 record 에 version (parser/chunker/embedding/index/prompt) 기록.
- 각 phase 완료 =
cargo check --workspace && cargo test --workspace통과 + 해당 phase 의 완료 조건 CLI 데모 통과.