# CLAUDE.md — Python AI Coding Agent Context & Token Boundary Rules for `anysphere/cursor`
[![PulseForge 2026 Empirical Benchmark](https://exactbaseline.com/api/badge/anysphere/cursor.svg?tier=community)](https://exactbaseline.com/pulseforge-leaderboard?repo=anysphere/cursor)

> **Generated by [PulseForge AI Empirical Radar](https://exactbaseline.com/pulseforge-leaderboard)** • Maintainer: `@anysphere` • Stack: `Python` (19,836 KB / ~476,064 LOC)
> Full 7-File Hardening Bundle (`litellm-router.yaml`, `pulseforge-ci.yml`, `test_agent_eval.py`, `llms.txt`, `LAUNCH_HN_REDDIT.md`, Tier-1 Verified Shield): https://exactbaseline.com/launch-kit?repo=anysphere/cursor

## 1. Context Window & Token Boundary Rules (-58% Discovery Token Bloat)
- **Excluded Discovery Paths (NEVER read, index, or grep)**: `.venv/, __pycache__/, *.pyc, uv.lock, poetry.lock, .pytest_cache/, dist/, build/`
- Before reading any file > 300 lines, query symbol definitions or line ranges first.
- Keep per-turn prompt context <= **19,994 tokens** (down from 47,606 unindexed tokens/turn; saves ~$322.17/mo).
- Keep every source file strictly under 1,000 lines.

## 2. Python Architecture, Schema Boundary & Verification Gate for Cursor
- **Verification Command**: Run `uv run pytest -q && ruff check .` after every contiguous code edit.
- **Schema & Boundary Discipline**: Pydantic v2 TypeAdapter + Instructor/BAML strict JSON boundary validation.
- Never hardcode API keys, bearer tokens, or `.env` secrets in source files or test fixtures.

## 3. Empirical Benchmark Attestation (65.0 -> 95.8/100)
- Live 4-Pillar Telemetry Profile: https://exactbaseline.com/pulseforge-leaderboard?repo=anysphere/cursor
- Machine-Readable LLM Index: https://exactbaseline.com/pulseforge-leaderboard.md
