token-frugal-intent-ladder-skilllisted
Install: claude install-skill 4ntiDandruff/zero-bloat-skills
# Token-Frugal Intent Ladder Skill
A tiered natural-language normalization architecture that processes 90%+ of transactional inputs deterministically without spending a single LLM token. Eliminates API costs, eliminates model hallucination, and delivers sub-millisecond response times.
Battle-tested in the **Kas Megapass** natural language cashbook engine (`kas.megapass.web.id/app/ai/normalizer.py`).
---
## 1. The Core Philosophy: "AI Fills, Never Commits"
In financial, inventory, and mission-critical systems, never allow an AI model or heuristic to directly execute database writes. Always enforce a **Draft Review Gate**:
```
[ User Natural Text / Voice ]
│
▼
┌─────────────────┐
│ AI Ladder │ ── Tier 1: Regex & Semantic Rules (0 tokens, <1ms)
│ Normalizer │ ── Tier 2: User Overrides Table (0 tokens, <2ms)
└────────┬────────┘ ── Tier 3: LLM Fallback (Only if ambiguous)
│
▼
[ Structured Draft Preview ] <-- Human glances at amount & category
│
▼ (User Taps "Simpan")
[ Atomic Database Commit ]
```
---
## 2. Active vs Passive Semantic Disambiguation
A common failure mode in financial NLP is mixing up **Debts** (Hutang) and **Receivables** (Piutang) due to overlapping vocabulary ("pinjam", "utang", "talang"):
* **Hutang (Cash IN / Liability)**: The user is the recipient of borrowed funds.
* *"aku pinjam uang dari Budi 100rb"*
* *"dapat talangan