Context Router
Routes external context extraction to the three-CLI system.
Trigger Keywords: context, lifelog, research, ltm, recall, lookup, pieces, limitless, pendant, documentation
Trigger Conditions
Activate when:
- Explicit commands:
/context, /limitless, /research, /pieces
- Intent hook signals context need (balanced detection)
- User asks about past conversations, technical docs, or code history
Source Categories
| Source |
CLI |
Triggers |
Data Type |
| Personal |
limitless |
lifelog, pendant, daily, personal, meeting |
Transcripts, chats |
| Research |
research |
fact-check, docs, academic, verify, sdk |
Citations, documentation |
| Local |
pieces |
ltm, saved, snippets, my code, history |
Code, snippets |
Routing Decision Tree
Request Received
│
├── Explicit Command?
│ ├── /context → Parallel (all sources)
│ ├── /limitless → Single (limitless)
│ ├── /research → Single (research)
│ └── /pieces → Single (pieces)
│
├── Hook Signal Present?
│ ├── need_limitless=true → Route to limitless
│ ├── need_research=true → Route to research
│ ├── need_pieces=true → Route to pieces
│ └── Multiple → Parallel mode
│
└── No Signal
└── Skip (no context needed)
Mode Selection
| Mode |
Trigger |
Process |
| Single |
Clear single-source intent |
Route to one CLI |
| Parallel |
/context or multi-domain |
Spawn all relevant CLIs |
| Augmented |
With deep-research |
Pre-enrich Phase 0 |
CLI Commands
Limitless (Personal)
limitless lifelogs search "query" --limit 10 --format json
limitless workflow daily YYYY-MM-DD --format json
limitless workflow recent --hours 24 --format json
Research (Online)
research docs -t "query" -k "framework" --format json
research fact-check -t "claim" --format json
research pex-grounding -t "medical query" --format json
Pieces (Local)
pieces ask "query" --ltm
pieces search --mode ncs "pattern"
Integration
- Skill:
skill-db/context-orchestrator/SKILL.md
- Rules:
rules/context/*.md
- Subagents:
skill-db/context-orchestrator/agents/*.md
- Commands:
skill-db/context-orchestrator/commands/*.md
- Also listed in:
skills/routers/skills-router/SKILL.md (Context Skills category)
- Hooks:
hooks/context-intent-detector.ts, hooks/session-context-primer.sh
1---2name: context-router3description: Routes context extraction requests to appropriate CLI tools. Triggers on /context, /limitless, /research, /pieces, or detected context needs from intent hook. Supports single, parallel, and augmented extraction modes.4---56# Context Router78Routes external context extraction to the three-CLI system.910**Trigger Keywords**: context, lifelog, research, ltm, recall, lookup, pieces, limitless, pendant, documentation1112## Trigger Conditions1314Activate when:15- Explicit commands: `/context`, `/limitless`, `/research`, `/pieces`16- Intent hook signals context need (balanced detection)17- User asks about past conversations, technical docs, or code history1819## Source Categories2021| Source | CLI | Triggers | Data Type |22|:-------|:----|:---------|:----------|23| **Personal** | limitless | lifelog, pendant, daily, personal, meeting | Transcripts, chats |24| **Research** | research | fact-check, docs, academic, verify, sdk | Citations, documentation |25| **Local** | pieces | ltm, saved, snippets, my code, history | Code, snippets |2627## Routing Decision Tree2829```30Request Received31 │32 ├── Explicit Command?33 │ ├── /context → Parallel (all sources)34 │ ├── /limitless → Single (limitless)35 │ ├── /research → Single (research)36 │ └── /pieces → Single (pieces)37 │38 ├── Hook Signal Present?39 │ ├── need_limitless=true → Route to limitless40 │ ├── need_research=true → Route to research41 │ ├── need_pieces=true → Route to pieces42 │ └── Multiple → Parallel mode43 │44 └── No Signal45 └── Skip (no context needed)46```4748## Mode Selection4950| Mode | Trigger | Process |51|------|---------|---------|52| **Single** | Clear single-source intent | Route to one CLI |53| **Parallel** | `/context` or multi-domain | Spawn all relevant CLIs |54| **Augmented** | With deep-research | Pre-enrich Phase 0 |5556## CLI Commands5758### Limitless (Personal)59```bash60limitless lifelogs search "query" --limit 10 --format json61limitless workflow daily YYYY-MM-DD --format json62limitless workflow recent --hours 24 --format json63```6465### Research (Online)66```bash67research docs -t "query" -k "framework" --format json68research fact-check -t "claim" --format json69research pex-grounding -t "medical query" --format json70```7172### Pieces (Local)73```bash74pieces ask "query" --ltm75pieces search --mode ncs "pattern"76```7778## Integration7980- **Skill**: `skill-db/context-orchestrator/SKILL.md`81- **Rules**: `rules/context/*.md`82- **Subagents**: `skill-db/context-orchestrator/agents/*.md`83- **Commands**: `skill-db/context-orchestrator/commands/*.md`84- **Also listed in**: `skills/routers/skills-router/SKILL.md` (Context Skills category)85- **Hooks**: `hooks/context-intent-detector.ts`, `hooks/session-context-primer.sh`