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