Docs for 1.9.2: import instead of code; docs↔code consistency test; audit accepts one-line routes
- AGENT.md: §7 full capability catalog (need → import), §0b/§3/§6 on RenderForm, SiteProviders, createPageRoute, re-exported routes, plugin section fields, resolveLink/resolveNav - PROGRAMISTA §2.4, §2.7–2.8 rewritten; §6 items 28–33 (28: FormRenderer leaked the Emails tab) - forms, links, blocks, pages, consent, turnstile, notifications, seo, mcp, i18n, deployment docs - ipal-form: RenderForm block, formClasses, CustomForm example (FormRenderer template removed), seed template handles steps and option labels per language - ipal-nav, ipal-block, ipal-setup, ipal-upgrade, ipal-seo-check, ipal-consent-check, vibe.md - ipal-audit: re-export routes and SiteProviders satisfy the mandatory set; flags form-engine copies, project section fields / navigation, server entries in client components - test/docsConsistency: docs imports exist in code; every public export is documented - CHANGELOG 1.9.2 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+19
-20
@@ -127,14 +127,13 @@ Sprawdź: lista języków istnieje tylko w `i18n.config.ts` (grep `'pl'` w `src`
|
||||
|
||||
```
|
||||
Zrób zgodnie z AGENT.md §5.3 i §6.2:
|
||||
1. src/fields/sectionHeader.ts, sectionSettings.ts — kod 1:1 z
|
||||
node_modules/@intecion/ipal-kit/docs/agent/skills/ipal-block/resources/kod-sekcji.md
|
||||
(linki: buildLinkField/buildLinksField z @intecion/ipal-kit — nie kopiuj).
|
||||
1. Wspólne pola sekcji i linki są w pluginie: buildSectionHeaderField, buildSectionSettingsField,
|
||||
buildLinkField, buildLinksField z @intecion/ipal-kit — nie kopiuj, nie twórz src/fields/.
|
||||
2. collections/Media.ts: upload (mimeTypes obrazy + PDF + mp4), alt required localized,
|
||||
normalizeFilenameHook, buildOptimizeUploadHook + buildOptimizeUploadField (storage.md); jeśli R2 — buildR2Storage(['media'], { s3Storage }) z env, s3Storage
|
||||
wstrzyknięty z @payloadcms/storage-s3 (storage.md).
|
||||
3. collections/Pages.ts: title localized, buildSlugField, buildNoindexField,
|
||||
layout typu blocks (na razie jeden blok Content: sectionHeaderField + content richText),
|
||||
layout typu blocks (na razie jeden blok Content: buildSectionHeaderField + content richText),
|
||||
trackSlugHistoryHook, buildRevalidateHook (hooks.md).
|
||||
NIE twórz kolekcji users, settings, navigation ani żadnych innych.
|
||||
Potem pnpm generate:types i payload generate:importmap.
|
||||
@@ -167,12 +166,12 @@ Plan najpierw.
|
||||
```
|
||||
Zrób zgodnie z PROGRAMISTA.md §2.6–2.8 i AGENT.md §4:
|
||||
- src/proxy.ts z createProxy, matcher jako literał inline,
|
||||
- src/lib/content.ts z createContentHelpers (w tym getNotFoundPage, generateStaticParams),
|
||||
- app/(frontend)/[locale]/layout.tsx: BEZ <head>, MediaPreconnect w body,
|
||||
ConsentProvider + CookieBanner + CookieButton + Analytics wewnątrz providera,
|
||||
- [locale]/[[...slug]]/page.tsx: revalidate, generateStaticParams, BEZ searchParams,
|
||||
resolveRedirect przed notFound, enhanceProps wstrzykuje locale do bloków,
|
||||
- [locale]/not-found.tsx z getNotFoundPage dla każdego języka + LocaleView, BEZ headers() (pages.md).
|
||||
- src/lib/content.ts z createContentHelpers (PROGRAMISTA §2.7 — eksportuje też trasy, getSiteShell, resolveNav),
|
||||
- app/(frontend)/[locale]/layout.tsx: BEZ <head>, <SiteProviders shell={await getSiteShell(locale)} …>
|
||||
(zgoda, baner equalChoice, Turnstile, Analytics, JSON-LD, preconnect — w dobrej kolejności),
|
||||
- [locale]/[[...slug]]/page.tsx: createPageRoute(content, { blocks, notFound, permanentRedirect }) +
|
||||
export const revalidate (literał), BEZ searchParams,
|
||||
- [locale]/not-found.tsx: createNotFoundPage(content, { blocks }) — BEZ headers() (pages.md).
|
||||
Plan najpierw.
|
||||
```
|
||||
Sprawdź: `/` → `/<domyślny język>`; `pnpm build` pokazuje strony jako `●`;
|
||||
@@ -184,11 +183,11 @@ Sprawdź: `/` → `/<domyślny język>`; `pnpm build` pokazuje strony jako `●`
|
||||
|
||||
```
|
||||
Zrób wg PROGRAMISTA.md §2.8–2.9 i seo.md:
|
||||
- app/sitemap.xml/route.ts (sitemapRoute z lib/content), robots.ts, manifest.ts (createManifestHandler), llms.txt/route.ts,
|
||||
- re-eksporty z lib/content: app/sitemap.xml/route.ts (sitemapRoute), robots.ts (robots), manifest.ts (manifest), llms.txt/route.ts (llmsRoute),
|
||||
api/health/route.ts — każda trasa czytająca bazę z export const dynamic = 'force-dynamic',
|
||||
- next.config.ts: htmlLimitedBots, buildSecurityHeaders,
|
||||
- metadata strony przez generatePageMetadata z lib/content (wspólny cache), favicon przez buildIconsMetadata,
|
||||
- JSON-LD w root layoucie: Organization + WebSite (seo.md) z danych z panelu,
|
||||
- JSON-LD: Organization + WebSite daje SiteProviders z Site Settings; firma lokalna → siteJsonLd w createContentHelpers (seo.md),
|
||||
- src/instrumentation.ts z assertEnv(ipalEnvRules(...)) importowanym z @intecion/ipal-kit/env (env.md).
|
||||
CSP jeszcze nie — będzie w kroku 14.
|
||||
Plan najpierw.
|
||||
@@ -207,7 +206,7 @@ Zrób wg AGENT.md §6.8, kod z node_modules/@intecion/ipal-kit/docs/agent/skills
|
||||
- globals/Header.ts, Footer.ts (kod z §6.8),
|
||||
- globals/Company.ts dla rynku <PL/AU/…>: nazwa, adres, <NIP/ABN/…>, telefon, email —
|
||||
wszystko localized tam, gdzie tekst,
|
||||
- lib/navigation.ts (resolveNav), components/layout/Header.tsx, Footer.tsx, MobileNav.tsx,
|
||||
- menu przez resolveNav z lib/content (plugin, NIE lib/navigation.ts), components/layout/Header.tsx, Footer.tsx, MobileNav.tsx,
|
||||
- linki prawne w stopce z ról System Pages, NIE ręcznie,
|
||||
- hook afterChange na globalach z revalidatePath('/', 'layout').
|
||||
Podepnij w [locale]/layout.tsx. Etykiety a11y z panelu.
|
||||
@@ -234,8 +233,8 @@ Skrót: `/ipal-block <Nazwa> — <pola z 9a>, <opis wyglądu / zrzut>`.
|
||||
|
||||
```
|
||||
Zbuduj blok <nazwa> wg AGENT.md §6 (warstwa 3):
|
||||
- src/blocks/<Nazwa>/config.ts: sectionHeaderField, buildLinksField, media, items,
|
||||
sectionSettingsField — tylko pola z listy z kroku 9a, nazwy z §6.5,
|
||||
- src/blocks/<Nazwa>/config.ts: buildSectionHeaderField, buildLinksField, media, items,
|
||||
buildSectionSettingsField — tylko pola z listy z kroku 9a, nazwy z §6.5,
|
||||
- Component.tsx: Section + SectionHeader + Media + CMSLink, max ~80 linii JSX,
|
||||
powtarzalne elementy w <Nazwa>Card.tsx, interakcja w osobnym pliku 'use client' (§6.9),
|
||||
- dodaj do Pages.layout i do blocks/registry.ts,
|
||||
@@ -253,11 +252,11 @@ Skrót: `/ipal-form <formularz, odbiorca zgłoszeń>`.
|
||||
|
||||
```
|
||||
Zrób wg forms.md, turnstile.md, email.md:
|
||||
- blok formularza korzystający z form-buildera pluginu (pola i teksty z panelu),
|
||||
- logika przez useForm/useContactForm z @intecion/ipal-kit/client — bez ręcznego useState,
|
||||
- blok formularza: <RenderForm> z @intecion/ipal-kit/rsc + formClasses.ts (skill ipal-form) — pola, kroki,
|
||||
listy wyboru i teksty z panelu, żadnego własnego renderera,
|
||||
- checkbox consent (zgoda RODO) z linkiem do polityki przez getSystemPagePath,
|
||||
- TurnstileProvider w layoucie (siteKey z getSiteIntegrations) — bez przekazywania siteKey do bloku,
|
||||
- honeypot, zdarzenie form_submit (formAnalyticsOnSuccess).
|
||||
- Turnstile z SiteProviders w layoucie — bez przekazywania siteKey do bloku,
|
||||
- honeypot i zdarzenie GTM z panelu robi RenderForm sam (forms.md).
|
||||
Plan najpierw.
|
||||
```
|
||||
Sprawdź: panel → Site Integrations → Send test; wysłanie formularza bez zgody → odrzucone.
|
||||
@@ -268,7 +267,7 @@ Sprawdź: panel → Site Integrations → Send test; wysłanie formularza bez zg
|
||||
|
||||
```
|
||||
Zweryfikuj i dokończ wg consent.md i analytics.md:
|
||||
- Analytics wewnątrz ConsentProvider, ID tylko z Site Integrations,
|
||||
- Analytics przez SiteProviders (wewnątrz zgody), ID tylko z Site Integrations,
|
||||
- czy włączyć defer (Core Web Vitals) — <tak/nie>,
|
||||
- Meta Pixel: <w panelu | w GTM> (nigdy oba),
|
||||
- link do polityki w banerze: automatyczny (bez parametru privacyPolicy w kodzie).
|
||||
|
||||
Reference in New Issue
Block a user