Skip to content

Use image_gen for Codex design-shotgun - #2175

Closed
jinzheio wants to merge 2 commits into
garrytan:mainfrom
jinzheio:fix/codex-design-shotgun-image-gen
Closed

jinzheio wants to merge 2 commits into
garrytan:mainfrom
jinzheio:fix/codex-design-shotgun-image-gen

Conversation

@jinzheio

@jinzheio jinzheio commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #2174.

The Codex-generated gstack-design-shotgun skill now delegates image generation and editing to the documented $imagegen skill in its default built-in mode. This uses Codex's host image_gen tool without requiring OPENAI_API_KEY.

Changes

  • Adds a Codex-specific $imagegen generation and screenshot-editing path.
  • Preserves $B resolution for existing-page screenshots.
  • Uses $D only for the local, cross-platform compare and serve board commands. Codex never runs the design binary's generation, iteration, or vision-check commands.
  • Falls back to inline images and AskUserQuestion when the board binary is unavailable.
  • Adds executable setup coverage and a real codex exec routing E2E.

Validation

  • bun test test/gen-skill-docs.test.ts --grep "Codex design-shotgun"
  • bun test test/skill-validation.test.ts --grep "Codex skill validation|\$B commands in Codex"
  • EVALS=1 EVALS_BASE=origin/main bun test test/codex-e2e.test.ts --grep "codex-design-shotgun-routing"
  • bun run gen:skill-docs --host codex --dry-run
  • bun run gen:skill-docs --dry-run
  • git diff --check

@trunk-io

trunk-io Bot commented Jul 4, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@trunk-io

trunk-io Bot commented Jul 4, 2026

Copy link
Copy Markdown

An error occurred while submitting your PR to the queue: Only users that are a part of this repo's Trunk organization or have write permissions to the repo can submit a PR to the queue

@time-attack

Copy link
Copy Markdown
Contributor

Thanks for this. The Codex path uses the wrong documented command, leaves browser resolution unavailable for screenshot evolution, and relies on non-portable board handling. Please switch to $imagegen, preserve browser resolution, make board handling portable, and add realistic Codex coverage.

@jinzheio
jinzheio force-pushed the fix/codex-design-shotgun-image-gen branch from 41bac0b to b2b5b5e Compare July 16, 2026 10:08

Copy link
Copy Markdown
Contributor Author

Thanks, addressed in b2b5b5e7.

  • Generation and screenshot edits now invoke the documented $imagegen skill in default built-in mode.
  • $B resolution is restored, and screenshot evolution loads the captured image before the $imagegen edit call.
  • The macOS-only static board was removed. Codex now uses $D compare and $D serve for the portable local board, while all $D generation, iteration, and vision-check commands remain prohibited.
  • Added executable setup coverage plus a real codex exec E2E that verifies $imagegen, $B screenshot, $D compare, and no OPENAI_API_KEY requirement.

Validated with the targeted generator and Codex skill tests, both generation dry-runs, and git diff --check.

@capy-ai

capy-ai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Landed in v1.91.66.0 (#3087): Codex $imagegen for /design-shotgun, rewritten on current main with credit to you (Co-authored-by). Thank you @jinzheio!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex design-shotgun should use image_gen instead of requiring OpenAI API keys

2 participants