Skip to Content
Getting StartedIntroduction

Introduction

MoAI-ADK is an AI-based development environment, a comprehensive toolkit for efficiently generating high-quality code.

Notation Guide

In this documentation, command prefixes indicate the execution environment:

  • Claude Code commands entered in the chat window

    > /moai plan "feature description"
  • Terminal commands entered in the terminal

    moai init my-project

Core Concepts

MoAI-ADK is based on SPEC-based TDD/DDD methodology and ensures code quality through the TRUST 5 quality framework.

What is SPEC? (Easy Understanding)

SPEC (Specification) is “documenting conversations with AI.”

The biggest problem with Vibe Coding is context loss:

  • 😰 Content discussed with AI for 1 hour disappears when the session ends
  • 😰 To continue work the next day, you must explain from the beginning
  • 😰 For complex features, results differ from intentions

SPEC solves this problem:

  • ✅ Permanently preserve requirements by saving them to files
  • ✅ Can continue work by reading just the SPEC even if session ends
  • ✅ Define clearly without ambiguity using EARS format

One-line summary: Yesterday’s discussion about “JWT authentication + 1 hour expiration + refresh token” - no need to re-explain today. Just /moai run SPEC-AUTH-001 and start implementation immediately!

What is TDD? (Easy Understanding)

TDD (Test-Driven Development) is “a method where you write tests before writing code.”

Using exam preparation as an analogy:

  • 📝 Write the grading criteria (tests) first — naturally fails since the feature doesn’t exist yet
  • 💡 Write minimal code to pass the criteria — exactly what’s needed, nothing more
  • Refine to better code — improve while keeping tests passing

MoAI-ADK automates this process with the RED-GREEN-REFACTOR cycle:

PhaseMeaningWhat it does
🔴 REDFailWrite a test for a feature that doesn’t exist yet
🟢 GREENPassWrite minimal code to make the test pass
🔵 REFACTORImproveImprove code quality while keeping tests passing

What is DDD? (Easy Understanding)

DDD (Domain-Driven Development) is “a safe code improvement method.”

Using home remodeling as an analogy:

  • 🏠 Without destroying the existing house, improve one room at a time
  • 📸 Take photos of the current state before remodeling (= characterization tests)
  • 🔧 Work on one room at a time, checking each time (= incremental improvement)

MoAI-ADK automates this process with the ANALYZE-PRESERVE-IMPROVE cycle:

PhaseMeaningWhat it does
ANALYZEAnalyzeUnderstand current code structure and problems
PRESERVEPreserveRecord current behavior with tests (safety net)
IMPROVEImproveMake incremental improvements while tests pass

Development Methodology Selection

MoAI-ADK automatically selects the optimal development methodology based on your project’s state.

MethodologyTargetCycle
TDDNew projects or 10%+ coverageRED → GREEN → REFACTOR
DDDExisting projects with < 10% coverageANALYZE → PRESERVE → IMPROVE

MoAI-ADK v2.5.0+ uses binary methodology selection (TDD or DDD only). The hybrid mode has been removed for clarity and consistency. Methodology is auto-selected during moai init and can be changed via development_mode in .moai/config/sections/quality.yaml.

TRUST 5 Quality Framework

TRUST 5 is based on 5 core principles:

PrincipleDescription
Tested85% coverage, characterization tests, behavior preservation
ReadableClear naming conventions, consistent formatting
UnifiedUnified style guide, auto-formatting
SecuredOWASP compliance, security verification, vulnerability analysis
TrackableStructured commits, change history tracking

Go Edition Features

MoAI-ADK 2.5 is a complete rewrite of the Python Edition in Go for maximum performance and efficiency.

AspectPython EditionGo Edition
Distributionpip + venv + dependenciesSingle binary, zero dependencies
Startup time~800ms interpreter boot~5ms native execution
Concurrencyasyncio / threadingNative goroutines
Type safetyRuntime (mypy optional)Compile-time enforced
Cross-platformPython runtime requiredPrebuilt binaries (macOS, Linux, Windows)

Key Numbers

  • 34,220 lines of Go code, 32 packages
  • 85-100% test coverage
  • 28 specialized AI agents + 52 skills
  • 18 programming languages supported
  • 16 Claude Code hook events

System Requirements

PlatformSupported EnvironmentsNotes
macOSTerminal, iTerm2Fully supported
LinuxBash, ZshFully supported
WindowsWSL (recommended), PowerShell 7.x+Native cmd.exe is not supported

Prerequisites:

  • Git must be installed on all platforms
  • Windows users: WSL (Windows Subsystem for Linux) is recommended for the best experience

Core Values

MoAI-ADK delivers the following core values:

  • SPEC-based TDD/DDD: A structured methodology for documenting requirements and developing incrementally with TDD (default) or DDD for legacy code
  • TRUST 5 Quality Framework: Five principles ensuring testing, readability, unification, security, and traceability
  • 28 Specialized Agents: An AI agent team specialized for each stage of development
  • 52 Skills: An extensible skill library supporting diverse development scenarios
  • Multilingual Support: Support for 4 languages: Korean, English, Japanese, and Chinese
  • Sequential Thinking MCP: Structured problem-solving through step-by-step reasoning
  • Ralph-Style LSP Integration: LSP-based autonomous workflow with real-time quality feedback

Key Features

MoAI-ADK provides 28 specialized AI agents and 52 skills to automate and optimize the entire development workflow.

Agent Categories

CategoryCountKey Agents
Manager8spec, ddd, tdd, docs, quality, project, strategy, git
Expert8backend, frontend, security, devops, performance, debug, testing, refactoring
Builder3agent, skill, plugin
Team8researcher, analyst, architect, designer, backend-dev, frontend-dev, tester, quality

Model Policy (Token Optimization)

MoAI-ADK assigns optimal AI models to each of 28 agents based on your Claude Code subscription plan. This maximizes quality within your plan’s rate limits.

PolicyPlan🟣 Opus🔵 Sonnet🟡 HaikuBest For
HighMax $200/mo2314Maximum quality, highest throughput
MediumMax $100/mo4195Balanced quality and cost
LowPlus $20/mo01216Budget-friendly, no Opus access

The Plus $20 plan does not include Opus access. Setting Low ensures all agents use only Sonnet and Haiku, preventing rate limit errors. Higher plans benefit from Opus on critical agents (security, strategy, architecture) while using Sonnet/Haiku for routine tasks.

Key Agent Model Assignment

AgentHighMediumLow
manager-spec, manager-strategy, expert-security🟣 opus🟣 opus🔵 sonnet
manager-ddd/tdd, expert-backend/frontend🟣 opus🔵 sonnet🔵 sonnet
manager-quality, team-researcher🟡 haiku🟡 haiku🟡 haiku

Dual Execution Modes

Two execution modes are available: --solo (Sub-Agent mode) and --team (Agent Teams mode). Both modes autonomously determine whether to run sequentially or in parallel. Without a flag, MoAI-ADK analyzes task complexity and automatically selects the optimal mode.

FlagModeExecution
--soloSub-Agent ModeSequential expert agent delegation
--teamAgent Teams ModeParallel team collaboration
(none)Auto SelectionAutonomously determined by complexity
/moai run SPEC-AUTH-001 # Auto selection /moai run SPEC-AUTH-001 --team # Force Agent Teams mode (parallel) /moai run SPEC-AUTH-001 --solo # Force Sub-Agent mode (sequential)

SPEC-First Workflow

MoAI-ADK follows a 3-phase development workflow. The methodology in the Run phase is automatically selected based on project state:

New Feature Development:

/moai plan → /moai run SPEC-XXX → /moai sync SPEC-XXX

Bug Fix:

/moai fix (or /moai loop) → /moai review → /moai sync

Refactoring:

/moai plan → /moai clean → /moai run SPEC-XXX → /moai review → /moai coverage → /moai codemaps

Documentation Update:

/moai codemaps → /moai sync

Multilingual Support

MoAI-ADK supports 4 languages:

  • 🇰🇷 Korean (Korean)
  • 🇺🇸 English (English)
  • 🇯🇵 Japanese (Japanese)
  • 🇨🇳 Chinese (Chinese)

You can select your preferred language in the installation wizard or change it directly in the configuration file.

LSP Integration

LSP (Language Server Protocol) is the standard communication protocol between code editors and language tools. It provides real-time detection of errors, type issues, and lint results, offering instant feedback to developers.

Ralph-Loop Style is an autonomous workflow that uses LSP diagnostic results as a feedback loop. When quality issues are detected, fix agents are automatically invoked and the cycle repeats until quality standards are met.

MoAI-ADK provides autonomous workflows through Ralph-Loop Style LSP integration:

  • LSP-based completion marker auto-detection: Automatically detects when work is complete
  • Real-time regression detection: Catches errors before they become problems
  • Auto-completion trigger: Automatically completes when 0 errors, 0 type errors, 85% coverage achieved

Ralph-Loop Style LSP integration automates quality gates in the development workflow, maintaining high code quality without manual intervention.

💡 Save 50~70% Tokens with GLM

GLM is an AI model fully compatible with Claude Code. In CG Mode, combining a Claude Opus leader with GLM-5 teammates enables 50~70% token savings on implementation-heavy tasks.

CG Mode: Claude + GLM Agent Team

In CG Mode, Claude Opus orchestrates the entire workflow while GLM-5 teammates handle implementation tasks in parallel at a fraction of the cost.

RoleModelResponsibilities
LeaderClaude OpusOrchestration, architecture decisions, code review
TeammatesGLM-5Code implementation, test writing, documentation
Task TypeRecommended ModeSavings
Implementation-heavy SPEC (/moai run)CG Mode50~70% savings
Code generation, tests, documentationCG Mode50~70% savings
Architecture design, security reviewClaude onlyRequires Opus reasoning

Switching to GLM

# Switch to GLM backend moai glm # GLM Worker mode start (Opus leader + GLM-5 teammates) moai glm --team # CG Mode (Claude leader + GLM teammates, tmux required) moai cg # Return to Claude backend moai cc

If you don’t have a GLM account yet, sign up at z.ai (10% additional discount) . Rewards from sign-ups are used for MoAI open source development. 🙏

Getting Started

To start your MoAI-ADK journey:

  1. Installation - Install MoAI-ADK on your system
  2. Initial Setup - Run the interactive setup wizard
  3. Quick Start - Create your first project
  4. Core Concepts - Deepen your understanding of MoAI-ADK

Key Benefits

BenefitDescription
Quality AssuranceMaintain consistent quality with TRUST 5 framework
ProductivityReduce development time with AI agent automation
Cost Efficiency70% cost savings with GLM 5
ScalableFlexible scaling with modular architecture
MultilingualSupport for 4 languages

Additional Resources


Next Steps

Learn about MoAI-ADK installation in the Installation Guide.

Last updated on