moai-adk 0.5.8__py3-none-any.whl → 0.6.1__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/__main__.py +1 -1
- moai_adk/templates/.moai/memory/CONFIG-SCHEMA.md +444 -0
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +220 -0
- moai_adk/templates/.moai/memory/spec-metadata.md +356 -0
- {moai_adk-0.5.8.dist-info → moai_adk-0.6.1.dist-info}/METADATA +2 -1
- {moai_adk-0.5.8.dist-info → moai_adk-0.6.1.dist-info}/RECORD +9 -6
- {moai_adk-0.5.8.dist-info → moai_adk-0.6.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.5.8.dist-info → moai_adk-0.6.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.5.8.dist-info → moai_adk-0.6.1.dist-info}/licenses/LICENSE +0 -0
moai_adk/__main__.py
CHANGED
|
@@ -38,7 +38,7 @@ def show_logo() -> None:
|
|
|
38
38
|
console.print(__version__, style="cyan bold")
|
|
39
39
|
console.print()
|
|
40
40
|
console.print(" Tip: Run ", style="yellow", end="")
|
|
41
|
-
console.print("
|
|
41
|
+
console.print("uv run moai-adk --help", style="cyan", end="")
|
|
42
42
|
console.print(" to see available commands", style="yellow")
|
|
43
43
|
|
|
44
44
|
|
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
# MoAI-ADK config.json Schema Documentation
|
|
2
|
+
|
|
3
|
+
> **Purpose**: This document defines the official schema structure for `.moai/config.json` file, which serves as the single source of truth for all MoAI-ADK project configuration.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📋 Schema Overview
|
|
8
|
+
|
|
9
|
+
The `.moai/config.json` file contains all project-level configuration for MoAI-ADK, including:
|
|
10
|
+
- Project metadata and settings
|
|
11
|
+
- User preferences (language, nickname)
|
|
12
|
+
- Git workflow strategies
|
|
13
|
+
- TAG system configuration
|
|
14
|
+
- Constitution principles
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🏗️ Schema Structure
|
|
19
|
+
|
|
20
|
+
### Top-Level Sections
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"_meta": { /* Metadata about the config file itself */ },
|
|
25
|
+
"moai": { /* MoAI-ADK version info */ },
|
|
26
|
+
"project": { /* Project-specific settings */ },
|
|
27
|
+
"user": { /* User preferences */ },
|
|
28
|
+
"constitution": { /* Development principles */ },
|
|
29
|
+
"git_strategy": { /* Git workflow configuration */ },
|
|
30
|
+
"pipeline": { /* Command pipeline settings */ },
|
|
31
|
+
"tags": { /* TAG system configuration */ }
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 📖 Section Definitions
|
|
38
|
+
|
|
39
|
+
### 1. `_meta` Section
|
|
40
|
+
|
|
41
|
+
**Purpose**: Internal metadata for config structure tracking and TAG traceability.
|
|
42
|
+
|
|
43
|
+
**Schema**:
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"_meta": {
|
|
47
|
+
"@CODE:CONFIG-STRUCTURE-001": "@DOC:JSON-CONFIG-001",
|
|
48
|
+
"@SPEC:PROJECT-CONFIG-001": "@SPEC:MOAI-CONFIG-001"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Fields**:
|
|
54
|
+
- `@CODE:*`: TAG references to code implementation
|
|
55
|
+
- `@SPEC:*`: TAG references to specification documents
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### 2. `moai` Section
|
|
60
|
+
|
|
61
|
+
**Purpose**: Track MoAI-ADK package version for compatibility checks.
|
|
62
|
+
|
|
63
|
+
**Schema**:
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"moai": {
|
|
67
|
+
"version": "0.4.6"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Fields**:
|
|
73
|
+
- `version` (string, required): MoAI-ADK version in SemVer format (e.g., "0.4.6")
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### 3. `project` Section
|
|
78
|
+
|
|
79
|
+
**Purpose**: Core project settings including name, mode, language preferences, and optimization status.
|
|
80
|
+
|
|
81
|
+
**Schema**:
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"project": {
|
|
85
|
+
"name": "MoAI-ADK",
|
|
86
|
+
"description": "MoAI-Agentic Development Kit",
|
|
87
|
+
"mode": "personal",
|
|
88
|
+
"locale": "ko",
|
|
89
|
+
"conversation_language": "ko",
|
|
90
|
+
"conversation_language_name": "한국어",
|
|
91
|
+
"language": "python",
|
|
92
|
+
"moai_adk_version": "0.4.6",
|
|
93
|
+
"initialized": true,
|
|
94
|
+
"optimized": true,
|
|
95
|
+
"optimized_at": "2025-10-22T12:45:00Z",
|
|
96
|
+
"created_at": "2025-10-21 23:59:19"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Fields**:
|
|
102
|
+
- `name` (string, required): Project name
|
|
103
|
+
- `description` (string, optional): Brief project description
|
|
104
|
+
- `mode` (enum, required): Project mode — `"personal"` | `"team"`
|
|
105
|
+
- `locale` (string, required): System locale code (e.g., `"ko"`, `"en"`, `"ja"`)
|
|
106
|
+
- `conversation_language` (string, required): Language code for all Alfred dialogs and documentation (e.g., `"ko"`, `"en"`, `"ja"`, `"zh"`)
|
|
107
|
+
- `conversation_language_name` (string, required): Display name of conversation language (e.g., `"한국어"`, `"English"`)
|
|
108
|
+
- `language` (string, required): Primary codebase language (e.g., `"python"`, `"typescript"`)
|
|
109
|
+
- `moai_adk_version` (string, required): MoAI-ADK version this project was initialized with
|
|
110
|
+
- `initialized` (boolean, required): Whether project initialization completed
|
|
111
|
+
- `optimized` (boolean, required): Whether template optimization completed
|
|
112
|
+
- `optimized_at` (string, optional): ISO 8601 timestamp of optimization completion
|
|
113
|
+
- `created_at` (string, required): Project creation timestamp
|
|
114
|
+
|
|
115
|
+
**Notes**:
|
|
116
|
+
- `conversation_language` is set during `/alfred:0-project` STEP 0.1
|
|
117
|
+
- `language` is auto-detected during `/alfred:0-project` STEP 1 or can be manually specified
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### 4. `user` Section (NEW in v0.4.6)
|
|
122
|
+
|
|
123
|
+
**Purpose**: User-specific preferences for personalized Alfred experience.
|
|
124
|
+
|
|
125
|
+
**Schema**:
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"user": {
|
|
129
|
+
"nickname": "GOOS오라버니"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Fields**:
|
|
135
|
+
- `nickname` (string, required): User's chosen nickname for personalized communication
|
|
136
|
+
- Length: 1-50 characters
|
|
137
|
+
- Allows emoji, spaces, and special characters
|
|
138
|
+
- Set during `/alfred:0-project` STEP 0.2
|
|
139
|
+
- Used by all sub-agents to address the user (e.g., "안녕하세요, GOOS오라버니님!")
|
|
140
|
+
- Displayed in `CLAUDE.md` under "## 프로젝트 정보 | Project Information"
|
|
141
|
+
|
|
142
|
+
**Usage**:
|
|
143
|
+
- Alfred and all sub-agents receive `user_nickname` as a context parameter
|
|
144
|
+
- Language-specific honorifics are applied automatically (e.g., "님" in Korean)
|
|
145
|
+
- Enhances user experience by personalizing all interactions
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### 5. `constitution` Section
|
|
150
|
+
|
|
151
|
+
**Purpose**: Define development principles and quality gates enforced by MoAI-ADK.
|
|
152
|
+
|
|
153
|
+
**Schema**:
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"constitution": {
|
|
157
|
+
"enforce_tdd": true,
|
|
158
|
+
"require_tags": true,
|
|
159
|
+
"test_coverage_target": 85,
|
|
160
|
+
"simplicity_threshold": 5,
|
|
161
|
+
"principles": {
|
|
162
|
+
"simplicity": {
|
|
163
|
+
"max_projects": 5,
|
|
164
|
+
"notes": "Default recommendation. Adjust in .moai/config.json or via SPEC/ADR with documented rationale based on project size."
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Fields**:
|
|
172
|
+
- `enforce_tdd` (boolean, required): Whether TDD workflow is mandatory
|
|
173
|
+
- `require_tags` (boolean, required): Whether @TAG annotations are required
|
|
174
|
+
- `test_coverage_target` (integer, required): Minimum test coverage percentage (default: 85)
|
|
175
|
+
- `simplicity_threshold` (integer, required): Max number of concurrent projects (default: 5)
|
|
176
|
+
- `principles` (object, optional): Additional principle definitions
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### 6. `git_strategy` Section
|
|
181
|
+
|
|
182
|
+
**Purpose**: Configure Git workflow automation based on project mode.
|
|
183
|
+
|
|
184
|
+
**Schema**:
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"git_strategy": {
|
|
188
|
+
"personal": {
|
|
189
|
+
"auto_checkpoint": "event-driven",
|
|
190
|
+
"checkpoint_events": ["delete", "refactor", "merge", "script", "critical-file"],
|
|
191
|
+
"checkpoint_type": "local-branch",
|
|
192
|
+
"max_checkpoints": 10,
|
|
193
|
+
"cleanup_days": 7,
|
|
194
|
+
"push_to_remote": false,
|
|
195
|
+
"auto_commit": true,
|
|
196
|
+
"branch_prefix": "feature/",
|
|
197
|
+
"develop_branch": "develop",
|
|
198
|
+
"main_branch": "main"
|
|
199
|
+
},
|
|
200
|
+
"team": {
|
|
201
|
+
"use_gitflow": true,
|
|
202
|
+
"auto_pr": true,
|
|
203
|
+
"draft_pr": true,
|
|
204
|
+
"feature_prefix": "feature/SPEC-",
|
|
205
|
+
"develop_branch": "develop",
|
|
206
|
+
"main_branch": "main"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Personal Mode Fields**:
|
|
213
|
+
- `auto_checkpoint` (enum): `"event-driven"` | `"manual"` | `"disabled"`
|
|
214
|
+
- `checkpoint_events` (array): List of events triggering auto-checkpoint
|
|
215
|
+
- `checkpoint_type` (enum): `"local-branch"` | `"git-stash"` | `"backup-dir"`
|
|
216
|
+
- `max_checkpoints` (integer): Max number of checkpoints to retain
|
|
217
|
+
- `cleanup_days` (integer): Days before old checkpoints are removed
|
|
218
|
+
- `push_to_remote` (boolean): Whether to push checkpoints to remote
|
|
219
|
+
- `auto_commit` (boolean): Auto-commit changes after TDD cycles
|
|
220
|
+
- `branch_prefix` (string): Prefix for feature branches
|
|
221
|
+
- `develop_branch` (string): Name of develop branch
|
|
222
|
+
- `main_branch` (string): Name of main/production branch
|
|
223
|
+
|
|
224
|
+
**Team Mode Fields**:
|
|
225
|
+
- `use_gitflow` (boolean): Enable GitFlow branching strategy
|
|
226
|
+
- `auto_pr` (boolean): Auto-create PR after feature completion
|
|
227
|
+
- `draft_pr` (boolean): Create PRs in draft mode by default
|
|
228
|
+
- `feature_prefix` (string): Prefix for feature branches (includes SPEC ID)
|
|
229
|
+
- `develop_branch` (string): Name of develop branch
|
|
230
|
+
- `main_branch` (string): Name of main/production branch
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### 7. `pipeline` Section
|
|
235
|
+
|
|
236
|
+
**Purpose**: Define available Alfred commands and track current workflow stage.
|
|
237
|
+
|
|
238
|
+
**Schema**:
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"pipeline": {
|
|
242
|
+
"available_commands": [
|
|
243
|
+
"/alfred:0-project",
|
|
244
|
+
"/alfred:1-plan",
|
|
245
|
+
"/alfred:2-run",
|
|
246
|
+
"/alfred:3-sync"
|
|
247
|
+
],
|
|
248
|
+
"current_stage": "initialized"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Fields**:
|
|
254
|
+
- `available_commands` (array, required): List of available Alfred commands
|
|
255
|
+
- `current_stage` (string, required): Current workflow stage (e.g., `"initialized"`, `"planning"`, `"building"`, `"syncing"`)
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
### 8. `tags` Section
|
|
260
|
+
|
|
261
|
+
**Purpose**: Configure TAG system behavior and storage policy.
|
|
262
|
+
|
|
263
|
+
**Schema**:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"tags": {
|
|
267
|
+
"storage_type": "code_scan",
|
|
268
|
+
"auto_sync": true,
|
|
269
|
+
"categories": ["REQ", "DESIGN", "TASK", "TEST", "FEATURE", "API", "UI", "DATA"],
|
|
270
|
+
"code_scan_policy": {
|
|
271
|
+
"no_intermediate_cache": true,
|
|
272
|
+
"realtime_validation": true,
|
|
273
|
+
"scan_tools": ["rg", "grep"],
|
|
274
|
+
"scan_command": "rg '@TAG' -n",
|
|
275
|
+
"philosophy": "The source of truth for TAGs lives in the code itself"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Fields**:
|
|
282
|
+
- `storage_type` (enum, required): `"code_scan"` | `"registry_file"`
|
|
283
|
+
- `auto_sync` (boolean, required): Auto-sync TAGs during `/alfred:3-sync`
|
|
284
|
+
- `categories` (array, required): List of valid TAG categories
|
|
285
|
+
- `code_scan_policy` (object, required): Configuration for code-first TAG scanning
|
|
286
|
+
- `no_intermediate_cache` (boolean): Never use intermediate TAG cache files
|
|
287
|
+
- `realtime_validation` (boolean): Validate TAGs on every operation
|
|
288
|
+
- `scan_tools` (array): Tools used for TAG scanning (e.g., `["rg", "grep"]`)
|
|
289
|
+
- `scan_command` (string): Command to scan for TAGs
|
|
290
|
+
- `philosophy` (string): Description of TAG philosophy
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 🔄 Schema Evolution
|
|
295
|
+
|
|
296
|
+
### Version History
|
|
297
|
+
|
|
298
|
+
| Version | Date | Changes |
|
|
299
|
+
| ------- | ---------- | ------------------------------------------------------ |
|
|
300
|
+
| v0.4.6 | 2025-10-23 | Added `user` section with `nickname` field |
|
|
301
|
+
| v0.4.2 | 2025-10-22 | Added `conversation_language` and `language_name` fields |
|
|
302
|
+
| v0.4.0 | 2025-10-20 | Initial schema documentation |
|
|
303
|
+
|
|
304
|
+
### Migration Guide
|
|
305
|
+
|
|
306
|
+
**From v0.4.5 → v0.4.6**:
|
|
307
|
+
- Add `user` section with `nickname` field
|
|
308
|
+
- No breaking changes; existing configs remain compatible
|
|
309
|
+
|
|
310
|
+
**Example Migration**:
|
|
311
|
+
```json
|
|
312
|
+
// Before (v0.4.5)
|
|
313
|
+
{
|
|
314
|
+
"project": {
|
|
315
|
+
"conversation_language": "ko",
|
|
316
|
+
"conversation_language_name": "한국어"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// After (v0.4.6)
|
|
321
|
+
{
|
|
322
|
+
"project": {
|
|
323
|
+
"conversation_language": "ko",
|
|
324
|
+
"conversation_language_name": "한국어"
|
|
325
|
+
},
|
|
326
|
+
"user": {
|
|
327
|
+
"nickname": "GOOS오라버니"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 📚 Related Documentation
|
|
335
|
+
|
|
336
|
+
- **Template Processing**: `/src/moai_adk/cli/template_processor.py`
|
|
337
|
+
- **Project Initialization**: `/.claude/commands/alfred/0-project.md`
|
|
338
|
+
- **project-manager Agent**: `/.claude/agents/alfred/project-manager.md`
|
|
339
|
+
- **CLAUDE.md Template**: `/src/moai_adk/templates/CLAUDE.md`
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## ✅ Validation Rules
|
|
344
|
+
|
|
345
|
+
### Required Fields per Section
|
|
346
|
+
|
|
347
|
+
**Minimum Valid Config**:
|
|
348
|
+
```json
|
|
349
|
+
{
|
|
350
|
+
"moai": {
|
|
351
|
+
"version": "0.4.6"
|
|
352
|
+
},
|
|
353
|
+
"project": {
|
|
354
|
+
"name": "MyProject",
|
|
355
|
+
"mode": "personal",
|
|
356
|
+
"locale": "en",
|
|
357
|
+
"conversation_language": "en",
|
|
358
|
+
"conversation_language_name": "English",
|
|
359
|
+
"language": "python",
|
|
360
|
+
"initialized": true
|
|
361
|
+
},
|
|
362
|
+
"user": {
|
|
363
|
+
"nickname": "Developer"
|
|
364
|
+
},
|
|
365
|
+
"constitution": {
|
|
366
|
+
"enforce_tdd": true,
|
|
367
|
+
"require_tags": true,
|
|
368
|
+
"test_coverage_target": 85
|
|
369
|
+
},
|
|
370
|
+
"tags": {
|
|
371
|
+
"storage_type": "code_scan",
|
|
372
|
+
"auto_sync": true
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Validation Checklist
|
|
378
|
+
|
|
379
|
+
- [ ] `moai.version` matches installed package version
|
|
380
|
+
- [ ] `project.mode` is either `"personal"` or `"team"`
|
|
381
|
+
- [ ] `project.conversation_language` is a valid ISO 639-1 code
|
|
382
|
+
- [ ] `user.nickname` length is between 1-50 characters
|
|
383
|
+
- [ ] `constitution.test_coverage_target` is between 0-100
|
|
384
|
+
- [ ] `tags.storage_type` is valid enum value
|
|
385
|
+
- [ ] All required fields are present
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## 🛠️ Usage Examples
|
|
390
|
+
|
|
391
|
+
### Reading Config in Python
|
|
392
|
+
|
|
393
|
+
```python
|
|
394
|
+
import json
|
|
395
|
+
from pathlib import Path
|
|
396
|
+
|
|
397
|
+
def read_config():
|
|
398
|
+
config_path = Path(".moai/config.json")
|
|
399
|
+
with open(config_path, "r", encoding="utf-8") as f:
|
|
400
|
+
return json.load(f)
|
|
401
|
+
|
|
402
|
+
config = read_config()
|
|
403
|
+
user_nickname = config.get("user", {}).get("nickname", "Developer")
|
|
404
|
+
conversation_language = config["project"]["conversation_language"]
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Updating User Nickname
|
|
408
|
+
|
|
409
|
+
```python
|
|
410
|
+
import json
|
|
411
|
+
from pathlib import Path
|
|
412
|
+
|
|
413
|
+
def update_user_nickname(new_nickname: str):
|
|
414
|
+
config_path = Path(".moai/config.json")
|
|
415
|
+
|
|
416
|
+
# Read existing config
|
|
417
|
+
with open(config_path, "r", encoding="utf-8") as f:
|
|
418
|
+
config = json.load(f)
|
|
419
|
+
|
|
420
|
+
# Update user section
|
|
421
|
+
if "user" not in config:
|
|
422
|
+
config["user"] = {}
|
|
423
|
+
config["user"]["nickname"] = new_nickname
|
|
424
|
+
|
|
425
|
+
# Write back
|
|
426
|
+
with open(config_path, "w", encoding="utf-8") as f:
|
|
427
|
+
json.dump(config, f, indent=2, ensure_ascii=False)
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## 📝 Notes
|
|
433
|
+
|
|
434
|
+
- **SSOT**: This config file is the single source of truth for all project settings
|
|
435
|
+
- **No Duplication**: Never duplicate config values in code or other files
|
|
436
|
+
- **Encoding**: Always use UTF-8 encoding to support international characters in nicknames and language names
|
|
437
|
+
- **Validation**: Always validate config structure before reading values
|
|
438
|
+
- **Migration**: When adding new fields, provide sensible defaults for backwards compatibility
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
**Last Updated**: 2025-10-23
|
|
443
|
+
**Version**: v0.4.6
|
|
444
|
+
**Maintainer**: cc-manager
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# GitFlow Advisory Policy
|
|
2
|
+
|
|
3
|
+
**Document ID**: @DOC:GITFLOW-POLICY-001
|
|
4
|
+
**Published**: 2025-10-17
|
|
5
|
+
**Status**: Advisory (recommended, not enforced)
|
|
6
|
+
**Scope**: Personal and Team modes
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
MoAI-ADK **recommends** a GitFlow-inspired workflow. This policy shares best practices while letting teams adapt them as needed.
|
|
13
|
+
|
|
14
|
+
## Key Recommendations
|
|
15
|
+
|
|
16
|
+
### 1. Main Branch Access (Recommended)
|
|
17
|
+
|
|
18
|
+
| Recommendation | Summary | Enforcement |
|
|
19
|
+
|----------------|---------|-------------|
|
|
20
|
+
| **Merge via develop** | Prefer merging `develop` into `main` | Advisory ⚠️ |
|
|
21
|
+
| **Feature branches off develop** | Branch from `develop` and raise PRs back to `develop` | Advisory ⚠️ |
|
|
22
|
+
| **Release process** | Release flow: `develop` → `main` (release engineer encouraged) | Advisory ⚠️ |
|
|
23
|
+
| **Force push** | Warn when force-pushing, but allow it | Warning ⚠️ |
|
|
24
|
+
| **Direct push** | Warn on direct pushes to `main`, but allow them | Warning ⚠️ |
|
|
25
|
+
|
|
26
|
+
### 2. Git Workflow (Recommended)
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
┌─────────────────────────────────────────────────────────┐
|
|
30
|
+
│ RECOMMENDED GITFLOW │
|
|
31
|
+
└─────────────────────────────────────────────────────────┘
|
|
32
|
+
|
|
33
|
+
develop (recommended base branch)
|
|
34
|
+
↑ ↓
|
|
35
|
+
┌─────────────────┐
|
|
36
|
+
│ │
|
|
37
|
+
│ developer work │
|
|
38
|
+
│ │
|
|
39
|
+
↓ ↑
|
|
40
|
+
feature/SPEC-{ID} [PR: feature -> develop]
|
|
41
|
+
[code review + approval]
|
|
42
|
+
[Merge to develop]
|
|
43
|
+
|
|
44
|
+
develop (stable)
|
|
45
|
+
↓
|
|
46
|
+
│ (release manager prepares)
|
|
47
|
+
↓
|
|
48
|
+
[PR: develop -> main]
|
|
49
|
+
[CI/CD validation]
|
|
50
|
+
[tag creation]
|
|
51
|
+
↓
|
|
52
|
+
main (release)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Flexibility**: Direct pushes to `main` are still possible, but the workflow above is preferred.
|
|
56
|
+
|
|
57
|
+
## Technical Implementation
|
|
58
|
+
|
|
59
|
+
### Pre-push Hook (Advisory Mode)
|
|
60
|
+
|
|
61
|
+
**Location**: `.git/hooks/pre-push`
|
|
62
|
+
**Purpose**: Warn on `main` branch pushes without blocking them
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# When attempting to push to main:
|
|
66
|
+
⚠️ ADVISORY: Non-standard GitFlow detected
|
|
67
|
+
|
|
68
|
+
Current branch: feature/SPEC-123
|
|
69
|
+
Target branch: main
|
|
70
|
+
|
|
71
|
+
Recommended GitFlow workflow:
|
|
72
|
+
1. Work on feature/SPEC-{ID} branch (created from develop)
|
|
73
|
+
2. Push to feature/SPEC-{ID} and create PR to develop
|
|
74
|
+
3. Merge into develop after code review
|
|
75
|
+
4. When develop is stable, create PR from develop to main
|
|
76
|
+
5. Release manager merges develop -> main with tag
|
|
77
|
+
|
|
78
|
+
✓ Push will proceed (flexibility mode enabled)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Force Push Advisory
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
⚠️ ADVISORY: Force-push to main branch detected
|
|
85
|
+
|
|
86
|
+
Recommended approach:
|
|
87
|
+
- Use GitHub PR with proper code review
|
|
88
|
+
- Ensure changes are merged via fast-forward
|
|
89
|
+
|
|
90
|
+
✓ Push will proceed (flexibility mode enabled)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Workflow Examples
|
|
96
|
+
|
|
97
|
+
### Scenario 1: Standard Feature Development (Recommended)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# 1. Sync latest code from develop
|
|
101
|
+
git checkout develop
|
|
102
|
+
git pull origin develop
|
|
103
|
+
|
|
104
|
+
# 2. Create a feature branch (from develop)
|
|
105
|
+
git checkout -b feature/SPEC-001-new-feature
|
|
106
|
+
|
|
107
|
+
# 3. Implement the change
|
|
108
|
+
# ... write code and tests ...
|
|
109
|
+
|
|
110
|
+
# 4. Commit
|
|
111
|
+
git add .
|
|
112
|
+
git commit -m "..."
|
|
113
|
+
|
|
114
|
+
# 5. Push
|
|
115
|
+
git push origin feature/SPEC-001-new-feature
|
|
116
|
+
|
|
117
|
+
# 6. Open a PR: feature/SPEC-001-new-feature -> develop
|
|
118
|
+
|
|
119
|
+
# 7. Merge into develop after review and approval
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Scenario 2: Fast Hotfix (Flexible)
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# When an urgent fix is required:
|
|
126
|
+
|
|
127
|
+
# Option 1: Recommended (via develop)
|
|
128
|
+
git checkout develop
|
|
129
|
+
git checkout -b hotfix/critical-bug
|
|
130
|
+
# ... apply fix ...
|
|
131
|
+
git push origin hotfix/critical-bug
|
|
132
|
+
# Open PRs: hotfix -> develop -> main
|
|
133
|
+
|
|
134
|
+
# Option 2: Direct fix on main (allowed, not recommended)
|
|
135
|
+
git checkout main
|
|
136
|
+
# ... apply fix ...
|
|
137
|
+
git commit -m "Fix critical bug"
|
|
138
|
+
git push origin main # ⚠️ Advisory warning appears but push continues
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Scenario 3: Release (Standard or Flexible)
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Standard approach (recommended):
|
|
145
|
+
git checkout develop
|
|
146
|
+
gh pr create --base main --head develop --title "Release v1.0.0"
|
|
147
|
+
|
|
148
|
+
# Direct push (allowed):
|
|
149
|
+
git checkout develop
|
|
150
|
+
git push origin main # ⚠️ Advisory warning appears but push continues
|
|
151
|
+
git tag -a v1.0.0 -m "Release v1.0.0"
|
|
152
|
+
git push origin v1.0.0
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Policy Modes
|
|
158
|
+
|
|
159
|
+
### Strict Mode (Legacy, Currently Disabled)
|
|
160
|
+
|
|
161
|
+
- ❌ Block direct pushes to `main`
|
|
162
|
+
- ❌ Block force pushes
|
|
163
|
+
- ❌ Block merges into `main` from any branch other than `develop`
|
|
164
|
+
|
|
165
|
+
### Advisory Mode (Active, v0.3.5+)
|
|
166
|
+
|
|
167
|
+
- ⚠️ Warn but allow direct pushes to `main`
|
|
168
|
+
- ⚠️ Warn but allow force pushes
|
|
169
|
+
- ⚠️ Recommend best practices while preserving flexibility
|
|
170
|
+
- ✅ Respect user judgment
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Recommended Checklist
|
|
175
|
+
|
|
176
|
+
Every contributor should ensure:
|
|
177
|
+
|
|
178
|
+
- [ ] `.git/hooks/pre-push` exists and is executable (755)
|
|
179
|
+
- [ ] Feature branches fork from `develop`
|
|
180
|
+
- [ ] Pull requests target `develop`
|
|
181
|
+
- [ ] Releases merge `develop` → `main`
|
|
182
|
+
|
|
183
|
+
**Verification Commands**:
|
|
184
|
+
```bash
|
|
185
|
+
ls -la .git/hooks/pre-push
|
|
186
|
+
git branch -vv
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## FAQ
|
|
192
|
+
|
|
193
|
+
**Q: Can we merge into `main` from branches other than `develop`?**
|
|
194
|
+
A: Yes. You will see an advisory warning, but the merge proceeds. The recommended path remains `develop` → `main`.
|
|
195
|
+
|
|
196
|
+
**Q: Are force pushes allowed?**
|
|
197
|
+
A: Yes. You receive a warning, but the push succeeds. Use with caution.
|
|
198
|
+
|
|
199
|
+
**Q: Can we commit/push directly to `main`?**
|
|
200
|
+
A: Yes. Expect an advisory warning, yet the push continues.
|
|
201
|
+
|
|
202
|
+
**Q: Can I disable the hook entirely?**
|
|
203
|
+
A: Yes. Remove `.git/hooks/pre-push` or strip its execute permission.
|
|
204
|
+
|
|
205
|
+
**Q: Why switch to Advisory Mode?**
|
|
206
|
+
A: To promote best practices while respecting contributor flexibility and judgment.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Policy Change Log
|
|
211
|
+
|
|
212
|
+
| Date | Change | Owner |
|
|
213
|
+
|------|------|--------|
|
|
214
|
+
| 2025-10-17 | Initial policy drafted (Strict Mode) | git-manager |
|
|
215
|
+
| 2025-10-17 | Switched to Advisory Mode (warnings only) | git-manager |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
**This policy is advisory—adapt it to fit your project needs.**
|
|
220
|
+
**Reach out to the team lead or release engineer for questions or suggestions.**
|
|
@@ -0,0 +1,356 @@
|
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moai-adk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
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
|
|
@@ -23,6 +23,7 @@ Requires-Dist: click>=8.1.0
|
|
|
23
23
|
Requires-Dist: gitpython>=3.1.45
|
|
24
24
|
Requires-Dist: packaging>=21.0
|
|
25
25
|
Requires-Dist: pyfiglet>=1.0.2
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
27
|
Requires-Dist: questionary>=2.0.0
|
|
27
28
|
Requires-Dist: rich>=13.0.0
|
|
28
29
|
Provides-Extra: dev
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
moai_adk/__init__.py,sha256=8E7tMBsxNR-EFqDY241RCJlSZEdCSigIbek2CiOzMBs,359
|
|
2
|
-
moai_adk/__main__.py,sha256=
|
|
2
|
+
moai_adk/__main__.py,sha256=uo6p-EzHYCetlU3gGxGasiIkwGq6wlzag7RYtzieoJI,2421
|
|
3
3
|
moai_adk/cli/__init__.py,sha256=tidIaJnd4Pje_5QYRq7OvRRst4T3kaPlkw5QcPQ3l1Y,135
|
|
4
4
|
moai_adk/cli/main.py,sha256=mHACHi27AP2N7fg7zhzOo1tlF1Jrlw1_AcbxMfpGLVE,306
|
|
5
5
|
moai_adk/cli/commands/__init__.py,sha256=TrAIWcJRGXh1mY8itSzWm-W0nnybzQIFOuh6oksKWO0,680
|
|
@@ -259,19 +259,22 @@ moai_adk/templates/.moai/config.json,sha256=0DZ9zK3wUD2lRfeqX93tYJz5Pb_h7DV4k2wy
|
|
|
259
259
|
moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md,sha256=37Qj5DYcyUniLM1g8IU7UWFI_16tutZrcAkJc4E5i20,15876
|
|
260
260
|
moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md,sha256=Tf3q68X1DiA3MkIBYu7AMXoeparYrDRpyqVI5Nw92OY,12653
|
|
261
261
|
moai_adk/templates/.moai/memory/CLAUDE-RULES.md,sha256=S9GODGRzwwleOmROVtBDa471Ok5NyQLWIkaO_4peHhU,19783
|
|
262
|
+
moai_adk/templates/.moai/memory/CONFIG-SCHEMA.md,sha256=XmvogEnGedRItVc9OABKr4lDNEZhcKZQ3Qa6KlfxE3E,12477
|
|
262
263
|
moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md,sha256=SAcue1J5-DEJpygDnTgp_ex-ok2E4lbcykBuBiC7tGs,14534
|
|
263
264
|
moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md,sha256=tm2ZOmNMvomAhh4_AGTUNjmSsc-eKzo1SGshojx2QL0,6228
|
|
264
265
|
moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md,sha256=uMEFi6uojnpO_MGGtwhakYQzVF2yzVV9ZzfQe5tB0Hk,7823
|
|
265
266
|
moai_adk/templates/.moai/memory/SPEC-METADATA.md,sha256=Ha4ATMxyH2PgQdVbS1fYwVH0PnIkfqk4hfuB5ksMFFk,9702
|
|
266
267
|
moai_adk/templates/.moai/memory/config-schema.md,sha256=XmvogEnGedRItVc9OABKr4lDNEZhcKZQ3Qa6KlfxE3E,12477
|
|
268
|
+
moai_adk/templates/.moai/memory/gitflow-protection-policy.md,sha256=tm2ZOmNMvomAhh4_AGTUNjmSsc-eKzo1SGshojx2QL0,6228
|
|
269
|
+
moai_adk/templates/.moai/memory/spec-metadata.md,sha256=Ha4ATMxyH2PgQdVbS1fYwVH0PnIkfqk4hfuB5ksMFFk,9702
|
|
267
270
|
moai_adk/templates/.moai/project/product.md,sha256=IrRSqhu0o5KNfn453DUWoUKzdoO3m6013iYCwaHYCxM,5166
|
|
268
271
|
moai_adk/templates/.moai/project/structure.md,sha256=YWZ4ggmfzveKx8SQGFQWXdDUh5mxOLkEyy5yVdR3Rn0,4791
|
|
269
272
|
moai_adk/templates/.moai/project/tech.md,sha256=REecMv8wOvutt-pQZ5nlGk5YdReTan7AHcKJ2Yes6RM,5758
|
|
270
273
|
moai_adk/utils/__init__.py,sha256=VnVfQzzKHvKw4bNdEw5xdscnRQYFrnr-v_TOBr3naPs,225
|
|
271
274
|
moai_adk/utils/banner.py,sha256=znppKd5yo-tTqgyhgPVJjstrTrfcy_v3X1_RFQxP4Fk,1878
|
|
272
275
|
moai_adk/utils/logger.py,sha256=g-m07PGKjK2bKRIInfSn6m-024Bedai-pV_WjZKDeu8,5064
|
|
273
|
-
moai_adk-0.
|
|
274
|
-
moai_adk-0.
|
|
275
|
-
moai_adk-0.
|
|
276
|
-
moai_adk-0.
|
|
277
|
-
moai_adk-0.
|
|
276
|
+
moai_adk-0.6.1.dist-info/METADATA,sha256=IX0tIPlVvj4lXEA23-HJc6PwOfRaVlHuI9P81gkOPvo,68010
|
|
277
|
+
moai_adk-0.6.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
278
|
+
moai_adk-0.6.1.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
|
|
279
|
+
moai_adk-0.6.1.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
|
|
280
|
+
moai_adk-0.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|