Principles

From melodic-software/claude-code-plugins · View interactive version

Principles is an AI agent skill from the GitHub repository melodic-software/claude-code-plugins. Answers test design questions from authoritative TDD sources (Beck, Khorikov), producing WHY reasoning to improve test design decisions. Use when: 'should I mock this', 'four pillars of a good test', 'red green refactor', 'classical vs london school', 'test doubles', 'testing anti-patterns', 'resist

How to use this skill

Skill file

TDD Knowledge Base

The Beck and Khorikov files are distilled from cover-to-cover reading of those books. Two files are not: property-based-testing.md and characterization-testing.md are built from web sources, listed separately under Sources. Reference files in reference/ have author-attributed sections with synthesis where authors overlap.

Routing Table

| Query about... | Load |

|---|---|

| TDD cycle, red-green-refactor, when/why TDD, step size, courage, stress, fear | methodology-beck.md |

| What makes a good test, what to test, 3A, Fixture, test naming, parameterized tests | test-design.md |

| Mocks, stubs, fakes, mock/stub taxonomy, CQS connection, 5 mocking best practices | test-doubles.md |

| Refactoring safely, design patterns in TDD, Humble Object, four types of code | refactoring-under-test.md |

| Four Pillars of a good test, brittle tests, false positives, resistance to refactoring | four-pillars-khorikov.md |

| Code coverage metrics, branch vs statement, goal of unit testing | code-coverage-khorikov.md |

| Classical vs London school, dependency taxonomy, shared/private/out-of-process | classical-vs-london-khorikov.md |

| Observable behavior, implementation details, hexagonal architecture, encapsulation | observable-behavior-khorikov.md |

| Output/state/communication styles, functional architecture, functional core | testing-styles-khorikov.md |

| Four types of code 2x2, Humble Object, CRM refactoring, CanExecute/Execute, domain events, preconditions | testable-architecture-khorikov.md |

| Integration tests, managed vs unmanaged deps, Test Pyramid, database testing, logging, interfaces, reads vs writes | integration-testing-khorikov.md |

| Anti-patterns: private methods, exposing state, domain knowledge, code pollution, time | anti-patterns-khorikov.md |

| Beck's Money example, Value Object, Expression metaphor, Factory Method | money-example-beck.md |

| Beck's xUnit example, bootstrap, Template Method, Composite, Collecting Parameter | xunit-example-beck.md |

| Property-based testing: properties as specification, property patterns, properties beside example tests, agent-written properties | property-based-testing.md (web-sourced) |

| Legacy code, characterization tests, code that cannot be put in a test harness yet, seam types, Strangler Fig, sabotage check, pins prove sameness not correctness | characterization-testing.md (web-sourced) |

Load the most relevant file first. Load a second only if the first doesn't fully answer.

Quick decision guide (no file load needed):

Sources

Web-sourced references (not book readings)

These two files were built from web pages and papers' abstract and HTML pages read on 2026-10-06,

not from reading a book. Each file lists its sources with read depth and a recheck

trigger; this list is rechecked when either file's trigger fires.

2510.09907, NeurIPS 2025 workshop paper); Vikram et al. (arXiv 2307.04346); PROBE (ACL 2026

Findings). No property-based testing book was read.

"Characterization Testing" page; of his book Working Effectively with Legacy Code, only the

publisher's sample chapter 4 and preface; Mark Seemann's 2025 "Empirical characterization

testing" post; Martin Fowler's "Strangler Fig" page.

Naming convention

Next

/testing:write

Puts the test-design reasoning into the tests themselves.

Related

Scope boundary

This skill is knowledge (WHY behind testing decisions), not workflow (HOW to run tests). For running, filtering, or scaffolding tests, use your project's own test tooling, conventions, and workflow skills. This skill informs the design decisions those workflows execute.

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.