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>
1.6 KiB
1.6 KiB
1. Create addnote command
- 1.1 Create
client/cmd/addnote.gowithaddnoteCmdusingExactArgs(1),--tagsflag, andRunEcallingsubmitNote() - 1.2 Move
submitNote()function fromclient/cmd/add.gotoclient/cmd/addnote.go
2. Revert root command to standard Cobra behaviour
- 2.1 Remove
ArbitraryArgs, customRunElogic, and--tagsflag from root command inclient/cmd/root.go - 2.2 Remove custom usage template and
isRootCmdtemplate function — let Cobra use its default template - 2.3 Set root command to show help when called with no args (standard Cobra
RunEreturningcmd.Help()or nil)
3. Update examples and help text
- 3.1 Update
client/cmd/examples.goto showkb addnotesyntax instead ofkb "text"shorthand - 3.2 Update root command
Longdescription to remove reference to note shorthand
4. Update tests
- 4.1 Remove implicit note shorthand tests from
client/cmd/root_test.go(TestRootCmd_SingleWordRejected,TestRootCmd_MultipleWordsNotRejected) - 4.2 Add test for
addnotecommand (verify it wires up correctly, takes exactly one arg) - 4.3 Add test that root command with unknown args returns an error (standard Cobra behaviour)
- 4.4 Verify
addfiletests still pass (no changes expected)
5. Build and verify
- 5.1 Run
go buildand verify all commands appear inkb --help - 5.2 Run
go test ./...and verify all tests pass - 5.3 Verify
kb addnote --helpshows correct usage line and flags - 5.4 Verify
kb addfile --helpis unchanged