docs(fb-31): single-file / stdin ingest spec + implementation plan #110

Merged
altair823 merged 2 commits from spec/p9-fb-31-single-file-stdin-ingest into main 2026-05-07 08:54:58 +00:00
Owner

요약

  • Spec docs/superpowers/specs/2026-05-07-p9-fb-31-single-file-stdin-ingest-design.mdkebab ingest-file + kebab ingest-stdin + MCP tool ingest_file / ingest_stdin brainstorm 산출물.
  • Plan docs/superpowers/plans/2026-05-07-p9-fb-31-single-file-stdin-ingest.md — 12 task TDD plan.
  • 본 PR 은 docs only — implementation 은 별 PR (본 docs 머지 후 새 feature branch).

핵심 결정 (spec)

  • 외부 file 저장: copy in (<workspace.root>/_external/<blake3-12>.<ext>). deterministic 명명 → idempotent.
  • CLI: 신규 subcommand 2개 (ingest-file + ingest-stdin). 기존 kebab ingest 무영향.
  • MCP: 4 → 6 tool. fb-30 v1 read-only 정책 변경 — 첫 mutation tool surface.
  • .kebabignore: explicit ingest = default bypass + stderr warn (별 flag 불필요).
  • stdin v1: markdown 전용 + flag (--title, --source-uri) → frontmatter 자동 prepend. 이미 frontmatter 있으면 error.
  • _external/ 디렉토리 첫 생성 시 .kebabignore 자동 append (walk re-ingestion 무한 루프 방지).
  • Wire schema 변경 없음 (ingest_report.v1 재사용, source_uri 는 frontmatter → metadata 자동 흐름).

Plan task 분할

  1. external module (helpers + 12 unit tests)
  2. ingest_file_with_config facade
  3. ingest_file integration test
  4. ingest_stdin_with_config facade
  5. ingest_stdin integration test
  6. CLI Cmd::IngestFile arm
  7. CLI Cmd::IngestStdin arm
  8. CLI spawn-based integration tests
  9. MCP ingest_file + ingest_stdin tools (4 → 6)
  10. MCP integration tests
  11. Doc sync (README + HANDOFF + CLAUDE + skill + design §6.3)
  12. HOTFIXES + status flip + final workspace verification

Release trigger (impl PR 머지 후)

0.3.1 → 0.3.2 patch — additive only (신규 subcommand + 신규 MCP tool, 기존 surface 동작 무영향, wire schema 변경 없음). pre-1.0 patch 정책 일관 (fb-30 도 0.3.1 patch 였음).

## 요약 - **Spec** `docs/superpowers/specs/2026-05-07-p9-fb-31-single-file-stdin-ingest-design.md` — `kebab ingest-file` + `kebab ingest-stdin` + MCP tool `ingest_file` / `ingest_stdin` brainstorm 산출물. - **Plan** `docs/superpowers/plans/2026-05-07-p9-fb-31-single-file-stdin-ingest.md` — 12 task TDD plan. - 본 PR 은 docs only — implementation 은 별 PR (본 docs 머지 후 새 feature branch). ## 핵심 결정 (spec) - 외부 file 저장: copy in (`<workspace.root>/_external/<blake3-12>.<ext>`). deterministic 명명 → idempotent. - CLI: 신규 subcommand 2개 (`ingest-file` + `ingest-stdin`). 기존 `kebab ingest` 무영향. - MCP: 4 → 6 tool. fb-30 v1 read-only 정책 변경 — 첫 mutation tool surface. - `.kebabignore`: explicit ingest = default bypass + stderr warn (별 flag 불필요). - stdin v1: markdown 전용 + flag (`--title`, `--source-uri`) → frontmatter 자동 prepend. 이미 frontmatter 있으면 error. - `_external/` 디렉토리 첫 생성 시 `.kebabignore` 자동 append (walk re-ingestion 무한 루프 방지). - Wire schema 변경 없음 (`ingest_report.v1` 재사용, source_uri 는 frontmatter → metadata 자동 흐름). ## Plan task 분할 1. `external` module (helpers + 12 unit tests) 2. `ingest_file_with_config` facade 3. ingest_file integration test 4. `ingest_stdin_with_config` facade 5. ingest_stdin integration test 6. CLI `Cmd::IngestFile` arm 7. CLI `Cmd::IngestStdin` arm 8. CLI spawn-based integration tests 9. MCP `ingest_file` + `ingest_stdin` tools (4 → 6) 10. MCP integration tests 11. Doc sync (README + HANDOFF + CLAUDE + skill + design §6.3) 12. HOTFIXES + status flip + final workspace verification ## Release trigger (impl PR 머지 후) 0.3.1 → **0.3.2** patch — additive only (신규 subcommand + 신규 MCP tool, 기존 surface 동작 무영향, wire schema 변경 없음). pre-1.0 patch 정책 일관 (fb-30 도 0.3.1 patch 였음).
altair823 added 2 commits 2026-05-07 08:54:13 +00:00
신규 명령 `kebab ingest-file` + `kebab ingest-stdin` + MCP tool
`ingest_file` + `ingest_stdin` 도입 brainstorm 산출물. agent fetch 한
web markdown / 단일 외부 file 을 KB 에 즉시 저장.

핵심 결정:
- 외부 file 저장: copy in (`<workspace.root>/_external/<hash12>.<ext>`).
  blake3 content hash 기반 deterministic 명명 → idempotent.
- CLI: 신규 subcommand 2개 (기존 `kebab ingest` 무영향).
- MCP: 4 → 6 tool. fb-30 v1 read-only 정책 변경 — 첫 mutation tool
  surface (의도된 진화).
- .kebabignore: explicit ingest 가 default bypass + stderr warn.
- stdin v1: markdown 전용 + flag (--title, --source-uri) → frontmatter
  자동 prepend. 이미 frontmatter 있으면 error (use ingest-file).
- `_external/` 디렉토리 첫 생성 시 .kebabignore 자동 append (walk
  re-ingestion 무한 루프 방지).
- source_uri 는 frontmatter → Document.metadata 자동 흐름. wire
  schema 변경 없음 (ingest_report.v1 / search_hit.v1 의 metadata
  free-form map 재사용).

릴리스: 0.3.1 → 0.3.2 patch — additive only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12-task plan covering:
- kebab-app::external module (4 helpers + 12 unit tests) — Task 1
- kebab-app::ingest_file_with_config facade — Task 2
- kebab-app integration test — Task 3
- kebab-app::ingest_stdin_with_config facade — Task 4
- kebab-app integration test — Task 5
- kebab-cli Cmd::IngestFile + Cmd::IngestStdin arms — Tasks 6 + 7
- kebab-cli spawn-based integration tests — Task 8
- kebab-mcp ingest_file + ingest_stdin tools (4 → 6) — Task 9
- kebab-mcp integration tests — Task 10
- doc sync (README + HANDOFF + CLAUDE + skill + design §6.3) — Task 11
- HOTFIXES + status flip + final verification — Task 12

Implementation strategy: ingest_file_with_config copies bytes to
_external/<hash>.<ext> then delegates to existing
ingest_with_config_opts via SourceScope { root: _external/, include:
[<filename>], ... } — minimal change to existing walk pipeline.
ingest_stdin_with_config = frontmatter inject + ingest_file delegation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
altair823 merged commit 177ce21f88 into main 2026-05-07 08:54:58 +00:00
altair823 deleted branch spec/p9-fb-31-single-file-stdin-ingest 2026-05-07 08:54:59 +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#110