|
| 1 | +# MCP Spec Annotator Plugin for Claude |
| 2 | + |
| 3 | +Annotates MCP SEP diffs against extracted requirements, producing structured review artifacts. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +### Claude Code |
| 8 | + |
| 9 | +```bash |
| 10 | +/plugin marketplace add modelcontextprotocol/modelcontextprotocol |
| 11 | +``` |
| 12 | + |
| 13 | +### Claude Cowork |
| 14 | + |
| 15 | +Navigate to Customize >> Browse Plugins >> Personal >> Plus Button >> Add marketplace from GitHub and add `modelcontextprotocol/modelcontextprotocol` |
| 16 | + |
| 17 | +## Available Skills |
| 18 | + |
| 19 | +### `/spec-annotate <sep_number> [mode] [commit_range]` |
| 20 | + |
| 21 | +Orchestrates the full SEP annotation pipeline: reads the SEP, fetches the PR diff, extracts requirements, annotates hunks against requirements, and renders a self-contained HTML report. |
| 22 | + |
| 23 | +| Argument | Required | Default | Description | |
| 24 | +| -------------- | -------- | -------- | ---------------------------------------------------------- | |
| 25 | +| `sep_number` | Yes | — | SEP number (e.g., 1686) | |
| 26 | +| `mode` | No | `review` | `review` = fresh extraction; `validator` = reuse meta-spec | |
| 27 | +| `commit_range` | No | — | Local git range (e.g., `abc..def`). Omit for PR mode. | |
| 28 | + |
| 29 | +**Output:** `.reviews/SEP-{number}/annotated-diff.html` (plus `meta-spec.json` and `annotations.json`) |
| 30 | + |
| 31 | +**Example:** |
| 32 | + |
| 33 | +``` |
| 34 | +/spec-annotate 1686 |
| 35 | +/spec-annotate 1686 validator |
| 36 | +/spec-annotate 1686 review abc123..def456 |
| 37 | +``` |
| 38 | + |
| 39 | +### `/spec-update <sep_number> <action> <details>` |
| 40 | + |
| 41 | +Updates an existing meta-spec by adding, removing, modifying, or recategorizing requirements. Preserves existing requirements and offers to re-annotate after changes. |
| 42 | + |
| 43 | +| Argument | Required | Description | |
| 44 | +| ------------ | -------- | -------------------------------------------- | |
| 45 | +| `sep_number` | Yes | SEP number | |
| 46 | +| `action` | Yes | `add`, `remove`, `modify`, or `recategorize` | |
| 47 | +| `details` | Yes | Natural language description of the change | |
| 48 | + |
| 49 | +**Example:** |
| 50 | + |
| 51 | +``` |
| 52 | +/spec-update 1686 add "Servers MUST send progress notifications for long-running tasks" |
| 53 | +/spec-update 1686 recategorize "R005 from must-change to may-change" |
| 54 | +``` |
| 55 | + |
| 56 | +### `/spec-orchestrate <sep_number> [max_iterations]` |
| 57 | + |
| 58 | +Iteratively runs spec review and implementation in a feedback loop until all requirements are satisfied or conflicts are escalated to the user. |
| 59 | + |
| 60 | +| Argument | Required | Default | Description | |
| 61 | +| ---------------- | -------- | ------- | ------------------------------- | |
| 62 | +| `sep_number` | Yes | — | SEP number | |
| 63 | +| `max_iterations` | No | 3 | Maximum review-implement cycles | |
| 64 | + |
| 65 | +**Example:** |
| 66 | + |
| 67 | +``` |
| 68 | +/spec-orchestrate 1686 |
| 69 | +/spec-orchestrate 1686 5 |
| 70 | +``` |
| 71 | + |
| 72 | +## Agents |
| 73 | + |
| 74 | +### `spec-reviewer` |
| 75 | + |
| 76 | +Runs the full annotation pipeline (extract/reuse meta-spec, annotate diff, render HTML). Launched by `/spec-annotate` and `/spec-orchestrate`. |
| 77 | + |
| 78 | +### `spec-qa` |
| 79 | + |
| 80 | +Quality gate agent that audits annotation artifacts against a 21-point checklist covering requirements quality (EARS format, specific actors, affected paths), annotation quality (no empty explanations, multi-hunk synthesis, no cross-product noise), and completeness. Returns a pass/fail verdict with specific issues. Launched by `/spec-annotate` and `/spec-orchestrate` after the reviewer finishes. |
| 81 | + |
| 82 | +### `spec-implementer` |
| 83 | + |
| 84 | +Reads the meta-spec and annotations, then edits schema and documentation files to satisfy unaddressed or violated requirements. Launched by `/spec-orchestrate`. |
| 85 | + |
| 86 | +## Internal Skills (not user-invocable) |
| 87 | + |
| 88 | +These skills provide instructions followed inline by the orchestrator: |
| 89 | + |
| 90 | +- **`spec-extract`** — Extracts structured requirements from SEP markdown |
| 91 | +- **`spec-diff`** — Annotates diff hunks against meta-spec requirements |
| 92 | +- **`spec-render`** — Populates the HTML template with annotation data |
| 93 | +- **`spec-annotation-workflow`** — End-to-end pipeline for the spec-reviewer agent |
| 94 | + |
| 95 | +## Annotation Output |
| 96 | + |
| 97 | +All artifacts are written to `.reviews/SEP-{number}/` (gitignored by default): |
| 98 | + |
| 99 | +| File | Description | |
| 100 | +| --------------------- | ---------------------------------------------- | |
| 101 | +| `meta-spec.json` | Structured requirements extracted from the SEP | |
| 102 | +| `annotations.json` | Per-hunk annotations with coverage status | |
| 103 | +| `annotated-diff.html` | Self-contained HTML report for sharing | |
| 104 | + |
| 105 | +The HTML artifact uses a three-column layout (annotations | diff | issues) with GitHub dark theme colors, and can be published to a GitHub Gist for sharing with other reviewers. |
| 106 | + |
| 107 | +## Dependencies |
| 108 | + |
| 109 | +This plugin works alongside the [mcp-spec](../mcp-spec/) plugin, which provides `mcp-spec:search-mcp-github` (used by the `spec-reviewer` and `spec-implementer` agents for GitHub research). |
0 commit comments