Skip to content

feat(tools): add upgrade subcommand for in-place AI-DLC install upgrades#535

Open
Rwindows wants to merge 2 commits into
awslabs:v2from
Rwindows:feat/aidlc-upgrade-command
Open

feat(tools): add upgrade subcommand for in-place AI-DLC install upgrades#535
Rwindows wants to merge 2 commits into
awslabs:v2from
Rwindows:feat/aidlc-upgrade-command

Conversation

@Rwindows

@Rwindows Rwindows commented Jul 7, 2026

Copy link
Copy Markdown

Summary

Adds a new upgrade subcommand to aidlc-utility that replaces the manual "download the release zip and cp -r dist/<harness>/ into your project" recipe every prior CHANGELOG entry has documented. One command fetches the
newest tag in the installed major series from the upstream tags API, auto-detects the harness (.claude /
.kiro / .codex), and copies new files in — preserving any file the user has modified.

Two shapes:

  • aidlc-utility upgrade — runs the upgrade (writes files)
  • aidlc-utility upgrade --dry-run — preview only, no writes

Motivation

Every ## [N.N.N] release note in this repo ends with the same line: "Upgrade: re-copy your dist/<harness>/
shell into the project."
That manual step is universal — every AI-DLC user hits it on every release. This PR
turns it into one command.

Design decisions

  • Tags API, not releases/latest. The releases/latest endpoint answers the v1 line for this repo; the tags
    API is the honest source for v2 development.
  • Reads installed version from the target project's aidlc-version.ts, not the tool binary's imported
    constant.
  • Cross-major upgrades refused. A 2.x install is never auto-offered a 3.x jump.
  • Pre-release tags filtered. v2.3.0-rc1 is ignored.
  • No backup dir created. Users bring their own snapshot (git commit, manual copy) if they want rollback.
    Keeps the harness dir clean.
  • User-modified files preserved byte-exact. If local bytes differ from the incoming upstream file, the local
    copy wins.
  • Auto-detects harness by folder presence. --harness <name> overrides when multiple are present.

Verification

  • Unit tests (tests/unit/t213-upgrade-subcommand.test.ts) cover all shapes with mocked GitHub + real
    filesystem.
  • Live end-to-end tested against a real install (v2.0.1 → v2.2.0) on a project with a custom agents folder and a
    modified settings.local.json; both preserved untouched.
  • bun scripts/package.ts --check clean (dist trees regenerated).
  • bun tests/run-tests.ts --smoke --unit: 140 files / 2409 assertions / 0 failures.
  • t68-version-changelog-sync passes (version bump / CHANGELOG / README badge in sync).

Notes

  • Windows requires Git Bash or WSL (uses system tar for extraction).
  • No new dependencies.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution,
under the terms of the project license.

…rades

Replaces the manual "download the release zip and `cp -r dist/<harness>/`
into your project" recipe every prior CHANGELOG entry has documented. One
command fetches the newest tag in the installed major series from the
upstream tags API, auto-detects the harness (.claude / .kiro / .codex),
and copies new files in — PRESERVING any file whose local bytes differ
from the incoming upstream file (the user-modification signal).

Two shapes:
  aidlc-utility upgrade            → run the upgrade (writes files)
  aidlc-utility upgrade --dry-run  → preview only, no writes

Design notes:
  - Uses the tags API, not `releases/latest` (which answers the v1 line
    for this repo); picks the newest v<installed-major>.* tag.
  - Cross-major (2.x → 3.x) upgrades are refused deliberately; pre-
    release tags (-rc1, etc.) are filtered out.
  - Installed version is read from the target project's aidlc-version.ts,
    not the tool binary's imported constant, so `upgrade` reports the
    truth for the install being operated on even when invoked from
    outside it.
  - No backup dir is created — users bring their own snapshot (git
    commit, manual copy) if they want rollback insurance. Standard
    "trust your VCS" default.
  - System `tar` for extraction; Windows requires Git Bash or WSL.

Bumps aidlc-version.ts (2.2.10 → 2.2.11), CHANGELOG heading, and the
README badge in the same commit per changelog policy (t68 pin).
@Rwindows Rwindows requested review from a team as code owners July 7, 2026 22:55
@github-actions github-actions Bot added documentation Improvements or additions to documentation github rules labels Jul 7, 2026
@Rwindows Rwindows changed the base branch from main to v2 July 7, 2026 22:57
@Rwindows Rwindows changed the title Feat/aidlc upgrade command feat(tools): add upgrade subcommand for in-place AI-DLC install upgrades Jul 8, 2026
@Rwindows Rwindows closed this Jul 8, 2026
@Rwindows Rwindows reopened this Jul 8, 2026
…issues

- Remove leftover conflict markers from CHANGELOG.md (lines 92-95)
- Remove trailing whitespace in README.md line 64
- Remove extra blank line at EOF in t-ide-kiro-checkpoint.serial.test.ts

These are cleanup changes for v2 to allow PR awslabs#535 to merge cleanly.
@Rwindows

Copy link
Copy Markdown
Author

conflicts resolved

@Rwindows

Copy link
Copy Markdown
Author

@apackeer this is resolved please take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants