Repository navigation
Add a compatibility contract, cleanup rules, and an API route snapshot gate - #1402
Merged
Merged
Conversation
The gate already pinned the shared endpoint types and the public SDK surface, but removing or renaming an endpoint inside a mounted router only showed up in the route-file count. The report now lists every mounted METHOD /path, derived statically from config/express.ts, so such a change fails CI until the snapshot is deliberately updated. Unreadable route paths fail the generator instead of silently dropping routes.
Ponytail and other cleanup runs need the scope decisions and verification procedure from the 2026-10 cleanup. The ponytail plugin can't be configured from the repo, so a repo skill carries them for both Claude Code and Codex.
Cleanups and refactors kept existing integrators working only because each run was briefed by hand. The contract makes that the default for every agent session: mounted endpoints, the SDK surface, published shared exports and persisted formats stay compatible, and refactors prove equivalence first.
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vrtx-dashboard canceled.
|
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.
Why
The cleanup in #1397 kept SDK and API users working only because every agent run was briefed by hand: which surfaces must not change, which areas were out of scope, and how to prove a refactor is equivalent. This PR makes those rules the default for every agent session (Claude Code and Codex). Where it can, it turns them into a CI failure instead of guidance.
Changes
1. Compatibility Contract in the root
CLAUDE.mdThe root
CLAUDE.mdloads in every session and reaches general-purpose subagents. Codex gets it throughAGENTS.md. The new section states the invariants for every change, especially refactors and cleanups:@vortexfi/sharedstays;2.
vortex-cleanuprepo skill (.agents/skills/vortex-cleanup/SKILL.md, symlinked into.claude/skills/)The ponytail plugin can't be configured from the repo; a same-named repo skill only loads next to it. So the cleanup-specific rules live in a repo skill that CLAUDE.md links to:
Subagent model hints are given for both Claude Code and Codex. Built-in Explore/Plan subagents don't load CLAUDE.md, so the skill tells delegating agents to restate the contract in their prompts.
3. CI enforcement: mounted routes in the wire-contract snapshot
wire-contract:checkalready pinned the shared endpoint types and the public SDK surface, so an SDK snapshot already existed. The gap was the API:api-surface-inventory.test.tsonly counts*.route.tsfiles, so removing or renaming one endpoint inside a mounted router failed nothing.METHOD /path(230 today, including the/brl↔/brlaand Alfredpay country aliases). The routes are derived statically fromapps/api/src/config/express.tsby followingapp.use/router.usemounts.app.get(name)(Express's settings getter) is ignored.route()chains, the settings getter and the fail-loud case.docs/api/README.mdand theaddress-feedbackskill describe the wider gate.MAP.md's stale.agents/skillsdescription is refreshed.The snapshot change adds the route section only. #1397 removes no mounted route, so it needs no snapshot update.
Verification
cd scripts/wire-contract && bun test: 5 pass (2 new).bun run wire-contract:checkis up to date with the regenerated snapshot.bun run verify(Biome) is clean.api-surface-inventory.test.tspasses.