Skip to content

Remove the devkit migrate command; fold config reconcile into upgrade - #68

Merged
norvalbv merged 1 commit into
mainfrom
feat/drop-migrate-command
Jul 10, 2026
Merged

Remove the devkit migrate command; fold config reconcile into upgrade#68
norvalbv merged 1 commit into
mainfrom
feat/drop-migrate-command

Conversation

@norvalbv

@norvalbv norvalbv commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Breaking (CLI): removes the standalone devkit migrate verb. devkit upgrade is the single entry point — it already composes the emitted-config reconcile + husky/gates refresh + skills/agents sync + doctor.

Why

devkit migrate was a half-command: reconciled emitted configs but punted the husky-guards refresh back to the user ("re-run devkit init"). And devkit update's "Next:" hint steered users into update → migrate → migrate --apply → init — a 4-step dance for what devkit upgrade does in one pass.

Changes

  • Delete cli/commands/migrate.mts; move logic to cli/commands/migrate-config.mts (computeMigration, unchanged) — upgrade imports it there.
  • Drop migrate from the CLI registry (cli/index.mts) → devkit migrate = unknown command, absent from help.
  • devkit update's Next hint now points to devkit upgrade.
  • README + upgrade help/comments reworded — upgrade is THE entry point; update/sync-*/init stay callable for scripts.

Tests

  • migrate.test.mtsmigrate-config.test.mts; computeMigration coverage unchanged. Full suite green (1273). biome ✓ tsc ✓ lint:structure ✓ fanout ✓.

Merge with a merge commit if a release tag will point here later.

Summary by CodeRabbit

  • New Features

    • devkit upgrade now reconciles emitted configuration automatically as part of its upgrade process.
    • devkit upgrade --dry-run can preview configuration reconciliation changes.
  • Changes

    • Removed the standalone devkit migrate command.
    • Updated post-update guidance and documentation to direct users to devkit upgrade.
    • Existing lower-level update, sync, and doctor commands remain available for scripts.

**Breaking (CLI):** removes the standalone `devkit migrate` verb. `devkit upgrade` is now the single entry point — it already composes the emitted-config reconcile + husky/gates refresh + skills/agents sync + doctor.

## Why
`devkit migrate` was a half-command: it reconciled emitted configs but punted the husky-guards refresh back to the user ("re-run `devkit init`"). And `devkit update`'s "Next:" hint steered users into `update → migrate → migrate --apply → init` — a 4-step dance for what `devkit upgrade` does in one pass. Users kept hitting the manual path and never discovered `upgrade`.

## Changes
- Delete `cli/commands/migrate.mts`; move its logic to `cli/commands/migrate-config.mts` (`computeMigration`, unchanged) — `upgrade` imports it from there.
- Drop `migrate` from the CLI command registry (`cli/index.mts`) → `devkit migrate` reports unknown command and is absent from help.
- `devkit update`'s Next hint now points to `devkit upgrade` (was `devkit migrate`).
- README + `upgrade` help/comments reworded — `upgrade` is THE entry point; `update`/`sync-*`/`init` stay callable for scripts.

## Tests
- `migrate.test.mts` → `migrate-config.test.mts` (import repointed); `computeMigration` coverage unchanged.
- `upgrade-version-step.test.mts` mock path updated.
- biome ✓ · tsc ✓ · lint:structure ✓ · fanout ✓ · suites green; `devkit migrate` smoke-tested as unknown-command.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The emitted-config migration logic is now a reusable planner invoked by devkit upgrade. The standalone devkit migrate command and dispatcher entry are removed, with tests and documentation updated for the new command boundary.

Changes

Emitted-config reconciliation

Layer / File(s) Summary
Reusable migration planner
cli/commands/migrate-config.mts
Exports MigrationChange and computeMigration, removing the standalone migrate command implementation.
Upgrade integration and validation
cli/commands/upgrade.mts, cli/__tests__/upgrade-version-step.test.mts, cli/__tests__/migrate-config.test.mts
upgrade calls computeMigration from migrate-config.mts, and tests mock and import the updated module boundary.
CLI surface and guidance
cli/index.mts, cli/commands/update.mts, README.md
Removes the migrate dispatcher entry and directs users to upgrade for emitted-config reconciliation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • norvalbv/devkit#14: Also connects emitted-config migration behavior to the devkit upgrade command.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main breaking change: removing devkit migrate and moving config reconciliation into devkit upgrade.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/drop-migrate-command

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@norvalbv
norvalbv merged commit 9831bd1 into main Jul 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
cli/commands/upgrade.mts (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale "migrate" label in runtime console output.

The help text (lines 49-61) and pipeline comment (line 81) were updated to use "emitted-config reconcile" / "config reconcile (computeMigration)", but the corresponding runtime output on line 185 still prints 2. configs (migrate) and the section comment on line 181 still says // ── 2. configs (migrate) ───. Users reading the help see "emitted configs" but the upgrade run labels the step "migrate" — a confusing mismatch given this PR removes the devkit migrate verb.

♻️ Align the step label with the new terminology
-  // ── 2. configs (migrate) ───────────────────────────────────────────────────
+  // ── 2. configs (reconcile) ──────────────────────────────────────────────────
   // Gate on the RESOLVED `structure` (raw recorded value, or inferred from an emitted eslint.config.mjs
   // for a legacy config) — NOT the normalized default — so a non-structure repo never gets an
   // eslint.config.mjs created. applyInit's own STRUCTURE_STACKS check is the backstop for the stack.
-  console.log('\n2. configs (migrate)');
+  console.log('\n2. configs (reconcile)');

Also applies to: 36-36, 49-61, 81-81

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cli/commands/upgrade.mts` at line 4, Update the stale “migrate” terminology
in the upgrade step labels: revise the section comment and runtime console
output in the upgrade command’s config reconciliation step to use
“emitted-config reconcile” or the matching “config reconcile (computeMigration)”
wording already used by the help text and pipeline comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 145-147: Remove all remaining user-facing references to the
obsolete `devkit migrate --apply` command, especially in
`skills/using-devkit/SKILL.md`, and update the guidance to use the current
`devkit upgrade` flow instead.

---

Nitpick comments:
In `@cli/commands/upgrade.mts`:
- Line 4: Update the stale “migrate” terminology in the upgrade step labels:
revise the section comment and runtime console output in the upgrade command’s
config reconciliation step to use “emitted-config reconcile” or the matching
“config reconcile (computeMigration)” wording already used by the help text and
pipeline comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c00bd1a9-4e3f-4963-b7c9-1d9d8e34abca

📥 Commits

Reviewing files that changed from the base of the PR and between c5f5e1e and 6644f1c.

📒 Files selected for processing (7)
  • README.md
  • cli/__tests__/migrate-config.test.mts
  • cli/__tests__/upgrade-version-step.test.mts
  • cli/commands/migrate-config.mts
  • cli/commands/update.mts
  • cli/commands/upgrade.mts
  • cli/index.mts
💤 Files with no reviewable changes (1)
  • cli/index.mts

Comment thread README.md
Comment on lines +145 to +147
The lower-level slices stay callable for scripts: `devkit update` (self-update the package),
`devkit sync-skills` / `devkit sync-agents`, and `devkit doctor --fix` (re-run init for the recorded
selection). The emitted-config reconcile is no longer a standalone command — `devkit upgrade` folds it in.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for any remaining references to the old migrate.mts module or devkit migrate command.
# Expect: zero matches for migrate.mts (not migrate-config.mts); no 'migrate' in CLI registry.

echo "=== References to old migrate.mts (excluding migrate-config.mts) ==="
rg -n 'migrate\.mts' --glob '!**/migrate-config*' --glob '!**/.git/**' || echo "  none found"

echo ""
echo "=== CLI registry entries mentioning 'migrate' ==="
rg -n 'migrate' cli/index.mts || echo "  none found (or file not present)"

echo ""
echo "=== Any remaining 'devkit migrate' in user-facing docs ==="
rg -n 'devkit migrate' README.md docs/ 2>/dev/null || echo "  none found"

Repository: norvalbv/devkit

Length of output: 235


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Files with migrate-related names ==="
fd -a 'migrate' . || true

echo
echo "=== migrate mentions across repository ==="
rg -n '\bmigrate\b' . --glob '!**/.git/**' || true

echo
echo "=== devkit migrate mentions in markdown/docs ==="
rg -n 'devkit migrate' . --glob '!**/.git/**' --glob '!**/node_modules/**' || true

echo
echo "=== cli/index.mts if present ==="
if [ -f cli/index.mts ]; then
  cat -n cli/index.mts
else
  echo "cli/index.mts not present"
fi

Repository: norvalbv/devkit

Length of output: 18382


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== candidate files ==="
git ls-files | rg '(^|/)(README\.md|cli/index\.mts|.*migrate.*)$' || true

echo
echo "=== migrate references with context ==="
rg -n -C 2 '\bmigrate\b' README.md . --glob '!**/.git/**' --glob '!**/node_modules/**' || true

echo
echo "=== old module path references ==="
rg -n 'migrate\.mts|/migrate(\.mts)?' . --glob '!**/.git/**' --glob '!**/node_modules/**' || true

Repository: norvalbv/devkit

Length of output: 35982


Remove the remaining devkit migrate user-facing references. skills/using-devkit/SKILL.md still tells users to run devkit migrate --apply, but the CLI no longer exposes that verb.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 145 - 147, Remove all remaining user-facing
references to the obsolete `devkit migrate --apply` command, especially in
`skills/using-devkit/SKILL.md`, and update the guidance to use the current
`devkit upgrade` flow instead.

@norvalbv norvalbv mentioned this pull request Jul 10, 2026
@norvalbv
norvalbv deleted the feat/drop-migrate-command branch July 10, 2026 23:03
norvalbv added a commit that referenced this pull request Jul 10, 2026
…#68)

**Breaking (CLI):** removes the standalone `devkit migrate` verb. `devkit upgrade` is now the single entry point — it already composes the emitted-config reconcile + husky/gates refresh + skills/agents sync + doctor.

## Why
`devkit migrate` was a half-command: it reconciled emitted configs but punted the husky-guards refresh back to the user ("re-run `devkit init`"). And `devkit update`'s "Next:" hint steered users into `update → migrate → migrate --apply → init` — a 4-step dance for what `devkit upgrade` does in one pass. Users kept hitting the manual path and never discovered `upgrade`.

## Changes
- Delete `cli/commands/migrate.mts`; move its logic to `cli/commands/migrate-config.mts` (`computeMigration`, unchanged) — `upgrade` imports it from there.
- Drop `migrate` from the CLI command registry (`cli/index.mts`) → `devkit migrate` reports unknown command and is absent from help.
- `devkit update`'s Next hint now points to `devkit upgrade` (was `devkit migrate`).
- README + `upgrade` help/comments reworded — `upgrade` is THE entry point; `update`/`sync-*`/`init` stay callable for scripts.

## Tests
- `migrate.test.mts` → `migrate-config.test.mts` (import repointed); `computeMigration` coverage unchanged.
- `upgrade-version-step.test.mts` mock path updated.
- biome ✓ · tsc ✓ · lint:structure ✓ · fanout ✓ · suites green; `devkit migrate` smoke-tested as unknown-command.
norvalbv added a commit that referenced this pull request Aug 7, 2026
Bump 0.48.0 -> 0.49.0 and rebuild dist from a clean origin/main worktree.

Ships the review-latency work (#360) to consumers: completeness prewarmed in
parallel with the reviewer fleet on the ship path, its PASS intent-scoped to
branch + message so a retry does not re-pay opus, the cancelled judge actually
killed and reaped, and review concurrency defaulting to 6. The ruling behind the
sticky verdict is on the record in #361.

Also drops dist/cli/commands/migrate.mjs, a stale artifact no build has produced
since #68 deleted its source (cli/commands/migrate.mts). It was force-added at
v0.33.0 and has shipped to consumers in every release since — dead code for a
command that no longer exists. Found by rebuilding dist from EMPTY and diffing
the result against the index in both directions; the release check until now
only asked whether a built file was missing from the index, never whether an
indexed file was still built.

Note for the first ship after upgrading: cacheKey salts on the devkit VERSION,
so every reviewer and completeness verdict earned under 0.48.0 is invalidated by
design (sc-1437 / #353). That first attempt re-judges from scratch; the
convergence shows up from the second attempt on.

Gates bypassed at the maintainer's request (--no-verify). Release smoke checks
ran: built bin reports 0.49.0, a from-empty rebuild is byte-identical to the
index in both directions, and all four shipped behaviours are present in dist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@norvalbv norvalbv mentioned this pull request Aug 7, 2026
norvalbv added a commit that referenced this pull request Aug 7, 2026
Bump 0.48.0 -> 0.49.0 and rebuild dist from a clean origin/main worktree.

Ships the review-latency work (#360) to consumers: completeness prewarmed in
parallel with the reviewer fleet on the ship path, its PASS intent-scoped to
branch + message so a retry does not re-pay opus, the cancelled judge actually
killed and reaped, and review concurrency defaulting to 6. The ruling behind the
sticky verdict is on the record in #361.

Also drops dist/cli/commands/migrate.mjs, a stale artifact no build has produced
since #68 deleted its source (cli/commands/migrate.mts). It was force-added at
v0.33.0 and has shipped to consumers in every release since — dead code for a
command that no longer exists. Found by rebuilding dist from EMPTY and diffing
the result against the index in both directions; the release check until now
only asked whether a built file was missing from the index, never whether an
indexed file was still built.

Note for the first ship after upgrading: cacheKey salts on the devkit VERSION,
so every reviewer and completeness verdict earned under 0.48.0 is invalidated by
design (sc-1437 / #353). That first attempt re-judges from scratch; the
convergence shows up from the second attempt on.

Gates bypassed at the maintainer's request (--no-verify). Release smoke checks
ran: built bin reports 0.49.0, a from-empty rebuild is byte-identical to the
index in both directions, and all four shipped behaviours are present in dist.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants