tdd-implementation
Skill0 starsChanged 4 months agoMITView on GitHub
GREEN-phase role for implementing code to make failing tests pass — supports both frontend (React/Next.js) and backend (Python/FastAPI).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- gimso2x/claude-harness-slim-templatetheir own version, first seen Nov 8, 2026
- felipeArnold/filament-ai-skillstheir own version, first seen Jun 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- felipeArnold/filament-ai-skills★ 9same name
- gimso2x/claude-harness-slim-template★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- aristotleSkill
- dorothySkill
- eikoSkill
- harness-adoptSkill
- occamSkill
- perlmanSkill
- propose-issueSkill
- quineSkill
- retroSkill
- tdd-test-writerSkill
- zahaSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 12 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
After tests pass and all quality checks are clean, hand back to Dorothy's push routine.
- Very specific: line 22
Run /caveman ultra at task start to compress implementation-phase output.
- Very specific: line 30
Test files (*.test.ts, *.test.tsx, __tests__/, tests/)
- Distinctive: line 34
Read failing tests to understand expected contracts and behavior.
- Distinctive: line 36
Run the test suite.
- Distinctive: line 37
Run language-specific quality checks (see below).
- Very specific: line 45
If a failing test was written as a regression gate for a named prior bug (PR or commit references "regression test for X", "would have …
- Distinctive: line 55
All tests pass, no regressions
- Distinctive: line 56
All quality checks clean (see language-specific sections)
- Distinctive: line 57
No test files written or modified
- Distinctive: line 97
Run the repo's control-plane risk gate (if present) — confirm no gate violations
- Very specific: line 98
All new interactive elements have aria-label / aria-labelledby
- Very specific: line 99
All test-targeted elements have data-testid
- Distinctive: line 107
Must also never touch: Alembic migration files (autogenerate only.
- Distinctive: line 119
db_api / DAO: all SQLAlchemy queries; return ORM models
- Very specific: line 124
All DB + I/O is async/await
- Distinctive: line 125
Use injected session dependency.
- Distinctive: line 130
Never access relationships after session close
≈ “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
Skill: TDD Implementation
Goal
Make the failing tests pass with clean, well-structured code. This is Dorothy's GREEN phase.
Next Step
After tests pass and all quality checks are clean, hand back to Dorothy's push routine. Do not open a PR from this phase — Dorothy handles the full push → CI → PR cycle.
Token budget
Run /caveman ultra at task start to compress implementation-phase output. Before writing commit messages or PR bodies, run /normal mode. If the caveman plugin is not installed, proceed without it.
Role
Owns source files across frontend and backend. In the TDD workflow, implements code
to make pre-written failing tests pass (GREEN phase). Does not write test files —
that is the tdd-test-writer role.
Must Never Touch
- Test files (
*.test.ts,*.test.tsx,__tests__/,tests/) - Other repos
TDD Workflow — GREEN Phase
- Read failing tests to understand expected contracts and behavior.
- Implement the required code.
- Run the test suite.
- Run language-specific quality checks (see below).
- Report to orchestrator: "Implementation complete, all tests passing."
If test files have errors (e.g., type errors), flag them back to
tdd-test-writer— do not silently modify test files.
Regression gates — do not land the fix alone
If a failing test was written as a regression gate for a named prior bug (PR or commit
references "regression test for X", "would have caught Y", etc.), the tdd-test-writer
role must additionally demonstrate the test fails against a simulated pre-fix version
of the code before the commit lands — see tdd-test-writer SKILL.md → "Regression
gate tests — prove the gate". If that demonstration is missing, flag it back; do not
report GREEN on the basis of "test passes against my fix" alone. A regression test
that has only been verified against the fix proves nothing about whether it would
have caught the bug.
Done Criteria
- All tests pass, no regressions
- All quality checks clean (see language-specific sections)
- No test files written or modified
- Orchestrator notified with results
PR-ready boundary
- PR-ready boundary = local test suite green + lint/typecheck clean + acceptance criteria addressed.
- This phase does not open the PR (see "Next Step" above — that's Dorothy's job, per Dorothy SKILL.md → "Pre-PR discipline" → "Draft PR for Quine review"). Once this phase's Done Criteria are met, hand back to Dorothy's push routine, which opens the PR as a draft and manages
gh pr readytiming. See also Occam SKILL.md → "Ship to staging routine" Path A.
Frontend (React / Next.js)
File Ownership
- Source files: components, pages, hooks, lib (excluding lib/test/), theme
- Mocks, stories, synthetic monitoring checks
- Config: jest config, next config, tsconfig, eslint config
Quality Checks
yarn test --watchAll=false # All tests pass
yarn tsc --noEmit # No TypeScript errors
yarn lint # No ESLint errorsTypeScript errors in test files are NOT caught by lint, build, or test. If the test-writer has type errors, flag them back — do not silently change test files to work around them.
Accessibility Requirements
aria-labelon all interactive elements without visible text (icon buttons, icon-only links, form controls without a label element)aria-labelledbywhen pointing at existing visible textdata-testidon any element tests need to target: key buttons, links, form fields, sections, modals, list items
Code Style
- TypeScript strict mode; full type annotations; no
anywithout justification - Functional components; React.memo where beneficial
- Styling: MUI
sxprop for one-offs; Emotionstyled()for reusable styles - PascalCase for component files/directories; camelCase for hooks and utils
Additional Done Criteria
- Run the repo's control-plane risk gate (if present) — confirm no gate violations
- All new interactive elements have
aria-label/aria-labelledby - All test-targeted elements have
data-testid
Backend (Python / FastAPI)
File Ownership
- Source files: routers, managers, db, schemas, auth, utils, integrations, workers
- Must also never touch: Alembic migration files (autogenerate only; never hand-edit existing migrations)
Quality Checks
pytest tests # All tests pass
black . # No-op (code already formatted)
flake8 . # No lint errorsArchitecture Layers
- Routers (thin): validate input → call manager → return response
- Managers (business logic): own business logic; hold DB API instances as class attributes
- db_api / DAO: all SQLAlchemy queries; return ORM models
- Schemas (Pydantic v2): separate request vs. response models
- Exceptions: raise from
utils.exceptions(e.g.,NotFoundException)
Async / Session Rules
- All DB + I/O is
async/await - Use injected session dependency; no manual commit/close in route handlers
- One session per request
ORM Safety
- Eager-load relationships with
selectinload/joinedload - Never access relationships after session close
- Build nested trees manually in manager layer
Code Style
- Black formatter (120-char line length)
- Flake8 with import-order, quotes, naming plugins
- Full type hints on all signatures
snake_casefor files, functions, variables;PascalCasefor classes
Part of kromatic-dev-stack by Kromatic. Questions on this development stack, how to use it, or how to integrate it with your team — reach us at kromatic.com/contact-us.
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.

