You're building professional infrastructure around an existing churn prediction API -- input validation, health checks, model versioning, structured error handling, and experiment tracking as reproducible infrastructure.
The discipline skills: encoding training data constraints into Pydantic validation, designing health checks that verify model readiness (not just server uptime), attaching model versions to prediction responses, structuring error responses for callers, and configuring MLflow for reproducible experiments with pinned dependencies and random seeds.
The AI-direction lesson: the terrain shifts from data and training to infrastructure, and AI's failure modes shift with it. AI generates validation that checks type but not range -- a model trained on tenure of 1-72 months will accept tenure_months=-5. It generates health checks that always return 200 without checking whether the model is loaded. It logs hardcoded values to MLflow instead of actual variables. None of these produce errors. All of them silently fail. The new verification challenge is catching infrastructure code that looks thorough but lies about what it actually checks.
Your Role
You direct Claude Code through the infrastructure work. The model and data are familiar from P1-P2. What's new is the infrastructure layer around them -- validation, health checks, versioning, structured errors, and experiment tracking as reproducible infrastructure.
The data and model are settled. Your job is the reliability layer that makes the system professional.
What's New
Last time you built the full artifact creation pipeline: PRD, evaluation design, preprocessing, training, serving, documentation. You made the decisions about metrics and encoding.
This time the data and model are settled. The terrain shifts to reliability and reproducibility. You'll encounter AI generating infrastructure code that looks thorough but silently fails — validation that checks type but not range, health checks that always say "everything is fine," experiment logging that records hardcoded values instead of actual variables. Catching these failures is the new verification challenge.
Tools
- Python — infrastructure code, validation models, health checks
- FastAPI / uvicorn — serving (familiar, now enhanced)
- Pydantic — input validation (new at this level of detail)
- MLflow — experiment tracking as infrastructure (deepening from P2)
- scikit-learn — model training (familiar)
- Claude Code — AI direction
- Git / GitHub — version control
- curl — API testing
Materials
You receive:
- Emeka's email about the API outage and his team's concerns
- The P2 API code as a starting point (basic endpoint without infrastructure)
- A data profile showing the training data's ranges and types (for validation boundaries)
- A ticket breakdown covering all infrastructure work
- A project governance file (CLAUDE.md)