From 966dfcb9263e27e0c0734fcc2f8af364659b27f2 Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Sat, 5 Sep 2026 18:39:09 +0000 Subject: [PATCH] docs: add task 05b for the unmigrated interactiveCopy datasets --- .../task-05b-guide-interactive-data.md | 78 +++++++++++++++++++ .../task-15d-page-full-guide.md | 4 +- 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 plans/astro-refactor/task-05b-guide-interactive-data.md diff --git a/plans/astro-refactor/task-05b-guide-interactive-data.md b/plans/astro-refactor/task-05b-guide-interactive-data.md new file mode 100644 index 0000000..e0761f9 --- /dev/null +++ b/plans/astro-refactor/task-05b-guide-interactive-data.md @@ -0,0 +1,78 @@ +# Task 05b — The `interactiveCopy` data + +**Agent**: `content-i18n-migrator` · **Model**: MiniMax-M3 **Depends on**: 05 · +**Blocks**: 15d **Worktree**: +`.agents/scripts/worktree.sh start 05b guide-interactive-data` + +## Why this task exists + +It is not in the original plan, and it is the second hole of exactly this kind +(see [task 04b](task-04b-chapters-data.md), which filled the empty `chapters` +collection). + +Task 05 moved `phases`, `providers`, `efforts`, `skillSources`, `handsOnPrompts` +and `skillInstallPrompts` out of `app.js`. It did not move +`const interactiveCopy` at `app.js:160`, which holds six more datasets: + +| Key | Feeds | Rendered by | +| --------------- | ---------------------- | --------------------- | +| `workers` | `#worker-detail` | `renderWorker` | +| `trees` | `#tree-detail` | `renderTree` | +| `routes` | `#route-detail` | `renderRoute` | +| `skillFiles` | `#skill-detail` | `renderSkillFile` | +| `skillWorkflow` | `#builder-detail` | `renderSkillWorkflow` | +| `commonSkills` | `#common-skill-detail` | `renderCommonSkill` | + +Task 15d stopped before writing a line because of this — six of the nine groups +`GuideSelector` drives have no data to read. It was right to stop. + +## Scope + +`src/content/config.ts` (new collections only) and the new `src/content/*/` +JSON. **You own `config.ts`** — you are the only agent who may edit it. Do not +change an existing collection's schema. + +## The shapes are already written down + +`src/components/islands/GuideSelector.astro` declares a `GuideSelectorData` +interface at the top of the file. It is the contract 15d will feed. Match it — +if you think a field there is wrong, say so in your report rather than diverging +silently. + +Note the non-obvious ones, verified against `app.js`: + +- `trees[id]` has `owner` and `note` localized, but `path` and `command` are + **single strings, not localized** — they are shell paths. +- `routes[id].score` is a **number**, rendered into `style="--score:N%"`. +- `workers[id]` is `{ en: string[], pt: string[] }` — a three-element array + (`span`, `strong`, `small`), not an object. +- `skillFiles[id]` mixes `icon`/`title` (unlocalized) with `en`/`pt` strings. +- `providers[id].tiers` is `[string, string, Localized][]`. + +Read the real `app.js` for each. Do not infer a shape from a sibling. + +## Rules that bite here + +- **Both `en` and `pt` are mandatory on every localized field.** A missing `pt` + must fail the build. Never make a field optional to clear a validation error — + find the real Portuguese string in `app.js`. +- Copy strings **verbatim**. This is a move, not a rewrite. No fixed typos, no + improved phrasing, nothing translated that is already translated. Several + strings contain inline HTML; keep it exactly as-is. +- Prove it. Diff each migrated string against the `app.js` original + programmatically and report the result — task 15b did this for the prompt + bodies and it is the standard here. +- Do not delete `interactiveCopy` from `app.js`. The legacy page still runs on + it until task 20 cuts over, and `verify.mjs` still asserts against it. +- Do not migrate a page or touch a component. 15d owns that. +- Do not edit `verify.mjs`, `tokens.css`, or `astro.config.mjs`. + +## Done when + +- [ ] Six collections defined and exported from `config.ts` +- [ ] Entries for every id in `interactiveCopy`, both locales +- [ ] Shapes match `GuideSelectorData`, or the divergence is argued in the + report +- [ ] Every string proven byte-identical to its `app.js` original +- [ ] `pnpm run gate` green — the full gate, not `verify` + `audit-ui` alone +- [ ] 42 assertions intact diff --git a/plans/astro-refactor/task-15d-page-full-guide.md b/plans/astro-refactor/task-15d-page-full-guide.md index 4bc2f78..1215dba 100644 --- a/plans/astro-refactor/task-15d-page-full-guide.md +++ b/plans/astro-refactor/task-15d-page-full-guide.md @@ -1,7 +1,7 @@ # Task 15d — Assemble /full-guide/ -**Agent**: `page-migrator` · **Model**: **Codex** **Depends on**: 10, 13, 15a, -15b, 15c · **Parallel with**: 16 · **Blocks**: 15e, 18, 19 **Worktree**: +**Agent**: `page-migrator` · **Model**: **Codex** **Depends on**: 05b, 10, 13, +15a, 15b, 15c · **Parallel with**: 16 · **Blocks**: 15e, 18, 19 **Worktree**: `.agents/scripts/worktree.sh start 15d page-full-guide` ## Goal