moai-adk 0.9.0__py3-none-any.whl → 0.15.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/cli/commands/init.py +14 -2
- moai_adk/cli/commands/update.py +214 -56
- moai_adk/core/issue_creator.py +2 -2
- moai_adk/core/project/detector.py +201 -12
- moai_adk/core/project/initializer.py +62 -1
- moai_adk/core/project/phase_executor.py +48 -6
- moai_adk/core/tags/ci_validator.py +34 -4
- moai_adk/core/tags/pre_commit_validator.py +40 -2
- moai_adk/core/tags/reporter.py +2 -3
- moai_adk/core/tags/validator.py +1 -1
- moai_adk/core/template_engine.py +20 -5
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
- moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +1 -1
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +2 -2
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +76 -3
- moai_adk/templates/.claude/agents/alfred/project-manager.md +49 -10
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +3 -3
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +180 -41
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +74 -0
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +107 -5
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +2 -2
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +928 -263
- moai_adk/templates/.claude/commands/alfred/1-plan.md +220 -68
- moai_adk/templates/.claude/commands/alfred/2-run.md +299 -51
- moai_adk/templates/.claude/commands/alfred/3-sync.md +452 -51
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +1 -1
- moai_adk/templates/.claude/hooks/alfred/core/project.py +25 -27
- moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
- moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +29 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +11 -19
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +11 -19
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +11 -19
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +10 -18
- moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +2 -2
- moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +3 -3
- moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +5 -5
- moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +40 -41
- moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +55 -23
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +132 -3
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +9 -10
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +3 -6
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +19 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +14 -22
- moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
- moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
- moai_adk/templates/.claude/settings.json +5 -5
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
- moai_adk/templates/{.moai/memory/CLAUDE-AGENTS-GUIDE.md → .claude/skills/moai-alfred-agent-guide/reference.md} +34 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +56 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/SKILL.md +74 -0
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +269 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/SKILL.md +198 -0
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +431 -0
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +141 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
- moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +273 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
- moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/SKILL.md +5 -5
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +115 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +348 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
- moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +4 -0
- moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL.md +3 -3
- moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
- moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
- moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +17 -13
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +15 -12
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +14 -12
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +14 -11
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +10 -8
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +15 -12
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +13 -11
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +16 -10
- moai_adk/templates/.claude/skills/moai-project-documentation.md +622 -0
- moai_adk/templates/.git-hooks/pre-push +143 -0
- moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
- moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
- moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/moai-gitflow.yml +182 -25
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +35 -29
- moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
- moai_adk/templates/.github/workflows/release.yml +76 -7
- moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/spec-issue-sync.yml +208 -41
- moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/tag-report.yml +269 -0
- moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
- moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
- moai_adk/templates/.moai/config.json +3 -1
- moai_adk/templates/CLAUDE.md +940 -45
- moai_adk/templates/workflows/go-tag-validation.yml +30 -0
- moai_adk/templates/workflows/javascript-tag-validation.yml +41 -0
- moai_adk/templates/workflows/python-tag-validation.yml +42 -0
- moai_adk/templates/workflows/typescript-tag-validation.yml +31 -0
- moai_adk/utils/banner.py +5 -5
- {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/METADATA +1253 -527
- {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/RECORD +169 -109
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -209
- moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +0 -102
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
- moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +0 -176
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
- moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
- moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -330
- moai_adk/templates/.moai/project/product.md +0 -161
- moai_adk/templates/.moai/project/structure.md +0 -156
- moai_adk/templates/.moai/project/tech.md +0 -227
- moai_adk/templates/README.md +0 -256
- moai_adk/templates/__init__.py +0 -2
- /moai_adk/templates/{.moai/memory/ISSUE-LABEL-MAPPING.md → .claude/skills/moai-alfred-issue-labels/reference.md} +0 -0
- /moai_adk/templates/{.moai/memory/CLAUDE-PRACTICES.md → .claude/skills/moai-alfred-practices/reference.md} +0 -0
- /moai_adk/templates/{.moai/memory/CLAUDE-RULES.md → .claude/skills/moai-alfred-rules/reference.md} +0 -0
- /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/README.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +0 -0
- /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/reference.md +0 -0
- /moai_adk/templates/{.moai/memory/SKILLS-DESCRIPTION-POLICY.md → .claude/skills/moai-cc-skill-descriptions/reference.md} +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/CHECKLIST.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/EXAMPLES.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/INTERACTIVE-DISCOVERY.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/METADATA.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PARALLEL-ANALYSIS-REPORT.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/PYTHON-VERSION-MATRIX.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-FACTORY-WORKFLOW.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/SKILL-UPDATE-ADVISOR.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STEP-BY-STEP-GUIDE.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/STRUCTURE.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/WEB-RESEARCH.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/reference.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/generate-structure.sh +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/scripts/validate-skill.sh +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/SKILL_TEMPLATE.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/examples-template.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/reference-template.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-skill-factory → moai-cc-skill-factory}/templates/scripts-template.sh +0 -0
- {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.9.0.dist-info → moai_adk-0.15.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alfred:0-project
|
|
3
|
-
description: "Initialize project
|
|
4
|
-
# Translations:
|
|
5
|
-
# - ko: "프로젝트 문서 초기화 - product/structure/tech.md 생성 및 언어별 최적화 설정"
|
|
6
|
-
# - ja: "プロジェクト文書の初期化 - product/structure/tech.mdの作成と言語別最適化設定"
|
|
7
|
-
# - zh: "初始化项目文档 - 创建product/structure/tech.md并设置语言优化"
|
|
3
|
+
description: "Initialize project metadata and documentation"
|
|
8
4
|
allowed-tools:
|
|
9
|
-
- Read
|
|
10
|
-
- Write
|
|
11
|
-
- Edit
|
|
12
|
-
- MultiEdit
|
|
13
|
-
- Grep
|
|
14
|
-
- Glob
|
|
15
|
-
- TodoWrite
|
|
16
|
-
- Bash(ls:*)
|
|
17
|
-
- Bash(find:*)
|
|
18
|
-
- Bash(cat:*)
|
|
19
|
-
- Task
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Edit
|
|
8
|
+
- MultiEdit
|
|
9
|
+
- Grep
|
|
10
|
+
- Glob
|
|
11
|
+
- TodoWrite
|
|
12
|
+
- Bash(ls:*)
|
|
13
|
+
- Bash(find:*)
|
|
14
|
+
- Bash(cat:*)
|
|
15
|
+
- Task
|
|
20
16
|
---
|
|
21
17
|
|
|
22
18
|
# 📋 MoAI-ADK Step 0: Initialize/Update Universal Language Support Project Documentation
|
|
19
|
+
|
|
23
20
|
> **Note**: Interactive prompts use `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` for TUI selection menus. The skill is loaded on-demand when user interaction is required.
|
|
24
21
|
|
|
25
22
|
## 🎯 Command Purpose
|
|
@@ -52,7 +49,7 @@ Automatically analyzes the project environment to create/update product/structur
|
|
|
52
49
|
|
|
53
50
|
## 💡 Example of use
|
|
54
51
|
|
|
55
|
-
The user executes the `/alfred:
|
|
52
|
+
The user executes the `/alfred:0-project` command to analyze the project and create/update documents.
|
|
56
53
|
|
|
57
54
|
## Command Overview
|
|
58
55
|
|
|
@@ -65,9 +62,10 @@ It is a systematic initialization system that analyzes the project environment a
|
|
|
65
62
|
|
|
66
63
|
## How to use
|
|
67
64
|
|
|
68
|
-
The user executes the `/alfred:
|
|
65
|
+
The user executes the `/alfred:0-project` command to start analyzing the project and creating/updating documents.
|
|
69
66
|
|
|
70
67
|
**Automatic processing**:
|
|
68
|
+
|
|
71
69
|
- Update mode if there is an existing `.moai/project/` document
|
|
72
70
|
- New creation mode if there is no document
|
|
73
71
|
- Automatic detection of language and project type
|
|
@@ -79,7 +77,7 @@ The user executes the `/alfred:8-project` command to start analyzing the project
|
|
|
79
77
|
- ❌ Create a file in the `.claude/memory/` directory
|
|
80
78
|
- ❌ Create a file `.claude/commands/alfred/*.json`
|
|
81
79
|
- ❌ Unnecessary overwriting of existing documents
|
|
82
|
-
- ❌ Date and numerical prediction (
|
|
80
|
+
- ❌ Date and numerical prediction ("within 3 months", "50% reduction") etc.)
|
|
83
81
|
- ❌ Hypothetical scenarios, expected market size, future technology trend predictions
|
|
84
82
|
|
|
85
83
|
**Expressions to use**:
|
|
@@ -96,6 +94,8 @@ The user executes the `/alfred:8-project` command to start analyzing the project
|
|
|
96
94
|
|
|
97
95
|
**목적**: 프로젝트 초기화 시작 전에 대화 언어를 설정하고 사용자 닉네임을 등록합니다. 이 설정은 모든 Alfred 프롬프트, 인터뷰 질문 및 생성된 문서에 적용됩니다.
|
|
98
96
|
|
|
97
|
+
**UX 개선**: 2개 질문을 **1회 배치 호출**로 통합 (50% 상호작용 감소: 2 turns → 1 turn)
|
|
98
|
+
|
|
99
99
|
### 0.0 Alfred 자기소개 및 환영 인사
|
|
100
100
|
|
|
101
101
|
Alfred가 첫 상호작용으로 다음과 같이 인사합니다:
|
|
@@ -108,100 +108,404 @@ MoAI-ADK의 SuperAgent로서 당신의 프로젝트를 함께 만들어갈 준
|
|
|
108
108
|
먼저 기본 설정을 진행하겠습니다.
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
### 0.1 언어 선택
|
|
111
|
+
### 0.1 배치 설계: 언어 선택 + 사용자 닉네임 + GitHub 설정 확인 (1-3회 호출)
|
|
112
|
+
|
|
113
|
+
Alfred가 `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` 를 사용하여 **배치 호출**로 필수 정보를 수집합니다:
|
|
114
|
+
|
|
115
|
+
**기본 배치 (항상 실행)**:
|
|
116
|
+
|
|
117
|
+
- 언어 선택
|
|
118
|
+
- 사용자 닉네임
|
|
119
|
+
|
|
120
|
+
**추가 배치 (팀 모드 감지 시)**:
|
|
121
|
+
|
|
122
|
+
- GitHub "Automatically delete head branches" 설정 확인
|
|
123
|
+
|
|
124
|
+
#### 0.1.1 팀 모드 감지
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# config.json에서 mode 확인
|
|
128
|
+
grep "mode" .moai/config.json
|
|
129
|
+
|
|
130
|
+
# 결과: "mode": "team" → 추가 질문 포함
|
|
131
|
+
# "mode": "personal" → 기본 질문만 실행
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### 0.1.2 기본 배치: 언어 선택 + 에이전트 프롬프트 언어 + 닉네임 (3개 질문, 1회 배치 호출)
|
|
135
|
+
|
|
136
|
+
**배치 설계**: 3개 질문을 1회 호출로 통합 (UX 개선: 3 turns → 1 turn)
|
|
137
|
+
|
|
138
|
+
**Example AskUserQuestion Call**:
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
AskUserQuestion(
|
|
142
|
+
questions=[
|
|
143
|
+
{
|
|
144
|
+
"question": "Which language would you like to use for the project initialization and documentation?",
|
|
145
|
+
"header": "Language",
|
|
146
|
+
"multiSelect": false,
|
|
147
|
+
"options": [
|
|
148
|
+
{
|
|
149
|
+
"label": "🌍 English",
|
|
150
|
+
"description": "All dialogs and documentation in English"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"label": "🇰🇷 한국어",
|
|
154
|
+
"description": "All dialogs and documentation in Korean"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"label": "🇯🇵 日本語",
|
|
158
|
+
"description": "All dialogs and documentation in Japanese"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"label": "🇨🇳 中文",
|
|
162
|
+
"description": "All dialogs and documentation in Chinese"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"question": "In which language should Alfred's sub-agent prompts be written?",
|
|
168
|
+
"header": "Agent Prompt Language",
|
|
169
|
+
"multiSelect": false,
|
|
170
|
+
"options": [
|
|
171
|
+
{
|
|
172
|
+
"label": "🌐 English (Global Standard)",
|
|
173
|
+
"description": "All sub-agent prompts in English for global consistency and team collaboration. Recommended for Claude Pro $20 users: reduces token usage by ~15-20%, lowering API costs"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"label": "🗣️ Selected Language (Localized)",
|
|
177
|
+
"description": "All sub-agent prompts in the language you selected above for local team efficiency"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"question": "How would you like to be called in our conversations? (e.g., GOOS, Team Lead, Developer, or custom name - max 20 chars)",
|
|
183
|
+
"header": "Nickname",
|
|
184
|
+
"multiSelect": false,
|
|
185
|
+
"options": [
|
|
186
|
+
{
|
|
187
|
+
"label": "Enter custom nickname",
|
|
188
|
+
"description": "Type your preferred name using the 'Other' option below"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**응답 처리**:
|
|
197
|
+
|
|
198
|
+
**Q1 (사용자 언어)**:
|
|
199
|
+
|
|
200
|
+
- Selected option stored as: `conversation_language: "ko"` (or "en", "ja", "zh", etc.)
|
|
201
|
+
|
|
202
|
+
**Q2 (에이전트 프롬프트 언어)** - **NEW**:
|
|
203
|
+
|
|
204
|
+
- **"English (Global Standard)"** → `agent_prompt_language: "english"`
|
|
205
|
+
- All sub-agent prompts written in English
|
|
206
|
+
- Recommended for global teams, code consistency, and international collaboration
|
|
207
|
+
- Project-manager, spec-builder, code-builder use English prompts internally
|
|
208
|
+
- **"Selected Language (Localized)"** → `agent_prompt_language: "localized"`
|
|
209
|
+
- All sub-agent prompts written in the user-selected language
|
|
210
|
+
- Recommended for local teams, local documentation, and native language efficiency
|
|
211
|
+
- Project-manager receives prompts in selected language (e.g., Korean, Japanese)
|
|
212
|
+
|
|
213
|
+
**Q3 (사용자 닉네임)**:
|
|
214
|
+
|
|
215
|
+
- Custom nickname stored as: `user.nickname: "GOOS"` (or custom input)
|
|
216
|
+
|
|
217
|
+
#### 0.1.3 팀 모드 추가 배치: GitHub 설정 & Git 워크플로우 선택 (팀 모드만)
|
|
218
|
+
|
|
219
|
+
**조건**: `config.json`에서 `"mode": "team"` 감지 시 실행
|
|
220
|
+
|
|
221
|
+
**배치 구성**: 2개 질문 (1회 호출로 통합)
|
|
222
|
+
|
|
223
|
+
**Example AskUserQuestion Call**:
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
AskUserQuestion(
|
|
227
|
+
questions=[
|
|
228
|
+
{
|
|
229
|
+
"question": "[Team Mode] Is 'Automatically delete head branches' enabled in your GitHub repository settings?",
|
|
230
|
+
"header": "GitHub Branch Settings",
|
|
231
|
+
"multiSelect": false,
|
|
232
|
+
"options": [
|
|
233
|
+
{
|
|
234
|
+
"label": "✅ Yes, already enabled",
|
|
235
|
+
"description": "PR merge 후 자동으로 원격 브랜치 삭제됨"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"label": "❌ No, not enabled (Recommended: Enable)",
|
|
239
|
+
"description": "Settings → General → '자동 삭제' 체크박스 확인 필요"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"label": "🤔 Not sure / Need to check",
|
|
243
|
+
"description": "GitHub Settings → General 확인 후 다시 진행"
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"question": "[Team Mode] Which Git workflow should we use when creating SPEC documents?",
|
|
249
|
+
"header": "SPEC Git Workflow",
|
|
250
|
+
"multiSelect": false,
|
|
251
|
+
"options": [
|
|
252
|
+
{
|
|
253
|
+
"label": "📋 Feature Branch + PR",
|
|
254
|
+
"description": "매 SPEC마다 feature 브랜치 생성 → PR 리뷰 → develop 병합. 팀 협업과 코드 리뷰에 최적"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"label": "🔄 Direct Commit to Develop",
|
|
258
|
+
"description": "브랜치 생성 없이 develop에 직접 커밋. 빠른 프로토타이핑과 단순 워크플로우에 최적"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"label": "🤔 Decide per SPEC",
|
|
262
|
+
"description": "SPEC 생성 시마다 매번 선택. 유연성이 높지만 매번 결정 필요"
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**응답 처리**:
|
|
271
|
+
|
|
272
|
+
**Q1 (GitHub 설정)**:
|
|
273
|
+
|
|
274
|
+
- **"Yes, already enabled"** → `auto_delete_branches: true` 저장
|
|
275
|
+
- **"No, not enabled"** → `auto_delete_branches: false` + 권장사항 저장
|
|
276
|
+
- **"Not sure"** → `auto_delete_branches: null` + 경고 메시지
|
|
277
|
+
|
|
278
|
+
**Q2 (Git 워크플로우)**:
|
|
112
279
|
|
|
113
|
-
|
|
280
|
+
- **"Feature Branch + PR"** → `spec_git_workflow: "feature_branch"` 저장
|
|
281
|
+
- `/alfred:1-plan` 실행 시 자동으로 feature 브랜치 생성
|
|
282
|
+
- git-manager가 PR 기반 워크플로우 적용
|
|
283
|
+
- **"Direct Commit to Develop"** → `spec_git_workflow: "develop_direct"` 저장
|
|
284
|
+
- `/alfred:1-plan` 실행 시 develop 브랜치에 직접 커밋
|
|
285
|
+
- 브랜치 생성 과정 생략
|
|
286
|
+
- **"Decide per SPEC"** → `spec_git_workflow: "per_spec"` 저장
|
|
287
|
+
- `/alfred:1-plan` 실행 시마다 git-manager가 사용자에게 선택 요청
|
|
288
|
+
|
|
289
|
+
**User Response Example**:
|
|
114
290
|
|
|
115
|
-
**Question**:
|
|
116
291
|
```
|
|
117
|
-
|
|
292
|
+
Selected Language: 🇰🇷 한국어
|
|
293
|
+
Selected Nickname: GOOS (typed via "Other" option)
|
|
118
294
|
```
|
|
119
295
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### 0.1.4 Domain Selection (Optional - All Modes)
|
|
299
|
+
|
|
300
|
+
**Purpose**: Identify project domains to activate domain-expert agents for specialized guidance.
|
|
301
|
+
|
|
302
|
+
**When to ask**: After language/nickname/GitHub settings complete
|
|
303
|
+
|
|
304
|
+
**Batched Design**: Domain selection integrated into initial batch OR asked separately based on user preference
|
|
305
|
+
|
|
306
|
+
**Example AskUserQuestion Call**:
|
|
307
|
+
|
|
308
|
+
```python
|
|
309
|
+
AskUserQuestion(
|
|
310
|
+
questions=[
|
|
311
|
+
{
|
|
312
|
+
"question": "Which domains does your project involve? (Select all that apply)",
|
|
313
|
+
"header": "Project Domains",
|
|
314
|
+
"multiSelect": true,
|
|
315
|
+
"options": [
|
|
316
|
+
{
|
|
317
|
+
"label": "🎨 Frontend",
|
|
318
|
+
"description": "React, Vue, Angular, Next.js, Nuxt, SvelteKit, Astro, Remix, SolidJS"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"label": "⚙️ Backend",
|
|
322
|
+
"description": "FastAPI, Flask, Django, Express, Fastify, NestJS, Spring Boot, Gin, Axum"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"label": "🚀 DevOps",
|
|
326
|
+
"description": "Railway, Vercel, Docker, Kubernetes, AWS, GCP, Azure, CI/CD"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"label": "🗄️ Database",
|
|
330
|
+
"description": "PostgreSQL, MySQL, MongoDB, Redis, database design and optimization"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"label": "📊 Data Science",
|
|
334
|
+
"description": "Data analysis, machine learning, data pipelines, notebooks"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"label": "📱 Mobile",
|
|
338
|
+
"description": "React Native, Flutter, iOS, Android app development"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"label": "⚡ Skip",
|
|
342
|
+
"description": "No domain selection (can add later via /alfred:1-plan)"
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
)
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Response Processing**:
|
|
351
|
+
|
|
352
|
+
When user selects domains, Alfred processes the response as follows:
|
|
353
|
+
|
|
354
|
+
**Selected Domain Processing** (`answers["0"]` contains selected domain labels):
|
|
126
355
|
|
|
127
|
-
|
|
356
|
+
- Extract selected domain codes from labels: "Frontend" → "frontend", "Backend" → "backend", etc.
|
|
357
|
+
- Store selected domains in `.moai/config.json`:
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"stack": {
|
|
361
|
+
"selected_domains": ["frontend", "backend"],
|
|
362
|
+
"domain_selection_date": "2025-10-23T12:34:56Z"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**Skip Domain Selection** (if user selects "⚡ Skip"):
|
|
368
|
+
|
|
369
|
+
- Store in config.json:
|
|
370
|
+
```json
|
|
371
|
+
{
|
|
372
|
+
"stack": {
|
|
373
|
+
"selected_domains": [],
|
|
374
|
+
"domain_selection_skipped": true,
|
|
375
|
+
"domain_selection_date": "2025-10-23T12:34:56Z"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
- Display: "✅ Domain selection skipped. You can add domains later during `/alfred:1-plan`"
|
|
380
|
+
|
|
381
|
+
**Domain Expert Activation**:
|
|
382
|
+
|
|
383
|
+
- Selected domains stored in `.moai/config.json`
|
|
384
|
+
- Domain-expert agents activated during `/alfred:1-plan` (automatic keyword detection)
|
|
385
|
+
- Domain-expert agents available as advisors during `/alfred:2-run`
|
|
386
|
+
- Domain-specific sync routing enabled in `/alfred:3-sync`
|
|
387
|
+
- If domains skipped: Default agent lineup used (can be customized later in `/alfred:1-plan`)
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
### 0.2 사용자 정보 저장
|
|
128
392
|
|
|
129
|
-
Alfred
|
|
393
|
+
Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과 같이 저장합니다:
|
|
394
|
+
|
|
395
|
+
#### 0.2.1 기본 정보 저장 (항상) - 에이전트 프롬프트 언어 추가
|
|
130
396
|
|
|
131
397
|
```json
|
|
132
398
|
{
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
399
|
+
"language": {
|
|
400
|
+
"conversation_language": "ko",
|
|
401
|
+
"conversation_language_name": "한국어",
|
|
402
|
+
"agent_prompt_language": "localized",
|
|
403
|
+
"agent_prompt_language_description": "All sub-agent prompts written in the selected language (localized)"
|
|
404
|
+
},
|
|
405
|
+
"user": {
|
|
406
|
+
"nickname": "GOOS",
|
|
407
|
+
"selected_at": "2025-10-23T12:34:56Z"
|
|
408
|
+
},
|
|
409
|
+
"stack": {
|
|
410
|
+
"selected_domains": ["frontend", "backend"],
|
|
411
|
+
"domain_selection_date": "2025-10-23T12:34:56Z"
|
|
412
|
+
}
|
|
136
413
|
}
|
|
137
414
|
```
|
|
138
415
|
|
|
139
|
-
|
|
140
|
-
- Passed to all sub-agents as a context parameter
|
|
141
|
-
- Stored in `.moai/config.json` under `language` field
|
|
142
|
-
- Used to generate all documentation in the selected language
|
|
143
|
-
- Displayed in CLAUDE.md under "## Project Information"
|
|
416
|
+
**에이전트 프롬프트 언어 옵션**:
|
|
144
417
|
|
|
145
|
-
|
|
418
|
+
- **`"english"`** (Global Standard) - **💰 Claude Pro $20 사용자 추천**:
|
|
146
419
|
|
|
147
|
-
|
|
420
|
+
- All sub-agent prompts and internal communication in English
|
|
421
|
+
- Best for: International teams, global collaboration, code consistency
|
|
422
|
+
- Impact: Project-manager, spec-builder, code-builder all use English task prompts
|
|
423
|
+
- **Cost Benefit**: Reduces token usage by ~15-20% compared to non-English prompts
|
|
424
|
+
- English prompts are more efficient and use fewer tokens
|
|
425
|
+
- Significant cost savings for continuous API usage
|
|
426
|
+
- Example: 100,000 tokens in English ≈ 115,000-120,000 tokens in Korean/Japanese
|
|
148
427
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
428
|
+
- **`"localized"`** (Localized - Default for non-English):
|
|
429
|
+
- All sub-agent prompts and internal communication in selected language
|
|
430
|
+
- Best for: Local teams, native language efficiency, culturally-specific guidance
|
|
431
|
+
- Impact: Project-manager, spec-builder, code-builder all use localized task prompts
|
|
432
|
+
- Note: Uses ~15-20% more tokens due to language characteristics
|
|
433
|
+
|
|
434
|
+
#### 0.2.2 GitHub & Git 워크플로우 설정 저장 (팀 모드만)
|
|
435
|
+
|
|
436
|
+
**팀 모드 감지 시 추가 저장 - Feature Branch + PR 선택 시**:
|
|
437
|
+
|
|
438
|
+
```json
|
|
439
|
+
{
|
|
440
|
+
"github": {
|
|
441
|
+
"auto_delete_branches": true,
|
|
442
|
+
"spec_git_workflow": "feature_branch",
|
|
443
|
+
"checked_at": "2025-10-23T12:34:56Z",
|
|
444
|
+
"workflow_recommendation": "Feature branch를 사용한 PR 기반 협업 워크플로우. 매 SPEC마다 feature/spec-* 브랜치 생성, PR 리뷰 후 develop 병합"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
153
447
|
```
|
|
154
448
|
|
|
155
|
-
|
|
156
|
-
- 텍스트 직접 입력 가능 (자유 형식)
|
|
157
|
-
- 예시: "GOOS", "팀장", "개발자" 등
|
|
158
|
-
- 최대 20자 한도
|
|
449
|
+
**또는 - Direct Commit to Develop 선택 시**:
|
|
159
450
|
|
|
160
|
-
|
|
451
|
+
```json
|
|
452
|
+
{
|
|
453
|
+
"github": {
|
|
454
|
+
"auto_delete_branches": false,
|
|
455
|
+
"spec_git_workflow": "develop_direct",
|
|
456
|
+
"checked_at": "2025-10-23T12:34:56Z",
|
|
457
|
+
"workflow_recommendation": "develop 브랜치에 직접 커밋하는 단순 워크플로우. 브랜치 생성 과정 생략, 빠른 개발 속도"
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
```
|
|
161
461
|
|
|
162
|
-
|
|
462
|
+
**또는 - Decide per SPEC 선택 시**:
|
|
163
463
|
|
|
164
464
|
```json
|
|
165
465
|
{
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
466
|
+
"github": {
|
|
467
|
+
"auto_delete_branches": true,
|
|
468
|
+
"spec_git_workflow": "per_spec",
|
|
469
|
+
"checked_at": "2025-10-23T12:34:56Z",
|
|
470
|
+
"workflow_recommendation": "SPEC 생성 시마다 워크플로우 선택. /alfred:1-plan 실행 시 git-manager가 선택 요청"
|
|
471
|
+
}
|
|
170
472
|
}
|
|
171
473
|
```
|
|
172
474
|
|
|
475
|
+
#### 0.2.3 저장된 정보 활용
|
|
476
|
+
|
|
173
477
|
이 정보는:
|
|
478
|
+
|
|
174
479
|
- 모든 sub-agents 에게 컨텍스트 파라미터로 전달됨
|
|
175
|
-
- `.moai/config.json` 의 `user` 필드에 저장됨
|
|
176
|
-
- CLAUDE.md의 `{{USER_NICKNAME}}` 변수로 치환됨
|
|
480
|
+
- `.moai/config.json` 의 `language`, `user`, `github` 필드에 저장됨
|
|
481
|
+
- CLAUDE.md의 `{{CONVERSATION_LANGUAGE}}` 및 `{{USER_NICKNAME}}` 변수로 치환됨
|
|
177
482
|
- 모든 Alfred 대화에서 사용됨
|
|
483
|
+
- **팀 모드**: git-manager가 다음 워크플로우를 자동으로 적용:
|
|
484
|
+
- **`spec_git_workflow: "feature_branch"`**: `/alfred:1-plan` 실행 시 feature/spec-\* 브랜치 생성, PR 기반 리뷰 프로세스 적용
|
|
485
|
+
- **`spec_git_workflow: "develop_direct"`**: `/alfred:1-plan` 실행 시 develop 브랜치에 직접 커밋, 브랜치 생성 과정 생략
|
|
486
|
+
- **`spec_git_workflow: "per_spec"`**: `/alfred:1-plan` 실행 시마다 사용자에게 워크플로우 선택 요청
|
|
178
487
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
488
|
+
**설정 완료 출력 예시**:
|
|
489
|
+
|
|
490
|
+
```markdown
|
|
491
|
+
✅ 초기 설정 완료!
|
|
492
|
+
|
|
493
|
+
언어: 한국어 (ko)
|
|
494
|
+
닉네임: GOOS
|
|
182
495
|
|
|
183
|
-
이제 프로젝트 환경 분석으로 진행하겠습니다...
|
|
496
|
+
이제 GOOS님의 프로젝트 환경 분석으로 진행하겠습니다...
|
|
184
497
|
```
|
|
185
498
|
|
|
186
499
|
### 0.3 STEP 1로 전환
|
|
187
500
|
|
|
188
501
|
언어 및 사용자 정보 설정 완료 후, 모든 후속 상호작용이 선택된 언어로 진행됩니다:
|
|
502
|
+
|
|
189
503
|
- Alfred의 모든 프롬프트가 선택된 언어로 번역됨
|
|
190
504
|
- project-manager sub-agent이 언어 및 사용자 정보 파라미터를 수신
|
|
191
505
|
- 인터뷰 질문이 선택된 언어로 진행됨
|
|
192
506
|
- 생성된 문서 (product.md, structure.md, tech.md)가 선택된 언어로 작성됨
|
|
193
507
|
- CLAUDE.md가 선택된 언어와 사용자 닉네임을 표시함
|
|
194
508
|
|
|
195
|
-
**한국어 선택 시 출력 예시**:
|
|
196
|
-
```markdown
|
|
197
|
-
✅ 설정 완료!
|
|
198
|
-
|
|
199
|
-
언어: 한국어 (ko)
|
|
200
|
-
닉네임: GOOS
|
|
201
|
-
|
|
202
|
-
이제 GOOS님의 프로젝트 환경 분석으로 진행하겠습니다...
|
|
203
|
-
```
|
|
204
|
-
|
|
205
509
|
---
|
|
206
510
|
|
|
207
511
|
## 🚀 STEP 1: Environmental analysis and interview plan development
|
|
@@ -223,33 +527,83 @@ grep "optimized" .moai/config.json
|
|
|
223
527
|
```
|
|
224
528
|
|
|
225
529
|
**Backup existence conditions**:
|
|
530
|
+
|
|
226
531
|
- `.moai-backups/` directory exists
|
|
227
532
|
- `.moai/project/*.md` file exists in the latest backup folder
|
|
228
|
-
-
|
|
533
|
+
- User's existing project files can be merged (regardless of optimized flag)
|
|
534
|
+
|
|
535
|
+
**Backup Detection Result**:
|
|
536
|
+
|
|
537
|
+
- **Backup Found**: Latest backup is `.moai-backups/[TIMESTAMP]/`
|
|
538
|
+
- **No Backup**: Proceed directly to Phase 1.2 (project environment analysis)
|
|
539
|
+
|
|
540
|
+
**Select user if backup exists**
|
|
541
|
+
|
|
542
|
+
When a backup is detected, call `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` to present a TUI decision:
|
|
543
|
+
|
|
544
|
+
**Example AskUserQuestion Call**:
|
|
545
|
+
|
|
546
|
+
```python
|
|
547
|
+
AskUserQuestion(
|
|
548
|
+
questions=[
|
|
549
|
+
{
|
|
550
|
+
"question": "Previous project configuration found in backup. How would you like to proceed?",
|
|
551
|
+
"header": "Backup Merge Decision",
|
|
552
|
+
"multiSelect": false,
|
|
553
|
+
"options": [
|
|
554
|
+
{
|
|
555
|
+
"label": "🔄 Merge (Recommended)",
|
|
556
|
+
"description": "Restore your previous customizations with latest template structure"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"label": "📋 New Interview",
|
|
560
|
+
"description": "Start fresh interview, ignore previous configuration"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"label": "⏸️ Skip (Keep Current)",
|
|
564
|
+
"description": "Keep existing project files without changes"
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
)
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
**Response Processing**:
|
|
573
|
+
|
|
574
|
+
- **"Merge (Recommended)"** (`answers["0"] === "Merge"`) → Proceed to Phase 1.1 (backup merge workflow)
|
|
575
|
+
|
|
576
|
+
- Extract user customizations from backup
|
|
577
|
+
- Combine with latest template structure
|
|
578
|
+
- Update version in HISTORY section
|
|
579
|
+
- Set `optimized: true` in config.json
|
|
580
|
+
|
|
581
|
+
- **"New Interview"** (`answers["0"] === "New Interview"`) → Proceed to Phase 1.2 (Project environment analysis)
|
|
582
|
+
|
|
583
|
+
- Archive existing backup for reference
|
|
584
|
+
- Begin fresh interview without prior customizations
|
|
585
|
+
- Create new product/structure/tech.md from interview results
|
|
229
586
|
|
|
230
|
-
**
|
|
231
|
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
- **Skip**: Keep current file (terminate task)
|
|
587
|
+
- **"Skip (Keep Current)"** (`answers["0"] === "Skip"`) → End task
|
|
588
|
+
- Terminate /alfred:0-project execution
|
|
589
|
+
- Preserve all existing files unchanged
|
|
590
|
+
- User must manually run if changes needed
|
|
235
591
|
|
|
236
|
-
**
|
|
237
|
-
- **"Merge"** → Proceed to Phase 1.1 (backup merge workflow)
|
|
238
|
-
- **"Create new"** → Proceed to Phase 1.2 (Project environment analysis) (existing process)
|
|
239
|
-
- **"Skip"** → End task
|
|
592
|
+
**No backup found**:
|
|
240
593
|
|
|
241
|
-
|
|
594
|
+
- Display: "✅ No previous backup detected. Starting fresh interview..."
|
|
242
595
|
- Proceed directly to Phase 1.2 (project environment analysis)
|
|
243
596
|
|
|
244
597
|
---
|
|
245
598
|
|
|
246
|
-
### 1.1 Backup merge workflow (when user selects
|
|
599
|
+
### 1.1 Backup merge workflow (when user selects "Merge")
|
|
247
600
|
|
|
248
601
|
**Purpose**: Restore only user customizations while maintaining the latest template structure.
|
|
249
602
|
|
|
250
603
|
**STEP 1: Read backup file**
|
|
251
604
|
|
|
252
605
|
Alfred reads files from the latest backup directory:
|
|
606
|
+
|
|
253
607
|
```bash
|
|
254
608
|
# Latest backup directory path
|
|
255
609
|
BACKUP_DIR=.moai-backups/$(ls -t .moai-backups/ | head -1)
|
|
@@ -264,6 +618,7 @@ Read $BACKUP_DIR/CLAUDE.md
|
|
|
264
618
|
**STEP 2: Detect template defaults**
|
|
265
619
|
|
|
266
620
|
The following patterns are considered "template defaults" (not merged):
|
|
621
|
+
|
|
267
622
|
- "Define your key user base"
|
|
268
623
|
- "Describe the core problem you are trying to solve"
|
|
269
624
|
- "List the strengths and differences of your project"
|
|
@@ -273,34 +628,36 @@ The following patterns are considered "template defaults" (not merged):
|
|
|
273
628
|
**STEP 3: Extract user customization**
|
|
274
629
|
|
|
275
630
|
Extract only **non-template default content** from the backup file:
|
|
631
|
+
|
|
276
632
|
- `product.md`:
|
|
277
633
|
- Define your actual user base in the USER section
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
634
|
+
- Describe the actual problem in the PROBLEM section
|
|
635
|
+
- Real differences in the STRATEGY section
|
|
636
|
+
- Actual success metrics in the SUCCESS section
|
|
281
637
|
- `structure.md`:
|
|
282
638
|
- Actual design in the ARCHITECTURE section
|
|
283
|
-
|
|
284
|
-
|
|
639
|
+
- Actual module structure in the MODULES section
|
|
640
|
+
- Actual integration plan in the INTEGRATION section
|
|
285
641
|
- `tech.md`:
|
|
286
642
|
- The actual technology stack
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
643
|
+
in the STACK section - The actual framework
|
|
644
|
+
in the FRAMEWORK section - The actual quality policy
|
|
645
|
+
in the QUALITY section - `HISTORY` section: **Full Preservation** (all files)
|
|
290
646
|
|
|
291
647
|
**STEP 4: Merge Strategy**
|
|
292
648
|
|
|
293
649
|
```markdown
|
|
294
650
|
Latest template structure (v0.4.0+)
|
|
295
|
-
|
|
651
|
+
↓
|
|
296
652
|
Insert user customization (extracted from backup file)
|
|
297
|
-
|
|
653
|
+
↓
|
|
298
654
|
HISTORY section updates
|
|
299
|
-
|
|
655
|
+
↓
|
|
300
656
|
Version update (v0.1.x → v0.1.x+1)
|
|
301
657
|
```
|
|
302
658
|
|
|
303
659
|
**Merge Principle**:
|
|
660
|
+
|
|
304
661
|
- ✅ Maintain the latest version of the template structure (section order, header, @TAG format)
|
|
305
662
|
- ✅ Insert only user customization (actual content written)
|
|
306
663
|
- ✅ Cumulative preservation of the HISTORY section (existing history + merge history)
|
|
@@ -309,6 +666,7 @@ Version update (v0.1.x → v0.1.x+1)
|
|
|
309
666
|
**STEP 5: HISTORY Section Update**
|
|
310
667
|
|
|
311
668
|
After the merge is complete, add history to the HISTORY section of each file:
|
|
669
|
+
|
|
312
670
|
```yaml
|
|
313
671
|
### v0.1.x+1 (2025-10-19)
|
|
314
672
|
- **UPDATED**: Merge backup files (automatic optimization)
|
|
@@ -320,6 +678,7 @@ After the merge is complete, add history to the HISTORY section of each file:
|
|
|
320
678
|
**STEP 6: Update config.json**
|
|
321
679
|
|
|
322
680
|
Set optimization flags after the merge is complete:
|
|
681
|
+
|
|
323
682
|
```json
|
|
324
683
|
{
|
|
325
684
|
"project": {
|
|
@@ -336,27 +695,32 @@ Set optimization flags after the merge is complete:
|
|
|
336
695
|
✅ Backup merge completed!
|
|
337
696
|
|
|
338
697
|
📁 Merged files:
|
|
698
|
+
|
|
339
699
|
- .moai/project/product.md (v0.1.4 → v0.1.5)
|
|
340
700
|
- .moai/project/structure.md (v0.1.1 → v0.1.2)
|
|
341
701
|
- .moai/project/tech.md (v0.1.1 → v0.1.2)
|
|
342
702
|
- .moai/config.json (optimized: false → true)
|
|
343
703
|
|
|
344
704
|
🔍 Merge history:
|
|
705
|
+
|
|
345
706
|
- USER section: Restore customized contents of backup file
|
|
346
707
|
- PROBLEM section: Restore problem description of backup file
|
|
347
708
|
- STRATEGY section: Restore differentials of backup file
|
|
348
709
|
- HISTORY section: Add merge history (cumulative retention)
|
|
349
710
|
|
|
350
711
|
💾 Backup file location:
|
|
712
|
+
|
|
351
713
|
- Original backup: .moai-backups/20251018-003638/
|
|
352
714
|
- Retention period: Permanent (until manual deletion)
|
|
353
715
|
|
|
354
716
|
📋 Next steps:
|
|
717
|
+
|
|
355
718
|
1. Review the merged document
|
|
356
719
|
2. Additional modifications if necessary
|
|
357
720
|
3. Create your first SPEC with /alfred:1-plan
|
|
358
721
|
|
|
359
722
|
---
|
|
723
|
+
|
|
360
724
|
**Task completed: /alfred:0-project terminated**
|
|
361
725
|
```
|
|
362
726
|
|
|
@@ -369,9 +733,10 @@ Set optimization flags after the merge is complete:
|
|
|
369
733
|
**Automatically analyzed items**:
|
|
370
734
|
|
|
371
735
|
1. **Project Type Detection**
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
736
|
+
Alfred classifies new vs existing projects by analyzing the directory structure:
|
|
737
|
+
|
|
738
|
+
- Empty directory → New project
|
|
739
|
+
- Code/documentation present → Existing project
|
|
375
740
|
|
|
376
741
|
2. **Auto-detect language/framework**: Detects the main language of your project based on file patterns
|
|
377
742
|
- pyproject.toml, requirements.txt → Python
|
|
@@ -379,19 +744,22 @@ Set optimization flags after the merge is complete:
|
|
|
379
744
|
- pom.xml, build.gradle → Java
|
|
380
745
|
- go.mod → Go
|
|
381
746
|
- Cargo.toml → Rust
|
|
747
|
+
|
|
382
748
|
- backend/ + frontend/ → full stack
|
|
383
749
|
|
|
384
750
|
3. **Document status analysis**
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
751
|
+
|
|
752
|
+
- Check the status of existing `.moai/project/*.md` files
|
|
753
|
+
- Identify areas of insufficient information
|
|
754
|
+
- Organize items that need supplementation
|
|
388
755
|
|
|
389
756
|
4. **Project structure evaluation**
|
|
390
|
-
- Directory structure complexity
|
|
391
|
-
- Monolingual vs. hybrid vs. microservice
|
|
392
|
-
- Code base size estimation
|
|
393
757
|
|
|
394
|
-
|
|
758
|
+
- Directory structure complexity
|
|
759
|
+
- Monolingual vs. hybrid vs. microservice
|
|
760
|
+
- Code base size estimation
|
|
761
|
+
|
|
762
|
+
### 1.3 Establish interview strategy (when user selects "New")
|
|
395
763
|
|
|
396
764
|
**Select question tree by project type**:
|
|
397
765
|
|
|
@@ -402,62 +770,134 @@ Set optimization flags after the merge is complete:
|
|
|
402
770
|
| **TypeScript conversion** | Migration Strategy | TypeScript conversion for existing projects |
|
|
403
771
|
|
|
404
772
|
**Question Priority**:
|
|
773
|
+
|
|
405
774
|
- **Essential Questions**: Core Business Value, Key User Bases (all projects)
|
|
406
775
|
- **Technical Questions**: Language/Framework, Quality Policy, Deployment Strategy
|
|
407
776
|
- **Governance**: Security Requirements, Traceability Strategy (Optional)
|
|
408
777
|
|
|
409
|
-
### 1.4 Generate Interview Plan Report (when user selects
|
|
778
|
+
### 1.4 Generate Interview Plan Report (when user selects "Create New")
|
|
779
|
+
|
|
780
|
+
**Purpose**: Present user with a clear interview plan before execution, allowing review and modification.
|
|
410
781
|
|
|
411
782
|
**Format of plan to be presented to users**:
|
|
412
783
|
|
|
413
784
|
```markdown
|
|
414
|
-
## 📊 Project
|
|
785
|
+
## 📊 Project Initialization Plan: [PROJECT-NAME]
|
|
415
786
|
|
|
416
787
|
### Environmental Analysis Results
|
|
788
|
+
|
|
417
789
|
- **Project Type**: [New/Existing/Hybrid]
|
|
418
|
-
- **Languages
|
|
790
|
+
- **Languages Detected**: [Language List]
|
|
419
791
|
- **Current Document Status**: [Completeness Rating 0-100%]
|
|
420
792
|
- **Structure Complexity**: [Simple/Medium/Complex]
|
|
421
793
|
|
|
422
|
-
### 🎯 Interview
|
|
423
|
-
- **Question category**: Product Discovery / Structure / Tech
|
|
424
|
-
- **Expected number of questions**: [N (M required + K optional)]
|
|
425
|
-
- **Estimated time required**: [Time estimation]
|
|
426
|
-
- **Priority area**: [Focus on Areas to be covered]
|
|
794
|
+
### 🎯 Interview Strategy
|
|
427
795
|
|
|
428
|
-
|
|
429
|
-
- **
|
|
430
|
-
- **
|
|
431
|
-
- **
|
|
796
|
+
- **Question Category**: Product Discovery / Structure / Tech
|
|
797
|
+
- **Expected Number of Questions**: [N questions (M required + K optional)]
|
|
798
|
+
- **Estimated Time Required**: [Time estimation, e.g., 15-20 minutes]
|
|
799
|
+
- **Priority Areas**: [Key focus areas to be covered]
|
|
432
800
|
|
|
433
|
-
###
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
-
|
|
801
|
+
### 📋 Interview Phases
|
|
802
|
+
|
|
803
|
+
1. **Product Discovery** (product.md)
|
|
804
|
+
|
|
805
|
+
- Core mission and value proposition
|
|
806
|
+
- Key user bases and success metrics
|
|
807
|
+
|
|
808
|
+
2. **Structure Blueprint** (structure.md)
|
|
809
|
+
|
|
810
|
+
- System architecture strategy
|
|
811
|
+
- Module boundaries and responsibility
|
|
812
|
+
|
|
813
|
+
3. **Tech Stack Mapping** (tech.md)
|
|
814
|
+
- Language/framework selection
|
|
815
|
+
- Quality and deployment policies
|
|
816
|
+
|
|
817
|
+
### ⚠️ Important Notes
|
|
818
|
+
|
|
819
|
+
- **Existing Document**: [Overwrite/Merge/Supplement strategy]
|
|
820
|
+
- **Language Settings**: [Conversation language: {{CONVERSATION_LANGUAGE_NAME}}]
|
|
821
|
+
- **Team Mode**: [Personal/Team workflow configured]
|
|
822
|
+
- **Configuration**: [Compatibility with existing config.json]
|
|
823
|
+
|
|
824
|
+
### ✅ Expected Deliverables
|
|
825
|
+
|
|
826
|
+
- **product.md**: Business requirements and strategy document
|
|
827
|
+
- **structure.md**: System architecture and design document
|
|
828
|
+
- **tech.md**: Technology stack and quality policy document
|
|
829
|
+
- **config.json**: Project settings and configurations
|
|
438
830
|
|
|
439
831
|
---
|
|
440
|
-
|
|
441
|
-
|
|
832
|
+
|
|
833
|
+
**Please review the plan above and confirm whether to proceed.**
|
|
442
834
|
```
|
|
443
835
|
|
|
444
|
-
### 1.5
|
|
836
|
+
### 1.5 User Approval with AskUserQuestion (when user selects "New")
|
|
837
|
+
|
|
838
|
+
After Alfred generates the interview plan report, call `AskUserQuestion` tool (documented in moai-alfred-interactive-questions skill) to get explicit user approval before starting the interview.
|
|
839
|
+
|
|
840
|
+
**Example AskUserQuestion Call**:
|
|
841
|
+
|
|
842
|
+
```python
|
|
843
|
+
AskUserQuestion(
|
|
844
|
+
questions=[
|
|
845
|
+
{
|
|
846
|
+
"question": "Please review the interview plan above. Would you like to proceed with this plan?",
|
|
847
|
+
"header": "Interview Plan Approval",
|
|
848
|
+
"multiSelect": false,
|
|
849
|
+
"options": [
|
|
850
|
+
{
|
|
851
|
+
"label": "✅ Proceed with Plan",
|
|
852
|
+
"description": "Start interview following the plan above (Phase 2)"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"label": "📋 Modify Plan",
|
|
856
|
+
"description": "Revise strategy and re-run analysis (back to Phase 1)"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"label": "⏹️ Cancel",
|
|
860
|
+
"description": "Exit initialization, keep existing files unchanged"
|
|
861
|
+
}
|
|
862
|
+
]
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
)
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
**Response Processing**:
|
|
869
|
+
|
|
870
|
+
- **"Proceed with Plan"** (`answers["0"] === "Proceed"`) → Execute Phase 2
|
|
871
|
+
|
|
872
|
+
- Call project-manager agent with approved plan parameters
|
|
873
|
+
- Conduct interview according to the plan
|
|
874
|
+
- Generate product/structure/tech.md documents
|
|
875
|
+
- Save config.json with all settings
|
|
445
876
|
|
|
446
|
-
|
|
447
|
-
- **Proceed**: Interview conducted according to approved plan
|
|
448
|
-
- **Modify**: Re-establish the plan (re-execute Phase 1)
|
|
449
|
-
- **Stop**: Stop initialization
|
|
877
|
+
- **"Modify Plan"** (`answers["0"] === "Modify"`) → Repeat Phase 1
|
|
450
878
|
|
|
451
|
-
|
|
452
|
-
-
|
|
453
|
-
-
|
|
454
|
-
-
|
|
879
|
+
- Return to environmental analysis
|
|
880
|
+
- Re-run project type detection
|
|
881
|
+
- Re-run language detection
|
|
882
|
+
- Generate new interview plan with user feedback
|
|
883
|
+
- Ask for approval again with modified plan
|
|
884
|
+
|
|
885
|
+
- **"Cancel"** (`answers["0"] === "Cancel"`) → End task
|
|
886
|
+
- Terminate /alfred:0-project execution
|
|
887
|
+
- Do not modify any existing files
|
|
888
|
+
- User can re-run command later
|
|
889
|
+
|
|
890
|
+
**Phase 2 Execution Condition**:
|
|
891
|
+
|
|
892
|
+
- Only proceed to Phase 2 (project initialization) if user confirms "Proceed with Plan"
|
|
893
|
+
- All other responses lead to re-planning or task termination
|
|
455
894
|
|
|
456
895
|
---
|
|
457
896
|
|
|
458
|
-
## 🚀 STEP 2: Execute project initialization (after user approves
|
|
897
|
+
## 🚀 STEP 2: Execute project initialization (after user approves "New")
|
|
459
898
|
|
|
460
899
|
**Note**: This step will only be executed if the user selects **"New"**.
|
|
900
|
+
|
|
461
901
|
- When selecting "Merge": End the task in Phase 1.1 (Merge Backups)
|
|
462
902
|
- When selecting "Skip": End the task
|
|
463
903
|
- When selecting "New": Proceed with the process below
|
|
@@ -469,51 +909,89 @@ After user approval, the project-manager agent performs initialization.
|
|
|
469
909
|
Alfred starts project initialization by calling the project-manager agent with the following parameters:
|
|
470
910
|
|
|
471
911
|
**Parameters passed to project-manager**:
|
|
912
|
+
|
|
472
913
|
- **conversation_language** (from STEP 0): Language code selected by user (e.g., "ko", "en", "ja", "zh")
|
|
473
914
|
- **language_name** (from STEP 0): Display name of selected language (e.g., "Korean", "English")
|
|
915
|
+
- **agent_prompt_language** (from STEP 0.1.2) - **NEW**:
|
|
916
|
+
- `"english"` = All sub-agent prompts in English (Global Standard)
|
|
917
|
+
- `"localized"` = All sub-agent prompts in selected conversation_language (Localized)
|
|
474
918
|
- Detected Languages: [Language List from codebase detection]
|
|
475
919
|
- Project Type: [New/Existing]
|
|
476
920
|
- Existing Document Status: [Existence/Absence]
|
|
477
921
|
- Approved Interview Plan: [Plan Summary]
|
|
922
|
+
- **Team Mode Git Workflow** (from STEP 0.1.3):
|
|
923
|
+
- `spec_git_workflow: "feature_branch" | "develop_direct" | "per_spec"` (팀 모드만)
|
|
478
924
|
|
|
479
925
|
**Execution**:
|
|
926
|
+
|
|
480
927
|
```
|
|
481
928
|
Call the Task tool:
|
|
482
929
|
- subagent_type: "project-manager"
|
|
483
930
|
- description: "Initialize project with conversation language support"
|
|
484
|
-
- prompt: """
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
-
|
|
488
|
-
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
-
|
|
496
|
-
- structure.md
|
|
497
|
-
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
931
|
+
- prompt: """당신은 project-manager 에이전트입니다.
|
|
932
|
+
|
|
933
|
+
언어 설정:
|
|
934
|
+
- 대화_언어: {{CONVERSATION_LANGUAGE}} (모든 대화, 문서에 사용)
|
|
935
|
+
- 언어명: {{CONVERSATION_LANGUAGE_NAME}}
|
|
936
|
+
- 에이전트_프롬프트_언어: {{AGENT_PROMPT_LANGUAGE}} (내부 sub-agent 통신 언어)
|
|
937
|
+
|
|
938
|
+
에이전트 프롬프트 언어에 따른 작업 방식:
|
|
939
|
+
|
|
940
|
+
1. **agent_prompt_language = "english"** (Global Standard):
|
|
941
|
+
- 당신(project-manager)은 **영어**로 사고하고 작업합니다
|
|
942
|
+
- 모든 내부 분석과 계획을 영어로 진행합니다
|
|
943
|
+
- 생성된 product.md, structure.md, tech.md는 **{{CONVERSATION_LANGUAGE}}**로 작성합니다
|
|
944
|
+
- Sub-agent들(spec-builder 등)에게 전달하는 프롬프트는 **영어**입니다
|
|
945
|
+
|
|
946
|
+
2. **agent_prompt_language = "localized"** (Localized):
|
|
947
|
+
- 당신(project-manager)은 **{{CONVERSATION_LANGUAGE}}**로 사고하고 작업합니다
|
|
948
|
+
- 모든 내부 분석과 계획을 {{CONVERSATION_LANGUAGE}}로 진행합니다
|
|
949
|
+
- 생성된 product.md, structure.md, tech.md는 **{{CONVERSATION_LANGUAGE}}**로 작성합니다
|
|
950
|
+
- Sub-agent들(spec-builder 등)에게 전달하는 프롬프트도 **{{CONVERSATION_LANGUAGE}}**입니다
|
|
951
|
+
|
|
952
|
+
중요: 대화_언어(conversation_language)와 에이전트_프롬프트_언어(agent_prompt_language)는 다를 수 있습니다!
|
|
953
|
+
- 대화_언어는 **사용자와의 대화**, **생성 문서**에 사용
|
|
954
|
+
- 에이전트_프롬프트_언어는 **sub-agents 통신**, **내부 prompt**에 사용
|
|
955
|
+
|
|
956
|
+
GIT 워크플로우 설정 (팀 모드):
|
|
957
|
+
- spec_git_workflow: [feature_branch | develop_direct | per_spec]
|
|
958
|
+
- "feature_branch": feature/spec-* 브랜치 생성, PR 기반 리뷰, develop 병합
|
|
959
|
+
- "develop_direct": develop에 직접 커밋, 브랜치 생성 안 함
|
|
960
|
+
- "per_spec": SPEC별로 사용자에게 물어봄 (/alfred:1-plan 실행 중)
|
|
961
|
+
- 참고: 이 값을 .moai/config.json github.spec_git_workflow에 저장하여 git-manager가 참조하도록
|
|
962
|
+
|
|
963
|
+
프로젝트_타입: [new|existing]
|
|
964
|
+
감지된_언어들: [감지된 코드베이스 언어들]
|
|
965
|
+
|
|
966
|
+
중요 지시사항:
|
|
967
|
+
모든 인터뷰와 생성된 문서는 대화_언어(conversation_language)로 작성되어야 합니다:
|
|
968
|
+
- product.md: {{CONVERSATION_LANGUAGE}}로 생성
|
|
969
|
+
- structure.md: {{CONVERSATION_LANGUAGE}}로 생성
|
|
970
|
+
- tech.md: {{CONVERSATION_LANGUAGE}}로 생성
|
|
971
|
+
|
|
972
|
+
conversation_language가 'ko'인 경우: 모든 설명 내용을 한국어로
|
|
973
|
+
conversation_language가 'ja'인 경우: 모든 설명 내용을 일본어로
|
|
974
|
+
다른 언어인 경우: 지정된 언어를 따릅니다
|
|
975
|
+
|
|
976
|
+
프로젝트 초기화 후, 다음과 같이 .moai/config.json 업데이트:
|
|
504
977
|
{
|
|
505
978
|
"language": {
|
|
506
979
|
"conversation_language": "{{CONVERSATION_LANGUAGE}}",
|
|
507
|
-
"conversation_language_name": "{{CONVERSATION_LANGUAGE_NAME}}"
|
|
980
|
+
"conversation_language_name": "{{CONVERSATION_LANGUAGE_NAME}}",
|
|
981
|
+
"agent_prompt_language": "{{AGENT_PROMPT_LANGUAGE}}"
|
|
982
|
+
},
|
|
983
|
+
"github": {
|
|
984
|
+
"spec_git_workflow": "[feature_branch|develop_direct|per_spec]"
|
|
508
985
|
}
|
|
509
986
|
}
|
|
510
987
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
- Skill("moai-alfred-language-detection")
|
|
514
|
-
- Skill("moai-foundation-langs")
|
|
988
|
+
스킬 호출:
|
|
989
|
+
필요 시 명시적 Skill() 호출 사용:
|
|
990
|
+
- Skill("moai-alfred-language-detection") - 코드베이스 언어 감지
|
|
991
|
+
- Skill("moai-foundation-langs") - 다국어 프로젝트 설정
|
|
515
992
|
|
|
516
|
-
|
|
993
|
+
작업: 프로젝트 인터뷰를 진행하고 product/structure/tech.md 문서를 생성/업데이트합니다.
|
|
994
|
+
에이전트_프롬프트_언어 설정에 따라 sub-agent들과의 통신 언어를 결정합니다."""
|
|
517
995
|
```
|
|
518
996
|
|
|
519
997
|
**Outcome**: The project-manager agent conducts structured interviews entirely in the selected language and creates/updates product/structure/tech.md documents in that language.
|
|
@@ -526,9 +1004,10 @@ After the project-manager has finished creating the document, **Alfred can optio
|
|
|
526
1004
|
|
|
527
1005
|
| Conditions | Automatic selection Skill | Purpose |
|
|
528
1006
|
| ------------------------------------ | ---------------------------- | -------------------------------------- |
|
|
529
|
-
| User Requests
|
|
1007
|
+
| User Requests "Quality Verification" | moai-alfred-trust-validation | Initial project structure verification |
|
|
530
1008
|
|
|
531
1009
|
**Execution flow** (optional):
|
|
1010
|
+
|
|
532
1011
|
```
|
|
533
1012
|
1. project-manager completion
|
|
534
1013
|
↓
|
|
@@ -544,14 +1023,17 @@ After the project-manager has finished creating the document, **Alfred can optio
|
|
|
544
1023
|
**The project-manager agent can internally call the TUI survey skill** to check the details of the task.
|
|
545
1024
|
|
|
546
1025
|
**When to call**:
|
|
1026
|
+
|
|
547
1027
|
- Before overwriting existing project documents
|
|
548
1028
|
- When selecting language/framework
|
|
549
1029
|
- When changing important settings
|
|
550
1030
|
|
|
551
1031
|
**Example** (inside project-manager): Ask whether to "overwrite file" with `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`,
|
|
1032
|
+
|
|
552
1033
|
- Allows you to choose between **Overwrite** / **Merge** / **Skip**.
|
|
553
1034
|
|
|
554
1035
|
**Nested pattern**:
|
|
1036
|
+
|
|
555
1037
|
- **Command level** (Phase approval): Called by Alfred → "Shall we proceed with Phase 2?"
|
|
556
1038
|
- **Sub-agent level** (Detailed confirmation): Called by project-manager → "Shall we overwrite the file?"
|
|
557
1039
|
|
|
@@ -562,26 +1044,30 @@ After the project-manager has finished creating the document, **Alfred can optio
|
|
|
562
1044
|
**Interview Flow**:
|
|
563
1045
|
|
|
564
1046
|
1. **Product Discovery** (create product.md)
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
1047
|
+
|
|
1048
|
+
- Define core mission (DOC:MISSION-001)
|
|
1049
|
+
- Identify key user base (SPEC:USER-001)
|
|
1050
|
+
- Identify key problems to solve (SPEC:PROBLEM-001)
|
|
1051
|
+
- Summary of differences and strengths (DOC:STRATEGY-001)
|
|
1052
|
+
- Setting success indicators (SPEC:SUCCESS-001)
|
|
570
1053
|
|
|
571
1054
|
2. **Structure Blueprint** (create structure.md)
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
1055
|
+
|
|
1056
|
+
- Selection of architecture strategy (DOC:ARCHITECTURE-001)
|
|
1057
|
+
- Division of responsibilities by module (DOC:MODULES-001)
|
|
1058
|
+
- External system integration plan (DOC:INTEGRATION-001)
|
|
1059
|
+
- Define traceability strategy (DOC:TRACEABILITY-001)
|
|
576
1060
|
|
|
577
1061
|
3. **Tech Stack Mapping** (written by tech.md)
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
1062
|
+
|
|
1063
|
+
- Select language & runtime (DOC:STACK-001)
|
|
1064
|
+
- Determine core framework (DOC:FRAMEWORK-001)
|
|
1065
|
+
- Set quality gate (DOC:QUALITY-001)
|
|
1066
|
+
- Define security policy (DOC:SECURITY-001)
|
|
1067
|
+
- Plan distribution channels (DOC:DEPLOY-001)
|
|
583
1068
|
|
|
584
1069
|
**Automatically generate config.json**:
|
|
1070
|
+
|
|
585
1071
|
```json
|
|
586
1072
|
{
|
|
587
1073
|
"project_name": "detected-name",
|
|
@@ -602,11 +1088,13 @@ After the project-manager has finished creating the document, **Alfred can optio
|
|
|
602
1088
|
**STEP 1: Identify the overall project structure**
|
|
603
1089
|
|
|
604
1090
|
Alfred identifies the entire project structure:
|
|
1091
|
+
|
|
605
1092
|
- Visualize the directory structure using the tree or find commands
|
|
606
|
-
- Exclude build artifacts such as node_modules, .git, dist, build,
|
|
1093
|
+
- Exclude build artifacts such as node_modules, .git, dist, build, **pycache**, etc.
|
|
607
1094
|
- Identify key source directories and configuration files.
|
|
608
1095
|
|
|
609
1096
|
**Output**:
|
|
1097
|
+
|
|
610
1098
|
- Visualize the entire folder/file hierarchy of the project
|
|
611
1099
|
- Identify major directories (src/, tests/, docs/, config/, etc.)
|
|
612
1100
|
- Check language/framework hint files (package.json, pyproject.toml, go.mod, etc.)
|
|
@@ -614,12 +1102,14 @@ Alfred identifies the entire project structure:
|
|
|
614
1102
|
**STEP 2: Establish parallel analysis strategy**
|
|
615
1103
|
|
|
616
1104
|
Alfred identifies groups of files by the Glob pattern:
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1105
|
+
|
|
1106
|
+
1. **Configuration files**: _.json, _.toml, _.yaml, _.yml, \*.config.js
|
|
1107
|
+
2. **Source code files**: src/\*_/_.{ts,js,py,go,rs,java}
|
|
1108
|
+
3. **Test files**: tests/**/\*.{ts,js,py,go,rs,java}, **/_.test._, \*_/_.spec.\*
|
|
1109
|
+
4. **Documentation files**: _.md, docs/\*\*/_.md, README*, CHANGELOG*
|
|
621
1110
|
|
|
622
1111
|
**Parallel Read Strategy**:
|
|
1112
|
+
|
|
623
1113
|
- Speed up analysis by reading multiple files simultaneously with the Read tool
|
|
624
1114
|
- Batch processing for each file group
|
|
625
1115
|
- Priority: Configuration file → Core source → Test → Document
|
|
@@ -629,50 +1119,59 @@ Alfred identifies groups of files by the Glob pattern:
|
|
|
629
1119
|
As each file is read, the following information is collected:
|
|
630
1120
|
|
|
631
1121
|
1. **Configuration file analysis**
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
1122
|
+
|
|
1123
|
+
- Project metadata (name, version, description)
|
|
1124
|
+
- Dependency list and versions
|
|
1125
|
+
- Build/test script
|
|
1126
|
+
- Confirm language/framework
|
|
636
1127
|
|
|
637
1128
|
2. **Source code analysis**
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
1129
|
+
|
|
1130
|
+
- Identify major modules and classes
|
|
1131
|
+
- Architectural pattern inference (MVC, clean architecture, microservice, etc.)
|
|
1132
|
+
- Identify external API calls and integration points
|
|
1133
|
+
- Key areas of domain logic
|
|
642
1134
|
|
|
643
1135
|
3. **Test code analysis**
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
1136
|
+
|
|
1137
|
+
- Check test framework
|
|
1138
|
+
- Identify coverage settings
|
|
1139
|
+
- Identify key test scenarios
|
|
1140
|
+
- Evaluate TDD compliance
|
|
648
1141
|
|
|
649
1142
|
4. **Document analysis**
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
1143
|
+
|
|
1144
|
+
- Existing README contents
|
|
1145
|
+
- Existence of architecture document
|
|
1146
|
+
- API document status
|
|
1147
|
+
- Installation/deployment guide completeness
|
|
654
1148
|
|
|
655
1149
|
**Report Format**:
|
|
1150
|
+
|
|
656
1151
|
```markdown
|
|
657
1152
|
## Analysis results for each file
|
|
658
1153
|
|
|
659
1154
|
### Configuration file
|
|
1155
|
+
|
|
660
1156
|
- package.json: Node.js 18+, TypeScript 5.x, Vitest test
|
|
661
1157
|
- tsconfig.json: strict mode, ESNext target
|
|
662
1158
|
- biome.json: Linter/formatter settings exist
|
|
663
1159
|
|
|
664
1160
|
### Source code (src/)
|
|
1161
|
+
|
|
665
1162
|
- src/core/: Core business logic (3 modules)
|
|
666
1163
|
- src/api/: REST API endpoints (5 routers)
|
|
667
1164
|
- src/utils/: Utility functions (logging, verification, etc.)
|
|
668
1165
|
- Architecture: Hierarchical (controller) → service → repository)
|
|
669
1166
|
|
|
670
1167
|
### Tests (tests/)
|
|
1168
|
+
|
|
671
1169
|
- Vitest + @testing-library used
|
|
672
1170
|
- Unit test coverage estimated at about 60%
|
|
673
1171
|
- E2E testing lacking
|
|
674
1172
|
|
|
675
1173
|
### Documentation
|
|
1174
|
+
|
|
676
1175
|
- README.md: Only installation guide
|
|
677
1176
|
- Absence of API documentation
|
|
678
1177
|
- Absence of architecture document
|
|
@@ -683,50 +1182,60 @@ As each file is read, the following information is collected:
|
|
|
683
1182
|
Based on the collected information, it is reflected in three major documents:
|
|
684
1183
|
|
|
685
1184
|
1. Contents reflected in **product.md**
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
1185
|
+
|
|
1186
|
+
- Project mission extracted from existing README/document
|
|
1187
|
+
- Main user base and scenario inferred from code
|
|
1188
|
+
- Backtracking of core problem to be solved
|
|
1189
|
+
- Preservation of existing assets in "Legacy Context"
|
|
690
1190
|
|
|
691
1191
|
2. Contents reflected in **structure.md**
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
1192
|
+
|
|
1193
|
+
- Identified actual directory structure
|
|
1194
|
+
- Responsibility analysis results for each module
|
|
1195
|
+
- External system integration points (API calls, DB connections, etc.)
|
|
1196
|
+
- Technical debt items (marked with @CODE tag)
|
|
696
1197
|
|
|
697
1198
|
3. **tech.md reflection content**
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
1199
|
+
|
|
1200
|
+
- Languages/frameworks/libraries actually in use
|
|
1201
|
+
- Existing build/test pipeline
|
|
1202
|
+
- Status of quality gates (linter, formatter, test coverage)
|
|
1203
|
+
- Identification of security/distribution policy
|
|
1204
|
+
- Items requiring improvement (marked with TODO tags)
|
|
703
1205
|
|
|
704
1206
|
**Preservation Policy**:
|
|
1207
|
+
|
|
705
1208
|
- Supplement only the missing parts without overwriting existing documents
|
|
706
|
-
- Preserve conflicting content in the
|
|
1209
|
+
- Preserve conflicting content in the "Legacy Context" section
|
|
707
1210
|
- Mark items needing improvement with @CODE and TODO tags
|
|
708
1211
|
|
|
709
1212
|
**Example Final Report**:
|
|
1213
|
+
|
|
710
1214
|
```markdown
|
|
711
1215
|
## Complete analysis of existing project
|
|
712
1216
|
|
|
713
1217
|
### Environment Information
|
|
1218
|
+
|
|
714
1219
|
- **Language**: TypeScript 5.x (Node.js 18+)
|
|
715
1220
|
- **Framework**: Express.js
|
|
716
1221
|
- **Test**: Vitest (coverage ~60%)
|
|
717
1222
|
- **Linter/Formatter**: Biome
|
|
718
1223
|
|
|
719
1224
|
### Main findings
|
|
1225
|
+
|
|
720
1226
|
1. **Strengths**:
|
|
721
|
-
|
|
722
|
-
|
|
1227
|
+
|
|
1228
|
+
- High type safety (strict mode)
|
|
1229
|
+
- Clear module structure (separation of core/api/utils)
|
|
723
1230
|
|
|
724
1231
|
2. **Needs improvement**:
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
1232
|
+
|
|
1233
|
+
- Test coverage below 85% (TODO:TEST-COVERAGE-001)
|
|
1234
|
+
- Absence of API documentation (TODO:DOCS-API-001)
|
|
1235
|
+
- Insufficient E2E testing (@CODE:TEST-E2E-001)
|
|
728
1236
|
|
|
729
1237
|
### Next step
|
|
1238
|
+
|
|
730
1239
|
1. product/structure/tech.md creation completed
|
|
731
1240
|
2. @CODE/TODO item priority confirmation
|
|
732
1241
|
3. /alfred:Start writing an improvement SPEC with 1-spec
|
|
@@ -735,12 +1244,14 @@ Based on the collected information, it is reflected in three major documents:
|
|
|
735
1244
|
### 2.3 Document creation and verification
|
|
736
1245
|
|
|
737
1246
|
**Output**:
|
|
1247
|
+
|
|
738
1248
|
- `.moai/project/product.md` (Business Requirements)
|
|
739
1249
|
- `.moai/project/structure.md` (System Architecture)
|
|
740
1250
|
- `.moai/project/tech.md` (Technology Stack and policy)
|
|
741
1251
|
- `.moai/config.json` (project settings)
|
|
742
1252
|
|
|
743
1253
|
**Quality Verification**:
|
|
1254
|
+
|
|
744
1255
|
- [ ] Verify existence of all required @TAG sections
|
|
745
1256
|
- [ ] Verify compliance with EARS syntax format
|
|
746
1257
|
- [ ] Verify config.json syntax validity
|
|
@@ -752,20 +1263,23 @@ Based on the collected information, it is reflected in three major documents:
|
|
|
752
1263
|
✅ Project initialization complete!
|
|
753
1264
|
|
|
754
1265
|
📁 Documents generated:
|
|
1266
|
+
|
|
755
1267
|
- .moai/project/product.md (Business Definition)
|
|
756
1268
|
- .moai/project/structure.md (Architecture Design)
|
|
757
1269
|
- .moai/project/tech.md (Technology Stack)
|
|
758
1270
|
- .moai/config.json (project settings)
|
|
759
1271
|
|
|
760
1272
|
🔍 Detected environments:
|
|
1273
|
+
|
|
761
1274
|
- Language: [List of languages]
|
|
762
1275
|
- Frameworks: [List of frameworks]
|
|
763
1276
|
- Test tools: [List of tools]
|
|
764
1277
|
|
|
765
1278
|
📋 Next steps:
|
|
1279
|
+
|
|
766
1280
|
1. Review the generated document
|
|
767
1281
|
2. Create your first SPEC with /alfred:1-plan
|
|
768
|
-
3. If necessary, readjust with /alfred:
|
|
1282
|
+
3. If necessary, readjust with /alfred:0-project update
|
|
769
1283
|
```
|
|
770
1284
|
|
|
771
1285
|
### 2.5: Initial structural verification (optional)
|
|
@@ -775,6 +1289,7 @@ After project initialization is complete, you can optionally run quality verific
|
|
|
775
1289
|
**Execution Conditions**: Only when explicitly requested by the user.
|
|
776
1290
|
|
|
777
1291
|
**Verification Purpose**:
|
|
1292
|
+
|
|
778
1293
|
- Basic verification of project documentation and configuration files
|
|
779
1294
|
- Verification of compliance with the TRUST principles of the initial structure
|
|
780
1295
|
- Validation of configuration files
|
|
@@ -783,6 +1298,7 @@ After project initialization is complete, you can optionally run quality verific
|
|
|
783
1298
|
Alfred only calls the trust-checker agent to perform project initial structural verification if explicitly requested by the user.
|
|
784
1299
|
|
|
785
1300
|
**Verification items**:
|
|
1301
|
+
|
|
786
1302
|
- **Document completeness**: Check existence of required sections in product/structure/tech.md
|
|
787
1303
|
- **Settings validity**: Verify config.json JSON syntax and required fields
|
|
788
1304
|
- **TAG scheme**: Check compliance with @TAG format in document
|
|
@@ -793,18 +1309,22 @@ Alfred only calls the trust-checker agent to perform project initial structural
|
|
|
793
1309
|
**Handling verification results**:
|
|
794
1310
|
|
|
795
1311
|
✅ **Pass**: Can proceed to next step
|
|
1312
|
+
|
|
796
1313
|
- Documents and settings are all normal
|
|
797
1314
|
|
|
798
1315
|
⚠️ **Warning**: Proceed after warning
|
|
1316
|
+
|
|
799
1317
|
- Some optional sections are missing
|
|
800
1318
|
- Recommendations not applied
|
|
801
1319
|
|
|
802
1320
|
❌ **Critical**: Needs fix
|
|
1321
|
+
|
|
803
1322
|
- Required section missing
|
|
804
1323
|
- config.json syntax error
|
|
805
|
-
- User choice:
|
|
1324
|
+
- User choice: "Revalidate after fix" or "Skip"
|
|
806
1325
|
|
|
807
1326
|
**Skip verification**:
|
|
1327
|
+
|
|
808
1328
|
- Verification is not run by default
|
|
809
1329
|
- Run only when explicitly requested by the user
|
|
810
1330
|
|
|
@@ -829,11 +1349,11 @@ cc-manager selects the required sub-agents and skills based on the briefing.The
|
|
|
829
1349
|
|
|
830
1350
|
| Project requirements (document basis) | Recommended sub-agent/skill | Purpose |
|
|
831
1351
|
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
832
|
-
| High quality and coverage goals (
|
|
833
|
-
| Traceability/TAG improvement request (
|
|
1352
|
+
| High quality and coverage goals (product.md:SPEC:SUCCESS-001) | `tdd-implementer`, `moai-essentials-debug`, `moai-essentials-review` | Establishment of RED·GREEN·REFACTOR workflow |
|
|
1353
|
+
| Traceability/TAG improvement request (structure.md:DOC:TRACEABILITY-001) | `doc-syncer`, `moai-alfred-tag-scanning`, `moai-alfred-trust-validation` | Enhanced TAG traceability and document/code synchronization |
|
|
834
1354
|
| Deployment automation/branch strategy required (`structure.md` Architecture/TODO) | `git-manager`, `moai-alfred-git-workflow`, `moai-foundation-git` | Branch Strategy·Commit Policy·PR Automation |
|
|
835
|
-
| Refactoring legacy modules (`product.md` BACKLOG, `tech.md` TODO) | `implementation-planner`, `moai-essentials-refactor`
|
|
836
|
-
| Strengthening regulatory/security compliance (
|
|
1355
|
+
| Refactoring legacy modules (`product.md` BACKLOG, `tech.md` TODO) | `implementation-planner`, `moai-essentials-refactor` | Technical Debt Diagnosis and Refactoring Roadmap |
|
|
1356
|
+
| Strengthening regulatory/security compliance (tech.md:DOC:SECURITY-001) | `quality-gate`, `moai-alfred-trust-validation`, `moai-foundation-trust`, `moai-domain-security` | TRUST S (Secured) and Trackable Compliance, Security Consulting |
|
|
837
1357
|
| CLI Automation/Tooling Requirements (`tech.md` BUILD/CLI section) | `implementation-planner`, `moai-domain-cli-tool`, detected language skills (e.g. `moai-lang-python`) | CLI command design, input/output standardization |
|
|
838
1358
|
| Data analysis/reporting needs (`product.md` DATA, `tech.md` ANALYTICS) | `implementation-planner`, `moai-domain-data-science`, detected language skills | Data Pipeline·Notebook Job Definition |
|
|
839
1359
|
| Improved database structure (`structure.md` DB, `tech.md` STORAGE) | `doc-syncer`, `moai-domain-database`, `moai-alfred-tag-scanning` | Strengthening schema documentation and TAG-DB mapping |
|
|
@@ -844,6 +1364,7 @@ cc-manager selects the required sub-agents and skills based on the briefing.The
|
|
|
844
1364
|
| Requires onboarding/training mode (`tech.md` STACK description, etc.) | `moai-alfred-interactive-questions`, `moai-adk-learning`, `agentic-coding` Output style | Enhanced interview TUI and automatically provided onboarding materials |
|
|
845
1365
|
|
|
846
1366
|
> **Language/Domain Skill Selection Rules**
|
|
1367
|
+
>
|
|
847
1368
|
> - Select and add one relevant language skill (`moai-lang-python`, `moai-lang-java`, …) based on the `moai-alfred-language-detection` results or the stack recorded in the Tech section of the briefing.
|
|
848
1369
|
> - Skills listed in the domain row are automatically included by cc-manager in the `selected_skills` list when the conditions are met.
|
|
849
1370
|
> - The skill directory is always copied in its entirety, and only actual activation is recorded in `skill_pack` and `CLAUDE.md`.
|
|
@@ -852,20 +1373,25 @@ If multiple conditions are met, the candidates are merged without duplicates and
|
|
|
852
1373
|
|
|
853
1374
|
#### 2.6.2 User confirmation flow
|
|
854
1375
|
|
|
855
|
-
`AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks
|
|
1376
|
+
`AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks "whether to enable recommended items."
|
|
1377
|
+
|
|
856
1378
|
- Provides three options: **Install all** / **Install selectively** / **Do not install**.
|
|
857
|
-
Selecting
|
|
1379
|
+
Selecting "Selective Install" presents the list of candidates again as multiple choices, allowing the user to select only the items they need.
|
|
858
1380
|
|
|
859
1381
|
#### 2.6.3 Activation and Recording Steps
|
|
860
1382
|
|
|
861
1383
|
1. **Preparing briefing**: Organize the results of user selection (install all/install selectively) and the full text of `cc_manager_briefing`.
|
|
862
1384
|
2. **Call the cc-manager agent**:
|
|
1385
|
+
|
|
863
1386
|
- Call `subagent_type: "cc-manager"` with the `Task` tool and include a briefing and user selections in the prompt.
|
|
864
1387
|
- cc-manager determines the necessary sub-agents and skills based on the briefing, and copies and updates `CLAUDE.md`, `.claude/agents/alfred/*.md`, and `.claude/skills/*.md` as customized for the project.
|
|
1388
|
+
|
|
865
1389
|
3. **Check for configuration updates**: Review the results reflected by cc-manager.
|
|
866
|
-
|
|
867
|
-
-
|
|
868
|
-
-
|
|
1390
|
+
|
|
1391
|
+
- Sub-Agents: Keep the `.claude/agents/alfred/` template active and list it in the `CLAUDE.md` "Agents" section.
|
|
1392
|
+
- Skills: Check the `.claude/skills/` document and add it to the `CLAUDE.md` "Skills" section.
|
|
1393
|
+
- Output style: Apply `.claude/output-styles/alfred/` and record the activation in `CLAUDE.md` "Output Styles".
|
|
1394
|
+
|
|
869
1395
|
4. **Update config.json**
|
|
870
1396
|
```json
|
|
871
1397
|
{
|
|
@@ -877,27 +1403,30 @@ Selecting “Selective Install” presents the list of candidates again as multi
|
|
|
877
1403
|
}
|
|
878
1404
|
}
|
|
879
1405
|
```
|
|
880
|
-
Merge existing properties, if any.
|
|
881
|
-
5. **Final Report**: Add a list of
|
|
1406
|
+
Merge existing properties, if any.
|
|
1407
|
+
5. **Final Report**: Add a list of "Activated Sub-Agents/Skills/Style" and a `cc_manager_briefing` summary at the top of the Completion Report, and reflect the same contents in the `CLAUDE.md` table so that they are automatically searched in subsequent commands.
|
|
882
1408
|
|
|
883
1409
|
## Interview guide by project type
|
|
884
1410
|
|
|
885
1411
|
### New project interview area
|
|
886
1412
|
|
|
887
1413
|
**Product Discovery** (product.md)
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
1414
|
+
|
|
1415
|
+
- Core mission and value proposition
|
|
1416
|
+
- Key user bases and needs
|
|
1417
|
+
- 3 key problems to solve
|
|
1418
|
+
- Differentiation compared to competing solutions
|
|
1419
|
+
- Measurable indicators of success
|
|
893
1420
|
|
|
894
1421
|
**Structure Blueprint** (structure.md)
|
|
1422
|
+
|
|
895
1423
|
- System architecture strategy
|
|
896
1424
|
- Separation of modules and division of responsibilities
|
|
897
1425
|
- External system integration plan
|
|
898
1426
|
- @TAG-based traceability strategy
|
|
899
1427
|
|
|
900
1428
|
**Tech Stack Mapping** (tech.md)
|
|
1429
|
+
|
|
901
1430
|
- Language/runtime selection and version
|
|
902
1431
|
- Framework and libraries
|
|
903
1432
|
- Quality gate policy (coverage, linter)
|
|
@@ -906,6 +1435,7 @@ Merge existing properties, if any.
|
|
|
906
1435
|
### Existing project interview area
|
|
907
1436
|
|
|
908
1437
|
**Legacy Analysis**
|
|
1438
|
+
|
|
909
1439
|
- Identify current code structure and modules
|
|
910
1440
|
- Status of build/test pipeline
|
|
911
1441
|
- Identify technical debt and constraints
|
|
@@ -935,18 +1465,21 @@ Merge existing properties, if any.
|
|
|
935
1465
|
### Common errors and solutions
|
|
936
1466
|
|
|
937
1467
|
**Error 1**: Project language detection failed
|
|
1468
|
+
|
|
938
1469
|
```
|
|
939
|
-
Symptom:
|
|
1470
|
+
Symptom: "Language not detected" message
|
|
940
1471
|
Solution: Specify language manually or create language-specific settings file
|
|
941
1472
|
```
|
|
942
1473
|
|
|
943
1474
|
**Error 2**: Conflict with existing document
|
|
1475
|
+
|
|
944
1476
|
```
|
|
945
1477
|
Symptom: product.md already exists and has different contents
|
|
946
|
-
Solution: Preserve existing contents and add new contents in
|
|
1478
|
+
Solution: Preserve existing contents and add new contents in "Legacy Context" section
|
|
947
1479
|
```
|
|
948
1480
|
|
|
949
1481
|
**Error 3**: Failed to create config.json
|
|
1482
|
+
|
|
950
1483
|
```
|
|
951
1484
|
Symptom: JSON syntax error or permission denied
|
|
952
1485
|
Solution: Check file permissions (chmod 644) or create config.json manually
|
|
@@ -971,45 +1504,99 @@ This subcommand is executed under the following conditions:
|
|
|
971
1504
|
#### Phase 1: Backup analysis and comparison
|
|
972
1505
|
|
|
973
1506
|
1. **Make sure you have the latest backup**:
|
|
1507
|
+
|
|
974
1508
|
```bash
|
|
975
|
-
|
|
976
|
-
ls -lt .moai-backups/ | head -1
|
|
1509
|
+
|
|
977
1510
|
```
|
|
978
1511
|
|
|
1512
|
+
# Browse the latest backups in the .moai-backups/ directory
|
|
1513
|
+
|
|
1514
|
+
ls -lt .moai-backups/ | head -1
|
|
1515
|
+
|
|
1516
|
+
````
|
|
1517
|
+
|
|
979
1518
|
2. **Change Analysis**:
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1519
|
+
- Compare `.claude/` directory from backup with current template
|
|
1520
|
+
- Compare `.moai/project/` document from backup with current document
|
|
1521
|
+
- Identify user customization items
|
|
983
1522
|
|
|
984
1523
|
3. **Create Comparison Report**:
|
|
985
|
-
|
|
1524
|
+
```markdown
|
|
986
1525
|
## 📊 Template optimization analysis
|
|
987
1526
|
|
|
988
1527
|
### Changed items
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1528
|
+
- CLAUDE.md: "## Project Information" section needs to be preserved
|
|
1529
|
+
- settings.json: 3 env variables need to be preserved
|
|
1530
|
+
- product.md: Has user-written content
|
|
992
1531
|
|
|
993
1532
|
### Recommended Action
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1533
|
+
- Run Smart Merge
|
|
1534
|
+
- Preserve User Customizations
|
|
1535
|
+
- Set optimized=true
|
|
1536
|
+
````
|
|
1537
|
+
|
|
1538
|
+
4. **Waiting for user approval**
|
|
1539
|
+
|
|
1540
|
+
Call `AskUserQuestion` tool (documented in moai-alfred-interactive-questions skill) to obtain user approval for template optimization.
|
|
1541
|
+
|
|
1542
|
+
**Example AskUserQuestion Call**:
|
|
1543
|
+
|
|
1544
|
+
```python
|
|
1545
|
+
AskUserQuestion(
|
|
1546
|
+
questions=[
|
|
1547
|
+
{
|
|
1548
|
+
"question": "Template optimization analysis complete. Changes detected in backup vs current template. How would you like to proceed?",
|
|
1549
|
+
"header": "Template Optimization",
|
|
1550
|
+
"multiSelect": false,
|
|
1551
|
+
"options": [
|
|
1552
|
+
{
|
|
1553
|
+
"label": "✅ Proceed",
|
|
1554
|
+
"description": "Run smart merge: preserve customizations with latest template (Phase 2)"
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"label": "👀 Preview",
|
|
1558
|
+
"description": "Show detailed change list before proceeding"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"label": "⏸️ Skip",
|
|
1562
|
+
"description": "Keep current template unchanged (optimized: false)"
|
|
1563
|
+
}
|
|
1564
|
+
]
|
|
1565
|
+
}
|
|
1566
|
+
]
|
|
1567
|
+
)
|
|
1568
|
+
```
|
|
1569
|
+
|
|
1570
|
+
**Response Processing**:
|
|
998
1571
|
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
-
|
|
1002
|
-
-
|
|
1003
|
-
-
|
|
1572
|
+
- **"Proceed"** (`answers["0"] === "Proceed"`) → Execute Phase 2
|
|
1573
|
+
|
|
1574
|
+
- Run smart merge logic
|
|
1575
|
+
- Preserve user customizations from backup
|
|
1576
|
+
- Combine with latest template structure
|
|
1577
|
+
- Set `optimized: true` in config.json
|
|
1578
|
+
|
|
1579
|
+
- **"Preview"** (`answers["0"] === "Preview"`) → Display detailed changes
|
|
1580
|
+
|
|
1581
|
+
- Show file-by-file comparison
|
|
1582
|
+
- Highlight customization sections
|
|
1583
|
+
- Ask approval again with "Proceed" or "Skip" only
|
|
1584
|
+
|
|
1585
|
+
- **"Skip"** (`answers["0"] === "Skip"`) → Keep current state
|
|
1586
|
+
- Do not modify any files
|
|
1587
|
+
- Keep `optimized: false` in config.json
|
|
1588
|
+
- User can run again with `moai-adk update` later
|
|
1004
1589
|
|
|
1005
1590
|
#### Phase 2: Run smart merge (after user approval)
|
|
1006
1591
|
|
|
1007
1592
|
1. **Execute smart merge logic**:
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1593
|
+
|
|
1594
|
+
- Run `TemplateProcessor.copy_templates()`
|
|
1595
|
+
- CLAUDE.md: Preserve "## Project Information" section
|
|
1596
|
+
- settings.json: env variables and permissions.allow merge
|
|
1011
1597
|
|
|
1012
1598
|
2. Set **optimized=true**:
|
|
1599
|
+
|
|
1013
1600
|
```python
|
|
1014
1601
|
# update config.json
|
|
1015
1602
|
config_data["project"]["optimized"] = True
|
|
@@ -1017,14 +1604,17 @@ This subcommand is executed under the following conditions:
|
|
|
1017
1604
|
|
|
1018
1605
|
3. **Optimization completion report**:
|
|
1019
1606
|
```markdown
|
|
1020
|
-
✅ Template optimization completed!
|
|
1607
|
+
✅ Template optimization completed!
|
|
1608
|
+
```
|
|
1021
1609
|
|
|
1022
1610
|
📄 Merged files:
|
|
1023
|
-
|
|
1024
|
-
|
|
1611
|
+
|
|
1612
|
+
- CLAUDE.md (preserves project information)
|
|
1613
|
+
- settings.json (preserves env variables)
|
|
1025
1614
|
|
|
1026
1615
|
⚙️ config.json: optimized=true Configuration complete
|
|
1027
|
-
|
|
1616
|
+
|
|
1617
|
+
````
|
|
1028
1618
|
|
|
1029
1619
|
### Alfred Automation Strategy
|
|
1030
1620
|
|
|
@@ -1053,7 +1643,7 @@ moai-adk update
|
|
|
1053
1643
|
# → Phase 1: Generate backup analysis and comparison report
|
|
1054
1644
|
# → Wait for user approval
|
|
1055
1645
|
# → Phase 2: Run smart merge, set optimized=true
|
|
1056
|
-
|
|
1646
|
+
````
|
|
1057
1647
|
|
|
1058
1648
|
### caution
|
|
1059
1649
|
|
|
@@ -1066,6 +1656,7 @@ moai-adk update
|
|
|
1066
1656
|
## 🚀 STEP 3: Project Custom Optimization (Optional)
|
|
1067
1657
|
|
|
1068
1658
|
**Execution conditions**:
|
|
1659
|
+
|
|
1069
1660
|
- After completion of Phase 2 (project initialization)
|
|
1070
1661
|
- or after completion of Phase 1.1 (backup merge)
|
|
1071
1662
|
- Explicitly requested by the user or automatically determined by Alfred
|
|
@@ -1077,18 +1668,26 @@ moai-adk update
|
|
|
1077
1668
|
**Alfred automatically calls the moai-alfred-feature-selector skill**:
|
|
1078
1669
|
|
|
1079
1670
|
**Skill Entry**:
|
|
1671
|
+
|
|
1080
1672
|
- `.moai/project/product.md` (project category hint)
|
|
1081
1673
|
- `.moai/project/tech.md` (main language, framework)
|
|
1082
1674
|
- `.moai/config.json` (project settings)
|
|
1083
1675
|
|
|
1084
1676
|
**Skill Output**:
|
|
1677
|
+
|
|
1085
1678
|
```json
|
|
1086
1679
|
{
|
|
1087
1680
|
"category": "web-api",
|
|
1088
1681
|
"language": "python",
|
|
1089
1682
|
"framework": "fastapi",
|
|
1090
1683
|
"commands": ["1-spec", "2-build", "3-sync"],
|
|
1091
|
-
"agents": [
|
|
1684
|
+
"agents": [
|
|
1685
|
+
"spec-builder",
|
|
1686
|
+
"code-builder",
|
|
1687
|
+
"doc-syncer",
|
|
1688
|
+
"git-manager",
|
|
1689
|
+
"debug-helper"
|
|
1690
|
+
],
|
|
1092
1691
|
"skills": ["moai-lang-python", "moai-domain-web-api", "moai-domain-backend"],
|
|
1093
1692
|
"excluded_skills_count": 34,
|
|
1094
1693
|
"optimization_rate": "87%"
|
|
@@ -1096,6 +1695,7 @@ moai-adk update
|
|
|
1096
1695
|
```
|
|
1097
1696
|
|
|
1098
1697
|
**How to Run**:
|
|
1698
|
+
|
|
1099
1699
|
```
|
|
1100
1700
|
Alfred: Skill("moai-alfred-feature-selector")
|
|
1101
1701
|
```
|
|
@@ -1107,11 +1707,13 @@ Alfred: Skill("moai-alfred-feature-selector")
|
|
|
1107
1707
|
**Alfred automatically calls the moai-alfred-template-generator skill**:
|
|
1108
1708
|
|
|
1109
1709
|
**Skill input**:
|
|
1710
|
+
|
|
1110
1711
|
- `.moai/.feature-selection.json` (feature-selector output)
|
|
1111
1712
|
- `CLAUDE.md` template
|
|
1112
1713
|
- Entire commands/agents/skills file
|
|
1113
1714
|
|
|
1114
1715
|
**Skill Output**:
|
|
1716
|
+
|
|
1115
1717
|
- `CLAUDE.md` (custom agent table - selected agents only)
|
|
1116
1718
|
- `.claude/commands/` (selected commands only)
|
|
1117
1719
|
- `.claude/agents/` (selected agents only)
|
|
@@ -1119,6 +1721,7 @@ Alfred: Skill("moai-alfred-feature-selector")
|
|
|
1119
1721
|
- `.moai/config.json` (updates `optimized: true`)
|
|
1120
1722
|
|
|
1121
1723
|
**How to Run**:
|
|
1724
|
+
|
|
1122
1725
|
```
|
|
1123
1726
|
Alfred: Skill("moai-alfred-template-generator")
|
|
1124
1727
|
```
|
|
@@ -1128,26 +1731,31 @@ Alfred: Skill("moai-alfred-template-generator")
|
|
|
1128
1731
|
### 3.3 Optimization completion report
|
|
1129
1732
|
|
|
1130
1733
|
**Report Format**:
|
|
1734
|
+
|
|
1131
1735
|
```markdown
|
|
1132
1736
|
✅ Project customized optimization completed!
|
|
1133
1737
|
|
|
1134
1738
|
📊 Optimization results:
|
|
1739
|
+
|
|
1135
1740
|
- **Project**: MoAI-ADK
|
|
1136
1741
|
- **Category**: web-api
|
|
1137
1742
|
- **Main language**: python
|
|
1138
1743
|
- **Framework**: fastapi
|
|
1139
1744
|
|
|
1140
1745
|
🎯 Selected capabilities:
|
|
1746
|
+
|
|
1141
1747
|
- Commands: 4 items (0-project, 1-spec, 2-build, 3-sync)
|
|
1142
1748
|
- Agents: 5 items (spec-builder, code-builder, doc-syncer, git-manager, debug-helper)
|
|
1143
1749
|
- Skills: 3 items (moai-lang-python, moai-domain-web-api, moai-domain-backend)
|
|
1144
1750
|
|
|
1145
1751
|
💡 Lightweight effect:
|
|
1752
|
+
|
|
1146
1753
|
- Skills excluded: 34
|
|
1147
1754
|
- Lightweight: 87%
|
|
1148
1755
|
- CLAUDE.md: Create custom agent table
|
|
1149
1756
|
|
|
1150
1757
|
📋 Next steps:
|
|
1758
|
+
|
|
1151
1759
|
1. Check the CLAUDE.md file (only 5 agents are displayed)
|
|
1152
1760
|
2. Run /alfred:1-plan "first function"
|
|
1153
1761
|
3. Start the MoAI-ADK workflow
|
|
@@ -1160,10 +1768,12 @@ Alfred: Skill("moai-alfred-template-generator")
|
|
|
1160
1768
|
**Users can skip Phase 3**:
|
|
1161
1769
|
|
|
1162
1770
|
**Skip condition**:
|
|
1163
|
-
|
|
1164
|
-
-
|
|
1771
|
+
|
|
1772
|
+
- User explicitly selects "Skip"
|
|
1773
|
+
- "Simple project" when Alfred automatically determines (only basic features required)
|
|
1165
1774
|
|
|
1166
1775
|
**Skip effect**:
|
|
1776
|
+
|
|
1167
1777
|
- Maintain all 37 skills (no lightweighting)
|
|
1168
1778
|
- Maintain default 9 agents in CLAUDE.md template
|
|
1169
1779
|
- Maintain `optimized: false` in config.json
|
|
@@ -1181,6 +1791,61 @@ After initialization is complete:
|
|
|
1181
1791
|
- **Set Change**: Run `/alfred:0-project` again to update document
|
|
1182
1792
|
- **Template optimization**: Run `/alfred:0-project update` after `moai-adk update`
|
|
1183
1793
|
|
|
1794
|
+
## Final Step
|
|
1795
|
+
|
|
1796
|
+
After project initialization completes, Alfred automatically invokes AskUserQuestion to ask the user what to do next:
|
|
1797
|
+
|
|
1798
|
+
```python
|
|
1799
|
+
AskUserQuestion(
|
|
1800
|
+
questions=[
|
|
1801
|
+
{
|
|
1802
|
+
"question": "Project initialization complete. What would you like to do next?",
|
|
1803
|
+
"header": "Next Steps",
|
|
1804
|
+
"multiSelect": false,
|
|
1805
|
+
"options": [
|
|
1806
|
+
{
|
|
1807
|
+
"label": "📋 Start SPEC Creation",
|
|
1808
|
+
"description": "Begin first SPEC with /alfred:1-plan command"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"label": "🔍 Review Project Structure",
|
|
1812
|
+
"description": "Review and edit generated project documents"
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
"label": "🔄 Start New Session",
|
|
1816
|
+
"description": "Execute /clear for fresh session (recommended for performance)"
|
|
1817
|
+
}
|
|
1818
|
+
]
|
|
1819
|
+
}
|
|
1820
|
+
]
|
|
1821
|
+
)
|
|
1822
|
+
```
|
|
1823
|
+
|
|
1824
|
+
**Response Processing**:
|
|
1825
|
+
|
|
1826
|
+
- **"📋 Start SPEC Creation"** (`answers["0"] === "Start SPEC"`) → Proceed to `/alfred:1-plan`
|
|
1827
|
+
|
|
1828
|
+
- Display: "✅ Ready for SPEC creation workflow..."
|
|
1829
|
+
- User can immediately run: `/alfred:1-plan "first feature name"`
|
|
1830
|
+
- Continue to next phase without session break
|
|
1831
|
+
|
|
1832
|
+
- **"🔍 Review Project Structure"** (`answers["0"] === "Review"`) → Review generated documents
|
|
1833
|
+
|
|
1834
|
+
- Display: "📁 Open these files for review:"
|
|
1835
|
+
- `.moai/project/product.md` - Business requirements
|
|
1836
|
+
- `.moai/project/structure.md` - System architecture
|
|
1837
|
+
- `.moai/project/tech.md` - Technology stack
|
|
1838
|
+
- After review, user can run `/alfred:1-plan` or `/alfred:0-project` again for updates
|
|
1839
|
+
- Display: "💾 Save changes manually in editor or run `/alfred:0-project` again"
|
|
1840
|
+
|
|
1841
|
+
- **"🔄 Start New Session"** (`answers["0"] === "New Session"`) → Start fresh session
|
|
1842
|
+
- Display: "⏳ Preparing to clear session..."
|
|
1843
|
+
- Note: This improves context window management for large projects
|
|
1844
|
+
- Next session can start with: `/alfred:1-plan "next feature"`
|
|
1845
|
+
- Alternative: Type `/clear` in shell to restart manually
|
|
1846
|
+
|
|
1847
|
+
---
|
|
1848
|
+
|
|
1184
1849
|
## Related commands
|
|
1185
1850
|
|
|
1186
1851
|
- `/alfred:1-plan` - Start writing SPEC
|