The skill detail panel's label read TRIGGER in both languages. The copy
data carries the Portuguese in `skillTriggerLabelPt`, but the island asks
for `skillTriggerLabel`, which is "TRIGGER" under both locales -- so the
translated value was never reachable. Legacy renders it inline:
`language === 'pt' ? 'GATILHO' : 'TRIGGER'`.
Fixed by putting the Portuguese where the lookup goes, `pt.skillTriggerLabel`,
and dropping the unreachable `skillTriggerLabelPt` from both locales. Nothing
else reads that key.
rendered-text-diff.mjs grows a `--pt` flag and now reports both directions.
English parity was hiding this: a page can paint every English string and
still leave a block untranslated, because the Portuguese half is a separate
set of nodes, and a string the Astro page renders but the legacy page does
not is equally wrong -- it means a translation was invented or an English
string was left where the legacy page swaps it.
/rules/ is now 119 of 119 in both languages, zero either way.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The seven selector buttons were rendering `kind` and `use`, which belong
to the detail panel. ponytail's button read "SIMPLIFICATION INSTINCT" and
a full paragraph of prose where today's page reads "SIMPLIFY" and
"minimum code that holds". English was wrong, not just Portuguese
missing, on all seven.
Those two lines are not in `interactiveCopy`, which is why task 05b had
nothing to migrate them from: the English lives in the
`full-guide/index.html` markup and the Portuguese in `translations.pt`.
Adds `label` and `tagline` to the `commonSkills` schema and to all seven
entries, both taken verbatim from those two sources, and points the
buttons at them. The panel keeps reading `kind` and `use`.
This closes the last 13 of the 102 `translations.pt` entries. Coverage in
`dist/full-guide/index.html` is now 102 of 102.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Move the six remaining bilingual datasets from app.js:160 into Astro
content collections so GuideSelector has data to drive. Mechanical copy
of 178 strings (160 localized pairs + 18 worker array strings) plus
the non-localized fields (status, path, command, score, icon, title,
number). Source field on commonSkills embedded from skillSources to
match the GuideSelectorData contract; if a URL changes, both this
entry and skillSources/<id>.json must be updated. Status kept on trees
even though GuideSelectorData omits it — index.html renders it.
Did not delete interactiveCopy from app.js: legacy page still consumes
it, and verify.mjs still asserts against it. Did not migrate the
labels (data.labels.*) — those live inside render functions in app.js
and belong to 15d.
Add the migrated chapter page (task 14). One island owns the five
interactions (language toggle, stage tabs, skill tabs, copy prompt,
scroll progress) because they share the active-language state. Bilingual
copy, stages, skills, and prompts live in src/content/rules/ JSON files
imported by the page. Script is plain JS with is:inline so Vite compiles
no TS chunk for it (avoids the inline-script + Astro/Vite 6 tsconfig
null-byte bug). Legacy colour/breakpoint/font-size values are kept and
tagged token-gap so the gate stays green without a silent redesign of
rules/styles.css.
Done-when:
- dist/rules/index.html server-renders the same DOM and classes as
rules/index.html
- snapshot-route.mjs diff vs .agents/snapshots/rules.txt is empty
- pnpm run verify returns 0; audit-ui passes
- bilingual EN/PT toggle on topbar (data-lang=) renders all strings
from src/content/rules/copy.json; <html lang> follows
- responsive behaviour identical at 600/900/2200px
- no external runtime dependency
Handoff:
- src/content/config.ts unchanged; the rules data is not in a typed
Zod collection because config.ts is owned by content-i18n-migrator.
Add a rules collection there when the collection layer is extended.
- verify.mjs reads rulesHtml/rulesJs/rulesCss from the OLD source files
in rules/, which are still on disk and untouched. New rulesHtml-style
assertions should target dist/rules/index.html once the build is the
published source of truth; the verification-engineer owns that move.
- 30 token-gap markers in RulesInteractive.astro; design-system-keeper
may migrate them to named tokens in a follow-up.
Fill the chapters collection that task 04 defined and tasks 05/06 left
empty. Five entries (landing, summary, models, agents, skills), each
with both en and pt locales on every localized field.
Landing and summary carry the six-card route map with non-uniform CTAs
(four "Open chapter →", one "Open lab →", one "Open desk →"); the
CTA text travels as cards[].cta and the destination as cards[].href,
both added in the schema change that landed first.
Models / agents / skills carry their hero + cards + sections + steps,
including the highlighted rule panels (ROUTING RULE / MAIN /
ORCHESTRATOR / package-anatomy hint) as section-level panelLabel /
panelCode / panelHint.
Strings copied verbatim from the existing HTML files (index.html and
the four chapter pages). Tasks 12 and 13 own the page migration;
this commit is data only.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Add cards[].href and cards[].cta for the landing route map's six cards
whose call-to-action text is not uniform (Open chapter / Open lab /
Open desk). Add sections[].panelLabel, panelCode, panelHint for the
highlighted rule panels on /models/, /agents/, /skills/. Add top-level
threadLabel / threadText / footer for the landing-page strip and the
chapter-page footer line. Both locales remain mandatory on every
localized field.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Move all 24 review entries from skills-review/catalog.js +
skills-review/submitted-catalog.js into a typed Astro content collection at
src/content/reviews/. Each entry is a Markdown file with frontmatter for the
review metadata (id, author, focus, wins, improve, extras, name, description)
and a body that holds the 'improved' SKILL.md content.
Re-point scripts/build-skill-review.mjs at the new collection. The generator
reads each .md file, parses its YAML frontmatter, and writes
skill-reviews/improved/{id}/SKILL.md in the same shape the legacy catalog
produced — verified byte-identical via 'git diff --exit-code skill-reviews/'.
The 'name' field is preserved separately from 'id' because two entries
renamed the skill during review (id angular-accessibility-root → name
angular-accessibility; id confectionary-skill-hub → name confectionery-orders).
Without it the generator output would drift on those two files.
Does not yet delete skills-review/catalog.js or submitted-catalog.js —
verify.mjs and the legacy review-desk page both still read them, so they
stay as a mirror until task 16 rewires the page to the collection. Adding a
new submission today requires editing both the .md file (new source of
truth) and the legacy catalog.js (until task 16).
Done-when:
- 24 entries under src/content/reviews/ ✓
- verify.mjs's id:' count assertion still passes ✓
- git diff --exit-code skill-reviews/ clean after regenerating ✓
- astro check passes (22 files: 0 errors, 0 warnings, 2 hints) ✓
Co-Authored-By: Claude Code <noreply@anthropic.com>
Migrate the bilingual copy in app.js (phases, handsOnPrompts, modelGuide,
skillSources, skillInstallPrompts) into per-collection data files under
src/content/, one folder per collection: phases/, providers/, efforts/,
skillSources/, handsOnPrompts/, skillInstallPrompts/. Strings copied
mechanically; the diff between the canonical extract-strings.mjs over a
flattened baseline of these guide blocks and the same extractor over the
new content directory is empty (56 strings total, 28 en + 28 pt).
efforts, handsOnPrompts, and skillInstallPrompts previously held arrays
of strings joined at runtime with .join('\n'); the new schema stores
them as plain strings, so canonical extract-strings.mjs cannot reach them
in their source shape. Verified byte-identical with /tmp/verify-nested.mjs
and /tmp/verify-install.mjs: every english/portuguese string in source
matches the migrated value, char-for-char.
What I did not do:
- delete the matching literals from app.js — task 15 removes them once
the page consumes the collection
- touch config.ts — the schema for these collections was set up in task 04
- move catalog.js, submitted-catalog.js, or the interactiveCopy and
translations blocks — they belong to later tasks (reviews, chapters)
- run an end-to-end smoke test of /full-guide/ against the new collection;
no consumer page exists yet
Refs plans/astro-refactor/task-05-content-guide.md.
Add src/content/config.ts with strict { en, pt } schema and eight
typed collections matching the shapes in app.js and
skills-review/catalog.js: phases, providers, efforts, skillSources,
handsOnPrompts, skillInstallPrompts, chapters, reviews.
Both locales are required on every localized field. A deliberately
missing pt fails the build with InvalidContentEntryDataError, proved
with a probe entry and reverted. Silent English fallback is what turns
a bilingual site monolingual; the schema must not allow it.
Did not move any content yet. Tasks 05 and 06 fill the entries
against the shape defined here, in parallel.
Also records the language-switching decision in the task brief:
client-side swap, both locales in the payload, html lang tracks the
active language. Behaviour parity, schema fit, and tiny payload
size beat the SEO upside of route-based i18n for this site.
astro check: 0 errors, 0 warnings. npm run verify: green. No
assertion count change.
Co-Authored-By: Claude Code <noreply@anthropic.com>