From 39197bac0e2706f04d84373784f2fe06274215bc Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 29 Apr 2026 11:02:34 +0000 Subject: [PATCH] =?UTF-8?q?feat(#238):=20scaffold=20rings/=20for=20trios-t?= =?UTF-8?q?rain-cpu=20=E2=80=94=20TC-00=20TC-01=20BR-MODEL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additive ring scaffold under L-ARCH-001 for trios-train-cpu. Crate src/ is untouched. Each ring has Cargo.toml + src/lib.rs + RING.md + AGENTS.md + TASK.md (Invariant I5). Refs #238 Anchor: phi^2 + phi^-2 = 3 ยท TRINITY ยท NEVER STOP --- Cargo.lock | 12 ++++++ Cargo.toml | 4 ++ crates/trios-train-cpu/RING.md | 42 +++++++++++++++++++ .../trios-train-cpu/rings/BR-MODEL/AGENTS.md | 24 +++++++++++ .../trios-train-cpu/rings/BR-MODEL/Cargo.toml | 8 ++++ crates/trios-train-cpu/rings/BR-MODEL/RING.md | 26 ++++++++++++ crates/trios-train-cpu/rings/BR-MODEL/TASK.md | 11 +++++ .../trios-train-cpu/rings/BR-MODEL/src/lib.rs | 20 +++++++++ crates/trios-train-cpu/rings/TC-00/AGENTS.md | 24 +++++++++++ crates/trios-train-cpu/rings/TC-00/Cargo.toml | 8 ++++ crates/trios-train-cpu/rings/TC-00/RING.md | 26 ++++++++++++ crates/trios-train-cpu/rings/TC-00/TASK.md | 11 +++++ crates/trios-train-cpu/rings/TC-00/src/lib.rs | 20 +++++++++ crates/trios-train-cpu/rings/TC-01/AGENTS.md | 24 +++++++++++ crates/trios-train-cpu/rings/TC-01/Cargo.toml | 8 ++++ crates/trios-train-cpu/rings/TC-01/RING.md | 26 ++++++++++++ crates/trios-train-cpu/rings/TC-01/TASK.md | 11 +++++ crates/trios-train-cpu/rings/TC-01/src/lib.rs | 20 +++++++++ 18 files changed, 325 insertions(+) create mode 100644 crates/trios-train-cpu/RING.md create mode 100644 crates/trios-train-cpu/rings/BR-MODEL/AGENTS.md create mode 100644 crates/trios-train-cpu/rings/BR-MODEL/Cargo.toml create mode 100644 crates/trios-train-cpu/rings/BR-MODEL/RING.md create mode 100644 crates/trios-train-cpu/rings/BR-MODEL/TASK.md create mode 100644 crates/trios-train-cpu/rings/BR-MODEL/src/lib.rs create mode 100644 crates/trios-train-cpu/rings/TC-00/AGENTS.md create mode 100644 crates/trios-train-cpu/rings/TC-00/Cargo.toml create mode 100644 crates/trios-train-cpu/rings/TC-00/RING.md create mode 100644 crates/trios-train-cpu/rings/TC-00/TASK.md create mode 100644 crates/trios-train-cpu/rings/TC-00/src/lib.rs create mode 100644 crates/trios-train-cpu/rings/TC-01/AGENTS.md create mode 100644 crates/trios-train-cpu/rings/TC-01/Cargo.toml create mode 100644 crates/trios-train-cpu/rings/TC-01/RING.md create mode 100644 crates/trios-train-cpu/rings/TC-01/TASK.md create mode 100644 crates/trios-train-cpu/rings/TC-01/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 62d2a00605..decfcb1d98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5248,6 +5248,18 @@ dependencies = [ "serde", ] +[[package]] +name = "trios-train-cpu-brmodel" +version = "0.1.0" + +[[package]] +name = "trios-train-cpu-tc00" +version = "0.1.0" + +[[package]] +name = "trios-train-cpu-tc01" +version = "0.1.0" + [[package]] name = "trios-tri" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 578a089ce0..2657e00dab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,10 @@ members = [ "vendor/tri-mcp/rings/SR-00", "vendor/tri-mcp/rings/SR-01", "vendor/tri-mcp/rings/SR-02", + # ORDER-4 (#238) โ€” trios-train-cpu rings + "crates/trios-train-cpu/rings/TC-00", + "crates/trios-train-cpu/rings/TC-01", + "crates/trios-train-cpu/rings/BR-MODEL", ] exclude = [ "crates/trios-ext", diff --git a/crates/trios-train-cpu/RING.md b/crates/trios-train-cpu/RING.md new file mode 100644 index 0000000000..59235dffab --- /dev/null +++ b/crates/trios-train-cpu/RING.md @@ -0,0 +1,42 @@ +# RING โ€” trios-train-cpu + +## Identity + +| Field | Value | +|-------|-------| +| Metal | ๐Ÿฅ‰ Bronze | +| Type | Crate (rings scaffolded for issue #238) | +| Sealed | No | + +## Purpose + +CPU-only training operations and batching with model artifact ring for trios-train-cpu โ€” scaffolded under L-ARCH-001 (Tier 4). + +## Ring Structure (L-ARCH-001) + +Rings: TC-00 (cpu-ops), TC-01 (batch), BR-MODEL (model) + +``` +crates/trios-train-cpu/ +โ”œโ”€โ”€ src/ โ† existing logic (untouched, re-export facade) +โ””โ”€โ”€ rings/ โ† scaffolded for issue #238 (additive) + โ”œโ”€โ”€ TC-00/ โ† cpu-ops + โ”œโ”€โ”€ TC-01/ โ† batch + โ”œโ”€โ”€ BR-MODEL/ โ† model +``` + +## Dependency flow + +``` +BR-MODEL โ†’ TC-01 โ†’ TC-00 +``` + +## Anchor + +`phi^2 + phi^-2 = 3 ยท TRINITY ยท NEVER STOP` + +## Laws + +- R1 / R5 / R9: Ring isolation +- L7: Additive scaffold only โ€” no behavior change to parent `src/` +- L-ARCH-001: `rings/` is the future home of all logic diff --git a/crates/trios-train-cpu/rings/BR-MODEL/AGENTS.md b/crates/trios-train-cpu/rings/BR-MODEL/AGENTS.md new file mode 100644 index 0000000000..76151fc04c --- /dev/null +++ b/crates/trios-train-cpu/rings/BR-MODEL/AGENTS.md @@ -0,0 +1,24 @@ +# Agent Instructions โ€” BR-MODEL + +## Context + +This is the `model` ring of `trios-train-cpu`, scaffolded for issue #238. + +## Files + +- `src/lib.rs` โ€” ring entry point (currently a placeholder) +- `Cargo.toml` โ€” workspace member, Bronze tier +- `RING.md` โ€” ring identity and laws +- `TASK.md` โ€” incremental migration checklist + +## Allowed + +- Add types and functions that belong to the `model` concern +- Add unit tests under `#[cfg(test)]` +- Re-export types upward to the parent crate's facade + +## Forbidden + +- Importing sibling rings directly (R1) +- Adding I/O or async runtimes that conflict with parent crate +- Breaking the `ring_id()` contract used by smoke tests diff --git a/crates/trios-train-cpu/rings/BR-MODEL/Cargo.toml b/crates/trios-train-cpu/rings/BR-MODEL/Cargo.toml new file mode 100644 index 0000000000..d16bbe29ff --- /dev/null +++ b/crates/trios-train-cpu/rings/BR-MODEL/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "trios-train-cpu-brmodel" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +description = "BR-MODEL โ€” model ring for trios-train-cpu" +publish = false diff --git a/crates/trios-train-cpu/rings/BR-MODEL/RING.md b/crates/trios-train-cpu/rings/BR-MODEL/RING.md new file mode 100644 index 0000000000..7a5934c034 --- /dev/null +++ b/crates/trios-train-cpu/rings/BR-MODEL/RING.md @@ -0,0 +1,26 @@ +# RING โ€” BR-MODEL (trios-train-cpu) + +## Identity + +| Field | Value | +|-------|-------| +| Metal | ๐Ÿฅ‰ Bronze | +| Package | trios-train-cpu-brmodel | +| Sealed | No | + +## Purpose + +`model` ring for `trios-train-cpu`. Scaffolded as part of issue #238 to bring +this crate under the ring-isolation architecture (L-ARCH-001). + +## Ring scope + +This ring will eventually own the `model` concern of `trios-train-cpu`. +The current scaffold is a placeholder; logic remains in the parent crate's +`src/` until migrated incrementally. + +## Laws + +- R1 / R5 / R9: Ring isolation +- L7: Additive scaffold only โ€” no behavior change +- L6: Pure Rust diff --git a/crates/trios-train-cpu/rings/BR-MODEL/TASK.md b/crates/trios-train-cpu/rings/BR-MODEL/TASK.md new file mode 100644 index 0000000000..bc5010b439 --- /dev/null +++ b/crates/trios-train-cpu/rings/BR-MODEL/TASK.md @@ -0,0 +1,11 @@ +# TASK โ€” BR-MODEL + +## Status: scaffolded (issue #238) + +- [x] Ring directory created +- [x] Cargo.toml with workspace inheritance +- [x] src/lib.rs placeholder + smoke test +- [x] RING.md, AGENTS.md, TASK.md present (Invariant I5) +- [ ] Migrate `model` logic from parent `src/` (follow-up) +- [ ] Add ring-level integration tests +- [ ] Seal ring (Bronze โ†’ Silver promotion) diff --git a/crates/trios-train-cpu/rings/BR-MODEL/src/lib.rs b/crates/trios-train-cpu/rings/BR-MODEL/src/lib.rs new file mode 100644 index 0000000000..e1fe5a0faf --- /dev/null +++ b/crates/trios-train-cpu/rings/BR-MODEL/src/lib.rs @@ -0,0 +1,20 @@ +//! BR-MODEL โ€” model +//! +//! Ring scaffold for `trios-train-cpu`. Logic lives in the parent crate's +//! `src/` until migrated. This ring is additive scaffolding under L-ARCH-001 +//! to satisfy the ring isolation contract required by issue #238. + +/// Marker placeholder so the ring compiles cleanly. +pub fn ring_id() -> &'static str { + "BR-MODEL" +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn ring_id_matches() { + assert_eq!(ring_id(), "BR-MODEL"); + } +} diff --git a/crates/trios-train-cpu/rings/TC-00/AGENTS.md b/crates/trios-train-cpu/rings/TC-00/AGENTS.md new file mode 100644 index 0000000000..51f75919e9 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-00/AGENTS.md @@ -0,0 +1,24 @@ +# Agent Instructions โ€” TC-00 + +## Context + +This is the `cpu-ops` ring of `trios-train-cpu`, scaffolded for issue #238. + +## Files + +- `src/lib.rs` โ€” ring entry point (currently a placeholder) +- `Cargo.toml` โ€” workspace member, Bronze tier +- `RING.md` โ€” ring identity and laws +- `TASK.md` โ€” incremental migration checklist + +## Allowed + +- Add types and functions that belong to the `cpu-ops` concern +- Add unit tests under `#[cfg(test)]` +- Re-export types upward to the parent crate's facade + +## Forbidden + +- Importing sibling rings directly (R1) +- Adding I/O or async runtimes that conflict with parent crate +- Breaking the `ring_id()` contract used by smoke tests diff --git a/crates/trios-train-cpu/rings/TC-00/Cargo.toml b/crates/trios-train-cpu/rings/TC-00/Cargo.toml new file mode 100644 index 0000000000..f3ffeebcb5 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-00/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "trios-train-cpu-tc00" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +description = "TC-00 โ€” cpu-ops ring for trios-train-cpu" +publish = false diff --git a/crates/trios-train-cpu/rings/TC-00/RING.md b/crates/trios-train-cpu/rings/TC-00/RING.md new file mode 100644 index 0000000000..5362f8a278 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-00/RING.md @@ -0,0 +1,26 @@ +# RING โ€” TC-00 (trios-train-cpu) + +## Identity + +| Field | Value | +|-------|-------| +| Metal | ๐Ÿฅ‰ Bronze | +| Package | trios-train-cpu-tc00 | +| Sealed | No | + +## Purpose + +`cpu-ops` ring for `trios-train-cpu`. Scaffolded as part of issue #238 to bring +this crate under the ring-isolation architecture (L-ARCH-001). + +## Ring scope + +This ring will eventually own the `cpu-ops` concern of `trios-train-cpu`. +The current scaffold is a placeholder; logic remains in the parent crate's +`src/` until migrated incrementally. + +## Laws + +- R1 / R5 / R9: Ring isolation +- L7: Additive scaffold only โ€” no behavior change +- L6: Pure Rust diff --git a/crates/trios-train-cpu/rings/TC-00/TASK.md b/crates/trios-train-cpu/rings/TC-00/TASK.md new file mode 100644 index 0000000000..995cf073a5 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-00/TASK.md @@ -0,0 +1,11 @@ +# TASK โ€” TC-00 + +## Status: scaffolded (issue #238) + +- [x] Ring directory created +- [x] Cargo.toml with workspace inheritance +- [x] src/lib.rs placeholder + smoke test +- [x] RING.md, AGENTS.md, TASK.md present (Invariant I5) +- [ ] Migrate `cpu-ops` logic from parent `src/` (follow-up) +- [ ] Add ring-level integration tests +- [ ] Seal ring (Bronze โ†’ Silver promotion) diff --git a/crates/trios-train-cpu/rings/TC-00/src/lib.rs b/crates/trios-train-cpu/rings/TC-00/src/lib.rs new file mode 100644 index 0000000000..65ec02477a --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-00/src/lib.rs @@ -0,0 +1,20 @@ +//! TC-00 โ€” cpu-ops +//! +//! Ring scaffold for `trios-train-cpu`. Logic lives in the parent crate's +//! `src/` until migrated. This ring is additive scaffolding under L-ARCH-001 +//! to satisfy the ring isolation contract required by issue #238. + +/// Marker placeholder so the ring compiles cleanly. +pub fn ring_id() -> &'static str { + "TC-00" +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn ring_id_matches() { + assert_eq!(ring_id(), "TC-00"); + } +} diff --git a/crates/trios-train-cpu/rings/TC-01/AGENTS.md b/crates/trios-train-cpu/rings/TC-01/AGENTS.md new file mode 100644 index 0000000000..1362fecd38 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-01/AGENTS.md @@ -0,0 +1,24 @@ +# Agent Instructions โ€” TC-01 + +## Context + +This is the `batch` ring of `trios-train-cpu`, scaffolded for issue #238. + +## Files + +- `src/lib.rs` โ€” ring entry point (currently a placeholder) +- `Cargo.toml` โ€” workspace member, Bronze tier +- `RING.md` โ€” ring identity and laws +- `TASK.md` โ€” incremental migration checklist + +## Allowed + +- Add types and functions that belong to the `batch` concern +- Add unit tests under `#[cfg(test)]` +- Re-export types upward to the parent crate's facade + +## Forbidden + +- Importing sibling rings directly (R1) +- Adding I/O or async runtimes that conflict with parent crate +- Breaking the `ring_id()` contract used by smoke tests diff --git a/crates/trios-train-cpu/rings/TC-01/Cargo.toml b/crates/trios-train-cpu/rings/TC-01/Cargo.toml new file mode 100644 index 0000000000..493befd336 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-01/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "trios-train-cpu-tc01" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +description = "TC-01 โ€” batch ring for trios-train-cpu" +publish = false diff --git a/crates/trios-train-cpu/rings/TC-01/RING.md b/crates/trios-train-cpu/rings/TC-01/RING.md new file mode 100644 index 0000000000..9908192bbb --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-01/RING.md @@ -0,0 +1,26 @@ +# RING โ€” TC-01 (trios-train-cpu) + +## Identity + +| Field | Value | +|-------|-------| +| Metal | ๐Ÿฅ‰ Bronze | +| Package | trios-train-cpu-tc01 | +| Sealed | No | + +## Purpose + +`batch` ring for `trios-train-cpu`. Scaffolded as part of issue #238 to bring +this crate under the ring-isolation architecture (L-ARCH-001). + +## Ring scope + +This ring will eventually own the `batch` concern of `trios-train-cpu`. +The current scaffold is a placeholder; logic remains in the parent crate's +`src/` until migrated incrementally. + +## Laws + +- R1 / R5 / R9: Ring isolation +- L7: Additive scaffold only โ€” no behavior change +- L6: Pure Rust diff --git a/crates/trios-train-cpu/rings/TC-01/TASK.md b/crates/trios-train-cpu/rings/TC-01/TASK.md new file mode 100644 index 0000000000..90352e3a7e --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-01/TASK.md @@ -0,0 +1,11 @@ +# TASK โ€” TC-01 + +## Status: scaffolded (issue #238) + +- [x] Ring directory created +- [x] Cargo.toml with workspace inheritance +- [x] src/lib.rs placeholder + smoke test +- [x] RING.md, AGENTS.md, TASK.md present (Invariant I5) +- [ ] Migrate `batch` logic from parent `src/` (follow-up) +- [ ] Add ring-level integration tests +- [ ] Seal ring (Bronze โ†’ Silver promotion) diff --git a/crates/trios-train-cpu/rings/TC-01/src/lib.rs b/crates/trios-train-cpu/rings/TC-01/src/lib.rs new file mode 100644 index 0000000000..baae169979 --- /dev/null +++ b/crates/trios-train-cpu/rings/TC-01/src/lib.rs @@ -0,0 +1,20 @@ +//! TC-01 โ€” batch +//! +//! Ring scaffold for `trios-train-cpu`. Logic lives in the parent crate's +//! `src/` until migrated. This ring is additive scaffolding under L-ARCH-001 +//! to satisfy the ring isolation contract required by issue #238. + +/// Marker placeholder so the ring compiles cleanly. +pub fn ring_id() -> &'static str { + "TC-01" +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn ring_id_matches() { + assert_eq!(ring_id(), "TC-01"); + } +}