diff --git a/Cargo.lock b/Cargo.lock index 62d2a00605..e007890c03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4849,6 +4849,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "trios-claude-broutput" +version = "0.1.0" +dependencies = [ + "trios-claude-cl00", + "trios-claude-cl01", + "trios-claude-cl02", +] + +[[package]] +name = "trios-claude-cl00" +version = "0.1.0" + +[[package]] +name = "trios-claude-cl01" +version = "0.1.0" + +[[package]] +name = "trios-claude-cl02" +version = "0.1.0" + [[package]] name = "trios-cli" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 578a089ce0..75d233b397 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,11 @@ members = [ "vendor/tri-mcp/rings/SR-00", "vendor/tri-mcp/rings/SR-01", "vendor/tri-mcp/rings/SR-02", + # trios-claude — ring scaffold (issue #238) + "crates/trios-claude/rings/CL-00", + "crates/trios-claude/rings/CL-01", + "crates/trios-claude/rings/CL-02", + "crates/trios-claude/rings/BR-OUTPUT", ] exclude = [ "crates/trios-ext", diff --git a/crates/trios-claude/AGENTS.md b/crates/trios-claude/AGENTS.md new file mode 100644 index 0000000000..69dc906ac8 --- /dev/null +++ b/crates/trios-claude/AGENTS.md @@ -0,0 +1,45 @@ +# AGENTS.md — trios-claude + +> AAIF-compliant (Linux Foundation Agentic AI Foundation) +> MCP-compatible agent instructions + +## Identity + +- Crate: trios-claude +- 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 | +|------|---------|------|--------| +| CL-00 | trios-claude-cl-00 | client | No | +| CL-01 | trios-claude-cl-01 | tools | No | +| CL-02 | trios-claude-cl-02 | dispatch | No | +| BR-OUTPUT | trios-claude-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-claude/RING.md b/crates/trios-claude/RING.md new file mode 100644 index 0000000000..745acc8c28 --- /dev/null +++ b/crates/trios-claude/RING.md @@ -0,0 +1,48 @@ +# RING — trios-claude + +## 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-claude/ +├── src/ ← existing logic (untouched) +├── rings/ +│ ├── CL-00/ ← client +│ ├── CL-01/ ← tools +│ ├── CL-02/ ← dispatch +│ ├── BR-OUTPUT/ ← assembly +└── RING.md, AGENTS.md +``` + +## Dependency Flow + +``` +BR-OUTPUT + ↓ + CL-00 CL-01 CL-02 +``` + +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-claude/rings/BR-OUTPUT/AGENTS.md b/crates/trios-claude/rings/BR-OUTPUT/AGENTS.md new file mode 100644 index 0000000000..bceac80f16 --- /dev/null +++ b/crates/trios-claude/rings/BR-OUTPUT/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — BR-OUTPUT (trios-claude) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: BR-OUTPUT +- Package: trios-claude-broutput +- Role: assembly (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns assembly logic for trios-claude 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-claude/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-claude-broutput +cargo test -p trios-claude-broutput +``` diff --git a/crates/trios-claude/rings/BR-OUTPUT/Cargo.toml b/crates/trios-claude/rings/BR-OUTPUT/Cargo.toml new file mode 100644 index 0000000000..98fa217328 --- /dev/null +++ b/crates/trios-claude/rings/BR-OUTPUT/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "trios-claude-broutput" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "BR-OUTPUT — assembly (scaffold for trios-claude, issue #238)" +publish = false + +[dependencies] +trios-claude-cl00 = { path = "../CL-00" } +trios-claude-cl01 = { path = "../CL-01" } +trios-claude-cl02 = { path = "../CL-02" } diff --git a/crates/trios-claude/rings/BR-OUTPUT/README.md b/crates/trios-claude/rings/BR-OUTPUT/README.md new file mode 100644 index 0000000000..37533782c3 --- /dev/null +++ b/crates/trios-claude/rings/BR-OUTPUT/README.md @@ -0,0 +1,16 @@ +# BR-OUTPUT — assembly + +Ring scaffold for **trios-claude** (issue #238). + +- Package: `trios-claude-broutput` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-claude-broutput +cargo test -p trios-claude-broutput +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-claude/rings/BR-OUTPUT/TASK.md b/crates/trios-claude/rings/BR-OUTPUT/TASK.md new file mode 100644 index 0000000000..26daa2acab --- /dev/null +++ b/crates/trios-claude/rings/BR-OUTPUT/TASK.md @@ -0,0 +1,17 @@ +# TASK — BR-OUTPUT (trios-claude) + +## 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-claude/src/` into this ring +- [ ] Define public API surface for BR-OUTPUT +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-claude/src/lib.rs` to re-export from this ring diff --git a/crates/trios-claude/rings/BR-OUTPUT/src/lib.rs b/crates/trios-claude/rings/BR-OUTPUT/src/lib.rs new file mode 100644 index 0000000000..003234a08f --- /dev/null +++ b/crates/trios-claude/rings/BR-OUTPUT/src/lib.rs @@ -0,0 +1,32 @@ +//! BR-OUTPUT — assembly ring for trios-claude +//! +//! Scaffold (issue #238). Logic migration: TODO. +//! Assembles sibling rings into a unified facade. + +/// Marker type for the trios-claude assembly facade. +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct ClaudeAssembly; + +impl ClaudeAssembly { + 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 = ClaudeAssembly::new(); + } + + #[test] + fn anchor_is_set() { + assert_eq!(ClaudeAssembly::TRINITY_ANCHOR, "phi^2 + phi^-2 = 3"); + } +} diff --git a/crates/trios-claude/rings/CL-00/AGENTS.md b/crates/trios-claude/rings/CL-00/AGENTS.md new file mode 100644 index 0000000000..13ede223f9 --- /dev/null +++ b/crates/trios-claude/rings/CL-00/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — CL-00 (trios-claude) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: CL-00 +- Package: trios-claude-cl00 +- Role: client (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns client logic for trios-claude 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 (client) +- ✅ Add unit tests +- ✅ Migrate code from `crates/trios-claude/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-claude-cl00 +cargo test -p trios-claude-cl00 +``` diff --git a/crates/trios-claude/rings/CL-00/Cargo.toml b/crates/trios-claude/rings/CL-00/Cargo.toml new file mode 100644 index 0000000000..a548a27fd3 --- /dev/null +++ b/crates/trios-claude/rings/CL-00/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "trios-claude-cl00" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "CL-00 — client (scaffold for trios-claude, issue #238)" +publish = false + +[dependencies] diff --git a/crates/trios-claude/rings/CL-00/README.md b/crates/trios-claude/rings/CL-00/README.md new file mode 100644 index 0000000000..2e769e81bc --- /dev/null +++ b/crates/trios-claude/rings/CL-00/README.md @@ -0,0 +1,16 @@ +# CL-00 — client + +Ring scaffold for **trios-claude** (issue #238). + +- Package: `trios-claude-cl00` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-claude-cl00 +cargo test -p trios-claude-cl00 +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-claude/rings/CL-00/TASK.md b/crates/trios-claude/rings/CL-00/TASK.md new file mode 100644 index 0000000000..ccb2f2cfd1 --- /dev/null +++ b/crates/trios-claude/rings/CL-00/TASK.md @@ -0,0 +1,17 @@ +# TASK — CL-00 (trios-claude) + +## Status: Scaffolded (logic migration: TODO) + +## Completed + +- [x] Ring directory created +- [x] `Cargo.toml` registered as workspace member +- [x] Stub `Cl00Scope` / assembly type with metadata constants +- [x] At least one passing unit test + +## Open + +- [ ] Migrate client logic from `crates/trios-claude/src/` into this ring +- [ ] Define public API surface for CL-00 +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-claude/src/lib.rs` to re-export from this ring diff --git a/crates/trios-claude/rings/CL-00/src/lib.rs b/crates/trios-claude/rings/CL-00/src/lib.rs new file mode 100644 index 0000000000..a24cd5f266 --- /dev/null +++ b/crates/trios-claude/rings/CL-00/src/lib.rs @@ -0,0 +1,27 @@ +//! CL-00 — client (scaffold) +//! +//! Scaffold ring for trios-claude (issue #238). Logic migration: TODO. + +/// Marker for CL-00 ring scope (client). +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct Cl00Scope; + +impl Cl00Scope { + pub const RING: &'static str = "CL-00"; + pub const PURPOSE: &'static str = "client"; + + pub fn new() -> Self { + Self + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn scope_metadata() { + assert_eq!(Cl00Scope::RING, "CL-00"); + assert_eq!(Cl00Scope::PURPOSE, "client"); + } +} diff --git a/crates/trios-claude/rings/CL-01/AGENTS.md b/crates/trios-claude/rings/CL-01/AGENTS.md new file mode 100644 index 0000000000..d95ad323ae --- /dev/null +++ b/crates/trios-claude/rings/CL-01/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — CL-01 (trios-claude) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: CL-01 +- Package: trios-claude-cl01 +- Role: tools (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns tools logic for trios-claude 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 (tools) +- ✅ Add unit tests +- ✅ Migrate code from `crates/trios-claude/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-claude-cl01 +cargo test -p trios-claude-cl01 +``` diff --git a/crates/trios-claude/rings/CL-01/Cargo.toml b/crates/trios-claude/rings/CL-01/Cargo.toml new file mode 100644 index 0000000000..b9b56ab0b2 --- /dev/null +++ b/crates/trios-claude/rings/CL-01/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "trios-claude-cl01" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "CL-01 — tools (scaffold for trios-claude, issue #238)" +publish = false + +[dependencies] diff --git a/crates/trios-claude/rings/CL-01/README.md b/crates/trios-claude/rings/CL-01/README.md new file mode 100644 index 0000000000..b335b1819c --- /dev/null +++ b/crates/trios-claude/rings/CL-01/README.md @@ -0,0 +1,16 @@ +# CL-01 — tools + +Ring scaffold for **trios-claude** (issue #238). + +- Package: `trios-claude-cl01` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-claude-cl01 +cargo test -p trios-claude-cl01 +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-claude/rings/CL-01/TASK.md b/crates/trios-claude/rings/CL-01/TASK.md new file mode 100644 index 0000000000..f055f9a99e --- /dev/null +++ b/crates/trios-claude/rings/CL-01/TASK.md @@ -0,0 +1,17 @@ +# TASK — CL-01 (trios-claude) + +## Status: Scaffolded (logic migration: TODO) + +## Completed + +- [x] Ring directory created +- [x] `Cargo.toml` registered as workspace member +- [x] Stub `Cl01Scope` / assembly type with metadata constants +- [x] At least one passing unit test + +## Open + +- [ ] Migrate tools logic from `crates/trios-claude/src/` into this ring +- [ ] Define public API surface for CL-01 +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-claude/src/lib.rs` to re-export from this ring diff --git a/crates/trios-claude/rings/CL-01/src/lib.rs b/crates/trios-claude/rings/CL-01/src/lib.rs new file mode 100644 index 0000000000..8842ccf369 --- /dev/null +++ b/crates/trios-claude/rings/CL-01/src/lib.rs @@ -0,0 +1,27 @@ +//! CL-01 — tools (scaffold) +//! +//! Scaffold ring for trios-claude (issue #238). Logic migration: TODO. + +/// Marker for CL-01 ring scope (tools). +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct Cl01Scope; + +impl Cl01Scope { + pub const RING: &'static str = "CL-01"; + pub const PURPOSE: &'static str = "tools"; + + pub fn new() -> Self { + Self + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn scope_metadata() { + assert_eq!(Cl01Scope::RING, "CL-01"); + assert_eq!(Cl01Scope::PURPOSE, "tools"); + } +} diff --git a/crates/trios-claude/rings/CL-02/AGENTS.md b/crates/trios-claude/rings/CL-02/AGENTS.md new file mode 100644 index 0000000000..bfa1cf918a --- /dev/null +++ b/crates/trios-claude/rings/CL-02/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md — CL-02 (trios-claude) + +> AAIF-compliant | MCP-compatible + +## Identity + +- Ring: CL-02 +- Package: trios-claude-cl02 +- Role: dispatch (scaffold — logic migration: TODO) + +## What this ring does (target) + +Owns dispatch logic for trios-claude 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-claude/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-claude-cl02 +cargo test -p trios-claude-cl02 +``` diff --git a/crates/trios-claude/rings/CL-02/Cargo.toml b/crates/trios-claude/rings/CL-02/Cargo.toml new file mode 100644 index 0000000000..432c221905 --- /dev/null +++ b/crates/trios-claude/rings/CL-02/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "trios-claude-cl02" +version = "0.1.0" +edition = "2021" +authors = ["Dmitrii Vasilev"] +license = "MIT" +description = "CL-02 — dispatch (scaffold for trios-claude, issue #238)" +publish = false + +[dependencies] diff --git a/crates/trios-claude/rings/CL-02/README.md b/crates/trios-claude/rings/CL-02/README.md new file mode 100644 index 0000000000..32ac806ce2 --- /dev/null +++ b/crates/trios-claude/rings/CL-02/README.md @@ -0,0 +1,16 @@ +# CL-02 — dispatch + +Ring scaffold for **trios-claude** (issue #238). + +- Package: `trios-claude-cl02` +- Status: Scaffolded +- Logic migration: TODO + +## Build + +```bash +cargo check -p trios-claude-cl02 +cargo test -p trios-claude-cl02 +``` + +Anchor: `phi^2 + phi^-2 = 3` diff --git a/crates/trios-claude/rings/CL-02/TASK.md b/crates/trios-claude/rings/CL-02/TASK.md new file mode 100644 index 0000000000..95841ab218 --- /dev/null +++ b/crates/trios-claude/rings/CL-02/TASK.md @@ -0,0 +1,17 @@ +# TASK — CL-02 (trios-claude) + +## Status: Scaffolded (logic migration: TODO) + +## Completed + +- [x] Ring directory created +- [x] `Cargo.toml` registered as workspace member +- [x] Stub `Cl02Scope` / assembly type with metadata constants +- [x] At least one passing unit test + +## Open + +- [ ] Migrate dispatch logic from `crates/trios-claude/src/` into this ring +- [ ] Define public API surface for CL-02 +- [ ] Add integration tests covering migrated behavior +- [ ] Update `crates/trios-claude/src/lib.rs` to re-export from this ring diff --git a/crates/trios-claude/rings/CL-02/src/lib.rs b/crates/trios-claude/rings/CL-02/src/lib.rs new file mode 100644 index 0000000000..b07437d767 --- /dev/null +++ b/crates/trios-claude/rings/CL-02/src/lib.rs @@ -0,0 +1,27 @@ +//! CL-02 — dispatch (scaffold) +//! +//! Scaffold ring for trios-claude (issue #238). Logic migration: TODO. + +/// Marker for CL-02 ring scope (dispatch). +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct Cl02Scope; + +impl Cl02Scope { + pub const RING: &'static str = "CL-02"; + pub const PURPOSE: &'static str = "dispatch"; + + pub fn new() -> Self { + Self + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn scope_metadata() { + assert_eq!(Cl02Scope::RING, "CL-02"); + assert_eq!(Cl02Scope::PURPOSE, "dispatch"); + } +}