P9-1~P9-4 머지 후 사용자가 직접 도그푸딩 하며 수집한 16 항목 UX 피드백을 20 개 single-PR 사이즈 task spec 으로 분해. 각 spec 은 frontmatter (depends_on / unblocks / source_feedback), Goal, Allowed deps, Public surface, Behavior contract, Test plan, DoD, Out of scope 절 포함. 추가: - p9-fb-01 ~ 20-*.md: 분해된 task spec 20 개 - p9-dogfooding-feedback.md: master index + 우선순위 + 권장 실행 순서 + spec PR vs impl PR 절 - INDEX.md: p9-fb-01 ~ 20 link 추가 - docs/superpowers/plans/2026-05-02-p9-fb-06-reset-command.md: 첫 후속 작업 (kebab reset 명령) 의 6-task 구현 plan - .gitignore: .worktrees/ 추가 (superpowers worktree skill 용) 피드백 항목 → task spec 매핑은 p9-dogfooding-feedback.md 의 표 참조. 실행 시작 task: p9-fb-06 (reset 명령) — 도그푸딩 막힘 강도 1위. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
65 lines
2.0 KiB
Markdown
65 lines
2.0 KiB
Markdown
---
|
|
phase: P9
|
|
component: kebab-cli + kebab-app
|
|
task_id: p9-fb-06
|
|
title: "kebab reset / nuke command"
|
|
status: planned
|
|
depends_on: []
|
|
unblocks: []
|
|
contract_source: ../../docs/superpowers/specs/2026-04-27-kebab-final-form-design.md
|
|
contract_sections: [§10 UX]
|
|
source_feedback: p9-dogfooding-feedback.md item 4
|
|
---
|
|
|
|
# p9-fb-06 — Reset 명령
|
|
|
|
## Goal
|
|
|
|
`kebab reset` 단일 명령으로 XDG 데이터 wipe. 부분 wipe variant 도 제공.
|
|
|
|
## Allowed dependencies
|
|
|
|
- 기존 + `dialoguer` (또는 자체 prompt) — confirm UI.
|
|
|
|
## Public surface
|
|
|
|
CLI:
|
|
```
|
|
kebab reset [--all | --data-only | --vector-only | --config-only] [--yes]
|
|
```
|
|
|
|
flag 의미:
|
|
- `--all`: 4 XDG 경로 전부 (config + data + cache + state).
|
|
- `--data-only`: data + cache + state. config 보존 (기본).
|
|
- `--vector-only`: lance dir 만. SQLite 보존 + re-embed 필요한 chunks 표시.
|
|
- `--config-only`: config dir 만.
|
|
- `--yes`: confirm prompt skip.
|
|
|
|
`--config <path>` 도 honor — isolated workspace wipe.
|
|
|
|
## Behavior contract
|
|
|
|
- 기본 confirm: 삭제 대상 경로 4 줄 + 총 byte 추정 + `(y/N)`. n 또는 빈 입력은 abort.
|
|
- TTY 아닌 경우 `--yes` 없이 abort (silent destruction 금지).
|
|
- vector-only 의 경우: SQLite `embedding_records` row 도 같이 truncate (orphan 방지). re-embed 는 next ingest 가 처리.
|
|
- wipe 후 `kebab init` 자동 호출 X — 사용자가 명시적으로 다시 init.
|
|
|
|
## Test plan
|
|
|
|
| kind | description |
|
|
|------|-------------|
|
|
| unit | path 추정 + confirm 메시지 빌드 |
|
|
| integration | tmp config + `--data-only --yes` → data dir 삭제, config 보존 |
|
|
| integration | `--vector-only --yes` → lance dir 사라짐, embedding_records=0 |
|
|
|
|
## DoD
|
|
|
|
- [ ] `cargo test -p kebab-cli` 통과
|
|
- [ ] README **명령** 표 + Quick start 갱신 (reset 명령 + safety 안내)
|
|
- [ ] 위험성 강조: README + `--help` 에서 "irreversible"
|
|
|
|
## Out of scope
|
|
|
|
- snapshot / backup 생성 (P+ — `kebab backup` 별도)
|
|
- confirm 우회용 env (`KEBAB_RESET_YES=1` 같은 magic) 금지 — `--yes` 로 충분
|