docs(p3-5): add app-wiring task spec; INDEX + phase-3 updates #18

Merged
altair823 merged 1 commits from docs/p3-5-app-wiring-spec into main 2026-05-01 11:33:35 +00:00
Owner

변경 요약

P1–P3에서 라이브러리는 모두 ship되었지만 kb-app facade는 P0 시점의 bail!(\"not yet wired\") stub 그대로입니다. CLI 구조는 완성되어 있는데 실제로 실행하면 모든 명령이 즉시 fail. P3-4와 P4-1 사이에 P3-5 task를 끼워넣어 LLM 미관여 facade 본체 (ingest, search, list_docs, inspect_doc, inspect_chunk)를 한 번에 wire합니다. ask는 stub 유지 — P4-3이 owner.

P3-5 머지 후:

  • cargo run -p kb-cli -- index → 워크스페이스 walk + parse + chunk + SQLite + (옵션) LanceDB upsert.
  • cargo run -p kb-cli -- search --mode {lexical,vector,hybrid} \"...\" → citation 포함 실제 SearchHit 반환.
  • cargo run -p kb-cli -- list, inspect doc|chunk → store round-trip.

변경 파일

  • 신규 tasks/p3/p3-5-app-wiring.md — P3-5 task 명세. depends_on: [p1-6, p2-2, p3-2, p3-3, p3-4]. unblocks: [p4-3, p9-1, p9-2, p9-4]. Allowed/Forbidden deps, behavior contract (per-mode dispatch + App lifecycle struct), test plan (default 라인 + AVX-gated #[ignore]), DoD (CLI smoke 포함).
  • 수정 tasks/INDEX.md — P3 component 수를 4 → 5로 bump, p3-5 링크 추가.
  • 수정 tasks/phase-3-vector-hybrid.md — kb-app facade 섹션을 speculative embed_index 시그니처에서 실제 frozen surface로 교체. phase 완료 조건에 p3-5 항목 추가.

왜 지금

P9 (TUI/desktop) task들이 kb-app::ingest/search/list_docs가 작동한다고 가정하는데 P0–P4 어디에도 "facade body 작성" 항목이 없었습니다. P5 (eval)도 kb-app::ingest를 호출. P3-4 머지 후 즉시 wiring하면:

  1. P3 단계 결과물을 사용자가 실제로 검증 가능 (라이브러리 빌드 통과 ≠ 통합 동작 보장).
  2. P4-3 (RAG)가 App lifecycle struct를 그대로 재사용해서 ask body를 추가하면 됨.
  3. P9 TUI는 App 컨텍스트를 세션 동안 들고 있으면 됨.

코드 변경 없음

이 PR은 doc-only입니다. 실제 wiring은 P3-5 implementation PR에서. spec이 머지된 뒤에 task 시작.

Out of scope

  • kb-app::ask body — P4-3.
  • kb index --resume 체크포인팅 — P+.
  • TUI / desktop integration — P9이 wired facade를 consume.

frozen design contract: 변경 없음. 본 task는 라이브러리 boundary 내에서만 facade를 채우는 것이라 design doc 수정 불필요.

## 변경 요약 P1–P3에서 라이브러리는 모두 ship되었지만 `kb-app` facade는 P0 시점의 `bail!(\"not yet wired\")` stub 그대로입니다. CLI 구조는 완성되어 있는데 실제로 실행하면 모든 명령이 즉시 fail. P3-4와 P4-1 사이에 P3-5 task를 끼워넣어 LLM 미관여 facade 본체 (`ingest`, `search`, `list_docs`, `inspect_doc`, `inspect_chunk`)를 한 번에 wire합니다. `ask`는 stub 유지 — P4-3이 owner. P3-5 머지 후: - `cargo run -p kb-cli -- index` → 워크스페이스 walk + parse + chunk + SQLite + (옵션) LanceDB upsert. - `cargo run -p kb-cli -- search --mode {lexical,vector,hybrid} \"...\"` → citation 포함 실제 `SearchHit` 반환. - `cargo run -p kb-cli -- list`, `inspect doc|chunk` → store round-trip. ## 변경 파일 - **신규** `tasks/p3/p3-5-app-wiring.md` — P3-5 task 명세. depends_on: `[p1-6, p2-2, p3-2, p3-3, p3-4]`. unblocks: `[p4-3, p9-1, p9-2, p9-4]`. Allowed/Forbidden deps, behavior contract (per-mode dispatch + `App` lifecycle struct), test plan (default 라인 + AVX-gated `#[ignore]`), DoD (CLI smoke 포함). - **수정** `tasks/INDEX.md` — P3 component 수를 4 → 5로 bump, p3-5 링크 추가. - **수정** `tasks/phase-3-vector-hybrid.md` — kb-app facade 섹션을 speculative `embed_index` 시그니처에서 실제 frozen surface로 교체. phase 완료 조건에 p3-5 항목 추가. ## 왜 지금 P9 (TUI/desktop) task들이 `kb-app::ingest`/`search`/`list_docs`가 작동한다고 가정하는데 P0–P4 어디에도 \"facade body 작성\" 항목이 없었습니다. P5 (eval)도 `kb-app::ingest`를 호출. P3-4 머지 후 즉시 wiring하면: 1. P3 단계 결과물을 사용자가 실제로 검증 가능 (라이브러리 빌드 통과 ≠ 통합 동작 보장). 2. P4-3 (RAG)가 `App` lifecycle struct를 그대로 재사용해서 `ask` body를 추가하면 됨. 3. P9 TUI는 `App` 컨텍스트를 세션 동안 들고 있으면 됨. ## 코드 변경 없음 이 PR은 doc-only입니다. 실제 wiring은 P3-5 implementation PR에서. spec이 머지된 뒤에 task 시작. ## Out of scope - `kb-app::ask` body — P4-3. - `kb index --resume` 체크포인팅 — P+. - TUI / desktop integration — P9이 wired facade를 consume. frozen design contract: 변경 없음. 본 task는 라이브러리 boundary 내에서만 facade를 채우는 것이라 design doc 수정 불필요.
altair823 added 1 commit 2026-05-01 11:33:13 +00:00
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>
altair823 merged commit f782db5e51 into main 2026-05-01 11:33:35 +00:00
altair823 deleted branch docs/p3-5-app-wiring-spec 2026-05-01 11:33:36 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: altair823-org/kebab#18