Skip to content

feat(mcp): add public-safe PR body drafting command #98

Description

@JSONbored

Parent roadmap: #82

Background

Miners need help turning metadata-only analysis into maintainer-friendly PR descriptions without leaking private scoreability context.

Goal

Add a command that drafts a public-safe PR body from branch metadata, linked issue context, validation summaries, and duplicate/WIP risk.

Current Behavior

PR packets exist, but there is room for a clearer copy/paste PR body workflow.

Desired Behavior

gittensory-mcp agent packet or a related command returns a structured PR body draft suitable for GitHub.

Implementation Requirements

  • Use local metadata only.
  • Include changed-file summary, tests run, linked issue state, duplicate/WIP caution, branch freshness, and next steps.
  • Support JSON and human-readable output.
  • Add explicit redaction/sanitizer pass.
  • Document that private scoreability stays out of PR body drafts.

Public/Private Output Boundaries

MCP may return private scoreability and risk context to authenticated users. It must never upload source contents by default, and public-safe packet output must exclude private score/reward/trust/reviewability details.

Acceptance Criteria

  • Clean branch draft is useful and concise.
  • Missing tests produce public-safe caveat.
  • Duplicate risk is phrased as hygiene, not accusation.
  • Forbidden language never appears.

Testing Requirements

  • npm run test:ci must pass.
  • Global coverage must remain at or above 97% for lines, statements, functions, and branches.
  • Aim for 98%+ branch coverage locally to avoid CI variance.
  • Add tests for every new branch, fallback path, sanitizer rule, and regression.
  • Add invariant/property-style tests when behavior depends on sorting, gating, scoring, queue pressure, source-upload safety, public/private boundaries, or upstream drift.
  • Public GitHub output must be tested against forbidden language: wallet, hotkey, raw trust score, payout, reward estimate, farming, private reviewability, and public score estimate.
  • MCP/local tooling must prove source contents are not uploaded.

Additional Test Scenarios

  • Clean branch fixture.
  • Missing tests fixture.
  • Duplicate risk fixture.
  • Stale base fixture.
  • Source-upload guard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions