Guidance for AI coding agents working in this repository.
PLAN.md— implementation plan, API reference, per-phase "Implementation Notes"STATE.md— progress snapshot: phase status, file map, open items, environment quirks
This project ships local skills under .opencode/skills/. Do not rely on model
memory for Angular or Angular Material; the local references are version-matched
(angular/components v22) and authoritative.
-
angular-developer (
.opencode/skills/angular-developer/SKILL.md) General Angular work: components, signals,resource, HTTP, DI, routing, styling, testing, CLI. Read the relevantreferences/*.mdfor the topic at hand. -
angular-material (
.opencode/skills/angular-material/SKILL.md) Angular Material + CDK. Rule: before writing or modifying markup for anymat-*component, open its reference.opencode/skills/angular-material/references/<name>.md(e.g.card.md,toolbar.md,dialog.md) and follow its documented structure. The SKILL.md index alone is NOT sufficient — reading only the index and then writing markup from memory is a known failure mode (it produced amat-cardbuilt from plain<div>s, missing all Material section padding). Material pitfall to remember:<mat-card>adds no padding of its own — use the predefined sections (mat-card-header/mat-card-title/mat-card-subtitle/mat-card-content/mat-card-actions/mat-card-footer).
resource()no longer accepts Observables (Promise/stream loader only). For HttpClient observables userxResource()from@angular/core/rxjs-interop(rxResource<T, R>({ stream: () => obs }),R = voidwithoutparams, nodebugName).- Material theming: single
mat.theme()onhtmlwiththeme-type: color-scheme; colors compile tolight-dark(...)and followcolor-schemeon<html>. The olddefine-standard-theme/all-component-themes/m3-define-paletteAPIs are gone in v22. App colors:var(--mat-sys-*). @Service()decorator = root singleton. OnPush is the default — never set it explicitly.input()/output(),host:object, native@if/@forcontrol flow.- Test runner is karma/Jasmine (deliberate override of the v22 vitest default).
npm start— dev server on port 4200 (pinned in angular.json; backend CORS depends on it)npm run build— production build (budgets: 500 kB warning / 1 MB error initial)npm test— karma headless- There is no lint target in the scaffold;
ng add @angular-eslintis needed first - Backend for live checks:
http://localhost:5193(test unitexample-sleep.service) - API base URL: derived from the page origin +
/apiin production (src/app/core/env.ts, same-origin, no CORS); the development build swaps inhttp://localhost:5193/apiviafileReplacements(env.development.ts)
- Build mode: act without asking, then verify (build + tests + live DOM check when UI changed)
- Headless verification trick:
google-chrome --headless --no-sandbox --virtual-time-budget=12000 --dump-dom http://localhost:4200/ - Commit per phase; after each phase add a
### Phase N — Implementation Notessubsection to PLAN.md - Service names carry the
.servicesuffix — use verbatim, never strip/re-append - Tone mappers keep an unknown-value fallback (D-Bus error names can appear)
- Update STATE.md when ending a session / handing off to a fresh context