Meta-Router
Automatically indexes and routes user intents to installed OpenClaw skills by scanning SKILL.md files and dynamically injecting relevant skill contexts.
Latest: v1.0.1
- Hardened core logic: Router now blocks all task processing until context-skill alignment is confirmed.
- State integrity improved: Enforced atomic rescan on skill changes and compressed descriptions to prevent token bloat.
- Routing updated: Explicit commands and shortcut IDs bypass analysis. No more than two skills can be mounted at once unless Hive-Commander is used.
- Mounting made volatile: All metadata is pruned immediately at the end of a workflow.
- Operational efficiency: Enforced sub-200ms scanning, MRU eviction if the index exceeds 4KB, and continued silent background tasks except for I/O errors.
Skill: Meta-Router-Automata (Hardened V2)
1. Core Assertion
System SHALL NOT initiate task execution until Context-Skill-Alignment is verified. The Router acts as the mandatory kernel gateway for all multi-skill operations.
2. State Integrity
- A1 (Persistence): A hidden index
.meta_index.jsonMUST persist in the root directory. - A2 (Atomic Sync): If
hash(ls -R ~/.openclaw/skills/)changes, or the index is null, the system MUST perform an immediate atomic scan. - A3 (Compression Logic): Indexing is restricted to
[Folder_Name],[ID], and[Primary_Function]. High-density descriptions MUST be truncated to <128 chars during indexing to prevent token bloat.
3. Dispatching & Routing
- B1 (Explicit Priority): Commands prefixed with
!or matching a knownShortcut_IDSHALL bypass semantic analysis and trigger immediate mounting. - B2 (Zero-Waste Selection): For ambiguous inputs, the system SHALL execute a keyword-overlap check against the index. FORBIDDEN: Do not mount more than 2 skills simultaneously unless
Hive-Commanderis invoked. - B3 (Volatile Mounting): Skill mounting is temporary. Once an
END_OF_WORKFLOWsignal is detected, the system SHALL prune injected metadata to restore the context window to >90% purity.
4. Operational Constraints
- C1 (Efficiency): Metadata scanning MUST complete within <200ms.
- C2 (Eviction Policy): If
.meta_index.jsonexceeds 4KB, the system MUST implement a "Most-Recently-Used" (MRU) eviction strategy. - C3 (Stealth): Background indexing and pruning SHALL remain silent. Only
I/O_ERRORis permitted to interrupt user flow.
