Add close_issue and reopen_issue MCP tools to issue management server#641
Add close_issue and reopen_issue MCP tools to issue management server#641
Conversation
Complexity AssessmentClassification: SIMPLE Metrics:
Reasoning: Straightforward feature addition following established provider patterns. All modifications are additive (new interface methods, new MCP tools, new CLI allowed-tools entries), isolated to specific locations within large files. Implementation approach is obvious from requirements - each provider gets ~15 LOC close/reopen implementations following existing patterns. No architectural decisions or integration complexity required. |
Combined Analysis & Plan - Issue #640Executive SummaryAdd Implementation OverviewHigh-Level Execution Phases
Quick Stats
Complete Analysis & Implementation Details (click to expand)Research FindingsProblem Space
Codebase Research
Duplication Opportunities
Medium Severity Risks
Implementation PlanAutomated Test Cases to CreateTest File: // Add tests for closeIssue, reopenIssue, editIssue
describe('closeIssue', () => {
it('calls gh issue close with correct args', async () => { /* ... */ })
it('passes --repo when repo is provided', async () => { /* ... */ })
it('throws on invalid issue number', async () => { /* ... */ })
})
describe('reopenIssue', () => {
it('calls gh issue reopen with correct args', async () => { /* ... */ })
})
describe('editIssue', () => {
it('calls gh issue edit with title', async () => { /* ... */ })
it('calls gh issue edit with body', async () => { /* ... */ })
it('calls gh issue edit with labels', async () => { /* ... */ })
it('handles state change via close/reopen', async () => { /* ... */ })
})Test File: describe('closeIssue', () => {
it('calls updateLinearIssueState with Done', async () => { /* ... */ })
})
describe('reopenIssue', () => {
it('calls updateLinearIssueState with appropriate reopen state', async () => { /* ... */ })
})
describe('editIssue', () => {
it('updates title via Linear SDK', async () => { /* ... */ })
it('updates description via Linear SDK', async () => { /* ... */ })
it('handles state change via close/reopen', async () => { /* ... */ })
})Test File: describe('closeIssue', () => {
it('transitions issue to Done state', async () => { /* ... */ })
})
describe('reopenIssue', () => {
it('transitions issue to Reopen state', async () => { /* ... */ })
})
describe('editIssue', () => {
it('updates issue summary via Jira API', async () => { /* ... */ })
it('updates issue description via Jira API', async () => { /* ... */ })
it('handles state change via close/reopen', async () => { /* ... */ })
})Files to Modify1.
|
Implementation CompleteSummaryAdded Changes Made
Validation Results
Code Review Fixes Applied
Test Coverage Details (click to expand)src/mcp/GitHubIssueManagementProvider.test.ts
src/mcp/LinearIssueManagementProvider.test.ts
src/mcp/JiraIssueManagementProvider.test.ts
src/commands/ignite.test.ts
|
63e87f3 to
53f677e
Compare
Add provider-agnostic issue lifecycle tools to the issue management MCP server with implementations across GitHub, Linear, and Jira providers. - Add closeIssue, reopenIssue, editIssue to IssueManagementProvider interface - Implement across all 3 providers (GitHub CLI, Linear SDK, Jira API) - Register close_issue, reopen_issue, edit_issue MCP tools - Add to swarm orchestrator and issue/PR workflow allowed tools - Update swarm orchestrator prompt to close child issues on merge (Step 3.3) - Add comprehensive tests (25 new test cases across 4 test files) Closes #640
53f677e to
190e393
Compare
iloom Session SummaryKey Themes:
Session Details (click to expand)Key Insights
Decisions Made
Challenges Resolved
Lessons Learned
Generated with 🤖❤️ by iloom.ai |
Fixes #640
Add close_issue and reopen_issue MCP tools to issue management server
Context
The swarm orchestrator needs to close child issues after merging their work into the epic branch. Currently there are no
close_issueorreopen_issuetools in the issue management MCP server, so completed issues remain open, cluttering the issue tracker.Summary
Add provider-agnostic
close_issueandreopen_issuetools to the issue management MCP server, with implementations across all providers (GitHub, Linear, Jira).Requirements
IssueTracker interface (
src/lib/IssueTracker.ts)closeIssue(issueId: string | number, repo?: string): Promise<void>reopenIssue(issueId: string | number, repo?: string): Promise<void>Provider implementations
gh issue close <number>/gh issue reopen <number>MCP tools (
src/mcp/issue-management-server.ts)close_issue— Takes{ number: string, repo?: string }, callsissueTracker.closeIssue()reopen_issue— Takes{ number: string, repo?: string }, callsissueTracker.reopenIssue()Allowed tools
mcp__issue_management__close_issueto the swarm orchestrator's allowed tools insrc/commands/ignite.tsOrchestrator prompt (
templates/prompts/swarm-orchestrator-prompt.txt)mcp__issue_management__close_issueAlso fix the orchestrator's broken jq metadata commands
jqcommands targetingiloom-metadata.jsonin the worktree root, which doesn't exist (metadata is stored centrally at~/.config/iloom-ai/looms/)mcp__recap__set_loom_statewithworktreePathparameterTests
closeIssue/reopenIssuein each provider's test fileThis PR was created automatically by iloom.