feat(skills): inject Codex availability for ralplan/plan/ralph, enhance Codex critic#2132
Conversation
…hance Codex critic prompt runtime-guidance.ts only injected Codex CLI availability signals for the deep-interview skill. The ralplan, omc-plan, plan, and ralph skills hit the default case which returned empty string — no availability info was injected into the skill prompt. Without this signal, the Claude agent defaults to reporting Codex as unavailable even when it is installed and working. Additionally, the ralph --critic=codex path only asked Codex to verify acceptance criteria. Since Codex runs GPT-5.4 at max effort, the prompt now also requests optimality evaluation and full related-code review to maximize the value of the external critic pass. Constraint: Must preserve existing ralph PRD loop and verification flow Rejected: Modifying the critic agent prompt directly | would affect all critic invocations, not just Codex path Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks for the PR. Closing this because OMC PRs must target — |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4cba4760e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case 'ralplan': | ||
| case 'omc-plan': | ||
| case 'plan': | ||
| case 'ralph': | ||
| return renderPlanRuntimeGuidance(availability ?? detectSkillRuntimeAvailability()); |
There was a problem hiding this comment.
Handle external-LLM lockout before probing Codex
Adding ralplan/omc-plan/plan/ralph to this branch makes these core skills call detectSkillRuntimeAvailability() on render, but that helper uses isCliAvailable('codex'), which throws when security policy disables external providers (OMC_SECURITY=strict or security.disableExternalLLM=true in config via getContract). Because this exception is not caught here, slash-command rendering now fails for these skills (the caller catches and returns a generic load error), so users in locked-down environments can no longer run /ralph or planning skills even though Claude-only execution should still work.
Useful? React with 👍 / 👎.
|
The PR was closed because it targeted Please use that thread to refine the behavior/contract first, and if we move forward, reopen as a new PR against — |
Problem
When using
--architect codexor--critic codexflags with/ralplanorralph --critic=codex, the Claude agent reports "Codex is unavailable" and silently falls back to the default Claude-only reviewer — even when Codex CLI is installed, authenticated, and working correctly (codex --versionsucceeds,omc ask codexproduces valid output).Root cause:
runtime-guidance.ts→renderSkillRuntimeGuidance()only injects Codex CLI availability signals for thedeep-interviewskill. Theralplan,omc-plan,plan, andralphskills all hit thedefault:case which returns''. Without any availability signal in the skill prompt, the Claude agent has no way to know Codex is installed and defaults to "unavailable."Additionally, when the Codex critic path does activate (e.g., via workaround), the
ralphskill only asks Codex to verify acceptance criteria — the same shallow pass the Claude architect already does. As Codex can run GPT-5.4 at max reasoning effort, this underutilizes the external critic.Expected Result
/ralplan --critic codexandralph --critic=codexshould detect it and route the critic pass throughomc ask codexwithout requiring manual workarounds.Solution
Change 1:
src/features/builtin-skills/runtime-guidance.tsAdded
renderPlanRuntimeGuidance()— mirrors the existingrenderDeepInterviewRuntimeGuidance()pattern. Checksavailability.codexand injects a clear directive into the skill prompt: "Codex CLI is installed and available. Do NOT report Codex as unavailable."Added
case 'ralplan',case 'omc-plan',case 'plan',case 'ralph'to therenderSkillRuntimeGuidance()switch, routing them to the new render function.This bridges the gap: the
isCliAvailable('codex')detection already works correctly at the TypeScript level — the missing piece was propagating that signal into the skill prompt text that the Claude agent actually reads.Change 2:
skills/ralph/SKILL.mdEnhanced the
--critic=codexinstructions in Step 7 (Reviewer verification) and Tool_Usage. The Codex critic prompt now MUST include:This preserves the existing ralph design (PRD loop, story tracking, verification flow) while extracting maximum value from the GPT-5.4 xhigh-effort Codex pass.
Test plan
codex --versionsucceeds →renderPlanRuntimeGuidancereturns non-empty guidancecodex --versionfails → function returns''(graceful fallback preserved)/ralplan --critic codex "trivial task"→ Codex critic is invoked, not skippedralph --critic=codex→ Step 7 sends optimality + related-code review prompt to Codexdeep-interviewCodex detection is unaffected🤖 Generated with Claude Code