From e8736ae9e44516c350c28d6a09372bea474dc21d Mon Sep 17 00:00:00 2001 From: kev <16812845+kevchoi@users.noreply.github.com> Date: Tue, 27 Oct 2026 01:04:54 +0000 Subject: [PATCH 1/4] docs: add Trajectory schema agent guide Co-Authored-By: Claude Opus 5.5 --- crates/lingua/src/universal/AGENTS.md | 3 +++ crates/lingua/src/universal/CLAUDE.md | 1 + 2 files changed, 4 insertions(+) create mode 100644 crates/lingua/src/universal/AGENTS.md create mode 120000 crates/lingua/src/universal/CLAUDE.md diff --git a/crates/lingua/src/universal/AGENTS.md b/crates/lingua/src/universal/AGENTS.md new file mode 100644 index 000000000..b37fc1f44 --- /dev/null +++ b/crates/lingua/src/universal/AGENTS.md @@ -0,0 +1,3 @@ +# Trajectory schema + +`trajectory.rs` defines the `Trajectory` that the Braintrust UI renders. Add a field only when the UI or a scorer reads it and the trace records it. Leave out what the trace doesn't record instead of inferring it. diff --git a/crates/lingua/src/universal/CLAUDE.md b/crates/lingua/src/universal/CLAUDE.md new file mode 120000 index 000000000..47dc3e3d8 --- /dev/null +++ b/crates/lingua/src/universal/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 31a6ddc4f568eb8c7ca9ecb55c3fcba74a017a48 Mon Sep 17 00:00:00 2001 From: kev <16812845+kevchoi@users.noreply.github.com> Date: Tue, 27 Oct 2026 01:09:45 +0000 Subject: [PATCH 2/4] docs: move Trajectory schema rules to root guide Link CLAUDE.md to AGENTS.md so Claude Code loads the root guide. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 7 +++++++ crates/lingua/src/universal/CLAUDE.md => CLAUDE.md | 0 crates/lingua/src/universal/AGENTS.md | 3 --- 3 files changed, 7 insertions(+), 3 deletions(-) rename crates/lingua/src/universal/CLAUDE.md => CLAUDE.md (100%) delete mode 100644 crates/lingua/src/universal/AGENTS.md diff --git a/AGENTS.md b/AGENTS.md index eb0d392ae..a6e267609 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -66,6 +66,13 @@ Each provider should have: - Do not add universal variants solely to make provider-specific operational state appear transformable. - Treat coverage reports as diagnostics, not a mandate for 100% cross-provider conversion. A correctly classified unsupported mapping is preferable to a higher coverage score obtained through semantic loss. +## Trajectory schema + +`crates/lingua/src/universal/trajectory.rs` defines the `Trajectory` that the Braintrust UI renders, and `crates/lingua/src/processing/` builds it from traces. + +- Add a field only when the UI or a scorer reads it and the trace records it. +- Leave out what the trace doesn't record instead of inferring it. + ## Type generation workflow 1. **Check for SDK updates** in provider test directories diff --git a/crates/lingua/src/universal/CLAUDE.md b/CLAUDE.md similarity index 100% rename from crates/lingua/src/universal/CLAUDE.md rename to CLAUDE.md diff --git a/crates/lingua/src/universal/AGENTS.md b/crates/lingua/src/universal/AGENTS.md deleted file mode 100644 index b37fc1f44..000000000 --- a/crates/lingua/src/universal/AGENTS.md +++ /dev/null @@ -1,3 +0,0 @@ -# Trajectory schema - -`trajectory.rs` defines the `Trajectory` that the Braintrust UI renders. Add a field only when the UI or a scorer reads it and the trace records it. Leave out what the trace doesn't record instead of inferring it. From 474f6e6ccfa79d5d47f00244c2746df6de84ad9b Mon Sep 17 00:00:00 2001 From: kev <16812845+kevchoi@users.noreply.github.com> Date: Tue, 27 Oct 2026 01:13:02 +0000 Subject: [PATCH 3/4] docs: consolidate Trajectory schema rules Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a6e267609..c3c728049 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -68,10 +68,7 @@ Each provider should have: ## Trajectory schema -`crates/lingua/src/universal/trajectory.rs` defines the `Trajectory` that the Braintrust UI renders, and `crates/lingua/src/processing/` builds it from traces. - -- Add a field only when the UI or a scorer reads it and the trace records it. -- Leave out what the trace doesn't record instead of inferring it. +`Trajectory` (`crates/lingua/src/universal/trajectory.rs`) is primarily for the Braintrust UI to render. Add only fields the UI needs and the trace records, shaped so the UI can render them without interpreting source data. ## Type generation workflow From 39a6d07ecbd75d30351bb31cd2be1911f854583f Mon Sep 17 00:00:00 2001 From: kev <16812845+kevchoi@users.noreply.github.com> Date: Tue, 27 Oct 2026 01:13:46 +0000 Subject: [PATCH 4/4] docs: list Trajectory schema rules as bullets Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c3c728049..1f27d869b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -68,7 +68,9 @@ Each provider should have: ## Trajectory schema -`Trajectory` (`crates/lingua/src/universal/trajectory.rs`) is primarily for the Braintrust UI to render. Add only fields the UI needs and the trace records, shaped so the UI can render them without interpreting source data. +- `Trajectory` (`crates/lingua/src/universal/trajectory.rs`) is primarily for the Braintrust UI to render. +- Add only fields the UI needs and the trace records. +- Shape fields so the UI renders them without interpreting source data. ## Type generation workflow