[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71TQBJK0P61W4W8M91QN7HA":3,"skill-same:01M71TQBJK0P61W4W8M91QN7HA":57},{"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":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M71TQBJK0P61W4W8M91QN7HA","spec-migration",null,"Use when a change renames, replaces, deprecates, removes or tightens a field users write under .agnostic-ai\u002F or in agnostic-ai.yaml","Chemaclass\u002Fagnostic-ai","Chemaclass","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5256287?v=4","01M71TPD2XMBHAF2EVENMQ17YB","Jose M. Valera Reales","01M71TPD3Z8Q56NDPTEPGQ2JC7",27,"MIT","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002F.agnostic-ai\u002Fskills\u002Fspec-migration\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27],"spec","migration","spec migration","change","yaml","write","use","users","when","2026-11-10 13:02:02",false,"---\nname: spec-migration\ndescription: \"Use when a change renames, replaces, deprecates, removes or tightens a field users write under .agnostic-ai\u002F or in agnostic-ai.yaml\"\n---\n\n# spec-migration\n\nA spec migration rewrites a user's old spec form into the new one without changing what sync writes. `agnostic-ai migrate` runs every pending migration from one registry, `specMigrations` in `internal\u002Fcli\u002Fmigrate.go`. Automate rewrites that preserve meaning; explain manual steps for ambiguous forms.\n\n## When a change needs one\n\nAsk this for every change to a spec kind, a frontmatter field, a YAML key, or `agnostic-ai.yaml`:\n\n| The change | What to ship |\n| --- | --- |\n| Renames a field, or adds a new form that some or all entries map to one to one | A migration and a lint warning on the old form; the old form stays accepted |\n| Deprecates a form that no entry maps to one to one | No migration: a lint warning that explains the manual rewrite |\n| Adds a new optional field | Nothing |\n| Rejects specs that used to load, where a rewrite that keeps their meaning makes them load again | A migration, plus a lint warning at least one release before the rejection |\n| Changes a form's meaning or default | Not a migration: a behavior change with a CHANGELOG entry and a lint warning at least one release ahead |\n| Removes a form | Only in a breaking release, after its migration shipped, no earlier than the migration's issue allows |\n| A style preference with no change in meaning or output | Nothing, or a lint note. Never a migration |\n\nWhile the project is 0.x, a breaking release is a minor release whose CHANGELOG has a breaking section.\n\n## Rules\n\n1. **Output stays the same.** `sync`, then `migrate`, then `sync --check` exits 0 for every target the spec already reached. The only exceptions are the ones the migration's issue names, such as a spec reaching new targets (which `sync` then lists) or a literal secret becoming a reference. Any other change to a synced file is not a migration.\n2. **Old form keeps working until its removal release.** That release replaces it with an error that names the migration to run with the last version that has it. The migration and its fixture stay until then.\n3. **Safe to run twice, and stateless.** A migration detects its own old form. Running it twice changes nothing. The release it records is metadata only.\n4. **Map one to one or skip.** Entries that do not map stay as written with a one-line reason that `migrate` reports. A spec that sets both the old and the new form is a skip, never a merge.\n5. **Touch only what you own.** Edit through the shared editor in `internal\u002Fcli\u002Fmigrate_yaml.go`: `rewriteTopLevelYAMLKeys` for a YAML spec, `rewriteFrontmatterKeys` for Markdown frontmatter. Comments, key order, quoting, and bodies stay as written. The registry writes atomically and keeps the file mode.\n6. **Never expose a secret.** Diffs, skip reasons, and errors show values of `env`, `headers`, URLs, and args as references or `\u003Credacted>`; `redactMigrationLines` does this for every migration. A migration never turns a reference into a literal and never moves a value into another file or into the global home.\n7. **Stay inside the spec roots.** The registry resolves each change's real path. A file outside the permitted roots becomes a skip. Packs are excluded even when stored inside the project; a pack entry or symlink into a pack becomes a skip naming that pack. Skip a pack layer's entry in `Plan` with `packSkip`.\n8. **Import writes the new form.** A project that starts after the change never needs the migration.\n\n## Steps\n\n1. Name the migration `\u003Cgroup>-\u003Cwhat>`, where `\u003Cgroup>` is the name `migrate --only` takes, such as `hooks-portable-events`. Record the next release version, the one the CHANGELOG's Unreleased section will become, as the one that adds it.\n2. Write the fixture first, as a project under `internal\u002Fcli\u002Ftestdata\u002Fmigrate\u002F\u003Cid>\u002F`, and as a global home under `internal\u002Fcli\u002Ftestdata\u002Fmigrate-global\u002F\u003Cid>\u002F`: old-form specs with comments and odd formatting, both-forms and unmappable cases, and the expected rewrite. Use placeholder values such as `${TOKEN}` or `REDACTED`, never a real credential. Set `ProjectOnly` instead of a global fixture only when the global home never had the old form.\n3. Implement `Plan` in `internal\u002Fcli\u002Fmigrate_\u003Cwhat>.go`: it reads the `migrationScope` (a project, or the global home with `global` set) and returns changes plus skip reasons, and never writes. Add it to `specMigrations` in release order.\n4. Add or update the lint warning for the old form, pointing at `agnostic-ai migrate`.\n5. Make `import` write the new form and cover its round trip.\n6. Run `go test .\u002Finternal\u002Fcli -run Migrate`. The shared tests run `sync`, `migrate`, and `sync --check` on every registered migration's fixtures, project and global, then plan again to prove it is safe to run twice. These focused tests supplement the runtime gate in repository-root `docs\u002Finternal\u002Fcontributing.md`, section \"Choose checks for your change\".\n7. Document the new form first on its spec-format page, keep the old form there as an alias, and add a CHANGELOG line that says \"run `agnostic-ai migrate`\".\n8. In the PR body, state the migration ID, what it rewrites, what it skips, and the earliest release that may remove the old form.\n\n## When the editor falls short\n\nThe shared editor renames a top-level key and sets a one-line scalar value. A migration that needs more, such as rewriting a list, extends the editor in `migrate_yaml.go` with a test that keeps every other byte, rather than editing text by hand in `Plan`.\n","# spec-migration\n\nA spec migration rewrites a user's old spec form into the new one without changing what sync writes. `agnostic-ai migrate` runs every pending migration from one registry, `specMigrations` in `internal\u002Fcli\u002Fmigrate.go`. Automate rewrites that preserve meaning; explain manual steps for ambiguous forms.\n\n## When a change needs one\n\nAsk this for every change to a spec kind, a frontmatter field, a YAML key, or `agnostic-ai.yaml`:\n\n| The change | What to ship |\n| --- | --- |\n| Renames a field, or adds a new form that some or all entries map to one to one | A migration and a lint warning on the old form; the old form stays accepted |\n| Deprecates a form that no entry maps to one to one | No migration: a lint warning that explains the manual rewrite |\n| Adds a new optional field | Nothing |\n| Rejects specs that used to load, where a rewrite that keeps their meaning makes them load again | A migration, plus a lint warning at least one release before the rejection |\n| Changes a form's meaning or default | Not a migration: a behavior change with a CHANGELOG entry and a lint warning at least one release ahead |\n| Removes a form | Only in a breaking release, after its migration shipped, no earlier than the migration's issue allows |\n| A style preference with no change in meaning or output | Nothing, or a lint note. Never a migration |\n\nWhile the project is 0.x, a breaking release is a minor release whose CHANGELOG has a breaking section.\n\n## Rules\n\n1. **Output stays the same.** `sync`, then `migrate`, then `sync --check` exits 0 for every target the spec already reached. The only exceptions are the ones the migration's issue names, such as a spec reaching new targets (which `sync` then lists) or a literal secret becoming a reference. Any other change to a synced file is not a migration.\n2. **Old form keeps working until its removal release.** That release replaces it with an error that names the migration to run with the last version that has it. The migration and its fixture stay until then.\n3. **Safe to run twice, and stateless.** A migration detects its own old form. Running it twice changes nothing. The release it records is metadata only.\n4. **Map one to one or skip.** Entries that do not map stay as written with a one-line reason that `migrate` reports. A spec that sets both the old and the new form is a skip, never a merge.\n5. **Touch only what you own.** Edit through the shared editor in `internal\u002Fcli\u002Fmigrate_yaml.go`: `rewriteTopLevelYAMLKeys` for a YAML spec, `rewriteFrontmatterKeys` for Markdown frontmatter. Comments, key order, quoting, and bodies stay as written. The registry writes atomically and keeps the file mode.\n6. **Never expose a secret.** Diffs, skip reasons, and errors show values of `env`, `headers`, URLs, and args as references or `\u003Credacted>`; `redactMigrationLines` does this for every migration. A migration never turns a reference into a literal and never moves a value into another file or into the global home.\n7. **Stay inside the spec roots.** The registry resolves each change's real path. A file outside the permitted roots becomes a skip. Packs are excluded even when stored inside the project; a pack entry or symlink into a pack becomes a skip naming that pack. Skip a pack layer's entry in `Plan` with `packSkip`.\n8. **Import writes the new form.** A project that starts after the change never needs the migration.\n\n## Steps\n\n1. Name the migration `\u003Cgroup>-\u003Cwhat>`, where `\u003Cgroup>` is the name `migrate --only` takes, such as `hooks-portable-events`. Record the next release version, the one the CHANGELOG's Unreleased section will become, as the one that adds it.\n2. Write the fixture first, as a project under `internal\u002Fcli\u002Ftestdata\u002Fmigrate\u002F\u003Cid>\u002F`, and as a global home under `internal\u002Fcli\u002Ftestdata\u002Fmigrate-global\u002F\u003Cid>\u002F`: old-form specs with comments and odd formatting, both-forms and unmappable cases, and the expected rewrite. Use placeholder values such as `${TOKEN}` or `REDACTED`, never a real credential. Set `ProjectOnly` instead of a global fixture only when the global home never had the old form.\n3. Implement `Plan` in `internal\u002Fcli\u002Fmigrate_\u003Cwhat>.go`: it reads the `migrationScope` (a project, or the global home with `global` set) and returns changes plus skip reasons, and never writes. Add it to `specMigrations` in release order.\n4. Add or update the lint warning for the old form, pointing at `agnostic-ai migrate`.\n5. Make `import` write the new form and cover its round trip.\n6. Run `go test .\u002Finternal\u002Fcli -run Migrate`. The shared tests run `sync`, `migrate`, and `sync --check` on every registered migration's fixtures, project and global, then plan again to prove it is safe to run twice. These focused tests supplement the runtime gate in repository-root `docs\u002Finternal\u002Fcontributing.md`, section \"Choose checks for your change\".\n7. Document the new form first on its spec-format page, keep the old form there as an alias, and add a CHANGELOG line that says \"run `agnostic-ai migrate`\".\n8. In the PR body, state the migration ID, what it rewrites, what it skips, and the earliest release that may remove the old form.\n\n## When the editor falls short\n\nThe shared editor renames a top-level key and sets a one-line scalar value. A migration that needs more, such as rewriting a list, extends the editor in `migrate_yaml.go` with a test that keeps every other byte, rather than editing text by hand in `Plan`.\n",{"name":5,"description":7},"main","6cbd42008f8c9b6999909e832a288e3910eabe2f",".agnostic-ai\u002Fskills\u002Fspec-migration",6,"https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai","https:\u002F\u002Fagnostic-ai.org","https:\u002F\u002Fgithub.com\u002FChemaclass","https:\u002F\u002Fchemaclass.com","Software is the art of simplifying.","2026-11-15 03:01:31",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add Chemaclass\u002Fagnostic-ai --skill spec-migration",{"tool":49,"command":50},"bunx","bunx skills add Chemaclass\u002Fagnostic-ai --skill spec-migration",{"tool":52,"command":53},"pnpm","pnpm dlx skills add Chemaclass\u002Fagnostic-ai --skill spec-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002F.agnostic-ai\u002Fskills\u002Fspec-migration\u002FSKILL.md",true,[],[58,66,71,76,81,86],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":65},"01M7BAKFEK5466B7RF02J4SWQ3","reviewer","Reviews diffs.","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002Ftests\u002Fintegration\u002Ffixtures\u002Fgolden\u002Fagents-as-skills\u002Fzed\u002Freviewer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":67,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":65},"01M7BAKE9W08RAJRF0ASF0MBQR","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002Ftests\u002Fintegration\u002Ffixtures\u002Fgolden\u002Fagents-as-skills\u002Fwarp\u002Freviewer\u002FSKILL.md",[],[],{"skillNo":72,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":65},"01M7BAKD3VCR6V9P4E88GANW8G","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002Ftests\u002Fintegration\u002Ffixtures\u002Fgolden\u002Fagents-as-skills\u002Fcrush\u002Freviewer\u002FSKILL.md",[],[],{"skillNo":77,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":65},"01M7BAKC1B3TF4BE5F34BF6FC1","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002Ftests\u002Fintegration\u002Ffixtures\u002Fgolden\u002Fagents-as-skills\u002Famp\u002Freviewer\u002FSKILL.md",[],[],{"skillNo":82,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":65},"01M7BAK9QTWNSVWSQ7RH7J2N3E","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002Finternal\u002Fadapters\u002Ftestdata\u002Fagents-as-skills\u002Fzed\u002F.agents\u002Fskills\u002Freviewer\u002FSKILL.md",[],[],{"skillNo":87,"name":60,"nameZh":6,"description":61,"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":65},"01M7BAK8MFQ4519WG7PZ95BDS4","https:\u002F\u002Fgithub.com\u002FChemaclass\u002Fagnostic-ai\u002Fblob\u002Fmain\u002Finternal\u002Fadapters\u002Ftestdata\u002Fagents-as-skills\u002Fwarp\u002F.agents\u002Fskills\u002Freviewer\u002FSKILL.md",[],[]]