An instruction-first FinOps setup for AI coding workspaces. It installs aligned ignore boundaries and workspace routing rules so agents avoid unnecessary context, keep terminal work terse, and preserve full quality for code and planning work.
This repository mirrors the global setup installed on the maintainer's device for four primary tools: Antigravity, Codex, Cursor, and Claude Code. It does not modify model pricing, model behavior internally, or provider quota systems. The benefit comes from reducing avoidable context ingestion and from making agent output rules explicit.
Run the appropriate command in the root of the project you want to equip:
curl -fsSL https://raw.githubusercontent.com/Rezhnn/Token-Optimization/main/install.sh | bashirm https://raw.githubusercontent.com/Rezhnn/Token-Optimization/main/install.ps1 | iexThe scripts write workspace files into the current project. The rules are usable immediately by tools that read those workspace instruction files. They are not a global installer and do not install a background service.
For step-by-step manual setup, see INSTALL.md.
The public repo follows the same capability shape as the installed global setup:
| Tool | Installed workspace surface | Purpose |
|---|---|---|
| Antigravity | GEMINI.md, .geminiignore |
Gemini/Antigravity instructions and shared ignore boundary |
| Codex | AGENTS.md, .codexignore, .openaiignore |
Codex workspace instructions and OpenAI/Codex ignore boundaries |
| Cursor | .cursorrules, .cursorignore |
Cursor rules and ignore boundary |
| Claude Code | CLAUDE.md, .claudeignore |
Claude Code instructions and ignore boundary |
All five ignore files use the same template:
.geminiignore.cursorignore.claudeignore.codexignore.openaiignore
The zone system is an instruction contract. It relies on the active agent reading and following the workspace rules.
| Zone | Label | Main Purpose | Style / Grammar | Token Budget |
|---|---|---|---|---|
| 0 | Sacred | Source files, comments, docstrings, and docs writes. | Full standard programming prose. Clean Code, SOLID, KISS, DRY. | Unconstrained |
| 1 | Premium | Architecture, UI/UX, planning, PRDs, reviews, and client-facing docs. | Full depth, structured markdown, Mermaid when useful. | High |
| 2 | Hybrid | Reviews, debugging, explanations, comparisons, and general Q&A. | Compress internal analysis; keep final output professional. | Medium |
| 3 | Caveman | Terminal, git, package operations, and quick queries. | Terse operational output with minimal preamble. | Minimal |
Priority order:
Zone 0 > Zone 1 > Zone 2 > Zone 3
Explicit tags such as [PLAN], [ARCH], [CMD], [GIT], [PKG], [QUICK], and overrides such as !verbose, !code, and !fast guide routing before default logic runs.
This repo does not currently include an automated benchmark runner. The files under benchmarks/ are sample prompts and a placeholder result record for future measurement work.
Do not cite the benchmark numbers as verified production results until a runner exists that:
- executes the sample prompts,
- records model and date metadata,
- counts baseline and routed token usage,
- writes reproducible output to
benchmarks/results/results.json.
See benchmarks/README.md for the current benchmark status.
This visualization is an illustrative model, not a measured benchmark. The chart normalizes the baseline to 100 so the shape of the change is easy to read. The 22 value is a directional example that shows a strong reduction in context load after the workspace rules are applied, not a promise of a specific real-world result.
How to read the graphic:
100is the normalized "before" baseline.22is the illustrative "after" value.- The gap between the two bars represents the reduction in avoidable context load, not a billing guarantee and not a provider-side quota change.
- The estimate assumes the agent follows the workspace files, avoids unnecessary deep reads, and keeps operational output terse when the zone rules call for it.
- The actual result will vary with task size, model choice, prompt shape, and how much irrelevant context the agent would otherwise ingest.
Why the chart matters:
- The skill is meant to reduce wasted attention on lockfiles, generated bundles, large caches, and other low-value surfaces.
- Less unnecessary context can leave more room for the actual task, especially when the agent needs to reason over code, docs, or planning work.
- The visual is intentionally labeled
ESTIMATEDbecause the repository does not include an automated benchmark runner that can produce a verified measurement set today.
Primary supported tools:
- Antigravity
- Codex
- Cursor
- Claude Code
The setup is portable to other tools that honor workspace instruction files and ignore boundaries, but this repo only claims direct support for the four tools above.
This project is built upon the following works and local setup references:
- JuliusBrussee: original caveman concept and terse syntax inspiration.
- Anthropic/OpenAI/Google AI : Zone Based Routing, Harness
This project is licensed under the MIT License - see the LICENSE file for details.