afbe270181
Two changes: 1. structured-add-commands: The implicit note shorthand (kb "text") caused accidental note creation from mistyped commands. Replaced with explicit kb addnote <text> command. Root command reverts to standard Cobra behaviour. Updated examples, tests, SKILL.md, and specs. 2. split-readme-developer-docs: Moved build-from-source instructions, release process, API reference, and ROCm migration notes from README.md into a new DEVELOPER.md. README now links to DEVELOPER.md for dev workflows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Why
The implicit note shorthand (kb "some text") makes it too easy to accidentally add notes when mistyping commands. Despite the single-word guard, any multi-word typo (e.g. kb lisst --type pdf) silently creates a note. The root command doing double-duty as both command dispatcher and note ingester undermines user trust. Reverting to explicit, structured add commands eliminates accidental ingestion and gives every content type a clear, discoverable verb.
What Changes
- New
addnotecommand:kb addnote <text>takes a single quoted positional argument and submits it as a note. Supports--tags. ThesubmitNote()logic moves fromroot.goto a newaddnote.gocommand file. - Remove implicit note shorthand: The root command reverts to standard Cobra behaviour — no
ArbitraryArgs, no special arg-count logic, no--tagsflag on root. Unknown input gets Cobra's default "unknown command" error. - Remove custom usage template: The root command no longer needs the
isRootCmdtemplate logic. Standard Cobra usage template for all commands. - Update examples:
examples.goupdated to showkb addnoteinstead of barekb "text". - Update tests: Remove implicit note shorthand tests, add
addnotecommand tests. addfileunchanged: Stays exactly as-is.- BREAKING:
kb "note text"no longer works. Users must usekb addnote "note text".
Capabilities
New Capabilities
(none)
Modified Capabilities
go-client: The "Implicit note shorthand" requirement is removed entirely and replaced by a new "Add note command" requirement. The "Add command (file and note ingestion)" requirement description is updated to reflectaddnote/addfileas the two ingestion commands. The root command reverts to standard Cobra behaviour with no custom arg handling or usage template.
Impact
client/cmd/root.go— removeArbitraryArgs,RunEnote logic,--tagsflag, custom usage template,isRootCmdtemplate funcclient/cmd/add.go—submitNote()function moves to newaddnote.go(or stays inadd.goalongsideaddfile— design decision)client/cmd/addnote.go— new file defining theaddnotecommandclient/cmd/examples.go— update example textclient/cmd/root_test.go— remove implicit note shorthand tests, add standard Cobra behaviour tests- No engine changes — the API contract (
POST /api/v1/jobswithnotefield) is unchanged