Files
ipal-kit/docs/agent/skills/ipal-site/SKILL.md
T

9.3 KiB

name, description
name description
ipal-site Builds a complete client website on ipal-kit from a brief to handover with minimal human involvement — intake and one consolidated question list, foundation, content model, navigation, sections, forms, content seeding in every language, integrations, system pages, design, full self-verification (build, ipal-audit, ipal-seo-check, ipal-consent-check, locale coverage, editor test) and a final report. Orchestrates the other ipal-* skills. Use when asked to build/create/make a website, landing page or new site for a client, or to "finish the site".

ipal-site

You run the project as an independent contractor (AGENT.md §0a): you make technical decisions yourself, ask once for missing data, anticipate problems, check your own work, and hand over a report at the end. The user should not have to guide or correct you.

Rhythm: one phase = one commit (feat(site): phase N — <what>). Do not wait for an OK between phases. Before each phase, go through the "Anticipate" table in AGENT.md §0a.

Phase 0 — Discovery and one question list

  1. Read: the brief (all attachments), AGENTS.md, DESIGN.md/PRODUCT.md, package.json (ipal-kit version), existing code. New project or finishing one?
  2. Write into AGENTS.md → "Site map": pages (from the brief), sections on each, forms, languages, collections (only if there are lists with URLs — ipal-collection).
  3. One question list — only what is not in the brief and cannot be settled yourself, each with a default answer you will use if there is no reply:
    Before I finish, I need (if you don't answer, I'll use the value in brackets):
    1. Site languages? (pl + en — as in the brief)
    2. Production domain? (placeholder in .env, I'll set canonical after deployment)
    3. Company data: tax ID (NIP), address, phone? ([TO FILL] in the panel)
    4. Which address should form submissions go to? (without it the form seed won't run — the only question without which I can't deliver forms)
    5. Analytics: GA4/GTM/pixel IDs? (off until the IDs are entered in the panel)
    6. R2 details: bucket, endpoint, keys, media domain? (R2 is always wired; until the keys arrive, media stay local in dev)
    7. Turnstile keys? (test keys in dev; you'll enter production keys in Site integrations)
    8. AI access to content (llms.txt, Markdown, MCP, AI bots)? (on — I turn it off only at your explicit request)
    9. Translations: should I make drafts for approval? (yes, marked in the report)
    
    Send the list and keep working on the default values. Fill in the answers when they arrive. Stop only before an irreversible decision (AGENT §0a).

Phase 1 — Foundation

  • New project → ipal-setup (all of it, with ipal-skills, AGENTS.md).
  • Existing project on an older ipal-kit → ipal-upgrade before anything else.
  • Exit: pnpm build passes, /admin works, ipal-audit --quick = 0 errors — including zero "missing: …", i.e. the full AGENT.md §0b set (SEO, GEO, R2, Turnstile, forms, consent, security) wired from the first phase, not at the end.

Phase 2 — Content model

  • Pages = Pages + blocks. Collections only for lists with URLs (ipal-collection).
  • Globals: Header, Footer, Company (ipal-nav), Site settings, System pages.
  • Every section from the site map → an existing block, a variant of an existing one (variant) or a new block. Goal: as few blocks as possible, as many variants as possible.
  • Schema change with content in the database → ipal-migrate-fields, never "live".

Phase 3 — Navigation and company data → ipal-nav

Phase 4 — Sections → ipal-block for every block

Order: Hero → recurring sections (FeatureGrid, CTA, FAQ…) → specific ones. Every block: schema from the field dictionary, composition of primitives, zero text in JSX (ipal-audit --quick after every block — fix errors right away). Enlarged images (gallery, cards, product photos, certificates, rich text): the shared lightbox, never a hand-made modal or a lightbox library — ipalKit({ lightbox: true }) + migration, <SiteProviders lightbox> once, <LightboxTrigger group={gallery-${id}} image={lightboxImage(media, { size })}> around the thumbnail, RenderRichText lightbox for article images, Form messages → Image viewer labels in every language (lightbox.md). Check with the keyboard: Enter opens, ←/→ browse, Esc returns focus.

Phase 5 — Forms → ipal-form

Every form = a seed from ipal-form/resources/seed-form.template.ts (fields, confirmation, email to the company and confirmation to the customer, every language) — the renderer and action code you write once. Never a custom form with fields in JSX, an api/contact route, nodemailer, reCAPTCHA (AGENT.md §0b).

Phase 6 — Content in the panel, every language

  1. Copy resources/seed-content.template.ts → scripts/seed-content.ts, enter content from the brief: pages, blocks, links ({ $page: 'slug' }), globals — all languages side by side ({ pl, en }). Missing data → [TO FILL: …]. Never invent company data, prices, reviews, numbers, certificates, names. The template is a thin script over createSeeder (@intecion/ipal-kit/seed): keep the calls (upsertBySlug, fillGlobal, summary), change only CONTENT; options in docs/seeding.md.
  2. pnpm payload run scripts/seed-content.ts → the placeholder list goes into the report. On production (rules: node_modules/@intecion/ipal-kit/docs/seeding.md): SEED_DRY_RUN=1 first, back up the database, then the real run. It only creates what is missing; SEED_UPDATE=1 there is refused without IPAL_SEED_ALLOW_PROD_UPDATE=1 and still skips pages an editor changed (skip (edited)).
  3. System pages: Homepage, 404, privacy policy (the page exists; the policy text comes from the client → placeholder). Cookie banner (with Detail labels and the Cookies list from the scan), Notifications — texts in every language.
  4. ipal-locale-add → locale-coverage = 0 gaps (or deliberate ones listed in the report).
  5. Images: leave upload fields empty (the editor adds them) or upload files from the brief via the panel — prepared (WebP/JPG ≤ 1.5 MB, ≤ 2560 px).

Phase 7 — Integrations (panel, not code)

Site integrations: email transport + Send test, Turnstile (both keys — one key = Turnstile off and a red alert on the dashboard), analytics/pixels (only with IDs from the client), consent (categories matching the tools in use). Site settings: name, description (feeds llms.txt and MCP), OG image, favicon. SEO tab: meta title/description of every page (≤ 60 / ≤ 155 characters, unique); aiSummary — keep the auto-fill or fix it when the summary is weak.

Phase 8 — Design

DESIGN.md exists → tokens in @theme. None → neutral tokens + an Impeccable recommendation in the report. Do not polish styles ad hoc in components. Responsiveness: 360 px, 768 px, 1280 px — no horizontal scroll.

Phase 9 — Verification (all by yourself, results go into the report)

pnpm generate:types && pnpm tsc --noEmit
bash .agents/skills/ipal-audit/scripts/audit.sh            # full: + tsc + build
pnpm build && pnpm start &                                  # page routes ● (SSG), not ƒ
node .agents/skills/ipal-seo-check/scripts/seo-check.mjs http://localhost:3000
node .agents/skills/ipal-consent-check/scripts/consent-check.mjs http://localhost:3000/<locale>
pnpm payload run .agents/skills/ipal-locale-add/scripts/locale-coverage.ts

ipal-seo-check also checks GEO: /llms.txt, /llms-full.txt, /md/…, /api/mcp, JSON-LD, AI bots in robots — every gap is an [ERROR] to fix. Plus by hand: the editor test (AGENT §11) in every language, the form (list in ipal-form §6), keyboard (Tab through the menu, banner, form; visible focus), 404 in every language. Fix every [ERROR] (ipal-debug) and run the check again. Never hand over with errors — exception: a blocking ipal-kit bug (plugin gap report, ipal-plugin-gap, + workaround).

Phase 10 — Final report (the only big message to the user)

# <Client> — site ready for review
## Done
- pages: <list with URLs per language> · blocks: <list> · forms: <list>
- languages: <…> · integrations: <email ✓ Send test, Turnstile ✓, analytics: waiting for IDs>
## Checks
build ✓ (n routes ●) · ipal-audit 0/0 · seo-check <e>/<w> · consent-check 0 violations · locale-coverage 0
## Mandatory set (AGENT.md §0b)
SEO ✓ · JSON-LD ✓ · llms.txt + llms-full ✓ · Markdown ✓ · MCP ✓ · R2 <✓ / waiting for keys> ·
Turnstile <✓ / waiting for keys> · forms from the panel ✓ · consent ✓ · 2FA ✓ · health ✓
(skipped by client decision: <ipal-audit-skip or "none">)
## To fill in by you / the client (in the panel)
- [TO FILL: tax ID (NIP)] → Company · … (full list from the seed)
- draft translations for approval: <pages>
## Decisions I made
- <decision> — <why> (full list in AGENTS.md)
## Fixed along the way
- <problem → cause → fix> (briefly, only what matters)
## For ipal-kit
- [bug|improvement] <topic> → docs/plugin-requests/<file> (workaround: <file:line>)
## Next step
- <one thing, e.g. "give me the domain → deployment per PROGRAMISTA §4">

Do not report progress along the way. Exceptions: the question list from phase 0, a blocking ipal-kit bug, an irreversible decision.