From silver-bullet
Migrates older Silver Bullet projects to current per-instance workflow tracking, Learnings terminology, agent-neutral templates, and runtime parity defaults. Run when `.planning/` has legacy artifacts or `.silver-bullet.json` is outdated.
How this skill is triggered — by the user, by Claude, or both
Slash command
/silver-bullet:silver-migrateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Migrates an older mid-milestone project to the current Silver Bullet contract:
Migrates an older mid-milestone project to the current Silver Bullet contract:
.planning/WORKFLOW.md)docs/learnings/ terminology (replaces docs/lessons/)silver-bullet.md and project instruction files.silver-bullet.json defaults from templates/silver-bullet.config.json.defaultorchestrator_mode: parent, worker templates, Cursor rule)scripts/workflows.sh and docs/workflows/*.md when absent (parity with /silver:init).gitignore entry for .planning/workflows/ (local runtime state).planning/interface/STATE.md)The legacy .planning/WORKFLOW.md file is retired. Do not create or update it.
The legacy docs/lessons/ path and "Lessons" terminology are retired. Use docs/learnings/ and "Learnings" instead.
Per-host install paths, hook manifests, and skill invocation channels are documented in docs/RUNTIME-COMPATIBILITY.md. Use the active runtime's supported file-reading, file-editing, and skill invocation mechanisms throughout this skill.
.planning/ exists with older lifecycle state artifacts.silver-bullet.md still references host-specific skill channels or pre-058 wording..silver-bullet.json lacks current config_version, release, required_release, hooks, or multi_agent defaults.orchestrator_mode is absent or not parent.scripts/workflows.sh is missing (workflow tracker / flow-advance will fail)./silver:migrate or asks to migrate workflow tracking or SB version surface..planning/STATE.md must exist.scripts/workflows.sh must be available from the project root or plugin install.PLUGIN_ROOT from this skill file's location (skills/silver-migrate/SKILL.md → two directories up from the skill directory, or the installed plugin root)..planning/workflows/*.md already contains an active workflow, report the active id and skip only the workflow-tracker migration (Step 5). Still run Steps 0–4.Run this step before workflow-tracker checks so projects with current workflow files still receive the doc migration.
If docs/lessons/ exists and docs/learnings/ does not exist, move the directory:
mv docs/lessons docs/learnings
If both directories exist, merge files conservatively:
docs/lessons/, move it to docs/learnings/.docs/lessons/ content under a ## Migrated from docs/lessons/ heading in the matching docs/learnings/ file, then remove the old file only after confirming the content is preserved.docs/lessons/ only when empty.Update documentation scheme files and checklist keys:
docs/doc-scheme.mddocs/doc-scheme.jsondocs/task-doc-checklist.jsondocs/knowledge/INDEX.mddocs/lessons/, lessons/YYYY-MM.md, "Lessons", or "lessons"Required replacements:
docs/lessons/ -> docs/learnings/lessons/YYYY-MM.md -> learnings/YYYY-MM.mdtype: lessons -> type: learningsUpdate monthly learnings files:
type: learnings.# Learnings - YYYY-MM or # Learnings — YYYY-MM.domain:{area}, stack:{technology}, practice:{area}, devops:{area}, and design:{area}.Report the documentation terminology migration separately:
docs/lessons/ files left for manual reviewsilver-bullet.mdRe-stamp from the bundled template without host-specific leaks. Silver Bullet owns this file.
Read .silver-bullet.json for project.name and project.active_workflow (default full-dev-cycle).
Back up the existing file when present:
test -f silver-bullet.md && cp silver-bullet.md silver-bullet.md.backup
Copy ${PLUGIN_ROOT}/templates/silver-bullet.md.base to silver-bullet.md and substitute:
{{PROJECT_NAME}} → project name from config or directory basename{{ACTIVE_WORKFLOW}} → active workflow from configScan the refreshed file for stale host-specific literals (for example hardcoded host skill channel names, host home paths, or Claude model names). If any remain in the stamped output, report a plugin packaging defect — the canonical template should be host-neutral per phase 058.
.silver-bullet.json to Current DefaultsMerge forward from templates/silver-bullet.config.json.default without discarding project customizations.
Run the mechanical merge when the script is available:
bash "${PLUGIN_ROOT}/scripts/sb-migrate-config.sh" 2>/dev/null || \
bash scripts/sb-migrate-config.sh
If neither script is available, merge manually:
.silver-bullet.json (create from template if absent).project.name, project.src_pattern, project.src_exclude_pattern, custom verify_commands, and user-chosen issue_tracker.config_version and version (target: current plugin release from package.json version field)orchestrator_mode → "parent" (only supported mode)release.profile, release.require_plugin_runtime_matrix, release.require_pre_release_quality_gate, release.quality_gate_state_filehooks.evidence_schema, hooks.industry_toolingdevops_plugins blocksemantic_compression blockmulti_agent blockcompactPromptskills.required_planning, skills.required_deploy, skills.required_release, skills.required_*_devops, or skills.all_tracked — union with existing lists; do not remove user-added skill namesissue_tracker value "gsd" to "local" (filing skills treat both as local markdown tracking).sb_initiated: true so enforcement hooks activate after migrate.Bring mechanical bootstrap artifacts to parity with /silver:init without overwriting user docs.
bash "${PLUGIN_ROOT}/scripts/sb-migrate-project.sh" 2>/dev/null || \
bash scripts/sb-migrate-project.sh
This script (idempotent) runs sb-migrate-config.sh, sb-migrate-orchestrator-parent.sh, copies scripts/workflows.sh when absent, creates .planning/workflows/.archive/, seeds missing docs/workflows/{full-dev-cycle,devops-cycle}.md from templates, and ensures .gitignore contains .planning/workflows/.
If the script is unavailable, perform the same steps manually:
orchestrator_mode: parent and copy ${PLUGIN_ROOT}/templates/orchestrator-workers/ → .silver-bullet/orchestrator-workers/..cursor/rules/ exists, refresh .cursor/rules/silver-orchestrator.mdc from ${PLUGIN_ROOT}/templates/cursor-rules/silver-orchestrator.mdc. (Claude/Codex hosts: skip — orchestrator uses hook directive injection.)${PLUGIN_ROOT}/scripts/workflows.sh → scripts/workflows.sh (chmod +x) when absent.mkdir -p .planning/workflows/.archive docs/workflows.${PLUGIN_ROOT}/templates/workflows/ only when the destination file is absent (back up before any explicit user-requested refresh)..planning/workflows/ to .gitignore when missing.Report what was installed vs already present.
Regenerate stale host instruction files from the init contract when they predate agent-neutral separation.
Detect the active host instruction file per docs/RUNTIME-COMPATIBILITY.md:
CLAUDE.md when presentAGENTS.md when presentDetermine staleness — refresh when any of:
## N. Session Startup, ## 3a., etc.)silver-bullet.mdsilver-bullet.mdBefore overwrite, back up: cp <file> <file>.backup
Strip SB-owned sections from the existing file (headings ## N. through next ## or EOF). Preserve all user-owned sections.
Merge in missing neutral sections from ${PLUGIN_ROOT}/templates/CLAUDE.md.base:
Ensure the reference line at top:
> **Always adhere strictly to this file and silver-bullet.md — they override all defaults.**
Do not create CLAUDE.md on Codex-only projects or AGENTS.md on Claude-only projects unless the user explicitly requests it.
Surface runtime parity expectations and refresh host hook delivery when applicable.
Run when scripts are available:
bash "${PLUGIN_ROOT}/scripts/sb-diagnostics.sh" 2>/dev/null || \
bash scripts/sb-diagnostics.sh 2>/dev/null || true
bash "${PLUGIN_ROOT}/scripts/sb-bootstrap.sh" 2>/dev/null || \
bash scripts/sb-bootstrap.sh 2>/dev/null || true
Report capability tier and any WARN/FAIL lines. Point the user to docs/RUNTIME-COMPATIBILITY.md for tier definitions and install surfaces.
Re-register SB hooks in the active host settings file (same contract as /silver:init update mode §3.7.5). Resolve INSTALL_PATH from ${SB_RUNTIME_HOME_ROOT}/plugins/installed_plugins.json when possible; fall back to PLUGIN_ROOT.
INSTALL_PATH="${INSTALL_PATH:-${PLUGIN_ROOT}}"
if [[ "${SILVER_BULLET_RUNTIME:-}" == "cursor" ]] || [[ -d "${HOME}/.cursor" && -f "${PLUGIN_ROOT}/skills/silver-init/scripts/merge-cursor-hooks.py" ]]; then
python3 "${PLUGIN_ROOT}/skills/silver-init/scripts/merge-cursor-hooks.py" "$INSTALL_PATH" 2>/dev/null || true
else
python3 "${PLUGIN_ROOT}/skills/silver-init/scripts/merge-hooks.py" "$INSTALL_PATH" 2>/dev/null || true
fi
Confirm merged entries in the host hooks manifest. If merge fails, advise the host-specific install path from docs/RUNTIME-COMPATIBILITY.md (install-claude.sh, install-codex.sh, or install-cursor.sh).
When a project-scoped host settings file exists (see docs/RUNTIME-COMPATIBILITY.md), scan for retired v1 hook references: record-skill.sh, dev-cycle-check.sh, /tmp/.wyzr-workflow-state. If found, ask the user to remove them before relying on v2 enforcement (same rule as /silver:init §1.7).
Ensure the project doc surface acknowledges parity artifacts when missing. Do not overwrite existing substantive docs — add checklist items or stub pointers only when absent:
| Artifact | Purpose | Action when missing |
|---|---|---|
docs/evidence-schema.md | Normalized finding/evidence tables for reviews and gates | Note in migration report; invoke silver:ensure-docs --bootstrap if user wants full doc scaffold |
scripts/sb-diagnostics.sh (via plugin) | Capability tier probe | Covered by Step 4.1 run |
scripts/sb-bootstrap.sh (via plugin) | Onboarding orientation | Covered by Step 4.1 run |
docs/RUNTIME-COMPATIBILITY.md (plugin-dev only) | Host parity matrix | Skip in downstream projects unless copied during init |
For downstream projects, record in the migration report which parity scripts ran and whether evidence-schema doc keys exist in docs/doc-scheme.json.
When docs/doc-scheme.json exists:
silver:ensure-docs through the active runtime's SB-recognized skill invocation channel with --bootstrap or reconciliation mode so doc-scheme.md, doc-scheme.json, and task-doc-checklist.json stay synchronized.docs/learnings/ (not docs/lessons/)docs/evidence-schema.md when the project uses SB review/release gatesdocs/RUNTIME-COMPATIBILITY.md for plugin-dev repos onlyIf docs/doc-scheme.json is absent, recommend /silver:init update mode or silver:ensure-docs --bootstrap rather than inventing a partial scheme.
When the project has UI surface signals (for example silver-ui workflow, frontend stack in manifests, or .planning/DESIGN.md):
If .planning/interface/STATE.md is absent, stamp from template:
bash "${PLUGIN_ROOT}/scripts/stamp-interface-state.sh" 2>/dev/null || \
bash scripts/stamp-interface-state.sh 2>/dev/null || true
If the stamp script is unavailable, copy ${PLUGIN_ROOT}/templates/interface/STATE.md.base to .planning/interface/STATE.md (create .planning/interface/ first).
Report whether interface state was created, already present, or skipped (non-UI project).
If an active .planning/workflows/*.md file exists, report the active id and skip to Step 8 after Steps 0–4. Workflow migration is unnecessary, but surface upgrades remain valid.
Read .planning/STATE.md to identify the current milestone, phase, and status.
Then scan for artifacts that indicate flow completion:
| Flow | Artifacts to Check | Inference Rule |
|---|---|---|
| BOOTSTRAP | .planning/PROJECT.md, .planning/ROADMAP.md, .planning/REQUIREMENTS.md, .planning/STATE.md | Complete if all four exist |
| ORIENT | .planning/intel/*.md, .planning/codebase/*.md | Complete if any exists |
| CLARIFY | .planning/CONTEXT.md, .planning/phases/*/CONTEXT.md, .planning/phases/*/*-CONTEXT.md | Complete if context exists; otherwise pending or skipped based on current phase |
| DECIDE | .planning/research/*.md, .planning/ADR-*.md, legacy docs/superpowers/specs/*.md | Complete if any exists |
| SPECIFY | .planning/SPEC.md | Complete if exists |
| PLAN | .planning/phases/*/*-PLAN.md, .planning/phases/*/PLAN.md | Complete if current phase has a plan |
| EXECUTE | .planning/phases/*/*-SUMMARY.md, .planning/phases/*/SUMMARY.md | Complete if current phase has a summary |
| REVIEW | .planning/phases/*/*-REVIEW.md, .planning/phases/*/REVIEW.md, .planning/REVIEW.md | Complete if any exists |
| SECURE | .planning/phases/*/*-SECURITY.md, .planning/phases/*/SECURITY.md, .planning/SECURITY.md | Complete if any exists |
| VERIFY | .planning/UAT.md, .planning/phases/*/*-UAT.md, .planning/phases/*/*-VERIFICATION.md, .planning/phases/*/VERIFICATION.md | Complete if any exists |
| QUALITY GATE | SB state marker silver-quality-gates | Complete if marker exists |
| SHIP | SB state markers silver-completion-audit and silver-ship (or legacy gsd-ship) | Complete when both completion-audit and ship markers exist, or legacy ship marker alone |
| DOCUMENT | silver-ensure-docs marker, legacy gsd-docs-update marker, or docs modified for current phase | Complete if evidence exists |
| RELEASE | silver-create-release marker or current version tag exists | Complete if evidence exists |
Include only flows that are relevant to the current project state. Always include the next unfinished SB lifecycle flow needed to resume safely.
Use phase artifacts for lifecycle position. Treat legacy lifecycle markers as historical evidence only; do not generate workflows that depend on external lifecycle plugins.
Resolve the workflow helper, then run its start subcommand:
SB_FLOWS="<comma-separated inferred flow list>"
if [[ -x scripts/workflows.sh ]]; then
SB_WORKFLOWS_BIN="scripts/workflows.sh"
else
SB_WORKFLOWS_BIN="$(
for root in \
"$HOME/.codex/plugins/cache/alo-labs-codex/silver-bullet/current" \
"${SB_RUNTIME_HOME_ROOT}/plugins/cache/alo-labs/silver-bullet/current" \
"$HOME/.codex/plugins/cache/alo-labs-codex/silver-bullet"/* \
"${SB_RUNTIME_HOME_ROOT}/plugins/cache/alo-labs/silver-bullet"/*; do
if [[ -x "$root/scripts/workflows.sh" ]]; then
printf "%s\n" "$root/scripts/workflows.sh"
break
fi
done
)"
fi
if [[ -z "${SB_WORKFLOWS_BIN:-}" ]]; then
echo "Silver Bullet workflow tracker not found. Run /silver:update or reinstall Silver Bullet, then retry." >&2
exit 1
fi
SB_WORKFLOW_ID=$("$SB_WORKFLOWS_BIN" start /silver:migrate "migrated legacy project state" "$SB_FLOWS")
export SB_WORKFLOW_ID
For each inferred-complete flow, mark it complete:
"$SB_WORKFLOWS_BIN" complete-flow "$SB_WORKFLOW_ID" "<flow-name>"
Leave the first uncertain or unfinished flow pending. Do not mark execution, review, security, verification, or ship complete unless the corresponding SB artifact or legacy migration evidence exists.
Report in sections:
docs/lessons/silver-bullet.md, .silver-bullet.json fields bumped, orchestrator parent surface, workflows.sh / workflow docs / gitignore, instruction file reconciliationRecommend /silver:init in update mode when hook registration or full doc bootstrap still needs a dedicated pass after migrate.
.planning/workflows/<id>.md — active per-instance workflow tracker (when Step 7 runs)silver-bullet.md from agent-neutral template.silver-bullet.json with current default fields (sb_initiated: true, orchestrator_mode: parent)scripts/workflows.sh and missing docs/workflows/*.md when absent.silver-bullet/orchestrator-workers/ and .cursor/rules/silver-orchestrator.mdc when applicable.gitignore entry for .planning/workflows/ when missingCLAUDE.md or AGENTS.md when staledocs/learnings/ — current portable learnings pathdocs/doc-scheme.md, docs/doc-scheme.json, and docs/task-doc-checklist.json when present.planning/interface/STATE.md for UI projects when absent.planning/WORKFLOW.md..planning/WORKFLOW.md exists, leave it untouched and treat it as historical evidence only..planning/STATE.md.docs/lessons/. Read legacy docs/lessons/ only as migration input.python3 scripts/render-agent-bundle.py render --agent {claude,codex,cursor} --source-root skills --dest-root agents/<agent> and bash scripts/sync-codex-package.sh after editing this file in the SB source repo.npx claudepluginhub alo-exp/silver-bullet --plugin silver-bulletGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.