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
refactor: guard that every MCP tool the platform prompt names is a published tool #4486
The platform prompt (src/backend/services/platform_prompt_service.py) teaches agents MCP tool names on every turn. Nothing checks that those names still exist: only the delegation contract is pinned against the real tool surface (tests/unit/test_ent568_delegation_contract.py). A tool renamed or removed while another section still names it fails silently — the agent calls a name that is not there.
Context
The prompt is updated ad hoc by whichever feature PR touches it. Individual sections have guard tests (report display hints, canvas kinds, the operator-ask contract), but there is no general check and no review step that asks "does the agent need to be told about this change?". All names are valid today; this is a guard against drift, not a fix for a live defect.
Acceptance Criteria
A unit test fails when any mcp__trinity__<name> in the prompt module is not a tool the MCP server publishes
The same test fails when a bare backticked tool name in the rendered platform instructions (e.g. ask_operator) stops being a published tool, at every prompt tier
Non-tool tokens (arguments, statuses, field names) are listed explicitly, and a stale entry in that list fails
The PR review checklist asks, for a PR that changes an agent-facing tool or behaviour, whether the platform prompt was updated or deliberately left
Technical Notes
Tool names are read from src/mcp-server/src/**/*.ts the way test_ent568_delegation_contract.py::_tool_blocks does.
Activity
test: every MCP tool the platform prompt names is a published tool (#…
test: every MCP tool the platform prompt names is a published tool (#…