Context
POST /v1/repos/:owner/:repo/contributor-issue-drafts/generate exists in src/api/routes.ts:2510-2538, gated by requireAppRole(["maintainer","owner","operator"]), delegating to generateContributorIssueDrafts, with an explicit dry-run-by-default safety guard (if (parsed.data.create && parsed.data.dryRun !== false) return c.json({ error: "explicit_create_requires_dry_run_false" }, 400)). No corresponding MCP tool exists anywhere in src/mcp/server.ts (confirmed via grep for contributorIssueDraft/generateContributorIssueDrafts in both src/mcp/server.ts and loopover-mcp.js — zero hits), so this capability is REST/web-dashboard-only.
Requirements
- Add
loopover_generate_contributor_issue_drafts to src/mcp/server.ts's tool registry, requireRepoManageAccess-gated, mirroring the route's dryRun-defaults-true / create semantics exactly — the tool must never silently create issues.
- Add a CLI mirror (e.g.
maintain generate-issue-drafts [--create] --repo owner/repo).
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in the new route/tool/CLI code, plus a test asserting output parity between the mirrored surfaces for identical input.
Expected Outcome
Contributor issue-draft generation is available over MCP/CLI, not just the web dashboard's REST call, without weakening the existing create-safety guard.
Links & Resources
Precedent: loopover_refresh_repo_docs (src/mcp/server.ts:2535) as the closest existing "maintainer-gated tool that can open real GitHub content" precedent for how to phrase the write-safety framing.
Context
POST /v1/repos/:owner/:repo/contributor-issue-drafts/generateexists insrc/api/routes.ts:2510-2538, gated byrequireAppRole(["maintainer","owner","operator"]), delegating togenerateContributorIssueDrafts, with an explicit dry-run-by-default safety guard (if (parsed.data.create && parsed.data.dryRun !== false) return c.json({ error: "explicit_create_requires_dry_run_false" }, 400)). No corresponding MCP tool exists anywhere insrc/mcp/server.ts(confirmed via grep forcontributorIssueDraft/generateContributorIssueDraftsin bothsrc/mcp/server.tsandloopover-mcp.js— zero hits), so this capability is REST/web-dashboard-only.Requirements
loopover_generate_contributor_issue_draftstosrc/mcp/server.ts's tool registry,requireRepoManageAccess-gated, mirroring the route'sdryRun-defaults-true /createsemantics exactly — the tool must never silently create issues.maintain generate-issue-drafts [--create] --repo owner/repo).Deliverables
loopover_generate_contributor_issue_draftsMCP toolmaintain generate-issue-draftsCLI subcommandTest Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in the new route/tool/CLI code, plus a test asserting output parity between the mirrored surfaces for identical input.
Expected Outcome
Contributor issue-draft generation is available over MCP/CLI, not just the web dashboard's REST call, without weakening the existing create-safety guard.
Links & Resources
Precedent:
loopover_refresh_repo_docs(src/mcp/server.ts:2535) as the closest existing "maintainer-gated tool that can open real GitHub content" precedent for how to phrase the write-safety framing.