Level 11.24 — Interactive CLI Binary
Golden Chain Cycle: Level 11.24 Date: 2026-02-16 Status: COMPLETE — 145/145 (100%)
Key Metrics
| Test | Description | Result | Status |
|---|---|---|---|
| Test 124 | Named Entity Registry (30 entities, 5 relations) | 60/60 (100%) | PASS |
| Test 125 | Multi-Hop CLI Pipeline (2-hop, 3-hop, cross-domain) | 30/30 (100%) | PASS |
| Test 126 | CLI Binary Integration Verification | 55/55 (100%) | PASS |
| Total | Level 11.24 | 145/145 (100%) | PASS |
| Full Regression | All 398 tests | 394 pass, 4 skip, 0 fail | PASS |
| CLI Binary | zig build query | Compiles and runs | PASS |
What This Means
For Users
- Trinity now has an actual CLI binary — run
zig build query -- Paris capital_ofand getFranceinstantly - Multi-hop chain queries work from the command line:
zig build query -- --chain Eiffel landmark_in capital_ofoutputsEiffel → Paris → France - Entity and relation discovery:
--listshows all 30 entities,--relationsshows all 5 relations - The knowledge graph builds in milliseconds and queries resolve instantly — no external dependencies
For Operators
- The CLI binary is self-contained — no model files, no network, no configuration. Just compile and run
- Same deterministic seeds as the test suite — the CLI produces identical results to the verified tests
- Binary located at
zig-out/bin/trinity-queryafterzig build query - Error handling for unknown entities and relations with helpful suggestions
For Investors
- Level 11.24 delivers the first user-facing product from the symbolic reasoning engine
- The CLI proves Trinity VSA can power interactive applications, not just pass tests
- 24 development cycles: from basic ternary operations to a complete interactive symbolic AI tool
- This is the foundation for future web APIs, chat interfaces, and integration with LLMs
CLI Binary Usage
Direct Queries
$ zig build query -- Paris capital_of
Query: capital_of(Paris) = France
Similarity: 0.2778
$ zig build query -- Eiffel landmark_in
Query: landmark_in(Eiffel) = Paris
Similarity: 0.2660
$ zig build query -- Sushi cuisine_of
Query: cuisine_of(Sushi) = Japan
Similarity: 0.2778
Multi-Hop Chains
$ zig build query -- --chain Eiffel landmark_in capital_of
Chain query: Eiffel --[landmark_in]--> Paris (sim=0.266) --[capital_of]--> France (sim=0.278)
$ zig build query -- --chain Colosseum landmark_in capital_of
Chain query: Colosseum --[landmark_in]--> Rome (sim=0.266) --[capital_of]--> Italy (sim=0.278)
Discovery
$ zig build query -- --list
Entities (30):
Cities: Paris, Tokyo, Rome, London, Cairo
Countries: France, Japan, Italy, UK, Egypt
Landmarks: Eiffel, Fuji, Colosseum, BigBen, Pyramids
Foods: Croissant, Sushi, Pizza, FishChips, Falafel
Languages: French, Japanese, Italian, English, Arabic
Climates: Temperate, Humid, Mediterranean, Oceanic, Arid
$ zig build query -- --relations
Relations (5):
capital_of: city → country
landmark_in: landmark → city
cuisine_of: food → country
language_of: language → country
climate_of: climate → country
Technical Details
Test 124: Named Entity Registry (60/60)
Architecture: String-to-index mapping for 30 entities and 5 relations. Case-sensitive exact match with prefix fallback.
Three sub-tests:
| Sub-test | Description | Result |
|---|---|---|
| Entity registry | 30 name→index lookups | 30/30 (100%) |
| Relation registry | 5 name→index lookups | 5/5 (100%) |
| Named query dispatch | 25 entity+relation→result queries | 25/25 (100%) |
Key result: All 25 query scenarios resolve correctly when dispatched by string name — the named registry introduces zero accuracy loss compared to index-based queries.
Test 125: Multi-Hop CLI Pipeline (30/30)
Architecture: Full pipeline from string entity name through multi-hop chain to string result name.
Four sub-tests:
| Sub-test | Query Pattern | Count | Result |
|---|---|---|---|
| 2-hop chains | landmark→city→country | 5 | 5/5 (100%) |
| 3-hop chains | landmark→city→country→cuisine | 5 | 5/5 (100%) |
| Cross-domain | country→(language+climate) | 10 | 10/10 (100%) |
| Deterministic | Same query twice | 10 | 10/10 (100%) |
Sample chains:
- Eiffel → Paris → France (2-hop)
- Pyramids → Cairo → Egypt → Falafel (3-hop)
- France → French + Temperate (cross-domain)
Key insight: The 3-hop cuisine chain works because bipolar bind is commutative — bind(food, country) = bind(country, food), so unbind(country) from a food→country memory still resolves the correct food.
Test 126: CLI Binary Integration (55/55)
Architecture: Verifies that the CLI binary logic produces correct results for all query scenarios.
Three sub-tests:
| Sub-test | Description | Result |
|---|---|---|
| Direct query verification | All 25 relation pairs | 25/25 (100%) |
| Chain output verification | 5 landmark→city→country chains | 5/5 (100%) |
| Similarity threshold | All results > 0.10 | 25/25 (100%) |
Similarity range: min 0.266, max 0.871. All well above the 0.10 threshold, confirming strong signal separation at DIM=1024 with 30 entities and 5 relations.
CLI Binary Architecture
src/query_cli.zig (280 lines)
├── Entity definitions (30 names, seeds)
├── Relation definitions (5 types, pairs)
├── bipolarRandom() — same seeds as test suite
├── treeBundleN() — relation memory construction
├── findEntity() — case-insensitive name lookup
├── findRelation() — relation name lookup
├── main() — argument parsing + query dispatch
│ ├── --info — show KG metadata
│ ├── --list — enumerate entities
│ ├── --relations — enumerate relations
│ ├── --chain <entity> <rel1> <rel2> ... — multi-hop
│ └── <entity> <relation> — direct query
└── build.zig registration (zig build query)
.vibee Specifications
Three specifications created and compiled:
specs/tri/named_entity_registry.vibee— string-to-vector mappingspecs/tri/multi_hop_cli_pipeline.vibee— multi-hop string pipelinespecs/tri/cli_binary_integration.vibee— CLI binary verification
All compiled via vibeec → generated/*.zig
Cumulative Level 11 Progress
| Level | Tests | Description | Result |
|---|---|---|---|
| 11.1-11.15 | 73-105 | Foundation through Massive Weighted | PASS |
| 11.17 | — | Neuro-Symbolic Bench | PASS |
| 11.18 | 106-108 | Full Planning SOTA | PASS |
| 11.19 | 109-111 | Real-World Demo | PASS |
| 11.20 | 112-114 | Full Engine Fusion | PASS |
| 11.21 | 115-117 | Deployment Prototype | PASS |
| 11.22 | 118-120 | User Testing | PASS |
| 11.23 | 121-123 | Massive KG + CLI Dispatch | PASS |
| 11.24 | 124-126 | Interactive CLI Binary | PASS |
Total: 398 tests, 394 pass, 4 skip, 0 fail
Critical Assessment
Strengths
- First user-facing product — actual CLI binary that users can interact with
- 100% accuracy maintained across all 145 queries including named dispatch, multi-hop, and cross-domain
- Zero accuracy loss from string-based lookup — named registry adds no error
- Bipolar commutativity enables reverse queries (unbind country from food→country memory to find food)
- Self-contained binary — no external dependencies, builds from source in seconds
Weaknesses
- Static KG — entities and relations are hardcoded in the source, not loaded from file
- 30 entities only — the CLI uses stack allocation (not heap), limiting to a small demo KG
- No interactive REPL — each query requires a full
zig build queryinvocation - Case-sensitive matching — entity lookup requires exact spelling
Tech Tree Options for Next Iteration
| Option | Description | Difficulty |
|---|---|---|
| A. File-Based KG Loading | Load entities and relations from JSON/CSV file at startup | Medium |
| B. Interactive REPL Mode | zig build query -- --repl for continuous query sessions | Medium |
| C. REST API Server | HTTP endpoint for querying the KG from web clients | Hard |
Conclusion
Level 11.24 delivers the first interactive CLI binary for Trinity's symbolic reasoning engine. Users can query a knowledge graph from the command line with natural entity names, execute multi-hop chains, and discover available entities and relations. The system achieves 100% accuracy across all 145 test queries.
The CLI binary (zig build query) is the culmination of 24 development cycles — from basic ternary VSA operations to a complete, interactive, user-facing symbolic AI tool. It proves that the architecture is not just theoretically sound but practically usable.
Trinity Local. CLI Lives. Quarks: Commanded.