Files
ai-for-dummies/plans/astro-refactor/task-04-content-schema.md
T
Marcos Paulo aae4d42229 docs: add .agents workspace and the Astro refactor plan
Adds the agent-facing workspace and a 20-task plan for migrating the site
to Astro. Nothing here implements the refactor; these are briefs, rules and
templates that the task agents read.

- .agents/ holds context, rules, checklists, skills, specialist agents,
  component/page/config templates and gate scripts. It is vendor-neutral so
  MiniMax, Gemini and Codex can all read it; CLAUDE.md just points at
  AGENTS.md.
- .husky/ plus .lintstagedrc.json wire the three gate tiers. gate.sh locks on
  the shared git-common-dir so parallel worktrees serialise, and guards the
  assertion count in scripts/verify.mjs against a coverage drop.
- plans/astro-refactor/ carries the phase graph, per-task briefs and the
  model-routing recommendation.

These files must be tracked before fanning out: a worktree only checks out
tracked files, so an untracked plan is invisible to every agent working in one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 01:18:27 +00:00

1.5 KiB

Task 04 — Content collection schema

Agent: content-i18n-migrator · Model: MiniMax-M3 Depends on: 01 · Parallel with: 02, 03 · Blocks: 05, 06 Worktree: .agents/scripts/worktree.sh start 04 content-schema

Goal

Typed collections that make a missing translation a build error.

Scope

src/content/config.ts only. You own it.

Steps

  1. Define const localized = z.object({ en: z.string(), pt: z.string() }). Both required. A missing pt must fail the build — silent English fallback is how bilingual sites quietly become monolingual.
  2. Collections:
    • guidephases, modelGuide, skillSources, handsOnPrompts, skillInstallPrompts from app.js
    • chapters — copy for /models/, /agents/, /skills/, /summary/
    • reviews — the 24 entries: id, author, title, status, focus, wins[], improve[], extras, improved
  3. Make the language-switching decision and record it here:
    • client-side swap — matches today, no URL change, both languages in the payload. Recommended.
    • route-based /en/ /pt/ — better SEO, changes every existing URL, needs redirects.

Done when

  • astro check passes
  • A deliberately missing pt field fails the build (prove it, then revert)
  • The language decision is written down here with its reason

Do not

Do not move any content yet. Schema only — tasks 05 and 06 fill it, and they run in parallel against the shape you define.