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

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
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:
- TRUST 5 Framework - Quality gate system (Tested, Readable, Unified, Secured, Trackable)
- SPEC-First DDD - Specification-driven domain-driven development workflow
- Delegation Patterns - Task orchestration via specialized agents (never direct execution)
- Token Optimization - 200K budget management and context efficiency
- Progressive Disclosure - Three-tier knowledge delivery (Quick, Implementation, Advanced)
- 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
Allowed tools
Tools this skill is permitted to call.
- 01
Read - 02
Grep - 03
Glob - 04
mcp__context7__resolve-library-id - 05
mcp__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
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
