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
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.
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
src/mcp/server.tsnext togenerateContributorIssueDrafts, in the same "Maintainer & repo owner" category, gated byrequireRepoManageAccess(and the existingMCP_ACTUATION_REPO_ALLOWLISTcheck insrc/auth/security.ts:169).contributor-issue-draft.ts's dedup/fingerprint-marker approach generalized to not assume loopover's own repo or its specific signal sources.dryRun:true(drafts only, nothing written to GitHub); requires an explicitcreate:trueto write, using sub-issue 1's resolver exclusively.isGlobalAgentPause/isGlobalAgentFrozen), matching howgenerateContributorIssueDraftsalready handles writes outside the normal dry-run chokepoint.Deliverables
Resources
src/services/contributor-issue-draft.ts(the pattern being generalized: draft shape, marker/fingerprint dedup, cooldown)src/mcp/server.ts:4212(existinggenerateContributorIssueDraftstool registration, the site for the new tool)src/auth/security.ts:169(MCP_ACTUATION_REPO_ALLOWLIST,isMcpActuationRepoAllowed,requireRepoManageAccess)Boundaries