一键导入
moai-alfred-spec-authoring
SPEC document authoring guide - YAML metadata, EARS syntax (5 patterns with Unwanted Behaviors), validation checklist
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
SPEC document authoring guide - YAML metadata, EARS syntax (5 patterns with Unwanted Behaviors), validation checklist
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.
Guide Alfred sub-agents to actively invoke AskUserQuestion for ambiguous decisions.
Master-Clone pattern implementation guide for complex multi-step tasks with full project context
Systematic code review guidance and automation. Apply TRUST 5 principles, check code quality, validate SOLID principles, identify security issues, and ensure maintainability. Use when conducting code reviews, setting review standards, or implementing review automation.
.moai/config.json official schema documentation, structure validation, project metadata, language settings, and configuration migration guide. Use when setting up project configuration or understanding config.json structure.
Claude Code context window optimization strategies, JIT retrieval, progressive loading, memory file patterns, and cleanup practices. Use when optimizing context usage, managing large projects, or implementing efficient workflows.
| name | moai-alfred-spec-authoring |
| version | 1.2.0 |
| created | "2025-10-23T00:00:00.000Z" |
| updated | "2025-11-02T00:00:00.000Z" |
| status | active |
| description | SPEC document authoring guide - YAML metadata, EARS syntax (5 patterns with Unwanted Behaviors), validation checklist |
| keywords | ["spec","authoring","ears","metadata","requirements","tdd","planning"] |
| allowed-tools | ["Read","Bash","Glob"] |
| Field | Value |
|---|---|
| Skill Name | moai-alfred-spec-authoring |
| Version | 1.2.0 (2025-11-02) |
| Allowed tools | Read, Bash, Glob |
| Auto-load | /alfred:1-plan, SPEC authoring tasks |
| Tier | Alfred |
Comprehensive guide for authoring SPEC documents in MoAI-ADK. Provides YAML metadata structure (7 required + 9 optional fields), official EARS requirement syntax (5 patterns including Unwanted Behaviors), version management lifecycle, TAG integration, and validation strategies.
Key capabilities:
/alfred:1-plan workflow integrationAutomatic triggers:
/alfred:1-plan command executionManual invocation:
mkdir -p .moai/specs/SPEC-{DOMAIN}-{NUMBER}
# Example: Authentication feature
mkdir -p .moai/specs/SPEC-AUTH-001
---
id: AUTH-001
version: 0.0.1
status: draft
created: 2025-10-29
updated: 2025-10-29
author: @YourGitHubHandle
priority: high
---
# @SPEC:AUTH-001: JWT Authentication System
## HISTORY
### v0.0.1 (2025-10-29)
- **INITIAL**: JWT authentication SPEC draft created
- **AUTHOR**: @YourHandle
## Environment
**Runtime**: Node.js 20.x or later
**Framework**: Express.js
**Database**: PostgreSQL 15+
## Assumptions
1. User credentials stored in PostgreSQL
2. JWT secrets managed via environment variables
3. Server clock synchronized with NTP
## Requirements
### Ubiquitous Requirements
**UR-001**: The system shall provide JWT-based authentication.
### Event-driven Requirements
**ER-001**: WHEN the user submits valid credentials, the system shall issue a JWT token with 15-minute expiration.
### State-driven Requirements
**SR-001**: WHILE the user is in an authenticated state, the system shall permit access to protected resources.
### Optional Features
**OF-001**: WHERE multi-factor authentication is enabled, the system can require OTP verification after password confirmation.
### Unwanted Behaviors
**UB-001**: IF a token has expired, THEN the system shall deny access and return HTTP 401.
| Pattern | Keyword | Purpose | Example |
|---|---|---|---|
| Ubiquitous | shall | Core functionality always active | "The system shall provide login capability" |
| Event-driven | WHEN | Response to specific events | "WHEN login fails, display error" |
| State-driven | WHILE | Persistent behavior during state | "WHILE in authenticated state, permit access" |
| Optional | WHERE | Conditional features based on flags | "WHERE premium enabled, unlock feature" |
| Unwanted Behaviors | IF-THEN | Error handling, quality gates, business rules | "IF token expires, deny access + return 401" |
<DOMAIN>-<NUMBER> (e.g., AUTH-001) - Immutable identifierMAJOR.MINOR.PATCH (e.g., 0.0.1) - Semantic versioningdraft | active | completed | deprecatedYYYY-MM-DD - Initial creation dateYYYY-MM-DD - Final modification date@GitHubHandle - Primary author (@ prefix required)critical | high | medium | lowVersion Lifecycle:
0.0.x → draft (authoring phase)0.1.0 → completed (implementation done)1.0.0 → stable (production-ready)author field includes @ prefixversion format is 0.x.yid is not duplicated (rg "@SPEC:AUTH-001" -n .moai/specs/)@SPEC:{ID} TAG blockauthor: Goos instead of author: @Goosmoai-foundation-ears - Official EARS syntax patternsmoai-foundation-specs - Metadata validation automationmoai-foundation-tags - TAG system integrationmoai-alfred-spec-metadata-validation - Automated validationLast Updated: 2025-10-29
Version: 1.2.0
Maintained By: MoAI-ADK Team
Support: Use /alfred:1-plan command for guided SPEC creation