moai-adk 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +1 -8
- 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 +1 -0
- moai_adk/core/project/phase_executor.py +3 -1
- moai_adk/core/project/validator.py +3 -2
- moai_adk/core/template/backup.py +11 -3
- moai_adk/core/template/merger.py +16 -3
- moai_adk/core/template/processor.py +22 -3
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +443 -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 +205 -125
- 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 +673 -640
- moai_adk/templates/.claude/commands/alfred/1-plan.md +342 -333
- moai_adk/templates/.claude/commands/alfred/2-run.md +295 -285
- moai_adk/templates/.claude/commands/alfred/3-sync.md +366 -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 +149 -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 +350 -722
- moai_adk-0.4.1.dist-info/METADATA +303 -0
- moai_adk-0.4.1.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.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alfred:1-plan
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "
|
|
3
|
+
description: Planning (brainstorming, plan writing, design discussion) + Branch/PR creation
|
|
4
|
+
argument-hint: "Title 1 Title 2 ... | SPEC-ID modifications"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -16,317 +16,326 @@ allowed-tools:
|
|
|
16
16
|
- Bash(mkdir:*)
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
# 🏗️ MoAI-ADK 1
|
|
19
|
+
# 🏗️ MoAI-ADK Step 1: Establish a plan (Plan) - Always make a plan first and then proceed.
|
|
20
|
+
> Interactive prompts rely on `Skill("moai-alfred-tui-survey")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
|
|
20
21
|
|
|
21
|
-
## 🎯
|
|
22
|
+
## 🎯 Command Purpose
|
|
22
23
|
|
|
23
|
-
**"
|
|
24
|
+
**"Plan → Run → Sync"** As the first step in the workflow, it supports the entire planning process from ideation to plan creation.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
**Plan for**: $ARGUMENTS
|
|
26
27
|
|
|
27
|
-
## 💡
|
|
28
|
+
## 💡 Planning philosophy: “Always make a plan first and then proceed.”
|
|
28
29
|
|
|
29
|
-
`/alfred:1-plan
|
|
30
|
+
`/alfred:1-plan` is a general-purpose command that **creates a plan**, rather than simply “creating” a SPEC document.
|
|
30
31
|
|
|
31
|
-
### 3
|
|
32
|
+
### 3 main scenarios
|
|
32
33
|
|
|
33
|
-
####
|
|
34
|
+
#### Scenario 1: Creating a Plan (Primary Method) ⭐
|
|
34
35
|
```bash
|
|
35
|
-
/alfred:1-plan "
|
|
36
|
-
→
|
|
37
|
-
→
|
|
38
|
-
→ feature/SPEC-XXX
|
|
39
|
-
→ Draft PR
|
|
36
|
+
/alfred:1-plan "User authentication function"
|
|
37
|
+
→ Refine idea
|
|
38
|
+
→ Requirements specification using EARS syntax
|
|
39
|
+
→ Create feature/SPEC-XXX branch
|
|
40
|
+
→ Create Draft PR
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
####
|
|
43
|
+
#### Scenario 2: Brainstorming
|
|
43
44
|
```bash
|
|
44
|
-
/alfred:1-plan "
|
|
45
|
-
→
|
|
46
|
-
→
|
|
47
|
-
→
|
|
45
|
+
/alfred:1-plan "Payment system improvement idea"
|
|
46
|
+
→ Organizing and structuring ideas
|
|
47
|
+
→ Deriving requirements candidates
|
|
48
|
+
→ Technical review and risk analysis
|
|
48
49
|
```
|
|
49
50
|
|
|
50
|
-
####
|
|
51
|
+
#### Scenario 3: Improve existing SPEC
|
|
51
52
|
```bash
|
|
52
|
-
/alfred:1-plan "SPEC-AUTH-001
|
|
53
|
-
→
|
|
54
|
-
→
|
|
55
|
-
→
|
|
53
|
+
/alfred:1-plan "SPEC-AUTH-001 Security Enhancement"
|
|
54
|
+
→ Analyze existing plan
|
|
55
|
+
→ Establish improvement direction
|
|
56
|
+
→ Create new version plan
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
>
|
|
59
|
+
> **Standard two-step workflow** (see `CLAUDE.md` - "Alfred Command Execution Pattern" for details)
|
|
59
60
|
|
|
60
|
-
## 📋
|
|
61
|
+
## 📋 Execution flow
|
|
61
62
|
|
|
62
|
-
1.
|
|
63
|
-
2. **SPEC
|
|
64
|
-
3.
|
|
65
|
-
4.
|
|
66
|
-
5. **Git
|
|
63
|
+
1. **Project Analysis**: In-depth analysis of product/structure/tech.md
|
|
64
|
+
2. **SPEC candidate discovery**: Prioritization based on business requirements
|
|
65
|
+
3. **User Verification**: Review and approve writing plan
|
|
66
|
+
4. **Plan creation**: Generate specifications of EARS structure (spec.md, plan.md, acceptance.md)
|
|
67
|
+
5. **Git operations**: Create branches/PRs via git-manager
|
|
67
68
|
|
|
68
|
-
##
|
|
69
|
+
## 🧠 Skill Loadout Overview
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
| Agent | Auto core skill | Conditional skills |
|
|
72
|
+
| ----- | ---------------- | ------------------ |
|
|
73
|
+
| implementation-planner | Skill("moai-alfred-language-detection") | Skill("moai-foundation-langs"), Skill("moai-alfred-performance-optimizer"), Skill("moai-alfred-tag-scanning"), Detected domain skill (e.g., Skill("moai-domain-backend")), Skill("moai-alfred-trust-validation"), Skill("moai-alfred-tui-survey") |
|
|
74
|
+
| spec-builder | Skill("moai-foundation-ears") | Skill("moai-alfred-ears-authoring"), Skill("moai-foundation-specs"), Skill("moai-alfred-spec-metadata-validation"), Skill("moai-alfred-tag-scanning"), Skill("moai-foundation-trust"), Skill("moai-alfred-trust-validation"), Skill("moai-alfred-tui-survey") |
|
|
75
|
+
| git-manager | Skill("moai-alfred-git-workflow") | Skill("moai-foundation-git"), Skill("moai-alfred-trust-validation"), Skill("moai-alfred-tag-scanning"), Skill("moai-alfred-tui-survey") |
|
|
72
76
|
|
|
73
|
-
##
|
|
77
|
+
## 🔗 Associated Agent
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
- `/alfred:1-plan "JWT 인증 시스템"` - 단일 SPEC 수동 생성
|
|
78
|
-
- `/alfred:1-plan SPEC-001 "보안 보강"` - 기존 SPEC 보완
|
|
79
|
+
- **Primary**: spec-builder (🏗️ System Architect) - Dedicated to writing SPEC documents
|
|
80
|
+
- **Secondary**: git-manager (🚀 Release Engineer) - Dedicated to creating Git branches/PRs
|
|
79
81
|
|
|
80
|
-
##
|
|
82
|
+
## 💡 Example of use
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
Users can run commands like this:
|
|
85
|
+
- `/alfred:1-plan` - Auto-suggestion based on project documents
|
|
86
|
+
- `/alfred:1-plan "JWT authentication system"` - Manually create a single SPEC
|
|
87
|
+
- `/alfred:1-plan SPEC-001 "Security hardening"` - Supplementation of existing SPEC
|
|
83
88
|
|
|
84
|
-
|
|
89
|
+
## 🔍 STEP 1: Project analysis and planning
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
Analyze project documents to propose SPEC candidates, establish implementation strategies, and receive user confirmation.
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
**The spec-builder agent automatically loads and analyzes the required documents.**
|
|
94
|
+
|
|
95
|
+
### 🔍 Explore the codebase (optional)
|
|
96
|
+
|
|
97
|
+
**If the user request is unclear or requires understanding of existing code** Use the Explore agent first:
|
|
89
98
|
|
|
90
99
|
```
|
|
91
|
-
Task tool
|
|
100
|
+
Invoking the Task tool (Explore agent):
|
|
92
101
|
- subagent_type: "Explore"
|
|
93
|
-
- description: "
|
|
94
|
-
- prompt: "
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
thoroughness
|
|
102
|
+
- description: "Explore related files in the codebase"
|
|
103
|
+
- prompt: "Please find all files related to the following keywords: $ARGUMENTS
|
|
104
|
+
- File location (src/, tests/, docs/)
|
|
105
|
+
- Relevant SPEC document (.moai/specs/)
|
|
106
|
+
- Existing implementation code
|
|
107
|
+
thoroughness level: medium"
|
|
99
108
|
```
|
|
100
109
|
|
|
101
|
-
**
|
|
102
|
-
- ✅
|
|
103
|
-
- ✅
|
|
104
|
-
- ✅
|
|
105
|
-
- ❌
|
|
110
|
+
**Criteria for using the Explore Agent**:
|
|
111
|
+
- ✅ Users use keywords like “where am”, “find me”, etc.
|
|
112
|
+
- ✅ Need to understand existing code structure
|
|
113
|
+
- ✅ Investigate features across multiple files
|
|
114
|
+
- ❌ Given a clear SPEC title (straight into spec-builder)
|
|
106
115
|
|
|
107
|
-
### ⚙️
|
|
116
|
+
### ⚙️ How to call an agent
|
|
108
117
|
|
|
109
|
-
**STEP 1
|
|
118
|
+
**STEP 1 calls the spec-builder agent using the Task tool**:
|
|
110
119
|
|
|
111
120
|
```
|
|
112
|
-
Task tool
|
|
121
|
+
Call the Task tool:
|
|
113
122
|
- subagent_type: "spec-builder"
|
|
114
|
-
- description: "
|
|
115
|
-
- prompt: "
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
- description: "Analyze the plan and establish a plan"
|
|
124
|
+
- prompt: "Please analyze the project document and suggest SPEC candidates.
|
|
125
|
+
Run in analysis mode, and must include the following:
|
|
126
|
+
1. In-depth analysis of product/structure/tech.md
|
|
127
|
+
2. Identify SPEC candidates and Determine priorities
|
|
128
|
+
3. Design EARS structure
|
|
129
|
+
4. Wait for user approval
|
|
130
|
+
User input: $ARGUMENTS
|
|
131
|
+
(Optional) Explore results: $EXPLORE_RESULTS"
|
|
123
132
|
```
|
|
124
133
|
|
|
125
|
-
###
|
|
134
|
+
### Plan analysis progress
|
|
126
135
|
|
|
127
|
-
1.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
136
|
+
1. **Project document analysis**
|
|
137
|
+
- In-depth analysis of product/structure/tech.md
|
|
138
|
+
- Review existing SPEC list and priorities (.moai/specs/ scan)
|
|
139
|
+
- Evaluate implementation feasibility and complexity
|
|
140
|
+
- (Optional) Identify existing code structure by reflecting the Explore results
|
|
132
141
|
|
|
133
|
-
2. **SPEC
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
142
|
+
2. **Discovering SPEC candidates**
|
|
143
|
+
- Extracting core business requirements
|
|
144
|
+
- Reflecting technical constraints
|
|
145
|
+
- Creating a list of SPEC candidates by priority
|
|
137
146
|
|
|
138
|
-
3.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
147
|
+
3. **Implementation plan report**
|
|
148
|
+
- Present step-by-step plan creation plan
|
|
149
|
+
- Estimated scope of work and dependency analysis
|
|
150
|
+
- Design EARS structure and Acceptance Criteria
|
|
142
151
|
|
|
143
|
-
###
|
|
152
|
+
### User verification steps
|
|
144
153
|
|
|
145
|
-
|
|
146
|
-
- **"
|
|
147
|
-
- **"
|
|
148
|
-
- **"
|
|
154
|
+
After reviewing your implementation plan, Alfred invokes `Skill("moai-alfred-tui-survey")` to present the following options:
|
|
155
|
+
- **"Go"** or **"Start"**: Start writing the plan as planned
|
|
156
|
+
- **"Modify [Content]"**: Request modifications to the plan
|
|
157
|
+
- **"Stop"**: Stop writing the plan
|
|
149
158
|
|
|
150
159
|
---
|
|
151
160
|
|
|
152
|
-
## 🚀 STEP 2:
|
|
161
|
+
## 🚀 STEP 2: Create plan document (after user approval)
|
|
153
162
|
|
|
154
|
-
|
|
163
|
+
After user approval (collected via `Skill("moai-alfred-tui-survey")`), call the spec-builder and git-manager agents using the **Task tool**.
|
|
155
164
|
|
|
156
|
-
### ⚙️
|
|
165
|
+
### ⚙️ How to call an agent
|
|
157
166
|
|
|
158
167
|
```
|
|
159
|
-
1. spec-builder
|
|
168
|
+
1. Call spec-builder (create plan):
|
|
160
169
|
- subagent_type: "spec-builder"
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
- description: "Create SPEC document"
|
|
171
|
+
- prompt: "Please fill out the SPEC document according to the plan approved in STEP 1.
|
|
172
|
+
Create a specification for the EARS structure."
|
|
164
173
|
|
|
165
|
-
2. git-manager
|
|
174
|
+
2. Invoke git-manager (Git task):
|
|
166
175
|
- subagent_type: "git-manager"
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
- description: "Create Git branch/PR"
|
|
177
|
+
- prompt: "After completing the plan, please create a branch and Draft PR."
|
|
169
178
|
```
|
|
170
179
|
|
|
171
|
-
##
|
|
180
|
+
## function
|
|
172
181
|
|
|
173
|
-
-
|
|
174
|
-
- **Personal
|
|
175
|
-
- **Team
|
|
182
|
+
- **Project document analysis**: Analyzes `.moai/project/{product,structure,tech}.md` to suggest implementation candidates and generates SPEC after user approval.
|
|
183
|
+
- **Personal mode**: Create a `.moai/specs/SPEC-{ID}/` directory and a template document (**Directory name format required**: `SPEC-` prefix + TAG ID).
|
|
184
|
+
- **Team mode**: Create a GitHub Issue (or Discussion) Associate it with a branch template.
|
|
176
185
|
|
|
177
|
-
##
|
|
186
|
+
## How to use
|
|
178
187
|
|
|
179
|
-
|
|
180
|
-
- `/alfred:1-plan` -
|
|
181
|
-
- `/alfred:1-plan "JWT
|
|
182
|
-
- `/alfred:1-plan SPEC-001 "
|
|
188
|
+
The user executes the command in the form:
|
|
189
|
+
- `/alfred:1-plan` - Auto-suggestion based on project documents (recommended)
|
|
190
|
+
- `/alfred:1-plan "JWT Authentication System"` - Manually create a single SPEC
|
|
191
|
+
- `/alfred:1-plan SPEC-001 "Security Reinforcement"` - Supplementation of existing SPEC
|
|
183
192
|
|
|
184
|
-
|
|
193
|
+
If not entered, 3 to 5 priorities will be suggested based on the Q&A results, and only the approved items will be confirmed as actual SPECs.
|
|
185
194
|
|
|
186
|
-
##
|
|
195
|
+
## Summary of processing by mode
|
|
187
196
|
|
|
188
|
-
|
|
|
189
|
-
| -------- |
|
|
190
|
-
| Personal | `.moai/specs/SPEC-XXX/spec.md`, `plan.md`, `acceptance.md
|
|
191
|
-
| Team | GitHub Issue(`[SPEC-XXX]
|
|
197
|
+
| mode | output | Branch Strategy | Additional Actions |
|
|
198
|
+
| -------- | -------------------------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
|
199
|
+
| Personal | Templates `.moai/specs/SPEC-XXX/spec.md`, `plan.md`, `acceptance.md`, etc. | Branch from `main` or `develop` (based on settings) | git-manager agent automatically creates checkpoints |
|
|
200
|
+
| Team | GitHub Issue (`[SPEC-XXX] Title`), Draft PR (optional) | **Always branch from `develop`** (GitFlow standard) | `gh` CLI stay logged in, Draft PR → develop created |
|
|
192
201
|
|
|
193
|
-
##
|
|
202
|
+
## Input options
|
|
194
203
|
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
204
|
+
- **Automatic suggestion**: `/alfred:1-plan` → Create a list of candidates based on the core bullet of the project document
|
|
205
|
+
- **Manual creation**: Pass the title as an argument → Create only 1 case, Acceptance template is supplemented after reply
|
|
206
|
+
- **Supplementation mode**: `SPEC-ID Delivered in “memo” format → Update existing SPEC document/Issue
|
|
198
207
|
|
|
199
|
-
## 📋 STEP 1
|
|
208
|
+
## 📋 STEP 1 Execution Guide: Project Analysis and Planning
|
|
200
209
|
|
|
201
|
-
### ⚠️
|
|
210
|
+
### ⚠️ Essential rules: Directory naming convention
|
|
202
211
|
|
|
203
|
-
|
|
212
|
+
**Format that must be followed**: `.moai/specs/SPEC-{ID}/`
|
|
204
213
|
|
|
205
|
-
|
|
214
|
+
**Correct Example**:
|
|
206
215
|
- ✅ `SPEC-AUTH-001/`
|
|
207
216
|
- ✅ `SPEC-REFACTOR-001/`
|
|
208
217
|
- ✅ `SPEC-UPDATE-REFACTOR-001/`
|
|
209
218
|
|
|
210
|
-
|
|
211
|
-
- ❌ `AUTH-001/` (SPEC-
|
|
212
|
-
- ❌ `SPEC-001-auth/` (
|
|
213
|
-
- ❌ `SPEC-AUTH-001-jwt/` (
|
|
219
|
+
**Incorrect example**:
|
|
220
|
+
- ❌ `AUTH-001/` (missing SPEC- prefix)
|
|
221
|
+
- ❌ `SPEC-001-auth/` (additional text after ID)
|
|
222
|
+
- ❌ `SPEC-AUTH-001-jwt/` (additional text after ID)
|
|
214
223
|
|
|
215
|
-
|
|
224
|
+
**Duplicate check required**: Before creating a new SPEC ID, be sure to search the existing TAG ID to prevent duplication.
|
|
216
225
|
|
|
217
|
-
|
|
218
|
-
- ✅
|
|
219
|
-
- ⚠️
|
|
226
|
+
**Composite Domain Rules**:
|
|
227
|
+
- ✅ Allow: `UPDATE-REFACTOR-001` (2 domains)
|
|
228
|
+
- ⚠️ Caution: `UPDATE-REFACTOR-FIX-001` (3+ domains, simplification recommended)
|
|
220
229
|
|
|
221
230
|
---
|
|
222
231
|
|
|
223
|
-
### 1.
|
|
232
|
+
### 1. Analysis of project documents
|
|
224
233
|
|
|
225
|
-
Alfred
|
|
234
|
+
Alfred calls the spec-builder agent to perform project document-based planning analysis and planning.
|
|
226
235
|
|
|
227
|
-
####
|
|
236
|
+
#### Analysis Checklist
|
|
228
237
|
|
|
229
|
-
- [ ]
|
|
230
|
-
- [ ]
|
|
231
|
-
- [ ]
|
|
232
|
-
- [ ]
|
|
238
|
+
- [ ] **Requirements extraction**: Identify key business requirements in product.md
|
|
239
|
+
- [ ] **Architectural constraints**: Identify system design constraints in structure.md
|
|
240
|
+
- [ ] **Technical constraints**: Technology stack and quality policy in tech.md
|
|
241
|
+
- [ ] **Existing SPEC**: Review current SPEC list and priorities
|
|
233
242
|
|
|
234
|
-
### 2. SPEC
|
|
243
|
+
### 2. SPEC candidate discovery strategy
|
|
235
244
|
|
|
236
|
-
####
|
|
245
|
+
#### Prioritization criteria
|
|
237
246
|
|
|
238
|
-
|
|
|
239
|
-
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
|
|
|
247
|
+
| Priority | standards | SPEC Candidate Type |
|
|
248
|
+
| ---------- | --------------------------- | ------------------------------------------- |
|
|
249
|
+
| **High** | Core Business Values | User core functions, API design |
|
|
250
|
+
| **Medium** | System Stability | Authentication/Security, Data Management |
|
|
251
|
+
| **Low** | Improvements and expansions | UI/UX improvement, performance optimization |
|
|
243
252
|
|
|
244
|
-
#### SPEC
|
|
253
|
+
#### Approach by SPEC type
|
|
245
254
|
|
|
246
|
-
- **API
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
255
|
+
- **API/Backend**: Endpoint design, data model, authentication
|
|
256
|
+
- **Frontend**: User interface, state management, routing
|
|
257
|
+
- **Infrastructure**: Deployment, monitoring, security policy
|
|
258
|
+
- **Quality**: Test strategy, performance criteria, documentation
|
|
250
259
|
|
|
251
|
-
### 3.
|
|
260
|
+
### 3. Create a plan Create a plan report
|
|
252
261
|
|
|
253
|
-
|
|
262
|
+
Present your plan in the following format:
|
|
254
263
|
|
|
255
264
|
```
|
|
256
|
-
##
|
|
257
|
-
|
|
258
|
-
### 📊
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
|
|
263
|
-
### 🎯
|
|
264
|
-
-
|
|
265
|
-
- **EARS
|
|
266
|
-
- **Acceptance Criteria**: [Given-When-Then
|
|
267
|
-
|
|
268
|
-
### 📦
|
|
269
|
-
|
|
270
|
-
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
|
|
275
|
-
### ⚠️
|
|
276
|
-
-
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
|
|
280
|
-
### ✅
|
|
281
|
-
- **spec.md**: [
|
|
282
|
-
- **plan.md**: [
|
|
283
|
-
- **acceptance.md**: [
|
|
284
|
-
-
|
|
265
|
+
## Plan Creation Plan Report: [TARGET]
|
|
266
|
+
|
|
267
|
+
### 📊 Analysis Results
|
|
268
|
+
- **Discovered SPEC Candidates**: [Number and Category]
|
|
269
|
+
- **High Priority**: [List of Core SPECs]
|
|
270
|
+
- **Estimated Work Time**: [Time Estimation]
|
|
271
|
+
|
|
272
|
+
### 🎯 Writing Strategy
|
|
273
|
+
- **Selected SPEC**: [SPEC ID and Title to Write]
|
|
274
|
+
- **EARS Structure**: [Event-Action-Response-State Design]
|
|
275
|
+
- **Acceptance Criteria**: [Given-When-Then Scenario]
|
|
276
|
+
|
|
277
|
+
### 📦 Technology stack and library versions (optional)
|
|
278
|
+
**Included only if technology stack is determined during planning stage**:
|
|
279
|
+
- **Web search**: Use `WebSearch` to find the latest stable versions of key libraries to use
|
|
280
|
+
- **Specify versions**: Specify exact versions for each library, e.g. `fastapi>=0.118.3`)
|
|
281
|
+
- **Stability priority**: Exclude beta/alpha versions, select only production stable versions
|
|
282
|
+
- **Note**: Detailed version is finalized in `/alfred:2-run` stage
|
|
283
|
+
|
|
284
|
+
### ⚠️ Precautions
|
|
285
|
+
- **Technical constraints**: [Restraints to consider]
|
|
286
|
+
- **Dependency**: [Relevance with other SPECs]
|
|
287
|
+
- **Branch strategy**: [Processing by Personal/Team mode]
|
|
288
|
+
|
|
289
|
+
### ✅ Expected deliverables
|
|
290
|
+
- **spec.md**: [Core specifications of the EARS structure]
|
|
291
|
+
- **plan.md**: [Implementation plan]
|
|
292
|
+
- **acceptance.md**: [Acceptance criteria]
|
|
293
|
+
- **Branches/PR**: [Git operations by mode]
|
|
285
294
|
|
|
286
295
|
---
|
|
287
|
-
|
|
288
|
-
(
|
|
296
|
+
**Approval Request**: Would you like to proceed with creating a plan with the above plan?
|
|
297
|
+
(Choose between “Proceed,” “Modify [Content],” or “Abort”)
|
|
289
298
|
```
|
|
290
299
|
|
|
291
300
|
---
|
|
292
301
|
|
|
293
|
-
## 🚀 STEP 2
|
|
302
|
+
## 🚀 STEP 2 Implementation Guide: Create a Plan (After Approval)
|
|
294
303
|
|
|
295
|
-
|
|
304
|
+
Only if the user selects **"Proceed"** or **"Start"** will Alfred call the spec-builder agent to begin building the SPEC document.
|
|
296
305
|
|
|
297
|
-
### EARS
|
|
306
|
+
### EARS specification writing guide
|
|
298
307
|
|
|
299
|
-
1. **Event**:
|
|
300
|
-
2. **Action**:
|
|
301
|
-
3. **Response**:
|
|
302
|
-
4. **State**:
|
|
308
|
+
1. **Event**: Define trigger events that occur in the system
|
|
309
|
+
2. **Action**: Specification of the system's action for an event
|
|
310
|
+
3. **Response**: Defining a response as a result of an action
|
|
311
|
+
4. **State**: Specifies system state changes and side effects
|
|
303
312
|
|
|
304
|
-
|
|
313
|
+
**Example** (see `development-guide.md` for details):
|
|
305
314
|
```markdown
|
|
306
|
-
### Ubiquitous Requirements
|
|
307
|
-
-
|
|
315
|
+
### Ubiquitous Requirements
|
|
316
|
+
- The system must provide user authentication functionality
|
|
308
317
|
|
|
309
|
-
### Event-driven Requirements
|
|
310
|
-
- WHEN
|
|
318
|
+
### Event-driven Requirements
|
|
319
|
+
- WHEN the user logs in with valid credentials, the system must issue a JWT token
|
|
311
320
|
|
|
312
|
-
### State-driven Requirements
|
|
313
|
-
- WHILE
|
|
321
|
+
### State-driven Requirements
|
|
322
|
+
- When the WHILE token is in an unexpired state, the system must allow access to the protected resource.
|
|
314
323
|
|
|
315
|
-
### Constraints
|
|
316
|
-
- IF
|
|
324
|
+
### Constraints
|
|
325
|
+
- If the IF token has expired, the system must return a 401 Unauthorized response.
|
|
317
326
|
```
|
|
318
327
|
|
|
319
|
-
### 📄 SPEC
|
|
328
|
+
### 📄 SPEC Document Template
|
|
320
329
|
|
|
321
|
-
#### YAML Front Matter
|
|
330
|
+
#### YAML Front Matter Schema
|
|
322
331
|
|
|
323
|
-
> **📋 SPEC
|
|
332
|
+
> **📋 SPEC Metadata Standard (SSOT)**: `.moai/memory/spec-metadata.md`
|
|
324
333
|
|
|
325
|
-
**
|
|
326
|
-
-
|
|
327
|
-
-
|
|
334
|
+
**Metadata that must be included** at the top of the spec.md file:
|
|
335
|
+
- **7 required fields**: id, version, status, created, updated, author, priority
|
|
336
|
+
- **9 optional fields**: category, labels, depends_on, blocks, related_specs, related_issue, scope
|
|
328
337
|
|
|
329
|
-
|
|
338
|
+
**Simple reference example**:
|
|
330
339
|
```yaml
|
|
331
340
|
---
|
|
332
341
|
id: AUTH-001
|
|
@@ -339,56 +348,56 @@ priority: high
|
|
|
339
348
|
---
|
|
340
349
|
```
|
|
341
350
|
|
|
342
|
-
|
|
343
|
-
- **id**: TAG ID
|
|
344
|
-
|
|
345
|
-
-
|
|
346
|
-
- **version**: v0.0.1 (INITIAL) → v0.1.0 (
|
|
347
|
-
- **author**: GitHub
|
|
351
|
+
**Core rules**:
|
|
352
|
+
- **id**: Same as TAG ID (`<domain>-<3 digits>`) - Never change after creation
|
|
353
|
+
- **Directory name**: `.moai/specs/SPEC-{ID}/` (e.g. `SPEC-AUTH-001/`)
|
|
354
|
+
- **Duplicate Check**: `rg "@SPEC:{ID}" -n .moai/specs/` Required
|
|
355
|
+
- **version**: v0.0.1 (INITIAL) → v0.1.0 (Implementation Completed) → v1.0.0 (Stable)
|
|
356
|
+
- **author**: GitHub @ prefix is required before ID (e.g. `@Goos`)
|
|
348
357
|
- **priority**: critical | high | medium | low
|
|
349
358
|
|
|
350
|
-
|
|
359
|
+
**Full field description and validation methods**: see `.moai/memory/spec-metadata.md`
|
|
351
360
|
|
|
352
|
-
#### HISTORY
|
|
361
|
+
#### HISTORY section (required)
|
|
353
362
|
|
|
354
|
-
|
|
363
|
+
You must include a HISTORY section **right after the YAML Front Matter**:
|
|
355
364
|
|
|
356
365
|
```markdown
|
|
357
|
-
# @SPEC:AUTH-001: JWT
|
|
366
|
+
# @SPEC:AUTH-001: JWT-based authentication system
|
|
358
367
|
|
|
359
368
|
## HISTORY
|
|
360
369
|
|
|
361
370
|
### v0.0.1 (2025-09-15)
|
|
362
|
-
- **INITIAL**:
|
|
371
|
+
- **INITIAL**: Initial creation of JWT-based authentication system specification
|
|
363
372
|
- **AUTHOR**: @Goos
|
|
364
|
-
- **SCOPE**:
|
|
365
|
-
- **CONTEXT**:
|
|
373
|
+
- **SCOPE**: Token issuance, verification, and renewal logic
|
|
374
|
+
- **CONTEXT**: Reflects requirements for strengthening user authentication
|
|
366
375
|
|
|
367
376
|
### v0.0.2 (2025-09-20)
|
|
368
|
-
- **ADDED**:
|
|
377
|
+
- **ADDED**: Added social login requirements (Draft modification)
|
|
369
378
|
- **AUTHOR**: @Goos
|
|
370
|
-
- **REVIEW**: @security-team (
|
|
379
|
+
- **REVIEW**: @security-team (approved)
|
|
371
380
|
- **CHANGES**:
|
|
372
|
-
|
|
373
|
-
|
|
381
|
+
- OAuth2 integration requirements
|
|
382
|
+
- Google/GitHub login support
|
|
374
383
|
|
|
375
384
|
### v0.1.0 (2025-10-01)
|
|
376
|
-
- **IMPLEMENTATION COMPLETED**: TDD
|
|
385
|
+
- **IMPLEMENTATION COMPLETED**: TDD implementation completed (status: draft → completed)
|
|
377
386
|
- **TDD CYCLE**: RED → GREEN → REFACTOR
|
|
378
|
-
- **COMMITS**: [
|
|
379
|
-
- **FILES**: [
|
|
387
|
+
- **COMMITS**: [Implementation commit hash list]
|
|
388
|
+
- **FILES**: [Created/modified file list]
|
|
380
389
|
```
|
|
381
390
|
|
|
382
|
-
**HISTORY
|
|
383
|
-
-
|
|
384
|
-
|
|
385
|
-
-
|
|
386
|
-
-
|
|
387
|
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
391
|
+
**HISTORY writing rules**:
|
|
392
|
+
- **Version system**: v0.0.1 (INITIAL) → v0.1.0 (implementation complete) → v1.0.0 (stabilization)
|
|
393
|
+
- Detailed version system: See `.moai/memory/spec-metadata.md#version-system`
|
|
394
|
+
- **Version order**: Latest version on top (reverse order)
|
|
395
|
+
- **Change type tag**: INITIAL, ADDED, CHANGED, IMPLEMENTATION COMPLETED, BREAKING, DEPRECATED, REMOVED, FIXED
|
|
396
|
+
- Detailed description: See `.moai/memory/spec-metadata.md#history-writing-guide`
|
|
397
|
+
- **Required items**: Version, date, AUTHOR, changes
|
|
398
|
+
- **Optional items**: REVIEW, SCOPE, CONTEXT, MIGRATION
|
|
390
399
|
|
|
391
|
-
#### SPEC
|
|
400
|
+
#### SPEC document overall structure
|
|
392
401
|
|
|
393
402
|
```markdown
|
|
394
403
|
---
|
|
@@ -400,32 +409,32 @@ updated: 2025-09-15
|
|
|
400
409
|
author: @username
|
|
401
410
|
---
|
|
402
411
|
|
|
403
|
-
# @SPEC:AUTH-001: [SPEC
|
|
412
|
+
# @SPEC:AUTH-001: [SPEC title]
|
|
404
413
|
|
|
405
414
|
## HISTORY
|
|
406
|
-
[
|
|
415
|
+
[Change history by version – see example above]
|
|
407
416
|
|
|
408
|
-
## Environment
|
|
409
|
-
[
|
|
417
|
+
## Environment
|
|
418
|
+
[System environment and prerequisites]
|
|
410
419
|
|
|
411
|
-
## Assumptions
|
|
412
|
-
[
|
|
420
|
+
## Assumptions
|
|
421
|
+
[Design assumptions]
|
|
413
422
|
|
|
414
|
-
## Requirements
|
|
415
|
-
### Ubiquitous
|
|
416
|
-
-
|
|
423
|
+
## Requirements
|
|
424
|
+
### Ubiquitous
|
|
425
|
+
- The system must provide [feature]
|
|
417
426
|
|
|
418
|
-
### Event-driven (
|
|
419
|
-
- WHEN [
|
|
427
|
+
### Event-driven (event-driven)
|
|
428
|
+
- WHEN [condition], the system must [operate]
|
|
420
429
|
|
|
421
|
-
### State-driven
|
|
422
|
-
- WHILE [
|
|
430
|
+
### State-driven
|
|
431
|
+
- WHILE When in [state], the system must [operate]
|
|
423
432
|
|
|
424
|
-
### Optional (
|
|
425
|
-
- WHERE [
|
|
433
|
+
### Optional (Optional function)
|
|
434
|
+
- If WHERE [condition], the system can [operate]
|
|
426
435
|
|
|
427
|
-
### Constraints
|
|
428
|
-
- IF [
|
|
436
|
+
### Constraints
|
|
437
|
+
- IF [condition], the system must be [constrained]
|
|
429
438
|
|
|
430
439
|
## Traceability (@TAG)
|
|
431
440
|
- **SPEC**: @SPEC:AUTH-001
|
|
@@ -434,130 +443,130 @@ author: @username
|
|
|
434
443
|
- **DOC**: docs/api/authentication.md
|
|
435
444
|
```
|
|
436
445
|
|
|
437
|
-
###
|
|
446
|
+
### Agent collaboration structure
|
|
438
447
|
|
|
439
|
-
- **1
|
|
440
|
-
- **2
|
|
441
|
-
-
|
|
442
|
-
-
|
|
443
|
-
-
|
|
448
|
+
- **Step 1**: The `spec-builder` agent is dedicated to analyzing project documents and creating SPEC documents.
|
|
449
|
+
- **Step 2**: The `git-manager` agent is dedicated to branch creation and GitHub Issue/PR creation.
|
|
450
|
+
- **Single Responsibility Principle**: spec-builder only writes plans, git-manager only performs Git/GitHub operations.
|
|
451
|
+
- **Sequential execution**: Executes in the order spec-builder → git-manager to maintain clear dependencies.
|
|
452
|
+
- **No inter-agent calls**: Each agent calls the other agents. It is not called directly, but is executed sequentially only at the command level.
|
|
444
453
|
|
|
445
|
-
## 🚀
|
|
454
|
+
## 🚀 Optimized workflow execution order
|
|
446
455
|
|
|
447
|
-
### Phase 1:
|
|
456
|
+
### Phase 1: Parallel project analysis (performance optimization)
|
|
448
457
|
|
|
449
|
-
|
|
458
|
+
**Perform simultaneously**:
|
|
450
459
|
|
|
451
460
|
```
|
|
452
|
-
Task 1 (haiku):
|
|
453
|
-
├──
|
|
454
|
-
├──
|
|
455
|
-
└──
|
|
456
|
-
|
|
457
|
-
Task 2 (sonnet):
|
|
458
|
-
├── product.md
|
|
459
|
-
├── structure.md
|
|
460
|
-
└── tech.md
|
|
461
|
+
Task 1 (haiku): Scan project structure
|
|
462
|
+
├── Detect languages/frameworks
|
|
463
|
+
├── Collect list of existing SPECs
|
|
464
|
+
└── Draft priority backlog
|
|
465
|
+
|
|
466
|
+
Task 2 (sonnet): In-depth document analysis
|
|
467
|
+
├── product.md requirements extraction
|
|
468
|
+
├── structure.md architecture analysis
|
|
469
|
+
└── tech.md technical constraints
|
|
461
470
|
```
|
|
462
471
|
|
|
463
|
-
|
|
472
|
+
**Performance improvements**: Parallelize basic scans and deep analysis to minimize latency
|
|
464
473
|
|
|
465
|
-
### Phase 2: SPEC
|
|
474
|
+
### Phase 2: Create SPEC document integration
|
|
466
475
|
|
|
467
|
-
`spec-builder`
|
|
476
|
+
The `spec-builder` agent (sonnet) integrates the results of the parallel analysis:
|
|
468
477
|
|
|
469
|
-
-
|
|
470
|
-
-
|
|
471
|
-
-
|
|
478
|
+
- Proposal of function candidates based on project document
|
|
479
|
+
- Creation of SPEC document after user approval (using MultiEdit)
|
|
480
|
+
- Simultaneous creation of 3 files (spec.md, plan.md, acceptance.md)
|
|
472
481
|
|
|
473
|
-
### Phase 3: Git
|
|
482
|
+
### Phase 3: Git task processing
|
|
474
483
|
|
|
475
|
-
`git-manager`
|
|
484
|
+
Final processing by the `git-manager` agent (haiku):
|
|
476
485
|
|
|
477
|
-
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
- **GitHub Issue
|
|
482
|
-
- **Draft PR
|
|
483
|
-
-
|
|
486
|
+
- **Branch creation**: Apply strategy for each mode
|
|
487
|
+
- **Personal mode**: Branch from `main` or `develop` (based on project settings)
|
|
488
|
+
- **Team mode**: **Always branch from `develop`** (GitFlow standard)
|
|
489
|
+
- Branch name: `feature/SPEC-{ID}` format
|
|
490
|
+
- **Create GitHub Issue**: Create SPEC Issue in Team mode
|
|
491
|
+
- **Create Draft PR**: `feature/SPEC-{ID}` → `develop` in Team mode Create PR
|
|
492
|
+
- **Initial Commit**: Commit SPEC document and create tags
|
|
484
493
|
|
|
485
|
-
|
|
494
|
+
**Important**: Each agent runs independently, and direct calls between agents are prohibited.
|
|
486
495
|
|
|
487
|
-
##
|
|
496
|
+
## Agent role separation
|
|
488
497
|
|
|
489
|
-
### spec-builder
|
|
498
|
+
### spec-builder dedicated area
|
|
490
499
|
|
|
491
|
-
-
|
|
492
|
-
- EARS
|
|
493
|
-
- Acceptance Criteria
|
|
494
|
-
- SPEC
|
|
495
|
-
- @TAG
|
|
500
|
+
- Analysis of project documents and discovery of SPEC candidates
|
|
501
|
+
- Preparation of EARS structure specifications
|
|
502
|
+
- Preparation of Acceptance Criteria (Given-When-Then)
|
|
503
|
+
- Verification of SPEC document quality
|
|
504
|
+
- Application of @TAG system
|
|
496
505
|
|
|
497
|
-
### git-manager
|
|
506
|
+
### git-manager dedicated area
|
|
498
507
|
|
|
499
|
-
-
|
|
500
|
-
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
- GitHub Issue/PR
|
|
504
|
-
|
|
505
|
-
-
|
|
506
|
-
-
|
|
508
|
+
- Create and manage all Git branches
|
|
509
|
+
- **Apply branch strategy for each mode**
|
|
510
|
+
- Personal: Branch from `main` or `develop`
|
|
511
|
+
- Team: **Always branch from `develop`** (GitFlow)
|
|
512
|
+
- Create GitHub Issue/PR
|
|
513
|
+
- Team Mode: Create Draft PR (`feature/SPEC-{ID}` → `develop`)
|
|
514
|
+
- Create initial commit and tags
|
|
515
|
+
- Handle remote synchronization
|
|
507
516
|
|
|
508
|
-
## 2
|
|
517
|
+
## Step 2 workflow execution sequence
|
|
509
518
|
|
|
510
|
-
### Phase 1:
|
|
519
|
+
### Phase 1: Analysis and planning phase
|
|
511
520
|
|
|
512
|
-
|
|
521
|
+
**Plan Analyzer** does the following:
|
|
513
522
|
|
|
514
|
-
1.
|
|
515
|
-
2. **SPEC
|
|
516
|
-
3.
|
|
517
|
-
4.
|
|
518
|
-
5.
|
|
523
|
+
1. **Loading project document**: In-depth analysis of product/structure/tech.md
|
|
524
|
+
2. **SPEC candidate discovery**: Prioritization based on business requirements
|
|
525
|
+
3. **Establishment of implementation strategy**: EARS structure and acceptance design
|
|
526
|
+
4. **Creating a Writing Plan**: Presents a step-by-step approach to writing a plan
|
|
527
|
+
5. **Awaiting user approval**: Review plan and gather feedback
|
|
519
528
|
|
|
520
|
-
### Phase 2:
|
|
529
|
+
### Phase 2: Plan preparation phase (after approval)
|
|
521
530
|
|
|
522
|
-
`spec-builder`
|
|
531
|
+
The `spec-builder` agent **continuously** performs after user approval:
|
|
523
532
|
|
|
524
|
-
1. **EARS
|
|
525
|
-
2. **Acceptance Criteria**: Given-When-Then
|
|
526
|
-
3.
|
|
527
|
-
4.
|
|
533
|
+
1. **Writing EARS specification**: Event-Action-Response-State structuring
|
|
534
|
+
2. **Acceptance Criteria**: Given-When-Then Scenario Writing
|
|
535
|
+
3. **Document quality verification**: Apply TRUST principles and @TAG
|
|
536
|
+
4. **Template creation**: Simultaneous creation of spec.md, plan.md, acceptance.md
|
|
528
537
|
|
|
529
|
-
### Phase 3: Git
|
|
538
|
+
### Phase 3: Git operations (git-manager)
|
|
530
539
|
|
|
531
|
-
`git-manager`
|
|
540
|
+
The `git-manager` agent does **all at once** after the SPEC is complete:
|
|
532
541
|
|
|
533
|
-
1.
|
|
534
|
-
2. **GitHub Issue**:
|
|
535
|
-
3.
|
|
536
|
-
4.
|
|
542
|
+
1. **Create branch**: Apply branch strategy for each mode
|
|
543
|
+
2. **GitHub Issue**: Create SPEC Issue in Team mode
|
|
544
|
+
3. **Initial commit**: Commit SPEC document and create tags
|
|
545
|
+
4. **Remote Sync**: Apply synchronization strategy for each mode
|
|
537
546
|
|
|
538
|
-
##
|
|
547
|
+
## Writing Tips
|
|
539
548
|
|
|
540
|
-
- product/structure/tech
|
|
541
|
-
- Acceptance Criteria
|
|
542
|
-
-
|
|
549
|
+
- Information that is not in the product/structure/tech document is supplemented by asking a new question.
|
|
550
|
+
- Acceptance Criteria is encouraged to be written at least 2 times in 3 columns Given/When/Then.
|
|
551
|
+
- The number of modules is reduced due to the relaxation of the Readable standard among the TRUST principles. If the recommended value (default 5) is exceeded, please include justification in the SPEC `context` section.
|
|
543
552
|
|
|
544
553
|
---
|
|
545
554
|
|
|
546
|
-
## 🧠 Context Management
|
|
555
|
+
## 🧠 Context Management
|
|
547
556
|
|
|
548
|
-
>
|
|
557
|
+
> For more information: `.moai/memory/development-guide.md` - see section "Context Engineering"
|
|
549
558
|
|
|
550
|
-
###
|
|
559
|
+
### Core strategy of this command
|
|
551
560
|
|
|
552
|
-
|
|
561
|
+
**Load first**: `.moai/project/product.md` (business requirement)
|
|
553
562
|
|
|
554
|
-
|
|
563
|
+
**Recommendation**: The plan is complete. You can experience better performance and context management by starting a new chat session with the `/clear` or `/new` command before proceeding to the next step (`/alfred:2-run`).
|
|
555
564
|
|
|
556
565
|
---
|
|
557
566
|
|
|
558
|
-
##
|
|
567
|
+
## Next steps
|
|
559
568
|
|
|
560
|
-
|
|
569
|
+
**Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
|
|
561
570
|
|
|
562
|
-
- `/alfred:2-
|
|
563
|
-
-
|
|
571
|
+
- Start implementing TDD with `/alfred:2-run SPEC-XXX`
|
|
572
|
+
- Team mode: After creating an issue, the git-manager agent automatically creates a branch.
|