Imported from Eunryong/version-compat-mcp (
AGENTS.md). Install upstream withnpx skills add Eunryong/version-compat-mcp. Copyright stays with the author.
Version-Aware Setup & Migration Rules (version-compat-mcp)
This rule file applies to OpenAI Codex (Codex CLI / App), Google Antigravity (AGY), and other AGENTS.md-compatible coding agents.
Mandatory Tool Workflow Before Suggesting Setup or Upgrades
Whenever a task involves installing packages, creating/modifying tool configuration files (eslint, tailwindcss, next, vite, typescript, pyproject.toml), or upgrading major versions:
-
Detect Local Environment First (
detect_project_environment)- Always call
detect_project_environmentwithproject_pathbefore proposing CLI commands or configuration files. - Use the detected
package_manager(npm,pnpm,yarn,bun,uv,poetry,pip) and itscommand_templates(pnpm add -D,uv add,poetry add, etc.). Never default tonpmorpipif the project usespnpm,yarn,bun,uv, orpoetry. - Respect
config_paradigms:- If
eslint.modeis"flat_config"(or ESLint >= 9), never suggest.eslintrc.*or.eslintignore. - If
tailwindcss.modeis"v4_css_first"(or Tailwind CSS >= 4), never suggestnpx tailwindcss init,tailwind.config.js, or@tailwind basedirectives. - If
python.packagingis"pep621"(or usinguv/modernpyproject.toml), prefer[project]tables anduv addover legacysetup.pyor unstructuredrequirements.txt.
- If
- Always call
-
Verify Compatibility Deterministically (
check_dependency_compatibility)- Before suggesting dependency upgrades or installing peer-coupled libraries (e.g.,
next,react,react-dom,eslint,fastapi,pydantic,sqlalchemy), callcheck_dependency_compatibilitywith the project's runtime (runtime_versionorruntime_python) and dependency map. - Report any
engine_mismatch,peer_dependency_conflict, ordeprecationswith theirsource_url.
- Before suggesting dependency upgrades or installing peer-coupled libraries (e.g.,
-
Ground Setup & Migration Steps in Tag-Pinned Docs (
get_versioned_setup_guide,get_upgrade_steps,search_versioned_docs)- Do not rely on frozen pre-training weights for version-sensitive APIs (such as Next.js 15 async
cookies()/headers()/params, Tailwind v4@themeand@tailwindcss/vite, Pydantic v2ConfigDictandmodel_validator, or FastAPIlifespan). - Always cite the returned
source_urland state theresolved_versionused.
- Do not rely on frozen pre-training weights for version-sensitive APIs (such as Next.js 15 async
-
Strict Safety Guardrails
- Never silently assume
"latest"when a version is unknown or ambiguous. - Never conclude that an API or option was removed solely because
search_versioned_docsreturned 0 matches. - Return shell/codemod commands for user review rather than executing destructive migrations unprompted.
- Never silently assume
