One-click install
npx skills add https://github.com/hnabyz-bot/gate_drv --skill moai-workflow-ddd-hnabyz-bot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-workflow-ddd
Source: https://github.com/hnabyz-bot/gate_drv/tree/main/.claude/skills/moai-workflow-ddd
Command: npx skills add https://github.com/hnabyz-bot/gate_drv --skill moai-workflow-ddd-hnabyz-bot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a Domain-Driven Development (DDD) workflow that guides safe refactoring by preserving observable behavior while structure improves.

Core Features & Use Cases

  • ANALYZE: Domain boundary identification, coupling metrics, and structural analysis using AST-based patterns.
  • PRESERVE: Characterization tests and behavior snapshots to guard against regression.
  • IMPROVE: Incremental, safe transformations with repeatable steps and validation.
  • Use Case: When refactoring a large, test-backed codebase to improve architecture without altering external behavior.

Quick Start

Outline the SPEC, run the analyze phase, generate characterization tests, apply incremental improvements, and validate with the full test suite.

Frequently Asked Questions about moai-workflow-ddd

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

FAQPage Schema
How do I refactor legacy code without changing behavior?

To refactor legacy code without changing behavior, apply a Domain-Driven Development workflow using characterization tests and incremental transformations. This ensures observable behavior remains identical while structural architecture improves safely.

What is the best way to identify domain boundaries in a legacy codebase?

Identifying domain boundaries in a legacy codebase involves structural analysis using AST-based patterns to measure coupling metrics. This analysis phase maps existing dependencies to isolate domains safely before modifying code.

How do characterization tests preserve behavior during refactoring?

Characterization tests preserve behavior during refactoring by capturing current system outputs as snapshots. These snapshots act as regression guards, validating that incremental code transformations do not alter external behavior.

Can I use this DDD refactoring workflow on codebases without existing tests?

This DDD refactoring workflow targets projects with existing tests. It relies on generating characterization tests and validating incremental transformations against a full test suite to ensure behavior preservation.

What are the limitations of using AST-based patterns for domain analysis?

AST-based pattern analysis for domain analysis is limited to structural coupling metrics and syntax-level boundaries. It does not evaluate runtime behavior or external dependencies, requiring validation through comprehensive test suites.