moai-foundation-core

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

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/h102-log/pdfrag --skill moai-foundation-core-h102-log
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-foundation-core
Source: https://github.com/h102-log/pdfrag/tree/main/.claude/skills/moai-foundation-core
Command: npx skills add https://github.com/h102-log/pdfrag --skill moai-foundation-core-h102-log

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI-assisted development often lacks consistent quality gates, clear requirement specifications, and structured orchestration, leading to hallucinated code, token waste, and unreviewable output. This Skill provides the foundational principles of MoAI-ADK so every task follows a quality-first, specification-driven, agent-delegated 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 review. - SPEC-First DDD Workflow: Structures development into three phases (/moai:1-plan, /moai:2-run, /moai:3-sync) using EARS-format requirements and ANALYZE-PRESERVE-IMPROVE cycles. - Agent Delegation & Token Optimization: Routes all work through Task() delegation to 26 specialized agents across 7 tiers, with a 250K token budget split across phases and mandatory /clear between phases. - Use Case: When building a new feature, generate an EARS-format SPEC, clear context, delegate implementation to backend/frontend agents in parallel, then validate with TRUST 5 gates before merging. ## Quick Start Ask the AI to explain the TRUST 5 quality gates and how to structure a new feature using the SPEC-First DDD workflow.

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 quality gate system with five pillars: Tested (85%+ coverage via pytest), Readable (ruff linting), Unified (black/isort formatting), Secured (OWASP compliance), and Trackable (structured commit messages). Failed gates block merges until issues are resolved.

How does the SPEC-First DDD workflow work?▼

It runs in three phases: /moai:1-plan generates an EARS-format SPEC, /moai:2-run executes the ANALYZE-PRESERVE-IMPROVE implementation cycle, and /moai:3-sync produces documentation. Running /clear after planning saves 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). It standardizes how specifications are written before implementation.

Why must MoAI delegate tasks instead of executing directly?▼

Direct execution bypasses specialization, quality gates, and token optimization. Delegating via Task() to specialized agents improves task success rates by about 40 percent, enables parallel execution, and keeps every action validated and traceable.

How is the 200K token budget managed across phases?▼

The budget allocates 30K tokens to SPEC, 180K to DDD implementation, and 40K to documentation, totaling 250K per feature. Executing /clear between phases and loading only relevant files prevents context overflow.

When should I not use moai-foundation-core?▼

Do not use it for context and token session management, which belongs to moai-foundation-context, or for strategic analysis, which belongs to moai-foundation-philosopher. It covers only core principles, quality gates, and orchestration rules.