Skip to content

docs(openspec): plan #2743 fix MCP ai_benchmark models description - #3164

Merged
dan-petty merged 3 commits into
mainfrom
fix/2743-the-mcp-ai-benchmark-schema-shows
Nov 2, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/2743-the-mcp-ai-benchmark-schema-shows

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Plans #2743

The MCP tool ai_benchmark shows the help text of --models as the description of its models parameter. That text gives a model@url example, which the tool has refused since #2638. This plan gives the tool its own description with plain model names. A table of parameter descriptions in the MCP generator holds it. The command help keeps model@url. Tests read the published schema and the command help. The tool reference is regenerated.

Change: openspec/changes/2743-the-mcp-ai-benchmark-schema-shows/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 2, 2026 06:04

Copy link
Copy Markdown
Owner

Review of the plan for #2743.

CI: all 18 checks pass or skip; the PR is open (not a draft) and its base 11dc3472 is behind main. Premise: holds (the text shows in docs/MCP_TOOLS.md:186+ and in HELP.benchmark.models, src/devops_cli/lang/en/help.py:1955), but the plan names the wrong file for the fix.

  1. src/devops_cli/commands/ai.py holds no ai_benchmark registration. It only mounts benchmark_app (line 110). The MCP tool is generated from the Click command: _build_parameter_field in src/devops_cli/ai/mcp/generator.py:167-169 sets description=_clean_text(param.help), and the help of --models is HELP.benchmark.models at src/devops_cli/commands/benchmark.py:118. The allow-list for the tool is _COMMAND_SPECS-style data at generator.py:54. So "Make the ai_benchmark registration publish that string in place of HELP.benchmark.models" (proposal, design, task 1.2) has no seam to edit. Fix: name the real mechanism in design.md, for example a per-parameter description override table in generator.py keyed by ("ai", "benchmark", "models"), and change Impact, Reads and Changes to src/devops_cli/ai/mcp/generator.py (and the constant's owner). Re-check the rejected alternatives with this mechanism: the issue rejected a second help-catalog field and string stripping, not an override in the generator.
  2. The test goes in the wrong place. The plan creates tests/test_mcp_ai_benchmark_schema.py. A test that builds the MCP server and reads the ai_benchmark input schema already exists in tests/ai/mcp/test_ai_benchmark_mcp_tool.py (test_the_tool_publishes_no_servers_and_no_path_parameter, uses Client(mcp).list_tools()). The tests of MCP tools sit under tests/ai/mcp/. Fix: add the new test to that file, or create it in tests/ai/mcp/. Not verified: whether tests/invariants enforces the mirror layout (see test(cli): tests double only process edges and mirror the source tree #1307).
  3. docs/MCP_TOOLS.md is generated (src/devops_cli/docs/generator.py:1345, render_mcp_tools_markdown). Task 1.2 says to hand-edit the models row, and 1.3 then regenerates. Fix: drop the hand edit; the regeneration in 1.3 writes the row. Say so in "What Changes".
  4. Feasibility has no evidence. Its bullets restate the issue ("The issue states that..."), and the "First checks" are commands that were not run. Rule 2 asks for a confirmation against the real system. Fix: quote the output of git grep -n "models" origin/main -- src/devops_cli/ai/mcp/generator.py and the description in an export of the schema (uv run devops mcp export-schemas --output-dir <dir>; the command exists, src/devops_cli/commands/mcp.py:124), with the version.
  5. Spec delta: the second requirement ("CLI ai benchmark models help keeps model@url") describes behavior that does not change, so it is a guard, not a change; that is fine as ADDED, but the first requirement's scenario 2 (no sentence about api_base_url, gateway_url or a provider key) must be asserted by the test in task 1.2. The task text only says "no model@url form and no key or server rule". Fix: make the test check the three words named in the scenario, and add a check that HELP.benchmark.models still holds model@url (the second requirement has no test task).
  6. Task 1.1 and 1.2: 1.1 is a bare filename plus a verify clause, and 1.2 holds the real test text ("Write a failing test..."). Fix: put the test description in 1.1.
  7. Cost line: "2,000 tokens to build, 500 a year to keep" mixes units (a year); rule 3 asks for tokens to build, keep and fix, and elapsed time. "Under one hour" is acceptable. The tuicr bullet is allowed by openspec/config.yaml.

Related issues: #1330 (MCP tests move to edge fakes; open, same test directory); #1307 (tests mirror the source tree; open).

Verdict: hold until the plan names the real code path (finding 1) and moves the test (finding 2). The remaining findings are small.


Generated by Claude Code

The plan named src/devops_cli/commands/ai.py, which holds no ai_benchmark
registration. The MCP description comes from _build_parameter_field in
src/devops_cli/ai/mcp/generator.py. The plan now sets the description there,
from a table keyed by command path and parameter name, and holds the text in
HELP.mcp. The tests move to tests/ai/mcp/test_ai_benchmark_mcp_tool.py. The
tool reference is regenerated, not edited by hand. Feasibility quotes the
commands that were run, with their output.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty
dan-petty merged commit 2d8fdc1 into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/2743-the-mcp-ai-benchmark-schema-shows branch November 2, 2026 17:11
dan-petty added a commit that referenced this pull request Nov 12, 2026
The stage writer gave a `manifest` group the tasks of a `behavior` group
and wrote no `Kind:` line (#3981). The reader read it as `behavior`, and
the #3035 rule refused each such group with no path under `src/`, so
#4963 and #5032 could not be read.

- The writer writes `Kind: <kind>. Reads: ... Changes: ...` for each
group.
- The reader reads the kind from that line. A group of the old form (no
line, or a word that is no kind) gets its kind from its tasks:
`behavior` with a path under `src/`, else `manifest`, or `other`.
- The reader reads `## Unchanged references`, and drops only the last
fits-one-PR line.
- `FIELDS_NOT_IN_FILES` and `file_facts` state what a round trip keeps.
Hypothesis tests hold it.

The issue asks for an error on a word that is no kind. #3164 holds
`Kind: documentation.` and reads on the base, so the reader keeps the
inference for that word.

Closes #5205

Change:
`openspec/changes/archive/2026-11-12-5205-write-and-read-the-kind-of/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants