moai-adk 0.15.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.

@@ -2,20 +2,21 @@
2
2
  name: alfred:0-project
3
3
  description: "Initialize project metadata and documentation"
4
4
  allowed-tools:
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
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
16
16
  ---
17
17
 
18
18
  # 📋 MoAI-ADK Step 0: Initialize/Update Universal Language Support Project Documentation
19
+
19
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.
20
21
 
21
22
  ## 🎯 Command Purpose
@@ -48,7 +49,7 @@ Automatically analyzes the project environment to create/update product/structur
48
49
 
49
50
  ## 💡 Example of use
50
51
 
51
- The user executes the `/alfred:8-project` command to analyze the project and create/update documents.
52
+ The user executes the `/alfred:0-project` command to analyze the project and create/update documents.
52
53
 
53
54
  ## Command Overview
54
55
 
@@ -61,9 +62,10 @@ It is a systematic initialization system that analyzes the project environment a
61
62
 
62
63
  ## How to use
63
64
 
64
- The user executes the `/alfred:8-project` command to start analyzing the project and creating/updating documents.
65
+ The user executes the `/alfred:0-project` command to start analyzing the project and creating/updating documents.
65
66
 
66
67
  **Automatic processing**:
68
+
67
69
  - Update mode if there is an existing `.moai/project/` document
68
70
  - New creation mode if there is no document
69
71
  - Automatic detection of language and project type
@@ -111,10 +113,12 @@ MoAI-ADK의 SuperAgent로서 당신의 프로젝트를 함께 만들어갈 준
111
113
  Alfred가 `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` 를 사용하여 **배치 호출**로 필수 정보를 수집합니다:
112
114
 
113
115
  **기본 배치 (항상 실행)**:
116
+
114
117
  - 언어 선택
115
118
  - 사용자 닉네임
116
119
 
117
120
  **추가 배치 (팀 모드 감지 시)**:
121
+
118
122
  - GitHub "Automatically delete head branches" 설정 확인
119
123
 
120
124
  #### 0.1.1 팀 모드 감지
@@ -132,6 +136,7 @@ grep "mode" .moai/config.json
132
136
  **배치 설계**: 3개 질문을 1회 호출로 통합 (UX 개선: 3 turns → 1 turn)
133
137
 
134
138
  **Example AskUserQuestion Call**:
139
+
135
140
  ```python
136
141
  AskUserQuestion(
137
142
  questions=[
@@ -191,9 +196,11 @@ AskUserQuestion(
191
196
  **응답 처리**:
192
197
 
193
198
  **Q1 (사용자 언어)**:
199
+
194
200
  - Selected option stored as: `conversation_language: "ko"` (or "en", "ja", "zh", etc.)
195
201
 
196
202
  **Q2 (에이전트 프롬프트 언어)** - **NEW**:
203
+
197
204
  - **"English (Global Standard)"** → `agent_prompt_language: "english"`
198
205
  - All sub-agent prompts written in English
199
206
  - Recommended for global teams, code consistency, and international collaboration
@@ -204,6 +211,7 @@ AskUserQuestion(
204
211
  - Project-manager receives prompts in selected language (e.g., Korean, Japanese)
205
212
 
206
213
  **Q3 (사용자 닉네임)**:
214
+
207
215
  - Custom nickname stored as: `user.nickname: "GOOS"` (or custom input)
208
216
 
209
217
  #### 0.1.3 팀 모드 추가 배치: GitHub 설정 & Git 워크플로우 선택 (팀 모드만)
@@ -213,6 +221,7 @@ AskUserQuestion(
213
221
  **배치 구성**: 2개 질문 (1회 호출로 통합)
214
222
 
215
223
  **Example AskUserQuestion Call**:
224
+
216
225
  ```python
217
226
  AskUserQuestion(
218
227
  questions=[
@@ -261,11 +270,13 @@ AskUserQuestion(
261
270
  **응답 처리**:
262
271
 
263
272
  **Q1 (GitHub 설정)**:
273
+
264
274
  - **"Yes, already enabled"** → `auto_delete_branches: true` 저장
265
275
  - **"No, not enabled"** → `auto_delete_branches: false` + 권장사항 저장
266
276
  - **"Not sure"** → `auto_delete_branches: null` + 경고 메시지
267
277
 
268
278
  **Q2 (Git 워크플로우)**:
279
+
269
280
  - **"Feature Branch + PR"** → `spec_git_workflow: "feature_branch"` 저장
270
281
  - `/alfred:1-plan` 실행 시 자동으로 feature 브랜치 생성
271
282
  - git-manager가 PR 기반 워크플로우 적용
@@ -276,6 +287,7 @@ AskUserQuestion(
276
287
  - `/alfred:1-plan` 실행 시마다 git-manager가 사용자에게 선택 요청
277
288
 
278
289
  **User Response Example**:
290
+
279
291
  ```
280
292
  Selected Language: 🇰🇷 한국어
281
293
  Selected Nickname: GOOS (typed via "Other" option)
@@ -292,6 +304,7 @@ Selected Nickname: GOOS (typed via "Other" option)
292
304
  **Batched Design**: Domain selection integrated into initial batch OR asked separately based on user preference
293
305
 
294
306
  **Example AskUserQuestion Call**:
307
+
295
308
  ```python
296
309
  AskUserQuestion(
297
310
  questions=[
@@ -335,22 +348,43 @@ AskUserQuestion(
335
348
  ```
336
349
 
337
350
  **Response Processing**:
338
- ```json
339
- {
340
- "stack": {
341
- "selected_domains": ["frontend", "backend"],
342
- "domain_selection_date": "2025-10-23T12:34:56Z"
343
- }
344
- }
345
- ```
346
351
 
347
- **Hint to User**: "You can always modify domains later during `/alfred:1-plan` when creating SPECs"
352
+ When user selects domains, Alfred processes the response as follows:
353
+
354
+ **Selected Domain Processing** (`answers["0"]` contains selected domain labels):
355
+
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`"
348
380
 
349
381
  **Domain Expert Activation**:
382
+
350
383
  - Selected domains stored in `.moai/config.json`
351
384
  - Domain-expert agents activated during `/alfred:1-plan` (automatic keyword detection)
352
385
  - Domain-expert agents available as advisors during `/alfred:2-run`
353
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`)
354
388
 
355
389
  ---
356
390
 
@@ -382,6 +416,7 @@ Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과
382
416
  **에이전트 프롬프트 언어 옵션**:
383
417
 
384
418
  - **`"english"`** (Global Standard) - **💰 Claude Pro $20 사용자 추천**:
419
+
385
420
  - All sub-agent prompts and internal communication in English
386
421
  - Best for: International teams, global collaboration, code consistency
387
422
  - Impact: Project-manager, spec-builder, code-builder all use English task prompts
@@ -399,6 +434,7 @@ Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과
399
434
  #### 0.2.2 GitHub & Git 워크플로우 설정 저장 (팀 모드만)
400
435
 
401
436
  **팀 모드 감지 시 추가 저장 - Feature Branch + PR 선택 시**:
437
+
402
438
  ```json
403
439
  {
404
440
  "github": {
@@ -411,6 +447,7 @@ Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과
411
447
  ```
412
448
 
413
449
  **또는 - Direct Commit to Develop 선택 시**:
450
+
414
451
  ```json
415
452
  {
416
453
  "github": {
@@ -423,6 +460,7 @@ Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과
423
460
  ```
424
461
 
425
462
  **또는 - Decide per SPEC 선택 시**:
463
+
426
464
  ```json
427
465
  {
428
466
  "github": {
@@ -437,16 +475,18 @@ Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과
437
475
  #### 0.2.3 저장된 정보 활용
438
476
 
439
477
  이 정보는:
478
+
440
479
  - 모든 sub-agents 에게 컨텍스트 파라미터로 전달됨
441
480
  - `.moai/config.json` 의 `language`, `user`, `github` 필드에 저장됨
442
481
  - CLAUDE.md의 `{{CONVERSATION_LANGUAGE}}` 및 `{{USER_NICKNAME}}` 변수로 치환됨
443
482
  - 모든 Alfred 대화에서 사용됨
444
483
  - **팀 모드**: git-manager가 다음 워크플로우를 자동으로 적용:
445
- - **`spec_git_workflow: "feature_branch"`**: `/alfred:1-plan` 실행 시 feature/spec-* 브랜치 생성, PR 기반 리뷰 프로세스 적용
484
+ - **`spec_git_workflow: "feature_branch"`**: `/alfred:1-plan` 실행 시 feature/spec-\* 브랜치 생성, PR 기반 리뷰 프로세스 적용
446
485
  - **`spec_git_workflow: "develop_direct"`**: `/alfred:1-plan` 실행 시 develop 브랜치에 직접 커밋, 브랜치 생성 과정 생략
447
486
  - **`spec_git_workflow: "per_spec"`**: `/alfred:1-plan` 실행 시마다 사용자에게 워크플로우 선택 요청
448
487
 
449
488
  **설정 완료 출력 예시**:
489
+
450
490
  ```markdown
451
491
  ✅ 초기 설정 완료!
452
492
 
@@ -459,6 +499,7 @@ Alfred가 선택된 언어, 닉네임, 그리고 팀 모드 설정을 다음과
459
499
  ### 0.3 STEP 1로 전환
460
500
 
461
501
  언어 및 사용자 정보 설정 완료 후, 모든 후속 상호작용이 선택된 언어로 진행됩니다:
502
+
462
503
  - Alfred의 모든 프롬프트가 선택된 언어로 번역됨
463
504
  - project-manager sub-agent이 언어 및 사용자 정보 파라미터를 수신
464
505
  - 인터뷰 질문이 선택된 언어로 진행됨
@@ -486,22 +527,71 @@ grep "optimized" .moai/config.json
486
527
  ```
487
528
 
488
529
  **Backup existence conditions**:
530
+
489
531
  - `.moai-backups/` directory exists
490
532
  - `.moai/project/*.md` file exists in the latest backup folder
491
533
  - User's existing project files can be merged (regardless of optimized flag)
492
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
+
493
540
  **Select user if backup exists**
494
- Call `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` to display a TUI with the following options:
495
- - **Merge**: Merge backup contents and latest template (recommended)
496
- - **New**: Ignore the backup and start a new interview
497
- - **Skip**: Keep current file (terminate task)
498
541
 
499
- **Response processing**:
500
- - **"Merge"** → Proceed to Phase 1.1 (backup merge workflow)
501
- - **"Create new"** → Proceed to Phase 1.2 (Project environment analysis) (existing process)
502
- - **"Skip"** → End task
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
503
586
 
504
- **No backup**:
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
591
+
592
+ **No backup found**:
593
+
594
+ - Display: "✅ No previous backup detected. Starting fresh interview..."
505
595
  - Proceed directly to Phase 1.2 (project environment analysis)
506
596
 
507
597
  ---
@@ -513,6 +603,7 @@ Call `AskUserQuestion tool (documented in moai-alfred-interactive-questions skil
513
603
  **STEP 1: Read backup file**
514
604
 
515
605
  Alfred reads files from the latest backup directory:
606
+
516
607
  ```bash
517
608
  # Latest backup directory path
518
609
  BACKUP_DIR=.moai-backups/$(ls -t .moai-backups/ | head -1)
@@ -527,6 +618,7 @@ Read $BACKUP_DIR/CLAUDE.md
527
618
  **STEP 2: Detect template defaults**
528
619
 
529
620
  The following patterns are considered "template defaults" (not merged):
621
+
530
622
  - "Define your key user base"
531
623
  - "Describe the core problem you are trying to solve"
532
624
  - "List the strengths and differences of your project"
@@ -536,34 +628,36 @@ The following patterns are considered "template defaults" (not merged):
536
628
  **STEP 3: Extract user customization**
537
629
 
538
630
  Extract only **non-template default content** from the backup file:
631
+
539
632
  - `product.md`:
540
633
  - Define your actual user base in the USER section
541
- - Describe the actual problem in the PROBLEM section
542
- - Real differences in the STRATEGY section
543
- - Actual success metrics in the SUCCESS section
634
+ - Describe the actual problem in the PROBLEM section
635
+ - Real differences in the STRATEGY section
636
+ - Actual success metrics in the SUCCESS section
544
637
  - `structure.md`:
545
638
  - Actual design in the ARCHITECTURE section
546
- - Actual module structure in the MODULES section
547
- - Actual integration plan in the INTEGRATION section
639
+ - Actual module structure in the MODULES section
640
+ - Actual integration plan in the INTEGRATION section
548
641
  - `tech.md`:
549
642
  - The actual technology stack
550
- in the STACK section - The actual framework
551
- in the FRAMEWORK section - The actual quality policy
552
- in the QUALITY section - `HISTORY` section: **Full Preservation** (all files)
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)
553
646
 
554
647
  **STEP 4: Merge Strategy**
555
648
 
556
649
  ```markdown
557
650
  Latest template structure (v0.4.0+)
558
-
651
+
559
652
  Insert user customization (extracted from backup file)
560
-
653
+
561
654
  HISTORY section updates
562
-
655
+
563
656
  Version update (v0.1.x → v0.1.x+1)
564
657
  ```
565
658
 
566
659
  **Merge Principle**:
660
+
567
661
  - ✅ Maintain the latest version of the template structure (section order, header, @TAG format)
568
662
  - ✅ Insert only user customization (actual content written)
569
663
  - ✅ Cumulative preservation of the HISTORY section (existing history + merge history)
@@ -572,6 +666,7 @@ Version update (v0.1.x → v0.1.x+1)
572
666
  **STEP 5: HISTORY Section Update**
573
667
 
574
668
  After the merge is complete, add history to the HISTORY section of each file:
669
+
575
670
  ```yaml
576
671
  ### v0.1.x+1 (2025-10-19)
577
672
  - **UPDATED**: Merge backup files (automatic optimization)
@@ -583,6 +678,7 @@ After the merge is complete, add history to the HISTORY section of each file:
583
678
  **STEP 6: Update config.json**
584
679
 
585
680
  Set optimization flags after the merge is complete:
681
+
586
682
  ```json
587
683
  {
588
684
  "project": {
@@ -599,27 +695,32 @@ Set optimization flags after the merge is complete:
599
695
  ✅ Backup merge completed!
600
696
 
601
697
  📁 Merged files:
698
+
602
699
  - .moai/project/product.md (v0.1.4 → v0.1.5)
603
700
  - .moai/project/structure.md (v0.1.1 → v0.1.2)
604
701
  - .moai/project/tech.md (v0.1.1 → v0.1.2)
605
702
  - .moai/config.json (optimized: false → true)
606
703
 
607
704
  🔍 Merge history:
705
+
608
706
  - USER section: Restore customized contents of backup file
609
707
  - PROBLEM section: Restore problem description of backup file
610
708
  - STRATEGY section: Restore differentials of backup file
611
709
  - HISTORY section: Add merge history (cumulative retention)
612
710
 
613
711
  💾 Backup file location:
712
+
614
713
  - Original backup: .moai-backups/20251018-003638/
615
714
  - Retention period: Permanent (until manual deletion)
616
715
 
617
716
  📋 Next steps:
717
+
618
718
  1. Review the merged document
619
719
  2. Additional modifications if necessary
620
720
  3. Create your first SPEC with /alfred:1-plan
621
721
 
622
722
  ---
723
+
623
724
  **Task completed: /alfred:0-project terminated**
624
725
  ```
625
726
 
@@ -632,9 +733,10 @@ Set optimization flags after the merge is complete:
632
733
  **Automatically analyzed items**:
633
734
 
634
735
  1. **Project Type Detection**
635
- Alfred classifies new vs existing projects by analyzing the directory structure:
636
- - Empty directory → New project
637
- - Code/documentation presentExisting project
736
+ Alfred classifies new vs existing projects by analyzing the directory structure:
737
+
738
+ - Empty directoryNew project
739
+ - Code/documentation present → Existing project
638
740
 
639
741
  2. **Auto-detect language/framework**: Detects the main language of your project based on file patterns
640
742
  - pyproject.toml, requirements.txt → Python
@@ -642,17 +744,20 @@ Set optimization flags after the merge is complete:
642
744
  - pom.xml, build.gradle → Java
643
745
  - go.mod → Go
644
746
  - Cargo.toml → Rust
747
+
645
748
  - backend/ + frontend/ → full stack
646
749
 
647
750
  3. **Document status analysis**
648
- - Check the status of existing `.moai/project/*.md` files
649
- - Identify areas of insufficient information
650
- - Organize items that need supplementation
751
+
752
+ - Check the status of existing `.moai/project/*.md` files
753
+ - Identify areas of insufficient information
754
+ - Organize items that need supplementation
651
755
 
652
756
  4. **Project structure evaluation**
653
- - Directory structure complexity
654
- - Monolingual vs. hybrid vs. microservice
655
- - Code base size estimation
757
+
758
+ - Directory structure complexity
759
+ - Monolingual vs. hybrid vs. microservice
760
+ - Code base size estimation
656
761
 
657
762
  ### 1.3 Establish interview strategy (when user selects "New")
658
763
 
@@ -665,62 +770,134 @@ Set optimization flags after the merge is complete:
665
770
  | **TypeScript conversion** | Migration Strategy | TypeScript conversion for existing projects |
666
771
 
667
772
  **Question Priority**:
773
+
668
774
  - **Essential Questions**: Core Business Value, Key User Bases (all projects)
669
775
  - **Technical Questions**: Language/Framework, Quality Policy, Deployment Strategy
670
776
  - **Governance**: Security Requirements, Traceability Strategy (Optional)
671
777
 
672
778
  ### 1.4 Generate Interview Plan Report (when user selects "Create New")
673
779
 
780
+ **Purpose**: Present user with a clear interview plan before execution, allowing review and modification.
781
+
674
782
  **Format of plan to be presented to users**:
675
783
 
676
784
  ```markdown
677
- ## 📊 Project initialization plan: [PROJECT-NAME]
785
+ ## 📊 Project Initialization Plan: [PROJECT-NAME]
678
786
 
679
787
  ### Environmental Analysis Results
788
+
680
789
  - **Project Type**: [New/Existing/Hybrid]
681
- - **Languages ​​Detected**: [Language List]
790
+ - **Languages Detected**: [Language List]
682
791
  - **Current Document Status**: [Completeness Rating 0-100%]
683
792
  - **Structure Complexity**: [Simple/Medium/Complex]
684
793
 
685
- ### 🎯 Interview strategy
686
- - **Question category**: Product Discovery / Structure / Tech
687
- - **Expected number of questions**: [N (M required + K optional)]
688
- - **Estimated time required**: [Time estimation]
689
- - **Priority area**: [Focus on Areas to be covered]
794
+ ### 🎯 Interview Strategy
795
+
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]
800
+
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
690
818
 
691
- ### ⚠️ Notes
692
- - **Existing document**: [Overwrite vs supplementation strategy]
693
- - **Language settings**: [Automatic detection vs manual setting]
694
- - **Configuration conflicts**: [Compatibility with existing config.json]
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]
695
823
 
696
- ### ✅ Expected deliverables
697
- - **product.md**: [Business requirements document]
698
- - **structure.md**: [System architecture document]
699
- - **tech.md**: [Technology stack and policy document]
700
- - **config.json**: [Project configuration file]
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
701
830
 
702
831
  ---
703
- **Approval Request**: Would you like to proceed with the interview using the above plan?
704
- (Choose "Proceed," "Modify [Content]," or "Abort")
832
+
833
+ **Please review the plan above and confirm whether to proceed.**
834
+ ```
835
+
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
+ )
705
866
  ```
706
867
 
707
- ### 1.5 Wait for user approval (moai-alfred-interactive-questions) (when user selects "New")
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
876
+
877
+ - **"Modify Plan"** (`answers["0"] === "Modify"`) → Repeat Phase 1
878
+
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
708
889
 
709
- After Alfred receives the project-manager's interview plan report, uses `AskUserQuestion` tool (documented in moai-alfred-interactive-questions skill) and asks whether Phase 2 is approved.
710
- - **Proceed**: Interview conducted according to approved plan
711
- - **Modify**: Re-establish the plan (re-execute Phase 1)
712
- - **Stop**: Stop initialization
890
+ **Phase 2 Execution Condition**:
713
891
 
714
- **Response processing**:
715
- - **"Progress"** (`answers["0"] === "Progress"`) Execute Phase 2
716
- - **"Modify"** (`answers["0"] === "Modify"`) → Repeat Phase 1 (recall project-manager)
717
- - **"Abort"** (`answers["0"] === "Abort"`) → End task
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
718
894
 
719
895
  ---
720
896
 
721
897
  ## 🚀 STEP 2: Execute project initialization (after user approves "New")
722
898
 
723
899
  **Note**: This step will only be executed if the user selects **"New"**.
900
+
724
901
  - When selecting "Merge": End the task in Phase 1.1 (Merge Backups)
725
902
  - When selecting "Skip": End the task
726
903
  - When selecting "New": Proceed with the process below
@@ -732,6 +909,7 @@ After user approval, the project-manager agent performs initialization.
732
909
  Alfred starts project initialization by calling the project-manager agent with the following parameters:
733
910
 
734
911
  **Parameters passed to project-manager**:
912
+
735
913
  - **conversation_language** (from STEP 0): Language code selected by user (e.g., "ko", "en", "ja", "zh")
736
914
  - **language_name** (from STEP 0): Display name of selected language (e.g., "Korean", "English")
737
915
  - **agent_prompt_language** (from STEP 0.1.2) - **NEW**:
@@ -745,6 +923,7 @@ Alfred starts project initialization by calling the project-manager agent with t
745
923
  - `spec_git_workflow: "feature_branch" | "develop_direct" | "per_spec"` (팀 모드만)
746
924
 
747
925
  **Execution**:
926
+
748
927
  ```
749
928
  Call the Task tool:
750
929
  - subagent_type: "project-manager"
@@ -828,6 +1007,7 @@ After the project-manager has finished creating the document, **Alfred can optio
828
1007
  | User Requests "Quality Verification" | moai-alfred-trust-validation | Initial project structure verification |
829
1008
 
830
1009
  **Execution flow** (optional):
1010
+
831
1011
  ```
832
1012
  1. project-manager completion
833
1013
 
@@ -843,14 +1023,17 @@ After the project-manager has finished creating the document, **Alfred can optio
843
1023
  **The project-manager agent can internally call the TUI survey skill** to check the details of the task.
844
1024
 
845
1025
  **When to call**:
1026
+
846
1027
  - Before overwriting existing project documents
847
1028
  - When selecting language/framework
848
1029
  - When changing important settings
849
1030
 
850
1031
  **Example** (inside project-manager): Ask whether to "overwrite file" with `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`,
1032
+
851
1033
  - Allows you to choose between **Overwrite** / **Merge** / **Skip**.
852
1034
 
853
1035
  **Nested pattern**:
1036
+
854
1037
  - **Command level** (Phase approval): Called by Alfred → "Shall we proceed with Phase 2?"
855
1038
  - **Sub-agent level** (Detailed confirmation): Called by project-manager → "Shall we overwrite the file?"
856
1039
 
@@ -861,26 +1044,30 @@ After the project-manager has finished creating the document, **Alfred can optio
861
1044
  **Interview Flow**:
862
1045
 
863
1046
  1. **Product Discovery** (create product.md)
864
- - Define core mission (DOC:MISSION-001)
865
- - Identify key user base (SPEC:USER-001)
866
- - Identify key problems to solve (SPEC:PROBLEM-001)
867
- - Summary of differences and strengths (DOC:STRATEGY-001)
868
- - Setting success indicators (SPEC:SUCCESS-001)
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)
869
1053
 
870
1054
  2. **Structure Blueprint** (create structure.md)
871
- - Selection of architecture strategy (DOC:ARCHITECTURE-001)
872
- - Division of responsibilities by module (DOC:MODULES-001)
873
- - External system integration plan (DOC:INTEGRATION-001)
874
- - Define traceability strategy (DOC:TRACEABILITY-001)
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)
875
1060
 
876
1061
  3. **Tech Stack Mapping** (written by tech.md)
877
- - Select language & runtime (DOC:STACK-001)
878
- - Determine core framework (DOC:FRAMEWORK-001)
879
- - Set quality gate (DOC:QUALITY-001)
880
- - Define security policy (DOC:SECURITY-001)
881
- - Plan distribution channels (DOC:DEPLOY-001)
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)
882
1068
 
883
1069
  **Automatically generate config.json**:
1070
+
884
1071
  ```json
885
1072
  {
886
1073
  "project_name": "detected-name",
@@ -901,11 +1088,13 @@ After the project-manager has finished creating the document, **Alfred can optio
901
1088
  **STEP 1: Identify the overall project structure**
902
1089
 
903
1090
  Alfred identifies the entire project structure:
1091
+
904
1092
  - Visualize the directory structure using the tree or find commands
905
- - Exclude build artifacts such as node_modules, .git, dist, build, __pycache__, etc.
1093
+ - Exclude build artifacts such as node_modules, .git, dist, build, **pycache**, etc.
906
1094
  - Identify key source directories and configuration files.
907
1095
 
908
1096
  **Output**:
1097
+
909
1098
  - Visualize the entire folder/file hierarchy of the project
910
1099
  - Identify major directories (src/, tests/, docs/, config/, etc.)
911
1100
  - Check language/framework hint files (package.json, pyproject.toml, go.mod, etc.)
@@ -913,12 +1102,14 @@ Alfred identifies the entire project structure:
913
1102
  **STEP 2: Establish parallel analysis strategy**
914
1103
 
915
1104
  Alfred identifies groups of files by the Glob pattern:
916
- 1. **Configuration files**: *.json, *.toml, *.yaml, *.yml, *.config.js
917
- 2. **Source code files**: src/**/*.{ts,js,py,go,rs,java}
918
- 3. **Test files**: tests/**/*.{ts,js,py,go,rs,java}, **/*.test.*, **/*.spec.*
919
- 4. **Documentation files**: *.md, docs/**/*.md, README*, CHANGELOG*
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*
920
1110
 
921
1111
  **Parallel Read Strategy**:
1112
+
922
1113
  - Speed ​​up analysis by reading multiple files simultaneously with the Read tool
923
1114
  - Batch processing for each file group
924
1115
  - Priority: Configuration file → Core source → Test → Document
@@ -928,50 +1119,59 @@ Alfred identifies groups of files by the Glob pattern:
928
1119
  As each file is read, the following information is collected:
929
1120
 
930
1121
  1. **Configuration file analysis**
931
- - Project metadata (name, version, description)
932
- - Dependency list and versions
933
- - Build/test script
934
- - Confirm language/framework
1122
+
1123
+ - Project metadata (name, version, description)
1124
+ - Dependency list and versions
1125
+ - Build/test script
1126
+ - Confirm language/framework
935
1127
 
936
1128
  2. **Source code analysis**
937
- - Identify major modules and classes
938
- - Architectural pattern inference (MVC, clean architecture, microservice, etc.)
939
- - Identify external API calls and integration points
940
- - Key areas of domain logic
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
941
1134
 
942
1135
  3. **Test code analysis**
943
- - Check test framework
944
- - Identify coverage settings
945
- - Identify key test scenarios
946
- - Evaluate TDD compliance
1136
+
1137
+ - Check test framework
1138
+ - Identify coverage settings
1139
+ - Identify key test scenarios
1140
+ - Evaluate TDD compliance
947
1141
 
948
1142
  4. **Document analysis**
949
- - Existing README contents
950
- - Existence of architecture document
951
- - API document status
952
- - Installation/deployment guide completeness
1143
+
1144
+ - Existing README contents
1145
+ - Existence of architecture document
1146
+ - API document status
1147
+ - Installation/deployment guide completeness
953
1148
 
954
1149
  **Report Format**:
1150
+
955
1151
  ```markdown
956
1152
  ## Analysis results for each file
957
1153
 
958
1154
  ### Configuration file
1155
+
959
1156
  - package.json: Node.js 18+, TypeScript 5.x, Vitest test
960
1157
  - tsconfig.json: strict mode, ESNext target
961
1158
  - biome.json: Linter/formatter settings exist
962
1159
 
963
1160
  ### Source code (src/)
1161
+
964
1162
  - src/core/: Core business logic (3 modules)
965
1163
  - src/api/: REST API endpoints (5 routers)
966
1164
  - src/utils/: Utility functions (logging, verification, etc.)
967
1165
  - Architecture: Hierarchical (controller) → service → repository)
968
1166
 
969
1167
  ### Tests (tests/)
1168
+
970
1169
  - Vitest + @testing-library used
971
1170
  - Unit test coverage estimated at about 60%
972
1171
  - E2E testing lacking
973
1172
 
974
1173
  ### Documentation
1174
+
975
1175
  - README.md: Only installation guide
976
1176
  - Absence of API documentation
977
1177
  - Absence of architecture document
@@ -982,50 +1182,60 @@ As each file is read, the following information is collected:
982
1182
  Based on the collected information, it is reflected in three major documents:
983
1183
 
984
1184
  1. Contents reflected in **product.md**
985
- - Project mission extracted from existing README/document
986
- - Main user base and scenario inferred from code
987
- - Backtracking of core problem to be solved
988
- - Preservation of existing assets in "Legacy Context"
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"
989
1190
 
990
1191
  2. Contents reflected in **structure.md**
991
- - Identified actual directory structure
992
- - Responsibility analysis results for each module
993
- - External system integration points (API calls, DB connections, etc.)
994
- - Technical debt items (marked with @CODE tag)
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)
995
1197
 
996
1198
  3. **tech.md reflection content**
997
- - Languages/frameworks/libraries actually in use
998
- - Existing build/test pipeline
999
- - Status of quality gates (linter, formatter, test coverage)
1000
- - Identification of security/distribution policy
1001
- - Items requiring improvement (marked with TODO tags)
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)
1002
1205
 
1003
1206
  **Preservation Policy**:
1207
+
1004
1208
  - Supplement only the missing parts without overwriting existing documents
1005
1209
  - Preserve conflicting content in the "Legacy Context" section
1006
1210
  - Mark items needing improvement with @CODE and TODO tags
1007
1211
 
1008
1212
  **Example Final Report**:
1213
+
1009
1214
  ```markdown
1010
1215
  ## Complete analysis of existing project
1011
1216
 
1012
1217
  ### Environment Information
1218
+
1013
1219
  - **Language**: TypeScript 5.x (Node.js 18+)
1014
1220
  - **Framework**: Express.js
1015
1221
  - **Test**: Vitest (coverage ~60%)
1016
1222
  - **Linter/Formatter**: Biome
1017
1223
 
1018
1224
  ### Main findings
1225
+
1019
1226
  1. **Strengths**:
1020
- - High type safety (strict mode)
1021
- - Clear module structure (separation of core/api/utils)
1227
+
1228
+ - High type safety (strict mode)
1229
+ - Clear module structure (separation of core/api/utils)
1022
1230
 
1023
1231
  2. **Needs improvement**:
1024
- - Test coverage below 85% (TODO:TEST-COVERAGE-001)
1025
- - Absence of API documentation (TODO:DOCS-API-001)
1026
- - Insufficient E2E testing (@CODE:TEST-E2E-001)
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)
1027
1236
 
1028
1237
  ### Next step
1238
+
1029
1239
  1. product/structure/tech.md creation completed
1030
1240
  2. @CODE/TODO item priority confirmation
1031
1241
  3. /alfred:Start writing an improvement SPEC with 1-spec
@@ -1034,12 +1244,14 @@ Based on the collected information, it is reflected in three major documents:
1034
1244
  ### 2.3 Document creation and verification
1035
1245
 
1036
1246
  **Output**:
1247
+
1037
1248
  - `.moai/project/product.md` (Business Requirements)
1038
1249
  - `.moai/project/structure.md` (System Architecture)
1039
1250
  - `.moai/project/tech.md` (Technology Stack and policy)
1040
1251
  - `.moai/config.json` (project settings)
1041
1252
 
1042
1253
  **Quality Verification**:
1254
+
1043
1255
  - [ ] Verify existence of all required @TAG sections
1044
1256
  - [ ] Verify compliance with EARS syntax format
1045
1257
  - [ ] Verify config.json syntax validity
@@ -1051,20 +1263,23 @@ Based on the collected information, it is reflected in three major documents:
1051
1263
  ✅ Project initialization complete!
1052
1264
 
1053
1265
  📁 Documents generated:
1266
+
1054
1267
  - .moai/project/product.md (Business Definition)
1055
1268
  - .moai/project/structure.md (Architecture Design)
1056
1269
  - .moai/project/tech.md (Technology Stack)
1057
1270
  - .moai/config.json (project settings)
1058
1271
 
1059
1272
  🔍 Detected environments:
1273
+
1060
1274
  - Language: [List of languages]
1061
1275
  - Frameworks: [List of frameworks]
1062
1276
  - Test tools: [List of tools]
1063
1277
 
1064
1278
  📋 Next steps:
1279
+
1065
1280
  1. Review the generated document
1066
1281
  2. Create your first SPEC with /alfred:1-plan
1067
- 3. If necessary, readjust with /alfred:8-project update
1282
+ 3. If necessary, readjust with /alfred:0-project update
1068
1283
  ```
1069
1284
 
1070
1285
  ### 2.5: Initial structural verification (optional)
@@ -1074,6 +1289,7 @@ After project initialization is complete, you can optionally run quality verific
1074
1289
  **Execution Conditions**: Only when explicitly requested by the user.
1075
1290
 
1076
1291
  **Verification Purpose**:
1292
+
1077
1293
  - Basic verification of project documentation and configuration files
1078
1294
  - Verification of compliance with the TRUST principles of the initial structure
1079
1295
  - Validation of configuration files
@@ -1082,6 +1298,7 @@ After project initialization is complete, you can optionally run quality verific
1082
1298
  Alfred only calls the trust-checker agent to perform project initial structural verification if explicitly requested by the user.
1083
1299
 
1084
1300
  **Verification items**:
1301
+
1085
1302
  - **Document completeness**: Check existence of required sections in product/structure/tech.md
1086
1303
  - **Settings validity**: Verify config.json JSON syntax and required fields
1087
1304
  - **TAG scheme**: Check compliance with @TAG format in document
@@ -1092,18 +1309,22 @@ Alfred only calls the trust-checker agent to perform project initial structural
1092
1309
  **Handling verification results**:
1093
1310
 
1094
1311
  ✅ **Pass**: Can proceed to next step
1312
+
1095
1313
  - Documents and settings are all normal
1096
1314
 
1097
1315
  ⚠️ **Warning**: Proceed after warning
1316
+
1098
1317
  - Some optional sections are missing
1099
1318
  - Recommendations not applied
1100
1319
 
1101
1320
  ❌ **Critical**: Needs fix
1321
+
1102
1322
  - Required section missing
1103
1323
  - config.json syntax error
1104
1324
  - User choice: "Revalidate after fix" or "Skip"
1105
1325
 
1106
1326
  **Skip verification**:
1327
+
1107
1328
  - Verification is not run by default
1108
1329
  - Run only when explicitly requested by the user
1109
1330
 
@@ -1128,11 +1349,11 @@ cc-manager selects the required sub-agents and skills based on the briefing.The
1128
1349
 
1129
1350
  | Project requirements (document basis) | Recommended sub-agent/skill | Purpose |
1130
1351
  | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
1131
- | High quality and coverage goals (product.md:SPEC:SUCCESS-001) | `tdd-implementer`, `moai-essentials-debug`, `moai-essentials-review` | Establishment of RED·GREEN·REFACTOR workflow |
1132
- | 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 |
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 |
1133
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 |
1134
- | Refactoring legacy modules (`product.md` BACKLOG, `tech.md` TODO) | `implementation-planner`, `moai-essentials-refactor` | Technical Debt Diagnosis and Refactoring Roadmap |
1135
- | 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 |
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 |
1136
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 |
1137
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 |
1138
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 |
@@ -1143,6 +1364,7 @@ cc-manager selects the required sub-agents and skills based on the briefing.The
1143
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 |
1144
1365
 
1145
1366
  > **Language/Domain Skill Selection Rules**
1367
+ >
1146
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.
1147
1369
  > - Skills listed in the domain row are automatically included by cc-manager in the `selected_skills` list when the conditions are met.
1148
1370
  > - The skill directory is always copied in its entirety, and only actual activation is recorded in `skill_pack` and `CLAUDE.md`.
@@ -1152,19 +1374,24 @@ If multiple conditions are met, the candidates are merged without duplicates and
1152
1374
  #### 2.6.2 User confirmation flow
1153
1375
 
1154
1376
  `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks "whether to enable recommended items."
1377
+
1155
1378
  - Provides three options: **Install all** / **Install selectively** / **Do not install**.
1156
- Selecting "Selective Install" presents the list of candidates again as multiple choices, allowing the user to select only the items they need.
1379
+ Selecting "Selective Install" presents the list of candidates again as multiple choices, allowing the user to select only the items they need.
1157
1380
 
1158
1381
  #### 2.6.3 Activation and Recording Steps
1159
1382
 
1160
1383
  1. **Preparing briefing**: Organize the results of user selection (install all/install selectively) and the full text of `cc_manager_briefing`.
1161
1384
  2. **Call the cc-manager agent**:
1385
+
1162
1386
  - Call `subagent_type: "cc-manager"` with the `Task` tool and include a briefing and user selections in the prompt.
1163
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
+
1164
1389
  3. **Check for configuration updates**: Review the results reflected by cc-manager.
1390
+
1165
1391
  - Sub-Agents: Keep the `.claude/agents/alfred/` template active and list it in the `CLAUDE.md` "Agents" section.
1166
1392
  - Skills: Check the `.claude/skills/` document and add it to the `CLAUDE.md` "Skills" section.
1167
1393
  - Output style: Apply `.claude/output-styles/alfred/` and record the activation in `CLAUDE.md` "Output Styles".
1394
+
1168
1395
  4. **Update config.json**
1169
1396
  ```json
1170
1397
  {
@@ -1176,7 +1403,7 @@ Selecting "Selective Install" presents the list of candidates again as multiple
1176
1403
  }
1177
1404
  }
1178
1405
  ```
1179
- Merge existing properties, if any.
1406
+ Merge existing properties, if any.
1180
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.
1181
1408
 
1182
1409
  ## Interview guide by project type
@@ -1184,19 +1411,22 @@ Merge existing properties, if any.
1184
1411
  ### New project interview area
1185
1412
 
1186
1413
  **Product Discovery** (product.md)
1414
+
1187
1415
  - Core mission and value proposition
1188
- - Key user bases and needs
1189
- - 3 key problems to solve
1190
- - Differentiation compared to competing solutions
1191
- - Measurable indicators of success
1416
+ - Key user bases and needs
1417
+ - 3 key problems to solve
1418
+ - Differentiation compared to competing solutions
1419
+ - Measurable indicators of success
1192
1420
 
1193
1421
  **Structure Blueprint** (structure.md)
1422
+
1194
1423
  - System architecture strategy
1195
1424
  - Separation of modules and division of responsibilities
1196
1425
  - External system integration plan
1197
1426
  - @TAG-based traceability strategy
1198
1427
 
1199
1428
  **Tech Stack Mapping** (tech.md)
1429
+
1200
1430
  - Language/runtime selection and version
1201
1431
  - Framework and libraries
1202
1432
  - Quality gate policy (coverage, linter)
@@ -1205,6 +1435,7 @@ Merge existing properties, if any.
1205
1435
  ### Existing project interview area
1206
1436
 
1207
1437
  **Legacy Analysis**
1438
+
1208
1439
  - Identify current code structure and modules
1209
1440
  - Status of build/test pipeline
1210
1441
  - Identify technical debt and constraints
@@ -1234,18 +1465,21 @@ Merge existing properties, if any.
1234
1465
  ### Common errors and solutions
1235
1466
 
1236
1467
  **Error 1**: Project language detection failed
1468
+
1237
1469
  ```
1238
1470
  Symptom: "Language not detected" message
1239
1471
  Solution: Specify language manually or create language-specific settings file
1240
1472
  ```
1241
1473
 
1242
1474
  **Error 2**: Conflict with existing document
1475
+
1243
1476
  ```
1244
1477
  Symptom: product.md already exists and has different contents
1245
1478
  Solution: Preserve existing contents and add new contents in "Legacy Context" section
1246
1479
  ```
1247
1480
 
1248
1481
  **Error 3**: Failed to create config.json
1482
+
1249
1483
  ```
1250
1484
  Symptom: JSON syntax error or permission denied
1251
1485
  Solution: Check file permissions (chmod 644) or create config.json manually
@@ -1270,45 +1504,99 @@ This subcommand is executed under the following conditions:
1270
1504
  #### Phase 1: Backup analysis and comparison
1271
1505
 
1272
1506
  1. **Make sure you have the latest backup**:
1507
+
1273
1508
  ```bash
1274
- # Browse the latest backups in the .moai-backups/ directory
1275
- ls -lt .moai-backups/ | head -1
1509
+
1276
1510
  ```
1277
1511
 
1512
+ # Browse the latest backups in the .moai-backups/ directory
1513
+
1514
+ ls -lt .moai-backups/ | head -1
1515
+
1516
+ ````
1517
+
1278
1518
  2. **Change Analysis**:
1279
- - Compare `.claude/` directory from backup with current template
1280
- - Compare `.moai/project/` document from backup with current document
1281
- - Identify user customization items
1519
+ - Compare `.claude/` directory from backup with current template
1520
+ - Compare `.moai/project/` document from backup with current document
1521
+ - Identify user customization items
1282
1522
 
1283
1523
  3. **Create Comparison Report**:
1284
- ```markdown
1524
+ ```markdown
1285
1525
  ## 📊 Template optimization analysis
1286
1526
 
1287
1527
  ### Changed items
1288
- - CLAUDE.md: "## Project Information" section needs to be preserved
1289
- - settings.json: 3 env variables need to be preserved
1290
- - product.md: Has user-written content
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
1291
1531
 
1292
1532
  ### Recommended Action
1293
- - Run Smart Merge
1294
- - Preserve User Customizations
1295
- - Set optimized=true
1296
- ```
1533
+ - Run Smart Merge
1534
+ - Preserve User Customizations
1535
+ - Set optimized=true
1536
+ ````
1297
1537
 
1298
1538
  4. **Waiting for user approval**
1299
- `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)` asks "Do you want to proceed with template optimization?" and provides the following options.
1300
- - **Proceed** Phase 2 execution
1301
- - **Preview** → Display change details and recheck
1302
- - **Skip** keep optimized=false
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**:
1571
+
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
1303
1589
 
1304
1590
  #### Phase 2: Run smart merge (after user approval)
1305
1591
 
1306
1592
  1. **Execute smart merge logic**:
1307
- - Run `TemplateProcessor.copy_templates()`
1308
- - CLAUDE.md: Preserve "## Project Information" section
1309
- - settings.json: env variables and permissions.allow merge
1593
+
1594
+ - Run `TemplateProcessor.copy_templates()`
1595
+ - CLAUDE.md: Preserve "## Project Information" section
1596
+ - settings.json: env variables and permissions.allow merge
1310
1597
 
1311
1598
  2. Set **optimized=true**:
1599
+
1312
1600
  ```python
1313
1601
  # update config.json
1314
1602
  config_data["project"]["optimized"] = True
@@ -1316,14 +1604,17 @@ This subcommand is executed under the following conditions:
1316
1604
 
1317
1605
  3. **Optimization completion report**:
1318
1606
  ```markdown
1319
- ✅ Template optimization completed!
1607
+ ✅ Template optimization completed!
1608
+ ```
1320
1609
 
1321
1610
  📄 Merged files:
1322
- - CLAUDE.md (preserves project information)
1323
- - settings.json (preserves env variables)
1611
+
1612
+ - CLAUDE.md (preserves project information)
1613
+ - settings.json (preserves env variables)
1324
1614
 
1325
1615
  ⚙️ config.json: optimized=true Configuration complete
1326
- ```
1616
+
1617
+ ````
1327
1618
 
1328
1619
  ### Alfred Automation Strategy
1329
1620
 
@@ -1352,7 +1643,7 @@ moai-adk update
1352
1643
  # → Phase 1: Generate backup analysis and comparison report
1353
1644
  # → Wait for user approval
1354
1645
  # → Phase 2: Run smart merge, set optimized=true
1355
- ```
1646
+ ````
1356
1647
 
1357
1648
  ### caution
1358
1649
 
@@ -1365,6 +1656,7 @@ moai-adk update
1365
1656
  ## 🚀 STEP 3: Project Custom Optimization (Optional)
1366
1657
 
1367
1658
  **Execution conditions**:
1659
+
1368
1660
  - After completion of Phase 2 (project initialization)
1369
1661
  - or after completion of Phase 1.1 (backup merge)
1370
1662
  - Explicitly requested by the user or automatically determined by Alfred
@@ -1376,18 +1668,26 @@ moai-adk update
1376
1668
  **Alfred automatically calls the moai-alfred-feature-selector skill**:
1377
1669
 
1378
1670
  **Skill Entry**:
1671
+
1379
1672
  - `.moai/project/product.md` (project category hint)
1380
1673
  - `.moai/project/tech.md` (main language, framework)
1381
1674
  - `.moai/config.json` (project settings)
1382
1675
 
1383
1676
  **Skill Output**:
1677
+
1384
1678
  ```json
1385
1679
  {
1386
1680
  "category": "web-api",
1387
1681
  "language": "python",
1388
1682
  "framework": "fastapi",
1389
1683
  "commands": ["1-spec", "2-build", "3-sync"],
1390
- "agents": ["spec-builder", "code-builder", "doc-syncer", "git-manager", "debug-helper"],
1684
+ "agents": [
1685
+ "spec-builder",
1686
+ "code-builder",
1687
+ "doc-syncer",
1688
+ "git-manager",
1689
+ "debug-helper"
1690
+ ],
1391
1691
  "skills": ["moai-lang-python", "moai-domain-web-api", "moai-domain-backend"],
1392
1692
  "excluded_skills_count": 34,
1393
1693
  "optimization_rate": "87%"
@@ -1395,6 +1695,7 @@ moai-adk update
1395
1695
  ```
1396
1696
 
1397
1697
  **How ​​to Run**:
1698
+
1398
1699
  ```
1399
1700
  Alfred: Skill("moai-alfred-feature-selector")
1400
1701
  ```
@@ -1406,11 +1707,13 @@ Alfred: Skill("moai-alfred-feature-selector")
1406
1707
  **Alfred automatically calls the moai-alfred-template-generator skill**:
1407
1708
 
1408
1709
  **Skill input**:
1710
+
1409
1711
  - `.moai/.feature-selection.json` (feature-selector output)
1410
1712
  - `CLAUDE.md` template
1411
1713
  - Entire commands/agents/skills file
1412
1714
 
1413
1715
  **Skill Output**:
1716
+
1414
1717
  - `CLAUDE.md` (custom agent table - selected agents only)
1415
1718
  - `.claude/commands/` (selected commands only)
1416
1719
  - `.claude/agents/` (selected agents only)
@@ -1418,6 +1721,7 @@ Alfred: Skill("moai-alfred-feature-selector")
1418
1721
  - `.moai/config.json` (updates `optimized: true`)
1419
1722
 
1420
1723
  **How ​​to Run**:
1724
+
1421
1725
  ```
1422
1726
  Alfred: Skill("moai-alfred-template-generator")
1423
1727
  ```
@@ -1427,26 +1731,31 @@ Alfred: Skill("moai-alfred-template-generator")
1427
1731
  ### 3.3 Optimization completion report
1428
1732
 
1429
1733
  **Report Format**:
1734
+
1430
1735
  ```markdown
1431
1736
  ✅ Project customized optimization completed!
1432
1737
 
1433
1738
  📊 Optimization results:
1739
+
1434
1740
  - **Project**: MoAI-ADK
1435
1741
  - **Category**: web-api
1436
1742
  - **Main language**: python
1437
1743
  - **Framework**: fastapi
1438
1744
 
1439
1745
  🎯 Selected capabilities:
1746
+
1440
1747
  - Commands: 4 items (0-project, 1-spec, 2-build, 3-sync)
1441
1748
  - Agents: 5 items (spec-builder, code-builder, doc-syncer, git-manager, debug-helper)
1442
1749
  - Skills: 3 items (moai-lang-python, moai-domain-web-api, moai-domain-backend)
1443
1750
 
1444
1751
  💡 Lightweight effect:
1752
+
1445
1753
  - Skills excluded: 34
1446
1754
  - Lightweight: 87%
1447
1755
  - CLAUDE.md: Create custom agent table
1448
1756
 
1449
1757
  📋 Next steps:
1758
+
1450
1759
  1. Check the CLAUDE.md file (only 5 agents are displayed)
1451
1760
  2. Run /alfred:1-plan "first function"
1452
1761
  3. Start the MoAI-ADK workflow
@@ -1459,10 +1768,12 @@ Alfred: Skill("moai-alfred-template-generator")
1459
1768
  **Users can skip Phase 3**:
1460
1769
 
1461
1770
  **Skip condition**:
1771
+
1462
1772
  - User explicitly selects "Skip"
1463
1773
  - "Simple project" when Alfred automatically determines (only basic features required)
1464
1774
 
1465
1775
  **Skip effect**:
1776
+
1466
1777
  - Maintain all 37 skills (no lightweighting)
1467
1778
  - Maintain default 9 agents in CLAUDE.md template
1468
1779
  - Maintain `optimized: false` in config.json
@@ -1488,21 +1799,21 @@ After project initialization completes, Alfred automatically invokes AskUserQues
1488
1799
  AskUserQuestion(
1489
1800
  questions=[
1490
1801
  {
1491
- "question": "프로젝트 초기화가 완료되었습니다. 다음으로 하시겠습니까?",
1492
- "header": "다음 단계",
1802
+ "question": "Project initialization complete. What would you like to do next?",
1803
+ "header": "Next Steps",
1493
1804
  "multiSelect": false,
1494
1805
  "options": [
1495
1806
  {
1496
- "label": "📋 스펙 작성 진행",
1497
- "description": "/alfred:1-plan 실행하여 첫 SPEC 작성"
1807
+ "label": "📋 Start SPEC Creation",
1808
+ "description": "Begin first SPEC with /alfred:1-plan command"
1498
1809
  },
1499
1810
  {
1500
- "label": "🔍 프로젝트 구조 검토",
1501
- "description": "생성된 문서 검토 수정"
1811
+ "label": "🔍 Review Project Structure",
1812
+ "description": "Review and edit generated project documents"
1502
1813
  },
1503
1814
  {
1504
- "label": "🔄 세션 시작",
1505
- "description": "성능 최적화를 위해 /clear 실행"
1815
+ "label": "🔄 Start New Session",
1816
+ "description": "Execute /clear for fresh session (recommended for performance)"
1506
1817
  }
1507
1818
  ]
1508
1819
  }
@@ -1510,10 +1821,28 @@ AskUserQuestion(
1510
1821
  )
1511
1822
  ```
1512
1823
 
1513
- **User Responses**:
1514
- - **📋 스펙 작성 진행**: Proceed to `/alfred:1-plan` for creating first SPEC
1515
- - **🔍 프로젝트 구조 검토**: Review and modify generated project documents
1516
- - **🔄 새 세션 시작**: Execute `/clear` to start fresh session (recommended for performance)
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
1517
1846
 
1518
1847
  ---
1519
1848