Monorepo layout
Bun workspaces. Root scripts: verify, typecheck, test, lint, knip, env:up/env:down, secrets:{push,pull,verify}, Storybook for studio-ui.
| Path | Contents |
|---|---|
apps/ | Deployables with UI: control-plane (API + studio SPA), admin, site — prerendered marketing TanStack Start Worker (brilliant-site) on main via #318; staging apex cutover via #360/#361 (brilliant.rocks → site, app.brilliant.rocks → studio) — see Marketing site; template-share (SSR /t/<slug> for templates; on main via #345 / #358). |
services/ | Headless Workers: conductor, dispatch, agents, workflows, evals; demo-data (per-session DO for template Try-it demos; on main via #345 / #358) |
packages/ | Shared libs: capabilities, service-contracts (#345 — Effect Schema cross-worker shapes), config (#290 merged — Effect ConfigStore), db, template, studio-ui (shared marks + base CSS under src/styles/ via merged #367), api-types, models, names, rpc, workflows, codemode, dashboards, design-tokens, @brilliant/composer (on main via #318 — shared landing/studio prompt feature; no apps/* imports; server-renderable), …. |
infra/ | pulumi, secrets (catalog + sync), bootstrap, agent-image, bi |
skills/ | Curated SKILL.md library (synced to R2) |
docs/ | Architecture, ADRs (docs/decisions/), plans (docs/plans/), QA, thin docs/wiki/ |
scripts/ | Verify, e2e, env tooling, deploy helpers |
Placement rules (from CODING_STANDARDS.md)
Since #594 (merged 2026-10-07) code rules live in CODING_STANDARDS.md, not root AGENTS.md (now a task router; see Verify & ship).
- Cross-worker helpers (JWT, cookies, hashing) →
packages/capabilitiesonly. - Coding agent (host, tools, prompts, seed) →
services/conductor/src/coding-agent/only. - Worker
src/root: onlyindex.ts,router.ts,env.ts; rest inroutes/,do/,lib/, or domain dirs. Noutils/next tolib/. - Durable cloud resources → Pulumi, not console one-offs (see Hosting & Pulumi).
Effect (from CODING_STANDARDS.md; first landed in AGENTS.md via #290)
Effect (v4) is the default framework for new code, adopted gradually. packages/config is the reference (Context.Service, layers, typed errors, one Effect.runPromise at the async boundary).
- New features, including small ones → write in Effect, with typed errors for meaningful failures.
- Editing existing non-Effect code → ask the user whether to migrate; until told otherwise, fix it in the file’s existing style (migration is not a prerequisite).
- Keep Effect out of one-shot tooling (Pulumi,
scripts/env). - Check installed
.d.ts(not v3 memory): e.g.Context.Service, notContext.Tag.
Full wording: monorepo CODING_STANDARDS.md § Effect. Design context: Admin Config.
Quality gates
bun run verify runs every package typecheck/test plus repo gates (Biome, knip, file-size, builds, migrations, worker-boot, …) and prints a PASS/FAIL table. CI (verify.yml) runs the same list as one job per check (#273, merged — see Verify & ship). The cc-check gate was removed with all @cc code contracts in #592 (merged 2026-10-07), see Verify & ship.
Studio UI design-system library and Figma Code Connect (#995, merged)
PR #995 (opened 2026-10-16 22:36 IDT by yoni-monday, branch studio-ui-figma-connect; merged 2026-10-16 23:08 IDT by yoni-monday, merge 73289016, final head bc20c394) sets where the design-system components that Figma Code Connect maps to code live:
- Figma stand-in components sit under
packages/studio-ui/src/library/(for examplechat.tsx,chrome.tsx,controls.tsx,icons.tsx,list-item.tsx,menus.tsx,mobile.tsx,screens.tsx,surfaces.tsx), each with stories next to it. Figma Code Connect maps each published Figma component to its file there. - They are not exported from the
@brilliant/studio-uibarrel. Review changed this before merge: exporting placeholders under the same names as real app components made the stub the obvious import. Don't import them into apps; the later Code Connect*.figma.tsxfiles are their intended users. - Where a real component already exists, Code Connect points at it, not the stand-in. The share dialog and mobile home stand-ins are named
FigmaShareDialogandFigmaMobileHome; their Figma components map toapps/control-plane/web/src/components/sharing/ShareDialog.tsxandapps/control-plane/web/src/components/home/MobileHome.tsx. - Stand-ins are visual only. The drawn toggle is a non-interactive
aria-hiddenspan, not a working switch, andscreens.tsxhas a header saying most variants only change the label. - Every exported stand-in needs a story that renders it, or
knip(the unused-export check inbun run verify) fails withUnused exports. That is whyDisclosureis rendered in the shell story. - The studio-ui Storybook sidebar follows the Figma page list (sort order in
packages/studio-ui/.storybook/preview.ts): Shell layouts & content, then UI components with Typography, Colors, Icons & logos, Headers & bars, Prompt box & chat, Buttons & toggles, List item, Tooltips, Menu, Dropdowns & comboboxes, Modals and dialogs, Utils, Prototype components, and Brand assets. Existing stories (AgentLockup, SuggestionMark, TodoList, UserAvatar, UserInitials, WorkingRing, Agent avatar, Auth) were retitled into these groups.TitleTilestays under Tooltips because that Figma page holds the Title component. - When adding a component that has a Figma counterpart, put it in
src/library/, give it a story in the matching Figma-page group, and map Code Connect to the real app component if one exists.
Not verified in the PR: opening Storybook to check the order, and a first Code Connect mapping.
Jev linter packages (#981, merged)
PR #981 (merged 2026-10-17 09:07 IDT, merge 644fe79c) adds two packages:
packages/jev-linter(@brilliant/jev-linter): the semantic-lint rules, facts pass, state builder, catalog and the container entry. It has its ownbun.lockpinning typescript@5 and is an agent image input, so editing it rebuilds the image.packages/jev-linter-eval(@brilliant/jev-linter-eval): the labeled corpus and scoring harness.
See Semantic lint (Jev linter).