Execute tests following TDD cycle: RED (verify test fails) → GREEN (implement to pass) → REFACTOR. Interprets tests.json and performs steps using available tools (browser MCP, API, CLI, etc.). WHEN TO USE: - Starting implementation of a ticket with TDD: yes - After writing test spec (3-spec.md) and tests.json - When user says "run tests", "test this", "TDD cycle" - After fixing a failing test REQUIRES: - Ticket with 3-spec.md - tests.json in .pmc/docs/tests/tickets/T0000N/
Executes tests using TDD methodology (RED→GREEN→REFACTOR) with trajectory recording. Triggers on "run tests" or TDD commands, using tests.json to orchestrate browser, API, CLI, and database actions with verification.
/plugin marketplace add jayprimer/pmc-marketplace/plugin install jayprimer-pmc-plugins-pmc@jayprimer/pmc-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Execute tests following TDD methodology with trajectory recording.
ALWAYS run /pmc:kb first to understand test format and TDD workflow.
1. RED (required for TDD tickets)
└── Run test BEFORE implementation
└── Verify it fails (expected behavior)
└── Record red_verified timestamp
2. GREEN
└── Implement minimal code to pass
└── Run test again
└── Record trajectory
3. REFACTOR
└── Clean up code (keep tests green)
└── Run tests to confirm still passing
└── Record refactor notes in trajectory
Read: .pmc/docs/tests/tickets/T0000N/tests.json
If no tests.json exists:
Format: See kb/references/test-formats.md (config and setup sections)
Check config section for app_url, db settings. Execute setup array before tests.
Purpose: Confirm test fails because feature doesn't exist yet.
[RED] 2024-01-15T09:00:00 - Verified test fails: {reason}
red_verified timestamp in tests.json4-progress.md with RED statusIf test PASSES in RED phase:
[GREEN] 2024-01-15T10:30:00 - Implementation started
do: browser:navigate:/login → OK
verify: browser:element:#login-form exists → PASS
"status": "passed" or "status": "failed"4-progress.md with GREEN status[REFACTOR] 2024-01-15T11:00:00 - Extracted validation logic
| Action | Tool Call |
|---|---|
browser:navigate:{path} | mcp__chrome-devtools__navigate_page |
browser:click:{selector} | mcp__chrome-devtools__click |
browser:fill:{selector}={value} | mcp__chrome-devtools__fill |
browser:wait:{ms} | Wait or mcp__chrome-devtools__wait_for |
| Action | Command |
|---|---|
api:GET:{path} | curl -s {app_url}{path} |
api:POST:{path}:{body} | curl -s -X POST -d '{body}' {app_url}{path} |
| Action | Command |
|---|---|
cli:{command} | Bash: {command} |
script:{path} | Bash: uv run python {path} or appropriate runner |
| Action | Implementation |
|---|---|
db:{SQL} | Execute via CLI or API depending on setup |
Execute each item in verify array:
| Pattern | How to Check |
|---|---|
browser:url contains {text} | mcp__chrome-devtools__take_snapshot → check URL |
browser:element:{sel} exists | mcp__chrome-devtools__take_snapshot → find element |
browser:element:{sel} text={v} | Snapshot → check text content |
| Pattern | How |
|---|---|
screenshot:{name} | mcp__chrome-devtools__take_screenshot → save to screenshots/ |
| Pattern | How |
|---|---|
exit:0 | Check command exit code |
output contains {text} | Check stdout |
| Pattern | How |
|---|---|
status:{code} | Check HTTP status |
body.{field} == {value} | Parse JSON response |
Critical: Every action and result must be recorded.
Format: See kb/references/test-formats.md (trajectory section)
Quick reference:
do: {action} → OK | FAIL ({reason})
verify: {check} → PASS | FAIL ({actual vs expected})
Format: See kb/references/test-formats.md (status section)
status: "passed" with full trajectory4-progress.md with TDD cycles (RED/GREEN/REFACTOR dates)status: "failed" with failure details in trajectorystatus: "blocked" with blocked_reasonExecute teardown array from tests.json after tests complete.
For ticket with multiple tests:
required: true tests## Test Summary
| Test | Status | Notes |
|------|--------|-------|
| T00001-01 | passed | Login flow |
| T00001-02 | passed | Logout flow |
| T00001-03 | blocked | Needs OAuth setup |
red_verified timestamp set$ /pmc:test T00001
## Test: T00001 - User Authentication
### T00001-01: Login flow
**RED Phase**
Running test before implementation...
- do: browser:navigate:/login → OK
- verify: browser:element:#login-form exists → FAIL (expected)
RED verified at 2024-01-15T09:00:00
**GREEN Phase**
Implementation complete. Running test...
- do: browser:navigate:/login → OK
- verify: browser:element:#login-form exists → PASS
- do: browser:fill:#email=test@example.com → OK
- do: browser:click:#submit → OK
- verify: browser:url contains /dashboard → PASS
- verify: screenshot:dashboard → SAVED
Status: PASSED
### Summary
| Test | Status |
|------|--------|
| T00001-01 | passed |
Ticket T00001: 1/1 required tests passed
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.