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.