Files
SluijsensandClaude Opus 5.5 ce2cb92539
Continuous Integration / check (pull_request) Successful in 10m50s
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 12m29s
Continuous Integration / deploy-production (pull_request) Skipped
Records unit 2 of the Soorten fotoshoots page as generated
Adds the functional design and code generation plan of unit 2, its code
summary with the verification, the agreements with the parallel
features, and updates the shared reverse engineering lines, the state
and the audit log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:00:28 +01:00

6.2 KiB
Raw Permalink Blame History

Code Generation Plan — Unit 2: Soorten fotoshoots page

Single source of truth for code generation of this unit. Workspace root: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots (worktree); code in web/. Branch feature/soorten-fotoshoots-page.

Unit Context

  • Requirements: FR-SF-01..05 (incl. 04b), FR-SF-08, SEO-SF-01..05, NFR-SF-01, 03..05, 07
  • Design: application-design.md; functional design in construction/soorten-fotoshoots-page/functional-design/ (BR-SF-01..18)
  • Depends on: unit 1 (shootTypes, MediaText options, CallToAction, RichParagraph, #prijzen, areaServed) — done; webPage() from contact-page (see Step 6)
  • Behavioural contract for other pages: none change, except that the sitemap and Lighthouse indexed list gain /soorten-fotoshoots

Steps

Preview image

  • Step 1 — 1200×630 crop of the Newborn original (focus on the face) with the unit 1 scratchpad script → web/public/og-soorten-fotoshoots.jpg; show it to the user with the alt text before it is fixed (checkpoint, like the shoot crops).

Content

  • Step 2 — content/types.ts: ShootTypesPageContent (domain-entities.md).
  • Step 3 — content/shootTypesPageContent.ts: page head, closing title, lead (RichText with "de pakketten" → /#prijzen) and booking link.

Pure functions

  • Step 4 — lib/shootLinks.ts: shootContactLink(shoot, packages), shootPortfolioLink(shoot), isPortfolioLive(pages) (BR-SF-01..05).
  • Step 5 — lib/shootLinks.test.ts: examples for the real content (newborn with ?pakket, loveshoot without, portfolio live/not live) and PBT from business-logic-model.md (to/hash fixed, pakket iff visible package id, no foreign values, portfolio search equals id).

SEO

  • Step 6 — webPage(): contact-page has it done and tested, waiting for its user's approval (generic over extra: webPage<Extra extends object>(type, path, extra?)). Do not build it here: write against the signature and cherry-pick contact-page's commit (seo.ts + seo.test.ts) as soon as the hash arrives; the route and its head test can only be committed after that.
  • Step 7 — seo.ts: absoluteUrl(src) and shootServices(shoots, site) (BR-SF-10..15).
  • Step 8 — seo.test.ts: examples for the real shoot list (5 items, @ids with anchors, first paragraph, provider, area, no prices) and PBT (count and positions, distinct @ids, provider/area invariants, no e-mail, absoluteUrl invariant + idempotency).
  • Step 9 — sitePages.ts: /soorten-fotoshoots indexed: true, new description, ogImage. lighthouserc.cjs: move /soorten-fotoshoots to indexedPaths (only this entry).

Components

  • Step 10 — components/shoots/ShootBlock/ShootBlock.tsx + test: article with anchor id and name, h2, paragraphs, MediaText (4:5, frame colour, reverse, priority), contact link with hidden completion, portfolio link only when live, axe.
  • Step 11 — components/shoots/ShootList/ShootList.tsx + test: order, alternation (reverse on 2nd/4th), divider on every block after the first, only the first photo with priority, axe.

Route

  • Step 12 — routes/soorten-fotoshoots.tsx: head (pageHead + structuredDataScript(webPage(...))) and composition (PageIntro with intro → ShootList → CallToAction with RichParagraph lead and LinkButton accent).
  • Step 13 — Route tests in app.test.tsx: /soorten-fotoshoots in the shell; heading outline (h1, 5× h2 shoots, h2 closing); five articles with anchors; contact links incl. ?pakket targets; no portfolio links while /portfolio is noindex; /#prijzen link; no noindex; the WebPage script with 5 services; axe on the whole page.

Documentation

  • Step 14 — LAYOUT.md: "Types of shoots" → Intro, Newborn, Pregnancy, Family, Loveshoot, Portraits, Prices & Book, per .ai/layout-conventions.md.
  • Step 15 — _shared/reverse-engineering/: only this feature's lines (route table, new components CallToAction, shoots/*, RichParagraph location, content shootTypes/page content, serviceArea, /soorten-fotoshoots indexed).

Verification and summary

  • Step 16 — pnpm check (lint, format, tests incl. coverage, build, audits, Lighthouse with /soorten-fotoshoots as indexed page), after "claim 4173" to the peers and "4173 free" afterwards.
  • Step 17 — Visual check of /soorten-fotoshoots against design/andreaslop-static/soorten-fotoshoots.html at desktop, tablet and phone widths (puppeteer-core screenshots); anchors #newborn and /#prijzen land below the header; screenshots sent to the user.
  • Step 18 — Write construction/soorten-fotoshoots-page/code/code-summary.md (files, preview image, verification, open items for Andrea).
  • Step 19 — Commit(s) on feature/soorten-fotoshoots-page. Push/deploy to test only when asked; the merge to master waits for Andrea's approval of the Gezin text and the alt texts (BR-SF-17).

Extension Compliance (unit 2)

Rule Status Rationale
SECURITY-04 Compliant CSP unchanged; only self-hosted images
SECURITY-05 Compliant Query parameters only from our own package and shoot ids (BR-SF-03, PBT)
SECURITY-10 Compliant No new dependencies
SECURITY-11 Compliant JSON-LD through jsonLdScript; no e-mail, no prices (PBT)
SECURITY-13 Compliant No external resources at runtime
Other SECURITY rules N/A No data stores, endpoints, auth or infrastructure
PBT-01 Compliant Properties identified in business-logic-model.md
PBT-02 Compliant jsonLdScript round-trip already tested
PBT-03 Planned Link and structured data invariants (Steps 5, 8)
PBT-04 Planned absoluteUrl idempotency (Step 8)
PBT-05, PBT-06 N/A No oracle, no stateful logic
PBT-07 Compliant shootType/uniqueShootTypes from unit 1, existing package and site arbitraries
PBT-08, PBT-09 Compliant Existing seed logging and fast-check setup
PBT-10 Planned Example-based component and route tests alongside PBT