Problem
kb-add resolves --folder relative to the KB root rather than the content tree, so assertions land at <kb-root>/<folder>/ instead of under content/assertions/, their correct location. The misplaced note sits outside the organized content/ tree, and the helper returns ok: true with no warning. Recovery is manual each time (mv under content/, then remove the stray top-level directories).
Recurring: observed at least three times in seven days (01KTW9SSCYZ8REMZV65191K6RC, 01KV9NG9Z75XPNX0MAZEJG5Z4Q, 01KVD3KZDZN4X9FGMSV3EYHK45; recorded as events in the codeassembly KB).
kb-add only ever writes assertions (it hardcodes recordType: assertion), yet it makes the caller name the assertions/ archetype segment in --folder. The sibling writer capture-event owns its archetype directory (content/events/); kb-add does not own content/assertions/, so an assertion can be misfiled into any sibling subtree.
Context
kb-add is the assertion writer; capture-event is the separate, append-only event writer and already owns content/events/.
content/assertions/ and content/events/ are the canonical archetype homes under the KB's content/ tree.
- Root-layout KBs (notes at the vault root) are out of support;
content/ is the enforced structure.
Proposed solution
Make kb-add own its archetype root:
kb-add writes under content/assertions/. --folder is the topic subpath beneath that root, not the archetype (--folder tools/rovodev → content/assertions/tools/rovodev/). The assertions/ segment is supplied by the tool, mirroring its hardcoded recordType: assertion.
- Two guards refuse a malformed
--folder rather than silently misfiling the note: one that escapes the assertions root (e.g. ../events/x), and one that re-names the assertions/ segment.
capture-event already writes events to content/events/ and needs no change; kb-edit takes no --folder and edits notes in place, so it is unaffected.
Acceptance criteria
Must have
Problem
kb-addresolves--folderrelative to the KB root rather than the content tree, so assertions land at<kb-root>/<folder>/instead of undercontent/assertions/, their correct location. The misplaced note sits outside the organizedcontent/tree, and the helper returnsok: truewith no warning. Recovery is manual each time (mvundercontent/, then remove the stray top-level directories).Recurring: observed at least three times in seven days (
01KTW9SSCYZ8REMZV65191K6RC,01KV9NG9Z75XPNX0MAZEJG5Z4Q,01KVD3KZDZN4X9FGMSV3EYHK45; recorded as events in thecodeassemblyKB).kb-addonly ever writes assertions (it hardcodesrecordType: assertion), yet it makes the caller name theassertions/archetype segment in--folder. The sibling writercapture-eventowns its archetype directory (content/events/);kb-adddoes not owncontent/assertions/, so an assertion can be misfiled into any sibling subtree.Context
kb-addis the assertion writer;capture-eventis the separate, append-only event writer and already ownscontent/events/.content/assertions/andcontent/events/are the canonical archetype homes under the KB'scontent/tree.content/is the enforced structure.Proposed solution
Make
kb-addown its archetype root:kb-addwrites undercontent/assertions/.--folderis the topic subpath beneath that root, not the archetype (--folder tools/rovodev→content/assertions/tools/rovodev/). Theassertions/segment is supplied by the tool, mirroring its hardcodedrecordType: assertion.--folderrather than silently misfiling the note: one that escapes the assertions root (e.g.../events/x), and one that re-names theassertions/segment.capture-eventalready writes events tocontent/events/and needs no change;kb-edittakes no--folderand edits notes in place, so it is unaffected.Acceptance criteria
Must have
kb-addwrites assertions undercontent/assertions/, interpreting--folderas the topic subpath (--folder tools/rovodev→content/assertions/tools/rovodev/); omitting--folderwrites directly undercontent/assertions/.--folderthat escapes the assertions root (e.g.../events/x) is refused.--folderbeginning with the archetype segment (assertions/) is refused, with a message directing the caller to omit it.capture-eventandkb-editare confirmed unaffected (capture-eventalready writes tocontent/events/;kb-edittakes no--folder).kb-add's SKILL.md documents the new--foldersemantics, with no remaining reference to writing relative to or defaulting to the KB root.