Files
kb/openspec/changes/archive/2026-03-29-implicit-note-shorthand/proposal.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

1.9 KiB

Why

Adding a note requires kb add --note "my note" — too much ceremony for what should be instant. The --note flag taking a string value also creates confusing flag parsing (e.g. kb add --note --tags foo parses --tags as the note value). Meanwhile, kb add tries to do two things (files and notes) which muddies its help text and UX.

Splitting these into distinct paths makes the CLI clearer:

  • Notes: kb "my note" — zero-friction, no subcommand needed
  • Files: kb addfile report.pdf — explicit, file-only command

What Changes

  • Add kb "text" shorthand: bare string arguments without a subcommand are treated as notes, submitted via POST /api/v1/jobs
  • Rename addaddfile: the command becomes file-only, no more --note/--title flags
  • Drop --type flag: the engine already auto-detects type from file extension (detector.py); the client doesn't need to override this
  • Add client-side extension validation: reject unsupported file extensions with a clear error before uploading, using the same extension set as recursive directory walks
  • Update README: document the new shorthand and renamed command
  • BREAKING: kb add no longer exists; kb add --note no longer exists

Capabilities

New Capabilities

(none)

Modified Capabilities

  • go-client: Rename add to addfile, remove --note/--title/--type flags, add extension validation for single file uploads, add implicit note shorthand on root command

Impact

  • client/cmd/add.go → renamed/refactored to addfile command, stripped of note logic, added extension check
  • client/cmd/root.go — bare args handling + --tags flag for note shorthand
  • README.md — updated usage examples
  • No engine changes — engine already detects type from extension and rejects unsupported files
  • Breaking change for any scripts using kb add or kb add --note