the-vibey-project

codexloop-rest-surface

Generated `codexloop api` command tree, api_baseline.json drift gate, and how to refresh the baseline. Use when SDK upgrades change the surface.

the-vibey-project 3 2 Updated 1mo ago
GitHub

Install

npx skillscat add the-vibey-project/vibey/codexloop-rest-surface

Install via the SkillsCat registry.

SKILL.md

codexloop REST surface

codexloop api generates a 1:1 CLI mirror of the OpenAI Python SDK's REST
methods. The tree is code-generated from the SDK itself, not maintained by
hand.

api_baseline.json drift gate

api_baseline.json freezes the OpenAI SDK's method count and list,
not codexloop's. It is a snapshot of what the SDK exposes, not what
codexloop adds.

A test fails when:

  • The SDK adds or removes methods (changes method_count).
  • Methods appear or disappear from the methods list.
  • local_helpers (like chat.completions.stream) change.

This gate prevents SDK upgrades from silently altering the API surface
without review.

Refreshing the baseline

After an intentional SDK upgrade, refresh the baseline:

python tools/refresh_api_baseline.py

It prints the added and removed methods and rewrites api_baseline.json, and
exits non-zero when the baseline already matches so it cannot leave a no-op
commit behind. Read the delta: a removed method is a codexloop api command
that disappears from somebody's scripts.

Commit the updated api_baseline.json in the same PR as
pyproject.toml changes.

Never refresh the baseline for unrelated PRs. A drift failure
during SDK upgrade is expected and intentional — it forces you to
inspect what changed.