`kebab ingest` 가 진행 상황을 사용자에게 보여주는 두 surface 추가:
- **사람 모드 (TTY)**: indicatif `ProgressBar` on stderr — scan 중에는
spinner, ScanCompleted 후 bar 로 전환, 매 asset 마다 message 갱신.
- **사람 모드 (non-TTY, CI/pipe)**: indicatif draw target 을 hidden
으로 두고 stderr 에 한 줄씩 (`ingest: scanning`, `ingest: 1/N path`,
`ingest: complete (...)`).
- **`--json` 모드**: stderr 비우고 stdout 에 line-delimited
`ingest_progress.v1` JSON 을 emit. 마지막 줄은 기존
`ingest_report.v1` 그대로 (외부 wrapper backward-compat).
구현:
- 신규 `crates/kebab-cli/src/progress.rs` — `ProgressMode::{Json,
Human { tty }}`, `ProgressDisplay` (background thread 가 channel
drain + 모드별 render), `now_rfc3339` helper. mode 가 무엇이든 ts
는 wire emit 시점에 stamp.
- `crates/kebab-cli/src/wire.rs` 에 `wire_ingest_progress` 추가.
serde tag (`kind`) 위에 `schema_version` + `ts` 두 필드 더해 spec
§2.4a wire shape 완성.
- `Cmd::Ingest` 핸들러: mpsc channel 만들고 background thread 가
display 돌리는 동안 main 이 `ingest_with_config_progress` 호출.
ingest 반환 시 Sender drop → display thread 정상 종료. join 후
최종 ingest_report 출력.
- 새 dep: `indicatif` 0.17 (TTY 전용 진행 바, non-TTY/--json 에서는
hidden draw target).
Test:
- 3 lib unit (mode resolution + RFC 3339 round-trip).
- 3 integration (--json line-delimited / non-TTY stderr text /
ts+kind 검증). 16 PASS 전체 회귀 0.
Plan 갱신:
- p9-fb-01: status `in_progress` → `completed` (PR #52 머지 후속).
- p9-fb-02: status `planned` → `in_progress`. 머지 후 별도 한 줄
commit 으로 `completed` flip.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
phase, component, task_id, title, status, depends_on, unblocks, contract_source, contract_sections, source_feedback
| phase | component | task_id | title | status | depends_on | unblocks | contract_source | contract_sections | source_feedback | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P9 | kebab-cli | p9-fb-02 | CLI progress display (spinner + text + --json line events) | in_progress |
|
../../docs/superpowers/specs/2026-04-27-kebab-final-form-design.md |
|
p9-dogfooding-feedback.md item 1 |
p9-fb-02 — CLI progress display
Goal
kebab ingest (그리고 추후 kebab eval run 등 long-running 명령) 이 stderr 에 spinner + 진행 라인을 그리고, --json 모드면 stdout 에 line-delimited progress event 를 dump.
Allowed dependencies
kebab-app(progress event 소비)indicatif = "0.17"또는 자체 minimal spinner (선호: indicatif — 검증된 라이브러리)serde_json
Public surface
kebab-cli 내부 함수 — public API 변경 없음. progress receiver thread 가 event 받아 indicatif ProgressBar 갱신, --json 이면 별도로 stdout 한 줄.
Behavior contract
- TTY 감지:
is_terminal()(std::io::IsTerminal). non-TTY (CI / pipe) 에서는 spinner 끄고 매 N 초마다 한 줄 progress 출력. --json은 spinner 끄고 line-delimited JSON 만. 마지막 줄은 기존ingest_report.v1그대로.- progress JSON wire schema 는 새
ingest_progress.v1—docs/wire-schema/v1/ingest_progress.schema.json추가. - stderr 사용 (stdout 는
--json결과만, redirection 깔끔).
Test plan
| kind | description |
|---|---|
| unit | ProgressDisplay 가 IngestEvent stream → 사람-친화 텍스트 변환 (no panic) |
| snapshot | --json line stream 이 schema 에 validate |
| integration | kebab ingest --json non-TTY 에서 spinner 미출력 |
DoD
cargo test -p kebab-cli통과- 새 wire schema
ingest_progress.v1JSON Schema 7 + 예시 - README 명령 표 / Quick start 갱신 (spinner /
--json동작 명시)
Out of scope
kebab eval run진행 표시 (이 task 의 surface 만 이식 가능하게 두고 별도 task)- TUI 진행 표시 (p9-fb-03)