Skip to content

Add patch command with incremental single-document reindex#169

Merged
G9Pedro merged 2 commits intomasterfrom
cursor/clawvault-patch-command-2d43
Mar 13, 2026
Merged

Add patch command with incremental single-document reindex#169
G9Pedro merged 2 commits intomasterfrom
cursor/clawvault-patch-command-2d43

Conversation

@G9Pedro
Copy link
Copy Markdown
Contributor

@G9Pedro G9Pedro commented Mar 13, 2026

Summary

  • add a new clawvault patch <idOrPath> command for in-place document updates
  • support three patch modes:
    • --append <text>
    • --replace <text> --with <text>
    • --section <heading> --content <text>
  • add strict CLI validation so exactly one patch mode is selected and --with is only used with --replace
  • implement ClawVault.patch() with section-aware markdown patching and path safety checks
  • update indexing behavior to refresh only the patched document in the local index (no full reindex() call)
  • extend tests across core vault behavior and CLI registration/forwarding

Testing

  • npm run build
  • npm test
  • manual CLI walkthrough demo of all patch modes (append, replace/with, section/content) with final get verification
Open in Web Open in Cursor 

cursoragent and others added 2 commits March 13, 2026 22:58
Co-authored-by: G9Pedro <G9Pedro@users.noreply.github.com>
Co-authored-by: G9Pedro <G9Pedro@users.noreply.github.com>
@G9Pedro G9Pedro marked this pull request as ready for review March 13, 2026 23:48
@G9Pedro G9Pedro merged commit bb0dcd1 into master Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants