hns-lsel-applier
Local Self-Evolution Loop (LSEL) APPLY engine — the playback-only consumer of approved decision.json records that drives `.moai/hooks/lsel-apply.sh` for the…
Test-Driven Development workflow specialist using RED-GREEN-REFACTOR cycle for test-first software development. Use when developing new features from scratch or when behavior specification drives implementation.
$ npx -y skills add modu-ai/moai-adk --skill moai-workflow-tdd --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/moai-workflow-tddContext preview
The summary Claude sees to decide when to auto-load this skill.
Test-Driven Development workflow specialist using RED-GREEN-REFACTOR cycle for test-first software development. Use when developing new features from scratch or when behavior specification drives implementation.
name: moai-workflow-tdd description: > Test-Driven Development workflow specialist using RED-GREEN-REFACTOR cycle for test-first software development. Use when developing new features from scratch or when behavior specification drives implementation. when_to_use: > Use for Test-Driven Development: the RED-GREEN-REFACTOR cycle for test-first software development, new-feature implementation from scratch, and behavior-specification-driven implementation. license: Apache-2.0 compatibility: Designed for Claude Code allowed-tools: Read, Write, Edit, Bash(pytest:*), Bash(ruff:*), Bash(npm:*), Bash(npx:*), Bash(node:*), Bash(jest:*), Bash(vitest:*), Bash(go:*), Bash(cargo:*), Bash(mix:*), Bash(uv:*), Bash(bundle:*), Bash(php:*), Bash(phpunit:*), Grep, Glob user-invocable: false metadata: version: "1.0.0" category: "workflow" status: "active" updated: "2026-02-03" modularized: "true" tags: "workflow, tdd, test-driven, red-green-refactor, test-first" author: "MoAI-ADK Team" related-skills: "moai-workflow-ddd, moai-workflow-testing, moai-foundation-quality" # MoAI Extension: Progressive Disclosure progressive_disclosure: enabled: true level1_tokens: 100 level2_tokens: 5000
[NOTE] This workflow is selected based on `.moai/config/sections/quality.yaml`:
constitution: development_mode: tdd # or ddd
**When to use this workflow**:
**Key distinction**:
Test-Driven Development provides a disciplined approach for creating new functionality where tests define the expected behavior before implementation.
Core Cycle - RED-GREEN-REFACTOR:
When to Use TDD:
When NOT to Use TDD:
---
TDD Approach:
DDD Approach:
The golden rule of TDD is that tests must be written before implementation code:
---
The RED phase focuses on defining the desired behavior through a failing test.
Before writing any implementation code:
Follow the Arrange-Act-Assert pattern:
The test must fail initially:
The GREEN phase focuses on writing minimal code to satisfy the test.
Write only enough code to make the test pass:
Run the test to confirm it passes:
The REFACTOR phase focuses on improving code quality while maintaining behavior.
With passing tests as a safety net:
After each refactoring step:
---
When executing TDD through manager-develop:
Step 1 - Understand Requirements:
Step 2 - RED Phase:
Step 3 - GREEN Phase:
Step 4 - REFACTOR Phase:
Step 5 - Repeat:
Agentic development harness for Claude Code — SPEC-driven plan/run/sync, TRUST 5 quality gates, model+effort routing, and Claude×GLM multi-LLM cost control. Single Go binary, 16 languages, zero deps.
Repo: modu-ai/moai-adk
Local Self-Evolution Loop (LSEL) APPLY engine — the playback-only consumer of approved decision.json records that drives `.moai/hooks/lsel-apply.sh` for the…
Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001).…
moai-adk-go best-practices reference for the 4 harness specialists (cli-template-specialist, quality-specialist, workflow-specialist, hook-ci-specialist).…
moai-adk-go local dev reference — version management/release process (sec 5), shell-script hook development (sec 7), build & dev commands (sec 10). Load only…
moai-adk-go domain-patterns reference for the 4 harness specialists (cli-template-specialist, quality-specialist, workflow-specialist, hook-ci-specialist).…
HARD i18n rules digest for the oss-docs harness specialists working on moai-adk-go README 4-locale set and the docs-site (adk.mo.ai.kr). Covers the…