Guidelines for AI agents in this repository. This file applies to the whole project.
- Monorepo with two apps:
server(Fastify + SQLite + OTLP) andweb(Vite + React + Tailwind). - OTLP is received on port 4318, API/SSE server on 4319, frontend on 5173.
- Read relevant code for the area being changed.
- Make the smallest change that solves the task.
- Run local verification for affected parts.
- Update documentation when needed.
- Install:
mise run install - Dev:
mise run dev - Typecheck:
mise run typecheck - Test:
mise run test - Lint:
mise run lint - Format check:
mise run format:check - Format write:
mise run format - Build:
mise run build
- New features should include tests when reasonable.
- Run at least
mise run lintand relevant tests for changed code. - Do not introduce large refactors without explicit need.
- Keep existing API contracts unless a change is agreed.
Run these from repo root for all code changes:
mise run format:checkmise run lintmise run typecheckmise run testmise run buildwhen build/config is affected
If any check fails, the PR should not be considered ready.
- Branch names:
feat/<short-description>,fix/<short-description>,chore/<short-description>. - Commit-format: Conventional Commits (
feat:,fix:,chore:,test:,docs:,refactor:). - Keep commits small and focused; avoid mixing mechanical formatting with feature changes in the same commit.
- Changes in OTLP parsing or attribute keys must be evaluated against existing dashboards and tests.
- Changes to response schemas for
/api/*require corresponding updates inweb/src/apiand relevant tests. - Avoid breaking changes in existing endpoints without explicit agreement and README documentation.
- TypeScript strict mode is the default.
- Keep functions small and testable.
- Prefer pure helper functions for business logic.
- Use
oxlintfor linting andoxfmtfor formatting.
- Destructive git commands such as hard reset.
- Changing database schema without updating all affected layers.
- Changing ports/endpoints without updating README and client code.