You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
One catalogue of operations for the library, the terminal and the MCP #1684
Part of #746: v8.0's tool interface, and v9.0's terminal. From #1649.
Simplify, Expand, Factorize, Differentiate, Integrate and Limit on Entity are already adapters over the transformation catalogue in Core/Transformations/Transformation.Catalogue.cs. Nothing else the terminal or the MCP offers is in it, and the three surfaces are kept in step by hand.
Proposal: one catalogue with two kinds of entry.
Transformations, as now: Entity → Entity, each carrying its claim (Equivalence or Derivation).
Queries: Entity → a set, a number, text or a table. Solving, evaluation, LaTeX, a series and a truth table are queries.
Each entry carries its name, its arguments and a one-line description.
The Entity methods stay the C# API, as thin adapters over the catalogue.
amcli's one-shot commands and the MCP's tools are generated from the catalogue, or checked against it by a test. An operation added to the library then reaches all three, or the build fails.
The change is additive, so it does not wait for v3. Renaming amcli's commands is item 16 of #1019, and the catalogue would use the names that item settles.
The catalogue.Transformation.Catalogue.cs holds about twenty Entity -> Entity transformations, each with its claim. Simplify, Expand, Factorize, Differentiate, Integrate and Limit already go through it.
The terminal.amcli has eight one-shot commands in OneShot.fs: eval simp fsimp diff solve sub latex info.
The MCP server.Tools.cs has 23 tools, each with a routing description and guards of its own.
The proposal. It is additive.
Queries. A Query sits beside Transformation: Entity -> a set, a number, text or a table. It has a name, typed arguments and a one-line description. Solving, numerical evaluation, LaTeX, SymPy code, the truth table, the domain and the series become queries.
One registry. It lists every transformation and query by name.
A test, not generation. The MCP descriptions are routing prompts, and its tools add guards, budgets and formatting that the library should not own. So both surfaces stay hand-written, and a test checks them against the registry:
every terminal command and MCP tool names an entry, or is on a short list of surface-only tools such as am_check_steps;
every entry is reachable from both surfaces, or is on a library-only list.
An entry added to the library then fails the build until a surface takes it or a list says why not.
The catalogue has a namespace of its own, AngouriMath.Core.Operations. Transformation and its factories stay where they are, since moving them would break callers.
The MCP server gets its computations from the catalogue's entries instead of calling the library's methods itself. Its descriptions, guards and formatting stay its own, as planned.
Since the catalogue is internal and the library is strong-named, the MCP assembly is signed with the library's key and named in its InternalsVisibleTo, as the unit tests already are. It ships inside amcli with the library it was built against.
Names follow #1019 item 16's v3 column (evaluate, simplify, normalize, differentiate, substitute, …). That item then renames amcli's commands and leaves the catalogue alone.
Two PRs: the catalogue with its tests, then the MCP on it with the test that checks both surfaces against it.
A catalogue of the library's operations, by name #2121, the catalogue:Core/Operations/Catalogue.cs lists 33 operations by name, internal, in AngouriMath.Core.Operations. Each entry answers exactly what the method it names answers. Its test places every factory of Transformation as an entry or as a building block with its reason, so a new factory fails the build until it is placed.
The MCP server's tools answer from the catalogue of operations #2122, the MCP: the server's tools answer from the catalogue's entries, with no answer changed. Tools.Offers, OwnComputations and NotOffered are checked against the tools and the catalogue, so a new entry fails the build until a tool offers it or NotOffered says why none does. amcli's one-shot commands get the same check, with the commands still calling the library directly.
Activity
Rafael-SOWNet commentedon Oct 22, 2026
A plan, before code
What exists today:
Transformation.Catalogue.csholds about twentyEntity -> Entitytransformations, each with its claim.Simplify,Expand,Factorize,Differentiate,IntegrateandLimitalready go through it.amclihas eight one-shot commands inOneShot.fs:eval simp fsimp diff solve sub latex info.Tools.cshas 23 tools, each with a routing description and guards of its own.The proposal. It is additive.
Queries. A
Querysits besideTransformation:Entity ->a set, a number, text or a table. It has a name, typed arguments and a one-line description. Solving, numerical evaluation, LaTeX, SymPy code, the truth table, the domain and the series become queries.One registry. It lists every transformation and query by name.
A test, not generation. The MCP descriptions are routing prompts, and its tools add guards, budgets and formatting that the library should not own. So both surfaces stay hand-written, and a test checks them against the registry:
am_check_steps;An entry added to the library then fails the build until a surface takes it or a list says why not.
Names. The test reads the entries' names, so it does not wait on Pending breakages: changes agreed or arguable that cannot ship before a major version #1019 item 16. That renaming changes one table when it comes.
Two questions for you:
TransformationinAngouriMath.Core.Transformations, or in a namespace of its own.Queryis public API in 2.7.0, or internal until v3.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet commentedon Oct 25, 2026
Decided:
Querystays internal until v3.AngouriMath.Core.Operations.Transformationand its factories stay where they are, since moving them would break callers.Since the catalogue is internal and the library is strong-named, the MCP assembly is signed with the library's key and named in its
InternalsVisibleTo, as the unit tests already are. It ships insideamcliwith the library it was built against.Names follow #1019 item 16's v3 column (
evaluate,simplify,normalize,differentiate,substitute, …). That item then renamesamcli's commands and leaves the catalogue alone.Two PRs: the catalogue with its tests, then the MCP on it with the test that checks both surfaces against it.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
A catalogue of the library's operations, by name (#2121)
The MCP server's tools answer from the catalogue of operations (#2122)
Rafael-SOWNet commentedon Oct 25, 2026
Done in #2121 and #2122.
Core/Operations/Catalogue.cslists 33 operations by name, internal, inAngouriMath.Core.Operations. Each entry answers exactly what the method it names answers. Its test places every factory ofTransformationas an entry or as a building block with its reason, so a new factory fails the build until it is placed.Tools.Offers,OwnComputationsandNotOfferedare checked against the tools and the catalogue, so a new entry fails the build until a tool offers it orNotOfferedsays why none does.amcli's one-shot commands get the same check, with the commands still calling the library directly.Two things left to other issues:
amcliadds, and what they are named, is Pending breakages: changes agreed or arguable that cannot ship before a major version #1019 item 16.normalizethere meansInnerSimplified, whileTransformation.Normalizationis the canonical order followed byInnerSimplification, so item 16 may want another word forfsimp.Queryand the catalogue become public is v3's question, as decided above.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura