Math Router
ALWAYS use this router first for math requests.
Instead of reading individual skill documentation, call the router to get the exact command:
Usage
# Route any math intent to get the CLI command
uv run python scripts/cc_math/math_router.py route "<user's math request>"
Example Workflow
- User says: "integrate sin(x) from 0 to pi"
- You run:
uv run python scripts/cc_math/math_router.py route "integrate sin(x) from 0 to pi"
- Router returns:
{
"command": "uv run python scripts/cc_math/sympy_compute.py integrate \"sin(x)\" --var x --lower 0 --upper pi",
"confidence": 0.95
}
- You execute the returned command
- Return result to user
Why Use The Router
- Faster: No need to read skill docs
- Deterministic: Pattern-based, not LLM inference
- Accurate: Extracts arguments correctly
- Complete: Covers 32 routes across 7 scripts
Available Routes
| Category |
Commands |
| sympy |
integrate, diff, solve, simplify, limit, det, eigenvalues, inv, expand, factor, series, laplace, fourier |
| pint |
convert, check |
| shapely |
create, measure, pred, op |
| z3 |
prove, sat, optimize |
| scratchpad |
verify, explain |
| tutor |
hint, steps, generate |
| plot |
plot2d, plot3d, latex |
List All Commands
# List all available routes
uv run python scripts/cc_math/math_router.py list
# List routes by category
uv run python scripts/cc_math/math_router.py list --category sympy
Fallback
If the router returns {"command": null}, the intent wasn't recognized. Then:
- Ask user to clarify
- Or use individual skills: /sympy-compute, /z3-solve, /pint-compute, etc.
1---2name: math-router3description: Deterministic router for math cognitive stack - maps user intent to exact CLI commands4---5
6# Math Router
7
8**ALWAYS use this router first for math requests.**
9
10Instead of reading individual skill documentation, call the router to get the exact command:
11
12## Usage
13
14```bash
15# Route any math intent to get the CLI command
16uv run python scripts/cc_math/math_router.py route "<user's math request>"
17```
18
19## Example Workflow
20
211. User says: "integrate sin(x) from 0 to pi"
222. You run: `uv run python scripts/cc_math/math_router.py route "integrate sin(x) from 0 to pi"`
233. Router returns:
24 ```json
25 {
26 "command": "uv run python scripts/cc_math/sympy_compute.py integrate \"sin(x)\" --var x --lower 0 --upper pi",
27 "confidence": 0.95
28 }
29 ```
304. You execute the returned command
315. Return result to user
32
33## Why Use The Router
34
35- **Faster**: No need to read skill docs
36- **Deterministic**: Pattern-based, not LLM inference
37- **Accurate**: Extracts arguments correctly
38- **Complete**: Covers 32 routes across 7 scripts
39
40## Available Routes
41
42| Category | Commands |
43|----------|----------|
44| sympy | integrate, diff, solve, simplify, limit, det, eigenvalues, inv, expand, factor, series, laplace, fourier |
45| pint | convert, check |
46| shapely | create, measure, pred, op |
47| z3 | prove, sat, optimize |
48| scratchpad | verify, explain |
49| tutor | hint, steps, generate |
50| plot | plot2d, plot3d, latex |
51
52## List All Commands
53
54```bash
55# List all available routes
56uv run python scripts/cc_math/math_router.py list
57
58# List routes by category
59uv run python scripts/cc_math/math_router.py list --category sympy
60```
61
62## Fallback
63
64If the router returns `{"command": null}`, the intent wasn't recognized. Then:
651. Ask user to clarify
662. Or use individual skills: /sympy-compute, /z3-solve, /pint-compute, etc.