Skip to content

chore(skill): refresh /drt-migrate — add mirror/replace modes + post-v0.7 mappings#627

Merged
masukai merged 1 commit into
mainfrom
chore/skill-refresh-drt-migrate
Jun 9, 2026
Merged

chore(skill): refresh /drt-migrate — add mirror/replace modes + post-v0.7 mappings#627
masukai merged 1 commit into
mainfrom
chore/skill-refresh-drt-migrate

Conversation

@masukai

@masukai masukai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

/drt-migrate was last touched 2026-03-30 (#60) and had missed the sync-mode expansions that landed since. This PR catches it up.

Part 3 of the 4-PR skill refresh sequence (#625 /drt-debug, #626 /drt-init).

Drift fixed

# Feature Skill update
1 sync.mode: mirror (v0.7.7) — Census "Full Sync with Deletion" / Hightouch "Mirror" Added to concept map (postgres / mysql / clickhouse / snowflake)
2 sync.mode: replace + replace_strategy: swap Added to concept map (zero-downtime on Postgres / Snowflake)
3 failure_alerts (v0.7.0) Replaces old "Error notifications" row that pointed at on_error: skip + drt status (which is per-row, not sync-level alerting)
4 Hardcoded-secret detection (v0.7.5) Added to auth migration table — "never hardcode, drt validate flags it"
5 Connection-string profiles Added to auth migration table — ${VAR} resolution in ~/.drt/profiles.yml

New section: Sync-mode picking guide

A "user wants X, drt mode is Y" table so the LLM picks from intent rather than guessing from the old tool's vocabulary:

User wants drt mode
"Re-send everything every run" full
"Append new rows since last run" incremental + cursor_field
"Upsert by key" upsert + upsert_key
"Upsert + delete rows removed from source" mirror + upsert_key (v0.7.7+ SQL destinations)
"Overwrite the destination table each run" replace (TRUNCATE + INSERT, swap strategy for zero-downtime)

New "summary" guidance

The LLM now surfaces semantic drift explicitly — e.g. Census "Full Sync with Deletion" → mirror is the same shape; Census "Full Sync without Deletion" → full keeps stale rows in the destination, so the user may want upsert instead. Avoids silent semantic mismatches.

New Reference entry

examples/postgres_to_postgres_mirror/ — runnable example for mirror shape so the user can confirm before adopting.

Verification

  • make sync-skills — synced to .claude/commands/drt-migrate.md
  • make check-skills — clean

Sequence

  1. ✅ /drt-debug refresh — chore(skill): refresh /drt-debug — catch up to v0.7+ features (3-month gap) #625
  2. ✅ /drt-init refresh — chore(skill): refresh /drt-init — catch up to v0.7+ sources + flows (2-month gap) #626
  3. This PR — /drt-migrate refresh
  4. /drt-create-sync GCS+Azure follow-up (after feat(destinations): add Google Cloud Storage destination (csv/json/jsonl/parquet + gzip) (closes #169) #623 feat(destinations): add Azure Blob Storage destination (csv/json/jsonl/parquet + gzip) (closes #170) #624 merge)
  5. MCP refresh: drt_doctor + drt_run_sync(diff=True)

🤖 Generated with Claude Code

…v0.7 mappings

Skill was last touched 2026-03-30 (#60) and missed the sync-mode
expansions that landed since.

Drift fixed:

1. **`sync.mode: mirror`** (v0.7.7+) — Census "Full Sync with
   Deletion" / Hightouch "Mirror" equivalent, supported on
   postgres / mysql / clickhouse / snowflake. Now in the concept map.

2. **`sync.mode: replace`** + `replace_strategy: swap` (zero-downtime
   on Postgres / Snowflake) — was missing entirely from the mode
   mapping table.

3. **`failure_alerts`** (v0.7.0+) — replaces the old "Error
   notifications" row that pointed at `on_error: skip + drt status`
   (which is the per-row policy, not the sync-level alerting).

4. **Hardcoded-secret detection** (v0.7.5) — added to the auth
   migration table as "never hardcode — `drt validate` flags
   hardcoded secrets".

5. **Connection-string profiles** — added to the auth migration table
   as the equivalent for connection strings from other tools
   (resolved via `${VAR}` in `~/.drt/profiles.yml`).

New section: **sync-mode picking guide** — a "user wants X, drt mode
is Y" table so the LLM can pick the right mode from the contributor's
intent rather than guessing from the old tool's vocabulary. Covers
full / incremental / upsert / mirror / replace.

New "summary" guidance:
- Whether the migration changes semantics (Census "Full Sync with
  Deletion" → `mirror` is same shape; Census "Full Sync without
  Deletion" → `full` keeps stale rows, so user may want `upsert`
  instead) — the LLM now surfaces this distinction explicitly.

New Reference entry: `examples/postgres_to_postgres_mirror/` —
runnable example so the user can confirm the shape before adopting.

`make sync-skills` ran; `.claude/commands/drt-migrate.md` matches.
`make check-skills` clean.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@masukai masukai requested a review from yodakanohoshi June 9, 2026 12:06
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@masukai masukai merged commit 6e88645 into main Jun 9, 2026
8 checks passed
@masukai masukai deleted the chore/skill-refresh-drt-migrate branch June 9, 2026 13:22
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant