Skip to content

Commit cfcb2d3

Browse files
author
Grace Lee Rui Yue
committed
Merge remote-tracking branch 'origin/main' into HEAD
2 parents f63373e + f491a3f commit cfcb2d3

119 files changed

Lines changed: 4581 additions & 4020 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/jacobian-math/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Keep decomposition and routing decisions agent-owned; composing already-known
2222
supporting operations remains allowed when clearer.
2323
Do not call Jacobian for definitions, formatting, or non-execution tasks.
2424
25-
No discovery for stable producers: `{"capability_id":"<id>","input":<JSON>}`.
25+
No discovery for stable producers: `{"capability_id":"<id>","payload":<JSON>}`.
2626
Payloads:
2727
2828
- `integer.compute.gcd`, `integer.compute.lcm`, or `integer.compute.extended_gcd`:

.github/ci-impact.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@
5757
"providers": [
5858
"cvc5",
5959
"external_sat",
60-
"flint",
61-
"graph",
62-
"sympy"
60+
"flint"
6361
]
6462
},
6563
"lean": {
@@ -663,9 +661,7 @@
663661
"patterns": [
664662
"tests/boundary/providers/cvc5/**",
665663
"tests/boundary/providers/external_sat/**",
666-
"tests/boundary/providers/flint/**",
667-
"tests/boundary/providers/graph/**",
668-
"tests/boundary/providers/sympy/**"
664+
"tests/boundary/providers/flint/**"
669665
],
670666
"suites": [
671667
"provider",

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ representations differ. Cover producer-to-consumer compatibility and canonical
7676
or backend-native round trips in tests. Architecture checks must reject internal
7777
JSON round-trips and unsafe canonical conversions.
7878

79+
Shared Pydantic mathematical contracts own provider-independent value identity.
80+
Domain-owned conversions connect them to backend-native computational values,
81+
and typed kernels sit below both capability operations and `jacobian.math`. Do
82+
not add a universal backend wrapper, automatic coercion framework, generic
83+
conversion language, or second semantic type system above maintained libraries.
84+
7985
Canonical decimal strings are wire and persistence values, not computational
8086
values. Use the canonical conversion API before calling backends or constructing
8187
results. Do not directly apply `int()` or `str()` to canonical components or

docs/explanation/architecture.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,46 @@ verification obligations remain visible; artifacts are materialized only when
256256
durable identity, independent retrieval, replay, resumability, evidence
257257
binding, or size-separated transport requires them.
258258

259+
### Mathematical value and backend layers
260+
261+
Shared Pydantic mathematical contracts own provider-independent value identity:
262+
the exact parent or coefficient domain, axes, basis, ordering, canonical
263+
representation, and other facts that change mathematical interpretation.
264+
Backend-native objects are computational representations of those values, not
265+
composition, wire, or persistence identities.
266+
267+
```text
268+
jacobian.contracts
269+
shared mathematical values
270+
271+
272+
jacobian.domains.<domain>
273+
explicit contract ↔ backend conversions
274+
typed mathematical kernels
275+
276+
┌─────┴──────────────┐
277+
▼ ▼
278+
jacobian.math operation declarations
279+
native facade │
280+
281+
math.find / math.run
282+
```
283+
284+
Conversions between a shared contract and SymPy, FLINT, NetworkX, or another
285+
maintained backend are explicit and domain-owned. The native API and catalog
286+
operations call the same typed kernels; neither calls through the other.
287+
Provider selection, invocation provenance, persistence, MCP transport, and
288+
checker assurance remain outside the mathematical value. A change of backend
289+
therefore does not change value identity unless it also changes mathematical
290+
meaning or canonicalization.
291+
292+
This is a dependency direction, not a universal algebra framework. Jacobian
293+
does not add a second semantic type system, unrestricted backend wrapper,
294+
automatic coercion graph, or generic conversion language above its maintained
295+
libraries. Mathematical transformations such as basis change, restriction of
296+
scalars, quotient reduction, and nontrivial reindexing remain explicit
297+
domain-owned operations.
298+
259299
### Domain operation library
260300

261301
Built-in mathematical producers live in explicit domain packages. A package

docs/explanation/product-blueprint.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ checker tools → optional independent check of specific claims
114114
Shared mathematical objects (matrices, polynomials, graphs, …) are canonical
115115
values. Object validity is not a promise that every tool will accept them under
116116
every budget. Small results stay inline; do not materialize only to pass
117-
between ordinary tools.
117+
between ordinary tools. Their mathematical identity is independent of the
118+
operation or backend that produced them, the invocation record, and whether
119+
the value travels inline, through a request-local reference, or as a durable
120+
artifact.
118121

119122
“Investigate this conjecture” is an **agent workflow** over many tool calls,
120123
not one primitive. Jacobian does not add top-level MCP tools for workflows.

docs/reference/domain-operation-library.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ The installer validates the complete request model before computation. On
6161
success it validates the returned result again and returns it inline as
6262
`COMPLETE · COMPUTED`, without generic input or result artifacts and without an
6363
episode. Neither exact arithmetic nor deterministic execution grants
64-
`VERIFIED`. A reusable mathematical object or evidence-bearing result belongs
65-
in an explicitly artifact-producing capability, not behind a persistence flag
66-
on an ordinary computation.
64+
`VERIFIED`. A bounded reusable mathematical value remains inline. Materialize
65+
it only when durable identity, independent retrieval, replay, resumability,
66+
evidence binding, or size-separated transport is part of the outcome; this is
67+
an explicit capability contract, not a persistence flag on an ordinary
68+
computation.
6769

6870
### Static type contract
6971

@@ -98,14 +100,27 @@ SymPy, or NetworkX values as documented and call typed mathematical kernels
98100
directly. They do not construct the capability runtime or route through
99101
`math.run`.
100102

101-
When a native function corresponds to a capability, both paths share the same
102-
domain-owned mathematical kernel. Explicit adapters translate between native
103-
values and the existing Pydantic request and result contracts. This keeps one
104-
mathematical implementation while preserving capability schemas, completeness,
105-
provenance, verification behavior, and artifact lineage when artifacts are
106-
part of the outcome. Generic
107-
reflection, automatic model generation, and universal value conversion are
108-
outside this library's contract.
103+
Shared Pydantic contracts own provider-independent mathematical value identity
104+
at capability, composition, wire, and persistence boundaries. Backend-native
105+
objects are in-process computational representations. Domain-owned adapters
106+
translate explicitly between the two, and typed kernels sit below both the
107+
native facade and capability operations:
108+
109+
```text
110+
shared Pydantic value
111+
↕ explicit domain-owned conversion
112+
backend-native value
113+
↕ typed mathematical kernel
114+
maintained mathematical backend
115+
```
116+
117+
When a native function corresponds to a capability, both paths share that
118+
kernel; neither invokes the other. This keeps one mathematical implementation
119+
while preserving capability schemas, completeness, provenance, verification
120+
behavior, and artifact lineage where those are part of the operation outcome.
121+
Generic reflection, automatic model generation, universal backend wrappers,
122+
automatic coercion, and a generic conversion framework are outside this
123+
library's contract.
109124

110125
## Bounded searches
111126

docs/reference/python-api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ This API shares typed mathematical kernels with the corresponding capability
3838
implementations, but it is not a facade over `math.run`. Capability
3939
requests, result contracts, artifacts, provenance, completeness, and
4040
verification remain available through the capability runtime and retain their
41-
existing wire semantics.
41+
existing wire semantics. Shared Pydantic contracts, rather than Python,
42+
SymPy, or NetworkX objects, own provider-independent value identity for
43+
capability composition and persistence. Explicit domain-owned conversions
44+
connect those contracts to the backend-native values accepted by this API.

docs/reference/testing-strategy.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,29 @@ Lane identity also appears in Make targets and workflow jobs. Edit
4545

4646
### Hydration ladder
4747

48-
Use the narrowest complete-runtime profile that proves the claim:
48+
Use the narrowest production service graph that proves the claim:
4949

50-
1. `open_domain_services(bundle)` — one named domain bundle (producers only)
50+
1. `open_domain_services(...)` — foundational core/application services,
51+
optionally with explicitly selected domain bundles (producers only)
5152
2. `open_exact_domain_services(bundle)` — one named domain bundle **with** its
5253
exact verification adapters (typed verified-domain seam)
53-
3. `attached_complete_runtime` — complete portfolio, **no** checker authority
54+
3. `open_reference_services(root, *names)` — only the explicitly selected
55+
production reference installations
56+
4. `attached_complete_runtime` — complete portfolio, **no** checker authority
5457
(reference schemas/plugins are available without authorization)
55-
4. `attached_complete_runtime_read_only` — module-shared attached copy for
58+
5. `attached_complete_runtime_read_only` — module-shared attached copy for
5659
non-mutating catalog/discovery inspection (one private template copy per
5760
module; tests must not write artifacts or durable store state)
58-
5. `authorized_complete_runtime` — complete portfolio **with** authorized checkers
59-
6. `authorized_complete_runtime_read_only` — module-shared authorized copy for
61+
6. `authorized_complete_runtime` — complete portfolio **with** authorized checkers
62+
7. `authorized_complete_runtime_read_only` — module-shared authorized copy for
6063
non-mutating authorized catalog inspection
61-
7. `fresh_complete_runtime` — empty-root install / lifecycle ownership only
64+
8. `fresh_complete_runtime` — empty-root install / lifecycle ownership only
65+
66+
When a focused capability is installed by a production installer rather than a
67+
`DomainBundle`, open `open_domain_services(...)` and run that installer plus its
68+
adapter registrations inside one `atomic_installation(...)` block. Preserve the
69+
production checker-authority decision in that graph. Do not reproduce portfolio
70+
installation policy in a test helper merely to avoid the complete runtime.
6271

6372
Prefer `attached_*` over `fresh_*` whenever a private template copy isolates the
6473
mutation; reserve `fresh_*` for empty-root install and lifecycle ownership.

npm/skills/jacobian-math/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Keep decomposition and routing decisions agent-owned; composing already-known
2222
supporting operations remains allowed when clearer.
2323
Do not call Jacobian for definitions, formatting, or non-execution tasks.
2424
25-
No discovery for stable producers: `{"capability_id":"<id>","input":<JSON>}`.
25+
No discovery for stable producers: `{"capability_id":"<id>","payload":<JSON>}`.
2626
Payloads:
2727
2828
- `integer.compute.gcd`, `integer.compute.lcm`, or `integer.compute.extended_gcd`:

src/jacobian/domains/arithmetic/rationals.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,12 @@
250250
"predicate",
251251
invocation_examples=(
252252
example(
253-
"equal_two_fourths_one_half",
254-
"Check equality of two equivalent rationals.",
255-
{"left": {"num": "2", "den": "4"}, "right": {"num": "1", "den": "2"}},
253+
"equal_negative_one_half_negative_one_half",
254+
"Check equality of two reduced equivalent rationals.",
255+
{
256+
"left": {"num": "-1", "den": "2"},
257+
"right": {"num": "-1", "den": "2"},
258+
},
256259
),
257260
),
258261
),

0 commit comments

Comments
 (0)