Files
tsl-devkit/skills/thirdparty/ui-ux-pro-max/data/stacks/svelte.csv
T
csh 3d83740f88 Squashed 'docs/standards/playbook/' changes from c3f8137..25d895d
25d895d 🐛 fix(gitea_workflow): clean up temp repos after job steps
2bc3b11 🐛 fix(gitea_workflow): clean up temporary repo dirs in workflows
98c3f30 📝 docs(agent_rules): allow plan execution on current branch
16c7230 📝 docs(prompts): define custom verify layering
8efc4dd 🐛 fix(skills): quote commit-message description
bc8498f 🐛 fix(ci): install tomli for gitea tests
55cda3b 🐛 fix(tests): report missing toml parser clearly
c0729c7 🐛 fix(playbook): import Optional for cli compatibility
63e24bf 📦 deps(skills): sync thirdparty skills
d2f9356 🐛 fix(ci): isolate gitea workflow repos
588b81d 🐛 fix(ci): inline gitea workflow bootstrap
e0b1c3a ♻️ refactor(skills): standardize first-party skill contracts
2c5050d ♻️ refactor(skills): rename repo skills source dir
f049dfb 📦 deps(skills): drop duplicate first-party superpowers skills
234b335  feat(workflow): add superpowers planning and execution state tracking
c1702a6 📝 docs(markdown): format tracked markdown and drop stale templates
2325409 📝 docs(markdown): clarify optional markdownlint usage
214c44e 🔧 chore(markdown): add markdownlint baseline and lint fixes
a22b324 📝 docs(templates): add execution and memory-bank prompt templates
223a797 📝 docs(templates): update README for Claude Code and current features
4ac8672 📝 docs: simplify README + platform-agnostic tools + auto-create local rules
2431c9d 📝 docs: add claude_md config and use cross-platform paths
d64b248 📝 docs: fix README.md inaccuracies and add Claude Code info
c8d6bf2 🐛 fix(playbook): use relative paths in CLAUDE.md when not at project root
6518f0f  feat(playbook): auto-create CLAUDE.md with path discovery
6ec9a45  feat(skills): add skill_link symlink support + platform-agnostic prompt
9f8b6b5 📝 docs: update README and config example for Claude Code support
79cff6c 📝 docs(skills): add Claude Code platform support
452c6f5  feat(playbook): auto-inject AGENTS.md into CLAUDE.md
e1dbf3c 🐛 fix(skills): remove dual-path from commit-message skill
f3a7259 🔧 chore(ci): use prepare_repo.sh in both workflows
da08212 🔧 chore(ci): extract prepare_repo.sh and clean up workflows
7ade85e 🗑️ remove(tsl): drop syntax_book/, data/ source and build script
f94dba0 ♻️ refactor(skills): update playbook.py and tests for thirdparty/ layout
b3df412 ♻️ refactor(skills): separate thirdparty skills into thirdparty/ subdirectory
64950e7 📦 deps(skills): sync thirdparty skills
a2e3cb0  feat(playbook): add no_backup deploy controls
8609d59 🐛 fix(docs): repair reference catalog source links
956da11 🐛 fix(playbook): publish hidden ci test fixes
3f67754 📦 deps(skills): sync thirdparty skills
08ca87b 📦 deps(skills): add karpathy thirdparty sync
96b705b 📝 docs(tsl): rebuild canonical syntax and routing manual
3ed5052 📦 deps(skills): sync thirdparty skills
60108dd 📦 deps(skills): sync thirdparty skills
da85d4e 🐛 fix(thirdparty): prune nested project snapshots
a2a697e 📦 deps(skills): sync thirdparty skills
9df610a 🐛 fix(thirdparty): exclude duplicated superpowers skills
33dd5bb 🐛 fix(thirdparty): preserve optional manifest fields
91b0ea7 🐛 fix(thirdparty): preserve manifest during snapshot update
2e26f98 🔧 chore(thirdparty): generalize skills sync pipeline
5b9c1e3 📦 deps(skills): sync superpowers
2f2d34a 📝 docs(readme): normalize subtree command spacing
62db7db 🐛 fix(ci): serialize superpowers update and sync
3463223 🐛 fix(ci): use literal superpowers sync paths
48f6de8 📦 deps(skills): sync superpowers
4b23529 🔧 chore(ci): merge superpowers update and sync workflow
a56d75b 📦 deps(skills): sync superpowers
84bcefa 🔧 chore(ci): use ci[bot] commit author name
00a07e5 📦 deps(skills): sync superpowers
7b84daf 🐛 fix(templates): enforce main loop progress tracking
51373d7 🔧 chore(ci): automate superpowers sync workflow
eaaa39c 🐛 fix(ci): prevent stale superpowers sync from restoring skills block
79755c6 📦 deps(skills): sync superpowers
836d878 📦 deps(skills): sync superpowers
8216c9f 📦 deps(skills): sync superpowers
9439505 🐛 fix(playbook): address reported repo issues

git-subtree-dir: docs/standards/playbook
git-subtree-split: 25d895d8b3f56624ccfe99ad7289e9eb49e0f316
2026-05-24 13:04:14 +08:00

11 KiB

1NoCategoryGuidelineDescriptionDoDon'tCode GoodCode BadSeverityDocs URL
21ReactivityUse $: for reactive statementsAutomatic dependency tracking$: for derived valuesManual recalculation$: doubled = count * 2let doubled; count && (doubled = count * 2)Mediumhttps://svelte.dev/docs/svelte-components#script-3-$-marks-a-statement-as-reactive
32ReactivityTrigger reactivity with assignmentSvelte tracks assignments not mutationsReassign arrays/objects to trigger updateMutate without reassignmentitems = [...items, newItem]items.push(newItem)Highhttps://svelte.dev/docs/svelte-components#script-2-assignments-are-reactive
43ReactivityUse $state in Svelte 5Runes for explicit reactivitylet count = $state(0)Implicit reactivity in Svelte 5let count = $state(0)let count = 0 (Svelte 5)Mediumhttps://svelte.dev/blog/runes
54ReactivityUse $derived for computed values$derived replaces $: in Svelte 5let doubled = $derived(count * 2)$: in Svelte 5let doubled = $derived(count * 2)$: doubled = count * 2 (Svelte 5)Medium
65ReactivityUse $effect for side effects$effect replaces $: side effectsUse $effect for subscriptions$: for side effects in Svelte 5$effect(() => console.log(count))$: console.log(count) (Svelte 5)Medium
76PropsExport let for propsDeclare props with export letexport let propNameProps without exportexport let count = 0let count = 0Highhttps://svelte.dev/docs/svelte-components#script-1-export-creates-a-component-prop
87PropsUse $props in Svelte 5$props rune for prop accesslet { name } = $props()export let in Svelte 5let { name, age = 0 } = $props()export let name; export let age = 0Medium
98PropsProvide default valuesDefault props with assignmentexport let count = 0Required props without defaultsexport let count = 0export let countLow
109PropsUse spread propsPass through unknown props{...$$restProps} on elementsManual prop forwarding<button {...$$restProps}><button class={$$props.class}>Lowhttps://svelte.dev/docs/basic-markup#attributes-and-props
1110BindingsUse bind: for two-way bindingSimplified input handlingbind:value for inputson:input with manual update<input bind:value={name}><input value={name} on:input={e => name = e.target.value}>Lowhttps://svelte.dev/docs/element-directives#bind-property
1211BindingsBind to DOM elementsReference DOM nodesbind:this for element referencequerySelector in onMount<div bind:this={el}>onMount(() => el = document.querySelector())Medium
1312BindingsUse bind:group for radios/checkboxesSimplified group handlingbind:group for radio/checkbox groupsManual checked handling<input type="radio" bind:group={selected}><input type="radio" checked={selected === value}>Low
1413EventsUse on: for event handlersEvent directive syntaxon:click={handler}addEventListener in onMount<button on:click={handleClick}>onMount(() => btn.addEventListener())Mediumhttps://svelte.dev/docs/element-directives#on-eventname
1514EventsForward events with on:eventPass events to parenton:click without handlercreateEventDispatcher for DOM events<button on:click>dispatch('click', event)Low
1615EventsUse createEventDispatcherCustom component eventsdispatch for custom eventson:event for custom eventsdispatch('save', { data })on:save without dispatchMediumhttps://svelte.dev/docs/svelte#createeventdispatcher
1716LifecycleUse onMount for initializationRun code after component mountsonMount for setup and data fetchingCode in script body for side effectsonMount(() => fetchData())fetchData() in script bodyHighhttps://svelte.dev/docs/svelte#onmount
1817LifecycleReturn cleanup from onMountAutomatic cleanup on destroyReturn function from onMountSeparate onDestroy for paired cleanuponMount(() => { sub(); return unsub })onMount(sub); onDestroy(unsub)Medium
1918LifecycleUse onDestroy sparinglyOnly when onMount cleanup not possibleonDestroy for non-mount cleanuponDestroy for mount-related cleanuponDestroy for store unsubscribeonDestroy(() => clearInterval(id))Low
2019LifecycleAvoid beforeUpdate/afterUpdateUsually not neededReactive statements insteadbeforeUpdate for derived state$: if (x) doSomething()beforeUpdate(() => doSomething())Low
2120StoresUse writable for mutable stateBasic reactive storewritable for shared mutable stateLocal variables for shared stateconst count = writable(0)let count = 0 in moduleMediumhttps://svelte.dev/docs/svelte-store#writable
2221StoresUse readable for read-only stateExternal data sourcesreadable for derived/external datawritable for read-only datareadable(0, set => interval(set))writable(0) for timerLowhttps://svelte.dev/docs/svelte-store#readable
2322StoresUse derived for computed storesCombine or transform storesderived for computed valuesManual subscription for derivedderived(count, $c => $c * 2)count.subscribe(c => doubled = c * 2)Mediumhttps://svelte.dev/docs/svelte-store#derived
2423StoresUse $ prefix for auto-subscriptionAutomatic subscribe/unsubscribe$storeName in componentsManual subscription{$count}count.subscribe(c => value = c)High
2524StoresClean up custom subscriptionsUnsubscribe when component destroysReturn unsubscribe from onMountLeave subscriptions openonMount(() => store.subscribe(fn))store.subscribe(fn) in scriptHigh
2625SlotsUse slots for compositionContent projection<slot> for flexible contentProps for all content<slot>Default</slot><Component content="text"/>Mediumhttps://svelte.dev/docs/special-elements#slot
2726SlotsName slots for multiple areasMultiple content areas<slot name="header">Single slot for complex layouts<slot name="header"><slot name="footer"><slot> with complex conditionalsLow
2827SlotsCheck slot content with $$slotsConditional slot rendering$$slots.name for conditional renderingAlways render slot wrapper{#if $$slots.footer}<slot name="footer"/>{/if}<div><slot name="footer"/></div>Low
2928StylingUse scoped styles by defaultStyles scoped to component<style> for component stylesGlobal styles for component:global() only when needed<style> all globalMediumhttps://svelte.dev/docs/svelte-components#style
3029StylingUse :global() sparinglyEscape scoping when needed:global for third-party stylingGlobal for all styles:global(.external-lib)<style> without scopingMedium
3130StylingUse CSS variables for themingDynamic stylingCSS custom propertiesInline styles for themesstyle="--color: {color}"style="color: {color}"Low
3231TransitionsUse built-in transitionsSvelte transition directivestransition:fade for simple effectsManual CSS transitions<div transition:fade><div class:fade={visible}>Lowhttps://svelte.dev/docs/element-directives#transition-fn
3332TransitionsUse in: and out: separatelyDifferent enter/exit animationsin:fly out:fade for asymmetricSame transition for both<div in:fly out:fade><div transition:fly>Low
3433TransitionsAdd local modifierPrevent ancestor triggertransition:fade|localGlobal transitions for lists<div transition:slide|local><div transition:slide>Medium
3534ActionsUse actions for DOM behaviorReusable DOM logicuse:action for DOM enhancementsonMount for each usage<div use:clickOutside>onMount(() => setupClickOutside(el))Mediumhttps://svelte.dev/docs/element-directives#use-action
3635ActionsReturn update and destroyLifecycle methods for actionsReturn { update, destroy }Only initial setupreturn { update(params) {}, destroy() {} }return destroy onlyMedium
3736ActionsPass parameters to actionsConfigure action behavioruse:action={params}Hardcoded action behavior<div use:tooltip={options}><div use:tooltip>Low
3837LogicUse {#if} for conditionalsTemplate conditionals{#if} {:else if} {:else}Ternary in expressions{#if cond}...{:else}...{/if}{cond ? a : b} for complexLowhttps://svelte.dev/docs/logic-blocks#if
3938LogicUse {#each} for listsList rendering{#each} with keyMap in expression{#each items as item (item.id)}{items.map(i => `<div>${i}</div>`)}Medium
4039LogicAlways use keys in {#each}Proper list reconciliation(item.id) for unique keyIndex as key or no key{#each items as item (item.id)}{#each items as item, i (i)}High
4140LogicUse {#await} for promisesHandle async states{#await} for loading/error statesManual promise handling{#await promise}...{:then}...{:catch}{#if loading}...{#if error}Mediumhttps://svelte.dev/docs/logic-blocks#await
4241SvelteKitUse +page.svelte for routesFile-based routing+page.svelte for route componentsCustom routing setuproutes/about/+page.svelteroutes/About.svelteMediumhttps://kit.svelte.dev/docs/routing
4342SvelteKitUse +page.js for data loadingLoad data before renderload function in +page.jsonMount for data fetchingexport function load() {}onMount(() => fetchData())Highhttps://kit.svelte.dev/docs/load
4443SvelteKitUse +page.server.js for server-onlyServer-side data loading+page.server.js for sensitive data+page.js for API keys+page.server.js with DB access+page.js with DB accessHigh
4544SvelteKitUse form actionsServer-side form handling+page.server.js actionsAPI routes for formsexport const actions = { default }fetch('/api/submit')Mediumhttps://kit.svelte.dev/docs/form-actions
4645SvelteKitUse $app/stores for app state$page $navigating $updated$page for current page dataManual URL parsingimport { page } from '$app/stores'window.location.pathnameMediumhttps://kit.svelte.dev/docs/modules#$app-stores
4746PerformanceUse {#key} for forced re-renderReset component state{#key id} for fresh instanceManual destroy/create{#key item.id}<Component/>{/key}on:change={() => component = null}Lowhttps://svelte.dev/docs/logic-blocks#key
4847PerformanceAvoid unnecessary reactivityNot everything needs $:$: only for side effects$: for simple assignments$: if (x) console.log(x)$: y = x (when y = x works)Low
4948PerformanceUse immutable compiler optionSkip equality checksimmutable: true for large listsDefault for all components<svelte:options immutable/>Default without immutableLow
5049TypeScriptUse lang="ts" in scriptTypeScript support<script lang="ts">JavaScript for typed projects<script lang="ts"><script> with JSDocMediumhttps://svelte.dev/docs/typescript
5150TypeScriptType props with interfaceExplicit prop typesinterface $$Props for typesUntyped propsinterface $$Props { name: string }export let nameMedium
5251TypeScriptType events with createEventDispatcherType-safe eventscreateEventDispatcher<Events>()Untyped dispatchcreateEventDispatcher<{ save: Data }>()createEventDispatcher()Medium
5352AccessibilityUse semantic elementsProper HTML in templatesbutton nav main appropriatelydiv for everything<button on:click><div on:click>High
5453AccessibilityAdd aria to dynamic contentAccessible state changesaria-live for updatesSilent dynamic updates<div aria-live="polite">{message}</div><div>{message}</div>Medium