From af53c21594b54ec09c295b1a8ad6958a9423e5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=20Ly=C3=B3vson?= Date: Thu, 12 Nov 2026 01:34:17 +0400 Subject: [PATCH] chore: add a Design section to AGENTS.md; move local servers to port 7300 Rafa agreed (Nov 12) that every RoadCorp repo records its design contract in AGENTS.md and pins its dev and test port inside its Artemis range. lyovson.com's range is 7300-7399; 3100 sat in Avenews's 3000s, where its gate runs. The dev script, the read-only preview, Playwright, the visual-review skill, the Cursor port and the local runtime-origin default now use 7300. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/visual-review/SKILL.md | 8 ++++---- .claude/skills/visual-review/scripts/screenshots.mjs | 2 +- .cursor/environment.json | 2 +- AGENTS.md | 12 +++++++++++- README.md | 4 ++-- e2e/public-navigation.spec.ts | 2 +- package.json | 2 +- playwright.config.ts | 2 +- scripts/public-experience-preview.mjs | 2 +- src/utilities/site-config.ts | 2 +- 10 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.claude/skills/visual-review/SKILL.md b/.claude/skills/visual-review/SKILL.md index f30c2f05..c1cf9f34 100644 --- a/.claude/skills/visual-review/SKILL.md +++ b/.claude/skills/visual-review/SKILL.md @@ -32,7 +32,7 @@ STRESS_SEED_ALLOWED_HOSTS=ep- mise exec -- pnpm payload run scripts/seed ```sh mise exec -- pnpm preview:experience:build -mise exec -- pnpm preview:experience # http://127.0.0.1:3100, read-only database session +mise exec -- pnpm preview:experience # http://127.0.0.1:7300, read-only database session ``` The bot guard returns 403 to curl-like user agents; the scripts send a browser user agent. @@ -41,7 +41,7 @@ The bot guard returns 403 to curl-like user agents; the scripts send a browser u ```sh node .claude/skills/visual-review/scripts/crawl-snapshot.mjs https://www.lyovson.com /tmp/before.json -node .claude/skills/visual-review/scripts/crawl-snapshot.mjs http://127.0.0.1:3100 /tmp/after.json +node .claude/skills/visual-review/scripts/crawl-snapshot.mjs http://127.0.0.1:7300 /tmp/after.json node .claude/skills/visual-review/scripts/crawl-snapshot.mjs --diff /tmp/before.json /tmp/after.json ``` @@ -51,7 +51,7 @@ Expect differences only where the change intends them. Stress pages exist only o ```sh OUT=/tmp/shots TAG=my-change ROUTES=/,/posts,/activities \ - node .claude/skills/visual-review/scripts/screenshots.mjs https://www.lyovson.com http://127.0.0.1:3100 + node .claude/skills/visual-review/scripts/screenshots.mjs https://www.lyovson.com http://127.0.0.1:7300 ``` -Review desktop and phone, light and dark. Then run the standard gate from AGENTS.md (`pnpm lint` last) and `PLAYWRIGHT_BASE_URL=http://127.0.0.1:3100 pnpm test:browser`. +Review desktop and phone, light and dark. Then run the standard gate from AGENTS.md (`pnpm lint` last) and `PLAYWRIGHT_BASE_URL=http://127.0.0.1:7300 pnpm test:browser`. diff --git a/.claude/skills/visual-review/scripts/screenshots.mjs b/.claude/skills/visual-review/scripts/screenshots.mjs index 34cb230a..8a047872 100644 --- a/.claude/skills/visual-review/scripts/screenshots.mjs +++ b/.claude/skills/visual-review/scripts/screenshots.mjs @@ -2,7 +2,7 @@ // dark, for side-by-side review. // // OUT=/tmp/shots TAG=change ROUTES=/,/activities node screenshots.mjs \ -// https://www.lyovson.com http://127.0.0.1:3100 +// https://www.lyovson.com http://127.0.0.1:7300 import { mkdirSync } from "node:fs"; import { createRequire } from "node:module"; diff --git a/.cursor/environment.json b/.cursor/environment.json index 15bcb18f..638c93a3 100644 --- a/.cursor/environment.json +++ b/.cursor/environment.json @@ -1,5 +1,5 @@ { "name": "Lyovson.com", "install": "bash .cursor/install.sh", - "ports": [{ "name": "web", "port": 3100 }] + "ports": [{ "name": "web", "port": 7300 }] } diff --git a/AGENTS.md b/AGENTS.md index 116f90dd..b95ea72b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,11 +4,21 @@ Use mise and pnpm with the committed versions. [package.json](package.json) owns ## Project contracts -- Preserve the responsive grid-card design, theme tokens, and custom breakpoints in `src/app/(frontend)/globals.css`; reuse `src/components/grid/`. Desktop grid units are 400px, while mobile cards fit their container. - Payload collections and hooks own content publication, access, embeddings, and invalidation. Preserve public-read predicates, private-field filtering, paid-work authorization, unchanged-content skips, and recursion guards. Inspect current hooks/jobs before changing these paths. - Lexical editors share `src/fields/default-lexical.ts` and `src/fields/lexical-configs.ts`. Update these owners rather than duplicating editor configs. Regenerate Payload types/import maps when their inputs change using `pnpm generate:types` and `pnpm generate:importmap`. - Consult [README.md](README.md) for setup and database discovery. Never touch production machines or the production database. Run no migrations. Use no paid APIs. A `POSTGRES_URL` used for a build or preview must be a Neon development branch, never the production `main` branch. +## Design + +- **Tokens:** [`src/app/(frontend)/globals.css`](src/app/(frontend)/globals.css) is the only source. The named palette (`--paper`, `--ink`, `--wave-blue`, `--cedar-gold` and the rest, in OKLCH) sits in `:root` and `.dark`; the shadcn semantic and `--accent-*` tokens mix from it in Oklab; `@theme inline` exposes them to Tailwind with the type scale and the grid breakpoints `g1`–`g5` (420–2100px). Style with token utilities, add a token there before using a new colour, and keep raw colours out of components. Light and dark both ship. +- **Layout:** preserve the responsive grid-card design and reuse `src/components/grid/`. Desktop grid units are 400px; mobile cards fit their container. +- **Type:** IBM Plex Sans, Serif and Mono, self-hosted through `next/font/local` in `src/app/(frontend)/fonts.ts` (`--font-sans`, `--font-serif`, `--font-display`, `--font-mono`). +- **Components:** shadcn/ui, style `new-york` on Radix ([components.json](components.json)), icons from lucide. Add primitives with the shadcn CLI. Avenews uses `base-nova` on Base UI on purpose; do not convert either project to match the other. +- **Mark:** the crest. `src/components/Logo/logo.tsx` renders `public/crest-dark-simple.webp` and inverts it for dark mode; the full marks are in `public/brand/`. +- **Assets:** site icons and the OG image live in `public/`; editorial media goes through Payload's Media collection to Vercel Blob, not the repo. +- **AI imagery:** none is in use. Adding any needs Rafa's approval; it must not depict a real person or imitate a real brand, and the commit records the tool and prompt. Label it visibly when it shows realistic people, places or events (EU AI Act Art. 50). +- **Proof:** visual changes go through the `visual-review` skill (desktop and phone, light and dark). + ## Verification Use focused checks during edits. Before pushing to `main`, run: diff --git a/README.md b/README.md index 97b41b71..ba45600a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Create `.env.local` with the configuration needed for your environment: Point `POSTGRES_URL` at a Neon development branch, never at the production `main` branch. Then start development: ```sh -mise exec -- pnpm dev --port 3100 +mise exec -- pnpm dev ``` Payload's development schema push is off unless `PAYLOAD_DB_PUSH=true`. Apply schema changes with migrations, and enable push only on a disposable database. Disabling push does not prevent application writes. For public browsing checks against an existing database, the preview commands also enforce read-only database transactions and clear the OpenAI and Resend keys: @@ -45,7 +45,7 @@ mise exec -- pnpm preview:experience:build mise exec -- pnpm preview:experience ``` -The preview runs at `http://localhost:3100`. Use an isolated database for CMS edits or migration work. +The dev server and the preview both run at `http://localhost:7300`, inside lyovson.com's port range on Artemis (7300–7399; the 3000s belong to Avenews). Use an isolated database for CMS edits or migration work. ## Database discovery diff --git a/e2e/public-navigation.spec.ts b/e2e/public-navigation.spec.ts index 3f4159db..04d45b1b 100644 --- a/e2e/public-navigation.spec.ts +++ b/e2e/public-navigation.spec.ts @@ -94,7 +94,7 @@ test("public pages remain navigable without JavaScript", async ({ const context = await browser.newContext({ javaScriptEnabled: false }); const page = await context.newPage(); await page.goto( - `${test.info().project.use.baseURL || process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3100"}/` + `${test.info().project.use.baseURL || process.env.PLAYWRIGHT_BASE_URL || "http://localhost:7300"}/` ); await expect( page.getByRole("navigation", { name: "Main navigation" }) diff --git a/package.json b/package.json index 91fb1025..30bbf50a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "build": "cross-env NODE_OPTIONS=--no-deprecation payload build", - "dev": "cross-env NODE_OPTIONS=--no-deprecation next dev", + "dev": "cross-env NODE_OPTIONS=--no-deprecation next dev --port 7300", "dev:https": "cross-env NODE_OPTIONS=--no-deprecation next dev --experimental-https", "generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap", "generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types", diff --git a/playwright.config.ts b/playwright.config.ts index baeb5bf4..00af767a 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -8,7 +8,7 @@ export default defineConfig({ reporter: "list", outputDir: "/private/tmp/lyovson-playwright-results", use: { - baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3100", + baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:7300", trace: "retain-on-failure", }, projects: [ diff --git a/scripts/public-experience-preview.mjs b/scripts/public-experience-preview.mjs index 6c33889b..dc86ad5e 100644 --- a/scripts/public-experience-preview.mjs +++ b/scripts/public-experience-preview.mjs @@ -28,7 +28,7 @@ database.searchParams.set("options", "-c default_transaction_read_only=on"); env.POSTGRES_URL = database.toString(); const args = command === "start" - ? ["start", "--hostname", "127.0.0.1", "--port", "3100"] + ? ["start", "--hostname", "127.0.0.1", "--port", "7300"] : ["build"]; const child = spawn( process.execPath, diff --git a/src/utilities/site-config.ts b/src/utilities/site-config.ts index f3de7dcf..65b0a801 100644 --- a/src/utilities/site-config.ts +++ b/src/utilities/site-config.ts @@ -1,5 +1,5 @@ const DEFAULT_CANONICAL_ORIGIN = "https://www.lyovson.com"; -const DEFAULT_RUNTIME_ORIGIN = "http://localhost:3000"; +const DEFAULT_RUNTIME_ORIGIN = "http://localhost:7300"; const DEFAULT_OG_IMAGE_PATH = "/og-image.png"; const DEFAULT_LOGO_PATH = "/android-chrome-512x512.png";