examples-new-framework
Skill25 starsChanged 24 days agoMITView on GitHub
Add an example app for another framework (Preact, …) or a new major of one (React 20, Vite 9, …) to examples/, run the E2E tests against it, build it in CI, and mark it tested in the docs. Use when the user wants to support, test or demo a framework or version Spotnote doesn't have an example for, or when a Renovate PR brings a new major.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- docs-updateSkill
- examples-reproSkill
- examples-syncSkill
- releaseSkill
- spotnote-setupSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Use the framework's own Vite plugin, after spotnote() or before: order doesn't matter (stamping runs as order: "pre").
- Very specific: line 60
Add it to ALL in e2e/playwright.config.js (its name, dir and what the tests pick) and to the e2e matrix in .github/workflows/e2e.yml.
- Very specific: line 76
Commit as feat: <Framework> <version> example app, tested end to end (it's news for users: one more version that's tested).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add an example app
A framework version counts as "Tested" in the docs once an example app for it
passes the whole E2E suite. Every app is its own package:
examples/<framework>/<app>/, named spotnote-examples-<app>, with its own
package.json and Vite (or Astro) config. See "Examples layout" in
DEVELOPMENT.md for the apps there are, and the Vite each one runs on.
1. A new major of a framework that has apps (React 20, …)
The newest app (react19) is the one the others are copied from.
- Copy it to the new app (
react/react20), withoutnode_modules,distor.astro. Set itspackage.json:name,description, the new major. - Make it the source in
examples/sync.mjs(from), and add the old newest to itsto. Inrenovate.json, add the old newest to the apps with no major updates. - Pick its Vite: the newest, unless that leaves a Vite major with no app of
this framework family worth keeping. Keep the table in DEVELOPMENT.md and in
docs/content/docs/reference/framework-support.mdxin step.
A new Vite major (Vite 9): move the newest app of each framework onto it, and keep the Vite it leaves covered by another app.
2. A framework with no apps yet (Preact, …)
Copy the closest app and port it: Preact from react/react19.
- The same page: a
.herowith anh1, cards with anh3from a loop, the placeholderBarcomponent. The E2E tests pick these throughALLine2e/playwright.config.js. - Use the framework's own Vite plugin, after
spotnote()or before: order doesn't matter (stamping runs asorder: "pre"). - Several majors? One app each, and a family in
examples/sync.mjsif they can share their files.
Then pnpm install, start it (pnpm --filter spotnote-examples-<app> dev) and
check elements get data-spotnote and a note's prompt names the right file and
line.
3. Does Spotnote itself need a change?
- JSX:
jsxFramework()inpackage/src/index.tstells React from Solid by Vite plugin name, for the framework mark in the UI. A new JSX framework shows as "JSX" until it's added there and inFRAMEWORKS/ the icons inpackage/src/client/icons.ts. - Another file type or compiler (not JSX,
.vue,.svelteor.astro), or a new major whose compiler gives another AST: stamping is new work, a stamper inpackage/src/stamp/(seeshared.ts) added toSTAMPERSinpackage/src/index.ts. Stop and plan it with the user first. - A compiler Spotnote parses (Vue, Svelte, Astro): add the new app to its loop
in
package/test/stamp.test.js.
4. Test it
- Add it to
ALLine2e/playwright.config.js(itsname,dirand what the tests pick) and to thee2ematrix in.github/workflows/e2e.yml. E2E_APPS=<app> pnpm test:e2e, thenpnpm test:e2e: every test, in the new project too. A test that can't apply to it gets atest.skipwith the reason.- CI builds every example app and runs
node examples/sync.mjs --check: nothing to add there.
5. Docs
docs/content/docs/reference/framework-support.mdx: its row ("Tested (<fw><versions>)"), the Vite table, and a "Per framework" section if it has rules of its own.- The framework lists in
docs/content/docs/index.mdx(Works with) andpackage/README.md. DEVELOPMENT.md: the examples table.
Commit as feat: <Framework> <version> example app, tested end to end (it's
news for users: one more version that's tested).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

