Files
kb/openspec/changes/archive/2026-03-29-client-reindex-command/design.md
T
steve 7f4decee26 Reindex command, implicit note shorthand, add→addfile rename
- Add `kb reindex` command with confirmation prompt and --yes flag
- Add implicit note shorthand: `kb "my note"` submits a note directly
- Rename `add` to `addfile`, remove --note/--title/--type flags
- Add client-side file extension validation before upload
- Add `kb examples` command for common usage patterns
- Update README, SKILL.md, and main specs
- Archive completed changes and sync delta specs

BREAKING: `kb add` renamed to `kb addfile`, `kb add --note` replaced by `kb "text"`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:58:04 +01:00

875 B

Context

The engine's POST /api/v1/reindex re-embeds all chunks synchronously and returns {"chunks_reindexed": N, "model": "..."}. The client has an established confirmation pattern in remove.go using --yes/-y flag.

Goals / Non-Goals

Goals:

  • Add kb reindex with confirmation prompt matching kb remove pattern
  • Display human-readable and JSON output

Non-Goals:

  • Progress reporting during reindex (engine returns synchronously)
  • Model selection from the client (model is engine-side config)

Decisions

1. Confirmation prompt before reindex

Reindex drops and rebuilds the vector table — destructive if interrupted. Use the same [y/N] prompt pattern as kb remove, skippable with --yes/-y.

2. Warn that it may take a while

The prompt should mention that reindex re-embeds all chunks, so the user knows it's not instant.