원클릭으로
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when implementing any feature or bugfix, before writing implementation code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Appliquer les règles de développement et la mémoire technique durable de gba_translator/Pokémon Unbound. Utiliser pour toute tâche dans ce dépôt, notamment avant de planifier, modifier, tester, déboguer ou relire le pipeline ROM, les traductions FR/IT/DE, l'encodage CFRU, les patchs binaires, l'émulateur mGBA ou le workflow Git.
Use when fixing any bug or patch script in gba_translator — before closing the ticket, verify the fix does not break (or silently already affects) the other registered languages (FR/IT/DE/Indie). Covers deciding whether a change is shared or per-language, which test paths and rebuild targets to run, and how to check a base-ROM quirk against every language.
Use when building or rebuilding the French ROM of Pokémon Unbound end-to-end — from a translation_ready.json through make build-fr, the post-build patch chain, and validation.
Use before any new feature, pipeline change, or architectural decision — explores intent and design before implementation
Review a diff against project rules and acceptance criteria before merging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
| name | test-driven-development |
| description | Use when implementing any feature or bugfix, before writing implementation code |
| when_to_use | New features, bug fixes, refactoring, behavior changes in gba_translator |
Write the test first. Watch it fail. Write minimal code to pass.
Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.
Project rule: 100% test pass rate is MANDATORY. No skips, no workarounds.
# Run all tests
pytest tests/
# Run specific test
pytest tests/unit/test_<module>.py::test_name -v
# Run with coverage
pytest --cov=src tests/
# Run unit tests only
pytest tests/unit/
# Run integration tests only
pytest tests/integration/
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Write code before the test? Delete it. Start over.
Place test in tests/unit/test_<module>.py or tests/integration/.
def test_decode_french_accent():
encoder = PokemonEncoder()
result = encoder.decode(bytes([0xAC])) # é
assert result == "é"
Run:
pytest tests/unit/test_text_encoder.py::test_decode_french_accent -v
Confirm: test FAILS because feature is missing, not due to a typo.
Write the simplest possible implementation in src/:
class PokemonEncoder:
def decode(self, data: bytes) -> str:
return CHARMAP.get(data[0], "?")
Run:
pytest tests/unit/test_text_encoder.py::test_decode_french_accent -v
Confirm: PASS. All other tests still pass (pytest tests/).
After green only:
src/core/)Keep tests green. Don't add behavior.
tests/unit/ or tests/integration/src/core/, src/text/, src/inject/, etc.test_<module>.pytests/ alongside test filesBefore marking work complete:
pytest tests/ → 0 failuresCan't check all boxes? You skipped TDD. Start over.
| Excuse | Reality |
|---|---|
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
| "I'll test after" | Tests passing immediately prove nothing. |
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
| "99.9% is close enough" | Project-rules.md: 100% is mandatory. |
| "Skip for this offset edge case" | Never. Fix generically, not with hardcoded exceptions. |