Skip to content

Add devsync update command for installed packages #81

@troylar

Description

@troylar

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

  • devsync update <package-name> re-fetches and re-installs a specific package
  • devsync update --all updates all installed packages
  • AI adaptation runs on update (merging new practices with current state)
  • --no-ai mode supported for file-copy updates
  • Pip MCP packages updated to latest compatible version (when Add pip-installable MCP server support to packages #80 lands)
  • Shows diff/summary of what changed before applying
  • User confirmation required before overwriting
  • Tests pass: invoke test-unit
  • Lint passes: invoke lint

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions