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,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alfred:2-run
|
|
3
|
-
description: "Execute
|
|
4
|
-
# Translations:
|
|
5
|
-
# - ko: "계획된 작업 실행 (TDD 구현, 프로토타이핑, 문서화 등)"
|
|
6
|
-
# - ja: "計画されたタスクの実行(TDD実装、プロトタイピング、ドキュメント作成など)"
|
|
7
|
-
# - zh: "执行计划任务(TDD实现、原型开发、文档编写等)"
|
|
3
|
+
description: "Execute TDD implementation cycle"
|
|
8
4
|
argument-hint: "SPEC-ID - All with SPEC ID to implement (e.g. SPEC-001) or all \"SPEC Implementation\""
|
|
9
5
|
allowed-tools:
|
|
10
6
|
- Read
|
|
@@ -25,6 +21,12 @@ allowed-tools:
|
|
|
25
21
|
|
|
26
22
|
# ⚒️ MoAI-ADK Phase 2: Run the plan - Flexible implementation strategy
|
|
27
23
|
> **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
|
+
>
|
|
25
|
+
> **Batched Design**: All AskUserQuestion calls follow batched design principles (1-4 questions per call) to minimize user interaction turns. See CLAUDE.md section "Alfred Command Completion Pattern" for details.
|
|
26
|
+
|
|
27
|
+
<!-- @CODE:ALF-WORKFLOW-002:CMD-RUN -->
|
|
28
|
+
|
|
29
|
+
**4-Step Workflow Integration**: This command implements Step 3 of Alfred's workflow (Task Execution with TodoWrite tracking). See CLAUDE.md for full workflow details.
|
|
28
30
|
|
|
29
31
|
## 🎯 Command Purpose
|
|
30
32
|
|
|
@@ -154,12 +156,12 @@ STEP 1 consists of **two independent phases** to provide flexible workflow based
|
|
|
154
156
|
Invoking the Task tool (Explore agent):
|
|
155
157
|
- subagent_type: "Explore"
|
|
156
158
|
- description: "Explore existing code structures and patterns"
|
|
157
|
-
- prompt: "
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
|
|
159
|
+
- prompt: "SPEC-$ARGUMENTS와 관련된 기존 코드를 탐색해주세요:
|
|
160
|
+
- 유사한 기능 구현 코드 (src/)
|
|
161
|
+
- 참고할 테스트 패턴 (tests/)
|
|
162
|
+
- 아키텍처 패턴 및 디자인 패턴
|
|
163
|
+
- 현재 라이브러리 및 버전 (package.json, requirements.txt)
|
|
164
|
+
상세도 수준: medium"
|
|
163
165
|
```
|
|
164
166
|
|
|
165
167
|
**Note**: If you skip Phase A, proceed directly to Phase B.
|
|
@@ -178,15 +180,15 @@ This phase is **always required** regardless of whether Phase A was executed.
|
|
|
178
180
|
Task tool call:
|
|
179
181
|
- subagent_type: "implementation-planner"
|
|
180
182
|
- description: "SPEC analysis and establishment of execution strategy"
|
|
181
|
-
- prompt: "
|
|
182
|
-
|
|
183
|
-
1. SPEC
|
|
184
|
-
2.
|
|
185
|
-
3. TAG
|
|
186
|
-
4.
|
|
187
|
-
5.
|
|
188
|
-
6.
|
|
189
|
-
(
|
|
183
|
+
- prompt: "$ARGUMENTS의 SPEC을 분석하고 실행 계획을 수립해주세요.
|
|
184
|
+
다음을 포함해야 합니다:
|
|
185
|
+
1. SPEC 요구사항 추출 및 복잡도 평가
|
|
186
|
+
2. 라이브러리 및 도구 선택 (WebFetch 사용)
|
|
187
|
+
3. TAG 체인 설계
|
|
188
|
+
4. 단계별 실행 계획
|
|
189
|
+
5. 위험 요소 및 대응 계획
|
|
190
|
+
6. 행동 계획을 작성하고 `AskUserQuestion 도구 (moai-alfred-interactive-questions 스킬 참고)`로 사용자와 다음 단계를 확인합니다
|
|
191
|
+
(선택사항) 탐색 결과: $EXPLORE_RESULTS"
|
|
190
192
|
```
|
|
191
193
|
|
|
192
194
|
**Note**: If Phase A was executed, pass the exploration results via `$EXPLORE_RESULTS` variable.
|
|
@@ -229,9 +231,191 @@ After reviewing the action plan, select one of the following:
|
|
|
229
231
|
|
|
230
232
|
---
|
|
231
233
|
|
|
234
|
+
## Implementation Strategy Approval
|
|
235
|
+
|
|
236
|
+
After the execution plan is ready, Alfred uses `AskUserQuestion` tool (documented in moai-alfred-interactive-questions skill) to obtain explicit user approval before proceeding to TDD implementation.
|
|
237
|
+
|
|
238
|
+
**Example AskUserQuestion Call**:
|
|
239
|
+
```python
|
|
240
|
+
AskUserQuestion(
|
|
241
|
+
questions=[
|
|
242
|
+
{
|
|
243
|
+
"question": "Implementation plan is ready. How would you like to proceed?",
|
|
244
|
+
"header": "Implementation Approval",
|
|
245
|
+
"multiSelect": false,
|
|
246
|
+
"options": [
|
|
247
|
+
{
|
|
248
|
+
"label": "✅ Proceed with TDD",
|
|
249
|
+
"description": "Start RED → GREEN → REFACTOR cycle"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"label": "🔍 Research First",
|
|
253
|
+
"description": "Invoke Explore agent to study existing code patterns"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"label": "🔄 Modify Strategy",
|
|
257
|
+
"description": "Request changes to implementation approach"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"label": "⏸️ Postpone",
|
|
261
|
+
"description": "Save plan and return later"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Response Processing**:
|
|
270
|
+
- **"✅ Proceed with TDD"** (`answers["0"] === "✅ Proceed with TDD"`) → Execute Phase 2
|
|
271
|
+
- Proceed directly to STEP 2 (TDD implementation)
|
|
272
|
+
- Invoke tdd-implementer agent with approved plan
|
|
273
|
+
- Begin RED phase (write failing tests)
|
|
274
|
+
- Display: "🔴 Starting RED phase..."
|
|
275
|
+
|
|
276
|
+
- **"🔍 Research First"** (`answers["0"] === "🔍 Research First"`) → Run exploration first
|
|
277
|
+
- Invoke Explore agent to analyze existing codebase
|
|
278
|
+
- Pass exploration results to implementation-planner
|
|
279
|
+
- Re-generate plan with research insights
|
|
280
|
+
- Re-present plan for approval
|
|
281
|
+
- Display: "🔍 Codebase exploration complete. Plan updated."
|
|
282
|
+
|
|
283
|
+
- **"🔄 Modify Strategy"** (`answers["0"] === "🔄 Modify Strategy"`) → Revise plan
|
|
284
|
+
- Collect strategy modification requests from user
|
|
285
|
+
- Update implementation plan with changes
|
|
286
|
+
- Re-present for approval (recursive)
|
|
287
|
+
- Display: "🔄 Plan modified. Please review updated strategy."
|
|
288
|
+
|
|
289
|
+
- **"⏸️ Postpone"** (`answers["0"] === "⏸️ Postpone"`) → Save and resume later
|
|
290
|
+
- Save plan to `.moai/specs/SPEC-{ID}/plan.md`
|
|
291
|
+
- Commit with message "plan(spec): Save implementation plan for SPEC-{ID}"
|
|
292
|
+
- User can resume with `/alfred:2-run SPEC-{ID}`
|
|
293
|
+
- Display: "⏸️ Plan saved. Resume with `/alfred:2-run SPEC-{ID}`"
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
232
297
|
## 🚀 STEP 2: Execute task (after user approval)
|
|
233
298
|
|
|
234
|
-
After user approval (
|
|
299
|
+
After user approval (collected via the AskUserQuestion decision point above), **call the tdd-implementer agent using the Task tool**.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
### 2.0.5 Domain Readiness Check (Automatic - Before Implementation)
|
|
304
|
+
|
|
305
|
+
**Purpose**: Load domain-expert agents as "implementation advisors" based on SPEC.stack metadata
|
|
306
|
+
|
|
307
|
+
**When to run**: After user approval, BEFORE invoking tdd-implementer
|
|
308
|
+
|
|
309
|
+
**Detection Logic**:
|
|
310
|
+
|
|
311
|
+
Alfred reads the SPEC metadata to identify required domains:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Read SPEC metadata
|
|
315
|
+
spec_metadata=$(grep "^domains:" .moai/specs/SPEC-{ID}/spec.md)
|
|
316
|
+
|
|
317
|
+
# Or read from config.json
|
|
318
|
+
selected_domains=$(jq -r '.stack.selected_domains[]' .moai/config.json)
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
**Domain Expert Advisory Pattern**:
|
|
322
|
+
|
|
323
|
+
| Domain | Readiness Check | Advisory Focus |
|
|
324
|
+
|--------|----------------|----------------|
|
|
325
|
+
| **Frontend** | Component structure, testing strategy, state management | Component hierarchy, React/Vue best practices, UI testing patterns |
|
|
326
|
+
| **Backend** | API contract, database schema, async patterns | RESTful design, database indexing, error handling, authentication |
|
|
327
|
+
| **DevOps** | Docker readiness, environment variables, health checks | Containerization, CI/CD integration, deployment strategies |
|
|
328
|
+
| **Database** | Schema design, migration strategy, indexing | Data modeling, query optimization, migration safety |
|
|
329
|
+
| **Data Science** | Data pipeline design, notebook structure | ETL patterns, data validation, model versioning |
|
|
330
|
+
| **Mobile** | Platform-specific requirements, app lifecycle | Native integration, state management, offline support |
|
|
331
|
+
|
|
332
|
+
**Example Invocation** (Frontend + Backend detected):
|
|
333
|
+
|
|
334
|
+
```python
|
|
335
|
+
# Read SPEC metadata
|
|
336
|
+
spec_domains = ["frontend", "backend"] # from SPEC frontmatter
|
|
337
|
+
|
|
338
|
+
# Invoke domain experts BEFORE tdd-implementer
|
|
339
|
+
for domain in spec_domains:
|
|
340
|
+
if domain == "frontend":
|
|
341
|
+
Task(
|
|
342
|
+
subagent_type="Explore",
|
|
343
|
+
prompt="""You are consulting as frontend-expert for TDD implementation.
|
|
344
|
+
|
|
345
|
+
SPEC: [SPEC-UI-001 - User Dashboard Component]
|
|
346
|
+
|
|
347
|
+
Provide implementation readiness check:
|
|
348
|
+
1. Component structure recommendations
|
|
349
|
+
2. State management approach (Redux/Zustand/Context)
|
|
350
|
+
3. Testing strategy (Jest + Testing Library)
|
|
351
|
+
4. Accessibility requirements
|
|
352
|
+
5. Performance optimization tips
|
|
353
|
+
|
|
354
|
+
Output: Brief advisory for tdd-implementer (3-4 key points)"""
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
if domain == "backend":
|
|
358
|
+
Task(
|
|
359
|
+
subagent_type="Explore",
|
|
360
|
+
prompt="""You are consulting as backend-expert for TDD implementation.
|
|
361
|
+
|
|
362
|
+
SPEC: [SPEC-API-001 - Authentication Endpoints]
|
|
363
|
+
|
|
364
|
+
Provide implementation readiness check:
|
|
365
|
+
1. API contract validation
|
|
366
|
+
2. Database schema requirements
|
|
367
|
+
3. Authentication/authorization patterns
|
|
368
|
+
4. Error handling strategy
|
|
369
|
+
5. Async processing considerations
|
|
370
|
+
|
|
371
|
+
Output: Brief advisory for tdd-implementer (3-4 key points)"""
|
|
372
|
+
)
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**Output Format** (Stored in SPEC plan.md):
|
|
376
|
+
|
|
377
|
+
```markdown
|
|
378
|
+
## Domain Expert Advisory (Implementation Phase)
|
|
379
|
+
|
|
380
|
+
### Frontend Readiness
|
|
381
|
+
- Component structure: Use compound component pattern for Dashboard
|
|
382
|
+
- State management: Recommend Zustand for lightweight state
|
|
383
|
+
- Testing: Prioritize user interaction tests over implementation details
|
|
384
|
+
- Performance: Implement React.memo for expensive components
|
|
385
|
+
|
|
386
|
+
### Backend Readiness
|
|
387
|
+
- API contract: OpenAPI 3.0 spec generated from FastAPI
|
|
388
|
+
- Database schema: Add index on user_id and created_at columns
|
|
389
|
+
- Authentication: Use JWT with refresh token rotation
|
|
390
|
+
- Async: Use background tasks for email notifications
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Integration with tdd-implementer**:
|
|
394
|
+
|
|
395
|
+
```python
|
|
396
|
+
# Pass domain expert feedback to tdd-implementer
|
|
397
|
+
Task(
|
|
398
|
+
subagent_type="tdd-implementer",
|
|
399
|
+
prompt="""You are tdd-implementer agent.
|
|
400
|
+
|
|
401
|
+
SPEC: SPEC-{ID}
|
|
402
|
+
|
|
403
|
+
DOMAIN EXPERT ADVISORY:
|
|
404
|
+
{domain_expert_feedback}
|
|
405
|
+
|
|
406
|
+
Execute TDD implementation considering domain expert guidance.
|
|
407
|
+
Follow RED → GREEN → REFACTOR cycle with domain best practices.
|
|
408
|
+
|
|
409
|
+
$ARGUMENTS"""
|
|
410
|
+
)
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Graceful Degradation**:
|
|
414
|
+
- If SPEC.stack.domains missing → Skip advisory (greenfield implementation)
|
|
415
|
+
- If domain expert unavailable → Continue with tdd-implementer only
|
|
416
|
+
- Advisory is non-blocking (implementation proceeds regardless)
|
|
417
|
+
|
|
418
|
+
---
|
|
235
419
|
|
|
236
420
|
### ⚙️ How to call an agent
|
|
237
421
|
|
|
@@ -241,35 +425,39 @@ After user approval (gathered through `AskUserQuestion tool (documented in moai-
|
|
|
241
425
|
Call the Task tool:
|
|
242
426
|
- subagent_type: "tdd-implementer"
|
|
243
427
|
- description: "Execute task with TDD implementation"
|
|
244
|
-
- prompt: """
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
Code and technical output MUST be in English.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
428
|
+
- prompt: """당신은 tdd-implementer 에이전트입니다.
|
|
429
|
+
|
|
430
|
+
언어 설정:
|
|
431
|
+
- 대화_언어: {{CONVERSATION_LANGUAGE}}
|
|
432
|
+
- 언어명: {{CONVERSATION_LANGUAGE_NAME}}
|
|
433
|
+
|
|
434
|
+
중요 지시사항:
|
|
435
|
+
**Code and technical output MUST be in English.** This ensures global compatibility and maintainability.
|
|
436
|
+
|
|
437
|
+
코드 문법 및 키워드: 영어 (고정).
|
|
438
|
+
코드 주석:
|
|
439
|
+
- 로컬 프로젝트 코드: 반드시 {{CONVERSATION_LANGUAGE}}로 작성
|
|
440
|
+
- 패키지 코드 (src/moai_adk/): 반드시 영어로 작성 (글로벌 배포용)
|
|
441
|
+
테스트 설명 및 문서: 반드시 {{CONVERSATION_LANGUAGE}}로 작성.
|
|
442
|
+
|
|
443
|
+
스킬 호출:
|
|
444
|
+
필요 시 명시적 Skill() 호출 사용:
|
|
445
|
+
- Skill("moai-alfred-language-detection") - 프로젝트 언어 감지
|
|
446
|
+
- Skill("moai-lang-python") 또는 언어별 스킬 - 베스트 프랙티스
|
|
447
|
+
- Skill("moai-essentials-debug") - 테스트 실패 시
|
|
448
|
+
- Skill("moai-essentials-refactor") - REFACTOR 단계에서
|
|
449
|
+
|
|
450
|
+
작업: STEP 1에서 승인된 계획에 따라 작업을 실행합니다.
|
|
451
|
+
|
|
452
|
+
TDD 시나리오의 경우:
|
|
453
|
+
- RED → GREEN → REFACTOR 사이클 수행
|
|
454
|
+
- 각 TAG에 대해 다음을 수행:
|
|
455
|
+
1. RED 단계: @TEST:ID 태그로 실패하는 테스트 작성
|
|
456
|
+
2. GREEN 단계: @CODE:ID 태그로 최소한의 구현
|
|
457
|
+
3. REFACTOR 단계: 코드 품질 개선
|
|
458
|
+
4. TAG 완료 조건 확인 및 다음 TAG 진행
|
|
459
|
+
|
|
460
|
+
실행 대상: $ARGUMENTS"""
|
|
273
461
|
```
|
|
274
462
|
|
|
275
463
|
## 🔗 TDD optimization for each language
|
|
@@ -526,7 +714,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
|
|
|
526
714
|
|
|
527
715
|
## 🧠 Context Management
|
|
528
716
|
|
|
529
|
-
> For more information:
|
|
717
|
+
> For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
|
|
530
718
|
|
|
531
719
|
### Core strategy of this command
|
|
532
720
|
|
|
@@ -536,6 +724,66 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
|
|
|
536
724
|
|
|
537
725
|
---
|
|
538
726
|
|
|
727
|
+
## Final Step
|
|
728
|
+
|
|
729
|
+
### After STEP 3 (git-manager) Completes
|
|
730
|
+
|
|
731
|
+
Alfred calls AskUserQuestion to collect user's next action:
|
|
732
|
+
|
|
733
|
+
**Example AskUserQuestion Call**:
|
|
734
|
+
```python
|
|
735
|
+
AskUserQuestion(
|
|
736
|
+
questions=[
|
|
737
|
+
{
|
|
738
|
+
"question": "Implementation is complete. What would you like to do next?",
|
|
739
|
+
"header": "Next Steps",
|
|
740
|
+
"multiSelect": false,
|
|
741
|
+
"options": [
|
|
742
|
+
{
|
|
743
|
+
"label": "📚 Synchronize Documentation",
|
|
744
|
+
"description": "Proceed to /alfred:3-sync for documentation synchronization"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"label": "🔨 Implement More Features",
|
|
748
|
+
"description": "Continue with /alfred:2-run SPEC-XXX for next feature"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"label": "🔄 New Session",
|
|
752
|
+
"description": "Execute /clear for better context management (recommended)"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"label": "✅ Complete",
|
|
756
|
+
"description": "Finish current session"
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
]
|
|
761
|
+
)
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
**Response Processing**:
|
|
765
|
+
- **"📚 Synchronize Documentation"** (`answers["0"] === "📚 Synchronize Documentation"`) → Proceed to `/alfred:3-sync`
|
|
766
|
+
- Display: "Starting documentation synchronization..."
|
|
767
|
+
- User can execute: `/alfred:3-sync auto`
|
|
768
|
+
- This verifies TAGs, updates docs, and prepares for PR merge
|
|
769
|
+
|
|
770
|
+
- **"🔨 Implement More Features"** (`answers["0"] === "🔨 Implement More Features"`) → Continue implementation
|
|
771
|
+
- Display: "Ready for next feature implementation..."
|
|
772
|
+
- User can run: `/alfred:2-run SPEC-YYY` for another feature
|
|
773
|
+
- Maintains current session context
|
|
774
|
+
|
|
775
|
+
- **"🔄 New Session"** (`answers["0"] === "🔄 New Session"`) → Clear and restart
|
|
776
|
+
- Display: "⏳ Clearing session for better context management..."
|
|
777
|
+
- Recommended after large implementations
|
|
778
|
+
- Next session: Can run any command
|
|
779
|
+
|
|
780
|
+
- **"✅ Complete"** (`answers["0"] === "✅ Complete"`) → End current workflow
|
|
781
|
+
- Display: "Implementation workflow complete!"
|
|
782
|
+
- Recommend next manual steps via `/alfred:3-sync`
|
|
783
|
+
- User can review work or plan next features
|
|
784
|
+
|
|
785
|
+
---
|
|
786
|
+
|
|
539
787
|
## Next steps
|
|
540
788
|
|
|
541
789
|
**Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
|