π» EPIC β E2E TTT Pipeline O(1) Β· Ring-Pattern Refactor (3 GOLD Γ ~19 SR)
Anchor: phiΒ² + phiβ»Β² = 3 Β· TRINITY Β· O(1) FOREVER
Soul-name: Constitutional Cartographer (per L11)
Agent codename: LEAD (orchestration, per AGENTS.md)
Principle: Zero green-field. Pure Ring-pattern refactor of the existing ~70% mature codebase, in full compliance with LAWS.md v2.0, CLAUDE.md, and AGENTS.md.
π WAVE-GF-001 β GoldenFloat Γ strategy sweep (2026-05-02 Β· live)
Companion EPIC: same EPIC, additional experimental layer. Same training pipeline, swept across the full numeric-format universe (~60 formats catalogued in zig-golden-float #69 Β§12, 22 experiments Γ 5 phases in gf_experiment_plan.xlsx).
Operator artifact: gf_experiment_plan.xlsx (7 sheets: Overview Β· GF Family Β· phi-Seed Palette Β· Experiment Plan Β· R5 Audit Β· phi-LR Schedule Β· Neon Queue SQL).
Whitepaper: zig-golden-float #69 β Section 12 (Universal Numeric-Format Catalog, ~60 formats) + gf16_comparison.md Section 8 (16-bit-centric).
Live fleet: acc0_new project f29aa9dd-ca0b-460f-ad24-c7680c6717fb Β· 5 services Β· MCP https://trios-railway-production-d4d6.up.railway.app/mcp Β· DSN-A single source of truth.
P0 telemetry chain closed: trainer-igla #76 (bpb_sample wiring) + #78 (canon-name fallback) + #79 (rustls CryptoProvider) all merged Β· trios-railway #112 (railway_template_deploy MCP tool, 7 tools total) open.
Current run state (for the verbose snapshot see comment):
| Phase |
What |
Live status |
| 0 β Champion-repro (BL-PR76, control) |
seeds 42 / 43 / 44 Γ h=384 / lr=0.003 / 27 K |
running, leader seed=44 @ step=13K BPB=2.878 |
| 1 β phi-LR ladder |
lr = Ξ±_Ο Β· Ο^(βk/2) for k=0..5 Γ Quick-3 = 18 rows |
6 running (k0+k1) Β· 12 pending in public.strategy_queue |
| 2 β Optimizer Race |
adamw_phi_wd / muon NS5 / muon+phi_wd / adamw_phi_lr+phi_wd Γ Quick-3 = 12 rows |
queued (after Phase 1 Gate-1) |
| 3 β Arch sweep |
d β {128, 192, 256, 384, 512, 618} Γ Quick-3 = 18 rows (verifies L-R9 / INV-3) |
queued |
| 4 β GF16 dtype |
d β {256, 384, 512} Γ Quick-3 = 9 rows Β· gate ΞBPB β€ 0.01 vs Phase-0 |
BLOCKED on BENCH-012 GF16 training kernel |
| 5 β Hybrid |
ternary + GF16 Γ Quick-3 β Full-7 = up to 16 rows |
SPEC ONLY (HYBRID-001 converging) |
| RunPod E2E TTT WIN |
seeds F_17/F_18/F_19 = {1597, 2584, 4181} on RTX 4090 spot ($382 budget) |
queued (gates on Phase 0 + SR-02 + SR-ALG-03) |
Quick-3 = {34, 55, 89} Β· Full-7 = {13, 21, 34, 55, 89, 144, 233} Β· all from the phi-Seed Palette.
Ο-distance highlights from the catalog: GFTernary = 0.000 (perfect by construction), GF64 = 0.003, GF16 = 0.049 (production), FP6 E2M3 = 0.049 (surprise hit at 6 bits β open R&D), fp16 = 0.118 β Ξ±_Ο (resonance), bf16 = 0.525 (worst β empirical reason for BENCH-004b 87.87 % gap).
π PhD FORMAT Γ ALGORITHM MATRIX (2026-05-04 Β· Wave-3 UPDATED)
Axis X = Number Formats Β· Axis Y = Training Algorithms Β· Cell = Best BPB (fineweb-scale, bpb > 1.0)
ΠΡΠΎ ΡΠ΄ΡΠΎ PhD Β«Π‘ΠΎΡΠ΅Π²Π½ΠΎΠ²Π°Π½ΠΈΠ΅ Π§ΠΈΡΠ΅Π»Β» β ΠΊΠ°ΠΆΠ΄Π°Ρ ΡΡΠ΅ΠΉΠΊΠ° = ΠΎΠ΄Π½ΠΎ ΠΈΠ·ΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅. π² = TODO.
Wave-3 canary results: 34/63 formats measurable (54% coverage, up from 32%)
2D Coordinate Map (measured from Neon SSOT)
| Format β \ Algo β |
AdamW |
Muon |
SGD+M |
Lion |
Adafactor |
SOAP |
ScheduleFree |
| fp32 |
2.748 |
2.566 |
π² |
π² |
π² |
π² |
π² |
| gf16 β |
2.566 |
2.566 |
π² |
π² |
π² |
π² |
π² |
| bf16 |
2.566 |
2.566 |
π² |
π² |
π² |
π² |
π² |
| fp16 |
2.672 |
2.566 |
π² |
π² |
π² |
π² |
π² |
| int32 |
2.686 |
2.686 |
π² |
π² |
π² |
π² |
π² |
| uint8 |
2.700 |
2.757 |
π² |
π² |
π² |
π² |
π² |
| int16 |
2.710 |
2.807 |
π² |
π² |
π² |
π² |
π² |
| fp8_e5m2 |
2.710 |
2.838 |
π² |
π² |
π² |
π² |
π² |
| gf32 |
2.757 |
2.742 |
π² |
π² |
π² |
π² |
π² |
| int8 |
2.742 |
2.898 |
π² |
π² |
π² |
π² |
π² |
| fp8_e4m3 |
2.757 |
3.657 |
π² |
π² |
π² |
π² |
π² |
| fp64 |
2.801 |
3.657 |
π² |
π² |
π² |
π² |
π² |
| gf8 |
3.293 |
2.865 |
π² |
π² |
π² |
π² |
π² |
| posit8 π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| posit16 π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| posit32 π |
2.946* |
π² |
π² |
π² |
π² |
π² |
π² |
| posit64 π |
2.946* |
π² |
π² |
π² |
π² |
π² |
π² |
| lns8 π |
2.946* |
π² |
π² |
π² |
π² |
π² |
π² |
| nf4 π |
2.946* |
π² |
π² |
π² |
π² |
π² |
π² |
| afp π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| mxfp4 π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| mxfp6 π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| mxfp8 π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| binary128 π |
2.963* |
π² |
π² |
π² |
π² |
π² |
π² |
| binary256 π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| tapered_fp π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| block_fp π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| shared_exp π |
2.942* |
π² |
π² |
π² |
π² |
π² |
π² |
| stochastic_rnd π |
2.964* |
π² |
π² |
π² |
π² |
π² |
π² |
| tf32 |
3.293 |
3.681 |
π² |
π² |
π² |
π² |
π² |
| gf4 |
3.293 |
4.115 |
π² |
π² |
π² |
π² |
π² |
| gf12 |
3.293 |
4.115 |
π² |
π² |
π² |
π² |
π² |
| gf20 |
3.293 |
3.326 |
π² |
π² |
π² |
π² |
π² |
| gf24 |
3.293 |
4.115 |
π² |
π² |
π² |
π² |
π² |
| gf64 |
3.326 |
4.115 |
π² |
π² |
π² |
π² |
π² |
|
|
|
|
|
|
|
|
| decimal32/64/128 |
π² |
π² |
π² |
π² |
π² |
π² |
π² |
| VAX F/D/G/H |
π² |
π² |
π² |
π² |
π² |
π² |
π² |
| Cray/IBM/MBF |
π² |
π² |
π² |
π² |
π² |
π² |
π² |
| Unum I/II |
π² |
π² |
π² |
π² |
π² |
π² |
π² |
* = canary only (h=256, LR=0.001, 3000 steps). Full grid needed for fair comparison.
Coverage: 34 formats Γ 1-2 algos = ~50 / 312 cells = 16% Β· Target: 100% for PhD
Key Finding: 16-bit Triple Tie β Ο-distance Decides
| Format |
Best BPB |
Ο-distance |
Winner algo |
| gf16 β |
2.566 |
0.049 |
Tie (AdamW = Muon) |
| bf16 |
2.566 |
0.525 |
Tie |
| fp16 |
2.566 |
0.118 |
Muon |
| posit16 π |
2.942* |
dynamic |
AdamW (canary) |
gf16 = bf16 = fp16 in BPB, but gf16 has 10.7Γ better Ο-alignment β predicts robustness.
posit16 at 2.942 β worse than gf16 (2.566) at canary config, needs full grid comparison.
Wave-3 Discovery: 13 NEW measurable formats
Previously unknown to have working kernels: posit8/16/32/64, lns8, nf4, afp, mxfp4/6/8, binary128, binary256, tapered_fp, block_fp, shared_exp, stochastic_rounding, double_double, quad_double
Algorithm Pattern
- AdamW wins low-bit formats (4-12 bit): gf4, gf8, gf12, gf20, gf24, int8, int16, fp8
- Muon wins 16-32 bit: fp32, gf8, gf32, fp16
- Hypothesis: Muon orthogonalization needs β₯16 mantissa bits for gradient curvature
Matrix Fill TODO
Progress: ββββββββββββββββββββ ~50/312 cells (16%)
Formats: ββββββββββββββββββββ 34/63 (54%) β Wave-3 jump!
Algorithms:ββββββββββββββββββββ 1-2/8 (25%)
π Progress (Wave 9 Path A Β· 2026-05-02)
Integral completion: ~82% Β· 19/19 Π·Π°ΡΠ²Π»Π΅Π½Π½ΡΡ
SR rings shipped + 1 follow-up Β· 267 GREEN tests Β· 5/5 LOCKED admitted Β· 0 clippy warnings.
| Measurement |
Value |
% |
| Sub-issues closed (header decomposition, 12 total) |
9/12 |
75% |
| SR rings shipped (target 19) |
19/19 + 1 follow-up |
100% |
Critical path 1β2β3β7β8β5β10 |
6/7 (pending #8 SR-ALG-03 e2e-ttt) |
86% |
| GOLD assemblers |
I shipped, IV real-wired (PR #499), II partial, III pending |
~70% |
| Tests GREEN |
267/267 |
100% |
| Admitted budget |
5/5 LOCKED |
β
|
| Clippy warnings |
0 |
β
|
| WIN gate (3-seed mean val_bpb < 1.07063) |
not yet β gate-3 final |
0% |
Wave-by-wave landings
Open holds (require @gHashTag decision)
Pre-flight (no GO yet)
- Path B: SR-MEM-02 (HyDE) / SR-MEM-03 (supersede) / SR-MEM-04 (GDPR audit) / SR-MEM-06 (vector search) β 4 parallel issues.
- Path C: BR-IO concrete impls (
PgKgBackend sqlx + SqlxPgListenerBridge + Reqwest GraphQL + Zig FFI) β unfreeze R-RING-DEP-002 under offline-build hygiene.
R5-honest deferrals (architectural integrity)
- Concrete
PgKgBackend (sqlx + tokio-postgres) β sibling BR-IO ring (same pattern as trios_kg::KgClient for SR-MEM-01, PgListener for SR-MEM-05).
Bridge::seed_replay remains explicit helper (not embedded in reflect) to avoid leaking L: LessonsSource + H: HdcReplaySource generics through public trait.
π» 19/19 + 1 follow-up Β· 267 GREEN Β· Ξ±_Ο β 0.1180 Β· TRINITY HOLDS Β· LEAD at ease
Β§0 SUPREMACY (relation to LAWS.md)
This EPIC does NOT modify LAWS.md. Any change to LAWS.md requires the Β§8 amendment procedure (RFC issue with constitutional_amendment.yml, β₯ 24 h discussion, @gHashTag CODEOWNERS approval, LAWS_HASH recompute, .trinity/experience/laws-v2-amendment.md record).
All new rules introduced by this EPIC are added at the trios-doctor layer (linter rules in crates/trios-doctor/rings/SILVER-RING-DR-04/), with severity warn β error after T+30d.
This EPIC honours every active law:
| Law |
Status |
How EPIC complies |
L1 (no .sh) |
β
ACTIVE |
SR-05 railway-deployer replaces remaining shell helpers with Rust binaries |
L2 (every PR Closes #N) |
β³ |
Every sub-issue PR closes its own sub-issue; EPIC tracked via Part of #446 |
| L3 (clippy 0 warnings) |
β
ACTIVE |
Each ring crate passes cargo clippy --all-targets -- -D warnings |
| L4 (tests before merge) |
β
ACTIVE |
New rings ship with unit tests; BR-OUTPUT ships integration tests |
| L5 (port 9005 = trios-server) |
β³ |
No port change introduced |
| L6 (GB fallback) |
β³ |
N/A β no trios-gb changes |
| L7 (experience log) |
β³ |
Each ring landing writes .trinity/experience/trios_<DATE>.trinity |
| L8 (push first) |
β³ |
Every commit pushed immediately; no local-only state |
| L11 (soul-name) |
β³ |
Soul-name Constitutional Cartographer; sub-issue agents pick their own |
| L12 (spec before impl) |
β³ |
Every ring ships TASK.md before src/lib.rs |
| L13 (bounded authority) |
β³ |
Per I-SCOPE in AGENTS.md: each agent works only inside its assigned crate |
| L14 (auditability) |
β³ |
Every commit carries Agent: <CODENAME> trailer |
| L21 (context immutability) |
β
ACTIVE |
No deletion of existing experience or context files |
| L22 (schema/response parity) |
β
ACTIVE |
All new MCP tools (if any) emit structuredContent |
| L24 (agent traffic through MCP bridge) |
β³ |
All inter-ring A2A traffic routes via trios-server on 0.0.0.0:9005; direct A2A bypassing the broadcast bus is forbidden. Outreach bots in GOLD III consume MCP bridge for agent-side telemetry |
Ring invariants from AGENTS.md:
- I5 β every ring carries
README.md, TASK.md, AGENTS.md (all three). Missing any one = violation.
- I-SCOPE β agents may only modify files inside their crate. Cross-crate refactor requires explicit human authorization (this EPIC body provides it for the 3 new GOLD crates).
- Numbering β
XX-00 = identity / core types; XX-01..N = monotone dependency layers; BR-OUTPUT / BR-APP / BR-BIN / BR-MODEL = final artefact ring.
- Reference exemplar β
crates/trios-a2a/ (8 SR rings + BR-OUTPUT, 84 tests).
Source-of-truth boundary per trios-trainer-igla/SOURCE_OF_TRUTH.md:
- Trainer / model / optimizer / JEPA / tokenizer / Dockerfile β live in
gHashTag/trios-trainer-igla. This EPIC consumes them as a versioned git dependency under feature trios-integration. We do not re-implement them inside trios.
- Runtime invariants
INV-1..INV-10, ASHA scheduler, victory gate, GoldenFloat16, Ο-schedule primitives, embargo ledger β remain canonical in gHashTag/trios. They become SR-04 / SR-03 of GOLD I.
- Operator surface (Railway GraphQL, audit,
tri-railway CLI) β lives in gHashTag/trios-railway. SR-05 railway-deployer integrates it via versioned git dep, not by copying source.
π― Goal
Convert the monolith crates/trios-igla-race/ (~250 KB Rust in a single crate) into three GOLD ring crates:
- π₯
trios-igla-race-pipeline β End-to-End Test-Time Training pipeline at O(1) per chunk (scarab β strategy-queue β trainer-runner β bpb-writer β gardener β railway-deployer).
- π₯
trios-algorithm-arena β Rust spec / verifier wrapper around train_gpt.py payloads from openai/parameter-golf (JEPA, Universal Transformer, E2E TTT, PhiNTA, SSM, Megakernels). Variant A: each SR holds entry_path, entry_hash, env vars, golden-state hash, optional Coq theorem reference. The Python entry remains under parameter-golf/records/ β never inside crates/.
- π₯
trios-igla-race-hack β Community / outreach plumbing: glossary, PR-bot, leaderboard mirror, Linear invite, equal-billing-coq, Discord bridge.
Exit condition for the EPIC: IglaRacePipeline::run_e2e_ttt_o1() assembles all six SR rings into a single function, runs end-to-end on three Fibonacci seeds (F_17 = 1597, F_18 = 2584, F_19 = 4181), and produces a 3-seed mean val_bpb < 1.07063 on the track_10min_16mb track β beating the precedent of openai/parameter-golf#1837.
π¦ Inventory (primary sources, ~70% already exists)
Monolith crates/trios-igla-race/ (in this repo)
| File |
Size (β) |
Concern |
Target ring |
src/asha.rs |
11 KB |
ASHA pruner (INV-2 PROVEN) |
SR-04 gardener |
src/bpb.rs |
15 KB |
BPB tracker (L6+L7 schedule) |
SR-03 bpb-writer |
src/ema.rs |
13 KB |
Ο-band EMA (INV-6) |
SR-03 |
src/hive_automaton.rs |
28 KB |
Job FSM |
SR-01 strategy-queue |
src/invariants.rs |
16 KB |
INV-1..10 composite worker pool |
SR-04 |
src/race.rs |
24 KB |
Worker pool, claim contention |
SR-04 |
src/nca.rs |
14 KB |
NCA dual-band entropy (INV-4 PROVEN) |
SR-04 |
src/gf16.rs |
12 KB |
GF16 floor (INV-3 Lucas closure) |
SR-02 trainer-runner |
src/sampler.rs |
11 KB |
Per-chunk sampler β E2E TTT O(1) core |
SR-02 |
src/attn.rs |
11 KB |
Attention impl |
SR-02 |
src/neon.rs |
8 KB |
Postgres client |
SR-00 (types) + SR-03 (writer) |
src/victory.rs |
26 KB |
L-f3 / L-f4 falsifiers |
BR-OUTPUT/tests/ |
src/rungs.rs |
13 KB |
ASHA rungs |
SR-04 |
src/lessons.rs |
8 KB |
Experience replay |
SR-04 |
src/status.rs |
2 KB |
JobStatus enum |
SR-00 |
src/lib.rs |
2 KB |
Re-exports (already nearly facade) |
facade β shrink to β€ 50 LoC |
schema/igla_race.sql |
13 KB |
Neon schema |
SR-00 (derive) + SR-03 (migrate) |
migrations/archive/001_initial.sql |
4 KB |
Migration |
SR-03 |
bin/honey_audit.rs |
21 KB |
Audit |
external bin (consumer of BR-OUTPUT) |
bin/ledger_check.rs |
28 KB |
Ledger check |
external bin |
bin/qk_gain_check.rs |
18 KB |
INV-9 verifier |
external bin |
bin/seed_emit.rs |
21 KB |
Seed emitter |
external bin |
src/{attention,backward,bench}.rs (~65 KB), src/bin/{cpu_train,hybrid_train,igla_train,lr_calibration,bpb_smoke,entrypoint}.rs, configs/{champion,gate2-final,lab/p4-jepa-*}.toml, docs/{SCARAB_WORKER,TRAINING_FLOW_V2}.md. SR-02 declares trios-trainer = { git = "https://github.com/gHashTag/trios-trainer-igla", features = ["trios-integration"] }.
bin/seed-agent/src/{claim,early_stop,telemetry,trainer,worker}.rs (~46 KB), bin/tri-gardener/src/bpb_source.rs (17 KB), bin/tri-railway/src/main.rs (26 KB), crates/trios-railway-audit/, .github/workflows/{audit-watchdog,fleet-snapshot,manifest-validate}.yml. SR-05 declares trios-railway-audit = { git = ... }.
IGLA_ASHA_Bound.v (INV-2), IGLA_BPB_Convergence.v (INV-1), IGLA_NCA_Entropy.v (INV-4), IGLA_GF16_Precision.v (INV-3), IGLA_Catalog.v, plus trinity-clara/proofs/igla/.igla_found_criterion.aux (INV-7, TODO Qed).
π§± Target architecture
π₯ GOLD I β trios-igla-race-pipeline
crates/trios-igla-race-pipeline/
βββ Cargo.toml # workspace member
βββ README.md Β· TASK.md Β· AGENTS.md # I5 mandatory
βββ RING.md # GOLD ring spec
βββ src/lib.rs # facade only (L-ARCH-001, β€ 50 LoC, pub use only)
βββ rings/
βββ SR-00/ scarab-types (extracted from neon.rs + status.rs; serde + uuid + chrono)
βββ SR-01/ strategy-queue (hive_automaton.rs + pull_queue.rs)
βββ SR-02/ trainer-runner (sampler + attn + gf16 + git dep `trios-trainer-igla`)
βββ SR-03/ bpb-writer (bpb.rs + ema.rs + neon.rs (write side) + migrations)
βββ SR-04/ gardener (asha + invariants + race + nca + rungs + lessons)
βββ SR-05/ railway-deployer (git dep `trios-railway-audit` + `tri-railway` integration)
βββ BR-OUTPUT/ (IglaRacePipeline assembler + integration tests)
Dependency flow (R1 isolation): BR-OUTPUT β SR-05 β SR-04 β SR-03 β SR-02 β SR-01 β SR-00. Strict monotone numbering; no sibling imports.
E2E TTT O(1) loop sketch (BR-OUTPUT):
impl IglaRacePipeline {
pub async fn run_e2e_ttt_o1(&mut self) -> Result<VictoryReport, PipelineErr> {
loop {
let job = self.queue.claim_one().await?; // O(1)
for chunk in self.runner.stream_chunks(&job)? { // O(1) per chunk
let bpb = self.runner.step_one_chunk(chunk)?; // O(1) β E2E TTT
self.writer.write_one(&job, &bpb).await?; // O(1)
if self.gardener.should_prune(&job, &bpb).await? { break; }
}
if self.gardener.is_victory(&job).await? { // INV-7 igla_found_criterion
return Ok(self.gardener.victory_report(&job).await?);
}
}
}
}
π₯ GOLD II β trios-algorithm-arena (Variant A)
crates/trios-algorithm-arena/rings/
βββ SR-ALG-00/ arena-types (AlgorithmId, EntryHash, EnvVar, GoldenState; dep-free)
βββ SR-ALG-01/ jepa (parameter-golf wishlist #3)
βββ SR-ALG-02/ universal-transformer (parameter-golf wishlist #6)
βββ SR-ALG-03/ e2e-ttt (parameter-golf wishlist #8 sub) β
WIN vs PR #1837
βββ SR-ALG-04/ phi-nta (parameter-golf wishlist #9)
βββ SR-ALG-05/ ssm (parameter-golf wishlist #8 sub)
βββ SR-ALG-06/ megakernels (parameter-golf wishlist #7)
βββ BR-OUTPUT/ (AlgorithmArena assembler β `run_one(algo, seed) -> Bpb`)
Each SR holds only metadata:
pub struct AlgorithmSpec {
pub entry_path: PathBuf, // e.g. records/track_10min_16mb/2026-03-17_LoRA_TTT/train_gpt.py
pub entry_hash: [u8; 32], // SHA-256, verified before invocation
pub env: Vec<(EnvVar, EnvValue)>, // gated env vars per parameter-golf convention
pub golden_state_hash: Option<[u8; 32]>, // baseline byte-equivalence
pub theorem: Option<CoqTheoremRef>, // e.g. Ξ±_Ο = Οβ»Β³/2 (Coq.Reals 3.1)
}
The Python train_gpt.py itself stays inside parameter-golf/records/<entry>/ β never inside crates/. SR-02 trainer-runner spawns it as a subprocess after entry_hash verification.
π₯ GOLD III β trios-igla-race-hack
crates/trios-igla-race-hack/rings/
βββ SR-HACK-00/ glossary (Term { PipelineO1, AlgorithmEntry, Lane, Gate, RingTier })
βββ SR-HACK-01/ pr-bot (routes via trios-server MCP bridge per L24)
βββ SR-HACK-02/ leaderboard-mirror (read-only Neon view β static markdown)
βββ SR-HACK-03/ invite (Linear API wrapper)
βββ SR-HACK-04/ equal-billing-coq (Rust const_assert mirroring a Coq theorem)
βββ SR-HACK-05/ discord-bridge (server-to-server webhook only)
βββ BR-OUTPUT/ (IglaRaceHack assembler)
π§ Decomposition into 12 sub-issues
Each sub-issue is its own task_issue.yml with priority, kingdom, soul-name, PHI LOOP tracking. Every PR closes exactly one sub-issue (L2). EPIC progress = 12 closed sub-issues.
| # |
Sub-issue title |
Risk |
Days |
Priority |
Kingdom |
Lane |
| 1 |
SR-HACK-00 glossary (GOLD III bottom) |
π’ zero |
1 |
P2-MEDIUM |
Structure |
hack |
| 2 |
SR-00 scarab-types (GOLD I bottom) |
π’ zero |
1 |
P1-HIGH |
Rust |
pipeline |
| 3 |
SR-03 bpb-writer |
π’ low |
2 |
P1-HIGH |
Rust |
pipeline |
| 4 |
SR-01 strategy-queue |
π’ low |
2 |
P1-HIGH |
Rust |
pipeline |
| 5 |
SR-02 trainer-runner |
π‘ medium |
3 |
P1-HIGH |
Cross-kingdom |
pipeline |
| 6 |
SR-04 gardener |
π‘ medium |
3 |
P1-HIGH |
Rust |
pipeline |
| 7 |
SR-ALG-00 arena-types |
π’ zero |
1 |
P2-MEDIUM |
Rust |
algo |
| 8 |
SR-ALG-03 e2e-ttt (β
WIN) |
π‘ medium |
3 |
P0-CRITICAL |
Cross-kingdom |
algo |
| 9 |
SR-05 railway-deployer |
π‘ medium |
2 |
P2-MEDIUM |
Network |
pipeline |
| 10 |
BR-OUTPUT IglaRacePipeline |
π’ low |
1 |
P1-HIGH |
Rust |
pipeline |
| 11 |
trios-doctor SILVER-RING-DR-04 (new linter rules) |
π’ zero |
1 |
P2-MEDIUM |
Lint |
meta |
| 12 |
GOLD III remaining SR-HACK-01..05 |
π’ low |
4 |
P3-LONG-TERM |
Cross-kingdom |
hack |
Critical path to WIN: 1 β 2 β 3 β 7 β 8 β 5 β 10 (β 6 days with parallelism, 11 days single-stream).
Forbidden: sub-issues #5, #8, #9 must NOT be started until sub-issues #2, #3, #7 are merged. Sub-issue #11 may run any time.
π‘ New trios-doctor rules (no LAWS.md change)
Added in crates/trios-doctor/rings/SILVER-RING-DR-04/ per the doctor extension protocol. All start at severity warn and escalate to error after T+30 days.
| Rule ID |
Description |
T0 |
T+30 |
R-RING-FACADE-001 |
GOLD src/lib.rs β€ 50 LoC, contains only pub use re-exports |
warn |
error |
R-RING-DEP-002 |
SR-00 (XX-00) deps limited to serde, serde_json, uuid, chrono |
warn |
error |
R-RING-FLOW-003 |
SR-NN must not import SR-NN+1 (no upward / sibling import) |
error |
error |
R-RING-BR-004 |
Each GOLD crate has at least one BR-OUTPUT/ (or BR-APP/BR-BIN/BR-MODEL) |
warn |
error |
R-MCP-BRIDGE-005 |
Inter-crate A2A traffic must route through trios-server (L24); detect direct A2A imports outside crates/trios-a2a/ |
error |
error |
R-L1-ECHO-006 |
Re-runs L1 .sh check inside ring trees (not just root) |
warn |
error |
R-L6-PURE-007 |
.py files inside crates/ are forbidden, except whitelisted algorithm-arena/SR-ALG-*/spec.toml references |
warn |
error |
R-COQ-LINK-008 |
INV-N status synchronized between Coq theorem files and Rust constants |
warn |
warn |
These rules are purely additive to existing doctor coverage and never modify LAWS.md.
π Success metrics
| Layer |
Metric |
Target |
| Architecture |
trios-igla-race::lib.rs line count |
β€ 50 LoC, re-exports only |
| Architecture |
Distinct SR rings shipped |
19 (6 + 7 + 6) |
| Architecture |
trios-doctor errors |
0 |
| Architecture |
I5 violations |
0 |
| Architecture |
.sh files anywhere |
0 (L1 reaffirmed) |
| Performance |
step_one_chunk p99 |
< 50 ms (CPU) |
| Performance |
per-chunk Neon INSERT p99 |
< 10 ms |
| Algorithm |
E2E TTT 3-seed mean BPB |
< 1.07063 (beat PR #1837) |
| Coq |
INV-7 igla_found_criterion Qed |
done before Gate-3 |
| Reproducibility |
byte_equiv.rs Ξ (defaults) |
0.00e+00 |
| CI |
full pipeline integration test |
< 60 s |
β Risk register
| ID |
Risk |
P |
Mitigation |
| MR-1 |
Splitting the monolith breaks the live fleet |
High |
Backward-compat re-exports kept in crates/trios-igla-race/src/lib.rs until all consumers migrate; canary one Railway service first |
| MR-2 |
SR-02 pulls heavy tch deps |
Medium |
Feature-gated cpu-only / gpu; tch lives only in SR-02 |
| MR-3 |
victory.rs falsifier tests break after move |
Medium |
Verbatim move into BR-OUTPUT/tests/, no assertion edits |
| MR-4 |
TODO invariants (INV-6, INV-7, INV-10) block BR-OUTPUT |
Medium |
Soft requirement until Gate-3; only INV-2 / INV-4 / INV-8 are hard |
| MR-5 |
Doctor R-L6-PURE-007 blocks CI |
Low |
Severity warn for 30 days |
| MR-6 |
LAWS.md Β§8 RFC takes > 30 days |
High |
Not a blocker β all rules live at doctor layer |
| MR-7 |
parameter-golf train_gpt.py API drifts |
Low |
entry_hash in SR-ALG-NN catches drift immediately |
| MR-8 |
E2E TTT regresses above 1.07 |
Medium |
lr_calibration.rs Ο-band check before submission |
| MR-9 |
Railway redeploy risk during SR-05 migration |
High |
Observe-only on running fleet; SR-05 ships only new binaries; old shells stay until the swap is confirmed |
| MR-10 |
Breaking change in trios-trainer-igla SoT |
Medium |
SR-02 pins exact commit hash in Cargo.toml |
π« Do-not list
- β Do not modify
LAWS.md without Β§8 amendment.
- β Do not edit files outside the assigned crate (I-SCOPE).
- β Do not redeploy or restart the live fleet (observe-only until SR-05 swap is approved).
- β Do not put business logic in any GOLD
src/lib.rs (L-ARCH-001).
- β Do not bypass
trios-server for inter-agent traffic (L24).
- β Do not place
.py payloads inside crates/ (L6).
- β Do not run SR-02 trainer-runner before
byte_equiv.rs test passes.
- β Do not publish E2E TTT BPB before the 3-seed embargo window expires.
- β Do not commit without
Agent: <CODENAME> trailer.
- β Do not declare a task done with unpushed commits (L8).
β
Acceptance criteria for this EPIC
π PHI LOOP (per LAWS.md Β§7)
Every sub-issue follows the 11-step PHI LOOP:
- CLAIM β sub-issue opened with acceptance criteria.
- SPEC β
TASK.md filled inside the new ring.
- SEAL β
TASK.md locked.
- HASH β
SHA256(TASK.md) stored under .trinity/state/.
- GEN β code + tests written.
- TEST β
cargo test --all passes.
- VERDICT β every acceptance bullet verified.
- EXPERIENCE β
.trinity/experience/ updated.
- SKILL β
.claude/skills/ updated if a workflow changed.
- COMMIT β commit message includes
Closes #N and Agent: <CODENAME>.
- PUSH β branch pushed, PR opened, CI green, merged.
π References
π» phiΒ² + phiβ»Β² = 3 Β· TRINITY Β· O(1) FOREVER
Pipeline β Algorithm. Zero green-field. Pure Ring-pattern refactor of the existing 70%, in full constitutional compliance.
π» EPIC β E2E TTT Pipeline O(1) Β· Ring-Pattern Refactor (3 GOLD Γ ~19 SR)
π WAVE-GF-001 β GoldenFloat Γ strategy sweep (2026-05-02 Β· live)
Companion EPIC: same EPIC, additional experimental layer. Same training pipeline, swept across the full numeric-format universe (~60 formats catalogued in zig-golden-float #69 Β§12, 22 experiments Γ 5 phases in
gf_experiment_plan.xlsx).Operator artifact:
gf_experiment_plan.xlsx(7 sheets: Overview Β· GF Family Β· phi-Seed Palette Β· Experiment Plan Β· R5 Audit Β· phi-LR Schedule Β· Neon Queue SQL).Whitepaper: zig-golden-float #69 β Section 12 (Universal Numeric-Format Catalog, ~60 formats) +
gf16_comparison.mdSection 8 (16-bit-centric).Live fleet: acc0_new project
f29aa9dd-ca0b-460f-ad24-c7680c6717fbΒ· 5 services Β· MCPhttps://trios-railway-production-d4d6.up.railway.app/mcpΒ· DSN-A single source of truth.P0 telemetry chain closed: trainer-igla #76 (bpb_sample wiring) + #78 (canon-name fallback) + #79 (rustls CryptoProvider) all merged Β· trios-railway #112 (
railway_template_deployMCP tool, 7 tools total) open.Current run state (for the verbose snapshot see comment):
lr = Ξ±_Ο Β· Ο^(βk/2)for k=0..5 Γ Quick-3 = 18 rowspublic.strategy_queued β {128, 192, 256, 384, 512, 618}Γ Quick-3 = 18 rows (verifies L-R9 / INV-3)d β {256, 384, 512}Γ Quick-3 = 9 rows Β· gateΞBPB β€ 0.01vs Phase-0F_17/F_18/F_19 = {1597, 2584, 4181}on RTX 4090 spot ($382 budget)Quick-3 = {34, 55, 89}Β·Full-7 = {13, 21, 34, 55, 89, 144, 233}Β· all from the phi-Seed Palette.Ο-distance highlights from the catalog:
GFTernary = 0.000(perfect by construction),GF64 = 0.003,GF16 = 0.049(production),FP6 E2M3 = 0.049(surprise hit at 6 bits β open R&D),fp16 = 0.118 β Ξ±_Ο(resonance),bf16 = 0.525(worst β empirical reason for BENCH-004b 87.87 % gap).π PhD FORMAT Γ ALGORITHM MATRIX (2026-05-04 Β· Wave-3 UPDATED)
2D Coordinate Map (measured from Neon SSOT)
* = canary only (h=256, LR=0.001, 3000 steps). Full grid needed for fair comparison.
Coverage: 34 formats Γ 1-2 algos = ~50 / 312 cells = 16% Β· Target: 100% for PhD
Key Finding: 16-bit Triple Tie β Ο-distance Decides
gf16 = bf16 = fp16 in BPB, but gf16 has 10.7Γ better Ο-alignment β predicts robustness.
posit16 at 2.942 β worse than gf16 (2.566) at canary config, needs full grid comparison.
Wave-3 Discovery: 13 NEW measurable formats
Previously unknown to have working kernels: posit8/16/32/64, lns8, nf4, afp, mxfp4/6/8, binary128, binary256, tapered_fp, block_fp, shared_exp, stochastic_rounding, double_double, quad_double
Algorithm Pattern
Matrix Fill TODO
--optimizer sgd)π Progress (Wave 9 Path A Β· 2026-05-02)
Integral completion: ~82% Β·
19/19Π·Π°ΡΠ²Π»Π΅Π½Π½ΡΡ SR rings shipped + 1 follow-up Β·267 GREENtests Β·5/5 LOCKEDadmitted Β·0clippy warnings.1β2β3β7β8β5β10Wave-by-wave landings
_from_axiomhonest derivation Β· 308 LoC speculative Coq refused Β· phd-build GREEN.Bridge<L,H,B>L21-by-types) + PR feat(#458): SR-05 railway-deployer β fleet integration + R7 audit triplet (observe-only)Β #498 (π₯ [SR-05] railway-deployer β fleet integration via versioned git depΒ #458 SR-05 railway-deployer, R7 audit triplet, observe-by-default).KgAgentMemory<B: KgBackend>real-wired to SR-MEM-01 KgAdapter Β· idempotent SHA-256rememberΒ· 4-variantForgetPolicyΒ· π₯ [BR-OUTPUT] AgentMemory trait assembler (GOLD IV)Β #461 AC testintegration_remember_recall_sha256_equalGREEN.Open holds (require @gHashTag decision)
coqcrun (architectural verification).Pre-flight (no GO yet)
PgKgBackendsqlx +SqlxPgListenerBridge+ Reqwest GraphQL + Zig FFI) β unfreeze R-RING-DEP-002 under offline-build hygiene.R5-honest deferrals (architectural integrity)
PgKgBackend(sqlx + tokio-postgres) β sibling BR-IO ring (same pattern astrios_kg::KgClientfor SR-MEM-01,PgListenerfor SR-MEM-05).Bridge::seed_replayremains explicit helper (not embedded inreflect) to avoid leakingL: LessonsSource + H: HdcReplaySourcegenerics through public trait.π»
19/19 + 1 follow-up Β· 267 GREEN Β· Ξ±_Ο β 0.1180 Β· TRINITY HOLDS Β· LEAD at easeΒ§0 SUPREMACY (relation to LAWS.md)
This EPIC does NOT modify
LAWS.md. Any change to LAWS.md requires the Β§8 amendment procedure (RFC issue withconstitutional_amendment.yml, β₯ 24 h discussion, @gHashTag CODEOWNERS approval,LAWS_HASHrecompute,.trinity/experience/laws-v2-amendment.mdrecord).All new rules introduced by this EPIC are added at the trios-doctor layer (linter rules in
crates/trios-doctor/rings/SILVER-RING-DR-04/), with severitywarn β error after T+30d.This EPIC honours every active law:
.sh)railway-deployerreplaces remaining shell helpers with Rust binariesCloses #N)Part of #446cargo clippy --all-targets -- -D warningsBR-OUTPUTships integration teststrios-gbchanges.trinity/experience/trios_<DATE>.trinityConstitutional Cartographer; sub-issue agents pick their ownTASK.mdbeforesrc/lib.rsAGENTS.md: each agent works only inside its assigned crateAgent: <CODENAME>trailerstructuredContenttrios-serveron0.0.0.0:9005; direct A2A bypassing the broadcast bus is forbidden. Outreach bots in GOLD III consume MCP bridge for agent-side telemetryRing invariants from
AGENTS.md:README.md,TASK.md,AGENTS.md(all three). Missing any one = violation.XX-00= identity / core types;XX-01..N= monotone dependency layers;BR-OUTPUT/BR-APP/BR-BIN/BR-MODEL= final artefact ring.crates/trios-a2a/(8 SR rings + BR-OUTPUT, 84 tests).Source-of-truth boundary per
trios-trainer-igla/SOURCE_OF_TRUTH.md:gHashTag/trios-trainer-igla. This EPIC consumes them as a versioned git dependency under featuretrios-integration. We do not re-implement them insidetrios.INV-1..INV-10, ASHA scheduler, victory gate, GoldenFloat16, Ο-schedule primitives, embargo ledger β remain canonical ingHashTag/trios. They become SR-04 / SR-03 of GOLD I.tri-railwayCLI) β lives ingHashTag/trios-railway. SR-05railway-deployerintegrates it via versioned git dep, not by copying source.π― Goal
Convert the monolith
crates/trios-igla-race/(~250 KB Rust in a single crate) into three GOLD ring crates:trios-igla-race-pipelineβ End-to-End Test-Time Training pipeline atO(1)per chunk (scarab β strategy-queue β trainer-runner β bpb-writer β gardener β railway-deployer).trios-algorithm-arenaβ Rust spec / verifier wrapper aroundtrain_gpt.pypayloads fromopenai/parameter-golf(JEPA, Universal Transformer, E2E TTT, PhiNTA, SSM, Megakernels). Variant A: each SR holdsentry_path,entry_hash, env vars, golden-state hash, optional Coq theorem reference. The Python entry remains underparameter-golf/records/β never insidecrates/.trios-igla-race-hackβ Community / outreach plumbing: glossary, PR-bot, leaderboard mirror, Linear invite, equal-billing-coq, Discord bridge.Exit condition for the EPIC:
IglaRacePipeline::run_e2e_ttt_o1()assembles all six SR rings into a single function, runs end-to-end on three Fibonacci seeds (F_17 = 1597,F_18 = 2584,F_19 = 4181), and produces a 3-seed meanval_bpb < 1.07063on thetrack_10min_16mbtrack β beating the precedent ofopenai/parameter-golf#1837.π¦ Inventory (primary sources, ~70% already exists)
Monolith
crates/trios-igla-race/(in this repo)src/asha.rssrc/bpb.rssrc/ema.rssrc/hive_automaton.rssrc/invariants.rssrc/race.rssrc/nca.rssrc/gf16.rssrc/sampler.rssrc/attn.rssrc/neon.rssrc/victory.rsBR-OUTPUT/tests/src/rungs.rssrc/lessons.rssrc/status.rsJobStatusenumsrc/lib.rsschema/igla_race.sqlmigrations/archive/001_initial.sqlbin/honey_audit.rsbin/ledger_check.rsbin/qk_gain_check.rsbin/seed_emit.rsSource-of-truth trainer
gHashTag/trios-trainer-iglaβ consumed as git depsrc/{attention,backward,bench}.rs(~65 KB),src/bin/{cpu_train,hybrid_train,igla_train,lr_calibration,bpb_smoke,entrypoint}.rs,configs/{champion,gate2-final,lab/p4-jepa-*}.toml,docs/{SCARAB_WORKER,TRAINING_FLOW_V2}.md. SR-02 declarestrios-trainer = { git = "https://github.com/gHashTag/trios-trainer-igla", features = ["trios-integration"] }.Operator surface
gHashTag/trios-railwayβ consumed as git depbin/seed-agent/src/{claim,early_stop,telemetry,trainer,worker}.rs(~46 KB),bin/tri-gardener/src/bpb_source.rs(17 KB),bin/tri-railway/src/main.rs(26 KB),crates/trios-railway-audit/,.github/workflows/{audit-watchdog,fleet-snapshot,manifest-validate}.yml. SR-05 declarestrios-railway-audit = { git = ... }.Coq theorems
docs/phd/theorems/igla/IGLA_ASHA_Bound.v(INV-2),IGLA_BPB_Convergence.v(INV-1),IGLA_NCA_Entropy.v(INV-4),IGLA_GF16_Precision.v(INV-3),IGLA_Catalog.v, plustrinity-clara/proofs/igla/.igla_found_criterion.aux(INV-7, TODO Qed).π§± Target architecture
π₯ GOLD I β
trios-igla-race-pipelineDependency flow (R1 isolation):
BR-OUTPUT β SR-05 β SR-04 β SR-03 β SR-02 β SR-01 β SR-00. Strict monotone numbering; no sibling imports.E2E TTT O(1) loop sketch (BR-OUTPUT):
π₯ GOLD II β
trios-algorithm-arena(Variant A)Each SR holds only metadata:
The Python
train_gpt.pyitself stays insideparameter-golf/records/<entry>/β never insidecrates/. SR-02 trainer-runner spawns it as a subprocess afterentry_hashverification.π₯ GOLD III β
trios-igla-race-hackπ§ Decomposition into 12 sub-issues
Each sub-issue is its own
task_issue.ymlwith priority, kingdom, soul-name, PHI LOOP tracking. Every PR closes exactly one sub-issue (L2). EPIC progress = 12 closed sub-issues.SR-HACK-00 glossary(GOLD III bottom)SR-00 scarab-types(GOLD I bottom)SR-03 bpb-writerSR-01 strategy-queueSR-02 trainer-runnerSR-04 gardenerSR-ALG-00 arena-typesSR-ALG-03 e2e-ttt(β WIN)SR-05 railway-deployerBR-OUTPUT IglaRacePipelinetrios-doctor SILVER-RING-DR-04(new linter rules)Critical path to WIN: 1 β 2 β 3 β 7 β 8 β 5 β 10 (β 6 days with parallelism, 11 days single-stream).
Forbidden: sub-issues #5, #8, #9 must NOT be started until sub-issues #2, #3, #7 are merged. Sub-issue #11 may run any time.
π‘ New trios-doctor rules (no LAWS.md change)
Added in
crates/trios-doctor/rings/SILVER-RING-DR-04/per the doctor extension protocol. All start at severitywarnand escalate toerrorafter T+30 days.R-RING-FACADE-001src/lib.rsβ€ 50 LoC, contains onlypub usere-exportsR-RING-DEP-002XX-00) deps limited toserde,serde_json,uuid,chronoR-RING-FLOW-003R-RING-BR-004BR-OUTPUT/(orBR-APP/BR-BIN/BR-MODEL)R-MCP-BRIDGE-005trios-server(L24); detect direct A2A imports outsidecrates/trios-a2a/R-L1-ECHO-006.shcheck inside ring trees (not just root)R-L6-PURE-007.pyfiles insidecrates/are forbidden, except whitelistedalgorithm-arena/SR-ALG-*/spec.tomlreferencesR-COQ-LINK-008These rules are purely additive to existing doctor coverage and never modify
LAWS.md.π Success metrics
trios-igla-race::lib.rsline count.shfiles anywherestep_one_chunkp99igla_found_criterionQedbyte_equiv.rsΞ (defaults)β Risk register
crates/trios-igla-race/src/lib.rsuntil all consumers migrate; canary one Railway service firsttchdepscpu-only/gpu;tchlives only in SR-02victory.rsfalsifier tests break after moveBR-OUTPUT/tests/, no assertion editsR-L6-PURE-007blocks CIwarnfor 30 daystrain_gpt.pyAPI driftsentry_hashin SR-ALG-NN catches drift immediatelylr_calibration.rsΟ-band check before submissiontrios-trainer-iglaSoTCargo.tomlπ« Do-not list
LAWS.mdwithout Β§8 amendment.src/lib.rs(L-ARCH-001).trios-serverfor inter-agent traffic (L24)..pypayloads insidecrates/(L6).byte_equiv.rstest passes.Agent: <CODENAME>trailer.β Acceptance criteria for this EPIC
Closes #N(L2).cargo build --workspacesucceeds.cargo clippy --all-targets --all-features -- -D warningssucceeds (L3).cargo test --allsucceeds (L4).trios-doctor checkreports 0 errors and β€ 5 warnings.crates/trios-igla-race/src/lib.rsis β€ 50 LoC and contains only re-exports.crates/trios-igla-race-pipeline/rings/BR-OUTPUT/exists, builds, and ships an integration test that runsIglaRacePipeline::run_e2e_ttt_o1()end-to-end on one fake seed in < 60 s.SR-ALG-03 e2e-tttproduces a 3-seed meanval_bpb < 1.07063ontrack_10min_16mboverF_17 = 1597,F_18 = 2584,F_19 = 4181.INV-1..INV-10are either PROVEN in Coq or explicitly tagged TODO with a linked issue.SR-HACK-00 glossaryis referenced from every outreach DM and PR comment generated by SR-HACK-01.Ξ±_Ο = Οβ»Β³ / 2(Theorem 3.1, tag SAC-1) is asserted inSR-HACK-04 equal-billing-coqviaconst_assert.Agent: <CODENAME>trailer..trinity/experience/trios_<DATE>.trinityfor each merged sub-issue (L7).π PHI LOOP (per LAWS.md Β§7)
Every sub-issue follows the 11-step PHI LOOP:
TASK.mdfilled inside the new ring.TASK.mdlocked.SHA256(TASK.md)stored under.trinity/state/.cargo test --allpasses..trinity/experience/updated..claude/skills/updated if a workflow changed.Closes #NandAgent: <CODENAME>.π References
crates/trios-a2a/RING.md,SR-00/RING.mdLAWS.md v2.0,CLAUDE.md,AGENTS.md,HIVE.mdcrates/trios-doctor/rings/SILVER-RING-DR-{00..03}openai/parameter-golf#2059β π» Golden Sunflowersopenai/parameter-golf#1837β E2E TTT baselinegHashTag/trios-trainer-iglaΒ·SOURCE_OF_TRUTH.mdgHashTag/trios-railwayΒ·AGENTS.mddocs/phd/theorems/igla/π»
phiΒ² + phiβ»Β² = 3 Β· TRINITY Β· O(1) FOREVERPipeline β Algorithm. Zero green-field. Pure Ring-pattern refactor of the existing 70%, in full constitutional compliance.