Logo: Tdd

Tdd

Organisatioun
AgentiveStack
tdd

Implement a feature or fix using pragmatic test-driven development. Tracer-bullet approach — one test, one implementation, repeat. Tests verify behavior through public interfaces, not implementation details. Use when implementing a slice from /slice or any work that needs tests.

Iwwersiicht

EditeurAgentiveStack
Repositoryskills
Skill-Nummtdd
Stären
72
Forks
17
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    AgentiveStack huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Tdd an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/AgentiveStack/skills/tree/main/tdd
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AgentiveStack/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/tdd .claude/skills/tdd
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Tdd an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Tdd automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Tdd net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Pragmatic Test-Driven Development

Implement features using vertical tracer bullets: one test → one implementation → repeat. Tests describe WHAT the system does, not HOW it does it.

Philosophy

Good tests exercise real code paths through public interfaces. They read like specifications: "visitor is bucketed consistently across sessions" tells you exactly what capability exists. These tests survive refactors because they don't care about internals.

Bad tests mock internal collaborators, test private methods, or verify implementation details. Warning sign: test breaks when you refactor, but behavior hasn't changed.

Pragmatic mode (default): test-first for core logic and boundary contracts. Implementation-first for UI and glue code, but still write tests for complex state management. Always write tests — the question is only whether they come before or after the code.

Process

1. Discover project context

Read domain documentation relevant to the work:

  1. docs/contexts/<name>/CONTEXT.md — invariants and contracts to verify
  2. docs/UBIQUITOUS_LANGUAGE.md — use domain terms in test names

Also discover the project's test infrastructure:

  • Find existing test files to understand patterns and conventions
  • Identify the test runner and configuration (package.json scripts, vitest/jest config)
  • Find test utilities, factories, or helpers already in use

2. Plan the tests

Before writing any code:

  • Identify behaviors to test — not implementation steps. Frame as: "A [actor] can [action] resulting in [observable outcome]"
  • Classify each behavior:
    • Core logic / domain rules → test-first (RED → GREEN)
    • Context boundary contracts → test-first (RED → GREEN)
    • API endpoints with non-trivial logic → test-first
    • UI components / glue code → implement first, test after if complex
    • Trivial wiring → skip tests
  • Identify what to mock — ONLY at system boundaries:
    • External APIs (Stripe, OpenAI, etc.) → mock
    • Databases → prefer test database or in-memory substitute; mock only if no alternative
    • Time, randomness → mock
    • Your own modules → NEVER mock. Test through the real code.
  • List behaviors in priority order

Present the plan to the user. Confirm which behaviors to test and the testing approach.

3. Tracer bullet

Write ONE test that confirms ONE thing about the system — the simplest possible end-to-end path:

RED:   Write test → test fails (confirms test infrastructure works)
GREEN: Write minimal code to pass → test passes

This proves the path works. Don't optimize, don't handle edge cases yet.

4. Incremental loop

For each remaining behavior:

RED:   Write next test → fails
GREEN: Minimal code to pass → passes

Rules:

  • One test at a time — don't write the next test until the current one passes
  • Only enough code to pass the current test — don't anticipate future tests
  • Keep tests focused on observable behavior through public interfaces
  • Run all tests after each GREEN to catch regressions

5. Refactor

After a group of related tests pass, look for refactoring opportunities:

  • Extract duplication (in code, not in tests — test duplication is OK)
  • Deepen modules (move complexity behind simpler interfaces)
  • Apply SOLID principles where they emerge naturally
  • Consider what the new code reveals about existing code

Never refactor while RED. Get to GREEN first, then refactor.

Run all tests after each refactor step.

6. Update domain documentation

If the implementation revealed new invariants, clarified contracts, or surfaced terminology changes:

  • Update docs/contexts/<name>/CONTEXT.md
  • Update docs/UBIQUITOUS_LANGUAGE.md
  • Consider an ADR if a hard-to-reverse, surprising trade-off was made

Checklist per cycle

[ ] Test name describes behavior in domain language (not implementation)
[ ] Test uses public interface only
[ ] Test would survive internal refactor
[ ] Test mocks only at system boundaries (external APIs, DB, time)
[ ] Code is minimal for this test — no speculative features
[ ] All existing tests still pass

When to mock

DependencyApproach
External API (Stripe, OpenAI)Mock — you don't control it
DatabasePrefer test DB or in-memory substitute. Mock as last resort.
Time / randomnessMock — tests must be deterministic
File systemUsually mock. Use temp dirs if testing file I/O specifically.
Your own modulesNEVER mock. Test through the real code path.
Internal collaboratorsNEVER mock. If you need to mock your own code, the interface needs redesigning.

Anti-patterns

  • Horizontal slicing: writing all tests first, then all implementation. Produces tests that test imagined behavior, not actual behavior.
  • Testing implementation: verifying internal state, mocking internal modules, testing private methods.
  • Over-testing: testing every getter, every trivial function. Focus on behaviors that matter.
  • Test-after-forget: writing code without tests and "planning to add them later." In pragmatic mode, UI can be implementation-first, but tests should follow immediately.

Related skills

  • /slice — break work into slices before implementing with TDD
  • /spec — create the spec that defines what to build
  • /domain — stress-test the design against the domain model

Heefeg gestallte Froen

Wat mécht de KI-Skill Tdd?

Implement a feature or fix using pragmatic test-driven development. Tracer-bullet approach — one test, one implementation, repeat. Tests verify behavior through public interfaces, not implementation details. Use when implementing a slice from /slice or any work that needs tests.

Firwat Tdd op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Tdd besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Tdd an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/AgentiveStack/skills/tree/main/tdd an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Tdd benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Tdd benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Tdd domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Tdd gratis?

Jo. AgentiveStack huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇