Skip to content

feat(mcp): gittensory_check_before_start (pre-start duplicate/solvability check) #545

Description

@JSONbored

Parent roadmap: #525
Parent phase: #544

Background

Today collision/duplicate detection only runs after a branch exists (the preflight_* tools). Miners routinely waste effort building on an issue that already has a linked PR or isn't solvable — a top source of "slop" from the maintainer's view.

Goal

New MCP tool gittensory_check_before_start that answers, before any code is written: is this issue already claimed/solved? is a duplicate cluster forming? is it a valid target?

Current Behavior

No pre-start check exists; collision runs only post-branch.

Desired Behavior

Input { owner, repo, issueNumber | title | plannedPaths }. Returns claim/solved status, duplicate-cluster risk, and a go/raise/avoid recommendation with reasons. Reuses buildCollisionReport (engine.ts:756), buildIssueQualityReport (:2717), buildIssueDiscoveryLifecycleReport (:2792).

Implementation Requirements

  • Register in src/mcp/server.ts; expose in packages/gittensory-mcp/bin/gittensory-mcp.js. Add an outputSchema. Metadata only, no writes.

Public/Private Output Boundaries

  • Public-safe reasons only; no reward/score/trust language. Never reveals other contributors' private context.

Acceptance Criteria

  • An already-linked or unsolvable issue returns avoid/raise with specific reasons; a clean target returns go.

Testing Requirements

  • npm run test:ci, 97%+ coverage. Unit tests over claimed/solved/duplicate/clean fixtures; forbidden-term assertions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions