Skip to content

Commit 28a50cc

Browse files
committed
docs(agents): define mathematical interoperability rules
1 parent e260b53 commit 28a50cc

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ backend-native values and call typed mathematical kernels directly; they must
7878
not invoke `math.run`, construct a capability runtime, or expose MCP,
7979
artifact, provider-loading, or installation objects.
8080

81+
### Mathematical interoperability
82+
83+
Capabilities interoperate through shared, typed domain values and artifacts—not
84+
backend-specific objects, JSON round-trips, or wire encodings. Reuse existing
85+
contract models and typed kernels; add explicit domain-owned conversions when
86+
representations differ. Cover producer-to-consumer compatibility and canonical
87+
or backend-native round trips in tests. Architecture checks must reject internal
88+
JSON round-trips and unsafe canonical conversions.
89+
90+
Canonical decimal strings are wire and persistence values, not computational
91+
values. Use the canonical conversion API before calling backends or constructing
92+
results. Do not directly apply `int()` or `str()` to canonical components or
93+
change `sys.set_int_max_str_digits()` as a workaround. Keep backend coercion in
94+
thin adapters, and test above 4,300 digits whenever the contract permits it.
95+
8196
Keep Pydantic models authoritative at capability, persistence, artifact, and
8297
wire boundaries. Domain implementations and operation factories must preserve
8398
their concrete request, result, and obligation types: do not accept

0 commit comments

Comments
 (0)