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>
7.1 KiB
7.1 KiB
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 newareaServedin 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 tokensframe.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 (Newbornframe.stone, Zwangerschapframe.rust, Gezinaccent, Loveshootframe.taupe, Portrettenframe.olive) andpackageIdfor newborn, zwangerschap and gezin. - Step 9 —
content/shootTypes.test.ts: ids unique and in the agreed order, everypackageIdexists inpackages.ts, everyframeColorexists as a theme token, alt texts non-empty, images 4:5. AshootTypearbitrary intest/arbitraries.tsfor 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 anySiteContentfixtures and thesiteContentarbitrary. - Step 12 —
seo.ts: pureareaServed(areas)→ schema.org items ({ '@type': type, name }), used byprofessionalServiceinstead of the fixedPlaceHuizen. - Step 13 —
seo.test.ts: example test for the real content; PBT: one item per area, order kept,@typeonlyCity/AdministrativeArea, names unchanged, the business JSON-LD still contains no e-mail address;jsonLdScriptoutput 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: optionalframeColor(defaultsand) on the offset block + test (default unchanged, colour applied, block stays decorative). - Step 16 —
MediaText: optionalreverse(photo in the second column fromlg, on top when stacked) andframeColorpassed 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 inAboutIntro. - 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 itsPageSection+ test (the section has the id; the anchor lands below the fixed header via the existingscrollMarginTop). - 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-mijagainst 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 |