Skip to main content
SECTION · ADVANCED

Advanced Topics

Tokenomics Overview
Tokenomics (Token Economics) is the first pillar of MoAI-ADK v3.0. Even as …
Token Budget Management and Graceful Stop
This page deep-dives into Layer D — Budget defense — of the 4-layer tokenomics …
3-Tier Agent Architecture (No-Haiku)
Why MoAI removes Haiku from the routing model set and splits the remaining models into three task-based tiers — the DeepSWE data behind the decision, the per-tier assignment rule, and how model tiers differ from autonomy tiers.
Profile Matrix
MoAI-ADK maps each of the 12 retained agents to its own {model, effort} pair …
Harness Self-Evolution
The core of harness competitiveness is its self-improvement design. As Lilian …
Kanban Mode
NEW · v3.1 Kanban Mode Info Value affiliation: agentic loop engineering · …
Autonomous Continuation Loops
The core question of agentic loops is “when to stop and when to …
Factory Mode
NEW · v3.2 Factory Mode Info Value affiliation: multi-session orchestration · …
Harness Learning Surface
NEW · v3.1 A harness (the automated quality-verification apparatus surrounding …
Skill Guide
A detailed guide to MoAI-ADK’s skill system. Skills are the knowledge …
Autonomy Tier (MOAI_AUTONOMY_TIER)
MoAI-ADK offers three autonomy tiers — from a semi-autonomous mode where the …
Agent Guide
A detailed guide to the catalog of 12 core agents in MoAI-ADK v3.0. Info …
manager-lead Lead Coordinator
NEW · v3.1 manager-lead Lead Coordinator Info Value home: agentic loop …
Multi-model Audit Convergence
NEW · v3.1 Info Value home: agentic harness · agentic loop engineering …
Codex Dual Harness — AGENTS.md, Dual Agent Publication, Hook Adapter
The four artifacts that let codex-cli read MoAI-ADK — the root AGENTS.md standing contract, dual agent TOML publication, the .agents/skills mirror, and the internal/codexadapter hook adapter library.
BAS Navigator 3-Stage Codemap Synchronization
Many projects have code that keeps moving while the documentation stands still. …
Builder Agents and Harness v4
The last piece of the agentic harness is recursion — the harness builds the …
Dynamic Workflows and Ultracode
Delegate 100 agents sequentially and your context collapses first. Dynamic …
Harness v4 Builder Advanced Guide
If the Builder Agents Guide was the overview of the Harness v4 Builder, this …
Decision Memory System
The starting point of agentic loop engineering is observation — every time the …
Hooks Guide
A detailed guide to Claude Code’s Hooks system and MoAI-ADK’s …
Hooks Event Reference
Claude Code’s hook system supports 29 event types, 5 hook types, per-event …
@MX TAG System
@MX TAG is a code-level annotation that serves as the standard means for AI …
MX Scanner Internals
The moai mx scanner reads the codebase, builds an index keyed on @MX: tags, and …
Analyze-First Routing
How /moai's default routing works — classifying the meaning of a request before choosing a path, the five-stage pipeline from request to execution, the approval gates that stand between them, and why intent, not keywords, drives routing.
settings.json Guide
A detailed guide to Claude Code’s settings file system. In a harness that …
Configuration Sections Reference
Key configuration file keys in .moai/config/sections/ (handoff/delegation/llm/statusline/security/workflow/crosssession).
Security Notes
MoAI-ADK v3.0.0 security hardening — CWE-732/214/345 mappings and self-audit procedures
Harness Profiles and the Evaluation System
How MoAI-ADK scales verification depth to the weight of each change — the 3-level harness, harmonic-mean 4-dimension scoring, Must-Pass firewall, rubric anchors, and per-work evaluation profiles.
Statusline System — Complete 3+1-line Layout Guide
You cannot control what you do not measure. An agentic development session …
Catalog System
Tokenomics is not a principle that applies only to tokens. Each template file …
CLAUDE.md Guide
A detailed guide to Claude Code’s core instruction file system. CLAUDE.md …
MoAI Web Console
The local operations console — six areas (Overview, Kanban, Specs, Monitor, Settings, Todo), live updates, read-only observation, settings editing.
Home Directory Hygiene (~/.moai)
NEW · v3.1.1 Home Directory Hygiene (~/.moai) Every piece of state MoAI keeps …
Info
Belongs to: Tokenomics · Agentic Loop Engineering · Agentic Harness

MoAI-ADK’s three core values

This section is for developers who want to take MoAI-ADK apart and see how it works inside. Once you are comfortable with the basic workflow (plan → run → sync), this is where you can see how the harness is actually assembled.

Info
The documents in this section cover mainly the third of v3.0’s three core values — Tokenomics (Token Economics), Agentic Loop Engineering, and the Agentic Harness — namely the implementation details of the harness. The secret to making agents write good code is not the model, but the design of the environment around the model.

How the Harness Is Assembled

The MoAI-ADK harness operates as seven components arranged in layers. The further down you go, the more dynamic the layer.

flowchart TD
    CLAUDE["CLAUDE.md
Project constitution"] --> SETTINGS["settings.json
Permissions and environment"] CLAUDE --> RULES[".claude/rules/
Conditional rules"] SETTINGS --> HOOKS["Hooks
Event automation"] SETTINGS --> MCP["MCP servers
External tool connections"] RULES --> SKILLS["Skills
Expertise modules"] SKILLS --> AGENTS["Agents
Specialist agents"] AGENTS --> BUILDERS["Builder Agents
Extension generators"]

If CLAUDE.md is the project’s constitution, settings.json is the permission boundary, hooks are the deterministic control points, and skills and agents are the hands doing the actual work. And Builder Agents can regenerate this entire structure — a recursive architecture where the harness builds the harness.

Table of Contents

Cost — Tokenomics

TopicDescription
Tokenomics OverviewThe paradox of unit prices falling 98% while costs rise 320%, and the answer
Token BudgetToken Circuit Breaker · verify-diet · context diet
No-Haiku 3-TierThe DeepSWE-leaderboard rationale and the 3-tier policy
Profile MatrixThe single profile axis of 11 agents × {model, effort} across 33 cells
statuslineAn always-on dashboard for context usage, cache hit rate, and rate limits

Self-improvement — Agentic Loop Engineering

TopicDescription
Self-Evolving SystemThe 4-tier learning ladder (observation → heuristic → rule → auto-update)
Autonomous LoopsThe condition-declared and diagnostic-driven loops of /moai goal and /moai loop
Decision MemoryThe observation system that learns user choices
ultracode WorkflowsDynamic workflow orchestration (multi-agent fan-out)

Quality-control — Agentic Harness

TopicDescription
Skill GuideThe skill system that gives AI specialized expertise
Agent GuideThe system of specialized AI task performers
Builder Agents GuideCreating skills, agents, commands, and plugins
Harness v4 BuilderGenerate a project-specific harness from a single natural-language sentence
Harness Profiles and Evaluation System3-level verification depth + 4-dimension scoring
Catalog SystemThe 3-tier manifest and slim init

Control and Automation

TopicDescription
Hooks GuideEvent-driven automation scripts
Hooks ReferenceThe list of hooks MoAI-ADK ships
settings.json GuideManaging Claude Code global settings
config SectionsReference for the .moai/config/sections/*.yaml settings
CLAUDE.md GuideThe project instruction file system
@MX TagsInline annotations between agents for context, invariant contracts, and danger zones
Security NotesThe permission stack and sandboxing
Info
Each document can be read independently. If you want a systematic understanding of the whole architecture, however, we recommend the order Skill Guide → Agent Guide → Builder Agents — the flow from knowledge modules to performers, and from performers to generators, mirrors the recursive structure of the harness itself.