Install
openclaw skills install @afonsoft/tdd-specTest-driven development using the approved SPEC SDD as the source of truth. Reads .specs/SPEC-{YYYYMMDD}-{feature}.md, turns requirements and acceptance criteria into red-green-refactor vertical slices. Use when implementing a feature or bugfix after the SPEC is approved. User-facing questions and recommendations must be in Portuguese (pt-BR). Part of the afonsoft/skills collection.
openclaw skills install @afonsoft/tdd-specTest-driven development guided by the approved SPEC SDD. The SPEC is the single source of truth. Every test is derived from a numbered requirement or acceptance criterion.
Internal reasoning and commands are in English. All questions and explanations to the user are in Portuguese (pt-BR).
.specs/SPEC-{YYYYMMDD}-{feature}.md exists with Status: Approved.Draft.[A DEFINIR]).Load .specs/SPEC-{YYYYMMDD}-{feature}.md and identify:
RF-001, RF-002, ...).Given...when...then.If the SPEC is not approved, stop and invoke /grill-me-with-spec.
Order the work by the task plan (Section 7). Each slice is one requirement or one acceptance criterion. Never write all tests upfront.
For each slice:
RED → Write one test that exercises a public seam and fails.
GREEN → Write the minimum code that passes the test.
REFACTOR → Clean duplication, improve names, respect SOLID while green.
Test behavior through public interfaces (API, function, component), not internal implementation. Tests must survive internal refactors. See tests.md for examples and mocking.md for mock rules.
For each test, include a comment or description pointing to the source requirement:
# Covers RF-003: order total must include tax
# Covers AC-02: Given an empty cart, when checking out, then the system returns 422
After every slice:
Report progress to the user in Portuguese:
Slice concluido: [RF-XXX / AC-YYY]
- Teste: [PASS/FAIL]
- Build: [PASS/FAIL]
- Lint: [PASS/FAIL]
Proximo slice: [PROXIMO].
Posso continuar?
When all slices are green:
docs/qa/test-plan-<feature>.md or equivalent if it exists./qa-analyst for the mandatory pre-PR review.| Mistake | Fix |
|---|---|
| Implementing before the test | Write the failing test first. |
| The test does not map to the SPEC | Link every test to RF-### or AC-###. |
| Slice too large | Break the slice until one behavior is tested. |
| Not running the full suite after a green test | Re-validate before moving on. |
grill-me-with-spec — for producing the SPEC SDDqa-analyst — for the mandatory pre-PR reviewdiagnose — when a test fails unexpectedly and the cause is uncleartests.md — test examples and patternsmocking.md — mocking rulesrefactoring.md — refactoring guidancedeep-modules.md — deep module designinterface-design.md — interface design patterns