feat(skills): configurable SSOT storage location (cc-switch | unified), align with upstream GUI - #414
Open
ShatterDusk wants to merge 7 commits into
Open
feat(skills): configurable SSOT storage location (cc-switch | unified), align with upstream GUI#414ShatterDusk wants to merge 7 commits into
ShatterDusk wants to merge 7 commits into
Conversation
…creation, TUI/CLI error surfacing, clap alias, no-op hint P1-1: copy_dir_recursive failure now cleans partial dst; source cleanup failures logged P1-2: TUI storage-location toast shows errors/skipped count (Warning on failure) P1-3: extract ssot_dir_for(); migrate_storage uses create_managed_config_dir_all P2-1: clap value alias cc_switch for CcSwitch P2-3: CLI no-op early return; error path prints failures + backup hint test: migrate_storage_keeps_source_and_setting_on_failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add configurable skills SSOT storage location (
skill_storage_location:cc-switch|unified) to the CLI, aligning with the upstream GUI'sskillStorageLocationfeature (farion1231/cc-switch). Inunifiedmode,~/.agents/skills/becomes the SSOT — the cross-tool standard directory adopted by skills.sh, LangChain, and six major harnesses.Closes #413
Motivation
~/.agents/skills/is the de-facto cross-harness standard for agent skills (Codex, Gemini CLI, DSH, OpenCode, Windsurf, Warp scan it natively; LangChain deepagents and skills.sh adopt it). The CLI's SSOT was hardcoded to{config_dir}/skills, forcing users of the.agentsconvention into two divergent skill copies. See #413 for the full harness adoption matrix.Changes
src/services/skill.rsSkillStorageLocationenum;get_ssot_dir()honors location;migrate_storage()with pre-migration backup;validate_skill_storage_destination()src/settings.rsskill_storage_locationfield (#[serde(default)]), get/set functionssrc/lib.rssrc/cli/commands/skills.rsskills storage-locationcommand (get/set + triggers migration)tests/skills_service.rsCLI usage
Behavior (aligned with upstream GUI's migrate_storage)
{config_dir}/skill-backups/(new: upstream has no backup; added for rollback safety)Testing
migrate_storage_*,get_ssot_dir_switches_on_location) + 3 integration tests (storage_location_*) — all passservices::skillmodule: 20/20 passcli::tui::theme::tests(terminal color detection fails in non-TTY env), unrelated to this change (verified on clean baseline viagit stash)cargo fmt --checkclean;cargo clippyno new warningsNotes
cc-switch/unifiedfor CLI args; serde snake_casecc_switch/unifiedin settings.jsonmigrate_storagetraverses the SSOT directory (not the index), so traversal-safe by construction