This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
PII Agent — an AI agent demo that interacts with PII data through a Postgres database. The data/ folder is a self-contained database setup (schema, loader, Docker) separate from the agent itself.
- Python: 3.12 (managed via uv)
- Package manager: uv
- Virtual environment:
.venv/
The project has two separate concerns:
data/— Database provisioning: Docker Compose, SQLAlchemy model, CSV loader. This only sets up the demo database.- Agent code (TBD) — Will interact with the database through its own integration, not through
data/.
data/docker-compose.yml— Postgres 16 container (pii_user/pii_password/pii_demo)data/model.py— SQLAlchemy ORM model:BaseandPerson(flat table, 16 string columns matching CSV)data/load_csv.py— Idempotent CSV loader withload_csv(engine, csv_path)function and CLI entry pointdata/sample-pii-data.csv— 30 rows of sample PII data
# Install dependencies
uv pip install -r data/requirements.txt
# Start Postgres
docker compose -f data/docker-compose.yml up -d
# Load sample data into Postgres
python -m data.load_csv
# Run tests
python -m pytest data/tests/ -v
# Run a single test
python -m pytest data/tests/test_model.py::test_person_table_columns -v- Connection string:
postgresql+psycopg://pii_user:pii_password@localhost:5432/pii_demo DATABASE_URLenv var overrides the default connection string in load_csv.py- All Person columns are strings (including dates) — intentional simplicity for the demo
load_csv()is idempotent — skips rows whoseidalready exists