schema: spec-driven # Project context - shown to AI when creating artifacts context: | Tech stack: - Frontend: React 19 + Vite 6 + TypeScript 5 - Backend: FastAPI + SQLAlchemy 2.0 (async) + Pydantic v2 + Alembic - Database: PostgreSQL 17 - Auth: Authentik OIDC (planned) - Runtime: Docker Compose (Portainer-managed production) - Routing: Traefik subdomain-based - Monorepo: pnpm workspace Conventions: - Task IDs follow FN-XXX pattern (e.g., FN-002, FN-003) - Conventional commits with scope: feat(FN-XXX), fix(FN-XXX), docs(FN-XXX) - Backend models in apps/api/app/models/ - Backend routers in apps/api/app/routers/ - Frontend code in apps/web/src/ - Tests: Vitest (frontend), pytest (backend) - Documentation in docs/ folder (architecture.md, mvp-scope.md, etc.) Domain knowledge: - Headquarter: hosted workspace + tool-orchestration platform - Users create projects, connect Git repos, spawn containerized tools - Built-in tools: OpenCode and code-server - Each tool instance gets HTTPS subdomain via Traefik - Manifest-driven tool registry with JSON schema - Provider-abstracted Git (GitHub, GitLab, Gitea, Forgejo) - Per-repository SSH key generation (Ed25519) - Encrypted secret storage (Fernet) - Config storage at global/user/project/tool-instance scopes # Per-artifact rules rules: proposal: - Always reference the task ID (FN-XXX) in the proposal - Include dependency on previous FN tasks if applicable - Reference docs/mvp-scope.md for scope boundaries design: - Follow existing patterns in apps/api/app/ and apps/web/src/ - Reference architecture.md for system design decisions - Include database schema changes if applicable tasks: - Break tasks into implementation steps (Step 1, Step 2, etc.) - Include test verification step - Include documentation update step - Reference specific files that need modification