Plans migration playbooks
import { Aside, Steps } from ‘@astrojs/starlight/components’;
Canonical Plans live in ScrivaDB. Repository plans/**/*.{yaml,yml,json} files are optional inert replicas (YAML default on export; JSON opt-in). These playbooks are the supported operator paths after the ScrivaDB cutover (design freeze).
1. Fresh DB-native use
Section titled “1. Fresh DB-native use”No plans/ directory required.
-
Register the project if needed (
wd projects open-local .). -
Create a Plan:
Terminal window wd plan create --name feature-x --goal "ship it" \--task t1:implement --task t2:review -
Inspect and run:
Terminal window wd plan listwd plan show <plan-id>wd plan run <plan-id> --mode autopilot # or pipeline | orchestrator | manual -
Complete or archive when appropriate (
wd plan complete/wd plan archive).
2. Importing a legacy repository
Section titled “2. Importing a legacy repository”Use this once per project that still has plans/{pending,in_progress,completed,archived}/*.yaml (or flat plans/*.yaml).
-
Clone or open the repo and ensure the daemon knows the project.
-
Classify without writing:
Terminal window wd plan import-legacy --report --json -
Import into ScrivaDB (source files left untouched):
Terminal window wd plan import-legacy -
Verify:
Terminal window wd plan listwd plan show <plan-id> -
Matching content hash on re-import is a no-op (skipped). Differing hash →
conflictedwith no mutation — resolve by editing the canonical Plan (wd planupdate paths) or restoring from backup, not by re-scanning.
3. Optionally publishing a replica PR
Section titled “3. Optionally publishing a replica PR”Publish an inert YAML (default) or JSON (--format json) projection for human review. Never required for create/run. Replicas are never execution SoT; import-legacy / scan discover YAML only.
-
Ensure the Plan revision you want is in ScrivaDB (
wd plan show <id>). -
Export onto a dedicated branch and open/reuse a PR:
Terminal window wd plan sync-to-repo <plan-id> --base <integration-or-main># optional path / format:wd plan sync-to-repo <plan-id> --base main --path plans/pending/feature-x.yamlwd plan sync-to-repo <plan-id> --base main --format json -
Review the PR. Editing the exported replica does not change listing or execution.
-
Repeating the same revision/hash for the same repo/ref/path returns the prior sync result (no duplicate PR spam).
4. Recovering from a backup
Section titled “4. Recovering from a backup”Git alone cannot rebuild execution evidence. Use a Plan backup bundle.
-
On the source:
Terminal window wd plan backup export --all -o plans-backup.json -
Transfer the bundle to the destination (not via
plans/YAML alone). -
On the destination:
Terminal window wd plan backup restore plans-backup.json --dry-runwd plan backup restore plans-backup.json --on-conflict skipwd plan listwd plan show <plan-id>wd plan run <plan-id> --mode manual
Full cadence and conflict policy: Plan backup and restore.
5. Resolving an export conflict
Section titled “5. Resolving an export conflict”sync-to-repo refuses to overwrite a non-Warden file at the target path on the export branch.
- Read the structured conflict from the CLI/API/MCP response (
outcome=conflict/ error message naming the path). - Choose one:
- Different path — re-run with
--path plans/pending/<other-name>.yaml(or another free path underplans/). - Keep foreign file — leave the canonical Plan unchanged; do not force-overwrite.
- Replace after review — manually resolve on the export branch outside warden, or delete/move the conflicting file with an explicit operator commit, then re-run
sync-to-repo.
- Different path — re-run with
- Confirm the ScrivaDB Plan is intact:
wd plan show <plan-id>(revision/hash unchanged by a failed sync).
Deferred (follow-up issues)
Section titled “Deferred (follow-up issues)”Hub network transport (#586) remains deferred by design — see Plans concepts and the Phase 12 acceptance report in-repo (docs/specs/2026-09-30-scrivadb-canonical-plans-acceptance.md).
JSON export format (#585) is shipped as an opt-in inert replica (--format json); YAML remains the default. JSON files are never scan/import-legacy authority.