- Trust current code and config over older prose when they conflict.
- Prefer
backend/pyproject.toml,frontend/package.json, project configs, and source conventions over narrative docs. - Treat
.planning/as the home for active specs, plans, reviews, and archives. - Treat
docs/as durable reference documentation only.
- Monorepo with
backend/andfrontend/. - Backend: FastAPI, Python 3.10+, async SQLAlchemy, asyncpg, Alembic, PostgreSQL JSONB, Redis, Pydantic, JWT, uv.
- Frontend: Vue 3, Vuetify 3, Vite, Pinia, Axios, Vitest, Playwright, npm.
- Domain standards: GA4GH Phenopackets v2 and VRS-aware variant handling.
- Keep backend code async-first.
- Prefer clear router/service/model boundaries over large mixed-responsibility modules.
- Use centralized frontend API utilities rather than ad hoc fetch logic.
- Preserve server-driven pagination, sorting, and filtering for data tables.
- Use
.planning/for planning artifacts anddocs/for stable documentation; do not blur the boundary again.
- Prefer root
maketargets first for setup, running, and verification. - Keep git worktrees as sibling directories, never nested inside the repo.
- Before committing or merging, run the relevant repo checks for the code you changed.
- Before calling work complete or opening/updating a PR, verify the relevant local checks pass and inspect the PR's GitHub Actions status; if Actions fail, investigate, fix, and re-run until the PR is green or a deliberate blocker is documented.
- Do not ignore failing tests, lint errors, or type errors; fix them or document a deliberate exception.
- Use snake_case for modules and functions, PascalCase for classes.
- Use
rufffor formatting/linting andmypyfor type checking. - Keep imports ordered: standard library, third-party, local.
- Use Google-style docstrings where docstrings are needed.
- Prefer explicit validation and conflict handling over raw database errors leaking outward.
- Use Vue Composition API and
<script setup>patterns. - Keep SFC block order as
template,script,style. - Use
@/aliases for local imports. - Never use
console.log()in frontend code; usewindow.logService. - Keep pagination and sorting server-side; do not reintroduce client-side table sorting/pagination.
AppDataTableis the standard table wrapper and should remain server-driven by default.
- Backend tests use
pytestandtest_*.py. - Frontend tests use Vitest and Playwright with
*.spec.js. - Prefer testing public behavior over implementation details.
- Prefer fixtures, mocks, and deterministic inputs over live external dependencies.
- Backend requires correct local environment configuration, especially
DATABASE_URLandJWT_SECRET. - Frontend API configuration should target the backend
/api/v2base path. - Production-sensitive behavior should fail closed rather than silently degrade.
- If implementation details need to be durable, promote them into
docs/. - If a file is an active plan, review, or roadmap, keep it in
.planning/. - Archive finished or superseded planning material promptly by type.