agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Comprehensive test-driven development orchestrator with language-aware test generation and Red-Green-Refactor workflow automation
How it fires
How this command gets triggered: by you, by Claude, or both.
/tddContext preview
What this command does when you run it.
Comprehensive test-driven development orchestrator with language-aware test generation and Red-Green-Refactor workflow automation
allowed-tools: Task, Read, Write, Edit, MultiEdit, Bash(fd:*), Bash(rg:*), Bash(eza:*), Bash(bat:*), Bash(jq:*), Bash(gdate:*), Bash(mvn:*), Bash(gradle:*), Bash(cargo:*), Bash(go:*), Bash(deno:*) name: "Tdd" description: "Comprehensive test-driven development orchestrator with language-aware test generation and Red-Green-Refactor workflow automation" author: "wcygan" tags: ["test","run"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize TDD session and analyze project architecture
# Initialize TDD session state
echo '{
"sessionId": "'$SESSION_ID'",
"tddTarget": "'$ARGUMENTS'",
"detectedLanguage": "auto-detect",
"testingFramework": "auto-detect",
"tddPhase": "red",
"testFilePath": "",
"implementationPath": ""
}' > /tmp/tdd-session-$SESSION_ID.jsonSTEP 2: Language-aware project analysis with intelligent framework detection
TRY:
CASE detected_language: WHEN "rust":
WHEN "go":
WHEN "java":
WHEN "typescript" OR "javascript":
WHEN "unknown":
STEP 3: Intelligent test file creation with language-specific patterns
FOR target_component IN $ARGUMENTS:
CASE language: WHEN "rust":
**Rust TDD Implementation:**
// FOR library crates: src/lib.rs or src/component.rs
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_${target_component}_${expected_behavior}() {
// Arrange
// Act
// Assert
assert_eq!(actual, expected);
}
#[test]
fn test_${target_component}_edge_cases() {
// Test boundary conditions and error cases
}
}// FOR integration tests: tests/${target_component}_test.rs
use project_name::*;
#[test]
fn integration_test_${target_component}() {
// Integration test implementation
}WHEN "go":
**Go TDD Implementation:**
// ${target_component}_test.go
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test${TargetComponent}_${ExpectedBehavior}(t *testing.T) {
// Table-driven tests
tests := []struct {
name string
input InputType
expected ExpectedType
wantErr bool
}{
{
name: "valid input",
input: validInput,
expected: expectedOutput,
wantErr: false,
},
{
name: "invalid input",
input: invalidInput,
expected: zeroValue,
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result, err := ${target_component}(tt.input)
if tt.wantErr {
assert.Error(t, err)
return
}
assert.NoError(t, err)
assert.Equal(t, tt.expected, result)
})
}
}WHEN "java":
**Java TDD Implementation (JUnit 5):**
// src/test/java/.../ComponentNameTest.java
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import static org.junit.jupiter.api.Assertions.*;
class ${TargetComponent}Test {
private ${TargetComponent} ${targetComponent};
@BeforeEach
void setUp() {
${targetComponent} = new ${TargetComponent}();
}
@Test
@DisplayName("Should ${expected_behavior} when ${condition}")
void should${ExpectedBehavior}When${Condition}() {
// Arrange
var inputA lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies