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

> **Generated by [PulseForge AI Empirical Radar](https://exactbaseline.com/leaderboard)** • Maintainer: `@postalserver` • Stack: `Ruby` (3,508 KB / ~84,192 LOC)
> **Upgrade to Drop-In Migration & 45% Cost-Cut Config Pack ($4.99)**: https://exactbaseline.com/buy/micro_pass?repo=postalserver/postal
> **Complete 9-File AI Stack BOM & Repo Hardening .ZIP ($9.99)**: https://exactbaseline.com/buy/repo_pass_999?repo=postalserver/postal

## 1. Context Window & Token Boundary Rules (-58% Discovery Token Bloat)
- **Excluded Discovery Paths (NEVER read, index, or grep)**: `vendor/bundle/, tmp/, log/, coverage/, Gemfile.lock`
- Before reading any file > 300 lines, query symbol definitions or line ranges first.
- Keep per-turn prompt context <= **4,032 tokens** (down from 9,600 unindexed tokens/turn; saves ~$64.96/mo).
- Keep every source file strictly under 1,000 lines.

## 2. Ruby Architecture, Schema Boundary & Verification Gate for Postal
- **Verification Command**: Run `bundle exec rspec && bundle exec rubocop` after every contiguous code edit.
- **Schema & Boundary Discipline**: Dry-Schema / Sorbet strict runtime type signatures.
- Never hardcode API keys, bearer tokens, or `.env` secrets in source files or test fixtures.

## 3. Empirical Benchmark Attestation (64.4 -> 96.3/100)
- Live 4-Pillar Telemetry Profile: https://exactbaseline.com/pulseforge-leaderboard?repo=postalserver/postal
- Machine-Readable LLM Index: https://exactbaseline.com/pulseforge-leaderboard.md
