From 938a5b545d490040031f4325ef9296216d9ef6db Mon Sep 17 00:00:00 2001 From: Pedro Camara Junior Date: Mon, 27 Jul 2026 12:01:23 +0200 Subject: [PATCH] feat(astro-builder): target Astro 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retarget the whole plugin from Astro 6 to Astro 7.1.3: docs, agents, skills, and init templates. Every disputed Astro 7 fact was verified against official sources (astro.build blog, v7 upgrade guide, CHANGELOG, npm registry). Highlights: - docs/astro-patterns.md: Astro 7 migration-notes table, updated config example (compressHTML 'jsx', markdown processor opt-out), new anti-pattern rows (removed experimental.* keys, @astrojs/db, astro:transitions internals, reserved src/fetch.ts, Rust-compiler strictness) - init: scaffolds engines.node >=22.12.0, Astro 7 config template, fixed self-failing verification greps - audit: Astro 7 config-surface checks; severities now defer to html-conventions rule IDs (new HTML-15 for nested interactive elements) - html/translate/seo skills aligned with the Rust compiler and Sätteri markdown processor behavior - urls.ts template: locale-bound createUrls(locale) factory mirroring createTranslator; RSS/404/BaseLayout templates aligned (@ aliases, fill-marker hygiene) - marketplace.json/README/CLAUDE.md description prose updated to Astro 7 (no version fields touched — release-please owns them) Co-Authored-By: Claude Fable 5 --- .claude-plugin/marketplace.json | 2 +- .gitignore | 3 + CLAUDE.md | 2 +- README.md | 2 +- astro-builder/.claude-plugin/plugin.json | 2 +- astro-builder/NOTICE.md | 4 +- astro-builder/README.md | 14 ++- astro-builder/agents/astro-architect.md | 21 +++- astro-builder/agents/astro-builder.md | 29 ++++- astro-builder/docs/anti-slop.md | 4 +- astro-builder/docs/architecture.md | 29 +++-- astro-builder/docs/astro-patterns.md | 86 ++++++++++++-- .../docs/init-templates/404.astro.template | 9 +- .../init-templates/BaseLayout.astro.template | 28 ++++- .../docs/init-templates/CLAUDE.md.template | 27 ++++- .../init-templates/anti-patterns.md.template | 11 +- .../init-templates/astro.config.ts.template | 28 +++++ .../init-templates/content-schema.md.template | 2 + .../init-templates/content.config.ts.template | 9 +- .../init-templates/lib/content.ts.template | 6 + .../docs/init-templates/lib/urls.ts.template | 83 ++++++++----- .../docs/init-templates/rss.xml.ts.template | 22 +++- astro-builder/skills/audit/SKILL.md | 53 ++++++++- astro-builder/skills/css-conventions/SKILL.md | 8 +- .../skills/html-conventions/SKILL.md | 112 ++++++++++++++++-- .../html-conventions/references/audit.md | 77 ++++++++++-- astro-builder/skills/init/SKILL.md | 13 +- .../skills/init/rounds/lighthouse.md | 8 +- astro-builder/skills/init/rounds/project.md | 103 +++++++++++++--- .../skills/new-content-type/SKILL.md | 62 +++++++--- astro-builder/skills/new-page/SKILL.md | 14 ++- astro-builder/skills/seo-conventions/SKILL.md | 6 +- .../seo-conventions/references/audit.md | 7 ++ astro-builder/skills/translate/SKILL.md | 10 +- 34 files changed, 743 insertions(+), 153 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 2f549ad..1ee909c 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -29,7 +29,7 @@ }, { "name": "astro-builder", - "description": "Build Astro 6 static content sites with Claude. Enforces best practices for i18n, content collections, the page-views pattern, and design systems. Starts with /astro-builder:init to scaffold a working, buildable site.", + "description": "Build Astro 7 static content sites with Claude. Enforces best practices for i18n, content collections, the page-views pattern, and design systems. Starts with /astro-builder:init to scaffold a working, buildable site.", "version": "1.8.1", "author": { "name": "pcamarajr", diff --git a/.gitignore b/.gitignore index ff7f6e1..23e99b2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ node_modules/ /.cursor/rules/memory.mdc /.claude/skills/init-memory/ /.claude/skills/import-memories/ + +# Serena (local tooling config) +.serena/ diff --git a/CLAUDE.md b/CLAUDE.md index 09e85d8..a2f4856 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,7 +11,7 @@ content-stack/ ├── .claude-plugin/ │ └── marketplace.json ← plugin registry (name, version, description, source) ├── content-ops/ ← content creation & management plugin -├── astro-builder/ ← Astro 6 site builder plugin +├── astro-builder/ ← Astro 7 site builder plugin ├── astro-lsp/ ← Astro language server plugin └── README.md ← marketplace landing page (install commands, plugin list) ``` diff --git a/README.md b/README.md index 24a3e58..ab814f1 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Install: ### [`astro-builder`](./astro-builder/README.md) -Astro 6 site builder plugin that scaffolds and evolves static content sites using the page-views pattern, i18n, content collections, and quality gates. `init` interviews you, then scaffolds a working, buildable site — config, layout, `src/lib/` utilities, i18n files, and the full SEO surface. +Astro 7 site builder plugin that scaffolds and evolves static content sites using the page-views pattern, i18n, content collections, and quality gates. `init` interviews you, then scaffolds a working, buildable site — config, layout, `src/lib/` utilities, i18n files, and the full SEO surface. - **Best for:** creating or restructuring Astro content architectures - **Key skills:** `init`, `init project`, `init lighthouse`, `new-page`, `new-content-type`, `translate`, `audit`, `css-conventions` (auto-applied), `html-conventions` (auto-applied), `seo-conventions` (auto-applied), `ux-writing` (auto-applied) diff --git a/astro-builder/.claude-plugin/plugin.json b/astro-builder/.claude-plugin/plugin.json index 1da73c4..e65c2c5 100644 --- a/astro-builder/.claude-plugin/plugin.json +++ b/astro-builder/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "astro-builder", - "description": "Build Astro 6 static content sites with Claude. Enforces best practices for i18n, content collections, the page-views pattern, and design systems. Starts with /astro-builder:init to configure your project.", + "description": "Build Astro 7 static content sites with Claude. Enforces best practices for i18n, content collections, the page-views pattern, and design systems. Starts with /astro-builder:init to configure your project.", "author": { "name": "pcamarajr", "email": "eu@pcamarajr.dev" diff --git a/astro-builder/NOTICE.md b/astro-builder/NOTICE.md index cdbf59a..f973c15 100644 --- a/astro-builder/NOTICE.md +++ b/astro-builder/NOTICE.md @@ -15,7 +15,7 @@ licensed under the Apache License, Version 2.0: - `skills/ux-writing/SKILL.md` — the UX-writing guidance is adapted from Impeccable's `skill/reference/clarify.md` (formerly `ux-writing.md`). -These materials were rewritten and re-scoped for the Astro 6 + native-CSS workflow this plugin +These materials were rewritten and re-scoped for the Astro 7 + native-CSS workflow this plugin enforces. The original work is **not** vendored verbatim; it serves as the conceptual source. - Project: Impeccable — https://impeccable.style/ @@ -38,7 +38,7 @@ licensed under the MIT License: conceptual source for the document is John Ousterhout's *A Philosophy of Software Design*, cited in the document itself. -The material was rewritten for the Astro 6 domain this plugin enforces; the original work is +The material was rewritten for the Astro 7 domain this plugin enforces; the original work is **not** vendored verbatim. - Source: https://github.com/mattpocock/skills diff --git a/astro-builder/README.md b/astro-builder/README.md index 41f04f2..c05a85c 100644 --- a/astro-builder/README.md +++ b/astro-builder/README.md @@ -1,6 +1,6 @@ # astro-builder -Build and evolve Astro 6 content sites with a repeatable architecture, not one-off prompts. +Build and evolve Astro 7 content sites with a repeatable architecture, not one-off prompts. `astro-builder` is part of [content-stack](https://github.com/pcamarajr/content-stack), built for founders, marketers, and lean teams that want a production-ready content site without custom engineering for every step. @@ -15,6 +15,8 @@ Current scope is intentionally basic. The long-term direction is a strongly opin /plugin install astro-builder@content-stack ``` +Targets Astro 7 (7.1.x) and requires Node >= 22.12.0 — the engine floor Astro 7 declares. + --- ## Quick Start @@ -48,7 +50,7 @@ If you want the fastest start, begin from the ready template: | `/astro-builder:init project` | Interview → generate guidance files AND scaffold a buildable site: config, BaseLayout, `src/lib/` utilities, i18n JSONs, content collections, RSS, 404, robots.txt | | `/astro-builder:init lighthouse` | Set up automated Lighthouse auditing on git push | | `/astro-builder:new-page` | Scaffold a route for all locales: thin page wrappers (≤5 lines), a page-view wired to the BaseLayout SEO contract (`title`/`description`, `type="article"` + `publishedAt` for content pages), and i18n keys in every locale JSON | -| `/astro-builder:new-content-type` | Add a content collection following the project contract: schema with `lang`/`translationKey`/`tags`/`draft`, a `getXByLang()` helper in `src/lib/content.ts`, a URL builder on `buildLocaleUrl`, and example content | +| `/astro-builder:new-content-type` | Add a content collection following the project contract: schema with `lang`/`translationKey`/`tags`/`draft`, a `getXByLang()` helper in `src/lib/content.ts`, a builder method on the locale-bound `createUrls(locale)` factory in `src/lib/urls.ts`, and example content | | `/astro-builder:translate` | Localize a content entry or i18n JSON to another locale — same slug, target `lang`, matching `translationKey`; hreflang and RSS are derived by the architecture, no manual wiring | | `/astro-builder:audit` | Orchestrated project audit: architecture, i18n, schema, per-skill domain checklists (CSS, HTML/a11y, and SEO today), AI design slop, style guide, and build validation | | `css-conventions` _(auto-applied)_ | Enforces CSS discipline whenever styles are written: token-only values, scoped `