moai-adk 0.4.0__py3-none-any.whl → 0.4.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +2 -3
- moai_adk/cli/commands/init.py +10 -5
- moai_adk/cli/commands/update.py +274 -118
- moai_adk/cli/prompts/init_prompts.py +14 -18
- moai_adk/core/diagnostics/slash_commands.py +1 -1
- moai_adk/core/project/backup_utils.py +2 -11
- moai_adk/core/project/checker.py +2 -2
- moai_adk/core/project/phase_executor.py +11 -14
- moai_adk/core/project/validator.py +3 -2
- moai_adk/core/quality/__init__.py +1 -1
- moai_adk/core/quality/trust_checker.py +63 -63
- moai_adk/core/quality/validators/__init__.py +1 -1
- moai_adk/core/quality/validators/base_validator.py +1 -1
- moai_adk/core/template/backup.py +21 -8
- moai_adk/core/template/merger.py +14 -4
- moai_adk/core/template/processor.py +24 -5
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +446 -424
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
- moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
- moai_adk/templates/.claude/agents/alfred/project-manager.md +216 -128
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
- moai_adk/templates/.claude/commands/alfred/0-project.md +756 -640
- moai_adk/templates/.claude/commands/alfred/1-plan.md +343 -333
- moai_adk/templates/.claude/commands/alfred/2-run.md +297 -285
- moai_adk/templates/.claude/commands/alfred/3-sync.md +387 -356
- moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
- moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
- moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
- moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +27 -27
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +70 -43
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +141 -141
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +179 -165
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +78 -78
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +90 -90
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +39 -25
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +117 -74
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +131 -134
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +43 -11
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +51 -14
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +46 -10
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +62 -25
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +44 -17
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +44 -14
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +45 -13
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +46 -14
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +48 -8
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +44 -12
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
- moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
- moai_adk/templates/.moai/config.json +9 -6
- moai_adk/templates/.moai/memory/development-guide.md +220 -221
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
- moai_adk/templates/.moai/memory/spec-metadata.md +229 -150
- moai_adk/templates/.moai/project/product.md +90 -90
- moai_adk/templates/.moai/project/structure.md +85 -85
- moai_adk/templates/.moai/project/tech.md +117 -117
- moai_adk/templates/CLAUDE.md +564 -709
- moai_adk-0.4.4.dist-info/METADATA +369 -0
- moai_adk-0.4.4.dist-info/RECORD +152 -0
- moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -31
- moai_adk/templates/.claude/commands/alfred/2-build.md +0 -30
- moai_adk/templates/.claude/skills/scripts/standardize_skills.py +0 -166
- moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +0 -43
- moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
- moai_adk-0.4.0.dist-info/METADATA +0 -1816
- moai_adk-0.4.0.dist-info/RECORD +0 -145
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.4.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.4.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -13,149 +13,149 @@ priority: high
|
|
|
13
13
|
## HISTORY
|
|
14
14
|
|
|
15
15
|
### v0.1.3 (2025-10-17)
|
|
16
|
-
- **UPDATED**:
|
|
16
|
+
- **UPDATED**: Template version synced (v0.3.8)
|
|
17
17
|
- **AUTHOR**: @Alfred
|
|
18
|
-
- **SECTIONS**: Mission (
|
|
19
|
-
- implementation-planner, tdd-implementer, quality-gate
|
|
20
|
-
- code-builder
|
|
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
21
|
|
|
22
22
|
### v0.1.2 (2025-10-17)
|
|
23
|
-
- **UPDATED**:
|
|
23
|
+
- **UPDATED**: Agent count adjusted (9 → 11)
|
|
24
24
|
- **AUTHOR**: @Alfred
|
|
25
|
-
- **SECTIONS**: Mission (Alfred SuperAgent
|
|
25
|
+
- **SECTIONS**: Mission (updated Alfred SuperAgent roster)
|
|
26
26
|
|
|
27
27
|
### v0.1.1 (2025-10-17)
|
|
28
|
-
- **UPDATED**:
|
|
28
|
+
- **UPDATED**: Template defaults aligned with the real MoAI-ADK project
|
|
29
29
|
- **AUTHOR**: @Alfred
|
|
30
|
-
- **SECTIONS**: Mission, User, Problem, Strategy, Success
|
|
30
|
+
- **SECTIONS**: Mission, User, Problem, Strategy, Success populated with project context
|
|
31
31
|
|
|
32
32
|
### v0.1.0 (2025-10-01)
|
|
33
|
-
- **INITIAL**:
|
|
33
|
+
- **INITIAL**: Authored the product definition document
|
|
34
34
|
- **AUTHOR**: @project-owner
|
|
35
35
|
- **SECTIONS**: Mission, User, Problem, Strategy, Success, Legacy
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## @DOC:MISSION-001
|
|
39
|
+
## @DOC:MISSION-001 Core Mission
|
|
40
40
|
|
|
41
|
-
> **"SPEC
|
|
41
|
+
> **"No SPEC, no CODE."**
|
|
42
42
|
|
|
43
|
-
{{PROJECT_NAME}}
|
|
43
|
+
{{PROJECT_NAME}} combats Frankenstein code at the root by enforcing a **SPEC-first TDD methodology**.
|
|
44
44
|
|
|
45
|
-
###
|
|
45
|
+
### Core Value Proposition
|
|
46
46
|
|
|
47
|
-
####
|
|
47
|
+
#### Four Key Values
|
|
48
48
|
|
|
49
|
-
1.
|
|
50
|
-
2.
|
|
51
|
-
3.
|
|
52
|
-
4.
|
|
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
53
|
|
|
54
54
|
#### Alfred SuperAgent
|
|
55
55
|
|
|
56
|
-
**Alfred
|
|
57
|
-
- **spec-builder** 🏗️:
|
|
58
|
-
- **implementation-planner** 📋:
|
|
59
|
-
- **tdd-implementer** 🔬:
|
|
60
|
-
- **quality-gate** 🛡️: TRUST
|
|
61
|
-
- **doc-syncer** 📖:
|
|
62
|
-
- **tag-agent** 🏷️: TAG
|
|
63
|
-
- **git-manager** 🚀: Git
|
|
64
|
-
- **debug-helper** 🔍:
|
|
65
|
-
- **trust-checker** ✅: TRUST
|
|
66
|
-
- **cc-manager** 🛠️: Claude Code
|
|
67
|
-
- **project-manager** 📂:
|
|
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
68
|
|
|
69
|
-
## @SPEC:USER-001
|
|
69
|
+
## @SPEC:USER-001 Primary Users
|
|
70
70
|
|
|
71
|
-
###
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
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
75
|
|
|
76
|
-
###
|
|
77
|
-
-
|
|
78
|
-
-
|
|
76
|
+
### Secondary Audience (Optional)
|
|
77
|
+
- **Who**: [Describe any secondary user group]
|
|
78
|
+
- **Needs**: [Capture their requirements]
|
|
79
79
|
|
|
80
|
-
## @SPEC:PROBLEM-001
|
|
80
|
+
## @SPEC:PROBLEM-001 Problems to Solve
|
|
81
81
|
|
|
82
|
-
###
|
|
83
|
-
1. [
|
|
84
|
-
2. [
|
|
85
|
-
3. [
|
|
82
|
+
### High Priority
|
|
83
|
+
1. [Top problem to resolve]
|
|
84
|
+
2. [Second critical problem]
|
|
85
|
+
3. [Third critical problem]
|
|
86
86
|
|
|
87
|
-
###
|
|
88
|
-
- [
|
|
87
|
+
### Medium Priority
|
|
88
|
+
- [Problems with moderate urgency]
|
|
89
89
|
|
|
90
|
-
###
|
|
91
|
-
- [
|
|
90
|
+
### Current Failure Cases
|
|
91
|
+
- [Limitations or failure patterns in existing solutions]
|
|
92
92
|
|
|
93
|
-
## @DOC:STRATEGY-001
|
|
93
|
+
## @DOC:STRATEGY-001 Differentiators & Strengths
|
|
94
94
|
|
|
95
|
-
###
|
|
96
|
-
1. [
|
|
97
|
-
-
|
|
95
|
+
### Strengths Versus Alternatives
|
|
96
|
+
1. [Primary differentiator]
|
|
97
|
+
- **When it matters**: [Scenario where the strength shines]
|
|
98
98
|
|
|
99
|
-
2. [
|
|
100
|
-
-
|
|
99
|
+
2. [Second differentiator]
|
|
100
|
+
- **When it matters**: [Concrete usage example]
|
|
101
101
|
|
|
102
|
-
## @SPEC:SUCCESS-001
|
|
102
|
+
## @SPEC:SUCCESS-001 Success Metrics
|
|
103
103
|
|
|
104
|
-
###
|
|
105
|
-
1. [
|
|
106
|
-
-
|
|
104
|
+
### Immediately Measurable KPIs
|
|
105
|
+
1. [Metric 1]
|
|
106
|
+
- **Baseline**: [Target value and measurement approach]
|
|
107
107
|
|
|
108
|
-
2. [
|
|
109
|
-
-
|
|
108
|
+
2. [Metric 2]
|
|
109
|
+
- **Baseline**: [Target value and measurement approach]
|
|
110
110
|
|
|
111
|
-
###
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
111
|
+
### Measurement Cadence
|
|
112
|
+
- **Daily**: [Metrics tracked daily]
|
|
113
|
+
- **Weekly**: [Metrics tracked weekly]
|
|
114
|
+
- **Monthly**: [Metrics tracked monthly]
|
|
115
115
|
|
|
116
116
|
## Legacy Context
|
|
117
117
|
|
|
118
|
-
###
|
|
119
|
-
- [
|
|
120
|
-
- [
|
|
118
|
+
### Existing Assets
|
|
119
|
+
- [Reusable assets or resources]
|
|
120
|
+
- [Relevant past projects or experience]
|
|
121
121
|
|
|
122
|
-
## TODO:SPEC-BACKLOG-001
|
|
122
|
+
## TODO:SPEC-BACKLOG-001 Next SPEC Candidates
|
|
123
123
|
|
|
124
|
-
1. **SPEC-001**: [
|
|
125
|
-
2. **SPEC-002**: [
|
|
126
|
-
3. **SPEC-003**: [
|
|
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
127
|
|
|
128
|
-
## EARS
|
|
128
|
+
## EARS Requirement Authoring Guide
|
|
129
129
|
|
|
130
130
|
### EARS (Easy Approach to Requirements Syntax)
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
Use these EARS patterns to keep SPEC requirements structured:
|
|
133
133
|
|
|
134
|
-
#### EARS
|
|
135
|
-
1. **Ubiquitous Requirements**:
|
|
136
|
-
2. **Event-driven Requirements**: WHEN [
|
|
137
|
-
3. **State-driven Requirements**: WHILE [
|
|
138
|
-
4. **Optional Features**: WHERE [
|
|
139
|
-
5. **Constraints**: IF [
|
|
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
140
|
|
|
141
|
-
####
|
|
141
|
+
#### Sample Application
|
|
142
142
|
```markdown
|
|
143
|
-
### Ubiquitous Requirements (
|
|
144
|
-
-
|
|
143
|
+
### Ubiquitous Requirements (Foundational)
|
|
144
|
+
- The system shall provide user management capabilities.
|
|
145
145
|
|
|
146
|
-
### Event-driven Requirements
|
|
147
|
-
- WHEN
|
|
146
|
+
### Event-driven Requirements
|
|
147
|
+
- WHEN a user signs up, the system shall send a welcome email.
|
|
148
148
|
|
|
149
|
-
### State-driven Requirements
|
|
150
|
-
- WHILE
|
|
149
|
+
### State-driven Requirements
|
|
150
|
+
- WHILE a user remains logged in, the system shall display a personalized dashboard.
|
|
151
151
|
|
|
152
|
-
### Optional Features
|
|
153
|
-
- WHERE
|
|
152
|
+
### Optional Features
|
|
153
|
+
- WHERE an account is premium, the system may offer advanced features.
|
|
154
154
|
|
|
155
|
-
### Constraints
|
|
156
|
-
- IF
|
|
155
|
+
### Constraints
|
|
156
|
+
- IF an account is locked, the system shall reject login attempts.
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
---
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
_This document serves as the baseline when `/alfred:1-plan` runs._
|
|
@@ -13,144 +13,144 @@ priority: medium
|
|
|
13
13
|
## HISTORY
|
|
14
14
|
|
|
15
15
|
### v0.1.1 (2025-10-17)
|
|
16
|
-
- **UPDATED**:
|
|
16
|
+
- **UPDATED**: Template version synced (v0.3.8)
|
|
17
17
|
- **AUTHOR**: @Alfred
|
|
18
|
-
- **SECTIONS**:
|
|
18
|
+
- **SECTIONS**: Metadata standardization (single `author` field, added `priority`)
|
|
19
19
|
|
|
20
20
|
### v0.1.0 (2025-10-01)
|
|
21
|
-
- **INITIAL**:
|
|
21
|
+
- **INITIAL**: Authored the structure design document
|
|
22
22
|
- **AUTHOR**: @architect
|
|
23
23
|
- **SECTIONS**: Architecture, Modules, Integration, Traceability
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
## @DOC:ARCHITECTURE-001
|
|
27
|
+
## @DOC:ARCHITECTURE-001 System Architecture
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### Architectural Strategy
|
|
30
30
|
|
|
31
|
-
**[
|
|
31
|
+
**[Describe the end-to-end architectural approach for the project]**
|
|
32
32
|
|
|
33
33
|
```
|
|
34
34
|
Project Architecture
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
**Rationale**: [Explain the trade-offs behind the chosen architecture]
|
|
42
42
|
|
|
43
|
-
## @DOC:MODULES-001
|
|
43
|
+
## @DOC:MODULES-001 Module Responsibilities
|
|
44
44
|
|
|
45
|
-
### 1. [
|
|
45
|
+
### 1. [Primary Module 1]
|
|
46
46
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
47
|
+
- **Responsibilities**: [Key duties of the module]
|
|
48
|
+
- **Inputs**: [Data it consumes]
|
|
49
|
+
- **Processing**: [Core processing steps]
|
|
50
|
+
- **Outputs**: [Produced artifacts]
|
|
51
51
|
|
|
52
|
-
|
|
|
53
|
-
|
|
54
|
-
| [
|
|
55
|
-
| [
|
|
52
|
+
| Component | Role | Key Capabilities |
|
|
53
|
+
| ------------- | ------ | ---------------- |
|
|
54
|
+
| [Component 1] | [Role] | [Feature list] |
|
|
55
|
+
| [Component 2] | [Role] | [Feature list] |
|
|
56
56
|
|
|
57
|
-
### 2. [
|
|
57
|
+
### 2. [Primary Module 2]
|
|
58
58
|
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
59
|
+
- **Responsibilities**: [Key duties of the module]
|
|
60
|
+
- **Inputs**: [Data it consumes]
|
|
61
|
+
- **Processing**: [Core processing steps]
|
|
62
|
+
- **Outputs**: [Produced artifacts]
|
|
63
63
|
|
|
64
|
-
## @DOC:INTEGRATION-001
|
|
64
|
+
## @DOC:INTEGRATION-001 External Integrations
|
|
65
65
|
|
|
66
|
-
### [
|
|
66
|
+
### [External System 1] Integration
|
|
67
67
|
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
68
|
+
- **Authentication**: [Method used]
|
|
69
|
+
- **Data Exchange**: [Formats and protocols]
|
|
70
|
+
- **Failure Handling**: [Fallback strategy]
|
|
71
|
+
- **Risk Level**: [Risk profile and mitigation]
|
|
72
72
|
|
|
73
|
-
### [
|
|
73
|
+
### [External System 2] Integration
|
|
74
74
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
75
|
+
- **Purpose**: [Why it is used]
|
|
76
|
+
- **Dependency Level**: [Degree of reliance and alternatives]
|
|
77
|
+
- **Performance Requirements**: [Latency, throughput, etc.]
|
|
78
78
|
|
|
79
|
-
## @DOC:TRACEABILITY-001
|
|
79
|
+
## @DOC:TRACEABILITY-001 Traceability Strategy
|
|
80
80
|
|
|
81
|
-
### TAG
|
|
81
|
+
### Applying the TAG Framework
|
|
82
82
|
|
|
83
|
-
**TDD
|
|
84
|
-
- `@SPEC:ID` (
|
|
83
|
+
**Full TDD Alignment**: SPEC → Tests → Implementation → Documentation
|
|
84
|
+
- `@SPEC:ID` (`.moai/specs/`) → `@TEST:ID` (`tests/`) → `@CODE:ID` (`src/`) → `@DOC:ID` (`docs/`)
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
- `@CODE:ID:API`
|
|
88
|
-
- `@CODE:ID:UI`
|
|
89
|
-
- `@CODE:ID:DATA`
|
|
90
|
-
- `@CODE:ID:DOMAIN`
|
|
91
|
-
- `@CODE:ID:INFRA`
|
|
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
92
|
|
|
93
|
-
### TAG
|
|
93
|
+
### Managing TAG Traceability (Code-Scan Approach)
|
|
94
94
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
- **
|
|
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
99
|
|
|
100
100
|
## Legacy Context
|
|
101
101
|
|
|
102
|
-
###
|
|
102
|
+
### Current System Snapshot
|
|
103
103
|
|
|
104
|
-
**[
|
|
104
|
+
**[Describe the existing system or assets]**
|
|
105
105
|
|
|
106
106
|
```
|
|
107
|
-
|
|
108
|
-
├── [
|
|
109
|
-
├── [
|
|
110
|
-
└── [
|
|
107
|
+
Current System/
|
|
108
|
+
├── [Component 1]/ # [Current state]
|
|
109
|
+
├── [Component 2]/ # [Current state]
|
|
110
|
+
└── [Component 3]/ # [Current state]
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
###
|
|
113
|
+
### Migration Considerations
|
|
114
114
|
|
|
115
|
-
1. **[
|
|
116
|
-
2. **[
|
|
117
|
-
3. **[
|
|
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
118
|
|
|
119
|
-
## TODO:STRUCTURE-001
|
|
119
|
+
## TODO:STRUCTURE-001 Structural Improvements
|
|
120
120
|
|
|
121
|
-
1.
|
|
122
|
-
2.
|
|
123
|
-
3.
|
|
121
|
+
1. **Define module interfaces** – [Plan details]
|
|
122
|
+
2. **Dependency management strategy** – [Plan details]
|
|
123
|
+
3. **Scalability roadmap** – [Plan details]
|
|
124
124
|
|
|
125
|
-
## EARS
|
|
125
|
+
## EARS for Architectural Requirements
|
|
126
126
|
|
|
127
|
-
###
|
|
127
|
+
### Applying EARS to Architecture
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
Use EARS patterns to write clear architectural requirements:
|
|
130
130
|
|
|
131
|
-
####
|
|
131
|
+
#### Architectural EARS Example
|
|
132
132
|
```markdown
|
|
133
|
-
### Ubiquitous Requirements (
|
|
134
|
-
-
|
|
135
|
-
-
|
|
133
|
+
### Ubiquitous Requirements (Baseline Architecture)
|
|
134
|
+
- The system shall adopt a layered architecture.
|
|
135
|
+
- The system shall maintain loose coupling across modules.
|
|
136
136
|
|
|
137
|
-
### Event-driven Requirements
|
|
138
|
-
- WHEN
|
|
139
|
-
- WHEN
|
|
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
140
|
|
|
141
|
-
### State-driven Requirements
|
|
142
|
-
- WHILE
|
|
143
|
-
- WHILE
|
|
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
144
|
|
|
145
|
-
### Optional Features
|
|
146
|
-
- WHERE
|
|
147
|
-
- WHERE
|
|
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
148
|
|
|
149
|
-
### Constraints
|
|
150
|
-
- IF
|
|
151
|
-
-
|
|
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
152
|
```
|
|
153
153
|
|
|
154
154
|
---
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
_This structure informs the TDD implementation when `/alfred:2-run` runs._
|