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

974 B

1. Refactor note submission

  • 1.1 Extract note submission logic from runAdd into a shared submitNote helper (multipart POST, duplicate detection, output formatting)

2. Root command shorthand

  • 2.1 Add Args: cobra.ArbitraryArgs and RunE to the root command — join args into a note string, call submitNote; show help when no args
  • 2.2 Add --tags flag on the root command for note tagging

3. Rename add → addfile

  • 3.1 Rename command from add to addfile (Use: "addfile <path>")
  • 3.2 Remove --note, --title, and --type flags from the command
  • 3.3 Add extension validation for single file uploads — reject unsupported extensions with a clear error listing supported types

4. Documentation and verification

  • 4.1 Update README.md usage section: show kb "text" shorthand, rename add references to addfile
  • 4.2 Verify build compiles, kb --help and kb addfile --help show expected output