🔒 Prerequisites (Mandatory)
This skill operates integrated with the SDD framework. Before any technical execution:
0. Mode Check: Verify the current operational mode in .hub-mode.
- Context Check: Rehydrate state by reading
.specs/project/STATE.md, .specs/project/MEMORY.md, and .specs/project/LEARNINGS.md.
- Spec Check: Does the
spec.md file exist with clear requirements?
- Plan Check: Does the
plan.md file define the compression architecture?
Token Distiller: Dual-Mode Communication (v2.4.0)
"Density is the currency of autonomy. Spend wisely."
🧩 Delegation Matrix
As a utility skill, Token Distiller operates as a unified agent across all phases:
| Phase |
Sub-Skill |
Primary Artifact |
Purpose |
| AUDIT |
Self |
Context Report |
Assess token pressure and context health. |
| DENSITY |
Self |
Distilled Output |
Execute linguistic compression or prose expansion. |
🔄 4-Phase Workflow
1. DISCOVERY
- Goal: Audit current context health and token pressure.
- Action: Assess if context exceeds 80% capacity. If so, perform manual context pruning by summarizing previous tool outputs and removing redundant thought paths. Identify task complexity (Quick/Small vs Medium+).
- Output: Context health report and mode selection.
2. SPECIFY
- Goal: Define the required fidelity for the next interaction.
- Action: Set
/mode low (Caveman) for speed or /mode high (Premium) for analysis.
- Output: Mode activation in session state.
3. IMPLEMENT
- Goal: Execute communication according to the selected mode.
- Action: Apply linguistic filters (Caveman fragments or Premium prose). Perform micro-compaction of tool results.
- Output: Compressed or high-fidelity responses.
4. VERIFY
- Goal: Ensure substance preservation and safety.
- Action: Validate that task IDs and technical patterns are intact. Exit Low Token mode for safety warnings.
- Output: Verified, dense communication.
🏗️ Operating Modes
🪨 Low Token Mode (Caveman)
Activation: 'Quick', 'Small' tasks, /mode low [lite|full|ultra], /caveman [lite|full|ultra].
Persistence: Active every response. Reverts only on "stop caveman" or "normal mode".
Strict Response Pattern: [thing] [action] [reason]. [next step].
📊 Intensity Levels:
- lite:
- No filler or hedging.
- Keep articles (a/an/the) and complete grammatical sentences.
- Professional but tight, crisp communication.
- full (default):
- Drop articles (a/an/the) and filler words (really, basically, just, actually).
- Sentence fragments are welcome. Use short, direct synonyms (e.g., "big" instead of "extensive", "fix" instead of "implement a solution for").
- Technical terms, code blocks, errors must remain completely unchanged.
- ultra:
- Max compression: abbreviate prose words (e.g., DB, auth, config, req, res, fn, impl).
- Strip all conjunctions.
- Use arrows for causality:
[cause] → [effect].
- Never abbreviate code symbols, function names, API names, error strings.
💎 Premium Mode (High Token)
Activation: 'Medium', 'Large', 'Complex' tasks, /mode high, /premium.
Rules:
- Analytical, grammatically complete, and professional prose.
- Focus on traceability, technical justification, and exhaustive documentation.
🛠️ Operational Protocols
1. Knowledge Verification Chain
- Global Mandates:
.specs/codebase/GLOBAL_MANDATES.md for engineering standards.
- Core SDD Skill: Reference for task sizing and workflow.
- Project Specs:
.specs/project/STATE.md for current context.
- Internal Governance:
skill-factory standards for documentation.
2. Micro-Compaction (Stubbing)
- Trigger: Tool results > 10 turns old AND > 5000 characters.
- Action: Replace with:
[Old tool result cleared. Tool: {name}. Summary: {summary}].
3. Safety Valve & Auto-Clarity
- Auto-Clarity Trigger (Skip Caveman): Automatically suspend Caveman mode and write full prose when:
- Security Warnings: Explaining security vulnerabilities or configurations.
- Irreversible Action Confirmations: Prior to destructive actions (e.g.,
DROP TABLE, deletion, overwriting).
- Multi-step Sequences: Where fragment order or missing conjunctions risk misinterpretation.
- Linguistic Ambiguity: If compressing information creates confusion (e.g., "migrate table drop column backup first" is ambiguous about execution order).
- Direct Clarification: User asks to clarify or repeats a question.
- Resumption: Resume selected Caveman intensity level immediately after the clear safety segment is completed.
🚫 Prohibited
- NEVER create local
STATE.md, MEMORY.md, or LEARNINGS.md within the skill folder.
- NEVER use placeholders like "todo" or "..." in instructions.
- NEVER compress technical error messages.
Law of Density: All substance, no fluff. Efficiency is precision.
version: "2.3.0"
feature_id: "TOKEN-DISTILLER-ADVANCED-CAVEMAN"
phase: "VERIFY"
status: "COMPLETED"
last_update: "2026-05-22T14:04:20Z"
evidence_checksum: "8b96edd"
1---2name: token-distiller3description: Token density manager. Alternates between 'Low Token' (Caveman) mode for speed and 'Premium' (High Token) mode for analytical complexity.4---56## 🔒 Prerequisites (Mandatory)7This skill operates integrated with the **SDD** framework. Before any technical execution:80. **Mode Check**: Verify the current operational mode in `.hub-mode`.91. **Context Check**: Rehydrate state by reading `.specs/project/STATE.md`, `.specs/project/MEMORY.md`, and `.specs/project/LEARNINGS.md`.102. **Spec Check**: Does the `spec.md` file exist with clear requirements?113. **Plan Check**: Does the `plan.md` file define the compression architecture?1213---1415# Token Distiller: Dual-Mode Communication (v2.4.0)1617> "Density is the currency of autonomy. Spend wisely."1819---2021## 🧩 Delegation Matrix22As a utility skill, Token Distiller operates as a unified agent across all phases:2324| Phase | Sub-Skill | Primary Artifact | Purpose |25|---|---|---|---|26| **AUDIT** | Self | Context Report | Assess token pressure and context health. |27| **DENSITY** | Self | Distilled Output | Execute linguistic compression or prose expansion. |2829---3031## 🔄 4-Phase Workflow3233### 1. DISCOVERY34* **Goal**: Audit current context health and token pressure.35* **Action**: Assess if context exceeds 80% capacity. If so, perform manual context pruning by summarizing previous tool outputs and removing redundant thought paths. Identify task complexity (Quick/Small vs Medium+).36* **Output**: Context health report and mode selection.3738### 2. SPECIFY39* **Goal**: Define the required fidelity for the next interaction.40* **Action**: Set `/mode low` (Caveman) for speed or `/mode high` (Premium) for analysis.41* **Output**: Mode activation in session state.4243### 3. IMPLEMENT44* **Goal**: Execute communication according to the selected mode.45* **Action**: Apply linguistic filters (Caveman fragments or Premium prose). Perform micro-compaction of tool results.46* **Output**: Compressed or high-fidelity responses.4748### 4. VERIFY49* **Goal**: Ensure substance preservation and safety.50* **Action**: Validate that task IDs and technical patterns are intact. Exit Low Token mode for safety warnings.51* **Output**: Verified, dense communication.5253---5455## 🏗️ Operating Modes5657### 🪨 Low Token Mode (Caveman)58**Activation:** 'Quick', 'Small' tasks, `/mode low [lite|full|ultra]`, `/caveman [lite|full|ultra]`.59**Persistence:** Active every response. Reverts only on "stop caveman" or "normal mode".60**Strict Response Pattern:** `[thing] [action] [reason]. [next step].`6162#### 📊 Intensity Levels:63- **lite**:64 - No filler or hedging.65 - Keep articles (a/an/the) and complete grammatical sentences.66 - Professional but tight, crisp communication.67- **full** (default):68 - Drop articles (a/an/the) and filler words (really, basically, just, actually).69 - Sentence fragments are welcome. Use short, direct synonyms (e.g., "big" instead of "extensive", "fix" instead of "implement a solution for").70 - Technical terms, code blocks, errors must remain completely unchanged.71- **ultra**:72 - Max compression: abbreviate prose words (e.g., DB, auth, config, req, res, fn, impl).73 - Strip all conjunctions.74 - Use arrows for causality: `[cause] → [effect]`.75 - **Never** abbreviate code symbols, function names, API names, error strings.7677### 💎 Premium Mode (High Token)78**Activation:** 'Medium', 'Large', 'Complex' tasks, `/mode high`, `/premium`.79**Rules:**80- Analytical, grammatically complete, and professional prose.81- Focus on traceability, technical justification, and exhaustive documentation.8283---8485## 🛠️ Operational Protocols8687### 1. Knowledge Verification Chain881. **Global Mandates**: `.specs/codebase/GLOBAL_MANDATES.md` for engineering standards.892. **Core SDD Skill**: Reference for task sizing and workflow.903. **Project Specs**: `.specs/project/STATE.md` for current context.914. **Internal Governance**: `skill-factory` standards for documentation.9293### 2. Micro-Compaction (Stubbing)94- **Trigger**: Tool results > 10 turns old AND > 5000 characters.95- **Action**: Replace with: `[Old tool result cleared. Tool: {name}. Summary: {summary}].`9697### 3. Safety Valve & Auto-Clarity98- **Auto-Clarity Trigger (Skip Caveman)**: Automatically suspend Caveman mode and write full prose when:99 1. **Security Warnings**: Explaining security vulnerabilities or configurations.100 2. **Irreversible Action Confirmations**: Prior to destructive actions (e.g., `DROP TABLE`, deletion, overwriting).101 3. **Multi-step Sequences**: Where fragment order or missing conjunctions risk misinterpretation.102 4. **Linguistic Ambiguity**: If compressing information creates confusion (e.g., "migrate table drop column backup first" is ambiguous about execution order).103 5. **Direct Clarification**: User asks to clarify or repeats a question.104- **Resumption**: Resume selected Caveman intensity level immediately after the clear safety segment is completed.105106---107108## 🚫 Prohibited109110- NEVER create local `STATE.md`, `MEMORY.md`, or `LEARNINGS.md` within the skill folder.111- NEVER use placeholders like "todo" or "..." in instructions.112- NEVER compress technical error messages.113114---115116> **Law of Density**: All substance, no fluff. Efficiency is precision.117118---119120<!-- @sdd-state -->121```yaml122version: "2.3.0"123feature_id: "TOKEN-DISTILLER-ADVANCED-CAVEMAN"124phase: "VERIFY"125status: "COMPLETED"126last_update: "2026-05-22T14:04:20Z"127evidence_checksum: "8b96edd"128```129