Appearance
Routing Schema — routing.md Convention
Each Commander folder (and each Captain folder where relevant) may declare a routing.md that lets Canary route inbox files to the right destination WITHOUT a Hinata interview.
Where it lives
federation/colonel_{pillar}_{commander}_routing.md(or inline infederation/colonel_{pillar}_{commander}_context.md)federation/captain_{captain}_routing.md(or inline infederation/captain_{captain}_context.md)- Black Panther was the first seed (2026-05-26, originally at
colonel/goku-fire/black-panther-fashion/routing.md— now atfederation/colonel_goku-fire_black-panther-fashion_context.md).
File shape
markdown
---
commander: <slug> # e.g. allmight-health, zoro-fitness, canary-organiser
schema_version: 0.1
last_updated: YYYY-MM-DD
---
# <Commander Name> — Routing Rules
## Rules
### <human-readable rule name>
- **patterns** (any of, case-insensitive):
- keyword: `<exact-word>` | regex: `<pattern>` | filename: `<glob>` | content: `<phrase>`
- **destination:** `federation/colonel_...` or `federation/captain_...` or `the-government/...`
- **transformation:** one of
- `none` — drop file as-is into destination
- `append-to-topic-file: <filename>` — prepend to canonical file (per knowledge-base ordering)
- `extract-frontmatter` — parse YAML, then route
- `transcribe-then-route` — for audio (Whisper / Otter)
- `extract-csv-row` — parse one row of CSV per inbox file
- **confidence:** `high` | `medium` | `low`
- high = ROUTE without interview
- medium = interview with this rule's destination pre-filled as default
- low = standard interview, ignore this rule
- **negative carve-out:** (optional) conditions that DROP the rule to medium or skip it
- **negative test:** (recommended) one example that must NOT match
- **originating evidence:** (optional) inbox slug / task # / memory referenceField meanings
| Field | Notes |
|---|---|
patterns | Match types: keyword, regex, filename, content, phrase. Combine via AND / OR in plain prose if needed. |
destination | Absolute-from-vault path. No trailing slash if pointing at a directory; trailing .md if appending to a specific file. |
transformation | Tells Canary what shape the file must be in when it lands. Drives any pre-processing step (e.g. transcribe-then-route invokes Otter/Whisper first). |
confidence | The gate against interview. Only high skips Hinata. |
negative carve-out | Per-rule conditions that downgrade or skip — prevents over-matching. |
negative test | A counter-example to ensure rule isn't too broad. Canary verifies this against the inbox sweep on every seed change. |
Canary's load order (informational — actual wiring lands via #840008)
- Phase 1 (file survey): enumerate every routing rule in
federation/context files. - Build in-memory ruleset keyed by patterns.
- For each inbox file: try ruleset BEFORE interview.
- high-confidence match → ROUTE directly
- medium → interview with destination pre-filled
- low / none → standard interview path
- Log routing decisions to the day's
the-government/information_reference/canary-processing/inbox-run-YYYY-MM-DD.md.
Stop conditions on rule authoring
- Never widen patterns to catch generic words like
decision,update,note— these cannibalise other Commanders' inboxes. - Never assign
confidence: highwithout a writtennegative test(catches false-positive scope creep). - Never route to a path that doesn't exist; if the destination is new, create it first.
- Disambiguation between Commanders is the rule author's responsibility (see Black Panther's tattoo carve-out for an example of resolving Lelouch/Black Panther overlap).
Closure (per #840007)
- ≥5 routing.md files seeded (Black Panther already shipped 2026-05-26).
- Schema doc exists (this file).
- task-audit Phase 1 reading routing.md is
#840008— separate task.
Existing seeds
federation/colonel_goku-fire_black-panther-fashion_context.md— tattoo/piercing/aesthetic body decisionsfederation/colonel_saitama-foundation_allmight-health_context.md— Zoot quit-smoking pingsfederation/colonel_saitama-foundation_zoro-fitness_context.md— Workouts CSVfederation/captain_canary-organiser_context.md— Telegram-from-Minato ambient opsfederation/colonel_levi-ackerman-forge_squidward-music_context.md— Otter voice notes (music practice)