diff --git a/AGENTS.md b/AGENTS.md index f70bb6b..f339cd7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ bun dist/server.js # wrong: crashes with 'Bundled file "./index-….js" no and the `../../shared/credits.css` link in the page's HTML, and call `mountCredits()` from `src/shared/credits.ts`. Never write your own notice text. - Mockup agents edit only their own `src/mockups/NN-slug/` folder. `src/data/`, `src/shared/`, - `src/server.ts`, `src/index.html` and `src/mockups/registry.ts` are the shared contract; change them + `src/server.ts`, `src/mockups/index.html` and `src/mockups/registry.ts` are the shared contract; change them only when the plan says so. - No two mockups may have byte-identical `style.css` — the build fails with "Multiple files share the same output path". Give each one its own styles from the start. @@ -38,7 +38,7 @@ bun dist/server.js # wrong: crashes with 'Bundled file "./index-….js" no - Assets are bundled, never loaded from a CDN: fonts from `@fontsource/*`, three.js from npm. YouTube videos are link cards (`createVideoCards`), not embeds. - Adding a mockup route means editing `src/server.ts`, `src/mockups/registry.ts` and the cards in - `src/index.html` together; `tests/server.test.ts` checks every registry slug is served and that the index shows each entry's name, pitch and tryThis. + `src/mockups/index.html` together; `tests/server.test.ts` checks every registry slug is served and that the index shows each entry's name, pitch and tryThis. ## Workflow diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 04c5ead..127f156 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -12,7 +12,7 @@ shared credits snippet. | Path | Responsibility | |---|---| | `src/server.ts` | `startServer(port, { contentDir? })`: routes `/`, `/mockups/NN-slug/` (+ 302 from the no-slash form), `/content/*` via `src/content/routes.ts`, 404 otherwise. Runs when `import.meta.main`; `PORT` env, default 3000. | -| `src/index.html`, `src/index.ts`, `src/index.css` | Index page: static cards linking each mockup, then `mountCredits()`. | +| `src/mockups/index.html`, `index.ts`, `index.css` | Mockup gallery at `/mockups/`: static cards linking each mockup, then `mountCredits()`. | | `src/mockups/registry.ts` | `mockups: MockupInfo[]` — slug, number, name, pitch, what to try. | | `src/mockups/NN-slug/` | One design direction: `index.html` (links `../../shared/credits.css`, has `