← ClaudeAtlas

hive-finding-seamslisted

Use when existing code has untestable dependencies that prevent writing tests -- direct construction of collaborators, static or global function calls, tight coupling to external systems, or singleton access patterns. Specifically for identifying substitution points (seams) that make legacy or tightly-coupled code testable without editing at the call site. Do NOT use for greenfield TDD (see tdd), general test writing patterns (see testing), or refactoring already-tested code (see refactoring).
ImRaffy14/hivemind · ★ 0 · Testing & QA · score 62
Install: claude install-skill ImRaffy14/hivemind
# Finding Seams For writing tests that document existing behavior once you have seams, load the `characterisation-tests` skill. For test-driving new behavior, load the `tdd` skill. For general test patterns, load the `hive-testing` skill. For refactoring after tests are in place, load the `refactoring` skill. **Deep-dive resources** are in the `resources/` directory. Load them on demand: | Resource | Load when... | |----------|-------------| | `seam-types.md` | Need detailed FP-first examples of each seam type in TypeScript | | `creating-seams.md` | Need to introduce a seam where none exists, with before/after examples | | `oop-patterns.md` | Encountering legacy class-based code -- object seams, subclass and override, constructor injection | ## Core Concept > A **seam** is a place where you can alter behavior in your program without editing in that place. Every seam has an **enabling point** -- the place where you choose which behavior to activate. The source code at the seam stays identical in production and test; only the enabling point differs. *-- Michael Feathers, Working Effectively with Legacy Code (2004)* **Connection to hexagonal architecture:** Ports are designed-in seams. A port defines a contract (the seam), and the composition root chooses which adapter to wire in (the enabling point). If your code already uses hex arch, you have seams everywhere -- this skill is for code that lacks them. See the `hexagonal-architecture` skill. ## When to Use - Cannot c