moai-adk 0.5.4__py3-none-any.whl → 0.5.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +1 -1
- moai_adk/cli/commands/init.py +4 -2
- moai_adk/cli/commands/status.py +4 -2
- moai_adk/cli/commands/update.py +4 -5
- moai_adk/core/project/initializer.py +13 -11
- moai_adk/core/project/phase_executor.py +7 -3
- moai_adk/core/template/processor.py +60 -1
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +8 -0
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +18 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +18 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +38 -2
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +18 -0
- moai_adk/templates/.claude/agents/alfred/project-manager.md +6 -0
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +6 -0
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +8 -0
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +17 -0
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +7 -1
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +18 -0
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +6 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +5 -1
- moai_adk/templates/.claude/commands/alfred/1-plan.md +5 -1
- moai_adk/templates/.claude/commands/alfred/2-run.md +6 -2
- moai_adk/templates/.claude/commands/alfred/3-sync.md +5 -1
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +5 -1
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +5 -1
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +5 -1
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +5 -1
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +30 -273
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +487 -129
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +603 -70
- moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +22 -2
- moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +25 -5
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +152 -547
- moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +835 -878
- moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +665 -1151
- moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +138 -427
- moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +61 -53
- moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +99 -1181
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +541 -0
- moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +622 -0
- moai_adk/templates/.moai/config.json +5 -5
- moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md +208 -0
- moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md +369 -0
- moai_adk/templates/.moai/memory/CLAUDE-RULES.md +539 -0
- moai_adk/templates/.moai/memory/{development-guide.md → DEVELOPMENT-GUIDE.md} +3 -3
- moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md +218 -0
- moai_adk/templates/.moai/memory/config-schema.md +444 -0
- moai_adk/templates/CLAUDE.md +149 -845
- {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/METADATA +293 -335
- {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/RECORD +61 -54
- /moai_adk/templates/.moai/memory/{gitflow-protection-policy.md → GITFLOW-PROTECTION-POLICY.md} +0 -0
- /moai_adk/templates/.moai/memory/{spec-metadata.md → SPEC-METADATA.md} +0 -0
- {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/WHEEL +0 -0
- {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moai-spec-authoring
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.1.0
|
|
4
4
|
created: 2025-10-23
|
|
5
|
-
updated: 2025-10-
|
|
5
|
+
updated: 2025-10-27
|
|
6
6
|
status: active
|
|
7
|
-
description:
|
|
7
|
+
description: SPEC 문서 작성 가이드 - YAML 메타데이터, EARS 문법, 검증 체크리스트 제공
|
|
8
8
|
keywords: ['spec', 'authoring', 'ears', 'metadata', 'requirements', 'tdd', 'planning']
|
|
9
9
|
allowed-tools:
|
|
10
10
|
- Read
|
|
@@ -19,61 +19,57 @@ allowed-tools:
|
|
|
19
19
|
| Field | Value |
|
|
20
20
|
| ----- | ----- |
|
|
21
21
|
| **Skill Name** | moai-spec-authoring |
|
|
22
|
-
| **Version** | 1.
|
|
22
|
+
| **Version** | 1.1.0 (2025-10-27) |
|
|
23
23
|
| **Allowed tools** | Read, Bash, Glob |
|
|
24
|
-
| **Auto-load** | `/alfred:1-plan`, SPEC
|
|
24
|
+
| **Auto-load** | `/alfred:1-plan`, SPEC 작성 태스크 |
|
|
25
25
|
| **Tier** | Foundation |
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
## What It Does
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
MoAI-ADK SPEC 문서 작성을 위한 종합 가이드입니다. YAML 메타데이터 구조(7개 필수 + 9개 선택 필드), EARS 요구사항 문법(5개 패턴), 버전 관리 생애주기, TAG 통합, 검증 전략을 제공합니다.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- EARS
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
33
|
+
**핵심 기능**:
|
|
34
|
+
- 단계별 SPEC 생성 워크플로우
|
|
35
|
+
- 완전한 메타데이터 필드 레퍼런스
|
|
36
|
+
- EARS 문법 템플릿과 실전 패턴
|
|
37
|
+
- 제출 전 검증 체크리스트
|
|
38
|
+
- 일반적인 함정 예방 가이드
|
|
39
|
+
- `/alfred:1-plan` 워크플로우 통합
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
43
|
## When to Use
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
- `/alfred:1-plan`
|
|
47
|
-
- SPEC
|
|
48
|
-
-
|
|
49
|
-
-
|
|
45
|
+
**자동 트리거**:
|
|
46
|
+
- `/alfred:1-plan` 명령어 실행
|
|
47
|
+
- SPEC 문서 생성 요청
|
|
48
|
+
- 요구사항 명확화 논의
|
|
49
|
+
- 기능 계획 세션
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
51
|
+
**수동 호출**:
|
|
52
|
+
- SPEC 작성 모범 사례 학습
|
|
53
|
+
- 기존 SPEC 문서 검증
|
|
54
|
+
- 메타데이터 이슈 트러블슈팅
|
|
55
|
+
- EARS 문법 패턴 이해
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
59
|
## Quick Start: 5-Step SPEC Creation
|
|
60
60
|
|
|
61
|
-
### Step 1:
|
|
61
|
+
### Step 1: SPEC 디렉토리 초기화
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
# Create SPEC directory structure
|
|
65
64
|
mkdir -p .moai/specs/SPEC-{DOMAIN}-{NUMBER}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# Example: Authentication feature
|
|
65
|
+
# 예시: 인증 기능
|
|
69
66
|
mkdir -p .moai/specs/SPEC-AUTH-001
|
|
70
67
|
```
|
|
71
68
|
|
|
72
|
-
### Step 2:
|
|
69
|
+
### Step 2: YAML Front Matter 작성
|
|
73
70
|
|
|
74
71
|
```yaml
|
|
75
72
|
---
|
|
76
|
-
# Required Fields (7)
|
|
77
73
|
id: AUTH-001
|
|
78
74
|
version: 0.0.1
|
|
79
75
|
status: draft
|
|
@@ -81,17 +77,10 @@ created: 2025-10-23
|
|
|
81
77
|
updated: 2025-10-23
|
|
82
78
|
author: @YourGitHubHandle
|
|
83
79
|
priority: high
|
|
84
|
-
|
|
85
|
-
# Optional Fields (recommended)
|
|
86
|
-
category: feature
|
|
87
|
-
labels:
|
|
88
|
-
- authentication
|
|
89
|
-
- security
|
|
90
|
-
- jwt
|
|
91
80
|
---
|
|
92
81
|
```
|
|
93
82
|
|
|
94
|
-
### Step 3:
|
|
83
|
+
### Step 3: SPEC 타이틀 & HISTORY 추가
|
|
95
84
|
|
|
96
85
|
```markdown
|
|
97
86
|
# @SPEC:AUTH-001: JWT Authentication System
|
|
@@ -99,1202 +88,131 @@ labels:
|
|
|
99
88
|
## HISTORY
|
|
100
89
|
|
|
101
90
|
### v0.0.1 (2025-10-23)
|
|
102
|
-
- **INITIAL**: JWT
|
|
103
|
-
- **AUTHOR**: @
|
|
104
|
-
- **SCOPE**: User authentication, token generation, token validation
|
|
105
|
-
- **CONTEXT**: Requirement from product roadmap
|
|
91
|
+
- **INITIAL**: JWT 인증 SPEC 초안 작성
|
|
92
|
+
- **AUTHOR**: @YourHandle
|
|
106
93
|
```
|
|
107
94
|
|
|
108
|
-
### Step 4:
|
|
95
|
+
### Step 4: Environment & Assumptions 정의
|
|
109
96
|
|
|
110
97
|
```markdown
|
|
111
98
|
## Environment
|
|
112
99
|
|
|
113
|
-
**
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Database: PostgreSQL 15+
|
|
117
|
-
|
|
118
|
-
**Technical Stack**:
|
|
119
|
-
- JWT library: jsonwebtoken ^9.0.0
|
|
120
|
-
- Hashing: bcrypt ^5.1.0
|
|
121
|
-
|
|
122
|
-
**Constraints**:
|
|
123
|
-
- Token lifetime: 15 minutes (access), 7 days (refresh)
|
|
124
|
-
- Security: HTTPS required in production
|
|
100
|
+
**Runtime**: Node.js 20.x 이상
|
|
101
|
+
**Framework**: Express.js
|
|
102
|
+
**Database**: PostgreSQL 15+
|
|
125
103
|
|
|
126
104
|
## Assumptions
|
|
127
105
|
|
|
128
|
-
1.
|
|
129
|
-
2.
|
|
130
|
-
3.
|
|
131
|
-
4. **Password Policy**: Minimum 8 characters enforced at signup
|
|
106
|
+
1. 사용자 인증 정보는 PostgreSQL에 저장
|
|
107
|
+
2. JWT 시크릿은 환경변수로 관리
|
|
108
|
+
3. 서버 시계는 NTP로 동기화
|
|
132
109
|
```
|
|
133
110
|
|
|
134
|
-
### Step 5:
|
|
111
|
+
### Step 5: EARS 요구사항 작성
|
|
135
112
|
|
|
136
113
|
```markdown
|
|
137
114
|
## Requirements
|
|
138
115
|
|
|
139
116
|
### Ubiquitous Requirements
|
|
140
|
-
|
|
141
|
-
**UR-001**: The system shall provide JWT-based authentication.
|
|
142
|
-
|
|
143
|
-
**UR-002**: The system shall support user login with email and password.
|
|
144
|
-
|
|
145
|
-
**UR-003**: The system shall issue access tokens and refresh tokens.
|
|
146
|
-
|
|
147
|
-
### Event-driven Requirements
|
|
148
|
-
|
|
149
|
-
**ER-001**: WHEN a user submits valid credentials, the system shall issue a JWT access token with 15-minute expiry.
|
|
150
|
-
|
|
151
|
-
**ER-002**: WHEN a token expires, the system shall return HTTP 401 Unauthorized.
|
|
152
|
-
|
|
153
|
-
**ER-003**: WHEN a refresh token is presented, the system shall issue a new access token IF the refresh token is valid.
|
|
154
|
-
|
|
155
|
-
### State-driven Requirements
|
|
156
|
-
|
|
157
|
-
**SR-001**: WHILE a user is authenticated, the system shall allow access to protected resources.
|
|
158
|
-
|
|
159
|
-
**SR-002**: WHILE a token is valid, the system shall extract user ID from token claims.
|
|
160
|
-
|
|
161
|
-
### Optional Features
|
|
162
|
-
|
|
163
|
-
**OF-001**: WHERE multi-factor authentication is enabled, the system can require OTP verification after password check.
|
|
164
|
-
|
|
165
|
-
**OF-002**: WHERE session logging is enabled, the system can record login timestamps and IP addresses.
|
|
166
|
-
|
|
167
|
-
### Constraints
|
|
168
|
-
|
|
169
|
-
**C-001**: IF a token is expired, the system shall deny access and return HTTP 401.
|
|
170
|
-
|
|
171
|
-
**C-002**: IF more than 5 failed login attempts occur within 10 minutes, the system should temporarily lock the account.
|
|
172
|
-
|
|
173
|
-
**C-003**: Access tokens shall not exceed 15-minute lifetime.
|
|
174
|
-
|
|
175
|
-
**C-004**: Refresh tokens shall not exceed 7-day lifetime.
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Metadata Reference
|
|
181
|
-
|
|
182
|
-
### 7 Required Fields
|
|
183
|
-
|
|
184
|
-
#### 1. `id` – Unique SPEC Identifier
|
|
185
|
-
|
|
186
|
-
**Format**: `<DOMAIN>-<NUMBER>`
|
|
187
|
-
|
|
188
|
-
**Rules**:
|
|
189
|
-
- Immutable once assigned
|
|
190
|
-
- Use uppercase domain (e.g., `AUTH`, `PAYMENT`, `CONFIG`)
|
|
191
|
-
- Three-digit number (001–999)
|
|
192
|
-
- Check duplicates: `rg "@SPEC:AUTH-001" -n .moai/specs/`
|
|
193
|
-
|
|
194
|
-
**Examples**:
|
|
195
|
-
- `AUTH-001` (Authentication feature)
|
|
196
|
-
- `INSTALLER-SEC-001` (Installer security)
|
|
197
|
-
- `TRUST-001` (TRUST principles)
|
|
198
|
-
- `CONFIG-001` (Configuration schema)
|
|
199
|
-
|
|
200
|
-
**Directory Structure**:
|
|
201
|
-
```
|
|
202
|
-
.moai/specs/SPEC-AUTH-001/
|
|
203
|
-
├── spec.md # Main SPEC document
|
|
204
|
-
├── diagrams/ # Optional: Architecture diagrams
|
|
205
|
-
└── examples/ # Optional: Code examples
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
#### 2. `version` – Semantic Version
|
|
209
|
-
|
|
210
|
-
**Format**: `MAJOR.MINOR.PATCH`
|
|
211
|
-
|
|
212
|
-
**Lifecycle**:
|
|
213
|
-
|
|
214
|
-
| Version | Status | Description | Trigger |
|
|
215
|
-
|---------|--------|-------------|---------|
|
|
216
|
-
| `0.0.1` | draft | Initial draft | SPEC creation |
|
|
217
|
-
| `0.0.x` | draft | Draft refinements | Content edits |
|
|
218
|
-
| `0.1.0` | completed | Implementation complete | `/alfred:3-sync` after TDD |
|
|
219
|
-
| `0.1.x` | completed | Bug fixes, doc updates | Post-implementation patches |
|
|
220
|
-
| `0.x.0` | completed | Feature additions | Minor enhancements |
|
|
221
|
-
| `1.0.0` | completed | Production stable | Stakeholder approval |
|
|
222
|
-
|
|
223
|
-
**Version Update Examples**:
|
|
224
|
-
```markdown
|
|
225
|
-
## HISTORY
|
|
226
|
-
|
|
227
|
-
### v0.2.0 (2025-11-15)
|
|
228
|
-
- **ADDED**: Multi-factor authentication support
|
|
229
|
-
- **CHANGED**: Token expiry extended to 30 minutes
|
|
230
|
-
- **AUTHOR**: @YourHandle
|
|
231
|
-
|
|
232
|
-
### v0.1.0 (2025-10-30)
|
|
233
|
-
- **COMPLETED**: TDD implementation finished
|
|
234
|
-
- **EVIDENCE**: Commits 4c66076, 34e1bd9
|
|
235
|
-
- **TEST COVERAGE**: 89.13%
|
|
236
|
-
|
|
237
|
-
### v0.0.2 (2025-10-25)
|
|
238
|
-
- **REFINED**: Added password reset flow requirements
|
|
239
|
-
- **AUTHOR**: @YourHandle
|
|
240
|
-
|
|
241
|
-
### v0.0.1 (2025-10-23)
|
|
242
|
-
- **INITIAL**: JWT authentication SPEC draft created
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
#### 3. `status` – Progress State
|
|
246
|
-
|
|
247
|
-
**Values**: `draft` | `active` | `completed` | `deprecated`
|
|
248
|
-
|
|
249
|
-
**Lifecycle Flow**:
|
|
250
|
-
```
|
|
251
|
-
draft → active → completed → [deprecated]
|
|
252
|
-
↓ ↓ ↓
|
|
253
|
-
/alfred:1-plan /alfred:2-run /alfred:3-sync
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
**Transitions**:
|
|
257
|
-
- `draft`: Authoring in progress (v0.0.x)
|
|
258
|
-
- `active`: Implementation underway (v0.0.x → v0.1.0)
|
|
259
|
-
- `completed`: Implementation finished (v0.1.0+)
|
|
260
|
-
- `deprecated`: Marked for retirement
|
|
261
|
-
|
|
262
|
-
#### 4. `created` – Creation Date
|
|
263
|
-
|
|
264
|
-
**Format**: `YYYY-MM-DD`
|
|
265
|
-
|
|
266
|
-
**Rules**:
|
|
267
|
-
- Set once, never changes
|
|
268
|
-
- ISO 8601 date format
|
|
269
|
-
- Represents first draft date
|
|
270
|
-
|
|
271
|
-
**Example**: `created: 2025-10-23`
|
|
272
|
-
|
|
273
|
-
#### 5. `updated` – Last Modified Date
|
|
274
|
-
|
|
275
|
-
**Format**: `YYYY-MM-DD`
|
|
276
|
-
|
|
277
|
-
**Rules**:
|
|
278
|
-
- Update on every content change
|
|
279
|
-
- Initially same as `created`
|
|
280
|
-
- Reflects latest edit date
|
|
281
|
-
|
|
282
|
-
**Update Pattern**:
|
|
283
|
-
```yaml
|
|
284
|
-
created: 2025-10-23 # Never changes
|
|
285
|
-
updated: 2025-10-25 # Changes with edits
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
#### 6. `author` – Primary Author
|
|
289
|
-
|
|
290
|
-
**Format**: `@{GitHubHandle}`
|
|
291
|
-
|
|
292
|
-
**Rules**:
|
|
293
|
-
- Single value (not array)
|
|
294
|
-
- Prefix with `@`
|
|
295
|
-
- Use proper casing (e.g., `@Goos`, not `@goos`)
|
|
296
|
-
- Additional contributors go in HISTORY section
|
|
297
|
-
|
|
298
|
-
**Examples**:
|
|
299
|
-
```yaml
|
|
300
|
-
# Correct
|
|
301
|
-
author: @Goos
|
|
302
|
-
|
|
303
|
-
# Incorrect
|
|
304
|
-
author: goos # Missing @
|
|
305
|
-
authors: [@Goos] # Array not allowed
|
|
306
|
-
author: @goos # Wrong casing
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
#### 7. `priority` – Work Priority
|
|
310
|
-
|
|
311
|
-
**Values**: `critical` | `high` | `medium` | `low`
|
|
312
|
-
|
|
313
|
-
**Guidelines**:
|
|
314
|
-
|
|
315
|
-
| Priority | Description | Examples |
|
|
316
|
-
|----------|-------------|----------|
|
|
317
|
-
| `critical` | Production blockers, security vulnerabilities | Security patches, critical bugs |
|
|
318
|
-
| `high` | Major features, core functionality | Authentication, payment system |
|
|
319
|
-
| `medium` | Enhancements, improvements | UI polish, performance optimization |
|
|
320
|
-
| `low` | Nice-to-haves, documentation | README updates, minor refactors |
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
### 9 Optional Fields
|
|
325
|
-
|
|
326
|
-
#### 8. `category` – Change Type
|
|
327
|
-
|
|
328
|
-
**Values**: `feature` | `bugfix` | `refactor` | `security` | `docs` | `perf`
|
|
329
|
-
|
|
330
|
-
**Usage**:
|
|
331
|
-
```yaml
|
|
332
|
-
category: feature # New functionality
|
|
333
|
-
category: bugfix # Defect resolution
|
|
334
|
-
category: refactor # Code structure improvement
|
|
335
|
-
category: security # Security enhancement
|
|
336
|
-
category: docs # Documentation update
|
|
337
|
-
category: perf # Performance optimization
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
#### 9. `labels` – Classification Tags
|
|
341
|
-
|
|
342
|
-
**Format**: Array of strings
|
|
343
|
-
|
|
344
|
-
**Purpose**: Search, filtering, grouping
|
|
345
|
-
|
|
346
|
-
**Best Practices**:
|
|
347
|
-
- Use lowercase, kebab-case
|
|
348
|
-
- 2-5 labels per SPEC
|
|
349
|
-
- Avoid redundancy with `category`
|
|
350
|
-
|
|
351
|
-
**Examples**:
|
|
352
|
-
```yaml
|
|
353
|
-
labels:
|
|
354
|
-
- authentication
|
|
355
|
-
- jwt
|
|
356
|
-
- security
|
|
357
|
-
|
|
358
|
-
labels:
|
|
359
|
-
- performance
|
|
360
|
-
- optimization
|
|
361
|
-
- caching
|
|
362
|
-
|
|
363
|
-
labels:
|
|
364
|
-
- installer
|
|
365
|
-
- template
|
|
366
|
-
- cross-platform
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
#### 10-13. Relationship Fields (Dependency Graph)
|
|
370
|
-
|
|
371
|
-
##### `depends_on` – Required SPECs
|
|
372
|
-
|
|
373
|
-
**Meaning**: SPECs that must be completed first
|
|
374
|
-
|
|
375
|
-
**Example**:
|
|
376
|
-
```yaml
|
|
377
|
-
depends_on:
|
|
378
|
-
- USER-001 # User model SPEC
|
|
379
|
-
- TOKEN-001 # Token generation SPEC
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
**Use Case**: Determines execution order, parallelization
|
|
383
|
-
|
|
384
|
-
##### `blocks` – Blocked SPECs
|
|
385
|
-
|
|
386
|
-
**Meaning**: SPECs that cannot proceed until this one is resolved
|
|
387
|
-
|
|
388
|
-
**Example**:
|
|
389
|
-
```yaml
|
|
390
|
-
blocks:
|
|
391
|
-
- AUTH-002 # OAuth integration waits for basic auth
|
|
392
|
-
- PAYMENT-001 # Payment needs authentication
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
##### `related_specs` – Associated SPECs
|
|
396
|
-
|
|
397
|
-
**Meaning**: Related items without direct dependencies
|
|
398
|
-
|
|
399
|
-
**Example**:
|
|
400
|
-
```yaml
|
|
401
|
-
related_specs:
|
|
402
|
-
- SESSION-001 # Session management (related but independent)
|
|
403
|
-
- AUDIT-001 # Audit logging (cross-cutting concern)
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
##### `related_issue` – Linked GitHub Issue
|
|
407
|
-
|
|
408
|
-
**Format**: Full GitHub issue URL
|
|
409
|
-
|
|
410
|
-
**Example**:
|
|
411
|
-
```yaml
|
|
412
|
-
related_issue: "https://github.com/modu-ai/moai-adk/issues/42"
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
#### 14-15. Scope Fields (Impact Analysis)
|
|
416
|
-
|
|
417
|
-
##### `scope.packages` – Impacted Packages
|
|
418
|
-
|
|
419
|
-
**Purpose**: Track which packages/modules are affected
|
|
420
|
-
|
|
421
|
-
**Example**:
|
|
422
|
-
```yaml
|
|
423
|
-
scope:
|
|
424
|
-
packages:
|
|
425
|
-
- src/core/auth
|
|
426
|
-
- src/core/token
|
|
427
|
-
- src/api/routes/auth
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
##### `scope.files` – Key Files
|
|
431
|
-
|
|
432
|
-
**Purpose**: Reference primary implementation files
|
|
433
|
-
|
|
434
|
-
**Example**:
|
|
435
|
-
```yaml
|
|
436
|
-
scope:
|
|
437
|
-
files:
|
|
438
|
-
- auth-service.ts
|
|
439
|
-
- token-manager.ts
|
|
440
|
-
- auth.routes.ts
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
## EARS Requirement Syntax
|
|
446
|
-
|
|
447
|
-
### The 5 EARS Patterns
|
|
448
|
-
|
|
449
|
-
EARS (Easy Approach to Requirements Syntax) provides disciplined, testable requirements using familiar keywords.
|
|
450
|
-
|
|
451
|
-
#### Pattern 1: Ubiquitous Requirements
|
|
452
|
-
|
|
453
|
-
**Template**: `The system shall [capability].`
|
|
454
|
-
|
|
455
|
-
**Purpose**: Baseline functionality always active
|
|
456
|
-
|
|
457
|
-
**Characteristics**:
|
|
458
|
-
- No preconditions
|
|
459
|
-
- Always applicable
|
|
460
|
-
- Defines core features
|
|
461
|
-
|
|
462
|
-
**Examples**:
|
|
463
|
-
```markdown
|
|
464
|
-
**UR-001**: The system shall provide user authentication.
|
|
465
|
-
|
|
466
|
-
**UR-002**: The system shall support HTTPS connections.
|
|
467
|
-
|
|
468
|
-
**UR-003**: The system shall store user credentials securely.
|
|
469
|
-
|
|
470
|
-
**UR-004**: The mobile app shall have a mass of less than 50 MB.
|
|
471
|
-
|
|
472
|
-
**UR-005**: The API response time shall not exceed 200ms for 95% of requests.
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
**Best Practices**:
|
|
476
|
-
- ✅ Use active voice
|
|
477
|
-
- ✅ Single responsibility per requirement
|
|
478
|
-
- ✅ Measurable outcomes
|
|
479
|
-
- ❌ Avoid vague terms ("user-friendly", "fast")
|
|
480
|
-
|
|
481
|
-
#### Pattern 2: Event-driven Requirements
|
|
482
|
-
|
|
483
|
-
**Template**: `WHEN [trigger], the system shall [response].`
|
|
484
|
-
|
|
485
|
-
**Purpose**: Define behavior triggered by specific events
|
|
486
|
-
|
|
487
|
-
**Characteristics**:
|
|
488
|
-
- Triggered by discrete events
|
|
489
|
-
- One-time response
|
|
490
|
-
- Cause-and-effect relationship
|
|
491
|
-
|
|
492
|
-
**Examples**:
|
|
493
|
-
```markdown
|
|
494
|
-
**ER-001**: WHEN a user submits valid credentials, the system shall issue a JWT token.
|
|
495
|
-
|
|
496
|
-
**ER-002**: WHEN a token expires, the system shall return HTTP 401 Unauthorized.
|
|
497
|
-
|
|
498
|
-
**ER-003**: WHEN a user clicks "Forgot Password", the system shall send a password reset email.
|
|
499
|
-
|
|
500
|
-
**ER-004**: WHEN the database connection fails, the system shall retry 3 times with exponential backoff.
|
|
501
|
-
|
|
502
|
-
**ER-005**: WHEN a file upload exceeds 10 MB, the system shall reject the upload with error message.
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
**Advanced Pattern** (with postcondition):
|
|
506
|
-
```markdown
|
|
507
|
-
**ER-006**: WHEN a payment transaction completes, the system shall send a confirmation email THEN update the order status to "paid".
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
**Best Practices**:
|
|
511
|
-
- ✅ Single trigger per requirement
|
|
512
|
-
- ✅ Specific, testable response
|
|
513
|
-
- ✅ Include error conditions
|
|
514
|
-
- ❌ Don't chain multiple WHENs
|
|
515
|
-
|
|
516
|
-
#### Pattern 3: State-driven Requirements
|
|
517
|
-
|
|
518
|
-
**Template**: `WHILE [state], the system shall [behavior].`
|
|
519
|
-
|
|
520
|
-
**Purpose**: Continuous behavior during a state
|
|
521
|
-
|
|
522
|
-
**Characteristics**:
|
|
523
|
-
- Active while state persists
|
|
524
|
-
- Continuous monitoring
|
|
525
|
-
- State-dependent behavior
|
|
526
|
-
|
|
527
|
-
**Examples**:
|
|
528
|
-
```markdown
|
|
529
|
-
**SR-001**: WHILE a user is authenticated, the system shall allow access to protected routes.
|
|
530
|
-
|
|
531
|
-
**SR-002**: WHILE a token is valid, the system shall extract user ID from token claims.
|
|
532
|
-
|
|
533
|
-
**SR-003**: WHILE the system is in maintenance mode, the system shall return HTTP 503 Service Unavailable.
|
|
534
|
-
|
|
535
|
-
**SR-004**: WHILE battery level is below 20%, the mobile app shall reduce background sync frequency.
|
|
536
|
-
|
|
537
|
-
**SR-005**: WHILE a file upload is in progress, the UI shall display a progress bar.
|
|
538
|
-
```
|
|
539
|
-
|
|
540
|
-
**Best Practices**:
|
|
541
|
-
- ✅ Clearly define state boundaries
|
|
542
|
-
- ✅ Specify state entry/exit conditions
|
|
543
|
-
- ✅ Test state transitions
|
|
544
|
-
- ❌ Avoid overlapping states
|
|
545
|
-
|
|
546
|
-
#### Pattern 4: Optional Features
|
|
547
|
-
|
|
548
|
-
**Template**: `WHERE [feature], the system can [behavior].`
|
|
549
|
-
|
|
550
|
-
**Purpose**: Conditional functionality based on feature flags
|
|
551
|
-
|
|
552
|
-
**Characteristics**:
|
|
553
|
-
- Applies only if feature is present
|
|
554
|
-
- Configuration-dependent
|
|
555
|
-
- Product variation support
|
|
556
|
-
|
|
557
|
-
**Examples**:
|
|
558
|
-
```markdown
|
|
559
|
-
**OF-001**: WHERE multi-factor authentication is enabled, the system can require OTP verification.
|
|
560
|
-
|
|
561
|
-
**OF-002**: WHERE session logging is enabled, the system can record login timestamps.
|
|
562
|
-
|
|
563
|
-
**OF-003**: WHERE premium subscription is active, the system can allow unlimited API calls.
|
|
564
|
-
|
|
565
|
-
**OF-004**: WHERE dark mode is selected, the UI can render with dark color scheme.
|
|
566
|
-
|
|
567
|
-
**OF-005**: WHERE analytics consent is granted, the system can track user behavior.
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
**Best Practices**:
|
|
571
|
-
- ✅ Use "can" (permissive) not "shall" (mandatory)
|
|
572
|
-
- ✅ Clearly define feature flag conditions
|
|
573
|
-
- ✅ Specify default behavior when feature is absent
|
|
574
|
-
- ❌ Don't make core features optional
|
|
575
|
-
|
|
576
|
-
#### Pattern 5: Constraints
|
|
577
|
-
|
|
578
|
-
**Template**: `IF [condition], THEN the system shall [constraint].`
|
|
579
|
-
|
|
580
|
-
**Purpose**: Enforce quality attributes and business rules
|
|
581
|
-
|
|
582
|
-
**Characteristics**:
|
|
583
|
-
- Conditional enforcement
|
|
584
|
-
- Quality gates
|
|
585
|
-
- Business rule validation
|
|
586
|
-
|
|
587
|
-
**Examples**:
|
|
588
|
-
```markdown
|
|
589
|
-
**C-001**: IF a token is expired, THEN the system shall deny access and return HTTP 401.
|
|
590
|
-
|
|
591
|
-
**C-002**: IF more than 5 failed login attempts occur within 10 minutes, THEN the system should temporarily lock the account.
|
|
592
|
-
|
|
593
|
-
**C-003**: Access tokens shall not exceed 15-minute lifetime.
|
|
594
|
-
|
|
595
|
-
**C-004**: IF a password is less than 8 characters, THEN the system shall reject registration.
|
|
596
|
-
|
|
597
|
-
**C-005**: IF API rate limit is exceeded, THEN the system shall return HTTP 429 Too Many Requests.
|
|
598
|
-
```
|
|
599
|
-
|
|
600
|
-
**Simplified Constraint** (no condition):
|
|
601
|
-
```markdown
|
|
602
|
-
**C-006**: The system shall not store plaintext passwords.
|
|
603
|
-
|
|
604
|
-
**C-007**: All API endpoints shall require authentication except /health and /login.
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
**Best Practices**:
|
|
608
|
-
- ✅ Use SHALL for hard constraints, SHOULD for soft recommendations
|
|
609
|
-
- ✅ Quantify limits (time, size, count)
|
|
610
|
-
- ✅ Specify enforcement mechanism
|
|
611
|
-
- ❌ Avoid vague constraints
|
|
612
|
-
|
|
613
|
-
---
|
|
614
|
-
|
|
615
|
-
### EARS Pattern Selection Guide
|
|
616
|
-
|
|
617
|
-
| Pattern | Keyword | Use When | Example Context |
|
|
618
|
-
|---------|---------|----------|-----------------|
|
|
619
|
-
| **Ubiquitous** | shall | Core functionality, always active | "System shall provide login" |
|
|
620
|
-
| **Event-driven** | WHEN | Response to discrete event | "WHEN login fails, show error" |
|
|
621
|
-
| **State-driven** | WHILE | Continuous behavior in state | "WHILE logged in, allow access" |
|
|
622
|
-
| **Optional** | WHERE | Feature flag or configuration | "WHERE premium, unlock features" |
|
|
623
|
-
| **Constraints** | IF-THEN | Quality gates, business rules | "IF expired, deny access" |
|
|
624
|
-
|
|
625
|
-
---
|
|
626
|
-
|
|
627
|
-
### Real-World EARS Examples
|
|
628
|
-
|
|
629
|
-
#### Example 1: E-commerce Checkout
|
|
630
|
-
|
|
631
|
-
```markdown
|
|
632
|
-
### Ubiquitous Requirements
|
|
633
|
-
**UR-001**: The system shall provide a shopping cart.
|
|
634
|
-
**UR-002**: The system shall support credit card payments.
|
|
635
|
-
|
|
636
|
-
### Event-driven Requirements
|
|
637
|
-
**ER-001**: WHEN a user adds an item to cart, the system shall update the cart total.
|
|
638
|
-
**ER-002**: WHEN payment is successful, the system shall send order confirmation email.
|
|
639
|
-
**ER-003**: WHEN inventory is insufficient, the system shall display "out of stock" message.
|
|
640
|
-
|
|
641
|
-
### State-driven Requirements
|
|
642
|
-
**SR-001**: WHILE items are in cart, the system shall reserve inventory for 30 minutes.
|
|
643
|
-
**SR-002**: WHILE payment is processing, the UI shall display a loading indicator.
|
|
644
|
-
|
|
645
|
-
### Optional Features
|
|
646
|
-
**OF-001**: WHERE express shipping is selected, the system can calculate expedited shipping cost.
|
|
647
|
-
**OF-002**: WHERE gift wrapping is available, the system can offer gift wrap option.
|
|
648
|
-
|
|
649
|
-
### Constraints
|
|
650
|
-
**C-001**: IF cart total is below $50, THEN the system shall add $5 shipping fee.
|
|
651
|
-
**C-002**: IF payment fails after 3 attempts, THEN the system shall lock the order for 1 hour.
|
|
652
|
-
**C-003**: Order processing time shall not exceed 5 seconds.
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
#### Example 2: Mobile App Push Notifications
|
|
656
|
-
|
|
657
|
-
```markdown
|
|
658
|
-
### Ubiquitous Requirements
|
|
659
|
-
**UR-001**: The app shall support push notifications.
|
|
660
|
-
**UR-002**: The app shall allow users to enable/disable notifications.
|
|
117
|
+
**UR-001**: 시스템은 JWT 기반 인증을 제공해야 한다.
|
|
661
118
|
|
|
662
119
|
### Event-driven Requirements
|
|
663
|
-
**ER-001**: WHEN
|
|
664
|
-
**ER-002**: WHEN a notification is tapped, the app shall navigate to the message screen.
|
|
665
|
-
**ER-003**: WHEN notification permission is denied, the app shall show in-app notification banner.
|
|
120
|
+
**ER-001**: WHEN 사용자가 유효한 인증 정보를 제출하면, 시스템은 15분 만료 시간을 가진 JWT 토큰을 발급해야 한다.
|
|
666
121
|
|
|
667
122
|
### State-driven Requirements
|
|
668
|
-
**SR-001**: WHILE
|
|
669
|
-
**SR-002**: WHILE Do Not Disturb mode is active, the system shall silence all notifications.
|
|
123
|
+
**SR-001**: WHILE 사용자가 인증된 상태이면, 시스템은 보호된 리소스에 대한 접근을 허용해야 한다.
|
|
670
124
|
|
|
671
125
|
### Optional Features
|
|
672
|
-
**OF-001**: WHERE
|
|
673
|
-
**OF-002**: WHERE notification grouping is supported, the system can group notifications by conversation.
|
|
126
|
+
**OF-001**: WHERE 다중 인증이 활성화된 경우, 시스템은 비밀번호 확인 후 OTP 검증을 요구할 수 있다.
|
|
674
127
|
|
|
675
128
|
### Constraints
|
|
676
|
-
**C-001**: IF
|
|
677
|
-
**C-002**: Notification delivery latency shall not exceed 5 seconds.
|
|
129
|
+
**C-001**: IF 토큰이 만료되었다면, 시스템은 접근을 거부하고 HTTP 401을 반환해야 한다.
|
|
678
130
|
```
|
|
679
131
|
|
|
680
132
|
---
|
|
681
133
|
|
|
682
|
-
##
|
|
134
|
+
## EARS 5가지 패턴 개요
|
|
683
135
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
### v{MAJOR}.{MINOR}.{PATCH} ({YYYY-MM-DD})
|
|
692
|
-
- **{CHANGE_TYPE}**: {Description}
|
|
693
|
-
- **AUTHOR**: {GitHub handle}
|
|
694
|
-
- **{Additional context}**: {Details}
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
### Change Types
|
|
698
|
-
|
|
699
|
-
| Type | Description | Example |
|
|
700
|
-
|------|-------------|---------|
|
|
701
|
-
| **INITIAL** | First draft | `v0.0.1: INITIAL draft created` |
|
|
702
|
-
| **REFINED** | Content updates during draft | `v0.0.2: REFINED requirements based on review` |
|
|
703
|
-
| **COMPLETED** | Implementation finished | `v0.1.0: COMPLETED TDD implementation` |
|
|
704
|
-
| **ADDED** | New requirements/features | `v0.2.0: ADDED multi-factor authentication` |
|
|
705
|
-
| **CHANGED** | Modified requirements | `v0.2.0: CHANGED token expiry from 15min to 30min` |
|
|
706
|
-
| **FIXED** | Bug fixes post-implementation | `v0.1.1: FIXED token refresh logic` |
|
|
707
|
-
| **DEPRECATED** | Marked for retirement | `v1.5.0: DEPRECATED legacy auth endpoint` |
|
|
708
|
-
|
|
709
|
-
### Complete HISTORY Example
|
|
710
|
-
|
|
711
|
-
```markdown
|
|
712
|
-
## HISTORY
|
|
713
|
-
|
|
714
|
-
### v0.2.0 (2025-11-15)
|
|
715
|
-
- **ADDED**: Multi-factor authentication support via OTP
|
|
716
|
-
- **CHANGED**: Token expiry extended to 30 minutes based on user feedback
|
|
717
|
-
- **AUTHOR**: @Goos
|
|
718
|
-
- **REVIEWER**: @SecurityTeam
|
|
719
|
-
- **RATIONALE**: Improved UX while maintaining security posture
|
|
720
|
-
|
|
721
|
-
### v0.1.1 (2025-11-01)
|
|
722
|
-
- **FIXED**: Token refresh race condition
|
|
723
|
-
- **EVIDENCE**: Commit 3f9a2b7
|
|
724
|
-
- **AUTHOR**: @Goos
|
|
725
|
-
|
|
726
|
-
### v0.1.0 (2025-10-30)
|
|
727
|
-
- **COMPLETED**: TDD implementation finished
|
|
728
|
-
- **AUTHOR**: @Goos
|
|
729
|
-
- **EVIDENCE**: Commits 4c66076, 34e1bd9, 1dec08f
|
|
730
|
-
- **TEST COVERAGE**: 89.13% (target: 85%)
|
|
731
|
-
- **QUALITY METRICS**:
|
|
732
|
-
- Test Pass Rate: 100% (42/42 tests)
|
|
733
|
-
- Linting: ruff ✅
|
|
734
|
-
- Type Checking: mypy ✅
|
|
735
|
-
- **TAG CHAIN**:
|
|
736
|
-
- @SPEC:AUTH-001: 1 occurrence
|
|
737
|
-
- @TEST:AUTH-001: 8 occurrences
|
|
738
|
-
- @CODE:AUTH-001: 12 occurrences
|
|
739
|
-
|
|
740
|
-
### v0.0.2 (2025-10-25)
|
|
741
|
-
- **REFINED**: Added password reset flow requirements
|
|
742
|
-
- **REFINED**: Clarified token lifetime constraints
|
|
743
|
-
- **AUTHOR**: @Goos
|
|
744
|
-
|
|
745
|
-
### v0.0.1 (2025-10-23)
|
|
746
|
-
- **INITIAL**: JWT authentication SPEC draft created
|
|
747
|
-
- **AUTHOR**: @Goos
|
|
748
|
-
- **SCOPE**: User authentication, token generation, token validation
|
|
749
|
-
- **CONTEXT**: Requirement from Q4 2025 product roadmap
|
|
750
|
-
```
|
|
136
|
+
| 패턴 | 키워드 | 용도 | 예시 |
|
|
137
|
+
|------|--------|------|------|
|
|
138
|
+
| **Ubiquitous** | shall | 항상 활성화된 핵심 기능 | "시스템은 로그인을 제공해야 한다" |
|
|
139
|
+
| **Event-driven** | WHEN | 특정 이벤트에 대한 응답 | "WHEN 로그인 실패 시, 에러 표시" |
|
|
140
|
+
| **State-driven** | WHILE | 상태 중 지속적 동작 | "WHILE 로그인 상태, 접근 허용" |
|
|
141
|
+
| **Optional** | WHERE | 기능 플래그 기반 조건부 | "WHERE 프리미엄이면, 기능 해제" |
|
|
142
|
+
| **Constraints** | IF-THEN | 품질 게이트, 비즈니스 규칙 | "IF 만료되었다면, 거부" |
|
|
751
143
|
|
|
752
144
|
---
|
|
753
145
|
|
|
754
|
-
##
|
|
755
|
-
|
|
756
|
-
### TAG Block Format
|
|
757
|
-
|
|
758
|
-
Every SPEC document starts with a TAG block after the title:
|
|
759
|
-
|
|
760
|
-
```markdown
|
|
761
|
-
# @SPEC:AUTH-001: JWT Authentication System
|
|
762
|
-
```
|
|
763
|
-
|
|
764
|
-
### TAG Chain References
|
|
765
|
-
|
|
766
|
-
Link related TAGs in the SPEC:
|
|
767
|
-
|
|
768
|
-
```markdown
|
|
769
|
-
## Traceability (@TAG Chain)
|
|
770
|
-
|
|
771
|
-
### TAG Chain Structure
|
|
772
|
-
```
|
|
773
|
-
@SPEC:AUTH-001 (this document)
|
|
774
|
-
↓
|
|
775
|
-
@TEST:AUTH-001 (tests/auth/service.test.ts)
|
|
776
|
-
↓
|
|
777
|
-
@CODE:AUTH-001 (src/auth/service.ts, src/auth/token-manager.ts)
|
|
778
|
-
↓
|
|
779
|
-
@DOC:AUTH-001 (docs/api/authentication.md)
|
|
780
|
-
```
|
|
781
|
-
|
|
782
|
-
### Verification Commands
|
|
783
|
-
```bash
|
|
784
|
-
# Verify SPEC TAG
|
|
785
|
-
rg '@SPEC:AUTH-001' -n .moai/specs/
|
|
146
|
+
## 필수 메타데이터 7개 필드
|
|
786
147
|
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
148
|
+
1. **id**: `<DOMAIN>-<NUMBER>` (예: `AUTH-001`) - 불변 식별자
|
|
149
|
+
2. **version**: `MAJOR.MINOR.PATCH` (예: `0.0.1`) - 시맨틱 버전
|
|
150
|
+
3. **status**: `draft` | `active` | `completed` | `deprecated`
|
|
151
|
+
4. **created**: `YYYY-MM-DD` - 최초 생성일
|
|
152
|
+
5. **updated**: `YYYY-MM-DD` - 최종 수정일
|
|
153
|
+
6. **author**: `@GitHubHandle` - 주 작성자 (@ 접두사 필수)
|
|
154
|
+
7. **priority**: `critical` | `high` | `medium` | `low`
|
|
790
155
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
156
|
+
**버전 생애주기**:
|
|
157
|
+
- `0.0.x` → draft (초안 작성 중)
|
|
158
|
+
- `0.1.0` → completed (구현 완료)
|
|
159
|
+
- `1.0.0` → stable (프로덕션 안정)
|
|
795
160
|
|
|
796
161
|
---
|
|
797
162
|
|
|
798
|
-
##
|
|
799
|
-
|
|
800
|
-
### Metadata Validation
|
|
801
|
-
|
|
802
|
-
```bash
|
|
803
|
-
# Check all required fields present
|
|
804
|
-
rg "^(id|version|status|created|updated|author|priority):" .moai/specs/SPEC-AUTH-001/spec.md
|
|
805
|
-
|
|
806
|
-
# Verify author format (@Handle)
|
|
807
|
-
rg "^author: @[A-Z]" .moai/specs/SPEC-AUTH-001/spec.md
|
|
808
|
-
|
|
809
|
-
# Verify version format (0.x.y)
|
|
810
|
-
rg "^version: 0\.\d+\.\d+" .moai/specs/SPEC-AUTH-001/spec.md
|
|
811
|
-
|
|
812
|
-
# Check duplicate IDs
|
|
813
|
-
rg "@SPEC:AUTH-001" -n .moai/specs/
|
|
814
|
-
```
|
|
815
|
-
|
|
816
|
-
### Content Validation
|
|
163
|
+
## 검증 체크리스트
|
|
817
164
|
|
|
818
|
-
|
|
819
|
-
- [ ]
|
|
820
|
-
- [ ]
|
|
821
|
-
- [ ]
|
|
822
|
-
- [ ]
|
|
823
|
-
- [ ] **Requirements Section**: All 5 EARS patterns used (or justified omissions)
|
|
824
|
-
- [ ] **Acceptance Criteria**: Testable criteria for each requirement
|
|
825
|
-
- [ ] **Traceability Section**: TAG chain structure documented
|
|
165
|
+
### 메타데이터 검증
|
|
166
|
+
- [ ] 7개 필수 필드 모두 존재
|
|
167
|
+
- [ ] `author` 필드에 @ 접두사 포함
|
|
168
|
+
- [ ] `version` 형식이 `0.x.y` 형식
|
|
169
|
+
- [ ] `id`가 중복되지 않음 (`rg "@SPEC:AUTH-001" -n .moai/specs/`)
|
|
826
170
|
|
|
827
|
-
###
|
|
171
|
+
### 콘텐츠 검증
|
|
172
|
+
- [ ] YAML Front Matter 완성
|
|
173
|
+
- [ ] 타이틀에 `@SPEC:{ID}` TAG 블록
|
|
174
|
+
- [ ] HISTORY 섹션에 v0.0.1 INITIAL 엔트리
|
|
175
|
+
- [ ] Environment 섹션 정의
|
|
176
|
+
- [ ] Assumptions 섹션 정의 (최소 3개)
|
|
177
|
+
- [ ] Requirements 섹션에 EARS 패턴 사용
|
|
178
|
+
- [ ] Traceability 섹션에 TAG 체인 구조
|
|
828
179
|
|
|
829
|
-
|
|
830
|
-
- [ ]
|
|
831
|
-
- [ ]
|
|
832
|
-
- [ ]
|
|
833
|
-
- [ ]
|
|
834
|
-
|
|
835
|
-
### Quality Checks
|
|
836
|
-
|
|
837
|
-
- [ ] **No duplicate IDs**: `rg "AUTH-001" -n` returns only this SPEC
|
|
838
|
-
- [ ] **Consistent naming**: Directory name matches `SPEC-{ID}`
|
|
839
|
-
- [ ] **Complete HISTORY**: Each version has date, author, description
|
|
840
|
-
- [ ] **Clear requirements**: Each requirement is testable and unambiguous
|
|
841
|
-
- [ ] **Proper versioning**: Follows semantic versioning lifecycle
|
|
180
|
+
### EARS 문법 검증
|
|
181
|
+
- [ ] Ubiquitous: "shall" + 능력 표현
|
|
182
|
+
- [ ] Event-driven: "WHEN [트리거]"로 시작
|
|
183
|
+
- [ ] State-driven: "WHILE [상태]"로 시작
|
|
184
|
+
- [ ] Optional: "WHERE [기능]"로 시작, "can" 사용
|
|
185
|
+
- [ ] Constraints: "IF-THEN" 또는 직접 제약 표현
|
|
842
186
|
|
|
843
187
|
---
|
|
844
188
|
|
|
845
|
-
##
|
|
846
|
-
|
|
847
|
-
### Pitfall 1: Changing ID After Assignment
|
|
848
|
-
|
|
849
|
-
**Problem**: Changing `id: AUTH-001` to `id: AUTH-002` after SPEC is created
|
|
850
|
-
|
|
851
|
-
**Impact**:
|
|
852
|
-
- Breaks TAG chain references
|
|
853
|
-
- Orphans existing code/tests
|
|
854
|
-
- Git history loss
|
|
855
|
-
|
|
856
|
-
**Prevention**:
|
|
857
|
-
```bash
|
|
858
|
-
# Always check for existing IDs before assignment
|
|
859
|
-
rg "@SPEC:AUTH" -n .moai/specs/
|
|
860
|
-
rg "AUTH-001" -n
|
|
861
|
-
|
|
862
|
-
# IDs are IMMUTABLE once assigned
|
|
863
|
-
```
|
|
864
|
-
|
|
865
|
-
### Pitfall 2: Skipping HISTORY Updates
|
|
866
|
-
|
|
867
|
-
**Problem**: Updating SPEC content without adding HISTORY entry
|
|
189
|
+
## 일반적인 함정
|
|
868
190
|
|
|
869
|
-
**
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
**
|
|
875
|
-
```markdown
|
|
876
|
-
# ALWAYS update HISTORY when changing content
|
|
877
|
-
## HISTORY
|
|
878
|
-
|
|
879
|
-
### v0.0.2 (2025-10-25) ← New entry
|
|
880
|
-
- **REFINED**: Added XYZ requirement
|
|
881
|
-
- **AUTHOR**: @YourHandle
|
|
882
|
-
|
|
883
|
-
### v0.0.1 (2025-10-23)
|
|
884
|
-
- **INITIAL**: First draft
|
|
885
|
-
```
|
|
886
|
-
|
|
887
|
-
### Pitfall 3: Wrong Version Number Progression
|
|
888
|
-
|
|
889
|
-
**Problem**: Jumping from v0.0.1 to v1.0.0 without intermediate versions
|
|
890
|
-
|
|
891
|
-
**Impact**:
|
|
892
|
-
- Version lifecycle broken
|
|
893
|
-
- Unclear maturity signal
|
|
894
|
-
- Stakeholder confusion
|
|
895
|
-
|
|
896
|
-
**Prevention**:
|
|
897
|
-
```markdown
|
|
898
|
-
# Follow version lifecycle strictly
|
|
899
|
-
v0.0.1 → v0.0.2 → ... → v0.1.0 → v0.1.1 → ... → v1.0.0
|
|
900
|
-
(draft) (draft) (completed) (patches) (stable)
|
|
901
|
-
|
|
902
|
-
# Never skip stages without justification in HISTORY
|
|
903
|
-
```
|
|
904
|
-
|
|
905
|
-
### Pitfall 4: Vague EARS Requirements
|
|
906
|
-
|
|
907
|
-
**Problem**: "The system shall be fast and user-friendly"
|
|
908
|
-
|
|
909
|
-
**Impact**:
|
|
910
|
-
- Untestable requirements
|
|
911
|
-
- Ambiguous acceptance criteria
|
|
912
|
-
- Implementation confusion
|
|
913
|
-
|
|
914
|
-
**Prevention**:
|
|
915
|
-
```markdown
|
|
916
|
-
# Bad
|
|
917
|
-
**UR-001**: The system shall be fast.
|
|
918
|
-
|
|
919
|
-
# Good
|
|
920
|
-
**UR-001**: The system shall respond to API requests within 200ms for 95% of requests.
|
|
921
|
-
|
|
922
|
-
# Bad
|
|
923
|
-
**ER-001**: WHEN user logs in, system should work.
|
|
924
|
-
|
|
925
|
-
# Good
|
|
926
|
-
**ER-001**: WHEN a user submits valid credentials, the system shall issue a JWT token with 15-minute expiry.
|
|
927
|
-
```
|
|
928
|
-
|
|
929
|
-
### Pitfall 5: Missing Author `@` Prefix
|
|
930
|
-
|
|
931
|
-
**Problem**: `author: Goos` instead of `author: @Goos`
|
|
932
|
-
|
|
933
|
-
**Impact**:
|
|
934
|
-
- Validation failures
|
|
935
|
-
- Inconsistent attribution
|
|
936
|
-
- GitHub linking broken
|
|
937
|
-
|
|
938
|
-
**Prevention**:
|
|
939
|
-
```yaml
|
|
940
|
-
# Wrong
|
|
941
|
-
author: Goos
|
|
942
|
-
author: goos
|
|
943
|
-
|
|
944
|
-
# Correct
|
|
945
|
-
author: @Goos
|
|
946
|
-
```
|
|
947
|
-
|
|
948
|
-
### Pitfall 6: Duplicate SPEC IDs
|
|
949
|
-
|
|
950
|
-
**Problem**: Creating `SPEC-AUTH-001` when it already exists
|
|
951
|
-
|
|
952
|
-
**Impact**:
|
|
953
|
-
- TAG chain collisions
|
|
954
|
-
- Ambiguous references
|
|
955
|
-
- Merge conflicts
|
|
956
|
-
|
|
957
|
-
**Prevention**:
|
|
958
|
-
```bash
|
|
959
|
-
# ALWAYS check before creating new SPEC
|
|
960
|
-
rg "@SPEC:AUTH-001" -n .moai/specs/
|
|
961
|
-
rg "AUTH-001" -n
|
|
962
|
-
|
|
963
|
-
# Use Explore agent to find similar SPECs
|
|
964
|
-
# Increment number if domain exists
|
|
965
|
-
```
|
|
966
|
-
|
|
967
|
-
### Pitfall 7: Mixing EARS Patterns
|
|
968
|
-
|
|
969
|
-
**Problem**: "WHEN user is logged in, WHILE session is active, the system shall..."
|
|
970
|
-
|
|
971
|
-
**Impact**:
|
|
972
|
-
- Confusing logic
|
|
973
|
-
- Hard to test
|
|
974
|
-
- Maintenance burden
|
|
975
|
-
|
|
976
|
-
**Prevention**:
|
|
977
|
-
```markdown
|
|
978
|
-
# Bad (mixed patterns)
|
|
979
|
-
**ER-001**: WHEN user logs in, WHILE session is active, the system shall allow access.
|
|
980
|
-
|
|
981
|
-
# Good (separate requirements)
|
|
982
|
-
**ER-001**: WHEN a user logs in successfully, the system shall create a session.
|
|
983
|
-
**SR-001**: WHILE a session is active, the system shall allow access to protected resources.
|
|
984
|
-
```
|
|
191
|
+
1. ❌ **ID 변경**: 할당 후 SPEC ID 변경 → TAG 체인 파괴
|
|
192
|
+
2. ❌ **HISTORY 누락**: 콘텐츠 변경 시 HISTORY 업데이트 생략
|
|
193
|
+
3. ❌ **잘못된 버전 진행**: v0.0.1 → v1.0.0으로 건너뛰기
|
|
194
|
+
4. ❌ **모호한 요구사항**: "빠르고 사용자 친화적" 같은 측정 불가능한 표현
|
|
195
|
+
5. ❌ **@ 접두사 누락**: `author: Goos` 대신 `author: @Goos`
|
|
196
|
+
6. ❌ **EARS 패턴 혼합**: 하나의 요구사항에 여러 키워드 혼용
|
|
985
197
|
|
|
986
198
|
---
|
|
987
199
|
|
|
988
|
-
##
|
|
989
|
-
|
|
990
|
-
### Workflow Handoff
|
|
200
|
+
## Related Skills
|
|
991
201
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
3. **Validate** metadata completeness
|
|
997
|
-
4. **Create** `.moai/specs/SPEC-{ID}/spec.md` with EARS requirements
|
|
998
|
-
5. **Initialize** Git workflow (feature branch, Draft PR)
|
|
999
|
-
|
|
1000
|
-
### spec-builder Integration Points
|
|
1001
|
-
|
|
1002
|
-
```markdown
|
|
1003
|
-
Phase 1: SPEC Candidate Generation
|
|
1004
|
-
↓ (uses moai-spec-authoring for metadata structure)
|
|
1005
|
-
Phase 2: User Approval
|
|
1006
|
-
↓
|
|
1007
|
-
Phase 3: SPEC File Creation
|
|
1008
|
-
↓ (applies EARS templates from this Skill)
|
|
1009
|
-
Phase 4: Git Workflow Initialization
|
|
1010
|
-
↓
|
|
1011
|
-
Phase 5: Handoff to /alfred:2-run
|
|
1012
|
-
```
|
|
1013
|
-
|
|
1014
|
-
### Agent Collaboration
|
|
1015
|
-
|
|
1016
|
-
- **spec-builder**: Generates SPEC using this Skill's templates
|
|
1017
|
-
- **tag-agent**: Validates TAG format and uniqueness
|
|
1018
|
-
- **trust-checker**: Verifies metadata completeness
|
|
1019
|
-
- **git-manager**: Creates feature branch and Draft PR
|
|
202
|
+
- `moai-foundation-ears` - EARS 문법 패턴
|
|
203
|
+
- `moai-foundation-specs` - 메타데이터 검증
|
|
204
|
+
- `moai-foundation-tags` - TAG 시스템 통합
|
|
205
|
+
- `moai-alfred-spec-metadata-validation` - 자동화된 검증
|
|
1020
206
|
|
|
1021
207
|
---
|
|
1022
208
|
|
|
1023
|
-
##
|
|
1024
|
-
|
|
1025
|
-
### Quick Validation Script
|
|
1026
|
-
|
|
1027
|
-
```bash
|
|
1028
|
-
#!/usr/bin/env bash
|
|
1029
|
-
# validate-spec.sh - SPEC validation helper
|
|
1030
|
-
|
|
1031
|
-
SPEC_DIR="$1"
|
|
1032
|
-
|
|
1033
|
-
echo "Validating SPEC: $SPEC_DIR"
|
|
1034
|
-
|
|
1035
|
-
# Check required fields
|
|
1036
|
-
echo -n "Required fields... "
|
|
1037
|
-
rg "^(id|version|status|created|updated|author|priority):" "$SPEC_DIR/spec.md" | wc -l | grep -q "7" && echo "✅" || echo "❌"
|
|
1038
|
-
|
|
1039
|
-
# Check author format
|
|
1040
|
-
echo -n "Author format... "
|
|
1041
|
-
rg "^author: @[A-Z]" "$SPEC_DIR/spec.md" > /dev/null && echo "✅" || echo "❌"
|
|
1042
|
-
|
|
1043
|
-
# Check version format
|
|
1044
|
-
echo -n "Version format... "
|
|
1045
|
-
rg "^version: 0\.\d+\.\d+" "$SPEC_DIR/spec.md" > /dev/null && echo "✅" || echo "❌"
|
|
1046
|
-
|
|
1047
|
-
# Check HISTORY section
|
|
1048
|
-
echo -n "HISTORY section... "
|
|
1049
|
-
rg "^## HISTORY" "$SPEC_DIR/spec.md" > /dev/null && echo "✅" || echo "❌"
|
|
1050
|
-
|
|
1051
|
-
# Check TAG block
|
|
1052
|
-
echo -n "TAG block... "
|
|
1053
|
-
rg "^# @SPEC:" "$SPEC_DIR/spec.md" > /dev/null && echo "✅" || echo "❌"
|
|
1054
|
-
|
|
1055
|
-
# Check duplicate IDs
|
|
1056
|
-
SPEC_ID=$(basename "$SPEC_DIR" | sed 's/SPEC-//')
|
|
1057
|
-
DUPLICATE_COUNT=$(rg "@SPEC:$SPEC_ID" -n .moai/specs/ | wc -l)
|
|
1058
|
-
echo -n "Duplicate ID check... "
|
|
1059
|
-
[ "$DUPLICATE_COUNT" -eq 1 ] && echo "✅" || echo "❌ (found $DUPLICATE_COUNT occurrences)"
|
|
1060
|
-
|
|
1061
|
-
echo "Validation complete!"
|
|
1062
|
-
```
|
|
1063
|
-
|
|
1064
|
-
### Usage
|
|
1065
|
-
|
|
1066
|
-
```bash
|
|
1067
|
-
# Validate single SPEC
|
|
1068
|
-
./validate-spec.sh .moai/specs/SPEC-AUTH-001
|
|
1069
|
-
|
|
1070
|
-
# Validate all SPECs
|
|
1071
|
-
for spec in .moai/specs/SPEC-*/; do
|
|
1072
|
-
./validate-spec.sh "$spec"
|
|
1073
|
-
done
|
|
1074
|
-
```
|
|
1075
|
-
|
|
1076
|
-
---
|
|
1077
|
-
|
|
1078
|
-
## Advanced Patterns
|
|
1079
|
-
|
|
1080
|
-
### Pattern: Versioned Requirements
|
|
1081
|
-
|
|
1082
|
-
When a requirement changes across versions, document the evolution:
|
|
1083
|
-
|
|
1084
|
-
```markdown
|
|
1085
|
-
### v0.2.0 (2025-11-15)
|
|
1086
|
-
**UR-001** (CHANGED): The system shall respond within 200ms for 99% of requests.
|
|
1087
|
-
- Previous (v0.1.0): 95% of requests
|
|
1088
|
-
- Rationale: Performance improvement based on user feedback
|
|
1089
|
-
|
|
1090
|
-
### v0.1.0 (2025-10-30)
|
|
1091
|
-
**UR-001**: The system shall respond within 200ms for 95% of requests.
|
|
1092
|
-
```
|
|
1093
|
-
|
|
1094
|
-
### Pattern: Requirement Traceability Matrix
|
|
1095
|
-
|
|
1096
|
-
Link requirements to test cases explicitly:
|
|
1097
|
-
|
|
1098
|
-
```markdown
|
|
1099
|
-
## Requirements Traceability Matrix
|
|
1100
|
-
|
|
1101
|
-
| Req ID | Description | Test Cases | Status |
|
|
1102
|
-
|--------|-------------|------------|--------|
|
|
1103
|
-
| UR-001 | JWT authentication | test_authenticate_valid_user | ✅ |
|
|
1104
|
-
| ER-001 | Token issuance | test_token_generation | ✅ |
|
|
1105
|
-
| ER-002 | Token expiry | test_expired_token_rejection | ✅ |
|
|
1106
|
-
| SR-001 | Authenticated access | test_protected_route_access | ✅ |
|
|
1107
|
-
| C-001 | Token lifetime | test_token_expiry_constraint | ✅ |
|
|
1108
|
-
```
|
|
1109
|
-
|
|
1110
|
-
### Pattern: Decision Log
|
|
1111
|
-
|
|
1112
|
-
Document architectural decisions within SPEC:
|
|
1113
|
-
|
|
1114
|
-
```markdown
|
|
1115
|
-
## Decision Log
|
|
1116
|
-
|
|
1117
|
-
### Decision 1: JWT vs Session Cookies (2025-10-23)
|
|
1118
|
-
**Context**: Need stateless authentication for microservices
|
|
1119
|
-
**Decision**: Use JWT tokens
|
|
1120
|
-
**Alternatives Considered**:
|
|
1121
|
-
- Session cookies (rejected: stateful, not scalable)
|
|
1122
|
-
- OAuth 2.0 (deferred: too complex for MVP)
|
|
1123
|
-
**Consequences**:
|
|
1124
|
-
- ✅ Stateless, scalable
|
|
1125
|
-
- ✅ Cross-service authentication
|
|
1126
|
-
- ❌ Token revocation complexity
|
|
1127
|
-
|
|
1128
|
-
### Decision 2: Token Expiry 15min (2025-10-24)
|
|
1129
|
-
**Context**: Balance security vs UX
|
|
1130
|
-
**Decision**: 15-minute access token, 7-day refresh token
|
|
1131
|
-
**Rationale**: Industry standard, security best practice
|
|
1132
|
-
**References**: OWASP JWT best practices
|
|
1133
|
-
```
|
|
1134
|
-
|
|
1135
|
-
---
|
|
1136
|
-
|
|
1137
|
-
## Examples Gallery
|
|
1138
|
-
|
|
1139
|
-
### Example 1: Complete Minimal SPEC
|
|
1140
|
-
|
|
1141
|
-
```markdown
|
|
1142
|
-
---
|
|
1143
|
-
id: HELLO-001
|
|
1144
|
-
version: 0.0.1
|
|
1145
|
-
status: draft
|
|
1146
|
-
created: 2025-10-23
|
|
1147
|
-
updated: 2025-10-23
|
|
1148
|
-
author: @Goos
|
|
1149
|
-
priority: low
|
|
1150
|
-
---
|
|
1151
|
-
|
|
1152
|
-
# @SPEC:HELLO-001: Hello World API
|
|
1153
|
-
|
|
1154
|
-
## HISTORY
|
|
1155
|
-
|
|
1156
|
-
### v0.0.1 (2025-10-23)
|
|
1157
|
-
- **INITIAL**: Hello World API SPEC draft created
|
|
1158
|
-
- **AUTHOR**: @Goos
|
|
1159
|
-
|
|
1160
|
-
## Environment
|
|
1161
|
-
|
|
1162
|
-
**Runtime**: Node.js 20.x
|
|
1163
|
-
**Framework**: Express.js
|
|
1164
|
-
|
|
1165
|
-
## Assumptions
|
|
1166
|
-
|
|
1167
|
-
1. Single endpoint required
|
|
1168
|
-
2. No authentication needed
|
|
1169
|
-
3. JSON response format
|
|
1170
|
-
|
|
1171
|
-
## Requirements
|
|
1172
|
-
|
|
1173
|
-
### Ubiquitous Requirements
|
|
1174
|
-
|
|
1175
|
-
**UR-001**: The system shall provide a GET /hello endpoint.
|
|
1176
|
-
|
|
1177
|
-
### Event-driven Requirements
|
|
1178
|
-
|
|
1179
|
-
**ER-001**: WHEN a GET request is sent to /hello, the system shall return JSON `{"message": "Hello, World!"}`.
|
|
1180
|
-
|
|
1181
|
-
### Constraints
|
|
1182
|
-
|
|
1183
|
-
**C-001**: Response time shall not exceed 50ms.
|
|
1184
|
-
```
|
|
1185
|
-
|
|
1186
|
-
### Example 2: Production-Grade SPEC
|
|
1187
|
-
|
|
1188
|
-
See `SPEC-BRAND-001` or `SPEC-TRUST-001` in `.moai/specs/` for comprehensive examples with all optional fields, dependency graphs, and detailed HISTORY sections.
|
|
1189
|
-
|
|
1190
|
-
---
|
|
1191
|
-
|
|
1192
|
-
## Troubleshooting
|
|
1193
|
-
|
|
1194
|
-
### Issue: "Duplicate SPEC ID detected"
|
|
1195
|
-
|
|
1196
|
-
**Symptoms**: `rg "@SPEC:AUTH-001" -n` returns multiple results
|
|
1197
|
-
|
|
1198
|
-
**Solution**:
|
|
1199
|
-
```bash
|
|
1200
|
-
# Find all occurrences
|
|
1201
|
-
rg "@SPEC:AUTH-001" -n .moai/specs/
|
|
1202
|
-
|
|
1203
|
-
# Choose one SPEC to keep, rename others
|
|
1204
|
-
# Update TAG references in code/tests
|
|
1205
|
-
rg '@SPEC:AUTH-001' -l src/ tests/ | xargs sed -i 's/@SPEC:AUTH-001/@SPEC:AUTH-002/g'
|
|
1206
|
-
```
|
|
1207
|
-
|
|
1208
|
-
### Issue: "Version number doesn't match status"
|
|
1209
|
-
|
|
1210
|
-
**Symptoms**: `status: completed` but `version: 0.0.1`
|
|
1211
|
-
|
|
1212
|
-
**Solution**:
|
|
1213
|
-
```yaml
|
|
1214
|
-
# Update version to reflect completion
|
|
1215
|
-
version: 0.1.0 # Implementation complete
|
|
1216
|
-
status: completed
|
|
1217
|
-
```
|
|
1218
|
-
|
|
1219
|
-
### Issue: "HISTORY section missing version"
|
|
1220
|
-
|
|
1221
|
-
**Symptoms**: Content changed but no new HISTORY entry
|
|
1222
|
-
|
|
1223
|
-
**Solution**:
|
|
1224
|
-
```markdown
|
|
1225
|
-
## HISTORY
|
|
1226
|
-
|
|
1227
|
-
### v0.0.2 (2025-10-25) ← Add new entry
|
|
1228
|
-
- **REFINED**: Updated XYZ requirement
|
|
1229
|
-
- **AUTHOR**: @YourHandle
|
|
1230
|
-
|
|
1231
|
-
### v0.0.1 (2025-10-23)
|
|
1232
|
-
- **INITIAL**: First draft
|
|
1233
|
-
```
|
|
1234
|
-
|
|
1235
|
-
---
|
|
1236
|
-
|
|
1237
|
-
## References
|
|
1238
|
-
|
|
1239
|
-
### Internal Documentation
|
|
1240
|
-
|
|
1241
|
-
- `.moai/memory/spec-metadata.md` - Complete metadata reference
|
|
1242
|
-
- `.moai/memory/development-guide.md` - SPEC-First TDD workflow
|
|
1243
|
-
- `moai-foundation-ears` Skill - EARS syntax guide
|
|
1244
|
-
- `moai-foundation-specs` Skill - Metadata validation
|
|
1245
|
-
|
|
1246
|
-
### External Resources
|
|
1247
|
-
|
|
1248
|
-
- EARS Official: Mavin, Wilkinson, et al. (2009) "Easy Approach to Requirements Syntax"
|
|
1249
|
-
- QRA Guide: https://qracorp.com/guides_checklists/the-easy-approach-to-requirements-syntax-ears/
|
|
1250
|
-
- Jama Software: EARS Notation Guide
|
|
1251
|
-
|
|
1252
|
-
---
|
|
1253
|
-
|
|
1254
|
-
## Changelog
|
|
1255
|
-
|
|
1256
|
-
- **v1.0.0** (2025-10-23): Initial comprehensive SPEC authoring Skill
|
|
1257
|
-
- 7 required + 9 optional metadata fields
|
|
1258
|
-
- 5 EARS patterns with examples
|
|
1259
|
-
- Version lifecycle guide
|
|
1260
|
-
- Pre-submission validation checklist
|
|
1261
|
-
- Common pitfalls prevention
|
|
1262
|
-
- Integration with `/alfred:1-plan`
|
|
1263
|
-
|
|
1264
|
-
---
|
|
1265
|
-
|
|
1266
|
-
## Works Well With
|
|
1267
|
-
|
|
1268
|
-
- `moai-foundation-ears` - EARS syntax patterns
|
|
1269
|
-
- `moai-foundation-specs` - Metadata validation
|
|
1270
|
-
- `moai-foundation-tags` - TAG system integration
|
|
1271
|
-
- `moai-alfred-spec-metadata-validation` - Automated validation
|
|
1272
|
-
- `spec-builder` agent - SPEC generation workflow
|
|
1273
|
-
|
|
1274
|
-
---
|
|
1275
|
-
|
|
1276
|
-
## Best Practices Summary
|
|
1277
|
-
|
|
1278
|
-
✅ **DO**:
|
|
1279
|
-
- Check for duplicate IDs before creating new SPEC
|
|
1280
|
-
- Update HISTORY with every content change
|
|
1281
|
-
- Follow version lifecycle strictly (0.0.1 → 0.1.0 → 1.0.0)
|
|
1282
|
-
- Use `@` prefix for author field
|
|
1283
|
-
- Write testable, measurable requirements
|
|
1284
|
-
- Include all 7 required metadata fields
|
|
1285
|
-
- Use EARS patterns consistently
|
|
209
|
+
## 상세 정보
|
|
1286
210
|
|
|
1287
|
-
|
|
1288
|
-
-
|
|
1289
|
-
- Skip HISTORY updates
|
|
1290
|
-
- Jump version numbers without justification
|
|
1291
|
-
- Write vague requirements ("fast", "user-friendly")
|
|
1292
|
-
- Mix multiple EARS patterns in one requirement
|
|
1293
|
-
- Forget to validate before submission
|
|
1294
|
-
- Create duplicate SPEC IDs
|
|
211
|
+
- **메타데이터 레퍼런스**: [reference.md](./reference.md) 참조
|
|
212
|
+
- **실전 예제**: [examples.md](./examples.md) 참조
|
|
1295
213
|
|
|
1296
214
|
---
|
|
1297
215
|
|
|
1298
|
-
**Last Updated**: 2025-10-
|
|
216
|
+
**Last Updated**: 2025-10-27
|
|
1299
217
|
**Maintained By**: MoAI-ADK Team
|
|
1300
|
-
**Support**:
|
|
218
|
+
**Support**: `/alfred:1-plan` 명령어로 가이드 받기
|