Skip to content

One catalogue of operations for the library, the terminal and the MCP #1684

Description

@Rafael-SOWNet

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.

🤖 Generated with Claude Code

Activity

  1. added this to the 2.7.0 milestone on Oct 2, 2026
  2. Rafael-SOWNet commented on Oct 22, 2026

    @Rafael-SOWNet
    MemberAuthor

    A plan, before code

    What exists today:

    • 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.

    1. 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.

    2. One registry. It lists every transformation and query by name.

    3. 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.

    4. 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:

    • Where the registry lives: beside Transformation in AngouriMath.Core.Transformations, or in a namespace of its own.
    • Whether Query is public API in 2.7.0, or internal until v3.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions