-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
git mind set currently treats all <value> arguments as strings (documented in GUIDE.md as of #222). The idempotency check uses strict equality (===), which works for strings but would always report changed: true for objects/arrays. This is fine for the current CLI use case (status values like done, in-progress) but limits programmatic use.
Proposal
Add an optional --type flag to git mind set:
git mind set task:a priority 3 --type number
git mind set task:a archived true --type bool
git mind set task:a metadata '{"key":"val"}' --type jsonTypes:
string(default, current behavior)number—parseFloat(value), error on NaNbool—true/falseonlyjson—JSON.parse(value), error on invalid JSON
The idempotency check in setNodeProperty would need a deep-equality path for structured values (e.g. util.isDeepStrictEqual).
Acceptance Criteria
-
--type number|bool|jsonflag parsed and validated -
setNodePropertyuses deep equality when value is non-primitive -
set.schema.jsonupdated to allow non-stringvaluefield - Tests cover each type + error cases
- Backward compatible — omitting
--typepreserves string behavior
Originated from PR #223 agent reflection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request