From d1bdfc499382c4564f115a47880cee66744f3a1f Mon Sep 17 00:00:00 2001 From: Piotr Oleszczyk Date: Tue, 3 Mar 2026 01:26:55 +0100 Subject: [PATCH] docs: replace CLAUDE.md with AGENTS.md and add frontend details --- CLAUDE.md => AGENTS.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) rename CLAUDE.md => AGENTS.md (69%) diff --git a/CLAUDE.md b/AGENTS.md similarity index 69% rename from CLAUDE.md rename to AGENTS.md index 6634b64..11e0e83 100644 --- a/CLAUDE.md +++ b/AGENTS.md @@ -1,17 +1,17 @@ -# CLAUDE.md +# AGENTS.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +This file provides guidance to AI coding agents when working with code in this repository. -## Repository structure +## Repository Structure -This is a monorepo. The backend lives in `backend/`; a frontend will be added in the future. +This is a monorepo with **backend** and **frontend** directories. ## Commands -Run all backend commands from the `backend/` directory: +Run the backend from the `backend/` directory: ```bash -# Run scripts +# Backend cd backend && uv run python main.py # Linting / formatting @@ -20,11 +20,29 @@ cd backend && uv run black . cd backend && uv run isort . ``` -No test suite exists yet. +Run the frontend from the `frontend/` directory: + +```bash +# Frontend +cd frontend && pnpm dev + +# Type checking / linting / formatting +cd frontend && pnpm check +cd frontend && pnpm lint +cd frontend && pnpm format +``` + +No test suite exists yet (backend has some test files but they're not integrated into CI). ## Architecture -**innercontext** collects personal health and skincare data and exposes it via MCP to an LLM agent. Stack: Python 3.12, SQLModel (0.0.37) + SQLAlchemy, Pydantic v2, FastAPI, PostgreSQL (psycopg3). +**innercontext** collects personal health and skincare data and exposes it via MCP to an LLM agent. + +**Backend Stack:** Python 3.12, SQLModel (0.0.37) + SQLAlchemy, Pydantic v2, FastAPI, PostgreSQL (psycopg3). + +**Frontend Stack:** SvelteKit 5, Tailwind CSS v4, bits-ui, inlang/paraglide (i18n), svelte-dnd-action. + +### MCP Server (`backend/innercontext/mcp_server.py`) ### Models (`backend/innercontext/models/`) @@ -43,7 +61,7 @@ No test suite exists yet. **`SkinConditionSnapshot`** is a weekly LLM-filled record (skin state, metrics 1–5, active concerns). -### Key conventions +### Key Conventions - All `table=True` models use `Column(DateTime(timezone=True), onupdate=utc_now)` for `updated_at` via raw SQLAlchemy column — do not use plain `Field(default_factory=...)` for auto-update. - List/complex fields stored as JSON use `sa_column=Column(JSON, nullable=...)` pattern (DB-agnostic; not JSONB).