tdd-workflow
Test-Driven Development workflow. Triggers on: 'TDD', 'test first', 'write tests'.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Test-Driven Development workflow. Triggers on: 'TDD', 'test first', 'write tests'.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Evaluate architectural decisions, propose ADRs. Triggers on: 'architecture review', 'ADR', 'design review'.
Perform structured code reviews. Triggers on: 'code review', 'review code', 'review PR'.
Create GitHub pull requests. Triggers on: 'create PR', 'pull request', 'submit PR'.
Evaluate strategic direction changes before execution. Triggers on: 'direction change', 'strategic decision', 'pivot'.
Triage and organize GitHub issues. Triggers on: 'triage', 'triage issues', 'organize backlog'.
Create new custom agent definition. Triggers on: 'create agent', 'new agent'.
| name | tdd-workflow |
| description | Test-Driven Development workflow. Triggers on: 'TDD', 'test first', 'write tests'. |
Write failing tests first, then implement code to make them pass.
When to use: RECOMMENDED for all feature issues. REQUIRED when the issue has Given/When/Then acceptance criteria. The acceptance criteria on the issue ARE your test specifications.
┌─────────────────────────────────────────────┐
│ 1. RED │ Write a failing test │
├─────────────────────────────────────────────┤
│ 2. GREEN │ Write minimal code to pass │
├─────────────────────────────────────────────┤
│ 3. REFACTOR │ Improve code, keep tests green │
└─────────────────────────────────────────────┘
↑ │
└────────────────────────────────────┘
Convert each Given/When/Then into a test case.
Create test file before implementation.
| Language | Pattern | Example |
|---|---|---|
| Python | test_<module>.py | test_logout.py |
| JavaScript | <module>.test.js | logout.test.js |
| TypeScript | <module>.spec.ts | logout.spec.ts |
| Go | <module>_test.go | logout_test.go |
uv run pytest tests/path/test_module.py -v
Expected output: RED (failing test)
Write just enough to make the test pass.
Expected output: GREEN (all tests pass)
Improve code quality while keeping tests green:
"""Tests for [feature] - Issue #XXX"""
import pytest
class TestFeatureName:
"""Tests for [acceptance criteria group]"""
@pytest.fixture
def setup_data(self):
"""Given: [precondition]"""
return create_test_data()
def test_when_action_then_result(self, setup_data):
"""
Given: [precondition]
When: [action]
Then: [expected result]
"""
result = function_under_test(setup_data)
assert result == expected_value
def test_edge_case(self, setup_data):
"""Edge case: [description]"""
pass
tests/ mirror of src/)