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

> **Generated by [PulseForge AI Empirical Radar](https://exactbaseline.com/leaderboard)** • Maintainer: `@redpandadata` • Stack: `C++` (167,987 KB / ~4,031,688 LOC)
> **Upgrade to Drop-In Migration & 45% Cost-Cut Config Pack ($4.99)**: https://exactbaseline.com/buy/micro_pass?repo=redpanda-data/redpanda
> **Complete 9-File AI Stack BOM & Repo Hardening .ZIP ($9.99)**: https://exactbaseline.com/buy/repo_pass_999?repo=redpanda-data/redpanda

## 1. Context Window & Token Boundary Rules (-58% Discovery Token Bloat)
- **Excluded Discovery Paths (NEVER read, index, or grep)**: `build/, cmake-build-*/, third_party/, *.o, *.a, *.so, *.dylib, *.gguf`
- Before reading any file > 300 lines, query symbol definitions or line ranges first.
- Keep per-turn prompt context <= **26,880 tokens** (down from 64,000 unindexed tokens/turn; saves ~$433.11/mo).
- Keep every source file strictly under 1,000 lines.

## 2. C++ Architecture, Schema Boundary & Verification Gate for Redpanda
- **Verification Command**: Run `cmake -B build && cmake --build build -j && ctest --test-dir build --output-on-failure` after every contiguous code edit.
- **Schema & Boundary Discipline**: GGUF / FlatBuffers strict tensor header bounds & ASan/UBSan memory checks.
- Never hardcode API keys, bearer tokens, or `.env` secrets in source files or test fixtures.

## 3. Empirical Benchmark Attestation (62.6 -> 96.4/100)
- Live 4-Pillar Telemetry Profile: https://exactbaseline.com/pulseforge-leaderboard?repo=redpanda-data/redpanda
- Machine-Readable LLM Index: https://exactbaseline.com/pulseforge-leaderboard.md
