Skip to content

Marketing site rebuild β€” Astro + languages registry#264

Merged
0xLeif merged 33 commits into
mainfrom
docs/marketing-site
May 18, 2026
Merged

Marketing site rebuild β€” Astro + languages registry#264
0xLeif merged 33 commits into
mainfrom
docs/marketing-site

Conversation

@corvid-agent
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the mdBook GitHub Pages site with an Astro + MDX marketing site featuring a sky-blue design system, dark background, and spec-sync branding.
  • Adds a first-class Languages registry (/languages + /languages/{slug}) backed by 12 hand-authored per-language JSON files with detection rules, test patterns, and example specs.
  • Migrates all existing mdBook docs into the new site under /docs (Getting started / Spec format / Reference / Integrations sections).
  • Generates 1-step redirects from old mdBook URLs (/spec-sync/quickstart.html etc.) to new doc paths (/spec-sync/docs/quickstart).
  • Replaces .github/workflows/docs.yml (mdBook) with pages.yml (Astro, push + workflow_dispatch β€” no weekly cron since the language registry is first-party data).
  • Built using patterns established in fledge#398 with all known code-review findings applied upfront (BASE_URL trailing-slash helper, remark .md-strip plugin, stable cache keys, cross-ref fixes after section moves).

Spec: docs/superpowers/specs/2026-05-17-spec-sync-marketing-site-design.md
Plan: docs/superpowers/plans/2026-05-17-spec-sync-marketing-site.md

Preflight fixes (from fledge review findings)

  • BASE_URL trailing-slash bug β€” site/src/lib/path.ts helper ensures every href gets /spec-sync/ not /spec-sync. All 12 component/page files updated.
  • .md cross-links β€” remark plugin in astro.config.mjs strips .md from internal markdown links at build time.
  • Section-move cross-refs β€” vscode-extension.md, github-action.md, ai-agents.md moved to integrations/; all referencing docs updated.
  • Dead CTAs β€” Footer "Changelog" link updated to point at GitHub CHANGELOG.md (no in-site changelog page exists).
  • Stable Pages workflow cache key β€” uses hashFiles() of language data, not ${{ github.run_id }}.

Test plan

  • CI: bun test β€” all 21 tests pass across validate-languages and generate-doc-redirects suites
  • CI: bun run lint β€” 0 errors, 0 warnings
  • CI: bun run build β€” 34 pages built; 11 redirect files emitted
  • Spot-check redirects: /spec-sync/quickstart.html and /spec-sync/cli.html present
  • BASE_URL: no href="/spec-sync[a-z]" (no missing trailing slash)
  • .md links: no href="[^"]*\.md" in dist/docs/
  • Language pages: /languages, /languages/rust, /languages/typescript all render
  • Docs navigation: sidebar renders correctly for all doc sections
  • Blog and examples pages render
  • mdBook tree (docs/src/, docs/book.toml, docs/theme/) is gone
  • Old docs.yml workflow removed; new pages.yml present

πŸ€– Generated with Claude Code

corvid-agent and others added 30 commits May 17, 2026 18:35
Sibling spec to fledge's marketing-site rebuild (CorvidLabs/fledge#398).
Same Astro+MDX+Bun stack, same component vocabulary, but with:
- sky-blue palette (#0ea5e9 / #7dd3fc / #075985)
- /languages page in nav (12 first-party langs, hand-maintained JSON)
- "Six powers" framing (Validate / Languages / Generate / Integrate / Cross-refs / Extend)

The plan is diff-style β€” references the fledge plan (also copied here as
docs/superpowers/plans/2026-05-17-fledge-base-plan.md) and lists the
substitutions. Execute by reading both plans in parallel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exports validateRegistry() that checks required fields, enum values
(family, detection_style), non-empty extensions, and optionally cross-
checks per-language disk files against the registry index. 15 tests
cover happy path, missing fields, invalid enums, and disk cross-checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Hand-authored languages.json index (12 entries) and per-language
{slug}.json files sourced from the spec-sync README Supported Languages
table and the Rust export detection code in src/exports/*.rs.

Removes the gitignore entries that previously excluded these files β€”
languages data is first-party and committed, not generated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds "prebuild": "bun scripts/validate-languages.ts" to package.json
so the registry schema is validated before every astro build. A
malformed registry or dangling per-language file will fail the build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds LanguageCard.astro showing language name, family tag (native/managed/dynamic/markup
with colour-coded border), detection-style tag (AST/Regex/Hybrid), first test-pattern
preview in mono, short description, and a "Read detection rules β†’" link to the per-language
detail page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds /languages index page: eyebrow + H1 "Spec-sync speaks your stack.", lede, stats
strip (12 languages Β· auto-detected Β· one spec format), search input and filter chips for
family (Native/Managed/Dynamic/Markup) and detection style (AST/Regex/Hybrid), 3-col
responsive LanguageCard grid for all 12 languages, and a "Don't see your language?" CTA
linking to GitHub Discussions. Client-side JS filters visible cards by name, description,
family, and detection style.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…amples

Adds /languages/[slug].astro generating 12 static pages via getStaticPaths() from
site/src/data/languages/{slug}.json. Each page renders: breadcrumb, header with family/
detection-style/since tags and extension chips, detection rules with code blocks, test-file
patterns table, side-by-side example spec (marked-rendered markdown) + source code block,
caveats list, related-language cards (up to 3), and a footer CTA linking to GitHub Issues.
MDX deep-dive section stubbed as {false && ...} for Phase 6.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… walkthroughs

Bakes all three collection schemas (docs, examples, blog) into config.ts
from the start so Phase 7 (docs) and Phase 8 (blog) have no schema work.
Adds three MDX walkthroughs: rust-workspace (featured), polyglot, ci-gate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reads examples collection, sorts by order, promotes the featured entry
to a full-width card above a 2-col grid of remaining walkthroughs.
Links use ${base}examples/{slug} for correct base-path routing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ArticleLayout wraps BaseLayout with article prose styles (h2/h3
separators, code block styling, inline code). Generic β€” no
example-specific assumptions so blog will reuse it in Phase 8.
Dynamic [...slug].astro route renders MDX via entry.render().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 mdBook source files from docs/src/ migrated to site/src/content/docs/
with section/order frontmatter. Integrations files placed under
integrations/ subdirectory. Source docs/src/ files untouched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Create site/src/lib/path.ts with a `base` export that guarantees a
trailing slash on import.meta.env.BASE_URL. Route all 12 component and
page files through this helper so links like ${base}docs/quickstart
resolve to /spec-sync/docs/quickstart not /spec-syncdocs/quickstart.
Also fix dead Changelog footer link to point at CHANGELOG.md on GitHub.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a rewriteMdLinks() remark plugin to astro.config.mjs that strips
.md extensions from internal markdown links at build time, so
[Config](configuration.md) becomes href="configuration" not
href="configuration.md" in the generated HTML.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vscode-extension.md, github-action.md, and ai-agents.md were migrated
into site/src/content/docs/integrations/. Update all top-level docs
that reference those files to use the new integrations/ prefix so links
resolve correctly after the remark .md-strip plugin processes them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AGENTS.md: add note that docs/ mdBook tree is removed; site/ is the
new Astro marketing site.
CONTRIBUTING.md: add Documentation section with bun dev/build/test
commands, update project structure comment, fix spec-format.md path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add generate-doc-redirects.ts that walks site/src/content/docs/,
computes old mdBook HTML paths (e.g. quickstart.html), and emits
meta-refresh + JS redirect files into public/ pointing at new /docs/...
paths under /spec-sync/.

Wire into package.json prebuild: validate-languages runs first, then
generate-doc-redirects. 11 redirect files emitted on each build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add .github/workflows/pages.yml that builds the Astro marketing site
and deploys to GitHub Pages on push to main (site/** paths) and on
workflow_dispatch. No weekly cron β€” the language registry is
first-party data, not a live fetch.

Cache key uses hashFiles() of the language data files (not run_id)
so the cache actually restores across runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove docs/src/, docs/book.toml, docs/theme/, and
.github/workflows/docs.yml. The mdBook-based documentation site is
replaced by the Astro marketing site in site/ deployed via pages.yml.

docs/superpowers/ (specs and plans) is preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@corvid-agent corvid-agent requested a review from a team as a code owner May 18, 2026 02:58
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

The generate-doc-redirects.ts prebuild script writes redirect HTML files
into site/public/ (e.g. quickstart.html, cli.html). These are build
artifacts and should not be committed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
github-actions[bot]
github-actions Bot previously approved these changes May 18, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

βœ… Corvin says...

      _
    <(^\  .oO(Caw! ^v^)
     |/(\
      \(\\
      " "\\

"Caw! Your code sparkles like a dropped french fry."

CI Summary

Check Status
Validate action.yml βœ… Passed
Dependency Audit βœ… Passed
Code Coverage βœ… Passed
Format Check βœ… Passed
Spec Validation βœ… Passed
Tests (build, test, clippy) βœ… Passed
πŸ“‹ Spec Validation Details

βœ… SpecSync: Passed

Metric Value
Specs checked 57
Passed 57
Errors 0
Warnings 0
File coverage 97% (73/75)
LOC coverage 98% (32592/32952)

Unspecced Files

The following source files have no spec coverage:

  • src/exports/ast/tests.rs
  • src/util.rs

Run specsync generate to scaffold specs for these files.


Generated by specsync Β· Run specsync check --format github to reproduce


Powered by corvid-pet

@github-actions github-actions Bot dismissed their stale review May 18, 2026 03:03

Superseded by updated review.

github-actions[bot]
github-actions Bot previously approved these changes May 18, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

βœ… Corvin says...

      _
    <(^\  .oO(Caw! ^v^)
     |/(\
      \(\\
      " "\\

"Looking sharp! Like a beak should be."

CI Summary

Check Status
Validate action.yml βœ… Passed
Dependency Audit βœ… Passed
Code Coverage βœ… Passed
Format Check βœ… Passed
Spec Validation βœ… Passed
Tests (build, test, clippy) βœ… Passed
πŸ“‹ Spec Validation Details

βœ… SpecSync: Passed

Metric Value
Specs checked 57
Passed 57
Errors 0
Warnings 0
File coverage 97% (73/75)
LOC coverage 98% (32592/32952)

Unspecced Files

The following source files have no spec coverage:

  • src/exports/ast/tests.rs
  • src/util.rs

Run specsync generate to scaffold specs for these files.


Generated by specsync Β· Run specsync check --format github to reproduce


Powered by corvid-pet

…trast

The default Shiki theme (github-dark) has comment tokens at #6A737D which
fails WCAG AA (3.05:1) on the #24292e background. Switching to
github-dark-high-contrast resolves all 10 color-contrast violations on
/docs/quickstart. Zero axe violations on all 5 scanned pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

βœ… Corvin says...

      _
    <(^\  .oO(Caw! ^v^)
     |/(\
      \(\\
      " "\\

"Caw! Found a shiny new spec!"

CI Summary

Check Status
Validate action.yml βœ… Passed
Dependency Audit βœ… Passed
Code Coverage βœ… Passed
Format Check βœ… Passed
Spec Validation βœ… Passed
Tests (build, test, clippy) βœ… Passed
πŸ“‹ Spec Validation Details

βœ… SpecSync: Passed

Metric Value
Specs checked 57
Passed 57
Errors 0
Warnings 0
File coverage 97% (73/75)
LOC coverage 98% (32592/32952)

Unspecced Files

The following source files have no spec coverage:

  • src/exports/ast/tests.rs
  • src/util.rs

Run specsync generate to scaffold specs for these files.


Generated by specsync Β· Run specsync check --format github to reproduce


Powered by corvid-pet

@0xLeif 0xLeif merged commit 05ef30b into main May 18, 2026
14 checks passed
@0xLeif 0xLeif deleted the docs/marketing-site branch May 18, 2026 03:09
0xLeif pushed a commit that referenced this pull request May 18, 2026
Critical: the pages.yml workflow has been failing immediately on every
push to main because the YAML scanner choked on the unquoted colon
inside the step name "Build site (runs prebuild: validate + redirects)".
GitHub couldn't parse the workflow at all β€” no jobs ran, no deploy
fired, and corvidlabs.github.io/spec-sync still serves the old mdBook
site even though PR #264 merged 20 minutes ago. Quoted the step name
and verified YAML parses cleanly.

Also fills in all placeholder/stub content that landed in PR #264:
- blog/welcome.mdx β€” real announcement copy
- blog/v4-1-release.mdx β†’ renamed to v4-3-2-release.mdx with real
  CHANGELOG content for the actual latest release
- examples/polyglot.mdx β€” full 7-step walkthrough
- examples/ci-gate.mdx β€” full 5-step walkthrough
- examples/rust-workspace.mdx β€” replaced trailing placeholder note
  with real closing paragraph

Header VERSION bumped from the placeholder 'v4.1' to the real current
crate version 'v4.3.2'.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants