Skip to content

Spec: repo-agnostic issue-planning MCP tool (draft-by-default, explicit create) #7426

Description

@JSONbored

Problem

generateContributorIssueDrafts (src/services/contributor-issue-draft.ts) already implements draft -> dedupe (stable HTML-comment marker + fingerprint) -> 30-day decline-cooldown -> create, but every one of its signal sources (repo policy readiness warnings, upstream registry drift, focus-manifest "wanted paths") and its create path are loopover-specific. Selfhosters need an equivalent that takes an arbitrary installed repo plus a maintainer-supplied planning goal and produces a structured issue plan they can review and optionally create against their own backlog.

Area

src/mcp/server.ts, src/services/contributor-issue-draft.ts (pattern to generalize), src/auth/security.ts.

Proposal

  • New MCP tool registered in src/mcp/server.ts next to generateContributorIssueDrafts, in the same "Maintainer & repo owner" category, gated by requireRepoManageAccess (and the existing MCP_ACTUATION_REPO_ALLOWLIST check in src/auth/security.ts:169).
  • Input: a target repo (must already have the App/Orb installed) plus free-form planning context (e.g. "plan issues for X feature area").
  • Output: N structured issue drafts (title/body/labels), reusing contributor-issue-draft.ts's dedup/fingerprint-marker approach generalized to not assume loopover's own repo or its specific signal sources.
  • Defaults to dryRun:true (drafts only, nothing written to GitHub); requires an explicit create:true to write, using sub-issue 1's resolver exclusively.
  • Respects the global agent kill-switch (isGlobalAgentPause/isGlobalAgentFrozen), matching how generateContributorIssueDrafts already handles writes outside the normal dry-run chokepoint.

Deliverables

  • New MCP tool definition + registration.
  • Draft-generation logic parameterized by target repo and planning input (no loopover-specific signal sources baked in).
  • Dedup/fingerprint-marker logic generalized to arbitrary repos.
  • Create path wired exclusively to sub-issue 1's write-client resolver.

Resources

  • src/services/contributor-issue-draft.ts (the pattern being generalized: draft shape, marker/fingerprint dedup, cooldown)
  • src/mcp/server.ts:4212 (existing generateContributorIssueDrafts tool registration, the site for the new tool)
  • src/auth/security.ts:169 (MCP_ACTUATION_REPO_ALLOWLIST, isMcpActuationRepoAllowed, requireRepoManageAccess)

Boundaries

  • Draft-only default is non-negotiable per the epic's decided safety posture — no auto-create mode.
  • No milestone assignment in this sub-issue; that lands in sub-issue 3, sequenced after milestone capability exists.
  • Must go through sub-issue 1's resolver exclusively — no new PAT path introduced for this tool.
  • Depends on sub-issue 1 landing first.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.orbGittensory Orb related - maintainer self-hosting analytics.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions