- Add httpx>=0.28.0 to services/bff/pyproject.toml for the planned TMDB movie search proxy (M4.3). - Add grpcio-health-checking>=1.83.1 to services/worker/pyproject.toml for Worker gRPC health probing (M3.4/M5.3), updating uv.lock via uv lock. - Copy sibling workspace manifests (pyproject.toml, README.md) in services/worker/Dockerfile and services/bff/Dockerfile so uv sync --frozen --no-dev resolves the monorepo lockfile. - Set ENV DATABASE_URL="sqlite+aiosqlite:////data/magnetflix.sqlite3" in services/worker/Dockerfile to match docs/deployment.md when run standalone. - Update CLAUDE.md and flake.nix shellHook to use uv sync --all-packages so syncing does not uninstall workspace member packages. - Update Makefile generate target to invoke buf directly when already inside nix develop.
1.6 KiB
1.6 KiB
Claude Code Specialized Directives — MagNetFlix
Progressive Context Loading
- Do not load external rule files for simple localized code edits.
- Always inspect
git statusand verify existing files on disk before creating or scaffolding new files. - Read
AGENTS.mdbefore making changes affecting database schema, package dependencies, Git state, or cross-component contracts. - Read
docs/architecture.mdbefore modifying API routes, gRPC definitions, or worker state machines. - Read
docs/deployment.mdbefore changing Dockerfiles, Compose services, or Traefik/Authelia configs.
Build & Tool Execution Commands
- Workspace Sync:
uv sync --all-packages(Never use rawpip) - Workspace Lock:
uv lock - Protobuf Generation:
uv run buf generate(ormake generate) - BFF Dev Server:
uv run --package magnetflix-bff uvicorn bff.main:app --reload --port 8000 - Worker Dev Server:
uv run --package magnetflix-worker python -m worker.main - Database Migrations:
uv run --package magnetflix-worker alembic upgrade head - Lint & Format:
uv run ruff check .anduv run ruff format . - Type Checking:
uv run pyright - Test Suite:
uv run pytest
Auto-Approve Verification Safeguards
- Permitted Read Operations:
git status,git diff,ls,cat, file viewers. - Restricted Write Operations: Multi-service architectural refactors or dependency migrations require direct user confirmation (
/planfirst). - Destructive Commands Prohibited: Never execute
git reset,git clean,git restore, orgit checkouton uncommitted files without explicit permission.