Docs in English (part 1), seeding guide, Coolify deployment

- Translate to English every doc the code branches did not touch: AGENT.md,
  developer guide, vibe, CHANGELOG, docs index, module pages, all skills
  except ipal-seo-check (14 pages follow after the security/SEO merge).
  Placeholder marker is now [TO FILL: …]; skill resources renamed to
  section-code.md / nav-code.md. AGENT.md and the ipal-skills pointer
  block say the docs are in English.
- docs/seeding.md: create-only, natural keys, never delete, no users or
  secrets, empty-field globals, fallbackLocale: false, dry run, backup and
  restore, production update guard, seeds vs migrations, Coolify Terminal.
  Seed templates gain --dry-run, the SEED_UPDATE production guard
  (IPAL_SEED_ALLOW_PROD_UPDATE), skip of edited records and a summary.
  "Seeding on production" rule block in AGENT.md.
- Coolify is the single deployment path (deployment, env, developer guide,
  ipal-setup): build vs runtime env, migrations on container start
  (prodMigrations), health check and rolling updates, rollback, backups and
  restore, DNS/Let's Encrypt/CAA. R2: custom domain needs a Cloudflare zone;
  default is media served by the app (R2_PUBLIC_URL empty).
- docsConsistency: no Polish prose outside code/quoted data (pending pages
  listed); IPAL_* names may also be read by shipped skill templates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-22 17:39:03 +02:00
co-authored by Claude Opus 5.5
parent 6e3979bae6
commit 2d9f3e15d4
47 changed files with 6102 additions and 5355 deletions
+452 -426
View File
File diff suppressed because it is too large Load Diff
+244 -244
View File
@@ -1,432 +1,432 @@
# vibe.md — polecenia dla AI, krok po kroku
# vibe.md — prompts for the AI, step by step
> **Dla kogo:** osoba, która buduje projekt klienta, prowadząc agenta AI
> (Antigravity, Claude Code, Cursor). Tu są **gotowe polecenia do wklejenia**, w
> kolejności, moduł po module. Reguły, których agent ma się trzymać, są w
> [AGENT.md](../agent/AGENT.md); proces dla człowieka w [PROGRAMISTA.md](./PROGRAMISTA.md).
> **Who it is for:** the person who builds a client project by driving an AI agent
> (Antigravity, Claude Code, Cursor). Here are **ready-made prompts to paste**, in
> order, module by module. The rules the agent must follow are in
> [AGENT.md](../agent/AGENT.md); the process for humans is in [PROGRAMISTA.md](./PROGRAMISTA.md).
---
## TRYB AUTONOMICZNY (zalecany) — jedno polecenie, raport na końcu
## AUTONOMOUS MODE (recommended) — one prompt, a report at the end
Agent pracuje jak samodzielny wykonawca (AGENT.md §0a): pyta raz, jedną listą,
tylko o brakujące dane; decyzje techniczne podejmuje sam; sam sprawdza swoją
pracę; odzywa się dopiero z raportem końcowym (albo gdy ipal-kit ma błąd).
The agent works like an independent contractor (AGENT.md §0a): it asks once, in one list,
only for missing data; it makes technical decisions itself; it checks its own
work; it speaks up only with the final report (or when ipal-kit has a bug).
```
/ipal-site <brief: klient, branża, strony i sekcje, języki, formularze — albo ścieżka do pliku z briefem>
/ipal-site <brief: client, industry, pages and sections, languages, forms — or a path to a brief file>
```
Ty: odpowiadasz na listę pytań (albo nie — przyjmie wartości domyślne), na końcu
czytasz raport: co zrobione, wyniki kontroli, placeholdery `[DO UZUPEŁNIENIA]`,
zgłoszenia do ipal-kit. Kroki poniżej to **tryb prowadzony** — gdy chcesz
kontrolować każdy etap albo poprawić jedną rzecz.
You: answer the list of questions (or don't — it will use the defaults), and at the end
read the report: what was done, check results, `[TO FILL]` placeholders,
reports to ipal-kit. The steps below are **guided mode** — for when you want to
control each stage or fix one thing.
| Potrzeba | Polecenie |
| Need | Prompt |
|---|---|
| nowa sekcja / poprawka sekcji | `/ipal-block <Nazwa> — <opis/zrzut>` |
| formularz | `/ipal-form <jaki formularz, gdzie, kto dostaje zgłoszenia>` |
| nowy język | `/ipal-locale-add <kod> — <kto tłumaczy>` |
| zmiana pól z treścią w bazie | `/ipal-migrate-fields <co na co>` |
| coś nie działa | `/ipal-debug <objaw / komunikat>` |
| SEO / Google nie widzi | `/ipal-seo-check <url>` |
| RODO / piksele przed zgodą | `/ipal-consent-check <url>` |
| przed oddaniem | `/ipal-audit` |
| new section / section fix | `/ipal-block <Name> — <description/screenshot>` |
| form | `/ipal-form <which form, where, who receives submissions>` |
| new language | `/ipal-locale-add <code> — <who translates>` |
| change fields that have content in the database | `/ipal-migrate-fields <what to what>` |
| something does not work | `/ipal-debug <symptom / message>` |
| SEO / Google does not see it | `/ipal-seo-check <url>` |
| GDPR / pixels before consent | `/ipal-consent-check <url>` |
| before handover | `/ipal-audit` |
---
## Jak pracować z agentem w trybie prowadzonym (przeczytaj raz)
## How to work with the agent in guided mode (read once)
1. **Jeden krok = jedno polecenie = jeden commit.** Nie wklejaj trzech kroków
naraz. Agent, który robi wszystko jednocześnie, gubi reguły.
2. **Najpierw plan, potem kod.** Każde polecenie kończy się prośbą o plan; kod
dopiero po Twoim „OK”. Plan sprawdzasz w 30 sekund, zły kod poprawiasz godzinę.
3. **Każdy krok kończy się dowodem:** wynik `pnpm build` i kontroli z AGENT.md §11.
„Gotowe” bez wyniku komend = nie gotowe.
4. **Nowa rozmowa co kilka kroków.** Długi kontekst rozmywa reguły. Każda nowa
rozmowa zaczyna się od **Polecenia 0**.
5. **Wartości w `<…>` uzupełniasz Ty** przed wklejeniem.
6. Gdy agent łamie regułę — użyj poleceń naprawczych z końca pliku, nie tłumacz
od nowa.
1. **One step = one prompt = one commit.** Do not paste three steps
at once. An agent that does everything at the same time loses the rules.
2. **Plan first, then code.** Every prompt ends with a request for a plan; code
only after your "OK". You check a plan in 30 seconds; bad code takes an hour to fix.
3. **Every step ends with proof:** the output of `pnpm build` and the checks from AGENT.md §11.
"Done" without command output = not done.
4. **A new conversation every few steps.** A long context blurs the rules. Every new
conversation starts with **Prompt 0**.
5. **You fill in the values in `<…>`** before pasting.
6. When the agent breaks a rule — use the repair prompts at the end of this file; do not explain
it again from scratch.
**Skille zamiast długich poleceń.** Gdy w projekcie są skille ipal-kit
(`pnpm exec ipal-skills`, AGENT.md §14), większość kroków to jedno krótkie
polecenie, np. `/ipal-block Hero — <opis/zrzut>`. Polecenia poniżej działają
też bez skilli; przy krokach podana jest wersja skrótowa.
**Skills instead of long prompts.** When the project has the ipal-kit skills
(`pnpm exec ipal-skills`, AGENT.md §14), most steps are one short
prompt, e.g. `/ipal-block Hero — <description/screenshot>`. The prompts below also work
without skills; the short version is given at each step.
**Prefiks do każdego polecenia** (wklej na początku, jeśli agent nie czyta
`AGENTS.md` sam):
**Prefix for every prompt** (paste it at the start if the agent does not read
`AGENTS.md` by itself):
```
Pracujesz zgodnie z node_modules/@intecion/ipal-kit/docs/agent/AGENT.md i AGENTS.md projektu.
Najpierw plan (pliki do utworzenia/zmiany + co w nich), czekaj na moje OK, potem kod.
Na końcu pokaż wynik pnpm build i kontroli z AGENT.md §11.
Work according to node_modules/@intecion/ipal-kit/docs/agent/AGENT.md and the project's AGENTS.md.
Plan first (files to create/change + what goes in them), wait for my OK, then code.
At the end show the output of pnpm build and the checks from AGENT.md §11.
```
---
## KROK 0 — Kontekst (początek każdej nowej rozmowy)
## STEP 0 — Context (start of every new conversation)
```
Przeczytaj w całości node_modules/@intecion/ipal-kit/docs/agent/AGENT.md oraz AGENTS.md
w roocie projektu. Nie pisz jeszcze kodu.
Odpowiedz w 10 punktach, jakie zasady z AGENT.md są dla tego projektu
najważniejsze, i wypisz, na którym kroku z node_modules/@intecion/ipal-kit/docs/dev/vibe.md jesteśmy
(sprawdź stan repo: git log, istniejące pliki).
Read node_modules/@intecion/ipal-kit/docs/agent/AGENT.md and AGENTS.md in the project root
in full. Do not write code yet.
Answer in 10 points which rules from AGENT.md matter most for this project,
and state which step of node_modules/@intecion/ipal-kit/docs/dev/vibe.md we are on
(check the repo state: git log, existing files).
```
Sprawdź: agent wymienia m.in. proxy.ts zamiast middleware, zakaz hardkodowania,
buildLinksField/CMSLink, minimum kolekcji. Jeśli nie — każ mu przeczytać jeszcze raz.
Check: the agent mentions, among others, proxy.ts instead of middleware, no hardcoding,
buildLinksField/CMSLink, minimum collections. If not — tell it to read again.
---
## KROK 1 — Szkielet i instalacja
## STEP 1 — Skeleton and installation
Skrót: `/ipal-setup` (prowadzi przez kroki 1–8, etap po etapie).
Short version: `/ipal-setup` (walks through steps 1–8, stage by stage).
```
Postaw nowy projekt Payload 3 + Next 16 zgodnie z PROGRAMISTA.md §1 i §2.1:
- .npmrc z rejestrem @intecion,
- @intecion/ipal-kit + zależności z PROGRAMISTA.md §1 (w tym @clocklimited/payload-2fa),
- pnpm.overrides na 3.90.2 dla payload i wszystkich @payloadcms/*,
- skrypt build z --webpack,
- usuń starter (frontend)/layout.tsx i page.tsx,
- .env.example z PROGRAMISTA.md §3 (bez wartości), .env w .gitignore.
Baza: <postgres|mongo>. NIE twórz middleware.ts.
Plan najpierw.
Set up a new Payload 3 + Next 16 project according to PROGRAMISTA.md §1 and §2.1:
- .npmrc with the @intecion registry,
- @intecion/ipal-kit + the dependencies from PROGRAMISTA.md §1 (including @clocklimited/payload-2fa),
- pnpm.overrides to 3.90.2 for payload and all @payloadcms/*,
- build script with --webpack,
- remove the starter (frontend)/layout.tsx and page.tsx,
- .env.example from PROGRAMISTA.md §3 (no values), .env in .gitignore.
Database: <postgres|mongo>. Do NOT create middleware.ts.
Plan first.
```
Sprawdź: `pnpm install` bez błędów, brak `middleware.ts`, `.npmrc` w repo.
Check: `pnpm install` without errors, no `middleware.ts`, `.npmrc` in the repo.
---
## KROK 2 — AGENTS.md projektu
## STEP 2 — Project AGENTS.md
```
Utwórz AGENTS.md w roocie wg szablonu z AGENT.md §13. Dane:
klient <nazwa>, domena <domena>, rynek <PL/AU/…>, branża <…>,
języki <pl, en, …> (domyślny <pl>), media <R2/lokalne>, email <SMTP/Graph>.
Ustalenia projektu: <np. „blog z kategoriami”, „404 = osobna strona”, „bez sklepu”>.
Nie kopiuj reguł z AGENT.md — tylko odnośnik.
Create AGENTS.md in the root from the template in AGENT.md §13. Data:
client <name>, domain <domain>, market <PL/AU/…>, industry <…>,
languages <pl, en, …> (default <pl>), media <R2/local>, email <SMTP/Graph>.
Project decisions: <e.g. "blog with categories", "404 = separate page", "no shop">.
Do not copy rules from AGENT.md — only a link.
```
---
## KROK 3 — Konfiguracja: i18n + payload.config
## STEP 3 — Configuration: i18n + payload.config
```
Zrób src/i18n.config.ts (as const satisfies I18nConfig) z językami <…>
i payload.config.ts wg PROGRAMISTA.md §2.3:
ipalKit z i18n, access, pages (slug 'pages'), seo, forms,
twoFactor z WSTRZYKNIĘTYM payloadTotp (issuer: '<nazwa klienta>'), whiteLabel: true,
email: mailAdapter(). Kolekcji treści jeszcze nie dodawaj.
Plan najpierw.
Create src/i18n.config.ts (as const satisfies I18nConfig) with languages <…>
and payload.config.ts according to PROGRAMISTA.md §2.3:
ipalKit with i18n, access, pages (slug 'pages'), seo, forms,
twoFactor with INJECTED payloadTotp (issuer: '<client name>'), whiteLabel: true,
email: mailAdapter(). Do not add content collections yet.
Plan first.
```
Sprawdź: lista języków istnieje tylko w `i18n.config.ts` (grep `'pl'` w `src`).
Check: the language list exists only in `i18n.config.ts` (grep `'pl'` in `src`).
---
## KROK 4 — Kolekcje rdzenia + wspólne pola
## STEP 4 — Core collections + shared fields
```
Zrób zgodnie z AGENT.md §5.3 i §6.2:
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,
Do this according to AGENT.md §5.3 and §6.2:
1. Shared section fields and links are in the plugin: buildSectionHeaderField, buildSectionSettingsField,
buildLinkField, buildLinksField from @intecion/ipal-kit — do not copy them, do not create src/fields/.
2. collections/Media.ts: upload (mimeTypes images + PDF + mp4), alt required localized,
normalizeFilenameHook, buildOptimizeUploadHook + buildOptimizeUploadField, buildMediaPlaceholderHook +
buildMediaPlaceholderField (media.md); buildR2Storage(['media'], { s3Storage }) w payload.config.ts
(R2 przy komplecie R2_* w env, inaczej dysk lokalny), s3Storage wstrzyknięty z @payloadcms/storage-s3 (storage.md).
buildMediaPlaceholderField (media.md); buildR2Storage(['media'], { s3Storage }) in payload.config.ts
(R2 when all R2_* are set in env, otherwise local disk), s3Storage injected from @payloadcms/storage-s3 (storage.md).
3. collections/Pages.ts: title localized, buildSlugField, buildNoindexField,
layout typu blocks (na razie jeden blok Content: buildSectionHeaderField + content richText),
layout of type blocks (for now one Content block: 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.
Plan najpierw.
Do NOT create users, settings, navigation or any other collections.
Then pnpm generate:types and payload generate:importmap.
Plan first.
```
Sprawdź: w `collections/` są tylko `Pages.ts` i `Media.ts`; w `payload-types.ts`
są typy `CmsLink`, `SectionHeaderData`, `SectionSettings`.
Check: `collections/` contains only `Pages.ts` and `Media.ts`; `payload-types.ts`
has the types `CmsLink`, `SectionHeaderData`, `SectionSettings`.
---
## KROK 5 — Design tokeny i prymitywy UI
## STEP 5 — Design tokens and UI primitives
Wcześniej: `/impeccable init` i `/impeccable document` → `PRODUCT.md`, `DESIGN.md`.
Before this: `/impeccable init` and `/impeccable document` → `PRODUCT.md`, `DESIGN.md`.
```
Na podstawie DESIGN.md zrób src/app/(frontend)/styles.css wg AGENT.md §6.11:
@theme z tokenami (primary, background, foreground, muted + fonty), @source na plugin,
mapowanie --ipal-primary / --ipal-radius. Fonty przez next/font.
Potem prymitywy 1:1 z node_modules/@intecion/ipal-kit/docs/agent/skills/ipal-block/resources/kod-sekcji.md:
Based on DESIGN.md, create src/app/(frontend)/styles.css according to AGENT.md §6.11:
@theme with tokens (primary, background, foreground, muted + fonts), @source for the plugin,
mapping of --ipal-primary / --ipal-radius. Fonts through next/font.
Then the primitives 1:1 from node_modules/@intecion/ipal-kit/docs/agent/skills/ipal-block/resources/section-code.md:
components/ui/CMSLink.tsx,
Button.tsx, Media.tsx, Section.tsx, SectionHeader.tsx, oraz components/icons wg §6.10.
Zero hexów w komponentach — tylko tokeny.
Plan najpierw.
Button.tsx, Media.tsx, Section.tsx, SectionHeader.tsx, and components/icons according to §6.10.
Zero hex values in components — tokens only.
Plan first.
```
---
## KROK 6 — Routing, layout, strony
## STEP 6 — Routing, layout, pages
```
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 (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),
Do this according to PROGRAMISTA.md §2.6–2.8 and AGENT.md §4:
- src/proxy.ts with createProxy, matcher as an inline literal,
- src/lib/content.ts with createContentHelpers (PROGRAMISTA §2.7 — it also exports the routes, getSiteShell, resolveNav),
- app/(frontend)/[locale]/layout.tsx: NO <head>, <SiteProviders shell={await getSiteShell(locale)} …>
(consent, equalChoice banner, Turnstile, Analytics, JSON-LD, preconnect — in the right order),
- [locale]/[[...slug]]/page.tsx: createPageRoute(content, { blocks, notFound, permanentRedirect }) +
export const revalidate (literał), BEZ searchParams,
- [locale]/not-found.tsx: createNotFoundPage(content, { load: loadNotFoundView }) + notFoundView.ts ('use server', renderNotFoundView) — BEZ headers() (pages.md).
Plan najpierw.
export const revalidate (literal), NO searchParams,
- [locale]/not-found.tsx: createNotFoundPage(content, { load: loadNotFoundView }) + notFoundView.ts ('use server', renderNotFoundView) — NO headers() (pages.md).
Plan first.
```
Sprawdź: `/` → `/<domyślny język>`; `pnpm build` pokazuje strony jako `●`;
Check: `/` → `/<default language>`; `pnpm build` shows the pages as `●`;
`grep -rn "<head" src/app` = 0.
---
## KROK 7 — SEO, trasy systemowe, bezpieczeństwo
## STEP 7 — SEO, system routes, security
```
Zrób wg PROGRAMISTA.md §2.8–2.9 i seo.md:
- 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',
Do this according to PROGRAMISTA.md §2.8–2.9 and seo.md:
- re-exports from lib/content: app/sitemap.xml/route.ts (sitemapRoute), robots.ts (robots), manifest.ts (manifest), llms.txt/route.ts (llmsRoute),
api/health/route.ts — every route that reads the database with 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: 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.
- page metadata through generatePageMetadata from lib/content (shared cache), favicon through buildIconsMetadata,
- JSON-LD: Organization + WebSite come from SiteProviders using Site Settings; local business → siteJsonLd in createContentHelpers (seo.md),
- src/instrumentation.ts with assertEnv(ipalEnvRules(...)) imported from @intecion/ipal-kit/env (env.md).
No CSP yet — that comes in step 14.
Plan first.
```
Sprawdź: `curl -A "Googlebot" http://localhost:3000/pl | grep canonical` — w `<head>`.
Check: `curl -A "Googlebot" http://localhost:3000/pl | grep canonical` — in `<head>`.
---
## KROK 8 — Header, Footer, dane firmy
## STEP 8 — Header, Footer, company data
Skrót: `/ipal-nav <pozycje menu, kolumny stopki, rynek>`.
Short version: `/ipal-nav <menu items, footer columns, market>`.
```
Zrób wg AGENT.md §6.8, kod z node_modules/@intecion/ipal-kit/docs/agent/skills/ipal-nav/resources/kod-nawigacji.md:
- 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,
- 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.
Plan najpierw.
Do this according to AGENT.md §6.8, code from node_modules/@intecion/ipal-kit/docs/agent/skills/ipal-nav/resources/nav-code.md:
- globals/Header.ts, Footer.ts (code from §6.8),
- globals/Company.ts for market <PL/AU/…>: name, address, <NIP/ABN/…>, phone, email —
all localized where it is text,
- menu through resolveNav from lib/content (plugin, NOT lib/navigation.ts), components/layout/Header.tsx, Footer.tsx, MobileNav.tsx,
- legal links in the footer from System Pages roles, NOT by hand,
- afterChange hook on the globals with revalidatePath('/', 'layout').
Wire it into [locale]/layout.tsx. a11y labels from the admin panel.
Plan first.
```
---
## KROK 9 — Bloki (powtarzaj dla każdej sekcji)
## STEP 9 — Blocks (repeat for each section)
Jedna sekcja = jedno polecenie. Najpierw lista, potem po kolei.
One section = one prompt. The list first, then one by one.
**9a. Lista bloków z projektu graficznego:**
**9a. List of blocks from the design:**
```
Oto projekt strony: <link / zrzuty / opis sekcji>.
Wypisz listę bloków do zbudowania (slug camelCase, nazwa, pola wg słownictwa
AGENT.md §6.5, które sekcje to ten sam blok z innym wariantem).
Cel: jak najmniej bloków, każdy wielokrotnego użytku. Nie pisz kodu.
Here is the site design: <link / screenshots / section description>.
List the blocks to build (camelCase slug, name, fields using the vocabulary of
AGENT.md §6.5, which sections are the same block with a different variant).
Goal: as few blocks as possible, each reusable. Do not write code.
```
**9b. Jeden blok:**
**9b. One block:**
Skrót: `/ipal-block <Nazwa> — <pola z 9a>, <opis wyglądu / zrzut>`.
Short version: `/ipal-block <Name> — <fields from 9a>, <appearance description / screenshot>`.
```
Zbuduj blok <nazwa> wg AGENT.md §6 (warstwa 3):
- 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,
- pnpm generate:types, typy propsów z @/payload-types.
Wygląd: <opis / zrzut>. Zero tekstów, linków i hexów w kodzie.
Plan najpierw.
Build the <name> block according to AGENT.md §6 (layer 3):
- src/blocks/<Name>/config.ts: buildSectionHeaderField, buildLinksField, media, items,
buildSectionSettingsField — only the fields from the step 9a list, names from §6.5,
- Component.tsx: Section + SectionHeader + Media + CMSLink, max ~80 lines of JSX,
repeated elements in <Name>Card.tsx, interaction in a separate 'use client' file (§6.9),
- add it to Pages.layout and to blocks/registry.ts,
- pnpm generate:types, prop types from @/payload-types.
Appearance: <description / screenshot>. Zero texts, links and hex values in the code.
Plan first.
```
Sprawdź kontrolami z AGENT.md §11 (grep na `ctaLabel`, `href="/`, `<img`, długość pliku).
Check with the checks from AGENT.md §11 (grep for `ctaLabel`, `href="/`, `<img`, file length).
---
## KROK 10 — Formularze, Turnstile, email
## STEP 10 — Forms, Turnstile, email
Skrót: `/ipal-form <formularz, odbiorca zgłoszeń>`.
Short version: `/ipal-form <form, who receives submissions>`.
```
Zrób wg forms.md, turnstile.md, email.md:
- 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,
- Turnstile z SiteProviders w layoucie — bez przekazywania siteKey do bloku,
- honeypot i zdarzenie GTM z panelu robi RenderForm sam (forms.md).
Plan najpierw.
Do this according to forms.md, turnstile.md, email.md:
- form block: <RenderForm> from @intecion/ipal-kit/rsc + formClasses.ts (ipal-form skill) — fields, steps,
select options and texts from the admin panel, no custom renderer,
- consent checkbox (GDPR consent) with a link to the policy through getSystemPagePath,
- Turnstile from SiteProviders in the layout — without passing siteKey to the block,
- RenderForm handles the honeypot and the GTM event from the admin panel by itself (forms.md).
Plan first.
```
Sprawdź: panel → Site Integrations → Send test; wysłanie formularza bez zgody → odrzucone.
Check: admin panel → Site Integrations → Send test; submitting the form without consent → rejected.
---
## KROK 11 — Zgoda cookies i analityka
## STEP 11 — Cookie consent and analytics
```
Zweryfikuj i dokończ wg consent.md i analytics.md:
- 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).
Pokaż, jak sprawdzić w Network, że przed zgodą nic nie ładuje się do
facebook.net / clarity.ms / licdn.com / tiktok, a GA4/GTM startuje z Consent Mode „denied”.
Verify and finish according to consent.md and analytics.md:
- Analytics through SiteProviders (inside consent), IDs only from Site Integrations,
- whether to turn on defer (Core Web Vitals) — <yes/no>,
- Meta Pixel: <in the admin panel | in GTM> (never both),
- policy link in the banner: automatic (no privacyPolicy parameter in the code).
Show how to check in Network that before consent nothing loads from
facebook.net / clarity.ms / licdn.com / tiktok, and that GA4/GTM starts with Consent Mode "denied".
```
GA4/GTM ładują się przed zgodą (Consent Mode v2, domyślnie `denied` — bez ciasteczek, ale z
pingami do Google); blokowane do zgody są tylko piksele spoza Google (analytics.md).
GA4/GTM load before consent (Consent Mode v2, `denied` by default — no cookies, but with
pings to Google); only non-Google pixels are blocked until consent (analytics.md).
---
## KROK 12 — Kolekcje treści (tylko gdy klient wymaga)
## STEP 12 — Content collections (only when the client needs them)
Skrót: `/ipal-collection <czego klient potrzebuje>`.
Short version: `/ipal-collection <what the client needs>`.
```
Klient potrzebuje: <blog / realizacje / produkty>. Zrób test z AGENT.md §5.3
i potwierdź, że to kolekcja. Potem wg content.md i §5.4:
- collections/<Nazwa>.ts: title, buildSlugField, tab SEO, buildNoindexField,
trackSlugHistoryHook, setPublishedAtHook (blog), relacje <…>,
- content.config.ts z { slug, perPage } — prefiks URL z panelu (archiwum), NIE w kodzie,
- blok listy wpisów (EntriesList) + strona wpisu, JSON-LD Article (seo.md).
Plan najpierw.
The client needs: <blog / case studies / products>. Run the test from AGENT.md §5.3
and confirm it is a collection. Then according to content.md and §5.4:
- collections/<Name>.ts: title, buildSlugField, SEO tab, buildNoindexField,
trackSlugHistoryHook, setPublishedAtHook (blog), relations <…>,
- content.config.ts with { slug, perPage } — URL prefix from the admin panel (archive), NOT in the code,
- entries list block (EntriesList) + entry page, Article JSON-LD (seo.md).
Plan first.
```
---
## KROK 13 — Hooki i redirecty
## STEP 13 — Hooks and redirects
```
Sprawdź wg hooks.md, że są wpięte:
buildRevalidateHook (hook kolekcji: Pages + kolekcje treści; globale go nie mają — dla nich własny
afterChange z revalidatePath('/', 'layout'), jak w kroku 8), trackSlugHistoryHook + resolveRedirect,
buildCrossLocaleFieldSync (języki z configu), buildPreventDeleteSystemPage, buildValidateUniqueRole.
Pokaż test: zmień slug strony → stary URL daje 308 na nowy.
Check according to hooks.md that these are wired:
buildRevalidateHook (a collection hook: Pages + content collections; globals do not have it — they get their own
afterChange with revalidatePath('/', 'layout'), as in step 8), trackSlugHistoryHook + resolveRedirect,
buildCrossLocaleFieldSync (languages from the config), buildPreventDeleteSystemPage, buildValidateUniqueRole.
Show a test: change a page's slug → the old URL returns 308 to the new one.
```
---
## KROK 14 — CSP i panel
## STEP 14 — CSP and admin panel
```
Wg security.md: buildCsp w trybie report-only z flagami <turnstile, analytics, youtube, r2Url>.
Wypisz, co trzeba sprawdzić w konsoli przeglądarki, zanim przełączymy na enforce.
Sprawdź white-label panelu (logo, nazwa, credit Intecion) i 2FA dla wszystkich.
Opcjonalnie adminRoute '<ścieżka>' z przeniesieniem folderu.
According to security.md: buildCsp in report-only mode with the flags <turnstile, analytics, youtube, r2Url>.
List what to check in the browser console before we switch to enforce.
Check the admin panel white-label (logo, name, Intecion credit) and 2FA for everyone.
Optionally adminRoute '<path>' with moving the folder.
```
---
## KROK 15 — Wygląd (Impeccable)
## STEP 15 — Look and feel (Impeccable)
Osobne narzędzie, po kroku 9 dla gotowych bloków:
A separate tool, after step 9, for finished blocks:
```
/impeccable polish <strona/sekcja>
/impeccable polish <page/section>
```
Po każdym przebiegu Impeccable — polecenie dla agenta:
After every Impeccable pass — a prompt for the agent:
```
Sprawdź zmiany Impeccable kontrolami z AGENT.md §11. Czy pojawił się tekst w JSX,
hex zamiast tokenu, nowe pole o zakazanej nazwie albo plik >80 linii JSX? Popraw.
Check the Impeccable changes with the checks from AGENT.md §11. Did text appear in JSX,
a hex value instead of a token, a new field with a forbidden name, or a file >80 lines of JSX? Fix it.
```
---
## KROK 16 — Audyt przed oddaniem
## STEP 16 — Audit before handover
Skrót: `/ipal-audit` (skrypt), na zbudowanej aplikacji `/ipal-seo-check http://localhost:3000`
i `/ipal-consent-check http://localhost:3000/<locale>`, potem test redaktora i compliance ręcznie.
Short version: `/ipal-audit` (script), on the built app `/ipal-seo-check http://localhost:3000`
and `/ipal-consent-check http://localhost:3000/<locale>`, then the editor test and compliance by hand.
```
Zrób pełny audyt projektu:
1. Wszystkie kontrole z AGENT.md §11 — pokaż wyniki komend.
2. Test redaktora z AGENT.md §11 — dla każdego punktu wskaż, gdzie w panelu to się zmienia.
3. Checklist compliance z PROGRAMISTA.md §5.
4. pnpm build — trasy ● czy ƒ?
Wypisz listę problemów z priorytetem. Niczego jeszcze nie poprawiaj.
Run a full project audit:
1. All checks from AGENT.md §11 — show the command output.
2. The editor test from AGENT.md §11 — for every point show where it is changed in the admin panel.
3. The compliance checklist from PROGRAMISTA.md §5.
4. pnpm build — are the routes ● or ƒ?
List the problems with priorities. Do not fix anything yet.
```
Potem poprawki po jednej, każda osobnym poleceniem.
Then the fixes one at a time, each with a separate prompt.
---
## KROK 17 — Wdrożenie
## STEP 17 — Deployment
Robisz Ty, wg PROGRAMISTA.md §4. Agentowi możesz dać:
You do this yourself, according to PROGRAMISTA.md §4. You can give the agent:
```
Przygotuj listę zmiennych do Coolify dla tego projektu (PROGRAMISTA.md §3)
i checklistę §4.1 i §4.5 wypełnioną dla tego projektu. Bez wartości sekretów.
Prepare the list of Coolify variables for this project (PROGRAMISTA.md §3)
and the §4.1 and §4.5 checklists filled in for this project. No secret values.
```
---
## POLECENIA NAPRAWCZE (gdy agent zbacza)
## REPAIR PROMPTS (when the agent drifts)
**Hardkod / tekst w kodzie:**
**Hardcoding / text in code:**
```
Stop. To łamie AGENT.md §2. Każdy tekst, link, obraz i plik idzie z panelu.
Przenieś <co> do pola w <bloku/globalu> i pokaż diff.
Stop. This breaks AGENT.md §2. Every text, link, image and file comes from the admin panel.
Move <what> to a field in <block/global> and show the diff.
```
**Zoo pól CTA / sekcja-monolit:**
**Zoo of CTA fields / monolithic section:**
```
Stop. AGENT.md §6.5–6.6: CTA = buildLinksField() + CMSLink, obraz = media + Media,
max ~80 linii JSX. Zrefaktoruj <blok> wg §6.7. Jeśli w bazie jest treść — najpierw /ipal-migrate-fields.
Stop. AGENT.md §6.5–6.6: CTA = buildLinksField() + CMSLink, image = media + Media,
max ~80 lines of JSX. Refactor <block> according to §6.7. If there is content in the database — run /ipal-migrate-fields first.
```
**Nieczytelny panel (cta1/cta2, dziesiątki pól, „Item 01”, etykiety PL):**
**Unreadable admin panel (cta1/cta2, dozens of fields, "Item 01", Polish labels):**
```
Stop. AGENT.md §6.5a: powtarzalne = tablica z labels + rowLabel („+ Add …”), zero numerowanych
pól i pól na zapas, etykiety EN 1–3 słowa, opisy ≤ 80 znaków, ustawienia w sidebarze.
Popraw <blok> (z treścią w bazie → /ipal-migrate-fields) i zrób test pustego bloku.
Stop. AGENT.md §6.5a: repeated items = an array with labels + rowLabel ("+ Add …"), zero numbered
fields and spare fields, EN labels of 1–3 words, descriptions ≤ 80 characters, settings in the sidebar.
Fix <block> (with content in the database → /ipal-migrate-fields) and run the empty block test.
```
**Agent pisze coś, co ma plugin:**
**The agent writes something the plugin already has:**
```
Stop. Sprawdź w node_modules/@intecion/ipal-kit/docs i dist/*.d.ts, czy plugin
już to ma (AGENT.md §1.1, §7). Jeśli ma — usuń swój kod i użyj pluginu.
Stop. Check in node_modules/@intecion/ipal-kit/docs and dist/*.d.ts whether the plugin
already has it (AGENT.md §1.1, §7). If it does — remove your code and use the plugin.
```
**Pluginowi czegoś brakuje / plugin ma błąd:**
Skrót: `/ipal-plugin-gap <co nie działa>`.
**The plugin is missing something / the plugin has a bug:**
Short version: `/ipal-plugin-gap <what does not work>`.
```
Nie łataj po cichu. Raport wg AGENT.md §1.3 (problem, proponowane API, dlaczego uniwersalne)
w docs/plugin-requests/, minimalne obejście oznaczone // WORKAROUND ipal-kit <wersja>, pracuj dalej.
Do not patch it silently. Write a report according to AGENT.md §1.3 (problem, proposed API, why it is universal)
in docs/plugin-requests/, a minimal workaround marked // WORKAROUND ipal-kit <version>, and keep working.
```
**Nowa kolekcja, której nie zamawiałeś:**
**A new collection you did not ask for:**
```
Stop. AGENT.md §5.3 — minimum kolekcji. Przejdź test 4 pytań dla <kolekcja>.
Jeśli to blok albo global — przerób.
Stop. AGENT.md §5.3 — minimum collections. Run the 4-question test for <collection>.
If it is a block or a global — rework it.
```
**„Gotowe” bez dowodu:**
**"Done" without proof:**
```
Uruchom /ipal-audit (bez --quick) i pokaż pełny wynik. Bez tego krok nie jest skończony.
Run /ipal-audit (without --quick) and show the full output. Without it the step is not finished.
```
**Agent zgubił reguły (długa rozmowa):**
**The agent lost the rules (long conversation):**
```
Przeczytaj ponownie node_modules/@intecion/ipal-kit/docs/agent/AGENT.md w całości
i sprawdź swoje ostatnie zmiany pod kątem §0 (kompas). Wypisz naruszenia.
Read node_modules/@intecion/ipal-kit/docs/agent/AGENT.md again in full
and check your recent changes against §0 (compass). List the violations.
```
---
## ISTNIEJĄCY PROJEKT — aktualizacja do najnowszego ipal-kit
## EXISTING PROJECT — upgrade to the latest ipal-kit
Skrót: `/ipal-upgrade`.
Short version: `/ipal-upgrade`.
```
Zaktualizuj @intecion/ipal-kit do najnowszej wersji. Potem przejdź tabelę
z PROGRAMISTA.md §6 pozycja po pozycji: dla każdej sprawdź, czy dotyczy projektu
(pokaż dowód: grep / plik), i wypisz listę do zrobienia. Nie zmieniaj jeszcze kodu.
Upgrade @intecion/ipal-kit to the latest version. Then go through the table
in PROGRAMISTA.md §6 row by row: for each, check whether it applies to the project
(show proof: grep / file), and list what needs to be done. Do not change code yet.
```
Potem jedna pozycja z listy = jedno polecenie:
Then one item from the list = one prompt:
```
Zrób pozycję <nr> z PROGRAMISTA.md §6 wg wskazanego pliku docs. Usuń lokalną
wersję, którą zastępuje plugin. Plan najpierw, na końcu pnpm build.
Do item <no.> from PROGRAMISTA.md §6 according to the docs file it names. Remove the local
version that the plugin replaces. Plan first, pnpm build at the end.
```