本文へ移動
cccskills
無料GitHub で公開

new-migration

Guided workflow for writing a registry migration in JellyRock when a setting key is renamed, removed, or its data shape changes. Walks docs/dev/registry-migrations.md (add a version constant, add a guarded block to the runner for the right scope in source/migrations.bs, update the code that used the old name, write a real-registry integration test, run it on hardware). Use when an existing setting changes shape; brand-new settings don't need migrations and should use /new-setting instead.

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrockスター 46(GitHub 46 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

/new-migration: a guided workflow

Wraps docs/dev/registry-migrations.md as a step-by-step. The guide is the source of truth and has the full examples; read its section for each step before doing it. Main() in source/main.bs runs the migrations before it creates the scene, so once a migration has run, the rest of the app sees only the new names.

Step 0: Confirm a migration is needed

You need one only when you change something users have already stored (the guide's list):

  • Rename a setting.
  • Change its values ("auto" and "aac" became "eac3").
  • Remove a setting, or data that now comes from the server.
  • Store it differently, such as one key split in two.

You don't need one to add a setting (use /new-setting), to change a default, or to change a label or description. If none of the triggers apply, stop.

Step 1: Pick the scope

Main() calls two runners in source/migrations.bs, in this order:

  • runGlobalMigrations() for the global JellyRock section: settings whose name starts with global.
  • runRegistryUserMigrations() for every user's section: every other setting. Inside it, reg is the user's section and section its name.

Step 2: Add a version constant

Each migration is a block guarded by a version constant, not a numbered function (the guide's step 1). At the top of source/migrations.bs, after the last constant, add one with a comment saying what changed:

' client version when homeSection settings were removed from registry (now server-authoritative via DisplayPreferences)
const HOMESECTION_CLEANUP_VERSION = "2.13.0"
  • Name it for what it does, in UPPER_SNAKE_CASE ending in _VERSION (the existing ones end in _MIGRATION_VERSION, _CLEANUP_VERSION or _REMOVAL_VERSION).
  • Its value is the release the change ships in, which must be above the version in manifest. If you're unsure which release that is, ask the user. A section already on the constant's version skips the block, so a value at or below the manifest's would never migrate users who installed that release.

Step 3: Add the block

Put it at the end of the runner for your scope, so the blocks stay in version order. It runs when the section was last used by an older version:

if isValid(lastRunVersion) and not versionChecker(lastRunVersion, MY_CHANGE_VERSION)

Copy the shape of the guide's example (AUDIO_CODEC_MIGRATION_VERSION), and follow its rules:

  • Set m.wasMigrated = true, so Main() prints the registry afterward.
  • Write only what the user had. When the old key is missing, write nothing: the default comes from settings/settings.json.
  • Delete the old key once its value is written under the new one.
  • Call reg.flush() when you wrote or deleted something, and only then.
  • Print one line for what you did and one for when nothing was needed.
  • Decide what happens when a section has both the old and the new key. The guide's example doesn't cover it, so ask the user; the test table needs the answer.
  • Make it safe to run twice: a section with no LastRunVersion runs every block, and a sideloaded build runs the user migrations at every launch.

Step 4: Update the code that used the old name

After a rename, nothing may read the old name (the guide's step 3):

  1. settings/settings.json: change the settingName.

  2. components/data/jellyfin/JellyfinUserSettings.xml: change the field's id, since a registry key with no field of the same name is never loaded.

  3. Everything else outside source/migrations.bs, docs and agent files included:

    git grep -n "<old-name>" -- source components settings tests docs .claude ':!source/migrations.bs'
    

    Leave alone what is meant to keep the old name: earlier migrations' mappings in source/migrations.bs, legacy inputs in the migration specs and mocks, and docs/user/app-settings.md, which is generated.

  4. Existing tests that start a user at an old LastRunVersion now run your block too. A spec that uses the setting for something unrelated (GlobalSettingsCleanup.spec.bs, SplashSettingRemoval.spec.bs) needs its assertions moved to the new name.

Step 5: Write the integration test

Follow the guide's Test it. The test goes in tests/source/integration/migration/, in a spec named for the migration. In short:

  • Tag the suite @tags("migration") and set m.needsRegistrySetup = true before super.setup().
  • Name each section test-<something>, unique to its test, and write serverId into it: the runner skips a section without one.
  • Call the runner on your section only: runRegistryUserMigrations([testUserId]).
  • Use a real roRegistrySection; don't mock the registry.
  • Cover the cases in the guide's table (the old key there or missing, each value changed or kept, both keys present, the version boundary, running twice, two users).
  • In SettingsMigration.spec.bs, make the "migrates all user settings from old to new names" test cover your change: add the old key, or, if an earlier migration already writes it, change that test's final assertion to the new name.

Step 6: Run it on hardware

Run npm run device:check first. The migration and registry tags keep those suites out of test:all and test:integration, and that includes every existing spec Step 4 changed (the guide's Run the tests), so run them one of two ways:

  • your spec alone: list it in your TDD config (copy bsconfig-tdd-sample.json to bsconfig-tdd.json first if you have none: unit-tests-tdd.md) and run npm run test:tdd;
  • every suite, migrations included: npm run test:complete (it records coverage, so it is slow).

Then try it with real data: sideload the last release, store the old key, sideload your build over it, and watch the console. If the probe fails, say the probe failed: a migration that builds can still fail at runtime.

Step 7: Record a non-obvious rename (optional)

If the reason for the new name isn't obvious, invoke /log decision with a slug like rename-<old>-to-<new>.

When not to use

  • A new setting: use /new-setting.
  • A changed default: update settings/settings.json; existing users keep their saved value.
  • A changed label or description: nothing in the registry changes.

Sub-agent invocation

To run it from a sub-agent, the parent passes Read .claude/skills/new-migration/SKILL.md and follow the steps for the change <rename-or-removal-description>; surface each step's diff but do not commit in the Agent prompt.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

catchup

無料

Session-start briefing: where did I leave off, what is in flight, what needs attention. One tested script reads git, the journal (followups, running work, cadences) and tracked projects and prints every fixed-threshold check that fires; JellyRock's own aggregator adds open PRs, high-engagement bugs, recent bug reports, current-branch CI, pending handoffs, open upstream-watch issues (Jellyfin releases and release candidates, Roku OS), recent ADRs, tech debt and architecture-doc staleness. Ends with one Suggested next move that hands off to /log, /done, /issue-triage, /runtime-triage, /ci-triage or /server-upgrade. Mandated by AGENTS.md's catchup-discipline rule: run at the start of any genuine new session, after a multi-day gap, or whenever you ask what the state of the world is.

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrock462026年10月26日 更新

ci-triage

無料

Diagnose a failed CI workflow run and fix it the /snag way. A tested read-only script fetches the run, reports every failed job and step with the log region around its errors (not the post-job cleanup), and classifies each against this repo's gates.tsv, printing the banner a gate carries when its obvious fix is the wrong one. Then: re-run only what is transient, reproduce locally, find the root cause, and show one decision screen; the chosen fix is built test-first and committed on a fix branch, never pushed. Use when a CI run failed on a pull request or on the default branch.

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrock462026年10月26日 更新

DEPRECATED, replaced by the `enrich` phase built into /crash-report. The old flow filed crash issues first and enriched them one by one afterward. The new flow (stage, then enrich, then file) pulls the dashboard backtrace before filing, so issues are born complete and architectural-class crashes go to their epic instead of becoming standalone issues. Do not invoke it for new work: run /crash-report and paste the backtraces during its enrich step. It stays only as a redirect; the `enrich-issue` script subcommand still exists as a legacy escape hatch for a crash issue filed before the change.

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrock462026年10月26日 更新

Process a Roku weekly crash-report CSV (or a zip holding one or more CSVs) into tracked GitHub issues and architectural-epic evidence, enriching before filing (stage, then enrich, then file). STAGE parses and filters the CSV, groups by pkg-path signature, builds each cited app version in a temporary git worktree, maps the transpiled `.brs` line back to the source `.bs` line, runs the GitHub dedup search, and writes a local worksheet where every crash starts pending; a mechanism hint (task-launch, network, other) orders which to pull first but never authorizes a file. ENRICH folds in the per-crash backtraces you paste from Roku's dashboard (a 7-day window, one click per crash, no bulk export), extracts each `&hNN` exception code, and routes every crash to a disposition (nothing files or aggregates without a backtrace): `file` (a scoped bug becomes a new per-signature [crash] issue, born enriched), `aggregate` (a known architectural class: `&h29` big-library too-many-task-threads, `&h23` render-thread execution timeouts, the `&hec` init `m.global.constants` race; upserted as one flat record comment per `file·function·line·version` onto the class epic, never a standalone issue), or `watch` (accepted noise, a spike comment only). FILE performs the GitHub writes (create, comment or reopen for scoped bugs; the epic record upsert for architectural classes) and writes a run-summary handoff. Dedup-aware and idempotent. Use when a fresh Roku crash CSV arrives (weekly). A deep dive on one crash goes to `/issue-triage <N>` after filing.

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrock462026年10月26日 更新

Draft a GitHub issue body for the JellyRock repo from a Reddit/Discord post or free-form bug report and submit it via forge.sh. Reads the YAML form templates under .github/ISSUE_TEMPLATE/ to know which fields are required, fills them by extracting from the input, asks for any missing required fields, validates the body matches the chosen template's schema, then runs forge.sh issue create with the auto-labels the template defines. Use when you have a user report (paste from anywhere) and want to formalize it into a properly-structured GitHub issue.

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrock462026年10月26日 更新

dep-major

無料

Walk a major dependency-version bump (a Renovate major PR, possibly a grouped one carrying several deps, or a package you name) through JellyRock's major-bump SOP so the judgment steps run the same way every time. Resolves each package and its from and to versions, fetches the upstream changelog/migration guide for that range, classifies the breaking changes, greps the codebase for the call sites those breaks actually hit, runs the mechanical gate that fits the dependency's type (a runtime BrightScript lib: validate, build, lint:bs, then test:unit and test:rta on a device; JS or Node tooling: test:scripts, then run the affected script; GitHub Actions: the PR's own CI plus a trace of the conditional paths CI doesn't exercise), and returns a go/no-go with any required migration surfaced (and applied on request). Majors never automerge (the org Renovate config), so this is the human-review path. Use when a Renovate major PR appears, or before bumping a dependency's major version by hand. Not for patch or minor bumps (those automerge after a soak) or for Jellyfin server releases (use /server-upgrade).

日本語の概要は準備中です。原文の説明を表示しています。

jellyrock/jellyrock462026年10月26日 更新

jellyrock のスキルをすべて見る

このスキルの問題を報告する