Skip to content
/

MoAI-ADK

moai-adk · modu-ai/moai-adk · ★ 1.0k · last commit 2026-05-25

Implements Harness Engineering as a Go-binary-installed Claude Code environment with auto-TDD/DDD methodology selection, 20-event hook coverage, self-evolving V3R4 harness, and MX-tag in-code context annotations.

Best whenAuto-select TDD vs DDD based on test coverage; run /simplify after every REFACTOR/IMPROVE; let the harness learn from usage and mutate itself — quality is no…
vs seeds
claude-flowin scale (programmatic, hook-heavy, multi-agent) but implemented as a compiled Go binary rather than JavaScript/MCP, and…
Primitive shape 81 total
Commands 17 Skills 30 Subagents 13 Hooks 20 MCP tools 1
00

Summary

MoAI-ADK — Summary

MoAI-ADK (v2.6.0+) is the most technically sophisticated framework in this batch: a single Go binary (moai) that installs a complete "Harness Engineering" environment for Claude Code, including 17+ slash commands routing through a unified natural-language dispatcher, 30 specialized skills, 7 named agents, and 20 lifecycle hook events (the largest hook surface in this batch). Its core thesis is "Harness Engineering" — designing the environment for AI agents rather than writing code directly: engineers write SPECs, configure quality gates, and set up feedback loops; agents do the implementation. MoAI automatically selects TDD (new projects, 10%+ coverage) or DDD (existing projects, <10% coverage) methodology. The /batch skill spawns dozens of parallel agents in isolated git worktrees for large-scale work. The /simplify skill runs automatically after every REFACTOR/IMPROVE phase. A self-evolving "V3R4 harness" lifecycle lets the harness learn and mutate. Compared to seeds, MoAI-ADK is closest to claude-flow in its programmatic scale (38,700+ lines, 38 packages) and hook count, but differs by being a compiled Go binary with near-zero startup time, and by having the most comprehensive hook event surface of any framework analyzed.

01

Overview

MoAI-ADK — Overview

Origin

MoAI-ADK is developed by modu-ai (Korea). Originally Python (~73,000 lines); rewritten in Go for performance. 3 contributors, 1030 stars as of May 2026. Actively developed (pushed May 2026). Available in English, Korean, Japanese, Chinese.

Philosophy

The central thesis is Harness Engineering:

"The purpose of vibe coding is not rapid productivity but code quality." "Human steers, agents execute. The engineer's role shifts from writing code to designing the harness: SPECs, quality gates, and feedback loops."

The framework implements this through:

  • Self-Verify Loop: Agents write code → test → fail → fix → pass cycle autonomously
  • Context Map: Codebase architecture maps always available
  • Session Persistence: progress.md tracks completed phases; interrupted runs resume
  • Failing Checklist: Acceptance criteria registered as pending tasks at run start
  • Garbage Collection: Periodic removal of dead code and AI slop
  • Scaffolding First: Empty file stubs before implementation to prevent entropy

Automatic Methodology Selection

New project or 10%+ coverage → TDD (RED → GREEN → REFACTOR)
Existing project < 10% coverage → DDD (ANALYZE → PRESERVE → IMPROVE)

Auto-detected at moai init, overridable via --mode <tdd|ddd>.

Key Numbers

  • 38,700+ lines of Go code
  • 38 packages
  • 85-100% test coverage
  • 26 specialized AI agents + 47 skills
  • 18 programming languages supported
  • 27 Claude Code hook events (actual registered: 20 distinct events seen in settings.json)

Go Rewrite Rationale

Aspect Python Edition Go Edition
Startup time ~800ms ~5ms
Distribution pip + venv Single binary
Concurrency asyncio Native goroutines
Type safety Runtime Compile-time
02

Architecture

MoAI-ADK — Architecture

Distribution

  • Type: Single Go binary (prebuilt for macOS, Linux, Windows/WSL)
  • Install: curl -fsSL https://raw.githubusercontent.com/modu-ai/moai-adk/main/install.sh | bash
  • Language: Go 1.26+
  • Version analyzed: latest main (May 2026)

Installation

# macOS / Linux / WSL
curl -fsSL https://raw.githubusercontent.com/modu-ai/moai-adk/main/install.sh | bash

# Windows (PowerShell 7.x+)
irm https://raw.githubusercontent.com/modu-ai/moai-adk/main/install.ps1 | iex

# Build from source
git clone https://github.com/modu-ai/moai-adk.git
cd moai-adk && make build

Directory Tree (post-init)

project/
├── .claude/
│   ├── settings.json            # 20 hook events configured
│   ├── agents/
│   │   └── moai/                # 7 agent definitions
│   │       ├── builder-harness.md
│   │       ├── evaluator-active.md
│   │       ├── manager-develop.md
│   │       ├── manager-docs.md
│   │       ├── manager-git.md
│   │       ├── manager-spec.md
│   │       └── plan-auditor.md
│   ├── commands/
│   │   └── moai/                # 17 slash commands
│   ├── hooks/
│   │   └── moai/                # 33 hook handler shell scripts
│   ├── rules/
│   │   └── moai/                # Core rules (constitution, workflow, protocols)
│   └── skills/
│       └── moai/                # Skills organized by type
│           ├── SKILL.md         # Unified orchestrator (main entry)
│           ├── team/            # 6 team agent files
│           └── workflows/       # 20 workflow files
├── .moai/
│   ├── config/
│   │   └── sections/
│   │       └── quality.yaml     # development_mode (tdd|ddd)
│   └── project/
│       └── codemaps/
├── CLAUDE.md                    # Project identity + agent catalog
└── CLAUDE.local.md              # Local overrides

Required Runtime

  • Git (required)
  • Go binary (zero external dependencies)
  • macOS, Linux, or Windows/WSL

Target AI Tools

Claude Code exclusively. The binary installs into .claude/ directory structure.

Go Package Structure (38 packages)

cmd/           # CLI entry points
internal/      # Core implementation
pkg/           # Shared packages
03

Components

MoAI-ADK — Components

Commands (17 slash commands, all route through unified moai skill)

Command Subcommand Purpose
/moai brain brain (alias: ideate) Pre-spec ideation — 7-phase idea-to-proposal pipeline
/moai plan plan (alias: spec) SPEC document creation (EARS format)
/moai run SPEC-XXX run (alias: impl) DDD/TDD implementation workflow
/moai sync sync (alias: docs, pr) Documentation sync + PR creation
/moai design design (alias: brief) Hybrid design workflow
/moai project project (alias: init) Project docs generation
/moai feedback feedback (alias: fb) GitHub issue creation
/moai fix fix Auto-fix errors in single pass
/moai loop loop Iterative auto-fix until done
/moai mx mx MX tag annotation for codebase
/moai review review Code review with security + MX compliance
/moai clean clean (alias: dead-code) Dead code removal
/moai codemaps codemaps Architecture documentation generation
/moai coverage coverage (alias: cov) Test coverage analysis
/moai e2e e2e E2E test creation and execution
/moai gate gate (alias: check) Pre-commit quality gate
/moai security security (alias: audit) OWASP security audit

Plus: release-update, harness (V3R4 self-evolving lifecycle).

Skills (30 skill files in .claude/skills/moai/)

Organized by domain:

  • moai-foundation-core — core principles
  • moai-foundation-quality — quality gates
  • moai-foundation-thinking — reasoning patterns
  • moai-foundation-cc — Claude Code specifics
  • moai-workflow-tdd — TDD workflow
  • moai-workflow-ddd — DDD workflow
  • moai-workflow-spec — SPEC management
  • moai-workflow-loop — iterative fix loop
  • moai-workflow-design — design workflow
  • moai-workflow-project — project docs
  • moai-workflow-ci-loop — CI integration
  • moai-workflow-gan-loop — GAN-style evaluation loop
  • moai-workflow-testing — test strategy
  • moai-workflow-worktree — git worktree management
  • moai-design-system — design system patterns
  • moai-domain-* (7 domain skills) — backend, frontend, database, brand design, copywriting, ideation, research, design handoff
  • moai-ref-* (5 reference skills) — API patterns, git workflow, OWASP checklist, React patterns, testing pyramid
  • moai-harness-learner — V3R4 harness learning
  • moai-meta-harness — Meta-harness orchestration

Agents (7 in .claude/agents/moai/)

Agent Purpose
builder-harness.md Implementation + test execution
evaluator-active.md Active code evaluation
manager-develop.md Development workflow management
manager-docs.md Documentation management
manager-git.md Git operations management
manager-spec.md SPEC document management
plan-auditor.md Plan auditing and validation

Team Agents (6 in .claude/skills/moai/team/)

Agent Purpose
debug.md Debug team agent
glm.md General language model coordination
plan.md Planning team agent
review.md Code review team agent
run.md Implementation team agent
sync.md Documentation sync team agent

Hooks (20 events, 33 handler scripts)

All events registered in .claude/settings.json:

Event Handler Script
SessionStart handle-session-start.sh
PreCompact handle-compact.sh
SessionEnd handle-session-end.sh
PreToolUse (Write/Edit/Bash) handle-pre-tool.sh
PostToolUse (Write/Edit) handle-post-tool.sh
Stop handle-stop.sh + handle-harness-observe-stop.sh
SubagentStop handle-subagent-stop.sh + harness observe
PostToolUseFailure handle-post-tool-failure.sh
SubagentStart handle-subagent-start.sh
UserPromptSubmit handle-harness-observe-user-prompt-submit.sh
TeammateIdle handle-teammate-idle.sh
TaskCompleted handle-task-completed.sh
TaskCreated handle-task-created.sh
ConfigChange handle-config-change.sh
StopFailure handle-stop-failure.sh
PostCompact handle-post-compact.sh
InstructionsLoaded handle-instructions-loaded.sh
CwdChanged handle-cwd-changed.sh
FileChanged handle-file-changed.sh
PermissionDenied handle-permission-denied.sh + handle-permission-request.sh

Plus: status-transition-ownership.sh, sync-phase-quality-gate.sh, team-ac-verify.sh

MCP Server

.mcp.json present in repo — MCP server integration configured.

State Files

  • .moai/config/sections/quality.yaml — development mode
  • .moai/project/codemaps/ — architecture documentation
  • progress.md — session progress tracking
05

Prompts

MoAI-ADK — Prompts

Prompt 1: Unified Orchestrator (moai SKILL.md) — Natural Language Router

Source: .claude/skills/moai/SKILL.md

Technique: Priority-ordered natural language routing with explicit subcommand matching before semantic classification.

---
name: moai
description: >
  MoAI unified orchestrator for autonomous development. Routes natural
  language or subcommands (brain, plan, run, sync, design, project, fix,
  loop, mx, feedback, review, clean, codemaps, coverage, e2e, harness) to
  specialized agents.
allowed-tools: Agent, AskUserQuestion, Skill, TaskCreate, TaskUpdate, TaskList, 
               TaskGet, Bash, Read, Write, Edit, Glob, Grep

## Intent Router

### Priority 1: Explicit Subcommand Matching
[HARD] Extract the FIRST WORD from the Raw User Input. If it matches any subcommand
(or its alias), route to that workflow IMMEDIATELY. Do NOT analyze the remaining text.

- **brain** (aliases: ideate, idea): Pre-spec ideation
- **plan** (aliases: spec): SPEC document creation
- **run** (aliases: impl): DDD/TDD implementation
- **sync** (aliases: docs, pr): Documentation + PR
- ...

### Priority 2: SPEC-ID Detection
Only if Priority 1 did not match: Check if input contains SPEC-XXX pattern.
If found, route to **run** workflow automatically.

### Priority 3: Natural Language Classification
Only if BOTH Priority 1 AND 2 did not match: Classify entire input semantically.

### Priority 4: Default Behavior
If ambiguous: AskUserQuestion with top 2-3 matching workflows.

Notable technique: Strict priority chain (exact match → ID match → semantic → ask) prevents the routing from being confused by similar-sounding but different commands.


Prompt 2: Execution Mode Flags

Source: .claude/skills/moai/SKILL.md

Technique: Automatic complexity-based execution mode selection with explicit flag overrides.

## Execution Mode Flags (mutually exclusive)

- `--team`: Force Agent Teams mode for parallel execution
- `--solo`: Force sub-agent mode (single agent per phase)
- No flag: System auto-selects based on complexity thresholds 
  (domains >= 3, files >= 10, or complexity score >= 7)

When no flag is provided, the system evaluates task complexity and automatically 
selects between team mode (for complex, multi-domain tasks) and sub-agent mode 
(for focused, single-domain tasks).

Notable technique: Automatic complexity-based mode selection — the agent assesses domains and file count to decide whether to spawn a full team or a single subagent. No other framework automates this decision.


Prompt 3: MX Tag Protocol

Source: .claude/rules/moai/workflow/mx-tag-protocol.md (referenced in SKILL.md)

Technique: Inline code annotation system. MX tags are structured comments embedded in code that carry semantic context for agents. The /moai mx command scans and annotates codebases; the review command checks for MX compliance.

This is unique in the corpus — a framework-native code annotation protocol for encoding agent context directly in source files.

09

Uniqueness

MoAI-ADK — Uniqueness & Positioning

differs_from_seeds

MoAI-ADK is closest to claude-flow in its programmatic scale (both have large codebases, extensive hook coverage, and multi-agent orchestration), but differs fundamentally in implementation: claude-flow is JavaScript/SQLite/MCP, MoAI-ADK is Go/file-based/compiled binary. The hook event surface (20 events, 33 handlers) exceeds all seeds — spec-kit has 18 hooks (2 per command), but MoAI registers TeammateIdle, TaskCompleted, TaskCreated, InstructionsLoaded, CwdChanged, FileChanged, PermissionDenied events that no seed framework uses. The automatic TDD/DDD methodology selection based on code coverage is unique across all seeds and this batch. The MX tag protocol (in-code annotations as persistent agent context) and the self-evolving V3R4 harness lifecycle are also unique. Most similar to superpowers in enforcing quality gates automatically, but MoAI goes further with 20 hooks vs. superpowers' 1.

Positioning

MoAI-ADK targets teams who want the highest possible automation density in their Claude Code environment. It is the most complete "batteries included" harness: 17 commands, 30 skills, 7 named agents, 6 team agents, 20 hook events, auto-methodology selection, auto-simplify, auto-PR, self-evolving harness. The Go binary makes it startup-fast and dependency-free.

Distinctive Opinions

  1. "Harness Engineering" — the engineer's job is designing the environment, not writing code.
  2. Auto-methodology selection — TDD vs. DDD should be determined by current coverage, not human choice.
  3. /simplify auto-runs after every REFACTOR/IMPROVE — quality review is not optional.
  4. MX tags — context should live in code alongside the code, not only in external documents.
  5. Self-evolving harness — the framework should learn from usage and update its own behavior.

Observable Failure Modes

  1. Claude Code only: No multi-runtime support despite Go binary.
  2. Complexity: 20 hooks, 33 handler scripts, 30 skills — the most complex deployment in this batch. High cognitive overhead.
  3. Korea-origin bias: Primary documentation and community in Korean; English docs are translations and may lag.
  4. V3R4 harness stability: Self-evolving system means the harness can change behavior unpredictably without rollback discipline.

Explicit Antipatterns

Not documented in the README, but the framework's constitution (.claude/rules/moai/core/moai-constitution.md) likely contains them — unavailable in the public repo tree.

Cross-References

Cites /simplify and /batch as Claude Code native skills that MoAI invokes — suggesting tight coupling with the broader Claude Code ecosystem.

04

Workflow

MoAI-ADK — Workflow

Primary Workflow

/moai project → /moai plan "description" → /moai run SPEC-XXX → /moai sync SPEC-XXX

Phases

Phase Command Artifact
0. Ideation (optional) /moai brain 7-phase idea-to-proposal package
1. Project docs /moai project product.md, structure.md, tech.md
2. Plan /moai plan "description" SPEC-XXX.md with EARS requirements + acceptance criteria
3. Implement (TDD/DDD) /moai run SPEC-XXX Source code + tests
4. Sync /moai sync SPEC-XXX Updated docs + PR created

TDD Methodology (Default for New/10%+ Coverage)

RED → GREEN → REFACTOR
  • RED: Write failing test defining expected behavior
  • GREEN: Minimal code to pass
  • REFACTOR: Improve quality; /simplify runs automatically after REFACTOR

DDD Methodology (Existing <10% Coverage)

ANALYZE → PRESERVE → IMPROVE
  • ANALYZE: Read code, identify domain boundaries
  • PRESERVE: Write characterization tests (snapshot current behavior)
  • IMPROVE: Incremental improvement; /simplify runs automatically after IMPROVE

Auto-Quality Pass (/simplify)

Runs automatically after every TDD REFACTOR and DDD IMPROVE phase. Uses parallel agents to review for:

  • Reuse opportunities
  • Quality issues
  • Efficiency
  • CLAUDE.md compliance

Then auto-fixes findings.

Scale-Out (/batch)

Auto-triggered when task complexity exceeds thresholds (e.g., domains >= 3, files >= 10, complexity score >= 7). Spawns dozens of agents in isolated git worktrees, runs tests, merges results.

Approval Gates

Gate Type
Complexity threshold check (solo vs. team mode) automated
Pre-commit quality gate (/moai gate) automated (lint/format/type/test)
PR creation (manual trigger via /moai sync) yes-no

SPEC Format

EARS notation in Markdown. SPEC-ID naming convention (SPEC-AUTH-001, etc.).

Session Persistence

progress.md tracks completed phases. Interrupted runs resume from last checkpoint automatically.

Failing Checklist

All acceptance criteria from the SPEC are registered as pending checklist items at run start. Items are marked complete as implemented. Prevents partial implementation being reported as complete.

06

Memory Context

MoAI-ADK — Memory & Context

State Storage

File Purpose
progress.md Session progress tracking (phases completed, current position)
.moai/config/config.yaml Core configuration
.moai/config/sections/quality.yaml development_mode (tdd/ddd)
.moai/project/codemaps/ Architecture documentation
CLAUDE.md Project identity, agent catalog, authority references
CLAUDE.local.md Local overrides
REVIEW.md Review configuration

Memory Type

File-based.

Persistence Scope

Project-level.

Cross-Session Handoff

Strong. progress.md tracks completed phases; the SKILL.md explicitly reads this file at session start to resume interrupted runs.

From README:

"Session Persistence: progress.md tracks completed phases across sessions; interrupted runs resume automatically"

Context Architecture (Authority References)

The moai SKILL.md uses an "authority reference" pattern — instead of duplicating content, it points agents to canonical sources:

## Authority References
- Core identity, orchestration principles, agent catalog: CLAUDE.md
- Quality gates, security boundaries: .claude/rules/moai/core/moai-constitution.md
- SPEC workflow phases, token budgets: .claude/rules/moai/workflow/spec-workflow.md
- Development methodologies: .claude/rules/moai/workflow/spec-workflow.md (Run Phase)
- @MX tag rules: .claude/rules/moai/workflow/mx-tag-protocol.md

This reduces context duplication and centralizes rule updates.

Context Maps

/moai codemaps generates architecture documentation under .moai/project/codemaps/. These maps are "always available to agents" — part of every agent's context via CLAUDE.md reference.

MX Tags

Code annotations embedded directly in source files. These tags carry agent context (domain, status, complexity, ownership) inline with code. The /moai mx command scans and annotates; reviews check compliance. This is persistent in-code memory.

Pre-Execution Context

The moai SKILL.md injects git status and current branch at every invocation:

## Pre-execution Context
!`git status --porcelain 2>/dev/null || true`
!`git branch --show-current 2>/dev/null || true`

Compaction

The PreCompact hook runs handle-compact.sh — state is preserved before context compaction.

07

Orchestration

MoAI-ADK — Orchestration

Multi-Agent

Yes. Two execution modes:

  • Solo mode: Single subagent per phase
  • Team mode: Multiple specialized agents running in parallel worktrees

Auto-Selection

The system auto-selects between solo and team based on:

  • domains >= 3 → team
  • files >= 10 → team
  • complexity score >= 7 → team

Users can override with --team or --solo flags.

Agent Team Composition (Team Mode)

6 team agents (from .claude/skills/moai/team/):

  • plan.md — Planning agent
  • run.md — Implementation agent
  • review.md — Code review agent
  • sync.md — Documentation sync agent
  • debug.md — Debug agent
  • glm.md — General coordination agent

Orchestration Pattern

Hierarchical. The moai SKILL orchestrates all workflows; team agents and named agents are subordinate. The /batch skill spawns many parallel worktree agents for large-scale tasks.

Isolation Mechanism

Git worktrees. The /moai loop and /batch skill use isolated worktrees per parallel agent.

Multi-Model

No explicit model routing per role. Single model.

Execution Mode

Interactive loop with autonomous sub-phases. User invokes /moai run SPEC-XXX; the run command executes TDD/DDD phases autonomously including the /simplify auto-invocation.

Hook Coverage (20 events)

Most comprehensive hook coverage in the batch: SessionStart, PreCompact, SessionEnd, PreToolUse, PostToolUse, Stop, SubagentStop, PostToolUseFailure, SubagentStart, UserPromptSubmit, TeammateIdle, TaskCompleted, TaskCreated, ConfigChange, StopFailure, PostCompact, InstructionsLoaded, CwdChanged, FileChanged, PermissionDenied

Self-Evolving Harness (V3R4)

The /moai harness command manages a self-evolving harness lifecycle:

  • status — current harness state
  • apply — apply harness updates
  • rollback <date> — roll back to previous state
  • disable — disable harness evolution

This enables the framework to modify its own behavior based on learned patterns (analogous to spec-kitty's retrospective system but more automated).

Auto-Validators

  • /moai gate — pre-commit: lint + format + type-check + test
  • /moai security — OWASP audit + dependency scanning
  • /simplify — automatic after REFACTOR/IMPROVE (quality review + auto-fix)
  • Failing checklist — acceptance criteria verified before marking done

Git Automation

/moai sync SPEC-XXX creates PR automatically.

Crash Recovery

Yes. progress.md and hook handlers preserve state through interruptions.

08

Ui Cli Surface

MoAI-ADK — UI & CLI Surface

Dedicated CLI Binary

Exists: Yes
Name: moai
Is thin wrapper: No — full Go CLI with its own install, project init, and harness management
Install: curl -fsSL .../install.sh | bash

CLI Subcommands (init + project management)

Subcommand Purpose
moai init my-project Interactive wizard: auto-detects language/framework/methodology
moai init --mode <tdd|ddd> Initialize with explicit methodology

The moai binary handles installation and project initialization. Day-to-day operations happen via Claude Code slash commands. The binary's Claude Code integration files then handle the moai slash command routing.

Local UI

Exists: No (no dashboard, no TUI beyond the Claude Code session)

IDE Integration

Claude Code exclusively. Installs into .claude/ directory with full command/skill/agent/hook/rules structure.

Observability

  • progress.md — session progress (readable by human and agent)
  • .moai/project/codemaps/ — architecture documentation
  • Hook-generated logs via handle-harness-observe-*.sh scripts
  • /moai review — structured code review output
  • 33 hook handler scripts provide lifecycle visibility

Key Observability Features

  1. Harness Observer Hooks: handle-harness-observe-stop.sh, handle-harness-observe-subagent-stop.sh, handle-harness-observe-user-prompt-submit.sh — dedicated observer pattern for harness learning.
  2. Team AC Verify: team-ac-verify.sh — acceptance criteria verification at team completion.
  3. Sync Phase Quality Gate: sync-phase-quality-gate.sh — quality validation before sync operations.

Related frameworks

same archetype · same primary tool · same memory type

alirezarezvani/claude-skills ★ 16k

313+ skills for 12 AI tools covering engineering, marketing, C-level advisory, compliance, research, and finance — all from one…

REAP (c-d-cc/reap) ★ 41

Prevent context loss, scattered development, and forgotten lessons through a generation-based lifecycle where AI and human…

Codex Harness MCP ★ 7

Gives MCP-capable coding agents a local contract-lifecycle harness with governance audits and explicit completion gates.

meta-agent-teams (jbrahy) ★ 2

Build self-improving AI agent teams via a supervised training loop: specialist agents advise, a meta-agent evolves prompts based…

Browser Harness ★ 14k

Thin, self-healing CDP harness connecting an LLM to the user's real Chrome browser with coordinate-first clicking and…

SwarmVault ★ 492

Production-grade CLI for Karpathy's LLM Wiki pattern: ingests any content into a local-first durable markdown wiki + knowledge…