feat: apply wise-mcp improvements — constrained inputs, recovery errors, next-action hints, GUI URLs, tool tags, typed config#198
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile SummaryImplements 9 wise-mcp improvements to enhance agent experience: constrained inputs via Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Tool Handler Called] --> B{Try Tool Operation}
B -->|Success| C[Populate next_steps hints]
C --> D[Return Result with guidance]
B -->|Exception| E[_recovery_error classifier]
E --> F{Error Type?}
F -->|GhNotFoundError| G[Auth error: Install gh CLI]
F -->|GhNotAuthenticatedError| H[Auth error: Run gh auth login]
F -->|Rate limit/403| I[Wait 60s and retry]
F -->|Not found/404| J[Check PR/repo exists]
F -->|Workspace error| K[Set CRB_WORKSPACE or pass repo]
F -->|GraphQL error| L[Retry once - transient issue]
F -->|Config blocked| M[Call show_config to inspect]
F -->|Generic| N[Generic fallback with hints]
G --> O[Return error with recovery steps]
H --> O
I --> O
J --> O
K --> O
L --> O
M --> O
N --> O
Last reviewed commit: edc542e |
ed82ff0 to
479d231
Compare
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/codereviewbuddy/tools/stack.py
Line: 562
Comment:
incorrect exception syntax — multiple exception types must be wrapped in parentheses
```suggestion
except (ValueError, AttributeError):
```
How can I resolve this? If you propose a fix, please make it concise. |
|
The The confidence score should not be impacted by this. All other observations in the review are accurate. |
Merge activity
|
… stable, agent experience features
479d231 to
edc542e
Compare

Description
Aligns the codereviewbuddy MCP server with wise-mcp skill best practices and Arcade's 52 agentic tool design patterns. Implements all 9 improvements from the audit plan.
Changes by improvement
#1 Constrained inputs —
statusparameters useLiteral["resolved", "unresolved"],TriageItem.severityusesLiteral["bug", "flagged", "warning", "info"],actionusesLiteral["fix", "reply", "create_issue"],limitonlist_recent_unresolvedusesAnnotated[int, Field(ge=1, le=50)].#2 Recovery-guided errors — new
_recovery_error()helper inserver.pyclassifies exceptions (auth, rate limit, not found, workspace, GraphQL, config) and returns actionable recovery hints. All 13 tool handlers updated.#3 Next-action hints —
next_steps: list[str]added toTriageResult,ResolveStaleResult,StackReviewStatusResult,CIDiagnosisResult. Populated contextually (e.g. "Fix the 2 bug/flagged items first").#4 Async-wrap diagnose_ci —
diagnose_cicall wrapped incall_sync_fn_in_threadpool()to avoid blocking the event loop.#5 GUI URLs —
comment_urladded toTriageItem,urladded toReviewComment. GraphQL query updated to fetch comment URLs.#6 Typed config response —
ConfigInfonow includes anexplanationfield with a human-readable summary of active configuration highlights.#7 Tool classification tags — all 13 tools tagged
query,command, ordiscoveryvia@mcp.tool(tags={...}).#8 Empty result messages —
messagefield added to result models. Populated when results are empty (e.g. "No actionable threads — all threads have owner replies or are resolved.").#9 Limit parameter bounds —
list_recent_unresolvedlimit usesAnnotated[int, Field(ge=1, le=50)]so the JSON Schema communicates bounds.Also includes
_recovery_errorcovering all classification branchesChecklist
poe checkpassesRelated Issues
Closes #136 (PEP 758 false positive acknowledged in plan)