Skip to content

fix(mcp): diagnose recommendations name tools, not CLI verbs - #1312

Merged
Birfy merged 1 commit into
mainfrom
fix/1311-mcp-diagnose-recommendations
Nov 29, 2026
Merged

Birfy merged 1 commit into
mainfrom
fix/1311-mcp-diagnose-recommendations

Conversation

@Birfy

@Birfy Birfy commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Closes #1311

Base: c5de234
Tip SHA: 788ca42

What changed

On tip c5de2343 (after #1310), MCP demo / plan / algorithm_spec already rewrite host-facing next into Path A tool language. MCP diagnose still returned the shared diagnose_payload recommendations untouched, so a host was told to run CLI verbs it may not have, including agentdescent watch though Path A has no watch tool.

A solved MCP diagnose now returns:

review the diff: call show with this run_id
preview the write: call apply with this run_id and dry_run=true, then call apply without dry_run

A still-running run is followed with status, then diagnose when it ends. Cancelled / run-failed / reflector-error / partial-improvement / unknown / scoring-mismatch recommendations name the matching Path A tools (resume, show, doctor, plan). Verdict, summary, and evidence stay the same. The CLI diagnose / diagnose --json recommendations are unchanged. The diagnose tool description mentions this tool-language recommendations.

changelog.d/1311-mcp-diagnose-recommendations.md.

Verification

Tip SHA: 788ca42

Ran:

  • pytest -q -o addopts='' tests/test_mcp_diagnose.py tests/test_diagnose.py tests/test_mcp.py → 76 passed
  • python -m tools.changelog_fragments check → 61 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix is the line

When MCP diagnose returns recommendations, they now name Path A tools
(show, apply with dry_run=true, resume, status, doctor, plan, diagnose)
instead of the shared CLI verbs. A still-running run is followed with
status, then diagnose when it ends (there is no watch tool). The CLI
diagnose recommendations are unchanged.

Closes #1311
@github-actions github-actions Bot added the risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff label Nov 29, 2026
@Birfy

Birfy commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Review (Birfy)

Tip SHA: 788ca42
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1312 → T2 (package MCP recommendations plus tests and the changelog fragment)
  • pytest -q -o addopts='' tests/test_mcp_diagnose.py tests/test_diagnose.py tests/test_mcp.py at this tip → 76 passed
  • python -m tools.changelog_fragments check → 61 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
    Not run:
  • Full offline suite locally — the CI test matrix on this tip is the line
    Findings:
  • No actionable defects. When MCP diagnose returns recommendations, they now name Path A tools (show, apply with dry_run=true, resume, status, doctor, plan, diagnose), instead of the CLI verbs (agentdescent show, apply --dry-run, watch, doctor). A still-running run is followed with status, then diagnose when it ends. Verdict, summary, and evidence stay the same. The CLI diagnose recommendations are unchanged.
    Verdict: PASS

@Birfy
Birfy enabled auto-merge (squash) November 29, 2026 04:27
@Birfy
Birfy merged commit 5264d34 into main Nov 29, 2026
12 checks passed
@Birfy
Birfy deleted the fix/1311-mcp-diagnose-recommendations branch November 29, 2026 04:48
Birfy added a commit that referenced this pull request Nov 29, 2026
Closes #1313

Base: 5264d34
Tip SHA: 9897444

## What changed

On tip `5264d34b` (after #1312), MCP `demo` / `plan` / `algorithm_spec`
/ `diagnose` already rewrite host-facing `next` and `recommendations`
into Path A tool language. MCP `describe_algorithm` and
`list_algorithms` still returned the shared `Algorithm.describe()` `run`
field untouched, so a host was told to run a CLI recipe it may not have.

MCP `describe_algorithm("gepa")` (and each `list_algorithms` row) now
returns:

```
call algorithm_spec with name=gepa, path=<your-prompt.txt>, cases=<your-cases.jsonl>, and model and base_url (never guess those)
```

`evoskill` and `archive_selection` keep the same path placeholders as
the CLI (`<your-skill-dir`> / `<path>`). Other card fields stay the
same. The CLI `algorithms show` / `algorithms show --json` recipe is
unchanged. The `describe_algorithm` and `list_algorithms` tool
descriptions mention this tool-language `run`.

`changelog.d/1313-mcp-describe-run.md`.

## Verification

Tip SHA: 9897444

Ran:
- `pytest -q -o addopts='' tests/test_mcp_describe_run.py
tests/test_algorithms.py tests/test_mcp.py` → 163 passed
- `python -m tools.changelog_fragments check` → 62 changelog fragment(s)
OK
- `python -m tools.gen_api_docs --check` → docs/api.md is up to date
Not run:
- Full offline suite locally — the CI test matrix is the line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: diagnose recommendations still name CLI show / apply / watch / doctor

1 participant