diff --git a/plans/astro-refactor/MODEL-ROUTING.md b/plans/astro-refactor/MODEL-ROUTING.md index 28f3f37..d0483ff 100644 --- a/plans/astro-refactor/MODEL-ROUTING.md +++ b/plans/astro-refactor/MODEL-ROUTING.md @@ -5,9 +5,9 @@ interchangeable here, and the split is not about which is "smartest" — it is about which failure mode each task punishes. **Honest caveat up front:** I have not benchmarked these three on this -repository. The routing below is reasoned from task shape and each model's -known strengths. Validate it cheaply on **task 07** (small, self-contained, -easy to judge) before fanning out across ten worktrees. +repository. The routing below is reasoned from task shape and each model's known +strengths. Validate it cheaply on **task 07** (small, self-contained, easy to +judge) before fanning out across ten worktrees. ## Short answer @@ -18,22 +18,27 @@ points where M3 is the wrong tool. ## Routing table -| Task | Model | Why this one | -| --- | --- | --- | -| 01 scaffold + gates | **Codex** | Config-heavy, many interacting tools (Astro + husky + lint-staged + CI), and success is binary — it builds and hooks fire, or not. Codex's long autonomous run-until-green loop suits it, and getting the foundation wrong is expensive later. | -| 02 design tokens | **Gemini** | Needs the whole CSS corpus in one context (8 stylesheets, ~90 KB) plus **visual judgement on screenshots**. Gemini's long context and multimodal comparison are the differentiator; the others would work file-by-file and miss cross-file drift. | -| 03 verification net | **Codex** | Writing test tooling with a tight feedback loop. Precision about what an assertion pins matters more than speed. | -| 04 content schema | **MiniMax-M3** | Small, well-specified, one file. | -| 05–06 content migration | **MiniMax-M3** | High-volume mechanical string moves with a `diff` as the oracle. Cheap, parallel, verifiable. Exactly M3's sweet spot. | -| 07 primitives | **MiniMax-M3** | Small components from templates. Use this task to calibrate the whole routing decision. | -| 08–11 component blocks | **MiniMax-M3 ×4 parallel** | Four bounded tasks, one template each, checklist-gated. Cost per task matters because there are many. | -| 12–14, 17 pages | **MiniMax-M3** | Bounded, snapshot-diff verified. | -| 15 full guide | **Codex** | The hard one: 50 KB `app.js`, 12 render functions, tab state, bilingual swap. Long sustained reasoning over interacting pieces; the task most likely to need many iterations against a failing check. | -| 16 review desk | **Codex** | Same shape and worse — search, filtering, file fetching, six query params, markdown rendering, client-side diff. Highest defect risk in the plan. | -| 18 motion | **Gemini** | Judging whether motion looks right is perceptual. Feed it before/after captures. | -| 19 contract re-point | **Codex** | 42 assertions to translate without losing coverage. Meticulous, mechanical, verifiable. | -| 20 cutover | **you, with M3 assisting** | Touches production publishing. A human should be watching. | -| review of every task | **Gemini** | Fresh eyes, whole-diff-in-context, and it did not write the code. Never review with the model that wrote it. | +| Task | Model | Why this one | +| ------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 01 scaffold + gates | **Codex** | Config-heavy, many interacting tools (Astro + husky + lint-staged + CI), and success is binary — it builds and hooks fire, or not. Codex's long autonomous run-until-green loop suits it, and getting the foundation wrong is expensive later. | +| 02 design tokens | **Gemini** | Needs the whole CSS corpus in one context (8 stylesheets, ~90 KB) plus **visual judgement on screenshots**. Gemini's long context and multimodal comparison are the differentiator; the others would work file-by-file and miss cross-file drift. | +| 03 verification net | **Codex** | Writing test tooling with a tight feedback loop. Precision about what an assertion pins matters more than speed. | +| 04 content schema | **MiniMax-M3** | Small, well-specified, one file. | +| 05–06 content migration | **MiniMax-M3** | High-volume mechanical string moves with a `diff` as the oracle. Cheap, parallel, verifiable. Exactly M3's sweet spot. | +| 07 primitives | **MiniMax-M3** | Small components from templates. Use this task to calibrate the whole routing decision. | +| 08–11 component blocks | **MiniMax-M3 ×4 parallel** | Four bounded tasks, one template each, checklist-gated. Cost per task matters because there are many. | +| 12–14, 17 pages | **MiniMax-M3** | Bounded, snapshot-diff verified. | +| 15 full guide | **split** | Ran twice on Codex, zero usable commits both times. This table's own swap rule applied: too big, so it became 15a–15e. | +| 15a guide selector | **Codex** | Collapsing nine near-identical render functions into one island is the reasoning-heavy part that remains. | +| 15b copy prompt | MiniMax-M3 | Small, mechanical, and has an exact oracle: the clipboard payload must be byte-identical. | +| 15c language toggle | **Codex** | Needs a design decision written down, not a port — the selector-map approach cannot survive. | +| 15d assemble full guide | **Codex** | Assembly, but wide: 22 KB of bilingual markup against three islands and task 10's blocks. | +| 15e retire responsive.css | `agy` | Screenshot-diff driven — needs vision. | +| 16 review desk | **Codex** | Same shape and worse — search, filtering, file fetching, six query params, markdown rendering, client-side diff. Highest defect risk in the plan. | +| 18 motion | **Gemini** | Judging whether motion looks right is perceptual. Feed it before/after captures. | +| 19 contract re-point | **Codex** | 42 assertions to translate without losing coverage. Meticulous, mechanical, verifiable. | +| 20 cutover | **you, with M3 assisting** | Touches production publishing. A human should be watching. | +| review of every task | **Gemini** | Fresh eyes, whole-diff-in-context, and it did not write the code. Never review with the model that wrote it. | ## The reasoning in one line each @@ -41,11 +46,11 @@ points where M3 is the wrong tool. Use it for volume: 13 of the 20 tasks. Its weakness is long multi-file reasoning where the spec is vague; every task above that it owns has a template and a mechanical oracle. -- **Codex** — best at "keep iterating until the check passes" over a - complicated existing codebase. Use it where the loop is long and the answer is - not obvious: scaffold, the two hard pages, verification. +- **Codex** — best at "keep iterating until the check passes" over a complicated + existing codebase. Use it where the loop is long and the answer is not + obvious: scaffold, the two hard pages, verification. - **Gemini** — biggest context and genuinely useful multimodal comparison. Use - it where the input is *everything at once* or where the judgement is + it where the input is _everything at once_ or where the judgement is **visual**: token consolidation, motion, screenshot diffing, and code review. ## Cross-checking rule @@ -56,13 +61,13 @@ reviews; Codex writes → Gemini reviews; Gemini writes → Codex reviews. The ## Swap the routing if you see this -| Symptom | Move the task to | -| --- | --- | -| M3 spends more than ~3 iterations failing the same gate | Codex | -| M3 edits files outside its task scope | Codex, and tighten the brief | -| Codex "fixes" a red suite by deleting assertions | anything — but re-read `context/verification.md` to it first; `gate.sh` blocks the merge either way | -| Gemini gives confident visual sign-off with no screenshots attached | require the artifacts; do not accept prose | -| A task needs more than two models' worth of hand-holding | the task is too big — split it | +| Symptom | Move the task to | +| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| M3 spends more than ~3 iterations failing the same gate | Codex | +| M3 edits files outside its task scope | Codex, and tighten the brief | +| Codex "fixes" a red suite by deleting assertions | anything — but re-read `context/verification.md` to it first; `gate.sh` blocks the merge either way | +| Gemini gives confident visual sign-off with no screenshots attached | require the artifacts; do not accept prose | +| A task needs more than two models' worth of hand-holding | the task is too big — split it | ## Cost shape diff --git a/plans/astro-refactor/README.md b/plans/astro-refactor/README.md index 319ad05..4ae45c1 100644 --- a/plans/astro-refactor/README.md +++ b/plans/astro-refactor/README.md @@ -37,32 +37,37 @@ on four branches; nothing is merged or pushed. Phase 0 foundation 01 → (02 ∥ 03 ∥ 04) Phase 1 content 05 ∥ 06 after 04 Phase 2 components 07 → (08 ∥ 09 ∥ 10 ∥ 11) after 02 -Phase 3 pages 12 ∥ 13 ∥ 14 ∥ 17, then 15 ∥ 16 +Phase 3 pages 12 ∥ 13 ∥ 14 ∥ 17, then 15a ∥ 15b ∥ 15c ∥ 16, then 15d, 15e Phase 4 polish 18 ∥ 19, then 20 ``` -| # | Task | Agent | Depends on | Parallel with | -| --- | ------------------------------------------------ | --------------------- | ---------- | ------------- | -| 01 | [scaffold + gates](task-01-scaffold.md) | astro-architect | — | — | -| 02 | [design tokens](task-02-tokens.md) | design-system-keeper | 01 | 03, 04 | -| 03 | [verification net](task-03-verification-net.md) | verification-engineer | 01 | 02, 04 | -| 04 | [content schema](task-04-content-schema.md) | content-i18n-migrator | 01 | 02, 03 | -| 05 | [guide content](task-05-content-guide.md) | content-i18n-migrator | 04 | 06 | -| 06 | [review-desk content](task-06-content-review.md) | content-i18n-migrator | 04 | 05 | -| 07 | [primitives](task-07-primitives.md) | component-builder | 02 | — | -| 08 | [route cards](task-08-route-cards.md) | component-builder | 07 | 09, 10, 11 | -| 09 | [chapter blocks](task-09-chapter-blocks.md) | component-builder | 07 | 08, 10, 11 | -| 10 | [guide blocks](task-10-guide-blocks.md) | component-builder | 07 | 08, 09, 11 | -| 11 | [review-desk blocks](task-11-review-blocks.md) | component-builder | 07 | 08, 09, 10 | -| 12 | [landing page](task-12-page-landing.md) | page-migrator | 03, 08 | 13, 14, 17 | -| 13 | [chapter pages ×4](task-13-page-chapters.md) | page-migrator | 03, 09 | 12, 14, 17 | -| 14 | [rules page](task-14-page-rules.md) | page-migrator | 03, 09 | 12, 13, 17 | -| 15 | [full guide](task-15-page-full-guide.md) | page-migrator | 05, 10, 13 | 16 | -| 16 | [review desk](task-16-page-review-desk.md) | page-migrator | 06, 11, 13 | 15 | -| 17 | [hands-on passthrough](task-17-hands-on.md) | astro-architect | 01 | 12, 13, 14 | -| 18 | [motion pass](task-18-motion.md) | motion-designer | 15, 16 | 19 | -| 19 | [contract re-point](task-19-verify-repoint.md) | verification-engineer | 15, 16 | 18 | -| 20 | [cutover + cleanup](task-20-cutover.md) | astro-architect | all | — | +| # | Task | Agent | Depends on | Parallel with | +| --- | ----------------------------------------------------------------- | --------------------- | ------------- | ------------- | +| 01 | [scaffold + gates](task-01-scaffold.md) | astro-architect | — | — | +| 02 | [design tokens](task-02-tokens.md) | design-system-keeper | 01 | 03, 04 | +| 03 | [verification net](task-03-verification-net.md) | verification-engineer | 01 | 02, 04 | +| 04 | [content schema](task-04-content-schema.md) | content-i18n-migrator | 01 | 02, 03 | +| 05 | [guide content](task-05-content-guide.md) | content-i18n-migrator | 04 | 06 | +| 06 | [review-desk content](task-06-content-review.md) | content-i18n-migrator | 04 | 05 | +| 07 | [primitives](task-07-primitives.md) | component-builder | 02 | — | +| 08 | [route cards](task-08-route-cards.md) | component-builder | 07 | 09, 10, 11 | +| 09 | [chapter blocks](task-09-chapter-blocks.md) | component-builder | 07 | 08, 10, 11 | +| 10 | [guide blocks](task-10-guide-blocks.md) | component-builder | 07 | 08, 09, 11 | +| 11 | [review-desk blocks](task-11-review-blocks.md) | component-builder | 07 | 08, 09, 10 | +| 12 | [landing page](task-12-page-landing.md) | page-migrator | 03, 08 | 13, 14, 17 | +| 13 | [chapter pages ×4](task-13-page-chapters.md) | page-migrator | 03, 09 | 12, 14, 17 | +| 14 | [rules page](task-14-page-rules.md) | page-migrator | 03, 09 | 12, 13, 17 | +| 15 | [full guide](task-15-page-full-guide.md) — **split into 15a–15e** | — | — | — | +| 15a | [guide selector](task-15a-guide-selector.md) | component-builder | 05, 10 | 15b, 15c | +| 15b | [copy prompt](task-15b-copy-prompt.md) | component-builder | 05 | 15a, 15c | +| 15c | [language toggle](task-15c-language-toggle.md) | content-i18n-migrator | 05 | 15a, 15b | +| 15d | [assemble full guide](task-15d-page-full-guide.md) | page-migrator | 10, 13, 15a–c | 16 | +| 15e | [retire responsive.css](task-15e-responsive-css.md) | design-system-keeper | 15d, 16 | — | +| 16 | [review desk](task-16-page-review-desk.md) | page-migrator | 06, 11, 13 | 15d | +| 17 | [hands-on passthrough](task-17-hands-on.md) | astro-architect | 01 | 12, 13, 14 | +| 18 | [motion pass](task-18-motion.md) | motion-designer | 15d, 16 | 19 | +| 19 | [contract re-point](task-19-verify-repoint.md) | verification-engineer | 15d, 16 | 18 | +| 20 | [cutover + cleanup](task-20-cutover.md) | astro-architect | all | — | Widest parallelism: **four agents** (tasks 08–11, then 12/13/14/17). More than that and they start contending on review capacity, not on files. diff --git a/plans/astro-refactor/task-15-page-full-guide.md b/plans/astro-refactor/task-15-page-full-guide.md index 0208bc1..c39ed95 100644 --- a/plans/astro-refactor/task-15-page-full-guide.md +++ b/plans/astro-refactor/task-15-page-full-guide.md @@ -1,64 +1,22 @@ -# Task 15 — Full guide +# Task 15 — Full guide — **SUPERSEDED, split into 15a–15e** -**Agent**: `page-migrator` · **Model**: **Codex** — hardest task in the plan -**Depends on**: 05, 10, 13 · **Parallel with**: 16 **Worktree**: -`.agents/scripts/worktree.sh start 15 page-full-guide` +Do not work this brief. It is kept because other documents link to it. -## Goal +Task 15 was attempted twice on Codex and produced no usable commit either time. +The second report's own words: _"this is an incomplete scaffold, not the real +migration requested."_ `MODEL-ROUTING.md` says a task needing more than two +models' worth of hand-holding is too big — split it. So it is split, along the +seams that made it hard: the nine-fold selector duplication, the clipboard +fallback, and the selector-map language toggle that cannot survive the port. -`/full-guide/` → Astro. 22 KB of HTML, a 50 KB script, 30 KB of CSS, twelve -render functions, bilingual throughout. +| Brief | What | Depends on | +| ---------------------------------- | ------------------------------------------- | --------------------- | +| [15a](task-15a-guide-selector.md) | one generic selector island for nine groups | 05, 10 | +| [15b](task-15b-copy-prompt.md) | copy-prompt buttons, reading progress | 05 | +| [15c](task-15c-language-toggle.md) | language toggle — needs a decision first | 05 | +| [15d](task-15d-page-full-guide.md) | assemble `/full-guide/` | 10, 13, 15a, 15b, 15c | +| [15e](task-15e-responsive-css.md) | prove `responsive.css` dead, delete it | 15d, 16 | -## What `app.js` actually is - -Not application code — a **bilingual content database** (task 05 already moved -it) plus ~12 `render*` functions that swap `innerHTML` on tab clicks. Once -content is a collection, the remaining JS is small: tab state and a language -toggle. - -## Islands - -Only these hydrate. Everything else is server-rendered. - -| Island | Directive | Why | -| -------------------------------------------------------- | ---------------- | -------------------------------------------------- | -| Phase tabs | `client:visible` | click-driven panel swap | -| Tree / worker / route / model / effort / skill selectors | `client:visible` | same pattern; consider one generic selector island | -| Language toggle | `client:idle` | page-wide, not urgent | -| Copy-prompt buttons | `client:visible` | clipboard | - -If you end up with 12 separate islands you have missed the pattern — they are -one selector component with different data. - -## Asserted by verify.mjs — all must survive - -`const phases`, `const handsOnPrompts`, `const modelGuide`, -`const skillSources`, `const skillInstallPrompts`, `render('plan')`, -`renderTree`, `renderWorker`, `renderRoute`, `renderModelProvider`, -`renderEffort`, `renderSkillFile`, `renderSkillWorkflow`, `renderCommonSkill`, -`renderHandsOn`, `copyPrompt`. - -These are **implementation-detail assertions** — they look deletable and are -not. Each pins a feature. Coordinate with task 19 to replace each with an -output-level assertion of the same behaviour. **Never delete one yourself.** - -Also: `data-copy-target="prompt-install-skills|prompt-basic|prompt-skills"`, -`hands-on/starter/`, `additional-reading.md`, `role="tablist"`, `