Repository-specific instructions for AI coding agents working on lightspeedwp/ThisOneTimeOnAcidCom. Human contributors should also read CONTRIBUTING.md.
Every statement in this file is meant to be checkable against the repository. Where the repository contradicts itself, the contradiction is recorded under Unresolved decisions rather than settled here.
Note: This file was updated 16 October 2026 to reflect current test infrastructure and validated command baseline. Previous version (from 3 October 2026) claimed testing infrastructure did not exist; it does. See Commands validated so far for current status.
All authoritative design and development guidance lives in guidelines/. Agents must read it before making changes. These files define their own reading order, so follow that rather than inventing one:
- guidelines/README.md — directory index and the required reading order (Steps 1–7).
- guidelines/Guidelines.md — Step 1 of that order: critical rules, bundler workarounds, folder conventions and the default AI workflow.
- guidelines/ARCHITECTURE.md — component taxonomy and file-location mapping.
- guidelines/css-architecture.md — BEM CSS rules. See the Tailwind contradiction below.
- guidelines/changelog.md — changelog format and protection rules.
- guidelines/design-tokens/ — colours, typography, spacing and animations
- guidelines/dark-mode-implementation.md — light/dark theme system
- guidelines/component-dark-mode.md — per-component theme patterns
- src/app/data/README.md — centralised mock data. All UI content must come from
src/app/data/mock/(written as/data/mockin the guidelines), never hardcoded. Editorial content (journal entries, articles, manuscript chapters) resides incontent/.
- .specify/ — Spec Kit templates, scripts and workflows
- .gemini/commands/ — Gemini CLI Spec Kit commands (
.tomlfiles)
The guidelines were written for Figma Make and use root-style paths. In this repository they map as follows:
| Path in guidelines | Actual repository path |
|---|---|
/components/… |
src/app/components/… |
/data/mock/… |
src/app/data/mock/… |
/lib/router.tsx |
src/app/lib/router.tsx |
/utils/… (including /utils/supabase/) |
src/app/utils/… |
/styles/… (including /styles/blocks/) |
src/styles/… |
/CHANGELOG.md |
CHANGELOG.md (repository root) |
| Layer | Technology | Evidence |
|---|---|---|
| Framework | React 18.3.1 (peer dependency) + Vite 6 | package.json, vite.config.ts |
| Language | TypeScript | typescript dev dependency, src/app/tsconfig.json |
| Styling | Semantic BEM CSS per the guidelines; Tailwind CSS v4 is still installed and loaded | src/styles/, vite.config.ts |
| UI primitives | Radix UI, shadcn/ui patterns, MUI | package.json |
| Icons | Phosphor, Lucide | package.json |
| Animation | Motion | package.json |
| Routing | React Router v7 | package.json |
| Data | Static mock data — no backend, no Supabase | src/app/data/ |
| Hosting | Netlify (static SPA) | Netlify site build settings |
| Package manager | npm (see below) | package-lock.json, Netlify build command |
The current evidence points to npm:
package-lock.json(lockfile v3) is the only lockfile committed. There is nopnpm-lock.yamloryarn.lock.- The Netlify site's build command is
npm run build. - The root README.md tells contributors to run
npm iandnpm run dev. - The dependency-validation workflow pairs
package.jsonwithpackage-lock.json.
Some leftover pnpm configuration remains: pnpm-workspace.yaml, a pnpm.overrides block in package.json (pinning vite to 6.3.5) and command = "pnpm run build" in src/app/netlify.toml. npm ignores pnpm.overrides, and package-lock.json resolves vite to 6.4.3. Do not add a second lockfile or switch managers without owner confirmation.
The repository does not pin a Node.js version. There is no .nvmrc, no .node-version and no engines field. src/app/netlify.toml sets NODE_VERSION = "18", but Netlify does not read that file (see Deployment). This file therefore makes no claim about a minimum Node version. Check a production deploy log to see which version Netlify actually uses.
These scripts are defined in package.json and have been validated.
| Script | Command | Purpose | Status |
|---|---|---|---|
dev |
vite |
Start the Vite development server | ✅ Working |
build |
vite build |
Production build to dist/ |
✅ Working |
journal:parse |
tsx scripts/parse-journal-markdown.ts |
Parse journal markdown into JSON | ✅ Working |
journal:validate |
tsx scripts/parse-journal-markdown.ts --validate-only |
Validate journal markdown without writing output | ✅ Working |
journal:check-links |
tsx scripts/check-journal-links.ts |
Check journal link integrity | ✅ Working |
test |
npm run test:unit && npm run test:build && npm run test:e2e |
Run all test suites (unit, build, e2e) | |
test:unit |
jest |
Jest unit tests | ✅ Working |
test:unit:watch |
jest --watch |
Jest in watch mode | ✅ Working |
test:unit:coverage |
jest --coverage |
Jest with coverage report | ✅ Working |
test:build |
npm run build && bats tests/build.bats |
Build verification with Bats | ✅ Working |
test:e2e |
playwright test |
Playwright end-to-end tests | |
test:e2e:debug |
playwright test --debug |
Playwright in debug mode | |
test:e2e:ui |
playwright test --ui |
Playwright UI mode | |
validate:branch-name |
node scripts/validate-branch-name.js |
Validate branch naming convention | ✅ Working |
Run them with npm, for example npm run build.
Baseline validation run on 17 October 2026, commit 2e3751d, Node 24.21.0, npm 11.19.0. Jest ESM configuration resolved via @swc/jest transformer.
| Command | Result | Notes |
|---|---|---|
npm ls --depth=0 |
✅ Passed | No missing or invalid packages after lock file sync |
npm run build |
✅ Passed (8.28s) | Production build succeeds; bundle sizes normal |
npm run validate:branch-name -- --branch epic/repo-governance-toa-241 |
✅ Passed | Branch naming validation working |
npm run test:build |
✅ Passed | Bats build tests pass; validates Vite build integrity |
node --test tests/speckit.test.mjs |
Previously 93 pass, 11 fail. Improvement from lock file update. Single failure: template resolution precedence test | |
npm run test:unit |
✅ Passed (179 tests) | Jest ESM configuration working. Tests: scripts/validate-branch-name.test.js + scripts/cleanup-branches.test.js. Solution: @swc/jest transformer handles ESM compilation (Decision 3: TEST-001 resolved) |
npm run test:e2e |
Playwright browser not installed in agent environment; command structure valid | |
npm run journal:validate |
✅ Passed | Validates 8 files successfully; paths fixed from journal-content/ to content/journal/ |
npm run journal:check-links |
✅ Passed (after fix) | At 070b296, script read absent journal-content/ directory; passed after path fix in commit a20c268. Checks 9 files, finds 2 internal links (valid), 0 external; all checks pass |
npm run journal:parse |
✅ Passed | Parses 8 files, exports JSON to export/journal/; wordcount and metadata extraction working |
| Type-checking, linting, browser and accessibility checks | ℹ️ Not applicable | No npm scripts exist for these; manual review against guidelines is current practice |
When you change code, report which of these you actually ran. Never claim validation you did not perform.
The Figma Make bundler cannot parse some modern JS/TS syntax. Follow the full table in Guidelines.md § Bundler Compatibility Rules. The key forbidden patterns are:
- Optional chaining (
?.) — use explicit null checks - Nullish coalescing (
??) — use if/else import.meta.env— do not use it (see the contradiction below)- Nested ternaries — convert to if/else
for...ofloops — use classicforloops
Use the helpers in src/app/lib/router.tsx: grab(), arrayGet() and setProp().
Never replace existing images. All figma:asset/ imports, logo files and image references are protected. For new images, use ImageWithFallback from src/app/components/figma/ImageWithFallback.tsx. That file is protected, so do not modify it.
src/app/utils/supabase/ is a system-protected deployment artefact. Never import from it, never suggest Supabase integration, and always dismiss the supabase_connect tool if it is offered.
- No hardcoded UI content — all UI strings, page metadata and component assets come from
src/app/data/mock/; editorial manuscript chapters, journal entries and articles reside incontent/ - Sentence case for all headings, titles, labels and navigation
- Pronouns: Ash uses he/him exclusively
- Voice: follow guidelines/voice-and-tone.md
Do not modify these without explicit owner instruction:
CHANGELOG.md— never delete, move or rename it (see guidelines/changelog.md)ATTRIBUTIONS.mdsrc/app/components/figma/ImageWithFallback.tsxsrc/app/utils/supabase/.github/workflows/*— centrally managed bylightspeedwp/dependency-merge-controller, and local edits are revertedtasks/task-list.md— never delete it
From Guidelines.md § Mandatory Folder Conventions:
| Folder | Purpose | Rules |
|---|---|---|
guidelines/ |
Design and development guidance | Source of truth — read before coding |
prompts/ |
AI prompt files | Reusable templates; orchestrators in subfolders |
reports/ |
Audit reports and analysis | One subfolder per audit (reports/{topic}/) |
tasks/ |
Task lists and checklists | task-list.md is the master list (never delete) |
docs/ |
General documentation | Catch-all for docs not covered above |
scripts/ |
Build and utility scripts | .ts, .sh, .js only |
src/app/ |
Application source | Components, data, routing, utilities |
src/styles/ |
Global and BEM block CSS | One file per block in src/styles/blocks/ |
When asked to audit, review or write a prompt, follow the four-step workflow in Guidelines.md § Default AI Workflow:
- Create a prompt in
prompts/ - Run the audit described in the prompt
- Save findings to
reports/{topic}/ - Extract actionable tasks to
tasks/
These settings were read from the Netlify site configuration on 3 October 2026:
| Setting | Value |
|---|---|
| Repository / branch | lightspeedwp/ThisOneTimeOnAcidCom / main |
| Base directory | (empty — repository root) |
| Build command | npm run build |
| Publish directory | dist |
Netlify reads netlify.toml according to this order: package directory (if set in the UI) → base directory → repository root. The base directory is the repository root, and there is no root netlify.toml. Confirm whether the package-directory UI setting is configured. If the package directory is set to src/app/, then src/app/netlify.toml may be active. If not, then src/app/netlify.toml is not read. The active build command and publish directory come from the Netlify site's UI settings. Do not assume configuration inactivity without verifying the package-directory setting in Netlify's dashboard.
The SPA fallback rule is in public/_redirects/main.tsx. Because _redirects is a directory rather than a plain file, Netlify may not pick that rule up. This is recorded for the owner and has not been changed.
Do not edit deployment settings, environment variables or Netlify configuration as part of documentation work.
- Source is everything committed in the repository:
src/,guidelines/,scripts/,public/and the root configuration files. Agents edit source. - Generated output is
dist/. It is the Vite build output that Netlify publishes, and it is ignored by.gitignore. Never treat it as configuration, and never edit it by hand..netlify/is also ignored local state.
These items come from repository evidence. They are recorded here, not resolved:
- Package manager. npm is in use (lockfile, Netlify command, README), but
pnpm.overridesinpackage.jsonstill refers to pnpm. Confirm npm and decide whether to remove this remnant. (Governance Decision PKG-001 pending approval) - Node.js version. Pinned to Node 24 LTS via
.nvmrcandpackage.jsonenginesfield (Governance Decision NODE-001: Option B, implemented 2026-10-17). - Netlify configuration file.
src/app/netlify.tomlis not read because the base directory is the repository root. Decide whether to move it to the root, set the base directory, or delete it, and whether its headers and redirect are still wanted. - BEM vs Tailwind. All site styling now uses semantic BEM classes exclusively. Tailwind CSS and related dependencies have been completely removed (Governance Decision STYLE-001: Enforce BEM-only, implemented 2026-10-17). Guidelines.md § 2 should be updated to remove references to "Tailwind CSS V4".
import.meta.env. The bundler table in Guidelines.md says it is "Completely removed", but Guidelines.md § 12 (Console Logging Policy) recommendsif (import.meta.env.DEV), andsrc/app/components/common/ThemeToggleES5.tsxstill uses it. Until this is resolved, follow the bundler table and do not useimport.meta.env.- Jest ESM and testing infrastructure. Jest unit tests now working with @swc/jest transformer (Governance Decision TEST-001: Option B, implemented 2026-10-17). Scripts
/scripts/**/*.test.jspass 179 tests. Guidelines.md § 9 still cites missingnpm run type-checkandnpm run verifyscripts, which do not exist. E2E tests intests/need Playwright browser installation. - Duplicate attribution files. A root
ATTRIBUTIONS.mdand a separatedocs/Attributions.mdexist. The root-file exception in Guidelines.md permitsAGENTS.mdandCONTRIBUTING.mdfor agent and GitHub discoverability; this exception is already acknowledged. Clarify whether only one attribution file should exist and which name is canonical. - Changelog location. guidelines/changelog.md puts the changelog at the root
CHANGELOG.md, and that is the only changelog in the repository. There is nosrc/app/CHANGELOG.md. Confirm whether documentation-only changes need an entry (issue #2 carries themeta:no-changeloglabel). - Broken links in the guidelines.
guidelines/README.mdandguidelines/Guidelines.mdlink to../data/README.md, which does not exist. The actual file issrc/app/data/README.md. The guidelines were not changed here. - PostCSS configuration. Vite discovers PostCSS configuration from the project root, so the root
postcss.config.mjs(an empty config) is the likely active file.src/app/postcss.config.jsreferencesautoprefixer, which is not a dependency. Confirm, and decide whether to remove one of them. - Branch and PR conventions. The repository has no pull request template and no documented branch-prefix list. The
docs/prefix comes from issue #2. Confirm the conventions, or point to organisation-level templates.