Skip to content

feat: add kit-parity skill to track upstream SvelteKit changes#4

Merged
SomaticIT merged 1 commit into
mainfrom
claude/svelte-remote-functions-lib-nhgm2b
Jul 14, 2026
Merged

feat: add kit-parity skill to track upstream SvelteKit changes#4
SomaticIT merged 1 commit into
mainfrom
claude/svelte-remote-functions-lib-nhgm2b

Conversation

@SomaticIT

Copy link
Copy Markdown
Contributor

What

Adds a kit-parity Claude Code skill (.claude/skills/kit-parity/) that keeps the library in sync with SvelteKit's remote-functions API over time, enforcing the CLAUDE.md parity rule: behavior must match kit unless documented in DIFFERENCES.md.

How it works

The skill walks through six gated steps:

  1. Detectfetch-upstream.sh check downloads the 26 tracked upstream files (runtime sources, spec files, form-utils, Remote* types, the remote-functions docs page) from raw.githubusercontent.com and compares content hashes against baseline.json (currently kit 2.69.3). Content hashes were chosen over commit SHAs because they only flag files that actually matter, and raw.githubusercontent.com remains reachable in sandboxed sessions where github.com/api.github.com are proxied. The kit CHANGELOG and docs provide the "why" for each change.
  2. Classify — each behavioral delta is bucketed: transport/server-only (skip), covered by a documented difference (verify the doc still holds), portable behavior (implement), or unclear → stop and ask the user with options + recommendation. New divergences are never decided silently.
  3. Diff the codebases — includes the full upstream↔local file mapping table, the list of local-only machinery (refresh_keys/refresh_all, mutation epoch, config, validation), and the port invariants (no this capture in resource factories, no unhandled rejections, .svelte.ts suffix).
  4. Port relevant tests — upstream spec → local suite mapping table; transport-only tests are noted as skipped rather than ported.
  5. Implement — with DIFFERENCES.md updated in the same commit for any divergence touched.
  6. Verify & rebaseline — check/test/build/playground, then fetch-upstream.sh baseline records the new sync point.

Contents

  • .claude/skills/kit-parity/SKILL.md — the workflow
  • .claude/skills/kit-parity/fetch-upstream.shcheck / baseline / download modes (validated: clean check exits 0; a tampered baseline correctly reports CHANGED and exits 1)
  • .claude/skills/kit-parity/baseline.json — initial baseline (kit 2.69.3, 26 file hashes)
  • CLAUDE.md — pointer to the skill under the kit-parity rule

Verification

  • Script tested in all three modes against live upstream, including a negative test (tampered hash → change detected).
  • Repo remains green on the upgraded toolchain from main: svelte-check 0 errors/0 warnings, 103/103 tests, svelte-package + publint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EJj9ab3v9HjudgX8L1x821


Generated by Claude Code

Adds .claude/skills/kit-parity with a workflow for syncing with SvelteKit's
remote-functions runtime: a fetch-upstream.sh helper that hashes the 26 tracked
upstream files against a recorded baseline (kit 2.69.3), a classification step
that respects DIFFERENCES.md and asks the user about non-obvious divergences,
upstream<->local file and spec mapping tables, port invariants, and a
verify-and-rebaseline finish.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EJj9ab3v9HjudgX8L1x821
@SomaticIT
SomaticIT merged commit dd2baef into main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants