moai-alfred-rules
Mandatory rules for Skill invocation, AskUserQuestion usage, TRUST principles, TAG validation, and TDD workflow. Use when validating workflow compliance, checking quality gates, enforcing MoAI-ADK standards, or verifying rule adherence.
When & Why to Use This Skill
The moai-alfred-rules skill serves as a comprehensive governance and compliance framework for AI agents. It enforces mandatory protocols for skill invocation, user interaction, and software quality standards. By integrating TRUST principles, TAG traceability, and TDD workflows, it provides automated quality gates that ensure agentic outputs are robust, secure, and strictly aligned with MoAI-ADK development standards.
Use Cases
- Workflow Compliance: Automatically validating whether the agent is following mandatory skill invocation patterns for tasks such as debugging, refactoring, or security reviews.
- Interaction Governance: Determining the precise scenarios to trigger 'AskUserQuestion' to resolve ambiguities in technical stacks, architecture, or user intent.
- Quality Gate Enforcement: Verifying that code and commits adhere to TRUST 5 standards, including 85%+ test coverage, SOLID principles, and OWASP security checks.
- Traceability Management: Maintaining TAG chain integrity (SPEC→TEST→CODE→DOC) to ensure every piece of code is linked to a requirement and prevent orphan tags.
- TDD Standardization: Enforcing Test-Driven Development cycles by requiring the creation of @TEST tags before @CODE implementation and validating commit message formats.
| name | moai-alfred-rules |
|---|---|
| description | "Mandatory rules for Skill invocation, AskUserQuestion usage, TRUST principles, TAG validation, and TDD workflow. Use when validating workflow compliance, checking quality gates, enforcing MoAI-ADK standards, or verifying rule adherence." |
| allowed-tools | "Read, Glob, Grep, Bash" |
Skill Metadata
| Field | Value |
|---|---|
| Version | 1.0.0 |
| Tier | Alfred |
| Auto-load | When validating rules or quality gates |
| Keywords | skill-invocation, ask-user-question, trust, tag, tdd, quality-gates, workflow-compliance |
What It Does
MoAI-ADK의 10가지 필수 Skill 호출 규칙, 5가지 AskUserQuestion 시나리오, TRUST 5 품질 게이트, TAG 체인 규칙, TDD 워크플로우를 정의합니다.
When to Use
- ✅ Skill() 호출이 mandatory인지 optional인지 판단 필요
- ✅ 사용자 질문이 ambiguous할 때 AskUserQuestion 사용 여부 결정
- ✅ 코드/커밋이 TRUST 5를 준수하는지 확인
- ✅ TAG 체인 무결성 검증
- ✅ 커밋 메시지 형식 확인
- ✅ 품질 게이트(quality gate) 검증
Core Rules at a Glance
10 Mandatory Skill Invocations
| User Request | Skill | Pattern |
|---|---|---|
| TRUST validation, quality check | moai-foundation-trust |
Skill("moai-foundation-trust") |
| TAG validation, orphan detection | moai-foundation-tags |
Skill("moai-foundation-tags") |
| SPEC authoring, spec validation | moai-foundation-specs |
Skill("moai-foundation-specs") |
| EARS syntax, requirement formatting | moai-foundation-ears |
Skill("moai-foundation-ears") |
| Git workflow, branch management | moai-foundation-git |
Skill("moai-foundation-git") |
| Language detection, stack detection | moai-foundation-langs |
Skill("moai-foundation-langs") |
| Debugging, error analysis | moai-essentials-debug |
Skill("moai-essentials-debug") |
| Refactoring, code improvement | moai-essentials-refactor |
Skill("moai-essentials-refactor") |
| Performance optimization | moai-essentials-perf |
Skill("moai-essentials-perf") |
| Code review, quality review | moai-essentials-review |
Skill("moai-essentials-review") |
5 AskUserQuestion Scenarios
Use AskUserQuestion when:
- Tech stack choice unclear (multiple frameworks/languages)
- Architecture decision needed (monolith vs microservices)
- User intent ambiguous (multiple valid interpretations)
- Existing component impacts unknown (breaking changes)
- Resource constraints unclear (budget, timeline)
TRUST 5 Quality Gates
- Test: 85%+ coverage required
- Readable: No code smells, SOLID principles
- Unified: Consistent patterns, no duplicate logic
- Secured: OWASP Top 10 checks, no secrets
- Trackable: @TAG chain intact (SPEC→TEST→CODE→DOC)
TAG Chain Integrity Rules
- Assign as
<DOMAIN>-<###>(e.g.,AUTH-003) - Create
@TESTbefore@CODE - Document in HISTORY section
- Never have orphan TAGs (TAG without corresponding code)
Progressive Disclosure
Learn more in reference.md for complete rules, decision trees, and validation methods.
Version: 1.0.0 Related Skills: moai-foundation-trust, moai-foundation-tags, moai-alfred-practices