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 |
| Runtime | Node.js 24 LTS target | .nvmrc, engines.node in package.json, src/app/netlify.toml |
| Styling | Semantic BEM CSS (Tailwind removed) | src/styles/ (BEM blocks, components, effects, patterns, tokens), postcss.config.mjs empty, guidelines/css-architecture.md |
| 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 (npm-only) | package-lock.json, no pnpm/yarn lockfiles, Netlify build command |
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(updated insrc/app/netlify.tomlon 18 Oct 2026). - The root README.md tells contributors to run
npm ciandnpm run dev. - The dependency-validation workflow pairs
package.jsonwithpackage-lock.json.
All pnpm artefacts have been removed (18 October 2026):
- ✅ Deleted
pnpm-workspace.yaml - ✅ Deleted
pnpm-lock.yaml(replaced bypackage-lock.json) - ✅ Removed
pnpm.overridesblock frompackage.json - ✅ Updated
src/app/netlify.tomlto usenpm run buildand Node 24, npm 11
Do not add a second lockfile or switch managers without owner confirmation.
Node.js 24 LTS is the intended runtime (18 October 2026, T012 — Phase 2 Foundational):
- ✅
.nvmrccontains24; contributors using nvm select it withnvm use - ✅
package.jsonhasengines.nodefield:">=24" - ✅
src/app/netlify.tomlsetsNODE*VERSION = "24"andNPM*VERSION = "11" - ✅ README.md documents the Node.js 24 requirement
The .nvmrc file is an opt-in selector; it does not enforce the runtime.
engines.node: ">=24" allows Node.js 24 and later major versions. npm normally
warns on an incompatible version rather than rejecting installation unless
engine-strict is enabled. The Netlify version setting applies when that
configuration file is active (see Deployment).
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 18 October 2026, commit build/repo-governance-continue-spec-001, Node 22.22.0, npm 10.9.4. Jest ESM configuration validated; Vitest fallback added; pnpm cleaned; Node.js 24 pinning complete.
| Test Runner | Framework | Status | Baseline | Config |
|---|---|---|---|---|
| Jest | @swc/jest | ✅ Working | 588 tests passing (11 suites) | jest.config.js with ESM via @swc/core |
| Vitest | vitest |
✅ Installed | Fallback runner; no UI package declared | vitest.config.ts with matching Jest discovery patterns |
| Speckit | node --test | 103 pass, 1 fail (acceptance) | Regression test suite for spec creation → plan → tasks pipeline | |
| Bats | shell tests | ✅ Working | Build verification | tests/build.bats validates Vite build output |
| Playwright | e2e tests | Command structure valid | Browser not installed in CI agent env |
| Command | Result | Notes |
|---|---|---|
npm ls --depth=0 |
✅ Passed | No missing packages; vitest added |
npm run build |
✅ Passed | Production build succeeds |
npm run validate:branch-name -- --branch build/repo-governance-continue-spec-001 |
✅ Passed | Branch validation working |
npm run test:build |
✅ Passed | Bats build tests pass |
node --test tests/speckit.test.mjs |
✅ 103/104 | Accepted baseline (1 known failure: template precedence) |
npm run test:unit |
✅ 588 tests | Jest ESM (@swc/jest) working; all test suites pass |
npm run test:e2e |
Playwright structure valid; browser not in agent env | |
npm run journal:validate |
✅ Passed | Content validation working |
npm run journal:check-links |
✅ Passed | Link integrity checking working |
npm run journal:parse |
✅ Passed | Markdown parsing and export working |
- ✅ T008: Jest ESM configuration verified (588 tests passing)
- ✅ T009: Vitest fallback installed (
vitest@1.6.1added to devDependencies) - ✅ T010: Test baseline documented above (this section)
- ✅ T011: pnpm artefacts removed (workspace.yaml, lock.yaml, pnpm.overrides block, netlify.toml command)
- ✅ T012: Node.js 24 pinning complete (.nvmrc, engines field, README, netlify.toml updated)
- ✅ T013-T015: Tailwind removed completely
- No tailwindcss or @tailwindcss packages in dependencies
- No Tailwind config files (tailwind.config.*, .postcssrc)
- postcss.config.mjs is empty (no Tailwind plugins)
- BEM CSS fully in place:
src/styles/(blocks, components, effects, patterns, tokens) - Guidelines document BEM-only requirement (
guidelines/css-architecture.md)
- ✅ T025: Jest ESM configuration verified and locked (11 suites, 588/588 tests pass with @swc/core)
- ✅ T026: Bats build verification confirmed (12/12 tests pass; validates output integrity)
- ✅ T027: Playwright e2e configured (structure valid; requires browser install for execution)
- ✅ T028: Comprehensive testing guide created (
docs/TESTING.md; covers all suites, troubleshooting, CI/CD) - ✅ T029: PR labeling workflow active (fetches canonical labeler.yml from lightspeedwp/.github; applies labels by branch type)
- ✅ T030: Test command status updated (above tables in this section)
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. Node 24 LTS selected via opt-in
.nvmrc;package.jsonengines.node: ">=24"permits later majors and is advisory by default (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.