Phase 09 — compare_versions(symbol, v1, v2)
Status: Backlog (post-v0.1.5)
Type: New MCP tool
Goal
Add an MCP tool compare_versions(symbol, v1, v2) that returns a structured diff of a stdlib symbol's signature, behavior, and docstring between two Python versions.
Depends on
- v0.1.5 ships (PyPI debut + repo rename complete).
- Index supports the two versions being compared (handled by
build-index).
Requirements
- CMPR-01: Tool accepts
(symbol: str, v1: str, v2: str). Returns a structured diff: signature change, docstring delta, deprecation flag, see-also additions/removals.
- CMPR-02: Both versions must already be indexed; if not, tool returns an actionable error pointing at
build-index.
- CMPR-03: Diff format is JSON-serializable and token-frugal — no full re-printing of unchanged paragraphs.
Success criteria
compare_versions("asyncio.TaskGroup", "3.10", "3.11") returns a clear, machine-readable diff showing the symbol was newly introduced in 3.11 (e.g. an added or new_in marker, not just a delta of existing fields).
- Comparing identical versions returns an empty diff with an explicit "no change" marker.
- Missing-version cases return an actionable error with the indexed-version list.
- Token cost of a typical diff is under 300 tokens (vs ~1500 for fetching both full doc pages).
- Integration test in
tests/test_compare_versions.py exercises 3 representative symbols (one changed, one unchanged, one missing).
Plans
TBD — run /gsd-plan-phase 09 after this issue is prioritized.
UI hint
No UI surface; pure MCP tool.
Out of scope
- Cross-language diffs (Python stdlib only).
- Non-symbol diffs (module-level changes belong in phase 10).
Phase 09 — compare_versions(symbol, v1, v2)
Status: Backlog (post-v0.1.5)
Type: New MCP tool
Goal
Add an MCP tool
compare_versions(symbol, v1, v2)that returns a structured diff of a stdlib symbol's signature, behavior, and docstring between two Python versions.Depends on
build-index).Requirements
(symbol: str, v1: str, v2: str). Returns a structured diff: signature change, docstring delta, deprecation flag, see-also additions/removals.build-index.Success criteria
compare_versions("asyncio.TaskGroup", "3.10", "3.11")returns a clear, machine-readable diff showing the symbol was newly introduced in 3.11 (e.g. anaddedornew_inmarker, not just a delta of existing fields).tests/test_compare_versions.pyexercises 3 representative symbols (one changed, one unchanged, one missing).Plans
TBD — run
/gsd-plan-phase 09after this issue is prioritized.UI hint
No UI surface; pure MCP tool.
Out of scope