topos.mcp.tools.preferences

topos_preference_walk — convert a strict generator ordering into a concrete relaxation walk on Ω.

This tool is the agent’s explicit handle on the preference machinery: given a ranking (and optionally a current verdict), it returns the descending preference-ordered sequence of lattice verdicts to aim for, annotated with the satisfied-generator sets so the agent can see at a glance what changing to each step requires.

Purely a computation — no source code, no I/O. Cheap to call before every refactor iteration to refresh the agent’s next goal.

topos.mcp.tools.preferences.topos_preference_walk(params)[source]

Convert a generator ranking into a concrete relaxation walk on Ω.

The walk is the descending preference-ordered list of Ω verdicts starting at the aspirational target (default: IDEAL) down to (but not including) the current verdict. By convention the second element of the walk is the fallback_target — the meet of the top-two ranked generators (the “ideal intersection”), which is the natural divert-point when IDEAL plateaus.

Each step is annotated with the satisfied-generator set, so the agent can see what changing to that verdict requires (e.g. “next step adds COMPOSABLE”).

No source code is required — this is purely a computation over the preference ordering. Call it between refactor iterations to refresh the agent’s concrete next goal.

topos.mcp.tools.preferences.render_preference_walk_md(r)[source]

Markdown rendering of a preference-walk result for agent UIs.