| name | moai-foundation-quality |
| description | TRUST 5 quality principles and how MoAI enforces them through agents, the 3-level harness, /moai gate, and sync-auditor scoring. Use for code review, quality gate checks, coverage targets, or TRUST 5 compliance.
|
| when_to_use | Use for code-quality guidance: TRUST 5 principles (Tested, Readable, Unified, Secured, Trackable), the 3-level harness (minimal/standard/ thorough), /moai gate (lint+format+type+test), coverage targets, security checks, language-aware toolchains, code-smell detection, and technical-debt triage.
|
| license | Apache-2.0 |
| compatibility | Designed for Claude Code |
| allowed-tools | Read, Grep, Glob |
| user-invocable | false |
| metadata | {"version":"3.0.0","category":"foundation","status":"active","updated":"2026-07-10","modularized":"true","tags":"foundation, quality, testing, validation, trust-5, best-practices, code-review","aliases":"moai-foundation-quality"} |
| progressive_disclosure | {"enabled":true,"level1_tokens":100,"level2_tokens":5000} |
TRUST 5 Quality Principles and Enforcement
This skill provides background knowledge on MoAI's quality model: the five
TRUST 5 principles, how agents enforce them, the 3-level harness, and the
language-aware toolchains that /moai gate runs. MoAI does NOT ship a
quality-validation library — quality is enforced through agents
(manager-develop, sync-auditor), slash commands (/moai gate,
/moai review), and the harness (minimal/standard/thorough).
Quick Reference
TRUST 5 Principles (Tested, Readable, Unified, Secured, Trackable) are
quality dimensions, not code objects. Every code change is evaluated against
all five.
Quality Mechanisms (the real enforcement layer):
/moai gate — runs lint + format + type-check + test in parallel as a
pre-commit quality gate (<30s). Auto-detects the project language and runs
the appropriate toolchain.
manager-develop (run-phase) — implements via cycle_type ∈ {tdd, ddd,
autofix}; the chosen cycle shapes how tests and behavior are produced.
sync-auditor — independent skeptical quality assessment with 4-dimension
scoring (Functionality, Security, Craft, Consistency), scored as the
harmonic mean of dimensions, not the average.
- 3-level harness — minimal (fast validation), standard (default checks),
thorough (full sync-auditor + TRUST 5). Auto-determined by the Complexity
Estimator based on SPEC scope.
- LSP quality gates — phase-specific thresholds (run: zero errors/type-errors/
lint-errors; sync: zero errors, max 10 warnings, clean LSP).
The MoAI Quality Model
MoAI does not provide a Python SDK or any library for quality validation.
Quality is enforced through the workflow, the agents, and the gate commands.
This skill documents how those pieces fit together so a Claude invocation
can reason about quality correctly.
How TRUST 5 is enforced per phase
| Phase | Quality check | Owner |
|---|
| plan | Capture LSP baseline; identify quality risks in the plan | manager-spec |
| run | Zero errors/type-errors/lint-errors; tests pass; coverage met | manager-develop (cycle_type shapes the approach) |
| sync | Lint clean (≤10 warnings); docs updated; TRUST 5 re-affirmed | manager-docs, then sync-auditor scores |
| audit |