moai-adk 0.12.0__py3-none-any.whl → 0.13.0__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moai-adk
3
- Version: 0.12.0
3
+ Version: 0.13.0
4
4
  Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent & Complete Skills v2.0
5
5
  Project-URL: Homepage, https://github.com/modu-ai/moai-adk
6
6
  Project-URL: Repository, https://github.com/modu-ai/moai-adk
@@ -305,10 +305,8 @@ moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md,sha256=37Qj5DYcyUniLM1g8I
305
305
  moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md,sha256=Tf3q68X1DiA3MkIBYu7AMXoeparYrDRpyqVI5Nw92OY,12653
306
306
  moai_adk/templates/.moai/memory/CLAUDE-RULES.md,sha256=S9GODGRzwwleOmROVtBDa471Ok5NyQLWIkaO_4peHhU,19783
307
307
  moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md,sha256=SAcue1J5-DEJpygDnTgp_ex-ok2E4lbcykBuBiC7tGs,14534
308
- moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md,sha256=UABdUWcA_085dZaQk7gaW2-ze3DV-BX399kKtbF1kGI,10401
309
308
  moai_adk/templates/.moai/memory/ISSUE-LABEL-MAPPING.md,sha256=bKzC2v1ZZWyng0eHSj9oFQ9w9xCbadPe9T9IYWub7wM,3824
310
309
  moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md,sha256=uMEFi6uojnpO_MGGtwhakYQzVF2yzVV9ZzfQe5tB0Hk,7823
311
- moai_adk/templates/.moai/memory/SPEC-METADATA.md,sha256=Ha4ATMxyH2PgQdVbS1fYwVH0PnIkfqk4hfuB5ksMFFk,9702
312
310
  moai_adk/templates/.moai/memory/gitflow-protection-policy.md,sha256=UABdUWcA_085dZaQk7gaW2-ze3DV-BX399kKtbF1kGI,10401
313
311
  moai_adk/templates/.moai/memory/spec-metadata.md,sha256=Ha4ATMxyH2PgQdVbS1fYwVH0PnIkfqk4hfuB5ksMFFk,9702
314
312
  moai_adk/templates/.moai/project/product.md,sha256=IrRSqhu0o5KNfn453DUWoUKzdoO3m6013iYCwaHYCxM,5166
@@ -323,8 +321,8 @@ moai_adk/templates/workflows/typescript-tag-validation.yml,sha256=-hPbfW4ZlMp7Nz
323
321
  moai_adk/utils/__init__.py,sha256=VnVfQzzKHvKw4bNdEw5xdscnRQYFrnr-v_TOBr3naPs,225
324
322
  moai_adk/utils/banner.py,sha256=znppKd5yo-tTqgyhgPVJjstrTrfcy_v3X1_RFQxP4Fk,1878
325
323
  moai_adk/utils/logger.py,sha256=g-m07PGKjK2bKRIInfSn6m-024Bedai-pV_WjZKDeu8,5064
326
- moai_adk-0.12.0.dist-info/METADATA,sha256=Zoyr11lc4CvvByuJ2K9NJriyBj4Or5_Kdr6DV057NSE,96417
327
- moai_adk-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
328
- moai_adk-0.12.0.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
329
- moai_adk-0.12.0.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
330
- moai_adk-0.12.0.dist-info/RECORD,,
324
+ moai_adk-0.13.0.dist-info/METADATA,sha256=st-VF-l9LLkgLwc8yOJXBgrOFhR4oaM7EGYigi1_ieM,96417
325
+ moai_adk-0.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
326
+ moai_adk-0.13.0.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
327
+ moai_adk-0.13.0.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
328
+ moai_adk-0.13.0.dist-info/RECORD,,
@@ -1,330 +0,0 @@
1
- # GitFlow Protection Policy
2
-
3
- **Document ID**: @DOC:GITFLOW-POLICY-ALIAS
4
- **Published**: 2025-10-17
5
- **Updated**: 2025-10-29
6
- **Status**: **Enforced via GitHub Branch Protection** (v0.8.3+)
7
- **Scope**: Personal and Team modes
8
-
9
- ---
10
-
11
- ## Overview
12
-
13
- MoAI-ADK **enforces** a GitFlow-inspired workflow through GitHub Branch Protection. As of v0.8.3, the `main` branch is protected and requires Pull Requests for all changes, including from administrators.
14
-
15
- **What Changed**: Previously (v0.3.5-v0.8.2), we used an advisory approach with warnings. Now we enforce proper GitFlow to ensure code quality and prevent accidental direct pushes to main.
16
-
17
- ## Key Requirements (Enforced)
18
-
19
- ### 1. Main Branch Access (Enforced)
20
-
21
- | Requirement | Summary | Enforcement |
22
- |-------------|---------|-------------|
23
- | **Merge via develop** | MUST merge `develop` into `main` | ✅ Enforced |
24
- | **Feature branches off develop** | MUST branch from `develop` and raise PRs back to `develop` | ✅ Enforced |
25
- | **Release process** | Release flow: `develop` → `main` (PR required) | ✅ Enforced |
26
- | **Force push** | Blocked on `main` | ✅ Blocked |
27
- | **Direct push** | Blocked on `main` (PR required) | ✅ Blocked |
28
-
29
- ### 2. Git Workflow (Required)
30
-
31
- ```
32
- ┌─────────────────────────────────────────────────────────┐
33
- │ ENFORCED GITFLOW │
34
- │ (GitHub Branch Protection Active) │
35
- └─────────────────────────────────────────────────────────┘
36
-
37
- develop (required base branch)
38
- ↑ ↓
39
- ┌─────────────────┐
40
- │ │
41
- │ developer work │
42
- │ │
43
- ↓ ↑
44
- feature/SPEC-{ID} [PR: feature -> develop]
45
- [code review + approval]
46
- [Merge to develop]
47
-
48
- develop (stable)
49
-
50
- │ (release manager prepares)
51
-
52
- [PR: develop -> main]
53
- [Code review + approval REQUIRED]
54
- [All discussions resolved]
55
- [CI/CD validation]
56
- [tag creation]
57
-
58
- main (protected release)
59
- ```
60
-
61
- **Enforcement**: Direct pushes to `main` are **blocked** via GitHub Branch Protection. All changes must go through Pull Requests.
62
-
63
- ## Technical Implementation
64
-
65
- ### Pre-push Hook (Advisory Mode)
66
-
67
- **Location**: `.git/hooks/pre-push`
68
- **Purpose**: Warn on `main` branch pushes without blocking them
69
-
70
- ```bash
71
- # When attempting to push to main:
72
- ⚠️ ADVISORY: Non-standard GitFlow detected
73
-
74
- Current branch: feature/SPEC-123
75
- Target branch: main
76
-
77
- Recommended GitFlow workflow:
78
- 1. Work on feature/SPEC-{ID} branch (created from develop)
79
- 2. Push to feature/SPEC-{ID} and create PR to develop
80
- 3. Merge into develop after code review
81
- 4. When develop is stable, create PR from develop to main
82
- 5. Release manager merges develop -> main with tag
83
-
84
- ✓ Push will proceed (flexibility mode enabled)
85
- ```
86
-
87
- ### Force Push Advisory
88
-
89
- ```bash
90
- ⚠️ ADVISORY: Force-push to main branch detected
91
-
92
- Recommended approach:
93
- - Use GitHub PR with proper code review
94
- - Ensure changes are merged via fast-forward
95
-
96
- ✓ Push will proceed (flexibility mode enabled)
97
- ```
98
-
99
- ---
100
-
101
- ## Workflow Examples
102
-
103
- ### Scenario 1: Standard Feature Development (Recommended)
104
-
105
- ```bash
106
- # 1. Sync latest code from develop
107
- git checkout develop
108
- git pull origin develop
109
-
110
- # 2. Create a feature branch (from develop)
111
- git checkout -b feature/SPEC-001-new-feature
112
-
113
- # 3. Implement the change
114
- # ... write code and tests ...
115
-
116
- # 4. Commit
117
- git add .
118
- git commit -m "..."
119
-
120
- # 5. Push
121
- git push origin feature/SPEC-001-new-feature
122
-
123
- # 6. Open a PR: feature/SPEC-001-new-feature -> develop
124
-
125
- # 7. Merge into develop after review and approval
126
- ```
127
-
128
- ### Scenario 2: Fast Hotfix (Flexible)
129
-
130
- ```bash
131
- # When an urgent fix is required:
132
-
133
- # Option 1: Recommended (via develop)
134
- git checkout develop
135
- git checkout -b hotfix/critical-bug
136
- # ... apply fix ...
137
- git push origin hotfix/critical-bug
138
- # Open PRs: hotfix -> develop -> main
139
-
140
- # Option 2: Direct fix on main (allowed, not recommended)
141
- git checkout main
142
- # ... apply fix ...
143
- git commit -m "Fix critical bug"
144
- git push origin main # ⚠️ Advisory warning appears but push continues
145
- ```
146
-
147
- ### Scenario 3: Release (Standard or Flexible)
148
-
149
- ```bash
150
- # Standard approach (recommended):
151
- git checkout develop
152
- gh pr create --base main --head develop --title "Release v1.0.0"
153
-
154
- # Direct push (allowed):
155
- git checkout develop
156
- git push origin main # ⚠️ Advisory warning appears but push continues
157
- git tag -a v1.0.0 -m "Release v1.0.0"
158
- git push origin v1.0.0
159
- ```
160
-
161
- ---
162
-
163
- ## Policy Modes
164
-
165
- ### Strict Mode (Active, v0.8.3+) ✅ ENFORCED
166
-
167
- **GitHub Branch Protection Enabled**:
168
- - ✅ **enforce_admins: true** - Administrators must follow all rules
169
- - ✅ **required_pull_request_reviews** - 1 approval required
170
- - ✅ **required_conversation_resolution** - All discussions must be resolved
171
- - ✅ **Block direct pushes to `main`** - PR required for all users
172
- - ✅ **Block force pushes** - Prevents history rewriting
173
- - ✅ **Block branch deletion** - Protects main from accidental deletion
174
-
175
- **What This Means**:
176
- - ❌ No one (including admins) can push directly to `main`
177
- - ✅ All changes must go through Pull Requests
178
- - ✅ PRs require code review approval
179
- - ✅ All code discussions must be resolved before merge
180
- - ✅ Enforces proper GitFlow: feature → develop → main
181
-
182
- ### Advisory Mode (Legacy, v0.3.5 - v0.8.2)
183
-
184
- - ⚠️ Warned but allowed direct pushes to `main`
185
- - ⚠️ Warned but allowed force pushes
186
- - ⚠️ Recommended best practices while preserving flexibility
187
- - ❌ **Deprecated** - Replaced by Strict Mode for better quality control
188
-
189
- ---
190
-
191
- ## Recommended Checklist
192
-
193
- Every contributor should ensure:
194
-
195
- - [ ] `.git/hooks/pre-push` exists and is executable (755)
196
- - [ ] Feature branches fork from `develop`
197
- - [ ] Pull requests target `develop`
198
- - [ ] Releases merge `develop` → `main`
199
-
200
- **Verification Commands**:
201
- ```bash
202
- ls -la .git/hooks/pre-push
203
- git branch -vv
204
- ```
205
-
206
- ---
207
-
208
- ## FAQ
209
-
210
- **Q: Can we merge into `main` from branches other than `develop`?**
211
- A: Yes. You will see an advisory warning, but the merge proceeds. The recommended path remains `develop` → `main`.
212
-
213
- **Q: Are force pushes allowed?**
214
- A: Yes. You receive a warning, but the push succeeds. Use with caution.
215
-
216
- **Q: Can we commit/push directly to `main`?**
217
- A: Yes. Expect an advisory warning, yet the push continues.
218
-
219
- **Q: Can I disable the hook entirely?**
220
- A: Yes. Remove `.git/hooks/pre-push` or strip its execute permission.
221
-
222
- **Q: Why switch to Advisory Mode?**
223
- A: Advisory Mode was used in v0.3.5-v0.8.2. As of v0.8.3, we've switched to Strict Mode with GitHub Branch Protection for better quality control.
224
-
225
- **Q: What if develop falls behind main?**
226
- A: This can happen when hotfixes or releases go directly to main. Regularly sync main → develop to prevent divergence. See "Maintaining develop-main Sync" section below.
227
-
228
- **Q: Can I bypass branch protection in emergencies?**
229
- A: No. Even administrators must follow the PR process. For true emergencies, temporarily disable protection via GitHub Settings (requires admin access), but re-enable immediately after.
230
-
231
- ---
232
-
233
- ## Maintaining develop-main Sync
234
-
235
- ### ⚠️ Critical Rule: develop Must Stay Current
236
-
237
- **Problem**: When main receives direct commits (hotfixes, emergency releases) without syncing back to develop, GitFlow breaks:
238
-
239
- ```
240
- ❌ BAD STATE:
241
- develop: 3 commits ahead, 29 commits behind main
242
- - develop has outdated dependencies
243
- - New features branch from old code
244
- - Merge conflicts multiply over time
245
- ```
246
-
247
- ### Signs of Drift
248
-
249
- Monitor for these warnings:
250
- - `git status` shows "Your branch is X commits behind main"
251
- - Feature branches conflict with main during PR
252
- - CI/CD failures due to dependency mismatches
253
- - Version numbers in develop don't match main
254
-
255
- ### Recovery Procedure
256
-
257
- When develop falls behind main:
258
-
259
- 1. **Assess the Gap**
260
- ```bash
261
- git log --oneline develop..main # Commits in main but not develop
262
- git log --oneline main..develop # Commits in develop but not main
263
- ```
264
-
265
- 2. **Sync Strategy: Merge main into develop (Recommended)**
266
- ```bash
267
- git checkout develop
268
- git pull origin develop # Get latest develop
269
- git merge main # Merge main into develop
270
- # Resolve conflicts if any (prefer main for version/config files)
271
- git push origin develop
272
- ```
273
-
274
- 3. **Emergency Only: Reset develop to main (Destructive)**
275
- ```bash
276
- # ⚠️ ONLY if develop's unique commits are unwanted
277
- git checkout develop
278
- git reset --hard main
279
- git push origin develop --force
280
- ```
281
-
282
- ### Prevention: Regular Sync Schedule
283
-
284
- **After every main release** (REQUIRED):
285
- ```bash
286
- # Immediately after merging develop → main:
287
- git checkout develop
288
- git merge main
289
- git push origin develop
290
- ```
291
-
292
- **Weekly maintenance** (for active projects):
293
- ```bash
294
- # Every Monday morning:
295
- git checkout develop
296
- git pull origin main
297
- git push origin develop
298
- ```
299
-
300
- ### Real-World Case Study (2025-10-29)
301
-
302
- **Situation**: develop was 29 commits behind main due to:
303
- - v0.8.2, v0.8.3 released directly to main
304
- - No reverse sync to develop
305
- - Feature branches contained outdated code
306
-
307
- **Resolution**:
308
- - Merged main → develop (14 file conflicts)
309
- - Resolved conflicts prioritizing main's versions
310
- - TAG validation bypassed for merge commit
311
- - Enabled Strict Mode to prevent future direct pushes
312
-
313
- **Lesson**: With Strict Mode active, this won't happen again. All releases must go through develop → main PR flow.
314
-
315
- ---
316
-
317
- ## Policy Change Log
318
-
319
- | Date | Change | Owner |
320
- |------|------|--------|
321
- | 2025-10-17 | Initial policy drafted (Strict Mode) | git-manager |
322
- | 2025-10-17 | Switched to Advisory Mode (warnings only) | git-manager |
323
- | 2025-10-29 | **Enabled GitHub Branch Protection (Strict Mode)** | Alfred |
324
- | 2025-10-29 | Added develop-main sync guidelines and real-world case study | Alfred |
325
- | 2025-10-29 | Enforced `enforce_admins`, `required_conversation_resolution` | Alfred |
326
-
327
- ---
328
-
329
- **This policy is advisory—adapt it to fit your project needs.**
330
- **Reach out to the team lead or release engineer for questions or suggestions.**
@@ -1,356 +0,0 @@
1
- # SPEC Metadata Structure Guide
2
-
3
- > **MoAI-ADK SPEC Metadata Standard**
4
- >
5
- > Every SPEC document must follow this structure.
6
-
7
- ---
8
-
9
- ## 📋 Metadata Overview
10
-
11
- SPEC metadata contains **7 required fields** and **9 optional fields**.
12
-
13
- ### Full Example
14
-
15
- ```yaml
16
- ---
17
- # Required Fields (7)
18
- id: AUTH-001 # Unique SPEC ID
19
- version: 0.0.1 # Semantic version (v0.0.1 = INITIAL, draft start)
20
- status: draft # draft|active|completed|deprecated
21
- created: 2025-09-15 # Creation date (YYYY-MM-DD)
22
- updated: 2025-09-15 # Last updated (YYYY-MM-DD; initially same as created)
23
- author: @Goos # Author (single GitHub handle)
24
- priority: high # low|medium|high|critical
25
-
26
- # Optional Fields – Classification/Meta
27
- category: security # feature|bugfix|refactor|security|docs|perf
28
- labels: # Tags for search and grouping
29
- - authentication
30
- - jwt
31
-
32
- # Optional Fields – Relationships (Dependency Graph)
33
- depends_on: # SPECs this one depends on (optional)
34
- - USER-001
35
- blocks: # SPECs blocked by this one (optional)
36
- - AUTH-002
37
- related_specs: # Related SPECs (optional)
38
- - TOKEN-002
39
- related_issue: "https://github.com/modu-ai/moai-adk/issues/123"
40
-
41
- # Optional Fields – Scope/Impact
42
- scope:
43
- packages: # Impacted packages
44
- - src/core/auth
45
- files: # Key files (optional)
46
- - auth-service.ts
47
- - jwt-manager.ts
48
- ---
49
- ```
50
-
51
- ---
52
-
53
- ## Required Fields
54
-
55
- ### 1. `id` – Unique SPEC Identifier
56
- - **Type**: string
57
- - **Format**: `<DOMAIN>-<NUMBER>`
58
- - **Examples**: `AUTH-001`, `INSTALLER-SEC-001`
59
- - **Rules**:
60
- - Immutable once assigned
61
- - Use three digits (001–999)
62
- - Domain in uppercase; hyphens allowed
63
- - Directory name: `.moai/specs/SPEC-{ID}/` (e.g., `.moai/specs/SPEC-AUTH-001/`)
64
-
65
- ### 2. `version` – Semantic Version
66
- - **Type**: string (`MAJOR.MINOR.PATCH`)
67
- - **Default**: `0.0.1` (all SPECs start here, status: draft)
68
- - **Version Lifecycle**:
69
- - **v0.0.1**: INITIAL – SPEC first draft (status: draft)
70
- - **v0.0.x**: Draft refinements (increment PATCH when editing the SPEC)
71
- - **v0.1.0**: TDD implementation complete (status: completed, updated via `/alfred:3-sync`)
72
- - **v0.1.x**: Bug fixes or doc improvements (PATCH increment)
73
- - **v0.x.0**: Feature additions or major enhancements (MINOR increment)
74
- - **v1.0.0**: Stable release (production ready, explicit stakeholder approval required)
75
-
76
- ### 3. `status` – Progress State
77
- - **Type**: enum
78
- - **Values**:
79
- - `draft`: Authoring in progress
80
- - `active`: Implementation underway
81
- - `completed`: Implementation finished
82
- - `deprecated`: Planned for retirement
83
-
84
- ### 4. `created` – Creation Date
85
- - **Type**: date string
86
- - **Format**: `YYYY-MM-DD`
87
- - **Example**: `2025-10-06`
88
-
89
- ### 5. `updated` – Last Modified Date
90
- - **Type**: date string
91
- - **Format**: `YYYY-MM-DD`
92
- - **Rule**: Update whenever the SPEC content changes.
93
-
94
- ### 6. `author` – Primary Author
95
- - **Type**: string
96
- - **Format**: `@{GitHub ID}`
97
- - **Example**: `@Goos`
98
- - **Rules**:
99
- - Single value only (no `authors` array)
100
- - Prefix the GitHub handle with `@`
101
- - Additional contributors belong in the HISTORY section
102
-
103
- ### 7. `priority` – Work Priority
104
- - **Type**: enum
105
- - **Values**:
106
- - `critical`: Immediate attention (security, severe defects)
107
- - `high`: Major feature work
108
- - `medium`: Enhancements
109
- - `low`: Optimizations or documentation
110
-
111
- ---
112
-
113
- ## Optional Fields
114
-
115
- ### Classification / Meta
116
-
117
- #### 8. `category` – Change Type
118
- - **Type**: enum
119
- - **Values**:
120
- - `feature`: New functionality
121
- - `bugfix`: Defect resolution
122
- - `refactor`: Structural improvements
123
- - `security`: Security enhancements
124
- - `docs`: Documentation updates
125
- - `perf`: Performance optimizations
126
-
127
- #### 9. `labels` – Classification Tags
128
- - **Type**: array of strings
129
- - **Purpose**: Search, filtering, grouping
130
- - **Example**:
131
- ```yaml
132
- labels:
133
- - installer
134
- - template
135
- - security
136
- ```
137
-
138
- ### Relationship Fields (Dependency Graph)
139
-
140
- #### 10. `depends_on` – Required SPECs
141
- - **Type**: array of strings
142
- - **Meaning**: SPECs that must be completed first
143
- - **Example**:
144
- ```yaml
145
- depends_on:
146
- - USER-001
147
- - AUTH-001
148
- ```
149
- - **Use Case**: Determines execution order and parallelization.
150
-
151
- #### 11. `blocks` – Blocked SPECs
152
- - **Type**: array of strings
153
- - **Meaning**: SPECs that cannot proceed until this one is resolved
154
- - **Example**:
155
- ```yaml
156
- blocks:
157
- - PAYMENT-003
158
- ```
159
-
160
- #### 12. `related_specs` – Associated SPECs
161
- - **Type**: array of strings
162
- - **Meaning**: Related items without direct dependencies
163
- - **Example**:
164
- ```yaml
165
- related_specs:
166
- - TOKEN-002
167
- - SESSION-001
168
- ```
169
-
170
- #### 13. `related_issue` – Linked GitHub Issue
171
- - **Type**: string (URL)
172
- - **Format**: Full GitHub issue URL
173
- - **Example**:
174
- ```yaml
175
- related_issue: "https://github.com/modu-ai/moai-adk/issues/123"
176
- ```
177
-
178
- ### Scope Fields (Impact Analysis)
179
-
180
- #### 14. `scope.packages` – Impacted Packages
181
- - **Type**: array of strings
182
- - **Meaning**: Packages or modules touched by the SPEC
183
- - **Example**:
184
- ```yaml
185
- scope:
186
- packages:
187
- - moai-adk-ts/src/core/installer
188
- - moai-adk-ts/src/core/git
189
- ```
190
-
191
- #### 15. `scope.files` – Key Files
192
- - **Type**: array of strings
193
- - **Meaning**: Primary files involved (for reference)
194
- - **Example**:
195
- ```yaml
196
- scope:
197
- files:
198
- - template-processor.ts
199
- - template-security.ts
200
- ```
201
-
202
- ---
203
-
204
- ## Metadata Validation
205
-
206
- ### Required Field Checks
207
- ```bash
208
- # Verify that every SPEC includes the required fields
209
- rg "^(id|version|status|created|updated|author|priority):" .moai/specs/SPEC-*/spec.md
210
-
211
- # Identify SPECs missing the priority field
212
- rg -L "^priority:" .moai/specs/SPEC-*/spec.md
213
- ```
214
-
215
- ### Format Checks
216
- ```bash
217
- # Ensure the author field uses @Handle format
218
- rg "^author: @[A-Z]" .moai/specs/SPEC-*/spec.md
219
-
220
- # Ensure the version field follows 0.x.y
221
- rg "^version: 0\.\d+\.\d+" .moai/specs/SPEC-*/spec.md
222
- ```
223
-
224
- ---
225
-
226
- ## Migration Guide
227
-
228
- ### Updating Existing SPECs
229
-
230
- #### 1. Add the `priority` Field
231
- Add it if missing:
232
- ```yaml
233
- priority: medium # or low|high|critical
234
- ```
235
-
236
- #### 2. Normalize the `author` Field
237
- - `authors: ["@goos"]` → `author: @Goos`
238
- - Convert lowercase handles to the canonical casing.
239
-
240
- #### 3. Add Optional Fields (Recommended)
241
- ```yaml
242
- category: refactor
243
- labels:
244
- - code-quality
245
- - maintenance
246
- ```
247
-
248
- ### Updating config.json for Language Support (v0.4.2+)
249
-
250
- **Background**: MoAI-ADK v0.4.2 introduces conversation language selection in `/alfred:0-project`. Existing projects need to add language metadata to `.moai/config.json`.
251
-
252
- #### Migration Steps
253
-
254
- **For Existing Projects** (before v0.4.2):
255
-
256
- Current config.json structure:
257
- ```json
258
- {
259
- "project": {
260
- "locale": "en",
261
- "mode": "personal",
262
- "language": "python"
263
- }
264
- }
265
- ```
266
-
267
- **Updated Structure** (v0.4.2+):
268
- ```json
269
- {
270
- "project": {
271
- "locale": "en",
272
- "mode": "personal",
273
- "language": "python",
274
- "conversation_language": "en",
275
- "conversation_language_name": "English",
276
- "codebase_languages": ["python"]
277
- }
278
- }
279
- ```
280
-
281
- #### New Fields
282
-
283
- | Field | Type | Required | Description | Example |
284
- |-------|------|----------|-------------|---------|
285
- | `conversation_language` | string (ISO 639-1 code) | ✅ Yes | Two-letter language code for Alfred dialogs | `"ko"`, `"en"`, `"ja"`, `"zh"` |
286
- | `conversation_language_name` | string | ✅ Yes | Display name of conversation language | `"Korean"`, `"English"` |
287
- | `codebase_languages` | array of strings | ✅ Yes | List of programming languages detected | `["python"]`, `["typescript", "python"]` |
288
-
289
- #### Manual Update Process
290
-
291
- 1. Open `.moai/config.json`
292
- 2. Add the three new fields under `project`:
293
- ```json
294
- "conversation_language": "en",
295
- "conversation_language_name": "English",
296
- "codebase_languages": ["python"]
297
- ```
298
- 3. Save and commit:
299
- ```bash
300
- git add .moai/config.json
301
- git commit -m "chore: add language metadata to config.json for v0.4.2+"
302
- ```
303
-
304
- #### Automated Update (via `/alfred:0-project`)
305
-
306
- Running `/alfred:0-project` on an existing project will:
307
- 1. Detect current language settings
308
- 2. Add new fields automatically
309
- 3. Preserve existing values
310
-
311
- **No manual action required if running `/alfred:0-project` after upgrade.**
312
-
313
- #### Field Mapping (Legacy → New)
314
-
315
- | Old Field | New Field | Migration Rule |
316
- |-----------|-----------|-----------------|
317
- | `locale` | `conversation_language` | Keep as-is (or run `/alfred:0-project` to re-select) |
318
- | (none) | `conversation_language_name` | Auto-populate from locale mapping |
319
- | `language` | `codebase_languages` | Wrap in array: `"python"` → `["python"]` |
320
-
321
- #### Backward Compatibility
322
-
323
- - ✅ Projects without new fields will continue working
324
- - ⚠️ New language features (multilingual documentation) unavailable without migration
325
- - ✅ `/alfred:0-project` automatically migrates on next run
326
- - ✅ Auto-detection will prefer new fields if present
327
-
328
- ---
329
-
330
- ## Design Principles
331
-
332
- ### 1. DRY (Don't Repeat Yourself)
333
- - ❌ **Remove**: the `reference` field (every SPEC referenced the same master plan)
334
- - ✅ **Instead**: document project-level resources in README.md
335
-
336
- ### 2. Context-Aware
337
- - Include only the necessary context.
338
- - Use optional fields only when they add value.
339
-
340
- ### 3. Traceable
341
- - Use `depends_on`, `blocks`, and `related_specs` to map dependencies.
342
- - Automated tooling can detect cyclic references.
343
-
344
- ### 4. Maintainable
345
- - Every field must be machine-verifiable.
346
- - Maintain consistent formatting for easy parsing.
347
-
348
- ### 5. Simple First
349
- - Keep complexity low.
350
- - Limit to 7 required + 9 optional fields.
351
- - Expand gradually when justified.
352
-
353
- ---
354
-
355
- **Last Updated**: 2025-10-06
356
- **Author**: @Alfred