test-driven-development

Applies red-green-refactor testing workflow to EVA feature work, bug fixes, and refactors.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/raulisai/eva02 --skill test-driven-development-raulisai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/raulisai/eva02/tree/main/apps/eva-core/src/skills/software-development/test-driven-development
Command: npx skills add https://github.com/raulisai/eva02 --skill test-driven-development-raulisai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changing behavior in a multi-tenant platform like EVA risks breaking tenant isolation, approvals, task state transitions, and route access rules. This Skill enforces a disciplined red-green-refactor loop so every behavior change is captured by a failing test before any implementation begins. ## Core Features & Use Cases - Red-Green-Refactor Loop: Write the smallest failing test, confirm it fails for the expected reason, implement the minimal fix, then refactor while keeping tests green. - EVA Test Targets: Unit tests for services, repositories, guards, and state machines; E2E tests for API flows and mocked DB behavior; RLS verification via RLS_TEST=true npm run test:e2e. - Risk-Based Rule of Thumb: Mandates tests whenever changes touch tenant isolation, approvals, secrets, task state, or public/private route behavior. - Use Case: When fixing a bug in a NestJS guard that controls route access, first write a failing unit test reproducing the unauthorized access, then implement the minimal guard fix and run broader E2E tests to confirm no regressions. ## Quick Start Ask the agent to fix the bug in the task state machine using test-driven development, starting with a failing test that reproduces the incorrect transition.

Frequently Asked Questions about test-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply test-driven development to a NestJS bug fix?

Write the smallest failing test that reproduces the bug, confirm it fails for the expected reason, then implement the minimal fix until the test passes. Refactor afterward while keeping all tests green.

What tests should I write for EVA backend changes?

Write unit tests for services, repositories, guards, and state-machine behavior, plus E2E tests for API flows with mocked database behavior. For real RLS changes, run RLS_TEST=true npm run test:e2e when configured.

When is a test required for code changes in EVA?

A test is required whenever a change can affect tenant isolation, approvals, secrets, task state transitions, or public/private route behavior. This rule of thumb ensures security-critical paths are always covered.

Can tests use real tenant data or production services?

No. The EVA Runtime Skill Policy prohibits tests from using real tenant data, secrets, or production services. Tests must rely on mocked database behavior and isolated test environments.

When should I run broader test suites instead of focused tests?

Run broader tests when changes touch shared modules, authentication, RLS policies, or task state transitions. Focused tests suffice during the inner red-green-refactor loop for isolated behavior changes.