Codex / GPT-5.5 is the Mechanic. This file owns heavy logic, wiring, Astro component changes, and structural updates after the first-run baseline is complete.
- Bootstrap the agent task files and
skills/SOP directory ondocs/agentic-orchestration-baseline. - Add implementation-sensitive architecture notes without changing runtime behavior.
- Augment
README.mdwith the multi-agent workflow and preservation constraints. - Record Astro 6.2 implementation risks for future Codex work.
Goal: produce the implementation-side risk register that complements Claude's architecture plan. No code or dependency changes in this milestone.
Branch: docs/astro-6-2-implementation-audit.
- Audit
<ViewTransitions />usage. Confirmed locations to record indocs/astro_6_2_implementation_audit.md:- Import + render in
src/components/Head.astro(lines around 4 and 310). - All
astro:after-swaplisteners that depend on it:src/components/Head.astro,src/components/CampaignCTA.astro,src/components/CampaignHero.astro,src/lib/resource-form.js,src/lib/api/utm-tracking.ts,src/pages/offers/[...slug].astro,src/pages/offers/expired.astro. - Note the global helpers (
checkAnalyticsConsent,trackEngagementEvent,trackConversionEvent,addCopyCodeButtons) re-bound after swap and the contract they must keep.
- Import + render in
- Audit
entry.slug/entry.render()/entry.collectionusage and inventory every site:- Detail routes:
src/pages/articles/[...slug].astro,src/pages/notes/[...slug].astro,src/pages/works/[...slug].astro,src/pages/bibliophilediaries/[...slug].astro,src/pages/saasguide/[...slug].astro,src/pages/faqs/[...slug].astro.src/pages/illustrations/[...id].astrois a separatealbums-based surface and already usesid. - Index routes:
src/pages/index.astro,src/pages/articles/index.astro,src/pages/notes/index.astro,src/pages/works/index.astro,src/pages/bibliophilediaries/index.astro,src/pages/saasguide/index.astro,src/pages/faqs/index.astro, plussrc/pages/tag/index.astroandsrc/pages/tag/[...slug].astro. - Syndication:
src/pages/rss.xml.js(usesitem.collection+item.slug). - Note the adjacent-post dependency on
Astro.params.slugin the[...slug]files and re-verify thegetAdjacentPostshelper before runtime changes.
- Detail routes:
- Audit Cloudflare adapter wiring before any version bump:
astro.config.mjsadapter block (platformProxy.enabled: true,imageService: 'passthrough').src/env.d.tsRuntime<ENV>typing using@cloudflare/workers-types.wrangler.tomlnodejs_compat,DBbinding, database id.- All seven API routes confirm
export const prerender = false+locals.runtime.env.DB.
- Audit Vite/PostCSS plugin chain in
astro.config.mjsandpostcss.config.cjs. List each plugin (postcss-import,postcss-mixins,postcss-nested,postcss-custom-media,postcss-preset-env,postcss-url,cssnano) with the current baseline version and preserve the chain for Astro 6 validation work. - Audit
markdown.syntaxHighlight: 'prism'and the remark plugins (remarkReadingTime,remarkModifiedTime) for Astro 6 compatibility; flag if Shiki is the new default. - Audit
astro checkinvocation inpackage.json("build": "astro check && astro build") against the@astrojs/checkversion required by Astro 6. - Preserve
src/content/config.tsand the legacydefineCollectionshape until Claude's reviewed migration plan exists.
Goal: close gaps and harden the D1 surface so future framework upgrades are safe. Each task gets its own branch.
- Branch
maintenance/db-scripts-restore: implement the missingscripts/migrate-database.jsandscripts/verify-database.jsto the contract Claude documents indocs/d1_api_contract.md.- Support
--localflag to switch between remote and local D1 via Wrangler. migrate-database.jsruns everyscripts/*.sqlfile in lexical order, idempotent.verify-database.jschecks tables exist (resource_downloads,analytics_events,campaigns,campaign_visits,newsletter, lead form table) and prints schema.- Wire into
npm run db:migrate,db:migrate:local,db:verify,db:verify:local.
- Support
- Branch
maintenance/db-missing-migrations: add SQL migrations for tables already in production but absent fromscripts/.004_create_newsletter.sqlfor thenewslettertable used bysrc/pages/api/newsletter.ts.005_create_leadform.sql(or similar) for the table used bysrc/pages/api/leadform.ts.- Use
CREATE TABLE IF NOT EXISTSso reapplying is safe. - Do not run against remote D1; Jules verifies locally first.
- Branch
maintenance/d1-locals-guard: standardize thelocals?.runtime?.env?.DBguard across all seven API routes; extract into a single helper insrc/lib/api/database.tsif duplication exists, without changing return shapes or status codes. - Hold any change to
wrangler.tomlD1 binding, database id, ornodejs_compatflag until Alok approves explicitly.
Goal: prepare components and pages so Astro upgrade slices do not regress SEO, content URLs, or analytics. Implementation-only on dedicated branches.
- Branch
feature/head-clientrouter-prep: refactorsrc/components/Head.astroso the<ViewTransitions />import is isolated and easy to swap.- Move the import + render to a single, top-of-component block.
- Add a TODO comment referencing
docs/astro_6_2_upgrade_plan.md. - Do not yet swap to
<ClientRouter />.
- Branch
feature/after-swap-helper: extract the repeatedastro:after-swapre-attachment pattern into a small helper module undersrc/lib/and reuse it inHead.astro,CampaignCTA.astro,CampaignHero.astro,resource-form.js,utm-tracking.ts,offers/[...slug].astro,offers/expired.astro. Keep behavior identical so Jules's diff stays clean. - Branch
feature/collection-slug-shim: add a thinsrc/lib/collection-paths.tsexportingentryPath(entry)returning/${entry.collection}/${entry.slug}/. Wire it intorss.xml.jsand the index pages without changing produced URLs. This isolates the futureslug→idrename behind one symbol. - Branch
feature/render-shim: addsrc/lib/render-entry.tsexportingrenderEntry(entry)that returns{ Content, headings, remarkPluginFrontmatter }. Use it from every[...slug].astrodetail route. Same isolation rationale. - Hold all
src/content/config.tsrewrites until Claude's loader migration plan is approved. Treat React components as read-only. - After each branch, instruct Jules to diff
dist/sitemap-*.xml,dist/rss.xml, and one rendered page per collection against the previous build. No rendered HTML drift is acceptable beyond hashed asset filenames.
Goal: execute the phased upgrade slice-by-slice, only after Claude's plan is reviewed and Alok approves each slice. One branch per slice, all feature/ or maintenance/.
- Branch
maintenance/astro-deps-dry-run: bumpastro,@astrojs/check,@astrojs/mdx,@astrojs/rss,@astrojs/sitemap,@astrojs/cloudflare,vite-plugin-pwa,@playform/compress, and@cloudflare/workers-typesto Astro-6-compatible versions inpackage.jsononly; commit, then have Jules runnpm install+npm run buildand report. - Branch
feature/astro-6-clientrouter: replace<ViewTransitions />with<ClientRouter />fromastro:transitionsinsrc/components/Head.astro. Verify everyastro:after-swaplistener still fires (Jules runs preview + click-through on each affected page). - Branch
feature/astro-6-entry-api: switchentry.slug/entry.render()to whatever the upgraded Content API exposes, going through the shims from Milestone 4 (entryPath,renderEntry). Update the shims in one place; no per-page edits. - Branch
feature/astro-6-content-loader(only if approved): migratesrc/content/config.tscollections to the Content Layerloaderpattern, one collection at a time, starting with the lowest-traffic collection (faqs). Keep schemas byte-identical. - Branch
maintenance/astro-6-cloudflare-adapter: address any@astrojs/cloudflareruntime-typing orlocals.runtime.envshape changes. Updatesrc/env.d.tsif and only if the adapter requires it. - Branch
maintenance/astro-6-vite-postcss: address Vite/PostCSS plugin breakage flagged by Jules's build runs. Pin minimum versions; do not introduce new plugins. - After every slice, hand off to Jules for build + preview + diff. Do not chain slices into a single branch.
- During first-run bootstrap, do documentation only.
- Treat React components and any future comment-system React surfaces as read-only unless Alok explicitly assigns them.
- Preserve SEO metadata, schema output, RSS, sitemap, D1 bindings, and basic HTML structure across every slice.
- Do not run database migrations against remote D1 unless Alok explicitly assigns the task.
- Do not bundle multiple Milestone 5 slices into one branch; each slice is independently reviewable.
- Do not commit directly to
main.