← AI DevKitCONTENT HISTORY

Update to AI DevKit

Snapshot Sep 30, 2026 · 23:15 UTC · version 0.62.1

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "tdd",
  "description": "AI DevKit · Test-driven development — write a failing test before writing production code. Use when implementing new functionality, adding behavior, or fixing bugs during active development.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 283
    }
  ],
  "skill_md_contents": "---\nname: tdd\ndescription: AI DevKit · Test-driven development — write a failing test before writing production code. Use when implementing new functionality, adding behavior, or fixing bugs during active development.\n---\n\n# TDD\n\nRed. Green. Refactor. In that order, every time.\n\n## Hard Rules\n\n- No production code without a failing test first.\n- If production code was written before its test, delete it and start over with a failing test.\n- Never skip the red step. A test that has never failed proves nothing.\n\n## Cycle\n\nFor each unit of behavior:\n\n1. **Red** — Write a test for the next behavior. Run it. It must fail. Read the failure message — it should describe the missing behavior.\n2. **Green** — Write the minimum production code to make the test pass. Nothing more. Run the test. Apply the `verify` skill.\n3. **Refactor** — Clean up both test and production code. Run the test again. Still green? Done. Apply the `verify` skill.\n\nThen pick the next behavior and repeat.\n\n## Rules for Each Step\n\n**Red:**\n- Test one behavior, not one function. Name the test after what the system should do, not what the function is called.\n- The test must fail for the right reason — a missing method, wrong return value, unmet condition. Not a syntax error or import failure.\n- If the test passes immediately, it's not testing new behavior. Delete it or pick a different behavior.\n\n**Green:**\n- Write the simplest code that passes. Hardcode if needed — the next test will force generalization.\n- Do not add code \"while you're in there.\" If it's not required by a failing test, it doesn't exist yet.\n- Do not refactor during green. Pass first, clean second.\n\n**Refactor:**\n- Remove duplication between test and production code.\n- Extract only when you see real duplication, not predicted duplication.\n- Tests must still pass after every refactor move. Run them after each change.\n\n## Anti-Patterns\n\n| Pattern | Problem | Fix |\n|---|---|---|\n| Test-after | Code shapes the test instead of the other way around | Delete the code, write the test first |\n| Testing internals | Tests break on refactor, not on behavior change | Test public behavior only |\n| Giant red step | Multiple behaviors in one test | One assertion per behavior |\n| Gold-plating green | Adding code no test requires | Remove untested code |\n| Skipping refactor | Tech debt accumulates immediately | Refactor before the next red |\n| Mock-heavy tests | Tests pass but real code fails | Prefer real dependencies, mock at boundaries only |\n\n## Red Flags and Rationalizations\n\n| Rationalization | Why It's Wrong | Do Instead |\n|---|---|---|\n| \"This is too simple to test first\" | Simple code still needs a spec | Write the test — it'll be fast |\n| \"I'll add the test right after\" | You won't, and the code will shape the test | Test first, always |\n| \"I need to see the design first\" | The test IS the design | Let the test drive the interface |\n| \"Mocking is too hard for this\" | Difficulty mocking signals tight coupling | Fix the design, then test |\n| \"The test would be identical to the implementation\" | Then you're testing internals | Test the behavior from the outside |\n\n## Memory Integration\n\nAfter completing a TDD session, store reusable test patterns (setup, assertions, fixtures): `npx ai-devkit@latest memory store --title \"<pattern>\" --content \"<details>\" --tags \"tdd,testing\"`\n"
}

SHA-256: 323d2bad874a5b496269f1f5040820da0973da94c5100272d107688f0500eceb