Skip to content

Commit dbce3d1

Browse files
committed
Improve cli-tmux-tester spawnerPrompt to clarify when to use for UI
testing
1 parent 999c6cb commit dbce3d1

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.agents/cli-tmux-tester.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@ const definition: AgentDefinition = {
55
displayName: 'CLI Tmux Tester',
66
model: 'anthropic/claude-opus-4.5',
77

8-
spawnerPrompt: `Expert at testing Codebuff CLI functionality using tmux.
8+
spawnerPrompt: `**REQUIRED for CLI UI validation.** Verifies that React components actually render correctly in the terminal using tmux.
99
10-
**What it does:** Spawns tmux sessions, sends input to the CLI, captures output, and validates behavior.
10+
**⚠️ IMPORTANT:** TypeScript typechecks do NOT catch OpenTUI rendering failures. Components can compile perfectly but crash or render blank at runtime due to OpenTUI's strict reconciliation rules (see cli/knowledge.md). This agent is the only way to verify UI changes work.
1111
12-
**What you get back (structured output):**
13-
- \`overallStatus\`: "success" | "failure" | "partial"
14-
- \`summary\`: What was tested and the outcome
15-
- \`testResults\`: Array of {testName, passed, details, capturedOutput}
16-
- \`scriptIssues\`: Array of {script, issue, errorOutput, suggestedFix} - **YOU should fix these!**
17-
- \`captures\`: Array of {path, label} - file paths to terminal captures you can read
12+
**You MUST spawn this agent after:**
13+
- Creating or modifying files in \`cli/src/components/\`
14+
- Changing layouts, flex patterns, or responsive behavior
15+
- Adding new UI features (cards, grids, interactive elements)
16+
- Porting UI code from another branch
1817
19-
**Paper trail:** Session logs are saved to \`debug/tmux-sessions/{session}/\`. Use \`read_files\` to view them.
18+
**Do NOT skip this step** just because typechecks and unit tests pass. Those verify code correctness, not rendering correctness.
2019
21-
**Your responsibilities as the parent agent:**
22-
1. If \`scriptIssues\` is not empty, fix the scripts in \`scripts/tmux/\` based on the suggested fixes
23-
2. Use \`read_files\` on the capture paths to see what the CLI displayed
24-
3. Re-run the test after fixing any script issues`,
20+
**Crafting the right test prompt:** Think carefully about what CLI input will actually trigger the component you want to test. For example:
21+
- To test \`ImplementorGroup\`: Use \`@editor-multi-prompt add a comment to some-file.ts\` (triggers multiple implementor agents)
22+
- To test agent rendering: Send a prompt that spawns agents (e.g., \`find files related to X\`)
23+
- To test error states: Intentionally trigger an error condition
24+
The tmux tester will execute whatever prompt you specify, so be specific about what user input should trigger the UI you're verifying.
25+
26+
**After it runs:** Use \`read_files\` on the capture paths to see what the CLI displayed. If \`scriptIssues\` is not empty, fix the scripts in \`scripts/tmux/\`.`,
2527

2628
inputSchema: {
2729
prompt: {
2830
type: 'string',
2931
description:
30-
'Description of what CLI functionality to test (e.g., "test that the help command displays correctly", "verify authentication flow works")',
32+
'Description of what to test. Examples: "verify the new ImplementorGroup component renders cards in a grid", "test that the help command displays correctly", "check responsive layout at different terminal widths", "verify authentication flow works"',
3133
},
3234
},
3335

0 commit comments

Comments
 (0)