بنقرة واحدة
migrate-repo
Migrate a repo from docs/history.md + docs/todo.md to GitHub Issues with canary gates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Migrate a repo from docs/history.md + docs/todo.md to GitHub Issues with canary gates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Conduct a decision-tree interview with the user to lock in requirements, motivation, scope, and non-goals before planning.
Stage 3 of three-stage planning pipeline. Produce a file-level implementation plan via detail-planner/detail-reviewer loop, then get user approval. Inputs are confirmed intent (<session-id>-intent.md) and outline (<session-id>-outline.md) from prior stages.
Edit source code for the current task. Delegates editing and lint/typecheck/self-repair to a subagent.
Plan and write test cases with high reasoning effort. Test iteration runs in a subagent to minimize confirmations.
Explore the codebase to understand existing patterns, constraints, and relevant files before planning.
Investigate git history, docs/history.md, and GitHub issue/PR timeline since the relevant issue opened, to surface changes that may invalidate the issue's premises.
| name | migrate-repo |
| description | Migrate a repo from docs/history.md + docs/todo.md to GitHub Issues with canary gates. |
| user-invocable | true |
Always run --dry-run first.
gh issue create consumes monotonically increasing global issue numbers; they can never be reused, freed, or reassigned. Every canary stage is irreversible.yes into the orchestrator, never run two stages in one command.AskUserQuestion is the only gate between stages — never invoke orchestrate.sh inside a pipeline that supplies stdin.gh auth status — confirm project scope is active.AGENTS_CONFIG_DIR must be set.bin/github-issues/bootstrap-labels.sh.MR-1. Get the migration target path from the user.
REPO_PATH from a path mentioned only as documentation / reference / context — accept only the path the user explicitly designates as the target.REPO_PATH to an absolute path, then AskUserQuestion: "Migration target = <abs path> — correct? (confirm this is NOT the agents repo itself)"
REPO_PATH, repeat MR-1MR-2. Preview + capture the snapshot.
eval "$(bash "$AGENTS_CONFIG_DIR/skills/migrate-repo/scripts/preview-and-capture.sh" "$REPO_PATH")" — runs the dry-run, mirrors it to stderr, and exports MIGRATE_ACK_UP_TO_ISSUE_N + MIGRATE_ACK_SELF_COUNT_AT_ACK.MIGRATE_SELF_REPO_DETECTED:
=1 → AskUserQuestion: "WARNING: target (<REPO_PATH>) is the agents repo itself. Proceed ONLY for an intentional agents-repo Phase 3 self-migration."
=0 → MR-3MR-3. Dry-run review gate. AskUserQuestion: "Dry-run reviewed — proceed to History canary 1, or abort?"
Each stage below runs as its own command, formed as <ACK> <BASE> <stage args>:
<ACK> = MIGRATE_ACK_EXISTING_ISSUES=1 MIGRATE_ACK_UP_TO_ISSUE_N="$MIGRATE_ACK_UP_TO_ISSUE_N" MIGRATE_ACK_SELF_COUNT_AT_ACK="$MIGRATE_ACK_SELF_COUNT_AT_ACK"<BASE> = bash "$AGENTS_CONFIG_DIR/bin/github-issues/migration/orchestrate.sh" "$REPO_PATH"Gate (only where the table says "gate"): after the stage's issues appear at the printed URL, AskUserQuestion "proceed / abort".
| Step | Stage | <stage args> | After stage |
|---|---|---|---|
| MR-4 | History canary 1 | --from-step 1 --stage canary-1 | gate → MR-5 |
| MR-5 | History canary 2 | --from-step 2 --stage canary-2 | gate → MR-6 |
| MR-6 | History full | --from-step 2 --stage full | → MR-7 (no gate) |
| MR-7 | Todo canary 1 | --from-step 3 --stage canary-1 | gate → MR-8 |
| MR-8 | Todo canary 2 | --from-step 3 --stage canary-2 | gate → MR-9 |
| MR-9 | Todo full | --from-step 3 --stage full | → MR-10 (no gate) |
| MR-10 | Steps 4–6 | --from-step 4 (continuous; no --stage) | done |
MR-10 note: Step 6 stages the allowlist (.github/labels.yml, .github/ISSUE_TEMPLATE/, .gitignore, docs/todo.md), commits chore(migration): apply /migrate-repo Step 1/3 artifacts, and pushes to origin. When docs/ is a symlink to an external git repo, the docs entries are committed to the symlink-target repo in a separate commit.
Resume in a new session:
preview-and-capture.sh) for a fresh snapshot pair — accounts for issues already migrated.<ACK> <BASE> <stage args>) with the freshly captured snapshot vars.If docs/history/ filenames sort in the wrong chronological order (e.g. legacy-*.md mixed with 2026-*.md), pass the order explicitly with --history-files — comma-separated, relative to docs/history/; include the current docs/history.md as ../history.md. Example: orchestrate.sh "$REPO_PATH" --dry-run --history-files "legacy.md,legacy-agents.md,2026-agents.md,2026.md".
history.md is already migrated → Step 2 skipped (idempotency). Steps 3–6 run.