Skip to content
cccskills
FreePublished on GitHub

upgrade-svelte

Upgrade the Svelte submodule to the latest (or specified) version, regenerate fixtures, identify test failures, and fix all regressions until tests pass 100%.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md5.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Upgrade Svelte Submodule

Upgrade submodules/svelte, regenerate fixtures, and fix every regression until the compatibility report is 100%.

Phase 1: Upgrade   → checkout tag, build compiler, regenerate fixtures (script)
Phase 2: Assess    → read the compatibility report, group failures by cause
Phase 3: Fix       → one category at a time, one commit per fix
Phase 4: Validate  → full report, cargo test --release, docs, commit

Phase 1: Upgrade

1.1 Pick the version

Use $ARGUMENTS if given (e.g. 5.52.0). Otherwise take the latest stable svelte@* tag (skip next / rc); confirm with the user if ambiguous.

cd submodules/svelte && git fetch --tags && git tag -l 'svelte@*' --sort=-version:refname | head -5

1.2 Run the upgrade script

./scripts/dev/upgrade-svelte.sh <VERSION>

It performs, in order: submodule checkout → writes crates/rsvelte_core/svelte-version.txt → pnpm install && pnpm build in submodules/svelte/packages/svelte (compiler/index.js is gitignored, so this step is mandatory) → generate-fixtures --force → compatibility-report → update-docs → bumps apps/playground/src/lib/preview.ts and apps/playground/rsvelte-shim/compiler.mjs.

Step failsTry
pnpm installpnpm install --no-frozen-lockfile
pnpm buildNode >= 22? new build deps?
generate-fixturesSvelte's compile/test API changed — read the error

1.3 Read what changed upstream

cd submodules/svelte
git log --oneline svelte@<OLD>..svelte@<NEW> -- packages/svelte/src/compiler/
git diff --stat  svelte@<OLD>..svelte@<NEW> -- packages/svelte/src/compiler/

Also packages/svelte/CHANGELOG.md. Look for: new syntax, changed codegen output, new/removed/renamed compiler options, CSS scoping changes, new warning/error codes.

Phase 2: Assess

2.1 Read the report

COMMIT=$(git -C submodules/svelte rev-parse --short=12 HEAD)
node -e "
const r = require('./fixtures/${COMMIT}/compatibility-report.json');
const s = r.summary;
console.log('Overall: ' + s.total_passed + '/' + (s.total_tests - s.total_skipped) + ' (' + s.overall_percentage.toFixed(1) + '%)');
for (const [cat, d] of Object.entries(r.categories)) {
  const st = d.stats;
  if (st.failed || st.errors) console.log(cat + ': ' + st.passed + '/' + st.total + ' failed=' + st.failed + ' errors=' + st.errors);
}"

2.2 Categorize, then order

PatternFix in
New AST node typeparser + crates/rsvelte_core/src/ast/template.rs
Changed codegen outputtransform phase
New compiler optionCompileOptions + plumbing
New warning/error codevalidator + crates/rsvelte_core/src/error/
CSS output changed3_transform/css.rs
Renamed internal APImirror the rename

Fix order: parser → compiler errors → validator warnings → CSS → SSR → snapshot (client) → runtime (depends on everything above).

Phase 3: Fix regressions

Mirror layout: submodules/svelte/packages/svelte/src/compiler/phases/{1-parse,2-analyze,3-transform}/ → crates/rsvelte_core/src/compiler/phases/{1_parse,2_analyze,3_transform}/; errors.js / warnings.js → crates/rsvelte_core/src/error/.

For each failure:

  1. Read the reference implementation first; use the same algorithm and structure.
  2. Diff the fixture (fixtures/${COMMIT}/<category>/<sample>/…) against rsvelte's output.
  3. Implement in the mirror module. New feature: ast/template.rs → 1_parse → 2_analyze → 3_transform/client → 3_transform/server → 3_transform/css.rs if CSS-related.
  4. Changed codegen: rg "<unique output string>" submodules/svelte/packages/svelte/src/compiler/, then the same string under crates/rsvelte_core/src/compiler/.
  5. Verify: cargo test --release <test_name> -- --nocapture
  6. Commit before the next failure: cargo fmt && cargo clippy --all-targets --all-features -- -D warnings && git add -u && git commit -m "fix: <what>"

Use subagents for parallel investigation when several categories fail.

Phase 4: Validate & ship

pnpm run compatibility-report      # must be 0 failures, 0 errors in every category
cargo test --release               # runtime/ssr suites; audit_skipped re-checks the skip lists
pnpm run update-docs               # README.md + apps/playground/static/test-results.json
./scripts/bench/bench.sh --quick   # only if codegen hot paths changed

Also update AGENTS.md (Test Status table and the Svelte **vX.Y.Z** line) if numbers moved. The former USE_RSVELTE=true npx vitest step is gone: nothing in submodules/svelte reads that variable; runtime parity is the Runtime * rows of the report.

git add -A
git commit -m "chore: upgrade Svelte to <VERSION>

- Updated submodule to svelte@<VERSION>
- Regenerated all test fixtures
- Fixed N regressions: <brief list>
- Compatibility report 100%"
git push

Quick reference

cd submodules/svelte && git describe --tags --abbrev=0          # current version
./scripts/dev/upgrade-svelte.sh <VERSION>                        # automated Phase 1
pnpm run compatibility-report                                    # report → fixtures/<commit>/compatibility-report.json
cargo test --release <test_name> -- --nocapture                  # single test
pnpm run update-docs                                             # docs
cargo fmt && cargo clippy --all-targets --all-features -- -D warnings

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

PR の CI 失敗を修正し、全 CI がパスするまでプッシュ→待機→修正を繰り返す。「/ci-fix-and-verify [PR番号]」「CI直して」「CIが落ちてる」「CI修正」などの依頼時に使用。

The English summary is being prepared. Showing the original description.

baseballyama/rsvelte242Updated Oct 19, 2026

PR 提出前にコードオーナー視点でフルレビューする。WHY の理解 → 設計 → AST/基盤型 → 実装(複数 Agent の順次レビュー)の順に、各フェーズでユーザーと対話しながら指摘を修正し、品質に問題がなくなるまで繰り返す。「/full-code-review」「フルレビュー」「レビューして」などの依頼時に使用。rsvelte(公式 Svelte コンパイラの Rust ポート)専用。

The English summary is being prepared. Showing the original description.

baseballyama/rsvelte242Updated Oct 19, 2026

Rust の性能改善を「計測 → 仮説 → 変更 → 再計測」のループで地道に回すためのスキル。プロファイラの選び方、Cargo の最適化設定、データ構造・アロケーション・ハッシュ・分岐などの定石をフェーズ順に適用する。1 回 1 変更 1 計測の規律を厳守する。rsvelte 固有の既知ボトルネック(`serde_json::Value` 駆逐、`bumpalo` 導入、`Atom<'a>`、codegen 直書き)と OXC 対応表、NAPI 検証手順も §7 に収録。「Rust の性能改善」「ボトルネック調査」「プロファイル取って最適化」などの依頼で使用。

The English summary is being prepared. Showing the original description.

baseballyama/rsvelte242Updated Oct 19, 2026

Audit and clean up the repository — remove dead files, fix naming inconsistencies, update .gitignore, and ensure the repo is well-organized for OSS contributors. Does NOT modify source code logic.

The English summary is being prepared. Showing the original description.

baseballyama/rsvelte242Updated Oct 19, 2026

GitHub PR のコードレビューコメントに対応する。未 resolve のみを抽出 → 対応方針をユーザー承認 → 1 件ずつ修正+返信 → AI レビュー由来の指摘はナレッジに反映するワークフロー。「/review-response [PR番号]」「レビュー対応」「レビューに返信」などの依頼時に使用。

The English summary is being prepared. Showing the original description.

baseballyama/rsvelte242Updated Oct 19, 2026

Svelte を使う外部リポジトリ(ツール / ライブラリ / アプリ)を git submodule として取り込み、Svelte コンパイラを rsvelte に差し替えても完全に同等に動作するかを検証する。既存のサブモジュールが指定された場合は最新化したうえで再検証し、回帰があれば rsvelte 側を自動修正する。「/verify-svelte-compat <url-or-name>」で実行。

The English summary is being prepared. Showing the original description.

baseballyama/rsvelte242Updated Oct 19, 2026

See all skills by baseballyama

Report a problem with this skill