算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
validate-tui-in-codex【设计与创意】Visually validate an interactive CLI or terminal UI in Codex's in-app browser using a real local PTY, fixed rendering, keyboard interaction, screenshots, and session evidence. Use for TUI layout changes, terminal menus, colors, prompts, resize behavior, keyboard flows, or proof-of-work where Codex would otherwise reach for Computer Use or a desktop t…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Run the target in the bundled localhost harness, drive it through Codex's in-app browser, and attach visual evidence without controlling the user's desktop.
127.0.0.1.Determine:
100x30, changing it only when the task requires another fixed size;Do not send prompts that trigger paid or external actions unless the user authorized them. Prefer menus, navigation, local commands, and reversible state changes for visual proof.
The launcher parses the command into an executable and arguments without invoking a shell. Do not use pipes, redirects, command substitution, or environment assignments. Put complex setup into a reviewed script and launch that script.
Resolve this skill's directory from the selected SKILL.md. The runner is two directories above it at scripts/tui-proof.mjs.
Run the doctor once when diagnosing setup:
node <plugin-root>/scripts/tui-proof.mjs doctor
Doctor output is JSON. Require ok: true; when dependencies are not ready, starting the harness installs the three versions locked in runtime/package-lock.json with npm ci.
Start the harness from the target working directory in a persistent integrated-terminal session:
node <plugin-root>/scripts/tui-proof.mjs start \
--command "<command>" \
--cwd "<absolute-worktree>" \
--cols 100 \
--rows 30 \
--port 0
Wait for a line beginning with TUI_PROOF_READY. Parse its JSON and use the returned url; never guess the allocated port. The first run may install three local runtime dependencies.
Use the available control-in-app-browser skill and follow its setup instructions completely. Select the in-app browser (iab), not the user's Chrome profile.
Open the exact localhost URL from TUI_PROOF_READY. After navigation:
data-testid="status" reports running.data-testid="dimensions" matches the requested geometry.textbox "Terminal input" before sending keys.Use browser Playwright locators for keyboard interaction. Type literal text separately from Enter when submitting input. After every state-changing action, observe the smallest fresh DOM or visual state needed to confirm the result.
Exercise the requested path and collect both kinds of evidence:
/api/evidence.For resize work, change the visible Cols/Rows controls and verify data-testid="dimensions" changes. Restore the requested deterministic geometry before the final screenshot unless the resized state is the subject of the proof.
For restart/stop work, use the visible buttons and verify the status transition. Do not infer success from a click alone.
Read references/evidence-contract.md when API fields, selectors, recording format, or acceptance criteria matter.
Take a screenshot from the controlled browser tab itself. Save it under the target repository, preferably:
artifacts/tui-proof/<descriptive-name>.png
Inspect the captured image before attaching it. If the target-tab capture is visibly incomplete while the DOM snapshot proves the page is intact, wait briefly and retry once; never substitute a desktop/current-window screenshot.
Attach the image inline in the final response using its absolute local path. Also query GET /api/evidence and report:
Explicitly state that the validation used the Codex in-app browser and did not use Computer Use.
Keep the harness running only while useful for iteration. When the task is complete and the user did not ask to keep it open:
This validates a real PTY rendered by xterm.js. It does not prove behavior unique to Terminal.app, iTerm, Kitty, OS permission dialogs, native clipboard integration, or a specific terminal renderer. Escalate those cases explicitly instead of overstating the proof.