Implementation Plan: T5-P4-A1-WP1 BackendCmdBuilderBase ABC and FlagVocabulary#4091
Merged
Trecek merged 5 commits intoJun 12, 2026
Conversation
Create BackendCmdBuilderBase as the shared ABC for both ClaudeCodeBackend and CodexBackend. The base owns the eight shared env keys (MAX_MCP_OUTPUT_TOKENS, MCP_CONNECTION_NONBLOCKING, plus six conditional keys) and the _assemble_shared_env_extras helper, eliminating the ~30 lines of inline env-assembly duplication that lived in each backend's build_skill_session_cmd and build_food_truck_cmd methods. FlagVocabulary NamedTuple captures per-backend CLI flag metadata. SHARED_BASELINE_ENV becomes the canonical 2-key MappingProxyType source; _claude_prompt's _SESSION_BASELINE_ENV is now a downstream alias. CodexBackend's _codex_exec_extras is correctly demoted to a shim that uses SHARED_BASELINE_ENV (not _assemble_shared_env_extras) for the include_session_baseline path, preserving the static 2-key contract for resume sessions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
After pre-commit auto-formatting collapsed some whitespace, codex.py ended up at 1058 lines (well under 1060). No need to bump the cap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… all callers Private-named symbols _MAX_MCP_OUTPUT_TOKENS_VALUE and _SESSION_BASELINE_ENV were listed in __all__ in _claude_prompt.py, contradicting __all__'s public-API semantics. The canonical definitions already live in _backend_cmd_builder_base.py. Migrate all callers (claude.py, codex.py, commands.py, execution/__init__.py, and 5 test files) to import SHARED_BASELINE_ENV from the canonical location. Remove the legacy aliases and __all__ from _claude_prompt.py per the "No Backward Compatibility Hacks" rule. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…string The docstring claimed "Unpack all SkillSessionConfig fields" but backend_override is intentionally excluded — it is consumed upstream at the headless layer before command builders are invoked. Clarify this in the docstring so future readers can verify completeness without guessing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…unt guard test_fields: replace isinstance() checks with value equality assertions — type correctness is already guaranteed by NamedTuple; value assertions catch wrong values that isinstance lets through. test_all_eight_keys: add assert len(result) == 8 to enforce the count the test name advertises, preventing extra unexpected keys from going undetected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Create
BackendCmdBuilderBaseas a@dataclass(frozen=True, slots=True)ABC in a new module_backend_cmd_builder_base.pywithinexecution/backends/. This ABC owns the canonical definition of the eight shared env keys that bothClaudeCodeBackendandCodexBackendcurrently duplicate. Both backends inherit from it._codex_exec_extrasis demoted to a shim that derives the two always-on shared keys from the base class without calling the full_assemble_shared_env_extras()(which also reads ambient env vars — not appropriate for theinclude_session_baselinepath).FlagVocabularyNamedTuple captures per-backend CLI flag metadata.Requirements
Conflict Resolution Decisions
The following files had merge conflicts that were automatically resolved.
Closes #4014
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260612-083826-983233/.autoskillit/temp/make-plan/t5_p4_a1_wp1_backend_cmd_builder_base_plan_2026-06-12_090000.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown