Commit 8c8b76b
Add B10 API spec drift rule to connector review mixin (#118)
## Summary
The connector review mixin covered *newly added* endpoints (B7, B8) but
had no criterion for an *existing* endpoint being changed. A version or
path swap (`/v1/users` → `/v2/users`), a renamed ID field, or a changed
pagination style could pass review unflagged — the downstream rules (B1,
B3) only catch the symptom if the reviewer connects the dots.
B10 closes that gap and ties both cases to the `build-openapi-spec.md`
skill.
## The rule
- **Trigger-gated.** Fires only when the diff changes or adds an API
endpoint — endpoint constants, request paths, base URL, or the
request/response structs bound to a call. Explicit instruction not to
raise it otherwise, so it stays quiet on unrelated PRs.
- **Endpoint changed** → compare the new request/response shape against
the checked-in `spec/openapi.json`. Any schema difference (path/version
change, field added/removed/renamed/retyped, ID field change, pagination
style change) is reported as `blocking-correctness`. If
`spec/openapi.json` wasn't updated in the PR it is stale, and that is
reported too — at `suggestion` severity when the schema itself looks
unchanged. Either way the author is told to regenerate the spec with the
skill. If no `spec/openapi.json` exists, it falls through to the
added-endpoint branch.
- **Endpoint added** → not a breaking change. Reported as a `suggestion`
asking the author to run the skill so `spec/openapi.json` covers the new
endpoint.
Severity names match the base prompt's vocabulary
(`blocking-correctness` / `suggestion`, see `base-pr-review.md`), so the
reviewer maps them to the right merge gate.
## Note for reviewers
`spec/openapi.json` and the `build-openapi-spec.md` skill both live in
the connector repos being reviewed, not here. If the skill is invoked
under a different name there, the rule text should be updated to match.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 64bf1c2 commit 8c8b76b
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
110 | 123 | | |
111 | 124 | | |
112 | 125 | | |
| |||
0 commit comments