Add wire-contract CI gate and agent review workflow skills - #1326
Open
ebma wants to merge 3 commits into
Open
Conversation
Reviews are probabilistic; live integrator breakage should be caught deterministically. The gate renders the shared endpoint types and the public SDK API into a structurally expanded snapshot, so any change to what partners consume - including transitive type/enum drift - fails CI until the snapshot is regenerated and the diff is reviewed on purpose.
vortex-review encodes the multi-lens finder fleet with loop-until-dry and adversarial verification; address-feedback turns one PR review round into a single verify-fix-gate-push command.
ship chains plan approval, implementation with tests, vortex-review until dry, and PR creation; babysit-pr watches an open PR and reacts to new reviews and CI failures so feedback rounds need no ferrying.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a CI-enforced partner API snapshot generator and reusable agent workflows for reviewing and shipping changes.
Changes:
- Generates and verifies shared/SDK wire-contract snapshots.
- Adds serializer fixtures and CI coverage.
- Adds four PR review and delivery skills.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Tracks shared Claude skills. |
.github/workflows/ci.yml |
Runs wire-contract tests and checks. |
.claude/skills/address-feedback/SKILL.md |
Defines feedback handling. |
.claude/skills/babysit-pr/SKILL.md |
Defines PR monitoring. |
.claude/skills/ship/SKILL.md |
Defines end-to-end delivery. |
.claude/skills/vortex-review/SKILL.md |
Defines deep review workflow. |
docs/api/README.md |
Documents the snapshot. |
docs/api/wire-contract.snapshot.md |
Captures the generated public contract. |
package.json |
Adds snapshot commands. |
scripts/wire-contract/generate-report.ts |
Implements contract serialization. |
scripts/wire-contract/generate-report.test.ts |
Tests serializer output. |
scripts/wire-contract/fixtures/fixture-surface.ts |
Provides serializer fixtures. |
scripts/wire-contract/fixtures/tsconfig.json |
Configures fixture compilation. |
Suppressed comments (1)
.claude/skills/address-feedback/SKILL.md:17
gh pr view --json reviews,commitsreturns review summaries but not their inline review comments, so the bare-PR flow silently drops inline findings. Fetch the paginated review-comments endpoint too and retain comments whosepull_request_review_idbelongs to reviews submitted since the last push.
- Bare PR number → fetch all reviews and review comments submitted since the last push
(`gh pr view <n> --json reviews,commits`).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+284
to
+285
| if (resolved.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.TypeAlias)) { | ||
| return serializeType(ctx, ctx.checker.getDeclaredTypeOfSymbol(resolved), 0); |
Comment on lines
+12
to
+15
| - `.../pull/<n>#pullrequestreview-<id>` URL → | ||
| `gh api repos/{owner}/{repo}/pulls/<n>/reviews/<id>` for the body and | ||
| `gh api repos/{owner}/{repo}/pulls/<n>/comments` filtered by `pull_request_review_id` | ||
| for the inline comments. |
Comment on lines
+16
to
+18
| - Record a baseline to diff against on every wake-up (persist it in a scratch state | ||
| file): head SHA, review ids, review-comment ids, issue-comment ids, CI runs — | ||
| `gh pr view <n> --json headRefOid,reviews,comments,statusCheckRollup`. |
Comment on lines
+108
to
+109
| const returnType = serializeType(ctx, signature.getReturnType(), depth + 1); | ||
| return `(${parameters.join(", ")}) => ${returnType}`; |
Comment on lines
+138
to
+140
| const optional = (property.flags & ts.SymbolFlags.Optional) !== 0; | ||
| const propertyType = serializeType(ctx, typeOfSymbol(ctx, property), depth + 1, { dropUndefined: optional }); | ||
| lines.push(`${property.name}${optional ? "?" : ""}: ${propertyType};`); |
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vrtx-dashboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
An analysis of our recent development sessions showed two systematic weaknesses:
This PR adds a deterministic wire-contract gate plus four repo-level agent skills that encode the review/feedback workflow we kept reinventing per session.
Wire-contract gate (deterministic)
scripts/wire-contract/generate-report.tsrenders the typed partner-facing surface — the shared endpoint request/response types (packages/shared/src/endpoints) and the public SDK API (packages/sdk/src/index.ts) — intodocs/api/wire-contract.snapshot.md(checked in, ~5.8k lines).Record<FiatToken, …>resolved), so a change to a transitively referenced type surfaces in the snapshot even when no endpoint file was edited. External types (viem, polkadot, lib) are kept by name.bun run wire-contract:checkfails when the snapshot is stale;bun run wire-contract:updateregenerates it. CI runs the check in the build job, so every partner-facing change becomes an explicit, reviewable diff in the PR that made it.Note: the SDK entry resolves
@vortexfi/sharedthrough its built declarations — runbun run build:sharedbefore regenerating when shared changed (CI's build job already does).Agent skills (
.claude/skills/)/vortex-review— multi-lens deep review: parallel finder agents with Vortex-specific lenses (financial integrity, phase-recovery/idempotency, presigned-tx identity, silent failures, partner surface, migrations vs deployed schema, corridor-matrix consistency, test adequacy), looped until two consecutive rounds find nothing new, every finding adversarially verified before it is reported. Review-only; never edits code./address-feedback <review-url>— one feedback round in one command: fetch the review viagh, verify each finding against the code, fix agreed items with regression tests, run the repo gates, push, and report a full disposition table. Business decisions are surfaced, never guessed./babysit-pr <PR#>— watches an open PR: reacts to new reviews and CI failures, pushes mechanical fixes, re-requests Copilot review after addressing a round, and notifies on business decisions or mergeability. Never merges./ship— the pipeline: plan (with explicit decision questions, human gate 1) → implement with tests →/vortex-reviewuntil dry → PR + Copilot review +/babysit-pr. Merge remains human gate 2..gitignoregets a!.claude/skills/exception so the skills are version-controlled and available in worktree sessions once this lands on staging.Verification
cd scripts/wire-contract && bun test— 3 pass.bun run wire-contract:check— snapshot up to date.bun run verify— clean.