ds-tdd-mode
Skill20 starsChanged 46 days agoMITView on GitHub
Drive implementation with tests, one vertical slice at a time.
In this repository52 other files it gives its agents.
- ds-dev-skill-benchSkill
- ds-agent-reviewSkill
- ds-architecture-planSkill
- ds-arenaSkill
- ds-blast-radiusSkill
- ds-blueprintSkill
- ds-bug-reviewSkill
- ds-clarity-reviewSkill
- ds-code-quality-reviewSkill
- ds-comment-reviewSkill
- ds-data-modeSkill
- ds-data-reviewSkill
- ds-debugSkill
- ds-deslopSkill
- ds-doc-quality-reviewSkill
- ds-exploreSkill
- ds-git-modeSkill
- ds-go-reviewSkill
- ds-grill-meSkill
- ds-handoffSkill
- ds-howSkill
- ds-humanizeSkill
- ds-interaction-modeSkill
- ds-java-reviewSkill
- ds-notebook-reviewSkill
- ds-onboardingSkill
- ds-osvSkill
- ds-perf-planSkill
- ds-project-checkpointSkill
- ds-project-resumeSkill
- ds-python-reviewSkill
- ds-quality-gateSkill
- ds-reflectSkill
- ds-retroSkill
- ds-roadmapSkill
- ds-rust-reviewSkill
- ds-security-reviewSkill
- ds-semgrepSkill
- ds-shell-reviewSkill
- dsSkill
- ds-specSkill
- ds-step-modeSkill
- ds-test-modeSkill
- ds-test-quality-reviewSkill
- ds-tiger-style-modeSkill
- ds-tldtSkill
- ds-ts-reviewSkill
- ds-ui-modeSkill
- ds-ui-quality-reviewSkill
- ds-verify-thisSkill
- ds-zig-reviewSkill
- ds-zoom-outSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
When active, build the feature test-first.
- Distinctive: line 11
Do not write all tests before any implementation.
- Distinctive: line 32
Verify through a side channel (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When active, build the feature test-first. Each test verifies observable behavior through a public interface — never implementation details.
Anti-pattern: horizontal slicing
Do not write all tests before any implementation. Tests written against imagined behavior verify guessed data shapes, not real user-facing outcomes. Slice vertically instead: one test, one implementation, repeat.
Workflow
- Plan — Confirm the interface changes needed. List the behaviors to test, highest-value first. Design for testability (see below). Get user approval before writing code.
- Tracer bullet — Prove the path end to end: one test, then the minimal implementation that passes it.
- Incremental loop — Write one test, implement the minimal code to pass it. Do not anticipate future tests.
- Refactor — Only once tests pass. Remove duplication and apply design principles while keeping every test green.
Good tests vs bad tests
Good tests:
- Exercise real code paths through the public API
- Describe WHAT the system does, not HOW
- Make one logical assertion
- Survive internal refactors unchanged
Bad tests — red flags:
- Mock internal collaborators
- Assert on call counts or call order
- Test private methods
- Verify through a side channel (e.g. a raw DB query) instead of the interface
- Recompute the expected value the way the code does (
assert add(a, b) == a + b) — the test can never disagree with the code. Draw expected values from an independent source: a known-good literal, a worked example, or the spec. - Break during refactoring when behavior has not changed
A test that breaks on a behavior-preserving refactor is coupled to implementation. Rewrite it against the interface.
Design for testability
- Inject dependencies — accept them as parameters; do not construct them inside the unit.
- Prefer pure functions — return results rather than mutating shared state.
- Keep the API surface small — fewer methods and parameters mean fewer test scenarios. Deep modules (small interface, substantial hidden implementation) test better than shallow ones.
- Mock only at system boundaries — external APIs, the database, time, randomness, the filesystem. Never mock your own classes or internal collaborators; prefer a real or in-memory implementation (mocking internals couples the test to the design).
Output
For each slice: the test, then the implementation. Report which behaviors remain untested.
Confirm activation with "TDD mode active." Activating a mode only turns on this posture; it is not approval to begin work — continue with whatever the user already asked for, or wait for their next instruction.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

