pr-to-spec

Featured mcp v0.8.0 by Jeremy Longshore

The flight envelope for agentic coding — convert PRs and local diffs into structured, agent-consumable specs with intent drift detection

6 MCP Tools
MIT License
Free Pricing

Installation

Open Claude Code and run this command:

/plugin install pr-to-spec@claude-code-plugins-plus

Use --global to install for all projects, or --project for current project only.

What It Does


declare intent → make changes → pr-to-spec check → agent sees clean/drift/high-risk
  1. Declare intent: Tell pr-to-spec what you're building, what scope is allowed, and your risk ceiling
  2. Make changes: Work normally in your branch
  3. Check drift: pr-to-spec check --json produces a structured spec + drift signals
  4. Agent consumes: Any agent reads the envelope and acts accordingly

How It Works

Local Diff (no GitHub needed)


pr-to-spec scan --branch main --json

pr-to-spec scan --staged --json

pr-to-spec scan --diff 3 --json

Intent + Drift Detection


pr-to-spec intent set \
  --goal "Add rate limiting to API" \
  --scope "src/middleware/**" \
  --forbid "src/db/**" \
  --max-risk medium \
  --type feature

pr-to-spec check --json

pr-to-spec intent show

GitHub PR Analysis


pr-to-spec --repo owner/repo --pr 42 --json | your-agent review

pr-to-spec --repo owner/repo --pr 42 --json | jq '.spec.risk_flags'

pr-to-spec --repo owner/repo --pr 42 --json \
  | claude --print "Review this spec and decide: approve, request changes, or needs info"

FAQ

Ready to use pr-to-spec?

View on GitHub