GCF Specification v3.0.0: Inline Schema Encoding
·
553 commits
to main
since this release
Inline Schema Encoding
The single largest token efficiency improvement since GCF's initial release. Nested objects with 3+ scalar fields are now encoded positionally with a one-time schema declaration.
Before (v2):
## orders [2]{id,total,customer}
@0 1|99.99|^
.customer {}
name=Alice
email=alice@test.com
tier=premium
After (v3):
## orders [2]{id,total,customer}
@0 1|99.99|^{name,email,tier}
Alice|alice@test.com|premium
@1 2|49.99|^
Bob|bob@test.com|standard
Breaking Changes
- Attachment lines no longer indented (same depth as parent row)
- Inline object fields use positional encoding without field-name prefix
- Objects with 3+ scalar fields encoded with
^{fields}inline schema - No backwards compatibility with v2 indented attachments
New Features
- Inline object schema: first row declares field order with
^{fields}, subsequent rows use bare^ - Shared array schemas: identical nested arrays omit
{fields}after first row - MinInlineFields=3: threshold prevents overhead on small objects
- 15 new conformance fixtures, 156 total
Numbers
| Metric | Value |
|---|---|
| Comprehension (standard workloads) | 100% on every frontier model |
| Comprehension (code graphs) | 90.7% (vs TOON 68.5%, JSON 53.6%) |
| Token efficiency (15 datasets) | -25.5% vs TOON, -53% vs JSON |
| Fuzz iterations | 1.006 billion, zero failures |
| Scale test (1000 orders) | GCF fits (47K), JSON impossible (161K) |
| LLM evaluations | 1,700+ across 10+ models, 3 providers |
| Implementations | 6 languages, all passing |
Migration
encodeGeneric / encode_generic now produces v3 output. Decoders accept v3 only (no v2 indented attachment fallback).
Libraries: Go (v1.1.0), TypeScript (v2.0.0), Python (v2.0.0), Kotlin (v2.0.0), Rust (v2.0.0), Swift (v2.0.0)