moai-adk 0.8.0__py3-none-any.whl → 0.15.0__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 +229 -60
- moai_adk/core/config/migration.py +1 -1
- moai_adk/core/issue_creator.py +313 -0
- 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/__init__.py +86 -0
- moai_adk/core/tags/ci_validator.py +463 -0
- moai_adk/core/tags/cli.py +283 -0
- moai_adk/core/tags/generator.py +109 -0
- moai_adk/core/tags/inserter.py +99 -0
- moai_adk/core/tags/mapper.py +126 -0
- moai_adk/core/tags/parser.py +76 -0
- moai_adk/core/tags/pre_commit_validator.py +393 -0
- moai_adk/core/tags/reporter.py +956 -0
- moai_adk/core/tags/tags.py +149 -0
- moai_adk/core/tags/validator.py +897 -0
- moai_adk/core/template_engine.py +268 -0
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +319 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +25 -2
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +24 -12
- moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +20 -13
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +47 -16
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +95 -15
- moai_adk/templates/.claude/agents/alfred/project-manager.md +78 -12
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +28 -5
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +30 -2
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +133 -13
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +104 -8
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +133 -16
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +27 -4
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +571 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +466 -125
- moai_adk/templates/.claude/commands/alfred/1-plan.md +208 -71
- moai_adk/templates/.claude/commands/alfred/2-run.md +276 -55
- moai_adk/templates/.claude/commands/alfred/3-sync.md +439 -53
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
- moai_adk/templates/.claude/hooks/alfred/core/project.py +361 -29
- 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 +198 -0
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +100 -0
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/__init__.py +2 -2
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
- moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/tags.py +55 -23
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/session.py +28 -15
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/tool.py +3 -6
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/user.py +19 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +112 -0
- 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-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-issue-labels/reference.md +150 -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-alfred-spec-authoring/README.md +137 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
- moai_adk/templates/.claude/skills/{moai-spec-authoring → moai-alfred-spec-authoring}/examples/validate-spec.sh +3 -3
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
- 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-foundation-ears/SKILL.md +9 -6
- 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 +166 -3
- moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
- 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 +118 -0
- 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 +206 -35
- 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 +21 -2
- moai_adk/templates/CLAUDE.md +972 -78
- 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.8.0.dist-info → moai_adk-0.15.0.dist-info}/METADATA +1518 -161
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/RECORD +183 -100
- moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
- moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -174
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
- moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
- 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/.claude/skills/moai-spec-authoring/README.md +0 -137
- moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -218
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
- moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
- 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/GITFLOW-PROTECTION-POLICY.md +0 -220
- moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
- moai_adk/templates/.moai/memory/config-schema.md +0 -444
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
- moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
- 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/__init__.py +0 -2
- /moai_adk/templates/{.moai/memory/CONFIG-SCHEMA.md → .claude/skills/moai-alfred-config-schema/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/{.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.8.0.dist-info → moai_adk-0.15.0.dist-info}/WHEEL +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.15.0.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
|
|
|
@@ -96,51 +98,101 @@ Users can run commands as follows:
|
|
|
96
98
|
|
|
97
99
|
## 🔍 STEP 1: SPEC analysis and execution plan establishment
|
|
98
100
|
|
|
99
|
-
|
|
101
|
+
STEP 1 consists of **two independent phases** to provide flexible workflow based on task complexity:
|
|
102
|
+
|
|
103
|
+
### 📋 STEP 1 Workflow Overview
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
107
|
+
│ STEP 1: SPEC Analysis & Planning │
|
|
108
|
+
├─────────────────────────────────────────────────────────────┤
|
|
109
|
+
│ │
|
|
110
|
+
│ Phase A (OPTIONAL) │
|
|
111
|
+
│ ┌─────────────────────────────────────────┐ │
|
|
112
|
+
│ │ 🔍 Explore Agent │ │
|
|
113
|
+
│ │ • Browse existing codebase │ │
|
|
114
|
+
│ │ • Find similar implementations │ │
|
|
115
|
+
│ │ • Identify patterns & architecture │ │
|
|
116
|
+
│ └─────────────────────────────────────────┘ │
|
|
117
|
+
│ ↓ │
|
|
118
|
+
│ (exploration results) │
|
|
119
|
+
│ ↓ │
|
|
120
|
+
│ Phase B (REQUIRED) │
|
|
121
|
+
│ ┌─────────────────────────────────────────┐ │
|
|
122
|
+
│ │ ⚙️ implementation-planner Agent │ │
|
|
123
|
+
│ │ • Analyze SPEC requirements │ │
|
|
124
|
+
│ │ • Design execution strategy │ │
|
|
125
|
+
│ │ • Create implementation plan │ │
|
|
126
|
+
│ │ • Request user approval │ │
|
|
127
|
+
│ └─────────────────────────────────────────┘ │
|
|
128
|
+
│ ↓ │
|
|
129
|
+
│ (user approval via AskUserQuestion) │
|
|
130
|
+
│ ↓ │
|
|
131
|
+
│ PROCEED TO STEP 2 │
|
|
132
|
+
└─────────────────────────────────────────────────────────────┘
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Key Points**:
|
|
136
|
+
- **Phase A is optional** - Skip if you don't need to explore existing code
|
|
137
|
+
- **Phase B is required** - Always runs to analyze SPEC and create execution plan
|
|
138
|
+
- **Results flow forward** - Exploration results (if any) are passed to implementation-planner
|
|
100
139
|
|
|
101
|
-
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### 🔍 Phase A: Codebase Exploration (OPTIONAL)
|
|
143
|
+
|
|
144
|
+
**Use the Explore agent when you need to understand existing code before planning.**
|
|
145
|
+
|
|
146
|
+
#### When to use Phase A:
|
|
102
147
|
|
|
103
|
-
|
|
148
|
+
- ✅ Need to understand existing code structure/patterns
|
|
149
|
+
- ✅ Need to find similar function implementations for reference
|
|
150
|
+
- ✅ Need to understand project architectural rules
|
|
151
|
+
- ✅ Need to check libraries and versions being used
|
|
104
152
|
|
|
105
|
-
|
|
153
|
+
#### How to invoke Explore agent:
|
|
106
154
|
|
|
107
155
|
```
|
|
108
156
|
Invoking the Task tool (Explore agent):
|
|
109
157
|
- subagent_type: "Explore"
|
|
110
158
|
- description: "Explore existing code structures and patterns"
|
|
111
|
-
- prompt: "
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
|
|
159
|
+
- prompt: "SPEC-$ARGUMENTS와 관련된 기존 코드를 탐색해주세요:
|
|
160
|
+
- 유사한 기능 구현 코드 (src/)
|
|
161
|
+
- 참고할 테스트 패턴 (tests/)
|
|
162
|
+
- 아키텍처 패턴 및 디자인 패턴
|
|
163
|
+
- 현재 라이브러리 및 버전 (package.json, requirements.txt)
|
|
164
|
+
상세도 수준: medium"
|
|
117
165
|
```
|
|
118
166
|
|
|
119
|
-
**
|
|
120
|
-
- ✅ When you need to understand the existing code structure/pattern
|
|
121
|
-
- ✅ When you need to refer to how a similar function is implemented
|
|
122
|
-
- ✅ When you need to understand the architectural rules of the project
|
|
123
|
-
- ✅ Check the library and version being used
|
|
167
|
+
**Note**: If you skip Phase A, proceed directly to Phase B.
|
|
124
168
|
|
|
125
|
-
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### ⚙️ Phase B: Execution Planning (REQUIRED)
|
|
126
172
|
|
|
127
|
-
**
|
|
173
|
+
**Call the implementation-planner agent to analyze SPEC and establish execution strategy.**
|
|
174
|
+
|
|
175
|
+
This phase is **always required** regardless of whether Phase A was executed.
|
|
176
|
+
|
|
177
|
+
#### How to invoke implementation-planner:
|
|
128
178
|
|
|
129
179
|
```
|
|
130
|
-
Task tool call
|
|
180
|
+
Task tool call:
|
|
131
181
|
- subagent_type: "implementation-planner"
|
|
132
182
|
- description: "SPEC analysis and establishment of execution strategy"
|
|
133
|
-
- prompt: "
|
|
134
|
-
|
|
135
|
-
1. SPEC
|
|
136
|
-
2.
|
|
137
|
-
|
|
138
|
-
4.
|
|
139
|
-
5.
|
|
140
|
-
6.
|
|
141
|
-
(
|
|
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"
|
|
142
192
|
```
|
|
143
193
|
|
|
194
|
+
**Note**: If Phase A was executed, pass the exploration results via `$EXPLORE_RESULTS` variable.
|
|
195
|
+
|
|
144
196
|
### SPEC analysis in progress
|
|
145
197
|
|
|
146
198
|
1. **SPEC document analysis**
|
|
@@ -183,36 +235,166 @@ After reviewing the action plan, select one of the following:
|
|
|
183
235
|
|
|
184
236
|
After user approval (gathered through `AskUserQuestion tool (documented in moai-alfred-interactive-questions skill)`), **call the tdd-implementer agent using the Task tool**.
|
|
185
237
|
|
|
186
|
-
|
|
238
|
+
---
|
|
187
239
|
|
|
188
|
-
|
|
240
|
+
### 2.0.5 Domain Readiness Check (Automatic - Before Implementation)
|
|
241
|
+
|
|
242
|
+
**Purpose**: Load domain-expert agents as "implementation advisors" based on SPEC.stack metadata
|
|
189
243
|
|
|
244
|
+
**When to run**: After user approval, BEFORE invoking tdd-implementer
|
|
245
|
+
|
|
246
|
+
**Detection Logic**:
|
|
247
|
+
|
|
248
|
+
Alfred reads the SPEC metadata to identify required domains:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Read SPEC metadata
|
|
252
|
+
spec_metadata=$(grep "^domains:" .moai/specs/SPEC-{ID}/spec.md)
|
|
253
|
+
|
|
254
|
+
# Or read from config.json
|
|
255
|
+
selected_domains=$(jq -r '.stack.selected_domains[]' .moai/config.json)
|
|
190
256
|
```
|
|
191
|
-
Call the Task tool:
|
|
192
|
-
- subagent_type: "tdd-implementer"
|
|
193
|
-
- description: "Execute task with TDD implementation"
|
|
194
|
-
- prompt: """You are tdd-implementer agent.
|
|
195
257
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
258
|
+
**Domain Expert Advisory Pattern**:
|
|
259
|
+
|
|
260
|
+
| Domain | Readiness Check | Advisory Focus |
|
|
261
|
+
|--------|----------------|----------------|
|
|
262
|
+
| **Frontend** | Component structure, testing strategy, state management | Component hierarchy, React/Vue best practices, UI testing patterns |
|
|
263
|
+
| **Backend** | API contract, database schema, async patterns | RESTful design, database indexing, error handling, authentication |
|
|
264
|
+
| **DevOps** | Docker readiness, environment variables, health checks | Containerization, CI/CD integration, deployment strategies |
|
|
265
|
+
| **Database** | Schema design, migration strategy, indexing | Data modeling, query optimization, migration safety |
|
|
266
|
+
| **Data Science** | Data pipeline design, notebook structure | ETL patterns, data validation, model versioning |
|
|
267
|
+
| **Mobile** | Platform-specific requirements, app lifecycle | Native integration, state management, offline support |
|
|
268
|
+
|
|
269
|
+
**Example Invocation** (Frontend + Backend detected):
|
|
270
|
+
|
|
271
|
+
```python
|
|
272
|
+
# Read SPEC metadata
|
|
273
|
+
spec_domains = ["frontend", "backend"] # from SPEC frontmatter
|
|
274
|
+
|
|
275
|
+
# Invoke domain experts BEFORE tdd-implementer
|
|
276
|
+
for domain in spec_domains:
|
|
277
|
+
if domain == "frontend":
|
|
278
|
+
Task(
|
|
279
|
+
subagent_type="Explore",
|
|
280
|
+
prompt="""You are consulting as frontend-expert for TDD implementation.
|
|
281
|
+
|
|
282
|
+
SPEC: [SPEC-UI-001 - User Dashboard Component]
|
|
283
|
+
|
|
284
|
+
Provide implementation readiness check:
|
|
285
|
+
1. Component structure recommendations
|
|
286
|
+
2. State management approach (Redux/Zustand/Context)
|
|
287
|
+
3. Testing strategy (Jest + Testing Library)
|
|
288
|
+
4. Accessibility requirements
|
|
289
|
+
5. Performance optimization tips
|
|
290
|
+
|
|
291
|
+
Output: Brief advisory for tdd-implementer (3-4 key points)"""
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
if domain == "backend":
|
|
295
|
+
Task(
|
|
296
|
+
subagent_type="Explore",
|
|
297
|
+
prompt="""You are consulting as backend-expert for TDD implementation.
|
|
298
|
+
|
|
299
|
+
SPEC: [SPEC-API-001 - Authentication Endpoints]
|
|
300
|
+
|
|
301
|
+
Provide implementation readiness check:
|
|
302
|
+
1. API contract validation
|
|
303
|
+
2. Database schema requirements
|
|
304
|
+
3. Authentication/authorization patterns
|
|
305
|
+
4. Error handling strategy
|
|
306
|
+
5. Async processing considerations
|
|
307
|
+
|
|
308
|
+
Output: Brief advisory for tdd-implementer (3-4 key points)"""
|
|
309
|
+
)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Output Format** (Stored in SPEC plan.md):
|
|
313
|
+
|
|
314
|
+
```markdown
|
|
315
|
+
## Domain Expert Advisory (Implementation Phase)
|
|
316
|
+
|
|
317
|
+
### Frontend Readiness
|
|
318
|
+
- Component structure: Use compound component pattern for Dashboard
|
|
319
|
+
- State management: Recommend Zustand for lightweight state
|
|
320
|
+
- Testing: Prioritize user interaction tests over implementation details
|
|
321
|
+
- Performance: Implement React.memo for expensive components
|
|
322
|
+
|
|
323
|
+
### Backend Readiness
|
|
324
|
+
- API contract: OpenAPI 3.0 spec generated from FastAPI
|
|
325
|
+
- Database schema: Add index on user_id and created_at columns
|
|
326
|
+
- Authentication: Use JWT with refresh token rotation
|
|
327
|
+
- Async: Use background tasks for email notifications
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Integration with tdd-implementer**:
|
|
331
|
+
|
|
332
|
+
```python
|
|
333
|
+
# Pass domain expert feedback to tdd-implementer
|
|
334
|
+
Task(
|
|
335
|
+
subagent_type="tdd-implementer",
|
|
336
|
+
prompt="""You are tdd-implementer agent.
|
|
199
337
|
|
|
200
|
-
|
|
201
|
-
Code and technical output MUST be in English.
|
|
202
|
-
Code comments MAY be in {{CONVERSATION_LANGUAGE}} if appropriate.
|
|
203
|
-
Test descriptions and documentation can use {{CONVERSATION_LANGUAGE}}.
|
|
338
|
+
SPEC: SPEC-{ID}
|
|
204
339
|
|
|
205
|
-
|
|
340
|
+
DOMAIN EXPERT ADVISORY:
|
|
341
|
+
{domain_expert_feedback}
|
|
206
342
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- Perform the following for each TAG:
|
|
210
|
-
1. RED Phase: Write a test that fails with the @TEST:ID tag
|
|
211
|
-
2. GREEN Phase: Minimal implementation with the @CODE:ID tag
|
|
212
|
-
3. REFACTOR Phase: Improve code quality
|
|
213
|
-
4. Verify TAG completion conditions and proceed to the next TAG
|
|
343
|
+
Execute TDD implementation considering domain expert guidance.
|
|
344
|
+
Follow RED → GREEN → REFACTOR cycle with domain best practices.
|
|
214
345
|
|
|
215
|
-
|
|
346
|
+
$ARGUMENTS"""
|
|
347
|
+
)
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Graceful Degradation**:
|
|
351
|
+
- If SPEC.stack.domains missing → Skip advisory (greenfield implementation)
|
|
352
|
+
- If domain expert unavailable → Continue with tdd-implementer only
|
|
353
|
+
- Advisory is non-blocking (implementation proceeds regardless)
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
### ⚙️ How to call an agent
|
|
358
|
+
|
|
359
|
+
**STEP 2 calls tdd-implementer using the Task tool**:
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
Call the Task tool:
|
|
363
|
+
- subagent_type: "tdd-implementer"
|
|
364
|
+
- description: "Execute task with TDD implementation"
|
|
365
|
+
- prompt: """당신은 tdd-implementer 에이전트입니다.
|
|
366
|
+
|
|
367
|
+
언어 설정:
|
|
368
|
+
- 대화_언어: {{CONVERSATION_LANGUAGE}}
|
|
369
|
+
- 언어명: {{CONVERSATION_LANGUAGE_NAME}}
|
|
370
|
+
|
|
371
|
+
중요 지시사항:
|
|
372
|
+
**Code and technical output MUST be in English.** This ensures global compatibility and maintainability.
|
|
373
|
+
|
|
374
|
+
코드 문법 및 키워드: 영어 (고정).
|
|
375
|
+
코드 주석:
|
|
376
|
+
- 로컬 프로젝트 코드: 반드시 {{CONVERSATION_LANGUAGE}}로 작성
|
|
377
|
+
- 패키지 코드 (src/moai_adk/): 반드시 영어로 작성 (글로벌 배포용)
|
|
378
|
+
테스트 설명 및 문서: 반드시 {{CONVERSATION_LANGUAGE}}로 작성.
|
|
379
|
+
|
|
380
|
+
스킬 호출:
|
|
381
|
+
필요 시 명시적 Skill() 호출 사용:
|
|
382
|
+
- Skill("moai-alfred-language-detection") - 프로젝트 언어 감지
|
|
383
|
+
- Skill("moai-lang-python") 또는 언어별 스킬 - 베스트 프랙티스
|
|
384
|
+
- Skill("moai-essentials-debug") - 테스트 실패 시
|
|
385
|
+
- Skill("moai-essentials-refactor") - REFACTOR 단계에서
|
|
386
|
+
|
|
387
|
+
작업: STEP 1에서 승인된 계획에 따라 작업을 실행합니다.
|
|
388
|
+
|
|
389
|
+
TDD 시나리오의 경우:
|
|
390
|
+
- RED → GREEN → REFACTOR 사이클 수행
|
|
391
|
+
- 각 TAG에 대해 다음을 수행:
|
|
392
|
+
1. RED 단계: @TEST:ID 태그로 실패하는 테스트 작성
|
|
393
|
+
2. GREEN 단계: @CODE:ID 태그로 최소한의 구현
|
|
394
|
+
3. REFACTOR 단계: 코드 품질 개선
|
|
395
|
+
4. TAG 완료 조건 확인 및 다음 TAG 진행
|
|
396
|
+
|
|
397
|
+
실행 대상: $ARGUMENTS"""
|
|
216
398
|
```
|
|
217
399
|
|
|
218
400
|
## 🔗 TDD optimization for each language
|
|
@@ -469,7 +651,7 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
|
|
|
469
651
|
|
|
470
652
|
## 🧠 Context Management
|
|
471
653
|
|
|
472
|
-
> For more information:
|
|
654
|
+
> For more information: Skill("moai-alfred-dev-guide") - see section "Context Engineering"
|
|
473
655
|
|
|
474
656
|
### Core strategy of this command
|
|
475
657
|
|
|
@@ -479,6 +661,45 @@ Only if the user selects **"Proceed"** or **"Start"** will Alfred call the tdd-i
|
|
|
479
661
|
|
|
480
662
|
---
|
|
481
663
|
|
|
664
|
+
## Final Step
|
|
665
|
+
|
|
666
|
+
### After STEP 3 (git-manager) Completes
|
|
667
|
+
|
|
668
|
+
Alfred calls AskUserQuestion to collect user's next action:
|
|
669
|
+
|
|
670
|
+
```python
|
|
671
|
+
AskUserQuestion(
|
|
672
|
+
questions=[
|
|
673
|
+
{
|
|
674
|
+
"question": "구현이 완료되었습니다. 다음으로 뭘 하시겠습니까?",
|
|
675
|
+
"header": "다음 단계",
|
|
676
|
+
"multiSelect": false,
|
|
677
|
+
"options": [
|
|
678
|
+
{
|
|
679
|
+
"label": "📚 문서 동기화 진행",
|
|
680
|
+
"description": "/alfred:3-sync 실행하여 문서 동기화"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"label": "🔍 추가 구현",
|
|
684
|
+
"description": "다른 SPEC 구현 진행"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"label": "🔄 새 세션 시작",
|
|
688
|
+
"description": "성능 최적화를 위해 /clear 실행"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
}
|
|
692
|
+
]
|
|
693
|
+
)
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
**User Responses**:
|
|
697
|
+
- **📚 문서 동기화**: Proceed to `/alfred:3-sync` for documentation synchronization
|
|
698
|
+
- **🔍 추가 구현**: Repeat `/alfred:2-run SPEC-XXX` for next feature
|
|
699
|
+
- **🔄 새 세션**: Execute `/clear` to start fresh session (recommended for performance)
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
482
703
|
## Next steps
|
|
483
704
|
|
|
484
705
|
**Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
|