Reminder: This repo follows the Type-1 annex ritual described in
README.md. Before touching code, make sure your task exists intasks.yaml, log your work viapnpm run new:session, and runpnpm run tasks:export && pnpm run checkbefore raising a PR.
The 3D campus experience lives in src/, split into targeted modules: ui/ for panels and overlays, animation/ for scene motion, network/ and home_assistant/ for live data, and registries/ for generated lookup tables. Shared utilities sit under lib/, utils/, and config/. Workflow and import helpers reside in src/tools/. Static assets (GLB/STL models, floorplan SVGs) ship from public/, while stakeholder narratives sit in docs/. Vite entrypoints (main.js, scene.js, Setup.js) and TypeScript metadata (src/tsconfig.json, vite.config.js) anchor the build.
npm run dev— Launches Vite withpredevregistry generation so local data stays in sync.npm run build— Type-checks withtscthen emits optimized assets underdist/.npm run preview— Serves the production bundle for release verification.npm run lint— Applies the project ESLint ruleset to every JS/TS module insrc/.npm run generateRoomRegistry/npm run generateLabelRegistry— Rebuild generated data when source SVG or Home Assistant fields change.
Before opening or working on any task, run a quick web search on the topic to gather current best practices, terminology, and known blockers. Capture the key links or takeaways in the task’s Notes column (or description) so downstream agents understand the reference context that informed the work.
Recommended research loop:
- Be specific with search queries (technology + use case + “best practices”).
- Verify source credibility:
- Cross-reference multiple reputable sources.
- Prioritize official documentation or standards.
- Consult academic/industry papers when available.
- Assess community consensus (issues, forums, RFCs).
- Document findings in the task/session log.
- Benchmark against existing solutions and flag risks.
- Generate follow-up tasks if unexpected work emerges from research.
Follow the ESLint configuration in eslint.config.js, which enforces modern ECMAScript/TypeScript defaults with browser and Node globals. Use 2-space indentation, dangling commas only where they clarify multi-line literals, and prefer ES modules (import/export). Mirror existing names: PascalCase classes/components (Setup.js), camelCase helpers (uiUpdater.js), and kebab-case asset files. Keep configuration constants in config/ and isolate side-effectful code in the relevant module rather than utils/.
No automated suite exists yet; new features must include targeted smoke checks. Place future unit tests beside their sources using the <module>.test.ts naming pattern and run them with node --test (add a matching npm script when you contribute the first suite). Always run npm run lint and exercise the flow in npm run dev before opening a PR, capturing edge cases like empty registry payloads.
Commits follow Conventional Commit prefixes (feat:, fix:, chore:) as seen in the Git history; keep scopes meaningful (feat(ui):, fix(network):). Squash work-in-progress branches before review. Pull requests should include: problem summary, implementation notes, regeneration steps for registries, screenshots or clips when UI changes render differently, and linked issue or ticket references. Request review only after the branch rebases cleanly on the latest main and passes lint/build locally.
Create a .env.local aligned with dotenv usage in src/tools/ and vite.config.js; the build reads VITE_* keys for API hosts. Floorplan-driven registries rely on public/floorplan.svg; keep SVG group IDs stable (g#rooms) so generateRoomRegistry.js resolves paths. When adding sensors or rooms, extend the raw source data first, regenerate registries, and commit both the source edits and the derived src/registries/* outputs.
public/icons/ houses a curated SVG set (e.g. temperature.svg, occupancy.svg, badge-3d.svg) exposed via /icons/<name>.svg. Reuse these when styling toolbar chips, dashboard cards, or sprite labels so the UI stays visually consistent. Add new icons using the same naming convention and keep them monochrome for easy theming.
- HITL or Semi-supervised projects must be created by the user. Agents can only scaffold Unsupervised projects.
- Always capture
variantandintentinsidetasks.yaml(projectblock) before logging any sessions.