moai-adk 0.8.0__py3-none-any.whl → 0.15.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.

Files changed (207) hide show
  1. moai_adk/cli/commands/init.py +14 -2
  2. moai_adk/cli/commands/update.py +229 -60
  3. moai_adk/core/config/migration.py +1 -1
  4. moai_adk/core/issue_creator.py +313 -0
  5. moai_adk/core/project/detector.py +201 -12
  6. moai_adk/core/project/initializer.py +62 -1
  7. moai_adk/core/project/phase_executor.py +48 -6
  8. moai_adk/core/tags/__init__.py +86 -0
  9. moai_adk/core/tags/ci_validator.py +463 -0
  10. moai_adk/core/tags/cli.py +283 -0
  11. moai_adk/core/tags/generator.py +109 -0
  12. moai_adk/core/tags/inserter.py +99 -0
  13. moai_adk/core/tags/mapper.py +126 -0
  14. moai_adk/core/tags/parser.py +76 -0
  15. moai_adk/core/tags/pre_commit_validator.py +393 -0
  16. moai_adk/core/tags/reporter.py +956 -0
  17. moai_adk/core/tags/tags.py +149 -0
  18. moai_adk/core/tags/validator.py +897 -0
  19. moai_adk/core/template_engine.py +268 -0
  20. moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
  21. moai_adk/templates/.claude/agents/alfred/cc-manager.md +25 -2
  22. moai_adk/templates/.claude/agents/alfred/debug-helper.md +24 -12
  23. moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
  24. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +20 -13
  25. moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
  26. moai_adk/templates/.claude/agents/alfred/git-manager.md +47 -16
  27. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +95 -15
  28. moai_adk/templates/.claude/agents/alfred/project-manager.md +78 -12
  29. moai_adk/templates/.claude/agents/alfred/quality-gate.md +28 -5
  30. moai_adk/templates/.claude/agents/alfred/skill-factory.md +30 -2
  31. moai_adk/templates/.claude/agents/alfred/spec-builder.md +133 -13
  32. moai_adk/templates/.claude/agents/alfred/tag-agent.md +104 -8
  33. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +133 -16
  34. moai_adk/templates/.claude/agents/alfred/trust-checker.md +27 -4
  35. moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
  36. moai_adk/templates/.claude/commands/alfred/0-project.md +466 -125
  37. moai_adk/templates/.claude/commands/alfred/1-plan.md +208 -71
  38. moai_adk/templates/.claude/commands/alfred/2-run.md +276 -55
  39. moai_adk/templates/.claude/commands/alfred/3-sync.md +439 -53
  40. moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
  41. moai_adk/templates/.claude/hooks/alfred/core/project.py +361 -29
  42. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  43. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
  44. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
  45. moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
  46. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +94 -0
  47. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +100 -0
  48. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +94 -0
  49. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +94 -0
  50. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/__init__.py +2 -2
  51. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
  52. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
  53. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
  54. moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/tags.py +55 -23
  55. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
  56. moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
  57. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
  58. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/session.py +28 -15
  59. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/tool.py +3 -6
  60. moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/user.py +19 -0
  61. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +112 -0
  62. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  63. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
  64. moai_adk/templates/.claude/settings.json +5 -5
  65. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
  66. moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
  67. moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
  68. moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
  69. moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
  70. moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
  71. moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
  72. moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
  73. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
  74. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
  75. moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
  76. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
  77. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
  78. moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
  79. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
  80. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
  81. moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
  82. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
  83. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
  84. moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
  85. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
  86. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
  87. moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
  88. moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
  89. moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
  90. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
  91. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
  92. moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
  93. moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
  94. moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
  95. moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
  96. moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
  97. moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
  98. moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
  99. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
  100. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
  101. moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +3 -3
  102. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
  103. moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
  104. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
  105. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
  106. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
  107. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
  108. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
  109. moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
  110. moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
  111. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
  112. moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
  113. moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
  114. moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
  115. moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
  116. moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
  117. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
  118. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +9 -6
  119. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
  120. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
  121. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
  122. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
  123. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
  124. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
  125. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
  126. moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
  127. moai_adk/templates/.git-hooks/pre-push +143 -0
  128. moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
  129. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
  130. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
  131. moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
  132. moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
  133. moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
  134. moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
  135. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
  136. moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
  137. moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
  138. moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
  139. moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
  140. moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
  141. moai_adk/templates/.github/workflows/release.yml +118 -0
  142. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
  143. moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
  144. moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
  145. moai_adk/templates/.github/workflows/spec-issue-sync.yml +206 -35
  146. moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
  147. moai_adk/templates/.github/workflows/tag-report.yml +269 -0
  148. moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
  149. moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
  150. moai_adk/templates/.moai/config.json +21 -2
  151. moai_adk/templates/CLAUDE.md +972 -78
  152. moai_adk/templates/workflows/go-tag-validation.yml +30 -0
  153. moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
  154. moai_adk/templates/workflows/python-tag-validation.yml +42 -0
  155. moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
  156. moai_adk/utils/banner.py +5 -5
  157. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/METADATA +1518 -161
  158. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/RECORD +183 -100
  159. moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
  160. moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
  161. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -174
  162. moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
  163. moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
  164. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
  165. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
  166. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
  167. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +0 -137
  168. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -218
  169. moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
  170. moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
  171. moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
  172. moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
  173. moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
  174. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
  175. moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
  176. moai_adk/templates/.moai/memory/config-schema.md +0 -444
  177. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
  178. moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
  179. moai_adk/templates/.moai/project/product.md +0 -161
  180. moai_adk/templates/.moai/project/structure.md +0 -156
  181. moai_adk/templates/.moai/project/tech.md +0 -227
  182. moai_adk/templates/__init__.py +0 -2
  183. /moai_adk/templates/{.moai/memory/CONFIG-SCHEMA.md → .claude/skills/moai-alfred-config-schema/reference.md} +0 -0
  184. /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
  185. /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
  186. /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
  187. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
  188. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
  189. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
  190. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
  191. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
  192. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
  193. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
  194. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
  195. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
  196. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
  197. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
  198. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
  199. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
  200. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
  201. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
  202. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
  203. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
  204. /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
  205. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/WHEEL +0 -0
  206. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/entry_points.txt +0 -0
  207. {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/licenses/LICENSE +0 -0
@@ -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
@@ -1,161 +0,0 @@
1
- ---
2
- id: PRODUCT-001
3
- version: 0.1.3
4
- status: active
5
- created: 2025-10-01
6
- updated: 2025-10-17
7
- author: @project-owner
8
- priority: high
9
- ---
10
-
11
- # {{PROJECT_NAME}} Product Definition
12
-
13
- ## HISTORY
14
-
15
- ### v0.1.3 (2025-10-17)
16
- - **UPDATED**: Template version synced (v0.3.8)
17
- - **AUTHOR**: @Alfred
18
- - **SECTIONS**: Mission (finalized team of 12 agents: Alfred + 11 specialists)
19
- - Added implementation-planner, tdd-implementer, quality-gate
20
- - Split code-builder into implementation-planner + tdd-implementer + quality-gate
21
-
22
- ### v0.1.2 (2025-10-17)
23
- - **UPDATED**: Agent count adjusted (9 → 11)
24
- - **AUTHOR**: @Alfred
25
- - **SECTIONS**: Mission (updated Alfred SuperAgent roster)
26
-
27
- ### v0.1.1 (2025-10-17)
28
- - **UPDATED**: Template defaults aligned with the real MoAI-ADK project
29
- - **AUTHOR**: @Alfred
30
- - **SECTIONS**: Mission, User, Problem, Strategy, Success populated with project context
31
-
32
- ### v0.1.0 (2025-10-01)
33
- - **INITIAL**: Authored the product definition document
34
- - **AUTHOR**: @project-owner
35
- - **SECTIONS**: Mission, User, Problem, Strategy, Success, Legacy
36
-
37
- ---
38
-
39
- ## @DOC:MISSION-001 Core Mission
40
-
41
- > **"No SPEC, no CODE."**
42
-
43
- {{PROJECT_NAME}} combats Frankenstein code at the root by enforcing a **SPEC-first TDD methodology**.
44
-
45
- ### Core Value Proposition
46
-
47
- #### Four Key Values
48
-
49
- 1. **Consistency**: A three-step SPEC → TDD → Sync pipeline safeguards delivery quality.
50
- 2. **Quality**: TRUST principles (Test First, Readable, Unified, Secured, Trackable) apply automatically.
51
- 3. **Traceability**: The @TAG system (`@SPEC → @TEST → @CODE → @DOC`) preserves end-to-end lineage.
52
- 4. **Universality**: Supports diverse programming languages and frameworks.
53
-
54
- #### Alfred SuperAgent
55
-
56
- **Alfred** coordinates a team of 12 AI agents (Alfred + 11 specialists):
57
- - **spec-builder** 🏗️: Authors SPECs (EARS pattern) – Sonnet
58
- - **implementation-planner** 📋: Analyzes SPECs and derives implementation plans – Sonnet
59
- - **tdd-implementer** 🔬: Executes RED–GREEN–REFACTOR cycles – Sonnet
60
- - **quality-gate** 🛡️: Enforces TRUST principles – Haiku
61
- - **doc-syncer** 📖: Maintains living documentation – Haiku
62
- - **tag-agent** 🏷️: Manages the TAG system – Haiku
63
- - **git-manager** 🚀: Automates Git workflows – Haiku
64
- - **debug-helper** 🔍: Diagnoses runtime issues – Sonnet
65
- - **trust-checker** ✅: Verifies TRUST compliance – Haiku
66
- - **cc-manager** 🛠️: Configures Claude Code – Sonnet
67
- - **project-manager** 📂: Bootstraps projects – Sonnet
68
-
69
- ## @SPEC:USER-001 Primary Users
70
-
71
- ### Primary Audience
72
- - **Who**: [Describe your main user segment]
73
- - **Core Needs**: [Explain the problems they want solved]
74
- - **Critical Scenarios**: [Outline their primary usage scenarios]
75
-
76
- ### Secondary Audience (Optional)
77
- - **Who**: [Describe any secondary user group]
78
- - **Needs**: [Capture their requirements]
79
-
80
- ## @SPEC:PROBLEM-001 Problems to Solve
81
-
82
- ### High Priority
83
- 1. [Top problem to resolve]
84
- 2. [Second critical problem]
85
- 3. [Third critical problem]
86
-
87
- ### Medium Priority
88
- - [Problems with moderate urgency]
89
-
90
- ### Current Failure Cases
91
- - [Limitations or failure patterns in existing solutions]
92
-
93
- ## @DOC:STRATEGY-001 Differentiators & Strengths
94
-
95
- ### Strengths Versus Alternatives
96
- 1. [Primary differentiator]
97
- - **When it matters**: [Scenario where the strength shines]
98
-
99
- 2. [Second differentiator]
100
- - **When it matters**: [Concrete usage example]
101
-
102
- ## @SPEC:SUCCESS-001 Success Metrics
103
-
104
- ### Immediately Measurable KPIs
105
- 1. [Metric 1]
106
- - **Baseline**: [Target value and measurement approach]
107
-
108
- 2. [Metric 2]
109
- - **Baseline**: [Target value and measurement approach]
110
-
111
- ### Measurement Cadence
112
- - **Daily**: [Metrics tracked daily]
113
- - **Weekly**: [Metrics tracked weekly]
114
- - **Monthly**: [Metrics tracked monthly]
115
-
116
- ## Legacy Context
117
-
118
- ### Existing Assets
119
- - [Reusable assets or resources]
120
- - [Relevant past projects or experience]
121
-
122
- ## TODO:SPEC-BACKLOG-001 Next SPEC Candidates
123
-
124
- 1. **SPEC-001**: [First feature to implement]
125
- 2. **SPEC-002**: [Second feature to implement]
126
- 3. **SPEC-003**: [Third feature to implement]
127
-
128
- ## EARS Requirement Authoring Guide
129
-
130
- ### EARS (Easy Approach to Requirements Syntax)
131
-
132
- Use these EARS patterns to keep SPEC requirements structured:
133
-
134
- #### EARS Patterns
135
- 1. **Ubiquitous Requirements**: The system shall provide [capability].
136
- 2. **Event-driven Requirements**: WHEN [condition], the system shall [behaviour].
137
- 3. **State-driven Requirements**: WHILE [state], the system shall [behaviour].
138
- 4. **Optional Features**: WHERE [condition], the system may [behaviour].
139
- 5. **Constraints**: IF [condition], the system shall enforce [constraint].
140
-
141
- #### Sample Application
142
- ```markdown
143
- ### Ubiquitous Requirements (Foundational)
144
- - The system shall provide user management capabilities.
145
-
146
- ### Event-driven Requirements
147
- - WHEN a user signs up, the system shall send a welcome email.
148
-
149
- ### State-driven Requirements
150
- - WHILE a user remains logged in, the system shall display a personalized dashboard.
151
-
152
- ### Optional Features
153
- - WHERE an account is premium, the system may offer advanced features.
154
-
155
- ### Constraints
156
- - IF an account is locked, the system shall reject login attempts.
157
- ```
158
-
159
- ---
160
-
161
- _This document serves as the baseline when `/alfred:1-plan` runs._
@@ -1,156 +0,0 @@
1
- ---
2
- id: STRUCTURE-001
3
- version: 0.1.1
4
- status: active
5
- created: 2025-10-01
6
- updated: 2025-10-17
7
- author: @architect
8
- priority: medium
9
- ---
10
-
11
- # {{PROJECT_NAME}} Structure Design
12
-
13
- ## HISTORY
14
-
15
- ### v0.1.1 (2025-10-17)
16
- - **UPDATED**: Template version synced (v0.3.8)
17
- - **AUTHOR**: @Alfred
18
- - **SECTIONS**: Metadata standardization (single `author` field, added `priority`)
19
-
20
- ### v0.1.0 (2025-10-01)
21
- - **INITIAL**: Authored the structure design document
22
- - **AUTHOR**: @architect
23
- - **SECTIONS**: Architecture, Modules, Integration, Traceability
24
-
25
- ---
26
-
27
- ## @DOC:ARCHITECTURE-001 System Architecture
28
-
29
- ### Architectural Strategy
30
-
31
- **[Describe the end-to-end architectural approach for the project]**
32
-
33
- ```
34
- Project Architecture
35
- - [Layer 1] # [Describe its responsibilities]
36
- - [Layer 2] # [Describe its responsibilities]
37
- - [Layer 3] # [Describe its responsibilities]
38
- - [Layer 4] # [Describe its responsibilities]
39
- ```
40
-
41
- **Rationale**: [Explain the trade-offs behind the chosen architecture]
42
-
43
- ## @DOC:MODULES-001 Module Responsibilities
44
-
45
- ### 1. [Primary Module 1]
46
-
47
- - **Responsibilities**: [Key duties of the module]
48
- - **Inputs**: [Data it consumes]
49
- - **Processing**: [Core processing steps]
50
- - **Outputs**: [Produced artifacts]
51
-
52
- | Component | Role | Key Capabilities |
53
- | ------------- | ------ | ---------------- |
54
- | [Component 1] | [Role] | [Feature list] |
55
- | [Component 2] | [Role] | [Feature list] |
56
-
57
- ### 2. [Primary Module 2]
58
-
59
- - **Responsibilities**: [Key duties of the module]
60
- - **Inputs**: [Data it consumes]
61
- - **Processing**: [Core processing steps]
62
- - **Outputs**: [Produced artifacts]
63
-
64
- ## @DOC:INTEGRATION-001 External Integrations
65
-
66
- ### [External System 1] Integration
67
-
68
- - **Authentication**: [Method used]
69
- - **Data Exchange**: [Formats and protocols]
70
- - **Failure Handling**: [Fallback strategy]
71
- - **Risk Level**: [Risk profile and mitigation]
72
-
73
- ### [External System 2] Integration
74
-
75
- - **Purpose**: [Why it is used]
76
- - **Dependency Level**: [Degree of reliance and alternatives]
77
- - **Performance Requirements**: [Latency, throughput, etc.]
78
-
79
- ## @DOC:TRACEABILITY-001 Traceability Strategy
80
-
81
- ### Applying the TAG Framework
82
-
83
- **Full TDD Alignment**: SPEC → Tests → Implementation → Documentation
84
- - `@SPEC:ID` (`.moai/specs/`) → `@TEST:ID` (`tests/`) → `@CODE:ID` (`src/`) → `@DOC:ID` (`docs/`)
85
-
86
- **Implementation Detail Levels**: Annotation within `@CODE:ID`
87
- - `@CODE:ID:API` – REST APIs, GraphQL endpoints
88
- - `@CODE:ID:UI` – Components, views, screens
89
- - `@CODE:ID:DATA` – Data models, schemas, types
90
- - `@CODE:ID:DOMAIN` – Business logic, domain rules
91
- - `@CODE:ID:INFRA` – Infrastructure, databases, integrations
92
-
93
- ### Managing TAG Traceability (Code-Scan Approach)
94
-
95
- - **Verification**: Run `/alfred:3-sync`, which scans with `rg '@(SPEC|TEST|CODE|DOC):' -n`
96
- - **Coverage**: Full project source (`.moai/specs/`, `tests/`, `src/`, `docs/`)
97
- - **Cadence**: Validate whenever the code changes
98
- - **Code-First Principle**: TAG truth lives in the source itself
99
-
100
- ## Legacy Context
101
-
102
- ### Current System Snapshot
103
-
104
- **[Describe the existing system or assets]**
105
-
106
- ```
107
- Current System/
108
- ├── [Component 1]/ # [Current state]
109
- ├── [Component 2]/ # [Current state]
110
- └── [Component 3]/ # [Current state]
111
- ```
112
-
113
- ### Migration Considerations
114
-
115
- 1. **[Migration item 1]** – [Plan and priority]
116
- 2. **[Migration item 2]** – [Plan and priority]
117
- 3. **[Migration item 3]** – [Plan and priority]
118
-
119
- ## TODO:STRUCTURE-001 Structural Improvements
120
-
121
- 1. **Define module interfaces** – [Plan details]
122
- 2. **Dependency management strategy** – [Plan details]
123
- 3. **Scalability roadmap** – [Plan details]
124
-
125
- ## EARS for Architectural Requirements
126
-
127
- ### Applying EARS to Architecture
128
-
129
- Use EARS patterns to write clear architectural requirements:
130
-
131
- #### Architectural EARS Example
132
- ```markdown
133
- ### Ubiquitous Requirements (Baseline Architecture)
134
- - The system shall adopt a layered architecture.
135
- - The system shall maintain loose coupling across modules.
136
-
137
- ### Event-driven Requirements
138
- - WHEN an external API call fails, the system shall execute fallback logic.
139
- - WHEN a data change event occurs, the system shall notify dependent modules.
140
-
141
- ### State-driven Requirements
142
- - WHILE the system operates in scale-out mode, it shall load new modules dynamically.
143
- - WHILE in development mode, the system shall provide verbose debug information.
144
-
145
- ### Optional Features
146
- - WHERE the deployment runs in the cloud, the system may use distributed caching.
147
- - WHERE high performance is required, the system may apply in-memory caching.
148
-
149
- ### Constraints
150
- - IF the security level is elevated, the system shall encrypt all inter-module communication.
151
- - Each module shall keep cyclomatic complexity under 15.
152
- ```
153
-
154
- ---
155
-
156
- _This structure informs the TDD implementation when `/alfred:2-run` runs._