Files
AndreaSlopFotografie/aidlc-docs/features/soorten-fotoshoots-page/construction/plans/shared-blocks-and-content-code-generation-plan.md
T
SluijsensandClaude Opus 5.5 166e5d32bb Records unit 1 of the Soorten fotoshoots page as generated
Adds the feature's inception documents (requirements, execution plan,
application design), the code generation plan and summary of unit 1,
its state and audit log, and its row in the active features list.

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

7.1 KiB
Raw Blame History

Code Generation Plan — Unit 1: Shared blocks and content

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 (on master 11a5224).

Unit Context

  • Requirements: FR-SF-02 (photos, frame colours), FR-SF-03 (anchor), FR-SF-06, FR-SF-07, SEO-SF-03 (service area), NFR-SF-02, NFR-SF-06
  • Design: application-design.md, component-methods.md. No Functional Design for this unit (plan decision).
  • Depends on: nothing new; reuses PageSection, Reveal, DeferredImage, theme.
  • Used by: unit 2 (the page); portfolio-page (commit A); contact-page (commit B).
  • Behavioural contract for existing pages: homepage and Over mij render exactly as before, except the invisible id="prijzen" on the pricing section and the new areaServed in the business JSON-LD on every page.

The unit is delivered as three commits, in this order, so the parallel features can cherry-pick early (worktrees share the repository, so a local commit hash is enough; no push needed for that).

Steps

Commit A — Shoot types and photos (hash → portfolio-page)

  • Step 1 — Download the four live shoot photos from andreaslop.nl into the scratchpad (not the repo): 2026/07/F41A8700_websize.jpg (Newborn), 2026/07/F41A7856_websize.jpg (Zwangerschap), 2025/08/e77ff000dce5a31c0a38c5d824bfdb95.jpeg (Loveshoot), 2024/09/DSC_0433-1-scaled.jpg (Portretten). Check which photo belongs to which shoot by looking at them.
  • Step 2 — Gezin photo: collect candidates from the live site (portfolio, homepage), look at them, check with portfolio-page that the candidate is not one of its 10 portfolio photos (or reuse its file if it is), and propose one to the user.
  • Step 3 — Write a one-off resize script in the scratchpad (PowerShell/System.Drawing as in earlier features, EXIF orientation, cover crop with -FocusX/-FocusY, JPEG quality 80). Make a 4:5 crop per photo (960×1200) with a chosen focus point and a contact sheet of the five crops. Checkpoint: show the crops to the user and adjust focus points or swap a photo until approved (FR-SF-02).
  • Step 4 — Write the approved crops to web/src/assets/shoots/{newborn,zwangerschap,gezin,loveshoot,portret}.jpg; record exact sizes.
  • Step 5 — Look at each final crop and write a descriptive Dutch alt text (for Andrea to review).
  • Step 6 — theme.ts: colour tokens frame.stone #ABA699, frame.rust #975030, frame.taupe #A18679, frame.olive #84847C (English comments).
  • Step 7 — content/types.ts: ShootTypeId, FrameColor, ShootType (as in component-methods.md).
  • Step 8 — content/shootTypes.ts: the five shoot types in page order with the approved texts (FR-SF-02; Gezin marked in a comment as a draft pending Andrea's approval), photos, frame colours (Newborn frame.stone, Zwangerschap frame.rust, Gezin accent, Loveshoot frame.taupe, Portretten frame.olive) and packageId for newborn, zwangerschap and gezin.
  • Step 9 — content/shootTypes.test.ts: ids unique and in the agreed order, every packageId exists in packages.ts, every frameColor exists as a theme token, alt texts non-empty, images 4:5. A shootType arbitrary in test/arbitraries.ts for unit 2's properties.
  • Step 10 — Run the affected tests, lint and type check; commit A ("Adds the shoot types and their photos"); send the hash to portfolio-page.

Commit B — Service area (hash → contact-page)

  • Step 11 — content/types.ts: ServiceArea, SiteContent.serviceArea; content/siteContent.ts: [{ type: 'City', name: 'Huizen' }, { type: 'AdministrativeArea', name: 'Gooi en Vechtstreek' }]. Update any SiteContent fixtures and the siteContent arbitrary.
  • Step 12 — seo.ts: pure areaServed(areas) → schema.org items ({ '@type': type, name }), used by professionalService instead of the fixed Place Huizen.
  • Step 13 — seo.test.ts: example test for the real content; PBT: one item per area, order kept, @type only City/AdministrativeArea, names unchanged, the business JSON-LD still contains no e-mail address; jsonLdScript output stays escaped.
  • Step 14 — Run the affected tests, lint and type check; commit B ("Shares the service area in the structured data"); send the hash to contact-page.

Commit C — Shared blocks

  • Step 15 — FramedImage: optional frameColor (default sand) on the offset block + test (default unchanged, colour applied, block stays decorative).
  • Step 16 — MediaText: optional reverse (photo in the second column from lg, on top when stacked) and frameColor passed through + tests (default order unchanged, reversed order, DOM order photo-first in both cases so reading order stays the same).
  • Step 17 — Move components/about/RichParagraph/ → components/RichParagraph/ (component and test, git mv), update the import in AboutIntro.
  • Step 18 — components/CallToAction/CallToAction.tsx + test: section named by its h2, paper.alt, narrow centred column, tight spacing, lead and children rendered, Reveal, axe.
  • Step 19 — home/Pricing: id="prijzen" on its PageSection + test (the section has the id; the anchor lands below the fixed header via the existing scrollMarginTop).
  • Step 20 — pnpm check (lint, format, tests incl. coverage thresholds, build, audits, Lighthouse) with nothing else heavy running on the machine.
  • Step 21 — Visual check: homepage (About block, pricing) and /over-mij against master at desktop, tablet and phone widths; only invisible changes expected.
  • Step 22 — Write construction/shared-blocks-and-content/code/code-summary.md (files, resize commands, image sizes, alt texts, commit hashes).
  • Step 23 — Commit C ("Extends the shared blocks for the shoot types page"). Push only when asked.

Extension Compliance (unit 1)

Rule Status Rationale
SECURITY-04 Compliant CSP unchanged; only self-hosted images
SECURITY-10 Compliant No new dependencies; image processing is a one-off local step
SECURITY-11 Compliant JSON-LD through jsonLdScript; no e-mail (PBT, Step 13)
SECURITY-13 Compliant No external resources at runtime
Other SECURITY rules N/A No data stores, endpoints, auth or infrastructure
PBT-01 Compliant Properties for areaServed listed in Step 13; unit 2's in its Functional Design
PBT-02 Compliant jsonLdScript round-trip already tested
PBT-03 Planned areaServed invariants (Step 13)
PBT-04, PBT-05, PBT-06 N/A No idempotent, oracle or stateful logic in this unit
PBT-07 Planned shootType arbitrary, serviceArea in the siteContent arbitrary (Steps 9, 11)
PBT-08, PBT-09 Compliant Existing seed logging and fast-check setup
PBT-10 Planned Example-based component tests alongside PBT