Last updated: 2026-01-31
- Audience: Developers (intermediate)
- Scope: Topic defined by this document
- Non-scope: Anything not explicitly covered here
- Owner: TBD (confirm)
- Review cadence: TBD (confirm)
When you work in this repo, you're not just changing code — you're also keeping the map up to date.
For every project, maintain a detailed FORJAMIE.md at the repo root that explains the whole project in plain language — like you're explaining it to future-me after I've been away for a while.
Hard rule: if a commit changes behavior, structure, data flow, config, or tooling, then FORJAMIE.md must be updated in the same change-set. If a commit already happened without the doc update, immediately follow with a doc-fix commit.
Think of FORJAMIE.md as the "project memory" that never forgets.
Before you call the work "done", update FORJAMIE.md so it's true again.
Checklist:
- TL;DR still matches reality (what this is + what changed).
- Architecture & diagrams updated if any connections/flows changed.
- Codebase map updated if files/dirs/modules moved/appeared/disappeared.
- How to run/test updated if commands, env, config, or setup changed.
- Lessons learned recorded (bugs hit, root cause, fix, prevention).
- Weaknesses & improvements updated.
- Add a short Recent Changes entry: what changed, why, impact (include commit hash if available).
If you can't do one of these because something is unclear, stop and ask one yes/no question.
Not done until:
- The code works, and
FORJAMIE.mdmatches reality, and- Diagrams are accurate, and
- Weak spots + improvements are updated, and
- Recent change entry is added.
This is a pnpm workspace monorepo. Key locations:
platforms/mcp/— MCP server + tool contracts for ChatGPT integration.packages/— reusable libraries (ui,runtime,tokens,widgets,cloudflare-template,cli,astudio-icons,astudio-make-template,skill-ingestion).docs/— architecture, guides, audits, and build pipeline docs.scripts/— build pipeline, version sync, and compliance tooling.
Common commands (from root package.json):
pnpm install— install workspace dependencies.pnpm dev— run web app.pnpm dev:web/pnpm dev:storybook— run only one surface.pnpm build/pnpm build:web/pnpm build:widgets— build pipeline targets.pnpm lint/pnpm format/pnpm format:check— lint and formatting.pnpm test— UI unit tests.pnpm test:e2e:web/pnpm test:a11y:widgets/pnpm test:visual:web/pnpm test:visual:storybook— Playwright suites.
- JS/TS: Biome (
biome.json) + policy checks (pnpm test:policy). Keep files formatted viapnpm format. - React components live in
packages/ui/src/components/**; Storybook stories use*.stories.tsx.
- Web/UI: Vitest in
packages/ui, Playwright for e2e/a11y/visual.
Recent history follows Conventional Commits: feat:, fix:, docs:, chore:, refactor:. PRs should include a clear summary, relevant test results, and updates to docs when public APIs or workflows change. Use the checklist in CONTRIBUTING.md (lint, format check, build, and tests for touched areas).
Use local .env only; never commit secrets. Review SECURITY.md for policies. For tokens and cross‑platform parity, follow docs/architecture/ and docs/BUILD_PIPELINE.md.
Always verify JSON syntax with jq or similar before declaring JSON fixes complete. Run: cat <file> | jq . to validate.
When fixing mise trust errors, run mise trust explicitly and verify with mise list or mise doctor before considering the task complete.
After installing development tools, always verify installation with --version or equivalent and confirm the tool is in PATH.
- Use
scripts/codex-preflight.shbefore multi-step, destructive, or path-sensitive workflows. - Source it with
source scripts/codex-preflight.shand runpreflight_repo(orpreflight_js,preflight_py,preflight_rust) as a guard before changing repo state.
- Explore project first, then invoke skill.
- IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning for any React, Tauri, Apps-SDK-ui, Tailwind, Vite, Storybook + Chat Widget tasks.
- Add a Table of Contents for docs.