[FIX] Skill Capability Registry Derived-Field Immunity#3680
Merged
Trecek merged 8 commits intoJun 3, 2026
Merged
Conversation
… contradictions Convert SkillCapabilityDef.required_backends from a stored field to a @Property derived from codex_status. Only "not-applicable" capabilities (MCP-specific tools) map to frozenset({"claude-code"}); all others map to frozenset(). Remove _skill_requires_claude from tools_execution.py, derive backend_requirements in _skill_info_from_frontmatter from uses_capabilities via registry, and strip backend_requirements from all 108 SKILL.md frontmatters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…requirement override Tests now match Part A behavior: - backend_requirements derived from uses_capabilities via registry @Property - _skill_requires_claude removed; incompatible skills hit _is_backend_incompatible gate - SKILL.md no longer declares backend_requirements (runtime derivation only) - MCP tools (open_kitchen, run_skill, test_check) correctly derive claude-code requirement Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rtions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…equirements - Add regression guard test_backend_requirements_derived_not_read_from_yaml - Delete test_skill_without_backend_requirement_no_override (mock-only path) - Rewrite incompatible-backend routing test to use real SkillInfo dataclass - Remove stale tools_execution.py from _EXEMPT_FILES in bypass test - Remove backend_requirements: [claude-code] from 3 write-recipe templates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… leakage in backend tests - test_backend_requirements_derived_not_read_from_yaml used nonexistent SkillSource.PROJECT; replaced with SkillSource.BUNDLED - Three backend-config tests failed when AUTOSKILLIT_AGENT_BACKEND__BACKEND env var was set (Dynaconf double-underscore override); added delenv calls Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Exact duplicate of test_derivation_backend_requirements_match_capabilities (both iterate skill dirs, read frontmatter, assert no backend_requirements). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ude_logic
Relative Path("src/...") fails if pytest CWD is not project root.
Use Path(__file__).parents[2] for robust path resolution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…_required_backends
The old test checked codex_status != not-applicable AND required_backends
== {claude-code}, which the @Property makes structurally impossible.
Rewrite to verify both directions of the derivation invariant.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b840eb9 to
8da255b
Compare
This was referenced Jul 3, 2026
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.
Summary
The
SKILL_CAPABILITY_REGISTRYhas a hand-codedrequired_backendsfield on eachSkillCapabilityDefthat contradicts the registry's owncodex_statusfield. All 6 non-claude_dircapabilities are markedrequired_backends=frozenset({"claude-code"})even though Codex natively supports them all. This causes_skill_requires_claudeto force everyrun_skilldispatch to Claude Code,_should_inject_skillto silently exclude all skills from Codex sessions, andrules_backend_compatto emit spurious warnings for Codex recipes.The fix converts
required_backendsfrom a stored field to a@propertyderived fromcodex_status, making contradictions structurally impossible: only"not-applicable"capabilities (MCP-specific tools likeopen_kitchen,run_skill,test_check) map tofrozenset({"claude-code"}); all others ("works-as-is","degraded","fix-required") map tofrozenset(). Additionally,_skill_info_from_frontmatteris updated to deriveSkillInfo.backend_requirementsfromuses_capabilitiesvia the registry rather than reading it from SKILL.md YAML.Part B will cover test infrastructure updates (rewriting/deleting affected test cases across 6 test files) and template documentation cleanup — implement as a separate task.
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/remediation-20260603-135240-162480/.autoskillit/temp/rectify/rectify_skill_capability_registry_part_a_2026-06-03_140000.mdCloses #3675
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown