Thai Token Optimizer
Table of Contents
┌─ Start Here ───────────────────────────────────────────────────────────────┐
│ 1) Value Proposition 4) Installation 5) Quick Start Lane │
│ 2) Integration Matrix 6) Command Surface 7) Visual Workflows │
│ 3) System Architecture 8) Modes and Profiles 9) Personalization │
├─ Advanced ─────────────────────────────────────────────────────────────────┤
│ 10) MTP / Speculative 11) Fleet Analytics 12) Backup/Rollback │
│ 13) Terminal UI 14) Policy and Config 15) CI Pipeline │
├─ Operations ───────────────────────────────────────────────────────────────┤
│ 16) Real Reduction 17) Runtime Artifacts 18) Troubleshooting │
│ 19) Development 20) Safety Checklist 22) Shell Proxy Mode │
│ 21) License │
└────────────────────────────────────────────────────────────────────────────┘
1) Value Proposition
┌────────────────────────────── BEFORE ──────────────────────────────────────┐
│ Thai prompt/reply is long, repetitive, expensive, and mixed with commands. │
└───────────────────────────────────┬────────────────────────────────────────┘
v
┌─────────────────────────────── TTO v2 ─────────────────────────────────────┐
│ compact Thai + code-aware preservation + safety mode + rollback discipline │
└───────────────────────────────────┬────────────────────────────────────────┘
v
┌────────────────────────────── AFTER ───────────────────────────────────────┐
│ fewer tokens while commands, paths, versions, constraints remain exact │
└────────────────────────────────────────────────────────────────────────────┘
TTO reduces token waste while protecting:
- exact commands
- code fences and inline code
- paths and URLs
- versions and config keys
- hard constraints
- safety-critical instructions
- rollback reproducibility
Core rule:
Tokens can be reduced, but correctness, safety, and key constraints must not be reduced.
Capability Map
┌─ Compression ────────────────┬─ Safety ─────────────────┬─ Operations ──────┐
│ filler removal │ task classifier │ doctor │
│ semantic dedup │ safe mode │ quality score │
│ selective context window │ hard-constraint lock │ coach mode │
│ budget optimizer │ preservation checker │ ops scan │
│ MTP speculative candidates │ rollback-first workflow │ fleet audit │
├─ Integration ────────────────┼─ Personalization ────────┼─ CI / Research ───┤
│ Codex hooks │ tto keep │ strict benchmark │
│ Claude Code hooks │ tto forget │ MTP gate │
│ Gemini extension │ user dictionary │ drift history │
│ OpenCode plugin │ code-aware protection │ calibration gate │
│ OpenClaw / Hermes adapters │ local persistent state │ tto proxy (new) │
└──────────────────────────────┴──────────────────────────┴──────────────────┘
2) Integration Matrix