You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Copilot / AI agent instructions for SuperConductor
2
+
3
+
This file contains concise, actionable notes for AI coding agents to be immediately productive in this monorepo.
4
+
5
+
-**Monorepo layout:** Yarn workspaces + Lerna. Top-level packages live in `shared/packages/*` and apps in `apps/*`.
6
+
-**Primary apps:**`apps/app` (Electron + React client) and `apps/tsr-bridge` (TSR bridge). See [apps/app/README.md](apps/app/README.md) and [apps/tsr-bridge/README.md](apps/tsr-bridge/README.md).
7
+
8
+
-**Build / dev flow (quick):**
9
+
- Install: run `yarn` at repository root (uses Yarn v4/corepack).
10
+
- Full build: `yarn build` (runs `tsc -b tsconfig.build.json` then `lerna run build`).
11
+
- Dev (Electron app): `yarn start` (builds TS then runs `dev:electron` via Lerna) or from `apps/app` run `yarn dev` to start Vite + nodemon concurrently.
12
+
- Bridge dev: `yarn start:bridge` from root or run `lerna run dev --scope=tsr-bridge`.
- The repo uses project references and a top-level incremental build: `tsc -b tsconfig.build.json` (see root `package.json` -> `build:ts`).
17
+
- After changing public types in `shared/packages/*`, run `yarn build:ts` before consuming changes in `apps/*`.
18
+
19
+
-**Testing & lint:**
20
+
- Root: `yarn test` runs `lerna run test` across workspaces.
21
+
- App-level tests: `apps/app` uses Jest. See `apps/app/package.json` -> `test`.
22
+
- Lint: `yarn lint` (root) and `yarn lintfix` to auto-fix.
23
+
24
+
-**IPC & cross-process patterns:**
25
+
- Renderer ↔ Main communication is typed and centralized. Key files: [apps/app/src/ipc/IPCAPI.ts](apps/app/src/ipc/IPCAPI.ts), [apps/app/src/preload.mts](apps/app/src/preload.mts) and main entry [apps/app/src/main.mts](apps/app/src/main.mts).
26
+
- Electron-specific logic lives under `apps/app/src/electron/` (examples: `SuperConductor.ts`, `bridgeHandler.ts`, `sessionHandler.ts`). Use these as canonical patterns for adding new IPC endpoints.
27
+
28
+
-**Shared package usage & conventions:**
29
+
- Shared code is published as workspace packages under `@shared/*` names (see `apps/app/package.json` dependencies). Edit source under `shared/packages/*/src` and run `yarn build:ts`.
30
+
- Keep API changes backwards-compatible where possible; if you must change exported types, update all dependent consumers and run a full TS build.
31
+
32
+
-**Project-specific idioms:**
33
+
- Scripts use the `run` helper (e.g. `run build:ts`) from top-level `package.json` — prefer using the workspace scripts as written.
34
+
- Patches to third-party deps are included via Yarn patch protocol (see `apps/app/package.json` for `patch:` entries).
35
+
36
+
-**Where to look for examples:**
37
+
- Real-time timeline & playout logic: `apps/app/src/electron/timeline.ts`, `lib/timeline.ts` under `apps/app/src/lib` and `shared/packages/lib/src`.
- Prefer small, focused edits and run `yarn build:ts` to validate TypeScript cross-workspace changes.
42
+
- If changing an exported type in `shared/packages/*`, update consumers and run tests; mention the change in PR description.
43
+
- Do not modify generated `dist/` outputs or artifacts under `electron-output/`.
44
+
45
+
If any section is unclear or you want deeper examples (e.g., specific IPC call patterns or where to run end-to-end flows), tell me which area and I'll add examples or expand this file.
0 commit comments