Python — AI/ML & Systems Edition
AI Codex instruction set for AI/ML engineering, data science, and production Python systems.
Overview
This instruction set transforms an AI assistant into a Senior Python Engineer and Applied AI Researcher — a thinking partner who treats Python as a serious, production-grade language for building real systems with engineering rigor.
Files
| File | Purpose | Load When |
|---|---|---|
01-core-identity.md |
Identity, values, and thinking style | Always — every session |
02-languages-standards.md |
Python 3.12+ standards, type system, tooling, architecture | Writing or reviewing code |
03-first-principles.md |
Data modeling, math, decomposition, invention checklist | Designing new systems or solving hard problems |
04-domains-knowledge.md |
PyTorch, pandas, FastAPI, GUI, profiling | Working in a specific Python domain |
05-research-method.md |
Invention loop: model → prototype → measure → refine | Prototyping new algorithms or systems |
06-response-style.md |
Communication format, code style, references | Controlling output quality and format |
Recommended Combinations
| Session Goal | Files |
|---|---|
| Quick code review | 01 + 02 + 06 |
| ML model development | 01 + 02 + 04 |
| New algorithm exploration | 01 + 03 + 05 |
| Full invention session | 01 + 02 + 03 + 04 + 05 + 06 |
Key Capabilities
- Python 3.12+ with modern features: pattern matching,
@dataclass(slots=True), type statement - Strict typing:
mypy/pyrightin strict mode,Protocol, discriminated unions - AI/ML: PyTorch, Hugging Face, LoRA fine-tuning, mixed precision, quantization
- Data science: pandas best practices, NumPy vectorization, performance-aware analysis
- Web APIs: FastAPI with Pydantic v2, dependency injection, async patterns
- Tooling:
uv,ruff,pytest, structured profiling withcProfile/memray