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,176 +0,0 @@
1
- name: 📋 SPEC Document
2
- description: Create a new SPEC document for feature planning
3
- title: "[SPEC-] "
4
- labels: ["spec", "planning"]
5
- assignees: []
6
-
7
- body:
8
- - type: markdown
9
- attributes:
10
- value: |
11
- ## 📋 SPEC Metadata
12
-
13
- Fill out the SPEC details below. This will be synchronized with the SPEC document and GitHub Issue.
14
-
15
- - type: input
16
- id: spec-id
17
- attributes:
18
- label: SPEC ID
19
- description: "Format: DOMAIN-###. Example: AUTH-001, API-DESIGN-001"
20
- placeholder: "AUTH-001"
21
- validations:
22
- required: true
23
-
24
- - type: input
25
- id: spec-title
26
- attributes:
27
- label: SPEC Title
28
- description: "Brief description of the specification"
29
- placeholder: "JWT-based authentication system"
30
- validations:
31
- required: true
32
-
33
- - type: dropdown
34
- id: priority
35
- attributes:
36
- label: Priority
37
- description: "Feature priority level"
38
- options:
39
- - "critical"
40
- - "high"
41
- - "medium"
42
- - "low"
43
- validations:
44
- required: true
45
-
46
- - type: dropdown
47
- id: category
48
- attributes:
49
- label: Category
50
- description: "SPEC category"
51
- options:
52
- - "API"
53
- - "Backend"
54
- - "Frontend"
55
- - "Infrastructure"
56
- - "Security"
57
- - "Testing"
58
- - "DevOps"
59
- - "Documentation"
60
- - "Performance"
61
- - "Other"
62
- validations:
63
- required: true
64
-
65
- - type: textarea
66
- id: ubiquitous-requirements
67
- attributes:
68
- label: "Ubiquitous Requirements"
69
- description: "Statements that apply universally to the system"
70
- placeholder: |
71
- - The system must provide JWT-based authentication
72
- - The system must support token expiration
73
- value: "### Ubiquitous\n"
74
- validations:
75
- required: true
76
-
77
- - type: textarea
78
- id: event-requirements
79
- attributes:
80
- label: "Event-driven Requirements (WHEN)"
81
- description: "Event-triggered requirements in EARS format"
82
- placeholder: |
83
- - WHEN the user submits login credentials, the system must validate them against the database
84
- - WHEN credentials are valid, the system must issue a JWT token with expiration
85
- value: "### Event-driven (WHEN)\n"
86
- validations:
87
- required: false
88
-
89
- - type: textarea
90
- id: state-requirements
91
- attributes:
92
- label: "State-driven Requirements (WHILE)"
93
- description: "State-based requirements in EARS format"
94
- placeholder: |
95
- - WHILE the token is unexpired, the system must allow access to protected resources
96
- - WHILE the user is logged in, the system must track the session
97
- value: "### State-driven (WHILE)\n"
98
- validations:
99
- required: false
100
-
101
- - type: textarea
102
- id: optional-requirements
103
- attributes:
104
- label: "Optional Requirements (WHERE)"
105
- description: "Optional features and capabilities"
106
- placeholder: |
107
- - WHERE the user requests token refresh, the system can issue a new token
108
- - WHERE OAuth2 is available, the system can support social login
109
- value: "### Optional (WHERE)\n"
110
- validations:
111
- required: false
112
-
113
- - type: textarea
114
- id: constraints
115
- attributes:
116
- label: "Constraints (IF)"
117
- description: "System constraints and conditions"
118
- placeholder: |
119
- - IF the token has expired, the system must return 401 Unauthorized
120
- - IF the password is incorrect, the system must reject the login attempt
121
- value: "### Constraints (IF)\n"
122
- validations:
123
- required: false
124
-
125
- - type: textarea
126
- id: acceptance-criteria
127
- attributes:
128
- label: "Acceptance Criteria (Given-When-Then)"
129
- description: "At least 2-3 test scenarios"
130
- placeholder: |
131
- **Scenario 1: Successful Login**
132
- - Given a user with valid credentials exists
133
- - When the user submits their credentials
134
- - Then the system returns a valid JWT token
135
-
136
- **Scenario 2: Token Expiration**
137
- - Given a user with an expired token
138
- - When the user tries to access a protected resource
139
- - Then the system returns a 401 Unauthorized response
140
- value: "## Acceptance Criteria\n\n"
141
- validations:
142
- required: true
143
-
144
- - type: textarea
145
- id: dependencies
146
- attributes:
147
- label: "Dependencies"
148
- description: "Related SPECs, tasks, or blockers"
149
- placeholder: |
150
- - Related: SPEC-SECURITY-001
151
- - Blocks: SPEC-API-DESIGN-001
152
- - Depends on: SPEC-DATABASE-001
153
- validations:
154
- required: false
155
-
156
- - type: textarea
157
- id: notes
158
- attributes:
159
- label: "Additional Notes"
160
- description: "Technical notes, assumptions, or context"
161
- placeholder: |
162
- - Consider token refresh token rotation
163
- - JWT payload should be minimal for performance
164
- - Consider rate limiting on login attempts
165
- validations:
166
- required: false
167
-
168
- - type: markdown
169
- attributes:
170
- value: |
171
- ## 📚 Reference
172
-
173
- - **SPEC Metadata Guide**: See `.moai/memory/spec-metadata.md`
174
- - **EARS Syntax Guide**: See `.moai/memory/development-guide.md`
175
- - **Acceptance Criteria**: Use Given-When-Then (Gherkin) format
176
- - **@TAG System**: @SPEC, @TEST, @CODE, @DOC traceability
@@ -1,69 +0,0 @@
1
- # MoAI-ADK GitFlow PR
2
-
3
- > 🗿 Full GitFlow Transparency — the agent auto-fills information
4
-
5
- ## 📝 SPEC Info
6
-
7
- - Related SPEC: `SPEC-AUTH-001` (e.g., JWT authentication system)
8
- - Directory: `.moai/specs/SPEC-AUTH-001/`
9
- - @TAG Links: @SPEC:AUTH-001 @CODE:AUTH-001 (auto-tagging)
10
-
11
- ## ✅ SPEC Quality Checks
12
-
13
- - [ ] YAML Front Matter: 7 required fields (id, version, status, created, updated, author, priority)
14
- - [ ] HISTORY Section: Record versioned change log (include v0.0.1 INITIAL)
15
- - [ ] EARS Requirements: Ubiquitous, Event-driven, State-driven, Optional, Constraints
16
- - [ ] @SPEC:ID TAG: Include TAG in doc and check duplicates (`rg "@SPEC:<ID>" -n`)
17
-
18
- ## 🤖 Automated Validation Status
19
-
20
- <!-- The checklist below is auto-updated by the agent -->
21
- <!-- /alfred:1-plan → create feature branch → Draft PR -->
22
- <!-- /alfred:2-run → implement via TDD → auto-check checkboxes -->
23
- <!-- /alfred:3-sync → synchronize documents → Ready for Review -->
24
-
25
- - [ ] spec-builder: Complete EARS spec and create feature branch
26
- - [ ] code-builder: Finish TDD RED-GREEN-REFACTOR
27
- - [ ] doc-syncer: Sync Living Documents and mark PR Ready
28
-
29
- ## 📊 Quality Metrics (auto-calculated)
30
-
31
- - TRUST 5 Principles: ✅ Compliant
32
- - Test Coverage: XX% (target ≥ 85%)
33
- - @TAG Traceability: 100%
34
-
35
- ## 🌍 Locale Settings
36
-
37
- - Project Language: <!-- ko/en/ja/zh -->
38
- - Commit Messages: <!-- generated automatically according to locale -->
39
-
40
- ## 🎯 Changes
41
-
42
- <!-- code-builder auto-fills TDD results -->
43
-
44
- ### 🔴 RED (Test Authoring)
45
- - Test File: `tests/auth/service.test.ts`
46
- - Test Description: [describe the failing test]
47
-
48
- ### 🟢 GREEN (Implementation)
49
- - Implementation File: `src/auth/service.ts`
50
- - Implementation Done: [describe functionality]
51
-
52
- ### ♻️ REFACTOR (Improvements)
53
- - Refactoring Details: [code quality improvements]
54
-
55
- ## 📚 Documentation Sync
56
-
57
- <!-- auto-filled by doc-syncer -->
58
-
59
- - [ ] Update README
60
- - [ ] Sync API docs
61
- - [ ] Update TAG index
62
- - [ ] Update HISTORY section (SPEC docs)
63
-
64
- ---
65
-
66
- 🚀 MoAI-ADK: Professional development without Git commands via a 3-stage pipeline!
67
-
68
- Reviewers: Check TRUST 5 compliance and SPEC metadata completeness only.
69
-
@@ -1,344 +0,0 @@
1
- # {{PROJECT_NAME}} Development Guide
2
-
3
- > "No spec, no code. No tests, no implementation."
4
-
5
- This unified guardrail applies to every agent and developer who uses the MoAI-ADK universal development toolkit. The Python-based toolkit supports all major programming languages and enforces a SPEC-first TDD methodology with @TAG traceability. English is the default working language.
6
-
7
- ---
8
-
9
- ## SPEC-First TDD Workflow
10
-
11
- ### Core Development Loop (3 Steps)
12
-
13
- 1. **Write the SPEC** (`/alfred:1-plan`) → no code without a spec
14
- 2. **Implement with TDD** (`/alfred:2-run`) → no implementation without tests
15
- 3. **Sync Documentation** (`/alfred:3-sync`) → no completion without traceability
16
-
17
- ### On-Demand Support
18
-
19
- - **Debugging**: summon `@agent-debug-helper` when failures occur
20
- - **CLI Commands**: init, doctor, status, update, restore, help, version
21
- - **System Diagnostics**: auto-detect language tooling and verify prerequisites
22
-
23
- Every change must comply with the @TAG system, SPEC-derived requirements, and language-specific TDD practices.
24
-
25
- ### EARS Requirement Authoring
26
-
27
- **EARS (Easy Approach to Requirements Syntax)** provides a disciplined method for writing requirements.
28
-
29
- #### Five EARS Patterns
30
- 1. **Ubiquitous Requirements**: The system shall provide [capability].
31
- 2. **Event-driven Requirements**: WHEN [condition], the system shall [behaviour].
32
- 3. **State-driven Requirements**: WHILE [state], the system shall [behaviour].
33
- 4. **Optional Features**: WHERE [condition], the system may [behaviour].
34
- 5. **Constraints**: IF [condition], the system shall enforce [constraint].
35
-
36
- #### Practical Example
37
- ```markdown
38
- ### Ubiquitous Requirements (Baseline)
39
- - The system shall provide user authentication.
40
-
41
- ### Event-driven Requirements
42
- - WHEN a user logs in with valid credentials, the system shall issue a JWT token.
43
- - WHEN a token expires, the system shall return a 401 error.
44
-
45
- ### State-driven Requirements
46
- - WHILE the user remains authenticated, the system shall allow access to protected resources.
47
-
48
- ### Optional Features
49
- - WHERE a refresh token is present, the system may issue a new access token.
50
-
51
- ### Constraints
52
- - IF an invalid token is supplied, the system shall deny access.
53
- - Access tokens shall not exceed a 15-minute lifetime.
54
- ```
55
-
56
- ---
57
-
58
- ## Context Engineering
59
-
60
- MoAI-ADK follows Anthropic's principles from “Effective Context Engineering for AI Agents” to keep context lean and relevant.
61
-
62
- ### 1. JIT (Just-in-Time) Retrieval
63
-
64
- **Principle**: Load documents only when needed to minimize initial context load.
65
-
66
- **Alfred’s JIT Strategy**:
67
-
68
- | Command | Required Load | Optional Load | Timing |
69
- | ---------------- | ---------------- | -------------------------------- | ---------------------------------- |
70
- | `/alfred:1-plan` | product.md | structure.md, tech.md | While discovering SPEC candidates |
71
- | `/alfred:2-run` | SPEC-XXX/spec.md | development-guide.md | At the start of TDD implementation |
72
- | `/alfred:3-sync` | sync-report.md | TAG chain validation (`rg` scan) | During documentation sync |
73
-
74
- **Implementation Notes**:
75
- - Alfred uses the `Read` tool to load only the necessary documents at command time.
76
- - Agents request only the documents relevant to their current task.
77
- - The five documents listed in CLAUDE.md “Memory Strategy” are always loaded.
78
-
79
- ### Context Engineering Checklist
80
-
81
- **When designing commands**:
82
- - [ ] JIT: Do we load only the required documents?
83
- - [ ] Optional Load: Do we load documents conditionally?
84
-
85
- **When designing agents**:
86
- - [ ] Minimum tools: Does the YAML frontmatter declare only the needed tools?
87
- - [ ] Clear roles: Does each agent maintain a single responsibility?
88
-
89
- ---
90
-
91
- ## TRUST Principles (5 Pillars)
92
-
93
- ### T – Test-Driven Development (SPEC-Aligned)
94
-
95
- **SPEC → Test → Code Cycle**:
96
-
97
- - **SPEC**: Author detailed specifications first with `@SPEC:ID` tags (EARS format).
98
- - **RED**: `@TEST:ID` – write failing tests tied to SPEC requirements and confirm failure.
99
- - **GREEN**: `@CODE:ID` – implement the minimal code that passes the tests and satisfies the SPEC.
100
- - **REFACTOR**: `@CODE:ID` – improve the code while preserving SPEC compliance, then document with `@DOC:ID`.
101
-
102
- **Language-Specific TDD Tooling**:
103
-
104
- - **Python**: pytest + SPEC-based test cases (with mypy type hints)
105
- - **TypeScript**: Vitest + SPEC-driven suites (strict typing)
106
- - **Java**: JUnit + SPEC annotations (behaviour-driven tests)
107
- - **Go**: go test + SPEC table-driven tests (interface adherence)
108
- - **Rust**: cargo test + SPEC doc tests (trait validation)
109
- - **Ruby**: RSpec + SPEC-based BDD scenarios
110
-
111
- Each test links SPEC requirements to implementations via `@TEST:ID → @CODE:ID`.
112
-
113
- ### R – Requirement-Driven Readability
114
-
115
- **SPEC-Aligned Clean Code**:
116
-
117
- - Functions implement SPEC requirements directly (≤ 50 LOC per function).
118
- - Names mirror SPEC terminology and domain language.
119
- - Code structure reflects SPEC design decisions.
120
- - Comments are limited to SPEC clarifications and @TAG references.
121
-
122
- **Language-Specific SPEC Implementation**:
123
-
124
- - **Python**: Type hints mirroring SPEC interfaces + mypy validation
125
- - **TypeScript**: Strict interfaces that match SPEC contracts
126
- - **Java**: Classes implementing SPEC components with strong typing
127
- - **Go**: Interfaces that satisfy SPEC requirements + gofmt
128
- - **Rust**: Types enforcing SPEC safety requirements + rustfmt
129
- - **Ruby**: Behaviour reflecting SPEC narratives + RuboCop validation
130
-
131
- Every code element must remain traceable back to the SPEC via @TAG comments.
132
-
133
- ### U – Unified SPEC Architecture
134
-
135
- - **SPEC-Driven Complexity**: Each SPEC defines its complexity threshold. Exceeding it requires a new SPEC or a documented exception.
136
- - **SPEC vs. Implementation**: Keep authoring and implementation separate; never edit the SPEC mid-TDD cycle.
137
- - **Language Boundaries**: SPECs define boundaries across languages (Python modules, TypeScript interfaces, Java packages, Go packages, Rust crates, etc.).
138
- - **SPEC-Guided Architecture**: Domain boundaries follow the SPEC, not language conventions, with the @TAG system ensuring cross-language traceability.
139
-
140
- ### S – SPEC-Compliant Security
141
-
142
- - **Security Requirements**: Every SPEC explicitly defines security needs, data sensitivity, and access control.
143
- - **Security by Design**: Implement security controls during the TDD cycle, not after completion.
144
- - **Language-Agnostic Security Patterns**:
145
- - Input validation based on SPEC interface definitions
146
- - Audit logging for SPEC-defined critical operations
147
- - Access controls aligned with the SPEC permission model
148
- - Secret management tailored to SPEC environment requirements
149
-
150
- ### T – SPEC Traceability
151
-
152
- - **Spec-to-Code Traceability**: Every code change references SPEC IDs and requirements through the @TAG system.
153
- - **Three-Stage Workflow Trace**:
154
- - `/alfred:1-plan`: Write SPECs with `@SPEC:ID` tags (`.moai/specs/`)
155
- - `/alfred:2-run`: Implement via TDD with `@TEST:ID` (tests/) → `@CODE:ID` (src/)
156
- - `/alfred:3-sync`: Sync documentation using `@DOC:ID` (docs/) and validate TAG coverage
157
- - **Code Scan Verification**: Guarantee TAG traceability by scanning the codebase directly with `rg '@(SPEC|TEST|CODE|DOC):' -n`, without intermediate caches.
158
-
159
- ---
160
-
161
- ## SPEC-First Mindset
162
-
163
- 1. **SPEC-Led Decisions**: Reference an existing SPEC or author a new one before making any technical decision. Never implement without clear requirements.
164
- 2. **SPEC Context Review**: Read the relevant SPEC documents before changing code, understand the @TAG relationships, and confirm compliance.
165
- 3. **SPEC Communication**: Default to English for collaboration. SPEC documents should use precise technical terminology and plain, unambiguous explanations.
166
-
167
- ## SPEC-TDD Workflow
168
-
169
- 1. **Start with the SPEC**: Author or reference a SPEC before writing code. Use `/alfred:1-plan` to clarify requirements, design, and tasks.
170
- 2. **Implement with TDD**: Follow the Red–Green–Refactor loop rigorously using `/alfred:2-run` with language-appropriate testing frameworks.
171
- 3. **Maintain Traceability**: Run `/alfred:3-sync` to update documentation and preserve @TAG relationships between SPECs and code.
172
-
173
- ## @TAG System
174
-
175
- ### Core Chain
176
-
177
- ```text
178
- @SPEC:ID → @TEST:ID → @CODE:ID → @DOC:ID
179
- ```
180
-
181
- **Perfect TDD Alignment**:
182
- - `@SPEC:ID` (Preparation) – requirements authored with the EARS pattern
183
- - `@TEST:ID` (RED) – failing tests derived from the SPEC
184
- - `@CODE:ID` (GREEN + REFACTOR) – implementation and refactoring
185
- - `@DOC:ID` (Documentation) – live documents that capture the outcome
186
-
187
- ### TAG Block Template
188
-
189
- > **📋 SPEC Metadata Standard (SSOT)**: see `SPEC-METADATA.md`
190
-
191
- **Every SPEC document must include YAML front matter and a HISTORY section**:
192
- - **Required Fields (7)**: id, version, status, created, updated, author, priority
193
- - **Optional Fields (9)**: category, labels, depends_on, blocks, related_specs, related_issue, scope
194
- - **HISTORY Section**: log every version change (mandatory)
195
-
196
- Find the complete template, field descriptions, and validation commands in `SPEC-METADATA.md`.
197
-
198
- **Quick Reference Example**:
199
- ```yaml
200
- ---
201
- id: AUTH-001
202
- version: 0.0.1
203
- status: draft
204
- created: 2025-09-15
205
- updated: 2025-09-15
206
- author: @Goos
207
- priority: high
208
- ---
209
-
210
- # @SPEC:AUTH-001: JWT Authentication System
211
-
212
- ## HISTORY
213
- ### v0.0.1 (2025-09-15)
214
- - **INITIAL**: Authored the JWT authentication system SPEC
215
- ...
216
- ```
217
-
218
- **Source Code (`src/`)**:
219
- ```text
220
- # @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/service.test.ts
221
- ```
222
-
223
- **Test Code (`tests/`)**:
224
- ```text
225
- # @TEST:AUTH-001 | SPEC: SPEC-AUTH-001.md
226
- ```
227
-
228
- ### @CODE Subcategories (Comment Level)
229
-
230
- Document implementation details inside `@CODE:ID` blocks:
231
- - `@CODE:ID:API` – REST APIs, GraphQL endpoints
232
- - `@CODE:ID:UI` – UI components, views, screens
233
- - `@CODE:ID:DATA` – data models, schemas, types
234
- - `@CODE:ID:DOMAIN` – business logic, domain rules
235
- - `@CODE:ID:INFRA` – infrastructure, databases, integrations
236
-
237
- ### TAG Usage Rules
238
-
239
- - **TAG ID Format**: `<DOMAIN>-<3 digits>` (e.g., `AUTH-003`) – immutable once created.
240
- - **Directory Naming**: `.moai/specs/SPEC-{ID}/` (required)
241
- - ✅ Valid: `SPEC-AUTH-001/`, `SPEC-REFACTOR-001/`, `SPEC-UPDATE-REFACTOR-001/`
242
- - ❌ Invalid: `AUTH-001/`, `SPEC-001-auth/`, `SPEC-AUTH-001-jwt/`
243
- - **Composite Domains**: hyphenated combinations allowed (e.g., `UPDATE-REFACTOR-001`)
244
- - **Guideline**: Prefer fewer than three hyphen segments for clarity
245
- - **TAG Contents**: May evolve freely; always record the rationale in HISTORY.
246
- - **Versioning**: Semantic Versioning (v0.0.1 → v0.1.0 → v1.0.0)
247
- - See `SPEC-METADATA.md#versioning` for details.
248
- - **Duplicate Check**: Run `rg "@SPEC:{ID}" -n .moai/specs/` before creating a new TAG.
249
- - **TAG Validation**: `rg '@(SPEC|TEST|CODE|DOC):' -n .moai/specs/ tests/ src/ docs/`
250
- - **Version Alignment**: `rg "SPEC-{ID}.md v" -n`
251
- - **Code-First Principle**: The source of truth for TAGs lives in the codebase.
252
-
253
- ### HISTORY Authoring Guide
254
-
255
- **Change Type Tags**:
256
- - `INITIAL`: First release (v1.0.0)
257
- - `ADDED`: New requirement or capability → increment MINOR
258
- - `CHANGED`: Adjusted behaviour → increment PATCH
259
- - `FIXED`: Bug or defect fix → increment PATCH
260
- - `REMOVED`: Removed capability → increment MAJOR
261
- - `BREAKING`: Backward-incompatible change → increment MAJOR
262
- - `DEPRECATED`: Marked for future removal
263
-
264
- **Required Metadata**:
265
- - `AUTHOR`: Contributor (GitHub ID)
266
- - `REVIEW`: Reviewer and approval status
267
- - `REASON`: Why the change was made (optional but recommended for significant updates)
268
- - `RELATED`: Linked issues/PRs (optional)
269
-
270
- **HISTORY Search Examples**:
271
- ```bash
272
- # View the full change log for a TAG
273
- rg -A 20 "# @SPEC:AUTH-001" .moai/specs/SPEC-AUTH-001.md
274
-
275
- # Extract only the HISTORY section
276
- rg -A 50 "## HISTORY" .moai/specs/SPEC-AUTH-001.md
277
-
278
- # Check the latest entries
279
- rg "### v[0-9]" .moai/specs/SPEC-AUTH-001.md | head -3
280
- ```
281
-
282
- ---
283
-
284
- ## Development Principles
285
-
286
- ### Code Constraints
287
-
288
- - ≤ 300 LOC per file
289
- - ≤ 50 LOC per function
290
- - ≤ 5 parameters per function
291
- - Cyclomatic complexity ≤ 10
292
-
293
- ### Quality Benchmarks
294
-
295
- - ≥ 85% test coverage
296
- - Use intention-revealing names
297
- - Prefer guard clauses
298
- - Leverage language-standard tooling
299
-
300
- ### Refactoring Rules
301
-
302
- - **Rule of Three**: Plan refactoring when the same pattern appears a third time.
303
- - **Preparatory Refactoring**: Shape the code for easy change before applying the change.
304
- - **Tidy as You Go**: Fix small issues immediately; when scope expands, split into a dedicated effort.
305
-
306
- ## Exception Handling
307
-
308
- When deviating from recommendations, document a waiver and attach it to the relevant PR, issue, or ADR.
309
-
310
- **Waiver Checklist**:
311
-
312
- - Justification and evaluated alternatives
313
- - Risks and mitigation plan
314
- - Temporary vs. permanent status
315
- - Expiry conditions and approver
316
-
317
- ## Language Tooling Map
318
-
319
- - **Python**: pytest (tests), mypy (type checks), black (formatting)
320
- - **TypeScript**: Vitest (tests), Biome (lint + format)
321
- - **Java**: JUnit (tests), Maven/Gradle (build)
322
- - **Go**: go test (tests), gofmt (format)
323
- - **Rust**: cargo test (tests), rustfmt (format)
324
- - **Ruby**: RSpec (tests), RuboCop (lint + format), Bundler (packages)
325
-
326
- ## Variable Role Reference
327
-
328
- | Role | Description | Example |
329
- | ------------------ | ---------------------------------- | ------------------------------------ |
330
- | Fixed Value | Constant after initialization | `const MAX_SIZE = 100` |
331
- | Stepper | Changes sequentially | `for (let i = 0; i < n; i++)` |
332
- | Flag | Boolean state indicator | `let isValid = true` |
333
- | Walker | Traverses a data structure | `while (node) { node = node.next; }` |
334
- | Most Recent Holder | Holds the most recent value | `let lastError` |
335
- | Most Wanted Holder | Holds optimal/maximum value | `let bestScore = -Infinity` |
336
- | Gatherer | Accumulator | `sum += value` |
337
- | Container | Stores multiple values | `const list = []` |
338
- | Follower | Previous value of another variable | `prev = curr; curr = next;` |
339
- | Organizer | Reorganizes data | `const sorted = array.sort()` |
340
- | Temporary | Temporary storage | `const temp = a; a = b; b = temp;` |
341
-
342
- ---
343
-
344
- This guide defines the standards for executing the three-stage MoAI-ADK pipeline.