Comprehensive audit of the Meta.svelte self-resolving refactoring, performed by 8 specialized agents in parallel.

Executive Summary

The refactoring successfully makes Meta.svelte self-resolve title, description, and new SEO tags from PageMeta exports via synchronous import.meta.glob. The build succeeds and meta tags render correctly in both dev and production. However, the refactoring is incomplete: 66 page files still pass a meta prop to <Publication> that no longer accepts it, and CLAUDE.md still documents the old API.

Critical Issues

1. Orphaned meta prop on 66 Publication calls

Publication.svelte no longer accepts a meta prop, but 66 page files still pass meta={{ title, description }}. Svelte silently ignores unknown props at runtime, so there is no error, but this is dead code that creates API confusion.

2. CLAUDE.md shows outdated Publication API

Lines 82-90 of CLAUDE.md show the old pattern with meta={{ title, description }} on <Publication>. This no longer works since Publication dropped the prop.

3. Unused SharePostLink import in PublicationHead.svelte

PublicationHead.svelte line 6 imports SharePostLink from $lib but never uses it. This was likely left over from a previous version.

Maintainability Concerns

Pages map built 3 times

The same import.meta.glob('/**/+page.svelte', { import: 'meta', eager: true }) pattern is duplicated in 3 files:

  • Meta.svelte (for head tag resolution)
  • Articles.svelte (for article listings)
  • pages.remote.js (for server-side metadata)

Each builds a nearly identical pages map with the same pathToPublicURL + filter + cover-strip logic. If the glob pattern or mapping logic needs to change, all 3 must be updated.

getCoverUrl duplicated

The getCoverUrl(cover) helper exists in both Meta.svelte and page-renderer.svelte.js with identical logic.

Magic numbers for OG image dimensions

Meta.svelte hardcodes 1200 and 630 for OG image width and height. These are standard Open Graph sizes but would be clearer as named constants.

Consistency Audit

Glob pattern: Consistent

All 3 files use the same glob pattern, pathToPublicURL prefix ( '/src/routes/'), and cover-stripping destructure. The pattern matches the established convention in Articles.svelte.

Indentation: Mixed

Some files use tabs (newer todo pages), others use spaces (older pages, lib components). This is a pre-existing inconsistency not introduced by this refactoring.

Title variations: By design

Some pages have different titles in PageMeta.title vs the former Publication meta.title (e.g., "Sync editor settings" vs "Sync Biome, Zed and VS Code settings"). Since Meta now resolves from PageMeta.title, the shorter title will appear in <title>. This may or may not be desired.

Dead Code

  • SharePostLink import in PublicationHead.svelte — imported but unused
  • 66 meta={{...}} props on Publication calls — passed but ignored
  • YandexMetricsEventShareLink in SharePostLink.svelte — defined but never called (pre-existing)

AI Artifacts

Overly verbose JSDoc comments exist in several files (notably Articles.svelte with a 40-line file-level comment block). These are pre-existing and not introduced by this refactoring. The new code in Meta.svelte has appropriate-level documentation.

Test Coverage

No tests exist. Vitest 4.0.18 is installed as a devDependency but no test script, config, or test files exist. Key functions that should be tested:

  • pathToPublicURL — core routing logic, pure function, easy to test
  • getCoverUrl — image URL extraction, pure function
  • escape_html, pathEncode, pathDecode — security-critical utilities

Documentation

  • CLAUDE.md: Outdated — still shows meta prop on Publication
  • MEMORY.md: Accurate — correctly documents the synchronous glob approach and that <svelte:head> cannot use async
  • Meta.svelte JSDoc: Accurate — Props typedef correctly shows all fields as optional
  • Publication.svelte JSDoc: Accurate — no meta prop documented

What's Fine As-Is

  • The synchronous glob approach correctly avoids the <svelte:head> async limitation
  • Prop fallback chain (pageMeta → prop → default) works correctly
  • New SEO tags (canonical, robots, og:locale, keywords) are correctly conditional
  • Error page correctly falls back to props ( title={page.status})
  • Build succeeds and produces correct static HTML with all meta tags
  • Cover stripping is consistent with pages.remote.js
  • Description field was correctly added to all 68 page meta exports

Action Items

Must fix

  1. Remove unused SharePostLink import from PublicationHead.svelte
  2. Update CLAUDE.md todo page template to remove meta prop from Publication
  3. Remove orphaned meta={{...}} prop from all 66 page files

Should fix

  1. Extract getCoverUrl to shared utility
  2. Review title differences between PageMeta and old Publication meta

Nice to have

  1. Extract OG image dimensions as named constants
  2. Investigate consolidating the 3x glob pattern
  3. Set up test infrastructure and add tests for pathToPublicURL

Audit Complete

8-agent parallel audit of the Meta refactoring

A static site template built with SvelteKit.

Sveleton, 2025