一键导入
beads-check-dolt-migration
Detect whether a beads repository needs classic-to-Dolt migration or an in-place Dolt schema upgrade.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Detect whether a beads repository needs classic-to-Dolt migration or an in-place Dolt schema upgrade.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Query an independent peer or a configurable local/OpenRouter review panel, with distinct quorum and evidence-backed consensus interpretation policies.
Safely coordinate bounded delegation while preserving observable outcome and acceptance-evidence pairs through one-writer execution, independent review, and parent validation. Explicit invocation only.
Migrate beads from classic SQLite/JSONL to Dolt, or safely upgrade an existing Dolt schema after a bd upgrade.
Read-only current-session and UTC-week token telemetry dashboard for Pi, Claude Code, Codex, and optional OpenRouter management analytics.
Read-only audit of Pi routing and configured second-opinion panel model IDs against the active Pi catalog and public live model metadata; reports when Pi or configured models merit review without editing config.
Browse handoff files saved by /wrap-up and pick one to resume. Lists this repo's handoffs in full (including ones whose worktree has been pruned) and summarises other repos by count. Companion to /wrap-up and /landscape.
| name | beads-check-dolt-migration |
| description | Detect whether a beads repository needs classic-to-Dolt migration or an in-place Dolt schema upgrade. |
| allowed-tools | Read,Bash(bd:*),Bash(git:*),Bash(ls:*),Bash(test:*),Bash(cat:*) |
| model-tier | economy |
| model | haiku |
| effort | medium |
| version | 1.1.0 |
| author | flurdy |
Read-only detection of whether a repository needs classic-to-Dolt migration, a Dolt schema upgrade, or no action. Reports the current state without changing files, databases, remotes, or Git state.
/beads-migrate-to-doltbd, especially across a minor or major versionbd reports pending schema migrations or a remote migration gatebd commands fail and the storage format or schema may be stalels -la .beads/ 2>/dev/null
If no .beads/ directory exists, report "No beads installation found" and stop.
On-disk inspection is authoritative:
# Classic format indicators
test -f .beads/beads.db && echo "FOUND: SQLite database"
test -f .beads/issues.jsonl && echo "FOUND: JSONL issues file"
# Dolt format indicators
test -d .beads/dolt && echo "FOUND: server-mode Dolt directory"
test -d .beads/embeddeddolt && echo "FOUND: legacy embedded-Dolt directory"
test -f .beads/metadata.json && cat .beads/metadata.json
issues.jsonl is not proof of classic storage: modern bd can export JSONL for interchange while Dolt remains authoritative.
cat .beads/config.yaml 2>/dev/null
git worktree list 2>/dev/null
For a Dolt repository also run:
bd dolt status 2>&1 || true
bd dolt remote list 2>&1 || true
bd config get no-push 2>&1 || true
Look for:
sync.remote or sync.branch in config.git/beads-worktrees/ from the classic sync mechanismbd --version 2>/dev/null
bd migrate --inspect --json 2>&1 || true
Treat the inspection output as diagnostic even when it exits non-zero. On bd 1.1+, a remote-backed database with pending migrations intentionally refuses automatic migration and returns a remote_migrate_gate. Do not bypass that gate during this read-only check.
For classic data, optionally collect the legacy diagnostic too:
bd doctor --migration=pre 2>&1 || true
Do not trust bd doctor to classify storage: newer versions may inspect configured defaults rather than the files on disk, and embedded mode may not support it.
| State | Indicators | Recommendation |
|---|---|---|
| Classic | beads.db exists, no Dolt directory | Full migration needed |
| JSONL-only | issues.jsonl exists, no SQLite or Dolt directory | Initialize Dolt and import |
| Dolt, current | Dolt directory exists, bd migrate --inspect reports no pending migrations | No migration needed |
| Dolt, pending (local-only) | Inspection reports pending migrations and no Dolt remote | Back up, then run the schema-upgrade path |
| Dolt, pending (remote-backed) | Inspection returns remote_migrate_gate | Choose exactly one designated clone to migrate and push; every other clone must adopt with bd bootstrap |
| Partial/broken Dolt | Dolt directory exists but bd list or bd dolt status fails | Diagnose and recover from backup or bootstrap; do not destroy data automatically |
| No beads | No .beads/ directory | Run bd init only if the repo should use beads |
Include in the report:
no-push is enabled and will require a one-command approved overrideremote_migrate_gate and its two choicesWhen bd 1.1+ reports pending schema migrations on a database with a remote:
BD_ALLOW_REMOTE_MIGRATE=1 during this check.BD_ALLOW_REMOTE_MIGRATE=1 bd migrate, verifies, then pushes.bd dolt push.bd bootstrap to adopt the published schema. They must not migrate independently because that forks schema history.bd doctor versions.