Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/beettlle/pi-spineWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/beettlle/pi-spine/ai-ml-development-standards)<a href="https://agentmods.dev/rules/beettlle/pi-spine/ai-ml-development-standards"><img src="https://agentmods.dev/badge/rules/beettlle/pi-spine/ai-ml-development-standards/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/beettlle/pi-spine/ai-ml-development-standards"><img src="https://agentmods.dev/badge/rules/beettlle/pi-spine/ai-ml-development-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02275 |
| Opus 5.5 | $0.00000 | $0.00910 |
| Sonnet 5.5 | $0.00000 | $0.00455 |
| Haiku 4.5 | $0.00000 | $0.00228 |
Grade A, and why
ai-ml-development-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Persona: AI Research Engineer
- Role: ML systems architect specializing in GPU optimization and reproducible research. Philosophy: "Reproducibility first, performance second, complexity never."
- Traits: Reproducibility-obsessed (seed everything), GPU-aware (memory-efficient), Experiment-tracking (log everything), Safety-first (verify all operations)
AI/ML Development Standards
This file contains AI/ML-specific development standards for PyTorch, TensorFlow, GPU optimization, model management, and reproducibility.
For universal anti-patterns: See general-llm-anti-patterns.mdc
For Python standards: See python-3-development-standards.mdc
Category 1: Tensor Safety Anti-Patterns
1.1 Missing Shape Assertions (CRIT)
CRITICAL: Always assert tensor shapes before operations.
❌ Bad: result = model(input) (no shape verification)
✅ Good: assert input.shape == (batch, seq, dim); result = model(input)
⚠️ Why: Silent shape mismatches cause runtime errors, wastes GPU time, difficult debugging
🔧 Fix: Assert tensor shapes, use .shape checks before operations, validate dimensions
📍 See: python-3-development-standards.mdc section 2.9
Detect: Tensor operations without shape checks, no assertions before model calls, missing dimension validation
1.2 Device Agnosticism Failures (CRIT)
CRITICAL: Always use .to(device) explicitly, never assume device placement.
❌ Bad: tensor.cuda() (hardcoded CUDA), tensor.to("cuda:0") (hardcoded device)
✅ Good: device = torch.device("cuda" if torch.cuda.is_available() else "cpu"); tensor.to(device)
⚠️ Why: Breaks on CPU-only machines, fails on multi-GPU setups, not portable
🔧 Fix: Use device-agnostic code, check availability before device assignment, detect GPU at runtime
📍 See: general-llm-anti-patterns.mdc section 3.6 (Magic Number/String)
Detect: Hardcoded .cuda() calls, no device checks, device strings in code, CPU-only code assuming GPU
1.3 Mixed-Precision Training Errors (CRIT)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 14d ago Changed 39c667d7040f
- 3mo ago First seen · 203 lines · 0 tokens per session scan A 07a4528eaa2a
ai-ml-development-standards is a cursor rule published in the GitHub repository beettlle/pi-spine (3 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,275 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
ai-ml-development-standards compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ai-ml-development-standardsbeettlle/pi-spine | Cursor rule | 3 | today | MIT | A | 0 | Cursor |
| tensorflownedcodes-ok/cursorrules-collection | Cursor rule | 38 | 9mo ago | MIT | A | 413 | Cursor |
| 006_Program_of_Thought_TutorialAIFlowML/cursor_rules | Cursor rule | 24 | 1y ago | none | A | 24 | Cursor |
| standards-data-engrwking/wellness_planner | Cursor rule | 0 | 9mo ago | none | A | 170 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 202k | 9d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | today | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | yesterday | Apache-2.0 | A | 1,147 | Cursor |