Use when: the user says "convert to CaTDD", "refactor tests to CaTDD", "apply CaTDD", "make tests comment-alive", or asks to restructure existing tests with US/AC/TC format. Helps with: converting legacy or unstructured tests into CaTDD (Comment-alive Test-Driven Development) format with structured verification design. Applies to: existing test files in any language that lack structured US/AC/TC comments.
Developers or agents who want to convert existing or legacy test files into CaTDD (Comment-alive Test-Driven Development) format so that tests become living design documents with structured verification design.
Analyze existing test files and restructure them into CaTDD format. The main deliverables are:
@[Name], @[Purpose], @[Brief], @[Expect]).The converted file is a self-contained design document that is readable by humans, parseable by LLMs, and verified by tests.
references/ alongside this skill.verifyBehavior_byCondition_expectResult.If anything is unclear, missing, or conflicting, stop and ask the user before proceeding.
Read the target test file(s) completely.
Identify the test framework being used (GTest, pytest, Jest, JUnit, etc.).
List every test case and what it appears to verify.
Identify the production code or interfaces under test.
Group tests by apparent purpose: happy path, edge case, error handling, state, concurrency, performance, etc.
Note any existing comments, docstrings, or documentation that express design intent.
Present a summary to the user:
"I found [N] tests in [file]. They appear to verify [component/feature]. Test groups: [list groups with counts]. Existing design comments: [present/absent]. Ready to convert?"
Write the OVERVIEW section:
[WHAT]: What functionality the file verifies.[WHERE]: Which module or subsystem.[WHY]: Key quality attributes (correctness, reliability, performance, etc.).SCOPE: What is in scope vs out of scope.KEY CONCEPTS: Core concepts the tests rely on.Define the Coverage Strategy:
Write User Stories (US):
US-n: As a [role], I want [capability], So that [value].Write Acceptance Criteria (AC):
AC-n: GIVEN [context], WHEN [action], THEN [outcome].Write Test Case Specifications (TC):
[@AC-n,US-n]
TC-n:
@[Name]: verifyBehavior_byCondition_expectResult
@[Purpose]: Why this test matters
@[Brief]: What the test does
@[Expect]: How to verify success
verifyBehavior_byCondition_expectResult convention if they do not already.Add the OVERVIEW section at the top of the file as a block comment.
Add the UNIT TESTING DESIGN section containing:
Restructure the IMPLEMENTATION section:
@[Name] and @[Steps] comments above each test implementation.Add the TODO/IMPLEMENTATION TRACKING section at the bottom:
Classify each test into the priority framework:
Verify every original test is accounted for in the converted file.
Verify the US → AC → TC traceability chain is complete.
Verify tests still compile and pass (do not break existing tests).
Identify coverage gaps: scenarios that should be tested but are not.
Present a conversion report:
"Conversion complete for [file]:
- User Stories: [count]
- Acceptance Criteria: [count]
- Test Cases converted: [count]
- Priority distribution: P1=[count], P2=[count], P3=[count], P4=[count]
- Coverage gaps found: [list or none]
- All original tests preserved: [Yes/No]"
references/CaTDD_UserGuide.md — Full CaTDD user guide with examples and workflow.references/CaTDD_DesignPrompt.md — CaTDD methodology specification with priority framework and quality gates.references/CaTDD_ImplTemplate.cxx — C++ implementation template showing the complete CaTDD file structure.