diff --git a/Cargo.lock b/Cargo.lock index 62d2a00605..9d8202ea46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5026,6 +5026,22 @@ dependencies = [ "trios-phi-schedule", ] +[[package]] +name = "trios-hybrid-broutput" +version = "0.1.0" +dependencies = [ + "trios-hybrid-hy00", + "trios-hybrid-hy01", +] + +[[package]] +name = "trios-hybrid-hy00" +version = "0.1.0" + +[[package]] +name = "trios-hybrid-hy01" +version = "0.1.0" + [[package]] name = "trios-igla-race" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 578a089ce0..cd5788896c 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", + # trios-hybrid — ring scaffold (issue #238) + "crates/trios-hybrid/rings/HY-00", + "crates/trios-hybrid/rings/HY-01", + "crates/trios-hybrid/rings/BR-OUTPUT", ] exclude = [ "crates/trios-ext", diff --git a/crates/trios-hybrid/AGENTS.md b/crates/trios-hybrid/AGENTS.md new file mode 100644 index 0000000000..3897fa4604 --- /dev/null +++ b/crates/trios-hybrid/AGENTS.md @@ -0,0 +1,44 @@ +# AGENTS.md — trios-hybrid + +> AAIF-compliant (Linux Foundation Agentic AI Foundation) +> MCP-compatible agent instructions + +## Identity + +- Crate: trios-hybrid +- Tier: 2 (SILVER) +- Status: Scaffolded (logic migration: TODO) +- Repo: gHashTag/trios + +## What this crate does + +Existing logic in `src/`. The `rings/` directory contains scaffold packages +for the future ring-isolation migration per issue #238. + +## Ring map + +| Ring | Package | Role | Sealed | +|------|---------|------|--------| +| HY-00 | trios-hybrid-hy-00 | runtime | No | +| HY-01 | trios-hybrid-hy-01 | dispatch | No | +| BR-OUTPUT | trios-hybrid-br-output | assembly | No | + +## Rules (ABSOLUTE) + +- Read repo `LAWS.md` and `CLAUDE.md` before any action +- L-ARCH-001: After migration, logic lives in `rings/` — `src/lib.rs` becomes RE-EXPORT +- R1–R5: Ring Isolation +- R9: No cross-ring imports except via Cargo.toml +- L6: Pure Rust only +- L7: Experience line per merge + +## Migration plan + +1. Stub rings exist with passing tests (this PR) +2. Future PR: extract types/logic from `src/` into appropriate rings +3. `src/lib.rs` becomes thin re-export facade + +## You MAY NOT (until migration complete) + +- ❌ Add new logic to `rings//src/lib.rs` beyond stub types +- ❌ Cross-import rings without Cargo.toml declaration diff --git a/crates/trios-hybrid/RING.md b/crates/trios-hybrid/RING.md new file mode 100644 index 0000000000..3c4d226747 --- /dev/null +++ b/crates/trios-hybrid/RING.md @@ -0,0 +1,47 @@ +# RING — trios-hybrid + +## Identity + +| Field | Value | +|-------|-------| +| Metal | 🥈 Silver (Tier 2) | +| Type | Crate (scaffold — logic migration: TODO) | +| Sealed | No | + +## Purpose + +Scaffold for ring-isolation architecture (issue #238). +Current logic lives in `src/` — rings are organizational placeholders for future migration. + +## Ring Structure (L-ARCH-001) + +``` +crates/trios-hybrid/ +├── src/ ← existing logic (untouched) +├── rings/ +│ ├── HY-00/ ← runtime +│ ├── HY-01/ ← dispatch +│ ├── BR-OUTPUT/ ← assembly +└── RING.md, AGENTS.md +``` + +## Dependency Flow + +``` +BR-OUTPUT + ↓ + HY-00 HY-01 +``` + +No ring imports a sibling at the same level. Logic-bearing rings (non-BR) are independent. + +## Anchor + +`phi^2 + phi^-2 = 3 · TRINITY · NEVER STOP` + +## Laws + +- L-ARCH-001: Only `rings/` contains logic (after migration) +- R1–R5: Ring Isolation +- L6: Pure Rust only +- R9: Ring isolation (no cross-ring imports except via Cargo.toml) diff --git a/crates/trios-hybrid/rings/BR-OUTPUT/AGENTS.md b/crates/trios-hybrid/rings/BR-OUTPUT/AGENTS.md new file mode 100644 index 0000000000..5c894b151a --- /dev/null +++ b/crates/trios-hybrid/rings/BR-OUTPUT/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — BR-OUTPUT (trios-hybrid) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: BR-OUTPUT +- Package: trios-hybrid-broutput +- Role: assembly (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns assembly logic for trios-hybrid after migration. +Currently a stub with a marker type and metadata constants. + +## Rules (ABSOLUTE) + +- R1: Sibling rings may not be imported without Cargo.toml declaration +- R9: Ring isolation +- L6: Pure Rust only + +## You MAY + +- ✅ Add types/methods within this ring's scope (assembly) +- ✅ Add unit tests +- ✅ Migrate code from `crates/trios-hybrid/src/` matching this ring's scope + +## You MAY NOT + +- ❌ Import sibling rings without Cargo.toml dep +- ❌ Add I/O or async without explicit approval (check parent crate's policy) + +## Build + +```bash +cargo check -p trios-hybrid-broutput +cargo test -p trios-hybrid-broutput +``` diff --git a/crates/trios-hybrid/rings/BR-OUTPUT/Cargo.toml b/crates/trios-hybrid/rings/BR-OUTPUT/Cargo.toml new file mode 100644 index 0000000000..b5950f3a0f --- /dev/null +++ b/crates/trios-hybrid/rings/BR-OUTPUT/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "trios-hybrid-broutput" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "BR-OUTPUT — assembly (scaffold for trios-hybrid, issue #238)" +publish = false + +[dependencies] +trios-hybrid-hy00 = { path = "../HY-00" } +trios-hybrid-hy01 = { path = "../HY-01" } diff --git a/crates/trios-hybrid/rings/BR-OUTPUT/README.md b/crates/trios-hybrid/rings/BR-OUTPUT/README.md new file mode 100644 index 0000000000..bb62ac2986 --- /dev/null +++ b/crates/trios-hybrid/rings/BR-OUTPUT/README.md @@ -0,0 +1,16 @@ +# BR-OUTPUT — assembly + +Ring scaffold for **trios-hybrid** (issue #238). + +- Package: `trios-hybrid-broutput` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-hybrid-broutput +cargo test -p trios-hybrid-broutput +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-hybrid/rings/BR-OUTPUT/TASK.md b/crates/trios-hybrid/rings/BR-OUTPUT/TASK.md new file mode 100644 index 0000000000..28e31c20e1 --- /dev/null +++ b/crates/trios-hybrid/rings/BR-OUTPUT/TASK.md @@ -0,0 +1,17 @@ +# TASK — BR-OUTPUT (trios-hybrid) + +## Status: Scaffolded (logic migration: TODO) + +## Completed + +- [x] Ring directory created +- [x] `Cargo.toml` registered as workspace member +- [x] Stub `BrOutputScope` / assembly type with metadata constants +- [x] At least one passing unit test + +## Open + +- [ ] Migrate assembly logic from `crates/trios-hybrid/src/` into this ring +- [ ] Define public API surface for BR-OUTPUT +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-hybrid/src/lib.rs` to re-export from this ring diff --git a/crates/trios-hybrid/rings/BR-OUTPUT/src/lib.rs b/crates/trios-hybrid/rings/BR-OUTPUT/src/lib.rs new file mode 100644 index 0000000000..586fdc80fa --- /dev/null +++ b/crates/trios-hybrid/rings/BR-OUTPUT/src/lib.rs @@ -0,0 +1,32 @@ +//! BR-OUTPUT — assembly ring for trios-hybrid +//! +//! Scaffold (issue #238). Logic migration: TODO. +//! Assembles sibling rings into a unified facade. + +/// Marker type for the trios-hybrid assembly facade. +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct HybridAssembly; + +impl HybridAssembly { + pub fn new() -> Self { + Self + } + + /// Anchor invariant: phi^2 + phi^-2 = 3 + pub const TRINITY_ANCHOR: &'static str = "phi^2 + phi^-2 = 3"; +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn assembly_constructs() { + let _a = HybridAssembly::new(); + } + + #[test] + fn anchor_is_set() { + assert_eq!(HybridAssembly::TRINITY_ANCHOR, "phi^2 + phi^-2 = 3"); + } +} diff --git a/crates/trios-hybrid/rings/HY-00/AGENTS.md b/crates/trios-hybrid/rings/HY-00/AGENTS.md new file mode 100644 index 0000000000..73e3097b9e --- /dev/null +++ b/crates/trios-hybrid/rings/HY-00/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — HY-00 (trios-hybrid) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: HY-00 +- Package: trios-hybrid-hy00 +- Role: runtime (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns runtime logic for trios-hybrid after migration. +Currently a stub with a marker type and metadata constants. + +## Rules (ABSOLUTE) + +- R1: Sibling rings may not be imported without Cargo.toml declaration +- R9: Ring isolation +- L6: Pure Rust only + +## You MAY + +- ✅ Add types/methods within this ring's scope (runtime) +- ✅ Add unit tests +- ✅ Migrate code from `crates/trios-hybrid/src/` matching this ring's scope + +## You MAY NOT + +- ❌ Import sibling rings without Cargo.toml dep +- ❌ Add I/O or async without explicit approval (check parent crate's policy) + +## Build + +```bash +cargo check -p trios-hybrid-hy00 +cargo test -p trios-hybrid-hy00 +``` diff --git a/crates/trios-hybrid/rings/HY-00/Cargo.toml b/crates/trios-hybrid/rings/HY-00/Cargo.toml new file mode 100644 index 0000000000..bd2c275097 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-00/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "trios-hybrid-hy00" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "HY-00 — runtime (scaffold for trios-hybrid, issue #238)" +publish = false + +[dependencies] diff --git a/crates/trios-hybrid/rings/HY-00/README.md b/crates/trios-hybrid/rings/HY-00/README.md new file mode 100644 index 0000000000..e76916274f --- /dev/null +++ b/crates/trios-hybrid/rings/HY-00/README.md @@ -0,0 +1,16 @@ +# HY-00 — runtime + +Ring scaffold for **trios-hybrid** (issue #238). + +- Package: `trios-hybrid-hy00` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-hybrid-hy00 +cargo test -p trios-hybrid-hy00 +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-hybrid/rings/HY-00/TASK.md b/crates/trios-hybrid/rings/HY-00/TASK.md new file mode 100644 index 0000000000..115ac2bac7 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-00/TASK.md @@ -0,0 +1,17 @@ +# TASK — HY-00 (trios-hybrid) + +## Status: Scaffolded (logic migration: TODO) + +## Completed + +- [x] Ring directory created +- [x] `Cargo.toml` registered as workspace member +- [x] Stub `Hy00Scope` / assembly type with metadata constants +- [x] At least one passing unit test + +## Open + +- [ ] Migrate runtime logic from `crates/trios-hybrid/src/` into this ring +- [ ] Define public API surface for HY-00 +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-hybrid/src/lib.rs` to re-export from this ring diff --git a/crates/trios-hybrid/rings/HY-00/src/lib.rs b/crates/trios-hybrid/rings/HY-00/src/lib.rs new file mode 100644 index 0000000000..fe2592f7de --- /dev/null +++ b/crates/trios-hybrid/rings/HY-00/src/lib.rs @@ -0,0 +1,27 @@ +//! HY-00 — runtime (scaffold) +//! +//! Scaffold ring for trios-hybrid (issue #238). Logic migration: TODO. + +/// Marker for HY-00 ring scope (runtime). +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct Hy00Scope; + +impl Hy00Scope { + pub const RING: &'static str = "HY-00"; + pub const PURPOSE: &'static str = "runtime"; + + pub fn new() -> Self { + Self + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn scope_metadata() { + assert_eq!(Hy00Scope::RING, "HY-00"); + assert_eq!(Hy00Scope::PURPOSE, "runtime"); + } +} diff --git a/crates/trios-hybrid/rings/HY-01/AGENTS.md b/crates/trios-hybrid/rings/HY-01/AGENTS.md new file mode 100644 index 0000000000..a000bb8694 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-01/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — HY-01 (trios-hybrid) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: HY-01 +- Package: trios-hybrid-hy01 +- Role: dispatch (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns dispatch logic for trios-hybrid after migration. +Currently a stub with a marker type and metadata constants. + +## Rules (ABSOLUTE) + +- R1: Sibling rings may not be imported without Cargo.toml declaration +- R9: Ring isolation +- L6: Pure Rust only + +## You MAY + +- ✅ Add types/methods within this ring's scope (dispatch) +- ✅ Add unit tests +- ✅ Migrate code from `crates/trios-hybrid/src/` matching this ring's scope + +## You MAY NOT + +- ❌ Import sibling rings without Cargo.toml dep +- ❌ Add I/O or async without explicit approval (check parent crate's policy) + +## Build + +```bash +cargo check -p trios-hybrid-hy01 +cargo test -p trios-hybrid-hy01 +``` diff --git a/crates/trios-hybrid/rings/HY-01/Cargo.toml b/crates/trios-hybrid/rings/HY-01/Cargo.toml new file mode 100644 index 0000000000..cfe99184a6 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-01/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "trios-hybrid-hy01" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "HY-01 — dispatch (scaffold for trios-hybrid, issue #238)" +publish = false + +[dependencies] diff --git a/crates/trios-hybrid/rings/HY-01/README.md b/crates/trios-hybrid/rings/HY-01/README.md new file mode 100644 index 0000000000..4a038b39c5 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-01/README.md @@ -0,0 +1,16 @@ +# HY-01 — dispatch + +Ring scaffold for **trios-hybrid** (issue #238). + +- Package: `trios-hybrid-hy01` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-hybrid-hy01 +cargo test -p trios-hybrid-hy01 +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-hybrid/rings/HY-01/TASK.md b/crates/trios-hybrid/rings/HY-01/TASK.md new file mode 100644 index 0000000000..fbb9244097 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-01/TASK.md @@ -0,0 +1,17 @@ +# TASK — HY-01 (trios-hybrid) + +## Status: Scaffolded (logic migration: TODO) + +## Completed + +- [x] Ring directory created +- [x] `Cargo.toml` registered as workspace member +- [x] Stub `Hy01Scope` / assembly type with metadata constants +- [x] At least one passing unit test + +## Open + +- [ ] Migrate dispatch logic from `crates/trios-hybrid/src/` into this ring +- [ ] Define public API surface for HY-01 +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-hybrid/src/lib.rs` to re-export from this ring diff --git a/crates/trios-hybrid/rings/HY-01/src/lib.rs b/crates/trios-hybrid/rings/HY-01/src/lib.rs new file mode 100644 index 0000000000..91ef4f2e75 --- /dev/null +++ b/crates/trios-hybrid/rings/HY-01/src/lib.rs @@ -0,0 +1,27 @@ +//! HY-01 — dispatch (scaffold) +//! +//! Scaffold ring for trios-hybrid (issue #238). Logic migration: TODO. + +/// Marker for HY-01 ring scope (dispatch). +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct Hy01Scope; + +impl Hy01Scope { + pub const RING: &'static str = "HY-01"; + pub const PURPOSE: &'static str = "dispatch"; + + pub fn new() -> Self { + Self + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn scope_metadata() { + assert_eq!(Hy01Scope::RING, "HY-01"); + assert_eq!(Hy01Scope::PURPOSE, "dispatch"); + } +}