[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M759VJ0J85F2ACJQPG3G57BD":3,"skill-same:01M759VJ0J85F2ACJQPG3G57BD":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M759VJ0J85F2ACJQPG3G57BD","migrate-research-project",null,"Convert an existing research repo into a Research Project — scan, infer, interview, scaffold, verify. Use when a user opens a bare git repo and wants to adopt the prescribed layout without losing existing work.","harmoniqs\u002Famicode","harmoniqs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199011497?v=4","01M759PQCJ9Y093EC5HC3344DW","Harmoniqs","01M759PQD5S85W68FZKV3XD1X0",7,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Fskills\u002Fmigrate-research-project\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: migrate-research-project\ndescription: Convert an existing research repo into a Research Project — scan, infer, interview, scaffold, verify. Use when a user opens a bare git repo and wants to adopt the prescribed layout without losing existing work.\nagents: []\nsurface: public\n---\n\n# Migrate Project\n\nConvert an existing research repository into a Research Project. The agent\ndrives the entire migration — reading files, classifying content, building a\nplan, and executing approved moves. No CLI middleman for the interactive path.\n\n## When to invoke\n\n- User says \"import this as a research project,\" \"convert this repo,\"\n  \"migrate this to the project layout,\" or similar\n- User opens a git repo with research artifacts but no `research-project.toml`\n- The onset router detects a repo with optimization scripts but no manifest\n\n## Prescribed layout (target state)\n\n```\n\u003Cproject>\u002F\n  research-project.toml    # manifest (schema_version, name, slug, question, status, created)\n  README.md\n  .gitignore\n  scripts\u002F                 # all runnable code\n    experiment\u002F            # optimization solves, gate synthesis\n    analysis\u002F              # post-processing, plotting, comparison\n    testbed\u002F               # simulated gym environment, hardware-interfacing code\n  data\u002F\n    raw\u002F                   # optimization output, raw results\n    processed\u002F             # post-processed data\n    plots\u002F                 # generated figures\n  paper\u002F                   # manuscript (outline.md → main.tex)\n    outline.md\n    main.tex\n    references.bib\n    figures\u002F\n    supplementary\u002F\n  ledger\u002F\n    hypotheses\u002F            # open questions, future directions\n    observations\u002F          # experiment records, results summaries, methodology notes\n    literature\u002F            # reading notes\n    campaigns\u002F             # research campaign ledgers\n  reports\u002F\n    weekly\u002F                # weekly updates (template.md provided)\n    presentations\u002F         # slide decks\n    milestones\u002F            # quarterly \u002F grant reports\n  config\u002F                  # system model, lab config, hardware reference\n  skills\u002F                  # project-specific Amico skills\n```\n\n## The procedure\n\n### Phase 1 — Scan and classify\n\nRead the directory tree (depth 3 max). For every file and directory, read\nthe first 20–30 lines and classify it using the heuristics below. Build an\ninternal inventory before saying anything.\n\n#### Classification heuristics\n\nRead the file content — do not classify by filename alone.\n\n**Observations \u002F results** — destination: `ledger\u002Fobservations\u002F`\n- Contains fidelity numbers (`F =`, `1 - F`, `infidelity`, specific numeric results)\n- Contains data tables, benchmarks, comparison tables\n- Heading includes \"results\", \"summary\", \"verification\"\n- Reports what happened in past tense (\"achieved\", \"measured\", \"verified\")\n\n**Hypotheses \u002F future work** — destination: `ledger\u002Fhypotheses\u002F`\n- Contains \"future\", \"deferred\", \"open question\", \"TODO\", \"next steps\"\n- Lists ideas that haven't been tested yet\n- Uses speculative language (\"could\", \"might\", \"worth trying\", \"if we\")\n- References work not yet done\n\n**Methodology \u002F lessons learned** — destination: `ledger\u002Fobservations\u002F`\n- Contains \"what worked\", \"guide\", \"optimization\", \"approach\"\n- Documents parameter choices and their rationale\n- Compares approaches (\"we tried X, but Y worked better\")\n- Has lessons-learned character (\"the key insight was\")\n- These are durable records of what was learned — they go with observations\n\n**System reference \u002F hardware** — destination: `config\u002F`\n- Contains Hamiltonian definitions (`$H$`, `\\hat H`, `H =`)\n- Lists hardware parameters (frequencies, anharmonicities, coupling strengths)\n- Defines the physical model, units, conventions\n- Reference material that doesn't change between experiments\n\n**Experiment scripts** — destination: `scripts\u002Fexperiment\u002F`\n- `.jl` files with `using Piccolo`, `QuantumCollocation`, `Piccolissimo`\n- Contains `solve!`, `UnitarySmoothPulseProblem`, trajectory definitions\n- The bulk of a researcher's scripts — optimization solves, gate synthesis\n\n**Analysis scripts** — destination: `scripts\u002Fanalysis\u002F`\n- `.jl` or `.py` files that load results and produce plots or tables\n- Contains `load`, `JLD2`, `CairoMakie`, `plot`, `DataFrame`\n- Post-processing, comparison, Pareto-frontier scripts\n- Distinct from experiment scripts: these read data, not produce it\n\n**Raw data \u002F run output** — destination: `data\u002Fraw\u002F`\n- `.jld2`, `.hdf5`, `.h5` files\n- Directories containing `result.toml`, `run.toml`, iteration logs\n- Named with timestamps or run IDs (e.g., `yang_sqrtx_20260825_103713\u002F`)\n\n**Plots and figures** — destination: `data\u002Fplots\u002F` or `paper\u002Ffigures\u002F`\n- `.png`, `.svg`, `.pdf` images\n- If inside a `paper\u002F` or `report\u002F` context → `paper\u002Ffigures\u002F`\n- If standalone or in a `data\u002F` context → `data\u002Fplots\u002F`\n\n**Reports** — destination: `reports\u002F`\n- Progress reports, weekly updates, preliminary reports\n- Contains dated summaries aimed at an audience (team, PI, collaborators)\n- Distinct from observations (observations record data; reports communicate it)\n\n**Literature** — destination: `ledger\u002Fliterature\u002F`\n- PDFs of referenced papers, reading notes\n- Already in `papers\u002F` or `references\u002F` → move to `ledger\u002Fliterature\u002F`\n\n**Source code** — stays as-is\n- `src\u002F`, `lib\u002F` with Julia modules, utility functions\n- Not part of the prescribed layout — the project may have its own package\n\n**Unclassifiable** — stays as-is\n- When in doubt, do NOT propose a move\n- Flag it in the plan as \"unclassified — kept in place\"\n\n#### Ambiguity rules\n\n- A file that fits two categories equally: pick the more specific one and\n  note the ambiguity in the Reason column\n- A directory with mixed content (e.g., `docs\u002F` with both results and\n  methodology): propose per-file moves, not a directory-level move\n- A file you cannot classify after reading 30 lines: mark it \"stays\" with\n  reason \"unclassified\"\n\n### Phase 2 — Infer metadata\n\nRead these sources for manifest fields — do NOT ask for what you can read:\n\n**Name** (required):\n1. First `# heading` in `README.md`\n2. Else: directory basename, title-cased\n\n**Research question** (required):\n1. Look for a line starting with \"question:\", \"research question:\", or\n   a sentence ending with `?` in the first 20 lines of `README.md`\n2. Look in `PLAN.md` for an objective or question statement\n3. If not found: you MUST ask (this is the one field that cannot be guessed)\n\n**Status** (required — infer, then confirm):\n- Only scripts exist, no data → `\"designing\"`\n- Has data\u002Fresults but no analysis → `\"running\"`\n- Has analysis, methodology docs → `\"analyzing\"`\n- Has paper draft or outline → `\"writing\"`\n- Has completed, submitted, or published paper → `\"complete\"`\n- Ambiguous → pick the furthest stage that has evidence, present your\n  reasoning, let the researcher correct\n\n**Domain pack** (optional — infer silently):\n- `using Piccolo` or `using Piccolissimo` → `quantum-control`\n- Otherwise: omit (no default)\n\n**Author** (optional — infer silently):\n- `git config user.name` in the repo, or omit\n\n### Phase 3 — Present the migration plan\n\nPresent a single markdown table covering **every** file and directory you\nfound, plus every scaffold entry that will be created. This is the plan the\nresearcher reviews.\n\nFormat:\n\n```markdown\n## Migration Plan for [name]\n\n**Inferred metadata:**\n- **Name:** [inferred]\n- **Question:** [inferred or \"I need to ask\"]\n- **Status:** [inferred] — [one sentence of reasoning]\n\n| # | Current path | → Destination | Action | Reason |\n|---|-------------|---------------|--------|--------|\n| 1 | `scripts\u002Fsingle_qubit\u002F` | `scripts\u002Fsingle_qubit\u002F` | stays | already in the right place |\n| 2 | `data\u002Fx_gate\u002F` | `data\u002Fraw\u002Fx_gate\u002F` | move | raw optimization output (.jld2 files) |\n| 3 | `docs\u002Fresults_summary.md` | `ledger\u002Fobservations\u002Fresults_summary.md` | move | fidelity numbers, verification results |\n| 4 | `docs\u002Ffuture_directions.md` | `ledger\u002Fhypotheses\u002Ffuture_directions.md` | move | deferred ideas, speculative language |\n| 5 | `docs\u002Foptimization_guide.md` | `ledger\u002Fobservations\u002Foptimization_guide.md` | move | methodology notes, \"what worked\" |\n| 6 | `docs\u002Fsystem_model.md` | `config\u002Fsystem_model.md` | move | Hamiltonian, hardware params |\n| 7 | `report\u002F` | `reports\u002F` | rename | singular → plural to match layout |\n| 8 | `src\u002F` | `src\u002F` | stays | Julia modules, outside prescribed layout |\n| 9 | `papers\u002Fyang_2020.pdf` | `papers\u002Fyang_2020.pdf` | stays | literature, keep as-is |\n| 10 | `Project.toml` | `Project.toml` | stays | Julia package manifest |\n| — | `paper\u002Foutline.md` | — | scaffold | template with inferred question |\n| — | `paper\u002Fmain.tex` | — | scaffold | minimal article template |\n| — | `ledger\u002Fcampaigns\u002F` | — | scaffold | empty, for research |\n| — | `reports\u002Fweekly\u002Ftemplate.md` | — | scaffold | weekly update template |\n| — | `config\u002Fsystem.toml` | — | scaffold | stub |\n| — | `research-project.toml` | — | scaffold | manifest |\n```\n\nThen ask ONE question:\n\n> \"Here's my migration plan. Review the table — tell me which moves to\n> change, skip, or redirect, and I'll adjust. Or say 'looks good' to\n> proceed.\"\n\nIf the researcher requests changes, **update the plan table and re-present\nit** — do not execute a partial plan. Iterate until they approve.\n\n### Phase 4 — Execute\n\nOnce the researcher approves the plan, execute it in this order:\n\n1. **Create scaffold directories** — `mkdir -p` for every \"scaffold\" row\n2. **Move files** — for each \"move\" row:\n   - `mkdir -p` the destination's parent directory\n   - If the file is git-tracked: `git mv \u003Csrc> \u003Cdst>`\n   - If untracked: `mv \u003Csrc> \u003Cdst>`\n3. **Rename directories** — for each \"rename\" row:\n   - If git-tracked: `git mv \u003Cold> \u003Cnew>`\n   - If untracked: `mv \u003Cold> \u003Cnew>`\n4. **Write scaffold files** — write `research-project.toml`, `README.md`\n   (only if none exists), `paper\u002Foutline.md`, `paper\u002Fmain.tex`,\n   `reports\u002Fweekly\u002Ftemplate.md`, config stubs, `.gitignore` files.\n   **Never overwrite an existing file.**\n5. **Write `research-project.toml`** directly — use the schema from the\n   entity slice:\n   ```toml\n   schema_version = 1\n   name = \"\u003Cfrom plan>\"\n   slug = \"\u003Ckebab-case of name>\"\n   question = \"\u003Cfrom plan>\"\n   status = \"\u003Cfrom plan>\"\n   created = \"\u003Ctoday YYYY-MM-DD>\"\n   ```\n6. **Commit** — one commit with a descriptive message:\n   ```\n   feat: migrate to research project layout\n\n   Moved:\n   - docs\u002Fresults_summary.md → ledger\u002Fobservations\u002F\n   - docs\u002Ffuture_directions.md → ledger\u002Fhypotheses\u002F\n   - ...\n   Scaffolded: paper\u002F, ledger\u002F, reports\u002F, config\u002F, skills\u002F\n   ```\n\n### Phase 5 — Verify and orient\n\nAfter execution, show the researcher:\n\n1. **What moved** — list each move with old → new path\n2. **What was created** — list scaffolded directories and files\n3. **What stayed** — confirm nothing was overwritten or lost\n4. **Empty directories cleaned** — if a directory (e.g., `docs\u002F`) is now\n   empty after all its files were moved out, note it: \"docs\u002F is now empty —\n   you can remove it or keep it\"\n5. **Next steps** — suggest 1–2 concrete actions:\n   - \"Review `paper\u002Foutline.md` — fill in your outline sections and the\n     paper-writer skill can help format it\"\n   - \"Your weekly report template is at `reports\u002Fweekly\u002Ftemplate.md`\"\n   - \"Add this folder to your VS Code workspace to get project-aware skills\"\n\n### Phase 6 — Environment binding (optional)\n\nAfter verification, check the environment registry (`~\u002F.amico\u002Fenvironments.toml`).\nIf it has registered environments, ask the researcher whether to bind this\nproject to one.\n\nRead the registry and present a choice via the `question` tool:\n\n- One option per registered environment (label = environment name,\n  description = slug and path)\n- \"Create new\" — create a new environment inline (see below)\n- \"Skip\" — no environment binding\n\n**If the user selects a registered environment:** write the `[environment]`\nsection directly to `research-project.toml` using string append (matching the\nmigrate skill's existing direct-write pattern — no CLI call):\n\n```toml\n\n[environment]\nslug = \"\u003Cselected-slug>\"\n```\n\nAppend this to the end of the file. This preserves all existing content\n(comments, formatting) from the manifest written in Phase 4.\n\nThen commit: `git add research-project.toml && git commit -m \"bind to environment \u003Cslug>\"`\n\n**If the user selects \"Create new\":** run the environment creation interview\n**inline in this chat** — do NOT spawn a new session. Walk through the\n`create-research-environment` skill's 6 stages right here:\n\n1. Ask for the environment name (default: infer from the project's domain)\n2. System\u002Fdomain (optional)\n3. Research field (optional)\n4. Description (optional)\n5. Tags (optional)\n6. GitHub remote (optional)\n\nThen run `amico env create \"\u003Cname>\" --path \"\u003Cdir>\" [flags]` where `\u003Cdir>` is a\nsibling directory to the project (default: `..\u002F\u003Cslug>` next to the project\ndir). After creation, bind the project by appending the `[environment]` section\nto `research-project.toml` (same as above) and commit.\n\n**If the user selects \"Skip\":** no action needed. The project can be bound\nlater via Command Palette (\"Amicode: Bind to Environment\") or `amico env bind`.\n\nIf the registry is empty or missing, skip this phase silently — there are no\nenvironments to bind to.\n\n## Edge cases\n\n**Already a Research Project** (`research-project.toml` exists):\nSay so. Offer to re-scan and scaffold any missing directories, or to\nre-classify content that's in the wrong place.\n\n**Monorepo \u002F multi-project directory:**\nIf the root has multiple independent research directories, ask which one to\nmigrate. Do not migrate the root.\n\n**No git:**\nWarn the researcher. Offer to `git init` before migrating (so moves get\nhistory). If they decline, use plain `mv` for everything.\n\n**Mixed-content directories:**\nWhen a directory like `docs\u002F` has files that belong in different places,\npropose per-file moves in the plan table — never move the whole directory.\n\n**Name collision on move:**\nIf a destination file already exists (e.g., the researcher already has\n`ledger\u002Fobservations\u002Foptimization_guide.md`), flag it in the plan: \"destination exists\n— skip or overwrite?\" Default: skip.\n\n**Large data directories:**\nDon't read inside directories with 50+ files — classify by the directory\nname and a sample of 3 filenames. Note: \"sampled, not fully read.\"\n\n## What this skill is NOT\n\n- Not for greenfield projects (use `amico project create` for new work)\n- Not a data migration tool (no cross-machine, no format conversion)\n- Not the paper-writer (invoke that after migration if the researcher wants\n  to start writing)\n- Not a renaming enforcer — if the researcher says \"keep `docs\u002F` as is,\"\n  respect that unconditionally\n","# Migrate Project\n\nConvert an existing research repository into a Research Project. The agent\ndrives the entire migration — reading files, classifying content, building a\nplan, and executing approved moves. No CLI middleman for the interactive path.\n\n## When to invoke\n\n- User says \"import this as a research project,\" \"convert this repo,\"\n  \"migrate this to the project layout,\" or similar\n- User opens a git repo with research artifacts but no `research-project.toml`\n- The onset router detects a repo with optimization scripts but no manifest\n\n## Prescribed layout (target state)\n\n```\n\u003Cproject>\u002F\n  research-project.toml    # manifest (schema_version, name, slug, question, status, created)\n  README.md\n  .gitignore\n  scripts\u002F                 # all runnable code\n    experiment\u002F            # optimization solves, gate synthesis\n    analysis\u002F              # post-processing, plotting, comparison\n    testbed\u002F               # simulated gym environment, hardware-interfacing code\n  data\u002F\n    raw\u002F                   # optimization output, raw results\n    processed\u002F             # post-processed data\n    plots\u002F                 # generated figures\n  paper\u002F                   # manuscript (outline.md → main.tex)\n    outline.md\n    main.tex\n    references.bib\n    figures\u002F\n    supplementary\u002F\n  ledger\u002F\n    hypotheses\u002F            # open questions, future directions\n    observations\u002F          # experiment records, results summaries, methodology notes\n    literature\u002F            # reading notes\n    campaigns\u002F             # research campaign ledgers\n  reports\u002F\n    weekly\u002F                # weekly updates (template.md provided)\n    presentations\u002F         # slide decks\n    milestones\u002F            # quarterly \u002F grant reports\n  config\u002F                  # system model, lab config, hardware reference\n  skills\u002F                  # project-specific Amico skills\n```\n\n## The procedure\n\n### Phase 1 — Scan and classify\n\nRead the directory tree (depth 3 max). For every file and directory, read\nthe first 20–30 lines and classify it using the heuristics below. Build an\ninternal inventory before saying anything.\n\n#### Classification heuristics\n\nRead the file content — do not classify by filename alone.\n\n**Observations \u002F results** — destination: `ledger\u002Fobservations\u002F`\n- Contains fidelity numbers (`F =`, `1 - F`, `infidelity`, specific numeric results)\n- Contains data tables, benchmarks, comparison tables\n- Heading includes \"results\", \"summary\", \"verification\"\n- Reports what happened in past tense (\"achieved\", \"measured\", \"verified\")\n\n**Hypotheses \u002F future work** — destination: `ledger\u002Fhypotheses\u002F`\n- Contains \"future\", \"deferred\", \"open question\", \"TODO\", \"next steps\"\n- Lists ideas that haven't been tested yet\n- Uses speculative language (\"could\", \"might\", \"worth trying\", \"if we\")\n- References work not yet done\n\n**Methodology \u002F lessons learned** — destination: `ledger\u002Fobservations\u002F`\n- Contains \"what worked\", \"guide\", \"optimization\", \"approach\"\n- Documents parameter choices and their rationale\n- Compares approaches (\"we tried X, but Y worked better\")\n- Has lessons-learned character (\"the key insight was\")\n- These are durable records of what was learned — they go with observations\n\n**System reference \u002F hardware** — destination: `config\u002F`\n- Contains Hamiltonian definitions (`$H$`, `\\hat H`, `H =`)\n- Lists hardware parameters (frequencies, anharmonicities, coupling strengths)\n- Defines the physical model, units, conventions\n- Reference material that doesn't change between experiments\n\n**Experiment scripts** — destination: `scripts\u002Fexperiment\u002F`\n- `.jl` files with `using Piccolo`, `QuantumCollocation`, `Piccolissimo`\n- Contains `solve!`, `UnitarySmoothPulseProblem`, trajectory definitions\n- The bulk of a researcher's scripts — optimization solves, gate synthesis\n\n**Analysis scripts** — destination: `scripts\u002Fanalysis\u002F`\n- `.jl` or `.py` files that load results and produce plots or tables\n- Contains `load`, `JLD2`, `CairoMakie`, `plot`, `DataFrame`\n- Post-processing, comparison, Pareto-frontier scripts\n- Distinct from experiment scripts: these read data, not produce it\n\n**Raw data \u002F run output** — destination: `data\u002Fraw\u002F`\n- `.jld2`, `.hdf5`, `.h5` files\n- Directories containing `result.toml`, `run.toml`, iteration logs\n- Named with timestamps or run IDs (e.g., `yang_sqrtx_20260825_103713\u002F`)\n\n**Plots and figures** — destination: `data\u002Fplots\u002F` or `paper\u002Ffigures\u002F`\n- `.png`, `.svg`, `.pdf` images\n- If inside a `paper\u002F` or `report\u002F` context → `paper\u002Ffigures\u002F`\n- If standalone or in a `data\u002F` context → `data\u002Fplots\u002F`\n\n**Reports** — destination: `reports\u002F`\n- Progress reports, weekly updates, preliminary reports\n- Contains dated summaries aimed at an audience (team, PI, collaborators)\n- Distinct from observations (observations record data; reports communicate it)\n\n**Literature** — destination: `ledger\u002Fliterature\u002F`\n- PDFs of referenced papers, reading notes\n- Already in `papers\u002F` or `references\u002F` → move to `ledger\u002Fliterature\u002F`\n\n**Source code** — stays as-is\n- `src\u002F`, `lib\u002F` with Julia modules, utility functions\n- Not part of the prescribed layout — the project may have its own package\n\n**Unclassifiable** — stays as-is\n- When in doubt, do NOT propose a move\n- Flag it in the plan as \"unclassified — kept in place\"\n\n#### Ambiguity rules\n\n- A file that fits two categories equally: pick the more specific one and\n  note the ambiguity in the Reason column\n- A directory with mixed content (e.g., `docs\u002F` with both results and\n  methodology): propose per-file moves, not a directory-level move\n- A file you cannot classify after reading 30 lines: mark it \"stays\" with\n  reason \"unclassified\"\n\n### Phase 2 — Infer metadata\n\nRead these sources for manifest fields — do NOT ask for what you can read:\n\n**Name** (required):\n1. First `# heading` in `README.md`\n2. Else: directory basename, title-cased\n\n**Research question** (required):\n1. Look for a line starting with \"question:\", \"research question:\", or\n   a sentence ending with `?` in the first 20 lines of `README.md`\n2. Look in `PLAN.md` for an objective or question statement\n3. If not found: you MUST ask (this is the one field that cannot be guessed)\n\n**Status** (required — infer, then confirm):\n- Only scripts exist, no data → `\"designing\"`\n- Has data\u002Fresults but no analysis → `\"running\"`\n- Has analysis, methodology docs → `\"analyzing\"`\n- Has paper draft or outline → `\"writing\"`\n- Has completed, submitted, or published paper → `\"complete\"`\n- Ambiguous → pick the furthest stage that has evidence, present your\n  reasoning, let the researcher correct\n\n**Domain pack** (optional — infer silently):\n- `using Piccolo` or `using Piccolissimo` → `quantum-control`\n- Otherwise: omit (no default)\n\n**Author** (optional — infer silently):\n- `git config user.name` in the repo, or omit\n\n### Phase 3 — Present the migration plan\n\nPresent a single markdown table covering **every** file and directory you\nfound, plus every scaffold entry that will be created. This is the plan the\nresearcher reviews.\n\nFormat:\n\n```markdown\n## Migration Plan for [name]\n\n**Inferred metadata:**\n- **Name:** [inferred]\n- **Question:** [inferred or \"I need to ask\"]\n- **Status:** [inferred] — [one sentence of reasoning]\n\n| # | Current path | → Destination | Action | Reason |\n|---|-------------|---------------|--------|--------|\n| 1 | `scripts\u002Fsingle_qubit\u002F` | `scripts\u002Fsingle_qubit\u002F` | stays | already in the right place |\n| 2 | `data\u002Fx_gate\u002F` | `data\u002Fraw\u002Fx_gate\u002F` | move | raw optimization output (.jld2 files) |\n| 3 | `docs\u002Fresults_summary.md` | `ledger\u002Fobservations\u002Fresults_summary.md` | move | fidelity numbers, verification results |\n| 4 | `docs\u002Ffuture_directions.md` | `ledger\u002Fhypotheses\u002Ffuture_directions.md` | move | deferred ideas, speculative language |\n| 5 | `docs\u002Foptimization_guide.md` | `ledger\u002Fobservations\u002Foptimization_guide.md` | move | methodology notes, \"what worked\" |\n| 6 | `docs\u002Fsystem_model.md` | `config\u002Fsystem_model.md` | move | Hamiltonian, hardware params |\n| 7 | `report\u002F` | `reports\u002F` | rename | singular → plural to match layout |\n| 8 | `src\u002F` | `src\u002F` | stays | Julia modules, outside prescribed layout |\n| 9 | `papers\u002Fyang_2020.pdf` | `papers\u002Fyang_2020.pdf` | stays | literature, keep as-is |\n| 10 | `Project.toml` | `Project.toml` | stays | Julia package manifest |\n| — | `paper\u002Foutline.md` | — | scaffold | template with inferred question |\n| — | `paper\u002Fmain.tex` | — | scaffold | minimal article template |\n| — | `ledger\u002Fcampaigns\u002F` | — | scaffold | empty, for research |\n| — | `reports\u002Fweekly\u002Ftemplate.md` | — | scaffold | weekly update template |\n| — | `config\u002Fsystem.toml` | — | scaffold | stub |\n| — | `research-project.toml` | — | scaffold | manifest |\n```\n\nThen ask ONE question:\n\n> \"Here's my migration plan. Review the table — tell me which moves to\n> change, skip, or redirect, and I'll adjust. Or say 'looks good' to\n> proceed.\"\n\nIf the researcher requests changes, **update the plan table and re-present\nit** — do not execute a partial plan. Iterate until they approve.\n\n### Phase 4 — Execute\n\nOnce the researcher approves the plan, execute it in this order:\n\n1. **Create scaffold directories** — `mkdir -p` for every \"scaffold\" row\n2. **Move files** — for each \"move\" row:\n   - `mkdir -p` the destination's parent directory\n   - If the file is git-tracked: `git mv \u003Csrc> \u003Cdst>`\n   - If untracked: `mv \u003Csrc> \u003Cdst>`\n3. **Rename directories** — for each \"rename\" row:\n   - If git-tracked: `git mv \u003Cold> \u003Cnew>`\n   - If untracked: `mv \u003Cold> \u003Cnew>`\n4. **Write scaffold files** — write `research-project.toml`, `README.md`\n   (only if none exists), `paper\u002Foutline.md`, `paper\u002Fmain.tex`,\n   `reports\u002Fweekly\u002Ftemplate.md`, config stubs, `.gitignore` files.\n   **Never overwrite an existing file.**\n5. **Write `research-project.toml`** directly — use the schema from the\n   entity slice:\n   ```toml\n   schema_version = 1\n   name = \"\u003Cfrom plan>\"\n   slug = \"\u003Ckebab-case of name>\"\n   question = \"\u003Cfrom plan>\"\n   status = \"\u003Cfrom plan>\"\n   created = \"\u003Ctoday YYYY-MM-DD>\"\n   ```\n6. **Commit** — one commit with a descriptive message:\n   ```\n   feat: migrate to research project layout\n\n   Moved:\n   - docs\u002Fresults_summary.md → ledger\u002Fobservations\u002F\n   - docs\u002Ffuture_directions.md → ledger\u002Fhypotheses\u002F\n   - ...\n   Scaffolded: paper\u002F, ledger\u002F, reports\u002F, config\u002F, skills\u002F\n   ```\n\n### Phase 5 — Verify and orient\n\nAfter execution, show the researcher:\n\n1. **What moved** — list each move with old → new path\n2. **What was created** — list scaffolded directories and files\n3. **What stayed** — confirm nothing was overwritten or lost\n4. **Empty directories cleaned** — if a directory (e.g., `docs\u002F`) is now\n   empty after all its files were moved out, note it: \"docs\u002F is now empty —\n   you can remove it or keep it\"\n5. **Next steps** — suggest 1–2 concrete actions:\n   - \"Review `paper\u002Foutline.md` — fill in your outline sections and the\n     paper-writer skill can help format it\"\n   - \"Your weekly report template is at `reports\u002Fweekly\u002Ftemplate.md`\"\n   - \"Add this folder to your VS Code workspace to get project-aware skills\"\n\n### Phase 6 — Environment binding (optional)\n\nAfter verification, check the environment registry (`~\u002F.amico\u002Fenvironments.toml`).\nIf it has registered environments, ask the researcher whether to bind this\nproject to one.\n\nRead the registry and present a choice via the `question` tool:\n\n- One option per registered environment (label = environment name,\n  description = slug and path)\n- \"Create new\" — create a new environment inline (see below)\n- \"Skip\" — no environment binding\n\n**If the user selects a registered environment:** write the `[environment]`\nsection directly to `research-project.toml` using string append (matching the\nmigrate skill's existing direct-write pattern — no CLI call):\n\n```toml\n\n[environment]\nslug = \"\u003Cselected-slug>\"\n```\n\nAppend this to the end of the file. This preserves all existing content\n(comments, formatting) from the manifest written in Phase 4.\n\nThen commit: `git add research-project.toml && git commit -m \"bind to environment \u003Cslug>\"`\n\n**If the user selects \"Create new\":** run the environment creation interview\n**inline in this chat** — do NOT spawn a new session. Walk through the\n`create-research-environment` skill's 6 stages right here:\n\n1. Ask for the environment name (default: infer from the project's domain)\n2. System\u002Fdomain (optional)\n3. Research field (optional)\n4. Description (optional)\n5. Tags (optional)\n6. GitHub remote (optional)\n\nThen run `amico env create \"\u003Cname>\" --path \"\u003Cdir>\" [flags]` where `\u003Cdir>` is a\nsibling directory to the project (default: `..\u002F\u003Cslug>` next to the project\ndir). After creation, bind the project by appending the `[environment]` section\nto `research-project.toml` (same as above) and commit.\n\n**If the user selects \"Skip\":** no action needed. The project can be bound\nlater via Command Palette (\"Amicode: Bind to Environment\") or `amico env bind`.\n\nIf the registry is empty or missing, skip this phase silently — there are no\nenvironments to bind to.\n\n## Edge cases\n\n**Already a Research Project** (`research-project.toml` exists):\nSay so. Offer to re-scan and scaffold any missing directories, or to\nre-classify content that's in the wrong place.\n\n**Monorepo \u002F multi-project directory:**\nIf the root has multiple independent research directories, ask which one to\nmigrate. Do not migrate the root.\n\n**No git:**\nWarn the researcher. Offer to `git init` before migrating (so moves get\nhistory). If they decline, use plain `mv` for everything.\n\n**Mixed-content directories:**\nWhen a directory like `docs\u002F` has files that belong in different places,\npropose per-file moves in the plan table — never move the whole directory.\n\n**Name collision on move:**\nIf a destination file already exists (e.g., the researcher already has\n`ledger\u002Fobservations\u002Foptimization_guide.md`), flag it in the plan: \"destination exists\n— skip or overwrite?\" Default: skip.\n\n**Large data directories:**\nDon't read inside directories with 50+ files — classify by the directory\nname and a sample of 3 filenames. Note: \"sampled, not fully read.\"\n\n## What this skill is NOT\n\n- Not for greenfield projects (use `amico project create` for new work)\n- Not a data migration tool (no cross-machine, no format conversion)\n- Not the paper-writer (invoke that after migration if the researcher wants\n  to start writing)\n- Not a renaming enforcer — if the researcher says \"keep `docs\u002F` as is,\"\n  respect that unconditionally\n",{"name":5,"agents":24,"surface":25,"description":7},[],"public","main","bf84fdd4c1494800695bd5881702b3118dbf98be","packages\u002Fextension\u002Fskills\u002Fmigrate-research-project",2,"https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode","https:\u002F\u002Fgithub.com\u002Fharmoniqs","harmoniqs.ai","research tools, for researchers, by reseachers","2026-11-12 14:46:24",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add harmoniqs\u002Famicode --skill migrate-research-project",{"tool":41,"command":42},"bunx","bunx skills add harmoniqs\u002Famicode --skill migrate-research-project",{"tool":44,"command":45},"pnpm","pnpm dlx skills add harmoniqs\u002Famicode --skill migrate-research-project","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Fskills\u002Fmigrate-research-project\u002FSKILL.md",true,[],[50,57,64,70,77,84],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M759XGHEQRJ1GWZTPRFF9Z1W","malformed","Frontmatter that parses as YAML but is missing the required name field.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fmalformed\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M759XDVQ1PYPMT876X8J21TQ","duplicated","Second skill carrying the duplicated frontmatter name.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fdup-two\u002FSKILL.md",[],[],{"skillNo":65,"name":59,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M759XBZYBHF38JDWSRHAC6E1","First skill carrying the duplicated frontmatter name.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fdup-one\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M759XAQBSP29BKTTXR1WF2D7","drifted","A skill whose API claims have drifted from the fixture packages.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fdrifted\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M759X8CNBPVK98C6M45D0QMB","clean","A clean skill whose every extracted claim resolves against the fixture packages.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fclean\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M759X73H6N2G0VDH8CJ5TF11","broken-paths","A skill with a broken relative link and a broken cited package path.","https:\u002F\u002Fgithub.com\u002Fharmoniqs\u002Famicode\u002Fblob\u002Fmain\u002Fpackages\u002Fextension\u002Ftest\u002Ffixtures\u002Fskill-drift\u002Fskills\u002Fbroken-paths\u002FSKILL.md",[],[]]