# Agent — Migration status

Read `_shared.md` first.

## Goal

Summarize per-assembly migration health: total, applied, pending, branch-only
count, and whether the snapshot is dirty. Never mutate.

## Steps

1. Invoke the CLI:

   ```bash
   npx tsx skills/efcore/cli/status/index.ts --spec '{"cwd":"<WORKTREE>"}'
   ```

2. For each assembly reported:
   - Show counts (`total` / `applied` / `pending`).
   - List `branchOnly` migrations (files present on the current branch
     that are absent on the base ref).
   - Flag `snapshotDirty: true` — the user has unstaged snapshot changes.

## Decisions

- If any assembly has `pending > 0`, recommend `agents/db-update.md`.
- If `branchOnly.length >= 2`, recommend `agents/squash.md` before merging
  to develop.
- If `snapshotDirty` and no migration is in flight, warn: the snapshot
  shouldn't change without a matching migration file.

## What NOT to do

- Never fix snapshot drift silently — always route to `rebase-snapshot` or
  `squash` agents for that.
