moai-foundation-core

Defines TRUST 5 quality gates, SPEC-First DDD workflow, and agent delegation patterns for MoAI-ADK.

2|Updated May 27, 2026
One-click install
npx skills add https://github.com/yekinya/moai-novel --skill moai-foundation-core-yekinya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-foundation-core
Source: https://github.com/yekinya/moai-novel/tree/main/moai-novel/.claude/skills/moai-foundation-core
Command: npx skills add https://github.com/yekinya/moai-novel --skill moai-foundation-core-yekinya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI-driven development often lacks consistent quality gates, clear requirement specifications, and structured agent orchestration, leading to untracked changes, token waste, and unvalidated code. This Skill provides the foundational principles of MoAI-ADK so every change follows a specification-first, quality-gated, delegation-based workflow. ## Core Features & Use Cases - TRUST 5 Quality Framework: Enforces five quality gates (Tested, Readable, Unified, Secured, Trackable) with automated checks like pytest coverage, ruff, black, and OWASP security analysis. - SPEC-First DDD Workflow: Guides the three-phase process (/moai:1-plan, /moai:2-run, /moai:3-sync) using EARS-format requirements and ANALYZE-PRESERVE-IMPROVE implementation cycles. - Agent Delegation & Token Optimization: Provides sequential, parallel, and conditional delegation patterns across a 26-agent, 7-tier catalog, plus 200K token budget strategies with /clear rules and progressive disclosure content architecture. - Use Case: When building a new feature, generate an EARS SPEC, clear context to save 45-50K tokens, delegate implementation to specialized agents, and validate the result against all five TRUST 5 gates before merging. ## Quick Start Ask the AI to explain the TRUST 5 quality gates and how to apply the SPEC-First DDD workflow to plan a new feature.

Frequently Asked Questions about moai-foundation-core

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

FAQPage Schema
What is the TRUST 5 framework in MoAI-ADK?

TRUST 5 is a hard quality gate system with five pillars: Tested (85%+ coverage via pytest), Readable (ruff linting), Unified (black and isort formatting), Secured (OWASP compliance via security-expert agent), and Trackable (structured commit messages). All five dimensions must pass before code can merge.

How does the SPEC-First DDD workflow work?

It runs in three phases: /moai:1-plan generates an EARS-format SPEC document, /moai:2-run executes the ANALYZE-PRESERVE-IMPROVE implementation cycle, and /moai:3-sync generates documentation. You must run /clear after Phase 1 to save 45-50K tokens for implementation.

What is the EARS format for requirements?

EARS defines five requirement patterns: Ubiquitous (always active), Event-driven (when X, do Y), State-driven (while X, do Y), Unwanted (shall not do X), and Optional (where possible, do X). SPEC documents use these patterns to write unambiguous acceptance criteria.

How do I choose between sequential and parallel agent delegation?

Use sequential delegation when agents have dependencies, such as API design before backend implementation. Use parallel delegation via Promise.all for independent tasks like backend, frontend, and database work, which can cut total execution time by roughly 40 percent.

When should I run /clear during the MoAI workflow?

Run /clear immediately after /moai:1-plan completes, when context exceeds 150K tokens, or after 50+ conversation messages. This resets context and keeps the total budget within the 250K token allocation across SPEC, DDD, and documentation phases.

What are the limitations of the 500-line SKILL.md rule?

SKILL.md files must stay under 500 lines using progressive disclosure: Quick Reference, Implementation Guide, and Advanced sections. Overflow content moves to modules/ directory files with unlimited size, linked via cross-references for on-demand deep dives.