From tdd-pbt
Use after the Property Red phase to implement the minimal code that makes a failing property pass for ALL generated inputs. Triggers on phrases like "make the property pass", "property green phase", "yes proceed to Green", "let's go property green". Unlike TDD Green, hardcoded returns are not acceptable — the implementation must generalize across all generated inputs. Stops and waits for user approval before Refactor.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tdd-pbt:property-greenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`/tdd-pbt:property-green` launches the `property-green` agent to implement the minimal code that makes a failing property pass for **all** generated inputs. This is Step 3 of the Property-First Development cycle.
/tdd-pbt:property-green launches the property-green agent to implement the minimal code that makes a failing property pass for all generated inputs. This is Step 3 of the Property-First Development cycle.
Check whether .tdd-pbt/config.yml exists in the current working directory.
If it exists: read the language field. Use it for all subsequent steps.
If it does not exist: ask the user:
AskUserQuestion:
question: "Which language and PBT library will you use for this project?"
header: "Language setup"
options:
- label: "Java + jqwik 1.9.3"
description: "Java project using Maven, JUnit 5, and jqwik 1.9.3"
- label: "TypeScript + fast-check + Vitest"
description: "TypeScript project using Vitest and fast-check"
Then write .tdd-pbt/config.yml to the current working directory:
language: java # or typescript
Confirm: "Language set to . Config written to .tdd-pbt/config.yml."
Collect context from the user's invocation or the current codebase state:
src/test/java/<package>/<ClassName>Properties.javasrc/<ClassName>.properties.test.tssrc/main/java/<package>/<ClassName>.javasrc/<ClassName>.tsCall the property-green agent with all collected context as the prompt. Include:
Language: <java|typescript>
Properties file: <path to properties file>
Failing property: "<propertyMethodName>"
Property asserts: <description of what the property checks>
Counterexample: <shrunk input from PBT framework>
Implementation file: <path to production code>
The agent will:
mvn test and verify the property now passesnpx vitest run and verify the property now passesAfter the agent completes and reports "Green phase complete", wait for the user to confirm before proceeding to /tdd-pbt:refactor.
In TDD Green, a hardcoded return value is acceptable because the test checks one specific input.
In PBT Green, hardcoding is not acceptable — the property must hold for all generated inputs. The implementation must be general enough to satisfy the property across the full input space, while still being minimal (only satisfying the current property, not future ones).
After Green phase completes: use /tdd-pbt:refactor (the same refactor agent as TDD) to improve code quality, then loop back to /tdd-pbt:property-red for the next property.
.tdd-pbt/config.yml if it already exists.npx claudepluginhub gtrefs/tdd-pbt-plugin --plugin tdd-pbtGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.