Modernize Astro and Svelte instruction files#2141
Open
GeekTrainer wants to merge 1 commit into
Open
Conversation
Retarget instructions/astro.instructions.md to Astro 7 and instructions/svelte.instructions.md to Svelte 5 / SvelteKit 2, fix outdated APIs, add current stable feature guidance, and trim non-code (setup, deployment, testing-workflow, recap) content so each file focuses solely on code structure and best practices. Regenerated docs/README.instructions.md via npm start. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🔒 PR Risk Scan ResultsScanned 3 changed file(s).
✅ No matching risk patterns were detected in changed files.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates existing framework instruction files to reflect current Astro and Svelte/SvelteKit versions and trims non-code guidance, with the generated instructions index updated to match the new descriptions.
Changes:
- Updated
astro.instructions.mdguidance for Astro 7.x, including Content Layer, Server Islands, Actions, and Sessions. - Updated
svelte.instructions.mdguidance for Svelte 5.x / SvelteKit 2.x, adding modern runes-era APIs and clarifying experimental features. - Regenerated/updated
docs/README.instructions.mdentries to reflect the new instruction descriptions.
Show a summary per file
| File | Description |
|---|---|
| instructions/svelte.instructions.md | Modernizes Svelte/SvelteKit guidance (runes, new APIs, experimental callouts) and removes non-code workflow sections. |
| instructions/astro.instructions.md | Retargets to Astro 7 and adds current feature guidance (Content Layer, server features), with code-focused recommendations. |
| docs/README.instructions.md | Updates the instructions index descriptions for the modified Astro and Svelte instruction files. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Low
| - Example with Content Layer API: | ||
| - Define collections in `src/content.config.ts` with the Content Layer API | ||
| - Use built-in loaders: `glob()` for file-based content, `file()` for a single data file | ||
| - Import `z` from `astro/zod` (not from `astro:content`) and prefer top-level Zod helpers such as `z.email()` and `z.url()` |
| export const server = { | ||
| subscribe: defineAction({ | ||
| accept: 'form', | ||
| input: z.object({ email: z.email() }), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates two existing instruction files so each targets the current framework version and keeps its guidance focused solely on code — structure, best practices, and examples.
Astro —
instructions/astro.instructions.mdcompressHTML: 'jsx'default, Node 22.12+)astro/zod, Content Layer API for collectionsserver:defer), Actions, SessionsSvelte —
instructions/svelte.instructions.md<svelte:component>with runes-mode dynamic components$app/stateover legacy$app/stores{@attach}),<svelte:boundary>, function bindingsawaitexpressions and remote functions clearly as opt-inThe
docs/README.instructions.mdindex was regenerated withnpm startas required by the contributing guide.