Description
Add a devsync update command that re-installs packages from their original source with the latest content. This covers both practice file updates and pip-installed MCP server version bumps.
Context
Currently, devsync install is a one-shot operation. If a package source gets updated (new practices, updated MCP configs, version bumps), the only way to get changes is to uninstall and re-install. Teams need a way to pull the latest version of their standards without losing local adaptations.
The package tracker (packages.json) already records the source URL/path, installed tools, and timestamps — enough to support re-fetching.
Affected Files
devsync/cli/main.py — Register update command
devsync/cli/update.py — New command implementation
devsync/storage/package_tracker.py — Query installed packages for source info
devsync/cli/install_v2.py — Refactor shared logic for reuse by update
tests/unit/cli/test_update.py — New tests
Acceptance Criteria
Implementation Notes
Reuse install_v2_command internals — update is essentially "re-install from recorded source with conflict=overwrite and changelog output." Consider a --dry-run flag to preview changes without applying.
Description
Add a
devsync updatecommand that re-installs packages from their original source with the latest content. This covers both practice file updates and pip-installed MCP server version bumps.Context
Currently,
devsync installis a one-shot operation. If a package source gets updated (new practices, updated MCP configs, version bumps), the only way to get changes is to uninstall and re-install. Teams need a way to pull the latest version of their standards without losing local adaptations.The package tracker (
packages.json) already records the source URL/path, installed tools, and timestamps — enough to support re-fetching.Affected Files
devsync/cli/main.py— Registerupdatecommanddevsync/cli/update.py— New command implementationdevsync/storage/package_tracker.py— Query installed packages for source infodevsync/cli/install_v2.py— Refactor shared logic for reuse by updatetests/unit/cli/test_update.py— New testsAcceptance Criteria
devsync update <package-name>re-fetches and re-installs a specific packagedevsync update --allupdates all installed packages--no-aimode supported for file-copy updatesinvoke test-unitinvoke lintImplementation Notes
Reuse
install_v2_commandinternals — update is essentially "re-install from recorded source with conflict=overwrite and changelog output." Consider a--dry-runflag to preview changes without applying.