Skip to content

Modernize Astro and Svelte instruction files#2141

Open
GeekTrainer wants to merge 1 commit into
github:mainfrom
GeekTrainer:geektrainer/sync-upstream
Open

Modernize Astro and Svelte instruction files#2141
GeekTrainer wants to merge 1 commit into
github:mainfrom
GeekTrainer:geektrainer/sync-upstream

Conversation

@GeekTrainer

Copy link
Copy Markdown
Contributor

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.md

  • Retarget from Astro 5.x to Astro 7 (Vite 8, Rust compiler, valid-HTML requirement, compressHTML: 'jsx' default, Node 22.12+)
  • Fix outdated APIs — import Zod from astro/zod, Content Layer API for collections
  • Add current stable feature guidance: Server Islands (server:defer), Actions, Sessions
  • Remove changelog, setup-workflow, migration, deployment/ops, and recap content unrelated to code

Svelte — instructions/svelte.instructions.md

  • Clarify the file targets Svelte 5.x / SvelteKit 2.x
  • Replace legacy <svelte:component> with runes-mode dynamic components
  • Recommend $app/state over legacy $app/stores
  • Add modern APIs: attachments ({@attach}), <svelte:boundary>, function bindings
  • Document experimental await expressions and remote functions clearly as opt-in
  • Remove testing-workflow, tooling-setup, and deployment/ops content to keep the focus on code

The docs/README.instructions.md index was regenerated with npm start as required by the contributing guide.

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>
@GeekTrainer GeekTrainer requested a review from aaronpowell as a code owner June 26, 2026 22:10
Copilot AI review requested due to automatic review settings June 26, 2026 22:10
@github-actions github-actions Bot added the instructions PR touches instructions label Jun 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 3 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md guidance for Astro 7.x, including Content Layer, Server Islands, Actions, and Sessions.
  • Updated svelte.instructions.md guidance for Svelte 5.x / SvelteKit 2.x, adding modern runes-era APIs and clarifying experimental features.
  • Regenerated/updated docs/README.instructions.md entries 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() }),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

instructions PR touches instructions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants