Command Palette

Search for a command to run...

Back to skills
skill № 99286

moai-foundation-core

Provides MoAI-ADK foundational principles including TRUST 5 quality framework, SPEC-First DDD methodology, delegation patterns, progressive disclosure, and…

FreeNo executable scripts
modu-aiby modu-ai★ 69 GitHub stars12 installs in other catalogs

Install moai-foundation-core in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

MoAI Foundation Core

Foundational principles and architectural patterns that power MoAI-ADK's AI-driven development workflow.

Core Philosophy: Quality-first, domain-driven, modular, and efficient AI development through proven patterns and automated workflows.

Quick Reference

What is MoAI Foundation Core?

Six essential principles that ensure quality, efficiency, and scalability in AI-powered development:

  1. TRUST 5 Framework - Quality gate system (Tested, Readable, Unified, Secured, Trackable)
  2. SPEC-First DDD - Specification-driven domain-driven development workflow
  3. Delegation Patterns - Task orchestration via specialized agents (never direct execution)
  4. Token Optimization - 200K budget management and context efficiency
  5. Progressive Disclosure - Three-tier knowledge delivery (Quick, Implementation, Advanced)
  6. Modular System - File splitting and reference architecture for scalability

Quick Access:

  • Quality standards in modules/trust-5-framework.md
  • Development workflow in modules/spec-first-ddd.md
  • Agent coordination in modules/delegation-patterns.md
  • Budget management in modules/token-optimization.md
  • Content structure in modules/progressive-disclosure.md
  • File organization in modules/modular-system.md
  • Agent catalog in modules/agents-reference.md
  • Command reference in modules/commands-reference.md
  • Security and constraints in modules/execution-rules.md

Use Cases:

  • New agent creation with quality standards
  • New skill development with structural guidelines
  • Complex workflow orchestration
  • Token budget planning and optimization
  • Documentation architecture design
  • Quality gate configuration

Implementation Guide

1. TRUST 5 Framework - Quality Assurance System

Purpose: Automated quality gates ensuring code quality, security, and maintainability.

Five Pillars:

Tested Pillar: Maintain comprehensive test coverage with characterization tests ensuring behavior preservation. Execute pytest with coverage reporting. Block merge and generate missing tests on failure. Characterization tests capture current behavior for legacy code, while specification tests validate domain requirements for new code. High coverage ensures code reliability and reduces production defects. Preserves behavior during refactoring and reduces debugging time by 60-70 percent.

Readable Pillar: Use clear and descriptive naming conventions. Execute ruff linter checks. Issue warning and suggest refactoring improvements on failure. Clear naming improves code comprehension and team collaboration. Reduces onboarding time by 40 percent and improves maintenance velocity.

Unified Pillar: Apply consistent formatting and import patterns. Execute black formatter and isort checks. Auto-format code or issue warning on failure. Consistency eliminates style debates and merge conflicts. Reduces code review time by 30 percent and improves readability.

Secured Pillar: Comply with OWASP security standards. Execute security-expert agent analysis. Block merge and require security review on failure. Security vulnerabilities create critical business and legal risks. Prevents 95+ percent of common security vulnerabilities.

Trackable Pillar: Write clear and structured commit messages. Match Git commit message regex patterns. Suggest proper commit message format on failure. Clear history enables debugging, auditing, and collaboration. Reduces issue investigation time by 50 percent.

Integration Points: Pre-commit hooks for automated validation, CI/CD pipelines for quality gate enforcement, Agent workflows for core-quality validation, Documentation for quality metrics.

Detailed Reference: modules/trust-5-framework.md


2. SPEC-First DDD - Development Workflow

Purpose: Specification-driven development ensuring clear requirements before implementation.

Three-Phase Workflow:

Phase 1 SPEC (/moai:1-plan): workflow-spec generates EARS format. Output is .moai/specs/SPEC-XXX/spec.md. Execute /clear to save 45-50K tokens.

Phase 2 DDD (/moai:2-run): ANALYZE for requirements, PRESERVE for existing behavior, IMPROVE for enhancement. Validate with at least 85% coverage.

Phase 3 Docs (/moai:3-sync): API documentation, architecture diagrams, project reports.

EARS Format: Ubiquitous for system-wide always active requirements. Event-driven for trigger-based when X do Y requirements. State-driven for conditional while X do Y requirements. Unwanted for prohibited shall not do X requirements. Optional for nice-to-have where possible do X requirements.

Token Budget: SPEC takes 30K, DDD takes 180K, Docs takes 40K, Total is 250K.

Key Practice: Execute /clear after Phase 1 to initialize context.

Detailed Reference: modules/spec-first-ddd.md


3. Delegation Patterns - Agent Orchestration

Purpose: Task delegation to specialized agents, avoiding direct execution.

Core Principle: MoAI must delegate all work through Task() to specialized agents. Direct execution bypasses specialization, quality gates, and token optim

Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

  1. 01Read
  2. 02Grep
  3. 03Glob
  4. 04mcp__context7__resolve-library-id
  5. 05mcp__context7__get-library-docs

Bundled files

  • modules/INDEX.md
  • modules/agents-reference.md
  • modules/commands-reference.md
  • modules/delegation-advanced.md
  • modules/delegation-implementation.md
  • modules/delegation-patterns.md
  • modules/execution-rules.md
  • modules/modular-system.md
  • modules/patterns.md
  • modules/progressive-disclosure.md
  • modules/spec-ddd-implementation.md
  • modules/spec-ears-format.md
  • modules/spec-first-ddd.md
  • modules/token-optimization.md
  • modules/trust-5-framework.md
  • modules/trust-5-implementation.md
  • modules/trust-5-validation.md
  • references/examples.md
  • references/reference.md

FAQ

What does the moai-foundation-core skill do?

Provides MoAI-ADK foundational principles including TRUST 5 quality framework, SPEC-First DDD methodology, delegation patterns, progressive disclosure, and agent catalog reference. Use when referencing TRUST 5 gates, SPEC workflow, EARS format, DDD methodology, agent delegation patterns, or MoAI orchestration rules. Do NOT use for context and token management (use moai-foundation-context instead) or strategic analysis (use moai-foundation-philosopher instead).

How do I install the moai-foundation-core skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the moai-foundation-core skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare moai-foundation-core with