Repository navigation
Build Test and Tooling
Commands, the green gate, toolchain gotchas, the relocation recipe, and the pre-PR checklist. How a change reaches main is on Contributing.
| Task | Command |
|---|---|
| Dev server (renderer) | ng serve |
| Renderer production build | ng build |
| Electron main + preload |
npm run build:electron (tsc --noEmit typecheck → esbuild main + preload) |
| Tests | CI=true ng test --watch=false |
| Coverage (thresholds) |
npm run test:coverage — enforces the minima in angular.json coverageThresholds
|
| E2E (Playwright) |
npm run e2e — drives the built Electron app; build first (ng build + npm run build:electron) |
| Lint / format |
npm run lint (eslint .) · npm run format (Prettier) |
ng build + npm run lint + npm run format:check + npm run build:electron +
CI=true ng test --watch=false. Everything is green from a clean checkout — there is no tolerated
baseline of failures or prettier warnings. GitHub Actions (.github/workflows/ci.yml) enforces the
same gate on every PR and on main. Green after every commit: if a step can't stay green, it's
too big — split it.
-
node-pty is rebuilt for the Electron ABI on every install — the
postinstallhook runselectron-rebuild --only node-pty(scoped deliberately: rebuilding everything caused problems). electron-builder rebuilds again at package time, and the CIpackjob verifies the asar-unpack. -
No
baseUrl(TS5090) — alias targets intsconfig.jsonpathsmust be relative (src/...). -
tscdoes not rewrite path aliases in emit. The electron main is esbuild-bundled (like preload):--packages=external --tsconfig=tsconfig.json, so@shared/@featuresresolve at runtime;tsc --noEmitis typecheck-only. The build output stays atdist-electron/electron/(the esbuildoutfile) so__dirname-relative paths inmain.tsare stable. Renderer bootstrap (src/shared/app,src/shared/angular) is excluded from the electron tsconfig — it is Angular/renderer code the node build must skip. -
styleUrlcan't use aliases (Angular). When a component with a sharedstyleUrlmoves, inline the rule into its own.scss(the shared ribbon-row:hostblock is inlined per migrated ribbon for this reason). -
Barrels re-exporting types need
export type { … }(isolatedModules / TS1205).
Moving a directory/service to @shared or a feature is relocation, not a rewrite — do not refactor
logic or rename for taste while moving. In order:
-
git mv <src-dir> <dest-dir>— move the whole directory so internal./siblingimports survive. - Fix the moved files' own up-paths (a relocated
from '../../../shared/X'silently retargets wrong):sed -E -i '' "s#from '(\.\./)+shared/#from '@shared/#g"across the moved files. - Repoint importers with a sibling-safe pattern that catches both
../X/Xandservices/X/X:grep -rlE "from '[^']*/<dir>/<base>'" src. It does not catch same-dir./X— repoint those explicitly when splitting a directory. Also grep inbound edges (the selectorapp-<x>-viewand the class import), not just the moved unit's own imports. -
prettier --writethe touched files; run the green gate.
Standing a feature up adds: gate-check its dependency cone → promote any foreign kitchen deps to
@shared first → sever cross-feature embeds → relocate to src/features/<f>/angular → write
<f>.feature.ts → add one line to config.ts → delete its @case (if any) from the shell. Splittable
into relocate-then-flip commits.
-
pathis a reserved zsh var tied to$PATH—for path in …clobbers$PATHand every external command then fails "command not found". Never loop withpath/fpath/cdpath/manpath; usep/f/svc. -
zsh does not word-split unquoted
$var—for f in $(grep -rl …)runs once with the whole blob. Iterate viagrep … | while IFS= read -r f; do …; done. -
macOS BSD
sedhas no\b(silently no-ops) — use plains/Old/New/gfor symbol renames.
- Every class member has an explicit
public/protected/privatemodifier. - Every type annotated — members, parameters, return types, and locals. No
any. - OOP by default; FP only where it reads better. Names intention-revealing.
- Functions small, one thing, ≤2 params (or an options object). No floating promises; failures
throw typed errors, never silent
null/undefined. - Every member — including
private— has genuine TSDoc with the correct opening phrase. - Comments explain why; no commented-out code; no untracked
TODOs. - No file crosses ~500 LOC / ~5 responsibilities without decomposition into modules/collaborators.
- No dead code shipped: no stub/seed data on production paths, no editable setting without a reader, no unreferenced exports.
- Angular: standalone, signals/
computed,OnPush,inject(),protectedtemplate members, built-in control flow. Electron:contextIsolation/sandboxon,nodeIntegrationoff, narrowcontextBridge, IPC validated. - New/changed features respect the invariants:
sharednames no feature; a feature imports only@shared/@features; registry descriptor + oneconfig.tsline. - Tests follow AAA + FIRST, named
method_condition_expectation, behaviour via public API. - The green gate passes (no new failures, no new prettier warnings).
Using Studio
Contributing
How it works
- Architecture
- Runtime seams
- Agent access and permissions
- Agent MCP capabilities
- Agent surfaces, prompts and skills
- Source control
- Plugins
- Package managers
- Language servers — capability matrix
- Language servers — adding a server
- Setup wizard
- Container engines
Decisions