Skip to content

feat(tools): add skills sync manifest with user-edit preservation#63

Merged
Tuanzi1015 merged 1 commit into
MLT-OSS:mainfrom
lml2468:feat/skills-sync-manifest
Apr 11, 2026
Merged

feat(tools): add skills sync manifest with user-edit preservation#63
Tuanzi1015 merged 1 commit into
MLT-OSS:mainfrom
lml2468:feat/skills-sync-manifest

Conversation

@lml2468
Copy link
Copy Markdown
Contributor

@lml2468 lml2468 commented Apr 11, 2026

Fixes #55

Summary

  • Add SkillManifest and ManifestEntry data structures for tracking synced skill state including content hashes, source, install time, and user-modification flag.
  • Add LoadManifest / SaveManifest with atomic writes (temp file + os.Rename) at ~/.hermes/skills/.manifest.json.
  • Add IsUserModified for user-edit detection by comparing current file hash against the manifest hash; user-modified skills are never overwritten during sync.
  • Integrate manifest into SyncBuiltinSkills: load manifest, check user edits, skip modified files, update hashes, save manifest.
  • Add SyncFromHub stub for future GitHub-based skill index fetching.
  • Add comprehensive tests: manifest round-trip, atomic write, user-edit detection, sync integration, hub stub.

Test plan

  • go test ./... -count=1 passes (all packages)
  • Manifest round-trip: save and reload preserves all fields
  • Atomic write: no temp files left behind, valid JSON on disk
  • User-edit detection: unmodified files sync normally, modified files are skipped
  • Sync integration: manifest is created on first sync, hashes update on re-sync
  • SyncFromHub stub returns nil without error

@Tuanzi1015 Tuanzi1015 merged commit af85383 into MLT-OSS:main Apr 11, 2026
7 of 8 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.

[Feature]: Skills sync manifest with user-edit preservation and hub support

3 participants