compound-engineering-plugin icon indicating copy to clipboard operation
compound-engineering-plugin copied to clipboard

Setup skill fails silently on non-Claude LLMs due to AskUserQuestion dependency

Open eapugo opened this issue 9 months ago • 1 comments


Problem Description

The /setup skill relies on AskUserQuestion for all user interaction (stack confirmation, customization choices, review depth selection). When the plugin is installed on non-Claude LLMs (Codex, Gemini CLI, OpenCode, Copilot, etc.), AskUserQuestion is unavailable as a native tool. The current Codex tool mapping documents it as "ask the user in chat", but the setup skill's prompt doesn't include any fallback pattern — it unconditionally invokes AskUserQuestion at every decision point.

This means the setup flow either fails outright or auto-configures with defaults without the user ever being consulted, producing a compound-engineering.local.md that may not match their project.

Environment

  • Plugin: compound-engineering v2.35.x
  • Affected Platforms: Codex, Gemini CLI, OpenCode, Copilot, Kiro, Pi, Factory Droid
  • Working Platform: Claude Code (has native AskUserQuestion)
  • File: plugins/compound-engineering/skills/setup/SKILL.md

Reproduction Steps

  1. Install compound-engineering on Codex: bunx @every-env/compound-plugin install compound-engineering --to codex
  2. Run /setup (or the converted equivalent)
  3. Agent attempts to invoke AskUserQuestion for stack confirmation
  4. Tool is unavailable — agent either errors or skips the interaction entirely
  5. Setup completes with auto-detected defaults, user never prompted

Current Behavior

The setup skill has five interaction points that all require AskUserQuestion:

Step AskUserQuestion Usage Fallback if Unavailable
Step 1: Check existing config 3 options: Reconfigure / View / Cancel ❌ None
Step 2: Stack detection confirm 2 options: Auto-configure / Customize ❌ None
Step 3a: Stack override Multi-select stack type ❌ None
Step 3b: Focus areas Multi-select: Security, Perf, Arch, Simplicity ❌ None
Step 3c: Review depth 3 options: Thorough / Fast / Comprehensive ❌ None

The Codex tool map in src/utils/codex-agents.ts defines: AskUserQuestion/Question: ask the user in chat — but the setup SKILL.md doesn't reference this fallback pattern. The agent has no instruction to present choices as a numbered list in chat when AskUserQuestion isn't available.

Expected Behavior

The setup skill should work across all supported platforms by either:

  1. Detecting platform capabilities and branching to an alternative interaction pattern
  2. Including inline fallback instructions in SKILL.md that tell the agent to present numbered options in chat when AskUserQuestion is unavailable
  3. Using the converter layer to transform AskUserQuestion calls into platform-native equivalents during bun conversion

Root Cause Analysis

Problem Nature

The setup skill was authored for Claude Code, which has AskUserQuestion as a first-class tool. The multi-platform converter pipeline (src/converters/claude-to-*.ts) handles tool mapping for agents and commands, but skill markdown files are passed through without transformation of their interaction patterns.

Detailed Analysis

The converter pipeline correctly maps tools at the system level:

Claude Tool          → Codex Equivalent
────────────────────────────────────────
Read                 → cat/sed or rg
Write                → shell redirection
Bash                 → shell_command
AskUserQuestion      → "ask the user in chat"  ← vague, no structured pattern

The mapping for AskUserQuestion is the weakest — "ask the user in chat" gives no guidance on how to present multiple-choice options, multi-select, or confirmation dialogs. Every other tool has a concrete executable equivalent.

Gap Location

plugins/compound-engineering/skills/setup/SKILL.md   ← No fallback logic
src/utils/codex-agents.ts                            ← Vague mapping
src/converters/claude-to-codex.ts                    ← No SKILL.md content transformation

Impact

  • Setup fails or silently auto-configures on all 7 non-Claude target platforms
  • Users on Codex/Gemini/OpenCode get a compound-engineering.local.md they never approved
  • The plugin's multi-platform promise is undermined at the very first interaction
  • Other skills using AskUserQuestion likely have the same gap

Suggested Fix

Option A: Skill-Level Fallback (Minimal Change)

Add a conditional block to setup/SKILL.md:

## Interaction Method

If `AskUserQuestion` is available, use it for all user prompts below.

If `AskUserQuestion` is NOT available, present choices as a **numbered list in chat**
and ask the user to reply with their number. For multi-select, ask them to reply with
comma-separated numbers. Example:

> How would you like to configure?
> 1. Auto-configure (Recommended)
> 2. Customize
>
> Reply with the number of your choice.

Option B: Converter-Level Transformation (Systematic)

Enhance the converter pipeline to rewrite AskUserQuestion invocations in SKILL.md content into platform-appropriate patterns during bun conversion. This would fix all skills, not just setup.

Option C: Both (Recommended)

Apply Option A immediately for setup resilience, then implement Option B to systematically handle AskUserQuestion across all skills during conversion.

Affected Files

  • plugins/compound-engineering/skills/setup/SKILL.md — Add fallback interaction pattern
  • src/utils/codex-agents.ts — Strengthen AskUserQuestion mapping with structured guidance
  • src/converters/claude-to-codex.ts (and other converters) — Consider SKILL.md content transformation
  • Any other SKILL.md files using AskUserQuestion

Labels

  • enhancement
  • setup
  • multi-platform
  • skills

eapugo avatar Feb 23 '26 19:02 eapugo

good one!

kieranklaassen avatar Mar 01 '26 23:03 kieranklaassen