Add test specification

From brabos-ai/code-addiction · View interactive version

Add test specification is an AI agent skill from the GitHub repository brabos-ai/code-addiction. Generate contract test cases from feature requirements (RFs/RNs) and technical contracts. Use when add-plan needs to produce plan-test-spec.md mapping each requirement to testable cases before implementation.

How to use this skill

Skill file

Test Specification — Contract Test Cases

<!-- uses:

-->

LANG: Respond in user's native language. Tech terms in English.

Purpose

Derive contract test cases (input → expected output) from about.md requirements (RFs/RNs) plus technical contracts in plan-*.md. Tests validate the contract, never internal implementation.

Rules

Output Format

Write to .codeadd/docs/features/${FEATURE_ID}/plan-test-spec.md:

Test Specification

Contract Tests (from RFs/RNs)

| ID | Test Case | Area | RF/RN | Input | Expected Output | Verify |

|----|-----------|------|-------|-------|-----------------|--------|

| T01 | [max 10 words] | [backend/frontend/database] | [RF/RN ID] | [request/action] | [response/result] | [assertion] |

Test File Mapping

| Area | Test File | Test IDs |

|------|-----------|----------|

| [area] | [path] | [T01, T02...] |

Coverage vs Requirements

| RF/RN | Test Cases | Status |

|-------|------------|----------|

| [RF01] | [T01, T03] | ✅ |

Handoff to RED

These specs become the RED phase in add--tdd: each row is one failing test to write first. The implementer writes the test from the contract, confirms it fails for the right reason, then implements minimal GREEN code.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.