moai-adk 0.4.5__py3-none-any.whl β 0.20.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/__init__.py +1 -1
- moai_adk/__main__.py +74 -1
- moai_adk/cli/commands/__init__.py +1 -1
- moai_adk/cli/commands/analyze.py +119 -0
- moai_adk/cli/commands/backup.py +25 -1
- moai_adk/cli/commands/doctor.py +31 -5
- moai_adk/cli/commands/improve_user_experience.py +307 -0
- moai_adk/cli/commands/init.py +111 -10
- moai_adk/cli/commands/status.py +33 -3
- moai_adk/cli/commands/update.py +921 -130
- moai_adk/cli/commands/validate_links.py +120 -0
- moai_adk/cli/prompts/init_prompts.py +22 -87
- moai_adk/core/analysis/__init__.py +9 -0
- moai_adk/core/analysis/session_analyzer.py +388 -0
- moai_adk/core/analysis/tag_chain_analyzer.py +344 -0
- moai_adk/core/analysis/tag_chain_repair.py +879 -0
- moai_adk/core/config/__init__.py +19 -0
- moai_adk/core/config/migration.py +235 -0
- moai_adk/core/git/__init__.py +1 -1
- moai_adk/core/git/branch.py +1 -1
- moai_adk/core/git/commit.py +1 -1
- moai_adk/core/git/manager.py +1 -1
- moai_adk/core/issue_creator.py +313 -0
- moai_adk/core/mcp/setup.py +56 -0
- moai_adk/core/mcp/setup_old.py +296 -0
- moai_adk/core/project/backup_utils.py +1 -1
- moai_adk/core/project/checker.py +2 -2
- moai_adk/core/project/detector.py +211 -12
- moai_adk/core/project/initializer.py +85 -15
- moai_adk/core/project/phase_executor.py +76 -13
- moai_adk/core/project/validator.py +13 -13
- moai_adk/core/quality/__init__.py +1 -1
- moai_adk/core/quality/trust_checker.py +1 -1
- moai_adk/core/quality/validators/__init__.py +1 -1
- moai_adk/core/quality/validators/base_validator.py +1 -1
- moai_adk/core/tags/__init__.py +86 -0
- moai_adk/core/tags/auto_corrector.py +693 -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/policy_validator.py +580 -0
- moai_adk/core/tags/pre_commit_validator.py +421 -0
- moai_adk/core/tags/reporter.py +956 -0
- moai_adk/core/tags/rollback_manager.py +525 -0
- moai_adk/core/tags/tags.py +149 -0
- moai_adk/core/tags/validator.py +897 -0
- moai_adk/core/template/__init__.py +1 -1
- moai_adk/core/template/backup.py +1 -1
- moai_adk/core/template/merger.py +50 -1
- moai_adk/core/template/processor.py +119 -13
- moai_adk/core/template_engine.py +268 -0
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +348 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +209 -944
- moai_adk/templates/.claude/agents/alfred/database-expert.md +352 -0
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +34 -5
- moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +38 -8
- moai_adk/templates/.claude/agents/alfred/format-expert.md +469 -0
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +128 -9
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +104 -6
- moai_adk/templates/.claude/agents/alfred/project-manager.md +88 -16
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +36 -9
- moai_adk/templates/.claude/agents/alfred/security-expert.md +270 -0
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +214 -43
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +111 -9
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +309 -160
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +36 -7
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +605 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +393 -966
- moai_adk/templates/.claude/commands/alfred/1-plan.md +651 -367
- moai_adk/templates/.claude/commands/alfred/2-run.md +388 -241
- moai_adk/templates/.claude/commands/alfred/3-sync.md +1921 -410
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +153 -0
- moai_adk/templates/.claude/commands/alfred/release-new.md +3604 -0
- moai_adk/templates/.claude/hooks/alfred/core/project.py +484 -20
- 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__enable_streaming_ui.py +50 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +93 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__tag_auto_corrector.py +407 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +99 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__realtime_tag_monitor.py +335 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__tag_policy_validator.py +325 -0
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +93 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__auto_cleanup.py +580 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +298 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
- 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/shared/core/tags.py +230 -0
- 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/daily_analysis.py +351 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
- moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
- moai_adk/templates/.claude/hooks/alfred/utils/hook_config.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
- moai_adk/templates/.claude/output-styles/alfred/alfred-moai-adk-beginner.md +267 -0
- moai_adk/templates/.claude/output-styles/alfred/keating-personal-tutor.md +440 -0
- moai_adk/templates/.claude/output-styles/alfred/r2d2-agentic-coding.md +583 -0
- moai_adk/templates/.claude/settings.json +96 -14
- 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/.claude/skills/moai-alfred-agent-guide/reference.md +242 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/SKILL.md +237 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/examples.md +871 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/reference.md +653 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/README.md +162 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/SKILL.md +227 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/examples.md +354 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/reference.md +158 -0
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +179 -79
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +117 -0
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/scripts/pre-review-check.sh +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +132 -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-issue-labels/SKILL.md +229 -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-language-detection/SKILL.md +87 -73
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/README.md +42 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/SKILL.md +429 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/examples.md +520 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/reference.md +405 -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-practices/reference.md +369 -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-rules/SKILL.md +77 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +539 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +320 -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-alfred-spec-authoring/examples/validate-spec.sh +161 -0
- 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-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-agents/SKILL.md +269 -0
- moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
- moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
- moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
- moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
- moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
- moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
- moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +482 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +303 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +477 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +273 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +583 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +526 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +608 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +328 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +312 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +285 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +278 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +303 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
- moai_adk/templates/.claude/skills/moai-change-logger/SKILL.md +563 -0
- 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-backend/SKILL.md +234 -43
- moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
- moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
- moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +102 -73
- moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
- moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
- moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
- moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +265 -64
- moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
- moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
- moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
- moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +80 -62
- moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +207 -50
- moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
- moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
- moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
- moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/.!11330!examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
- moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
- moai_adk/templates/.claude/skills/moai-jit-docs-enhanced/SKILL.md +460 -0
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
- moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +2358 -70
- moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +2962 -68
- moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +1898 -70
- moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +1465 -68
- moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +2364 -66
- moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +1630 -69
- moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +89 -61
- moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +735 -66
- moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
- moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
- moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
- moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +1834 -70
- moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +99 -74
- moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
- moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +1959 -69
- moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-template/SKILL.md +348 -0
- moai_adk/templates/.claude/skills/moai-lang-template/VARIABLES.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +1230 -66
- moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
- moai_adk/templates/.claude/skills/moai-learning-optimizer/SKILL.md +575 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/README.md +50 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/SKILL.md +304 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/examples.md +417 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/reference.md +704 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/README.md +87 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/SKILL.md +552 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/examples.md +1109 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/reference.md +514 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/validate.py +106 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/README.md +11 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/SKILL.md +622 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/examples.md +20 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/reference.md +12 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/README.md +152 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/SKILL.md +285 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/examples.md +333 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/reference.md +386 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/README.md +49 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/SKILL.md +319 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/examples.md +58 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/reference.md +123 -0
- moai_adk/templates/.claude/skills/moai-session-info/SKILL.md +314 -0
- moai_adk/templates/.claude/skills/moai-streaming-ui/SKILL.md +552 -0
- moai_adk/templates/.claude/skills/moai-tag-policy-validator/SKILL.md +570 -0
- moai_adk/templates/.git-hooks/pre-commit +66 -0
- moai_adk/templates/.git-hooks/pre-push +255 -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 +338 -0
- 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/.mcp.json +31 -0
- moai_adk/templates/.moai/config.json +80 -7
- moai_adk/templates/CLAUDE.md +562 -546
- moai_adk/utils/banner.py +5 -5
- moai_adk/utils/common.py +294 -0
- moai_adk/utils/link_validator.py +235 -0
- moai_adk/utils/logger.py +8 -8
- moai_adk/utils/user_experience.py +451 -0
- moai_adk-0.20.1.dist-info/METADATA +233 -0
- moai_adk-0.20.1.dist-info/RECORD +404 -0
- moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -156
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -85
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -92
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -70
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -41
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -636
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -692
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -470
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -103
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -95
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -97
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -90
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -99
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
- 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/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-0.4.5.dist-info/METADATA +0 -369
- moai_adk-0.4.5.dist-info/RECORD +0 -152
- {moai_adk-0.4.5.dist-info β moai_adk-0.20.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.5.dist-info β moai_adk-0.20.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.5.dist-info β moai_adk-0.20.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alfred:0-project
|
|
3
|
-
description: Initialize project
|
|
3
|
+
description: "Initialize project metadata and documentation"
|
|
4
|
+
argument-hint: "[setting|update]"
|
|
4
5
|
allowed-tools:
|
|
5
6
|
- Read
|
|
6
7
|
- Write
|
|
@@ -16,39 +17,58 @@ allowed-tools:
|
|
|
16
17
|
---
|
|
17
18
|
|
|
18
19
|
# π MoAI-ADK Step 0: Initialize/Update Universal Language Support Project Documentation
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
> **Note**: Interactive prompts use `AskUserQuestion tool (documented in moai-alfred-ask-user-questions skill)` for TUI selection menus. The skill is loaded on-demand when user interaction is required.
|
|
20
22
|
|
|
21
23
|
## π― Command Purpose
|
|
22
24
|
|
|
23
|
-
Automatically analyzes the project environment to create/update product/structure/tech.md documents and configure language-specific optimization settings
|
|
25
|
+
Automatically analyzes the project environment to create/update product/structure/tech.md documents and configure language-specific optimization settings with **language-first contextual flows**.
|
|
24
26
|
|
|
25
|
-
##
|
|
27
|
+
## π Language-First Architecture (CRITICAL)
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
1. **Environment Analysis**: Automatically detect project type (new/legacy) and codebase language
|
|
29
|
-
2. **Establishment of interview strategy**: Select question tree suited to project characteristics
|
|
30
|
-
3. **User Verification**: Review and approve interview plan
|
|
31
|
-
4. **Create project documentation**: Create product/structure/tech.md in the selected language
|
|
32
|
-
5. **Create configuration file**: config.json auto-configuration
|
|
29
|
+
**Core Principle**: Language selection ALWAYS happens BEFORE any other configuration or operations.
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
### Language-First Flow Rules
|
|
32
|
+
1. **Language First**: Language selection is the VERY FIRST step in ANY flow
|
|
33
|
+
2. **Context Persistence**: Once selected, ALL subsequent interactions use that language
|
|
34
|
+
3. **Flow Adaptation**: Each flow (fresh install/update/settings) adapts based on language context
|
|
35
|
+
4. **Settings Respect**: Existing language settings are confirmed before any operations
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
|
|
|
37
|
+
### Contextual Flow Differentiation
|
|
38
|
+
| Context | Language Handling | Flow Type | Key Features |
|
|
39
|
+
|---------|-------------------|-----------|--------------|
|
|
40
|
+
| **Fresh Install** | Language selection FIRST | Installation questionnaire | Complete setup, language-aware documentation |
|
|
41
|
+
| **Update Mode** | Language confirmation FIRST | Update/merge questionnaire | Template optimization, language-aware updates |
|
|
42
|
+
| **Existing Project** | Language confirmation FIRST | Settings modification options | Language change priority, contextual settings |
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
## π Execution Flow
|
|
45
|
+
|
|
46
|
+
**Step 1: Command Routing** - Detect subcommand and route to appropriate workflow
|
|
47
|
+
**Step 2: Language Context Establishment** - ALWAYS determine/confirm language FIRST
|
|
48
|
+
**Step 3: Contextual Flow Execution** - Execute appropriate contextual flow
|
|
49
|
+
**Step 4: Skills Integration** - Use specialized skills with language context
|
|
50
|
+
**Step 5: Completion** - Provide next step options in selected language
|
|
51
|
+
|
|
52
|
+
## π§ Associated Skills & Agents
|
|
53
|
+
|
|
54
|
+
| Agent/Skill | Core Skill | Purpose |
|
|
55
|
+
| ------------------------------ | ----------------------------------- | --------------------------------------------- |
|
|
56
|
+
| project-manager | `moai-alfred-language-detection` | Initialize project and interview requirements |
|
|
57
|
+
| trust-checker | `moai-alfred-trust-validation` | Verify initial project structure (optional) |
|
|
58
|
+
| **NEW: Language Initializer** | `moai-project-language-initializer` | Handle language and user setup workflows |
|
|
59
|
+
| **NEW: Config Manager** | `moai-project-config-manager` | Manage all configuration operations |
|
|
60
|
+
| **NEW: Template Optimizer** | `moai-project-template-optimizer` | Handle template comparison and optimization |
|
|
61
|
+
| **NEW: Batch Questions** | `moai-project-batch-questions` | Standardize user interaction patterns |
|
|
42
62
|
|
|
43
63
|
## π Associated Agent
|
|
44
64
|
|
|
45
65
|
- **Primary**: project-manager (π planner) - Dedicated to project initialization
|
|
46
66
|
- **Quality Check**: trust-checker (β
Quality assurance lead) - Initial structural verification (optional)
|
|
47
|
-
- **Secondary**:
|
|
67
|
+
- **Secondary**: 4 specialized skills for complex workflows
|
|
48
68
|
|
|
49
69
|
## π‘ Example of use
|
|
50
70
|
|
|
51
|
-
The user executes the `/alfred:
|
|
71
|
+
The user executes the `/alfred:0-project` command to analyze the project and create/update documents.
|
|
52
72
|
|
|
53
73
|
## Command Overview
|
|
54
74
|
|
|
@@ -58,12 +78,14 @@ It is a systematic initialization system that analyzes the project environment a
|
|
|
58
78
|
- **Project type classification**: Automatically determine new vs. existing projects
|
|
59
79
|
- **High-performance initialization**: Achieve 0.18 second initialization with TypeScript-based CLI
|
|
60
80
|
- **2-step workflow**: 1) Analysis and planning β 2) Execution after user approval
|
|
81
|
+
- **Skills-based architecture**: Complex operations handled by dedicated skills
|
|
61
82
|
|
|
62
83
|
## How to use
|
|
63
84
|
|
|
64
|
-
The user executes the `/alfred:
|
|
85
|
+
The user executes the `/alfred:0-project` command to start analyzing the project and creating/updating documents.
|
|
65
86
|
|
|
66
87
|
**Automatic processing**:
|
|
88
|
+
|
|
67
89
|
- Update mode if there is an existing `.moai/project/` document
|
|
68
90
|
- New creation mode if there is no document
|
|
69
91
|
- Automatic detection of language and project type
|
|
@@ -75,7 +97,7 @@ The user executes the `/alfred:8-project` command to start analyzing the project
|
|
|
75
97
|
- β Create a file in the `.claude/memory/` directory
|
|
76
98
|
- β Create a file `.claude/commands/alfred/*.json`
|
|
77
99
|
- β Unnecessary overwriting of existing documents
|
|
78
|
-
- β Date and numerical prediction (
|
|
100
|
+
- β Date and numerical prediction ("within 3 months", "50% reduction") etc.
|
|
79
101
|
- β Hypothetical scenarios, expected market size, future technology trend predictions
|
|
80
102
|
|
|
81
103
|
**Expressions to use**:
|
|
@@ -88,1020 +110,425 @@ The user executes the `/alfred:8-project` command to start analyzing the project
|
|
|
88
110
|
|
|
89
111
|
---
|
|
90
112
|
|
|
91
|
-
## π
|
|
92
|
-
|
|
93
|
-
**
|
|
94
|
-
|
|
95
|
-
###
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- Alfred's prompts are translated
|
|
133
|
-
- project-manager sub-agent receives language parameter
|
|
134
|
-
- Interview questions are in the selected language
|
|
135
|
-
- Generated documents (product.md, structure.md, tech.md) are in the selected language
|
|
136
|
-
- CLAUDE.md displays the selected language prominently
|
|
137
|
-
|
|
138
|
-
**Example output for Korean selection**:
|
|
139
|
-
```markdown
|
|
140
|
-
β
μΈμ΄ μ ν μλ£: νκ΅μ΄ (ko)
|
|
141
|
-
|
|
142
|
-
μ΄μ νλ‘μ νΈ νκ²½ λΆμμΌλ‘ μ§ννκ² μ΅λλ€...
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## π STEP 1: Environmental analysis and interview plan development
|
|
148
|
-
|
|
149
|
-
Analyze the project environment and develop a systematic interview plan.
|
|
150
|
-
|
|
151
|
-
### 1.0 Check backup directory (highest priority)
|
|
152
|
-
|
|
153
|
-
**Processing backup files after moai-adk init reinitialization**
|
|
154
|
-
|
|
155
|
-
Alfred first checks the `.moai-backups/` directory:
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
# Check latest backup timestamp
|
|
159
|
-
ls -t .moai-backups/ | head -1
|
|
160
|
-
|
|
161
|
-
# Check the optimized flag in config.json
|
|
162
|
-
grep "optimized" .moai/config.json
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
**Backup existence conditions**:
|
|
166
|
-
- `.moai-backups/` directory exists
|
|
167
|
-
- `.moai/project/*.md` file exists in the latest backup folder
|
|
168
|
-
- `optimized: false` in `config.json` (immediately after reinitialization)
|
|
169
|
-
|
|
170
|
-
**Select user if backup exists**
|
|
171
|
-
Call `Skill("moai-alfred-tui-survey")` to display a TUI with the following options:
|
|
172
|
-
- **Merge**: Merge backup contents and latest template (recommended)
|
|
173
|
-
- **New**: Ignore the backup and start a new interview
|
|
174
|
-
- **Skip**: Keep current file (terminate task)
|
|
175
|
-
|
|
176
|
-
**Response processing**:
|
|
177
|
-
- **"Merge"** β Proceed to Phase 1.1 (backup merge workflow)
|
|
178
|
-
- **"Create new"** β Proceed to Phase 1.2 (Project environment analysis) (existing process)
|
|
179
|
-
- **"Skip"** β End task
|
|
180
|
-
|
|
181
|
-
**No backup or optimized: true**:
|
|
182
|
-
- Proceed directly to Phase 1.2 (project environment analysis)
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
### 1.1 Backup merge workflow (when user selects βMergeβ)
|
|
187
|
-
|
|
188
|
-
**Purpose**: Restore only user customizations while maintaining the latest template structure.
|
|
189
|
-
|
|
190
|
-
**STEP 1: Read backup file**
|
|
191
|
-
|
|
192
|
-
Alfred reads files from the latest backup directory:
|
|
193
|
-
```bash
|
|
194
|
-
# Latest backup directory path
|
|
195
|
-
BACKUP_DIR=.moai-backups/$(ls -t .moai-backups/ | head -1)
|
|
196
|
-
|
|
197
|
-
# Read backup file
|
|
198
|
-
Read $BACKUP_DIR/.moai/project/product.md
|
|
199
|
-
Read $BACKUP_DIR/.moai/project/structure.md
|
|
200
|
-
Read $BACKUP_DIR/.moai/project/tech.md
|
|
201
|
-
Read $BACKUP_DIR/CLAUDE.md
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**STEP 2: Detect template defaults**
|
|
205
|
-
|
|
206
|
-
The following patterns are considered "template defaults" (not merged):
|
|
207
|
-
- "Define your key user base"
|
|
208
|
-
- "Describe the core problem you are trying to solve"
|
|
209
|
-
- "List the strengths and differences of your project"
|
|
210
|
-
- "{{PROJECT_NAME}}", "{{PROJECT_DESCRIPTION}}", etc. Variable format
|
|
211
|
-
- Guide phrases such as "Example:", "Sample:", "Example:", etc.
|
|
212
|
-
|
|
213
|
-
**STEP 3: Extract user customization**
|
|
214
|
-
|
|
215
|
-
Extract only **non-template default content** from the backup file:
|
|
216
|
-
- `product.md`:
|
|
217
|
-
- Define your actual user base in the USER section
|
|
218
|
-
- Describe the actual problem in the PROBLEM section
|
|
219
|
-
- Real differences in the STRATEGY section
|
|
220
|
-
- Actual success metrics in the SUCCESS section
|
|
221
|
-
- `structure.md`:
|
|
222
|
-
- Actual design in the ARCHITECTURE section
|
|
223
|
-
- Actual module structure in the MODULES section
|
|
224
|
-
- Actual integration plan in the INTEGRATION section
|
|
225
|
-
- `tech.md`:
|
|
226
|
-
- The actual technology stack
|
|
227
|
-
in the STACK section - The actual framework
|
|
228
|
-
in the FRAMEWORK section - The actual quality policy
|
|
229
|
-
in the QUALITY section - `HISTORY` section: **Full Preservation** (all files)
|
|
230
|
-
|
|
231
|
-
**STEP 4: Merge Strategy**
|
|
232
|
-
|
|
233
|
-
```markdown
|
|
234
|
-
Latest template structure (v0.4.0+)
|
|
235
|
-
β
|
|
236
|
-
Insert user customization (extracted from backup file)
|
|
237
|
-
β
|
|
238
|
-
HISTORY section updates
|
|
239
|
-
β
|
|
240
|
-
Version update (v0.1.x β v0.1.x+1)
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**Merge Principle**:
|
|
244
|
-
- β
Maintain the latest version of the template structure (section order, header, @TAG format)
|
|
245
|
-
- β
Insert only user customization (actual content written)
|
|
246
|
-
- β
Cumulative preservation of the HISTORY section (existing history + merge history)
|
|
247
|
-
- β Replace template default values ββwith the latest version
|
|
248
|
-
|
|
249
|
-
**STEP 5: HISTORY Section Update**
|
|
250
|
-
|
|
251
|
-
After the merge is complete, add history to the HISTORY section of each file:
|
|
252
|
-
```yaml
|
|
253
|
-
### v0.1.x+1 (2025-10-19)
|
|
254
|
-
- **UPDATED**: Merge backup files (automatic optimization)
|
|
255
|
-
- AUTHOR: @Alfred
|
|
256
|
-
- BACKUP: .moai-backups/20251018-003638/
|
|
257
|
-
- REASON: Restoring user customization after moai-adk init reinitialization
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
**STEP 6: Update config.json**
|
|
261
|
-
|
|
262
|
-
Set optimization flags after the merge is complete:
|
|
263
|
-
```json
|
|
264
|
-
{
|
|
265
|
-
"project": {
|
|
266
|
-
"optimized": true,
|
|
267
|
-
"last_merge": "2025-10-19T12:34:56+09:00",
|
|
268
|
-
"backup_source": ".moai-backups/20251018-003638/"
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**STEP 7: Completion Report**
|
|
274
|
-
|
|
275
|
-
```markdown
|
|
276
|
-
β
Backup merge completed!
|
|
277
|
-
|
|
278
|
-
π Merged files:
|
|
279
|
-
- .moai/project/product.md (v0.1.4 β v0.1.5)
|
|
280
|
-
- .moai/project/structure.md (v0.1.1 β v0.1.2)
|
|
281
|
-
- .moai/project/tech.md (v0.1.1 β v0.1.2)
|
|
282
|
-
- .moai/config.json (optimized: false β true)
|
|
283
|
-
|
|
284
|
-
π Merge history:
|
|
285
|
-
- USER section: Restore customized contents of backup file
|
|
286
|
-
- PROBLEM section: Restore problem description of backup file
|
|
287
|
-
- STRATEGY section: Restore differentials of backup file
|
|
288
|
-
- HISTORY section: Add merge history (cumulative retention)
|
|
113
|
+
## π Command Router: Detect and Route
|
|
114
|
+
|
|
115
|
+
**Your immediate task**: Detect which subcommand the user provided and route to the correct workflow.
|
|
116
|
+
|
|
117
|
+
### Step 1: Check what subcommand the user provided
|
|
118
|
+
|
|
119
|
+
**Look at the user's command carefully**:
|
|
120
|
+
- Did they type `/alfred:0-project setting`?
|
|
121
|
+
- Did they type `/alfred:0-project update`?
|
|
122
|
+
- Did they type just `/alfred:0-project` (no subcommand)?
|
|
123
|
+
- Did they type something invalid like `/alfred:0-project xyz`?
|
|
124
|
+
|
|
125
|
+
### Step 2: Route based on subcommand
|
|
126
|
+
|
|
127
|
+
**IF user typed: `/alfred:0-project setting`**:
|
|
128
|
+
1. Print: "π§ Entering Settings Mode - Modify existing project configuration"
|
|
129
|
+
2. **IMPORTANT**: Language context will be established in SETTINGS MODE
|
|
130
|
+
3. Jump to **SETTINGS MODE** below
|
|
131
|
+
4. Skip ALL other sections
|
|
132
|
+
5. Stop after completing SETTINGS MODE
|
|
133
|
+
6. **DO NOT proceed** to other workflows
|
|
134
|
+
|
|
135
|
+
**ELSE IF user typed: `/alfred:0-project update`**:
|
|
136
|
+
1. Print: "π Entering Template Update Mode - Optimize templates after moai-adk update"
|
|
137
|
+
2. **IMPORTANT**: Language context will be established FIRST in UPDATE MODE
|
|
138
|
+
3. Jump to **UPDATE MODE** below
|
|
139
|
+
4. Skip ALL other sections
|
|
140
|
+
5. Stop after completing UPDATE MODE
|
|
141
|
+
6. **DO NOT proceed** to other workflows
|
|
142
|
+
|
|
143
|
+
**ELSE IF user typed: `/alfred:0-project` (no subcommand, nothing after)**:
|
|
144
|
+
1. Check if the file `.moai/config.json` exists in the current directory
|
|
145
|
+
- Read the file path: `.moai/config.json`
|
|
146
|
+
- IF file exists β Print "β
Project is already initialized!" AND jump to **AUTO-DETECT MODE**
|
|
147
|
+
- IF file does NOT exist β Print "π Starting first-time project initialization..." AND jump to **INITIALIZATION MODE**
|
|
148
|
+
- **CRITICAL**: Both modes will establish language context FIRST
|
|
149
|
+
|
|
150
|
+
**ELSE IF user typed an invalid subcommand** (like `/alfred:0-project xyz`):
|
|
151
|
+
1. Print this error message:
|
|
152
|
+
```
|
|
153
|
+
β Unknown subcommand: xyz
|
|
289
154
|
|
|
290
|
-
|
|
291
|
-
-
|
|
292
|
-
-
|
|
155
|
+
Valid subcommands:
|
|
156
|
+
/alfred:0-project - Auto-detect mode (first-time or already initialized)
|
|
157
|
+
/alfred:0-project setting - Modify existing settings
|
|
158
|
+
/alfred:0-project update - Optimize templates after moai-adk update
|
|
293
159
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
2.
|
|
297
|
-
3.
|
|
160
|
+
Example: /alfred:0-project setting
|
|
161
|
+
```
|
|
162
|
+
2. Exit immediately
|
|
163
|
+
3. **DO NOT make any changes**
|
|
298
164
|
|
|
299
|
-
|
|
300
|
-
**Task completed: /alfred:0-project terminated**
|
|
301
|
-
```
|
|
165
|
+
### Step 3: CRITICAL RULES
|
|
302
166
|
|
|
303
|
-
**
|
|
167
|
+
β οΈ **IMPORTANT - Read this carefully**:
|
|
168
|
+
- Execute ONLY ONE mode per command invocation
|
|
169
|
+
- **DO NOT execute multiple modes** (e.g., do not run setting mode AND first-time setup in the same invocation)
|
|
170
|
+
- Stop and exit immediately after completing the selected mode
|
|
171
|
+
- **DO NOT jump to other workflows** unless that is the explicitly detected mode
|
|
172
|
+
- **DO NOT guess** which mode the user wanted - always detect from their actual command
|
|
304
173
|
|
|
305
174
|
---
|
|
306
175
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
**Automatically analyzed items**:
|
|
310
|
-
|
|
311
|
-
1. **Project Type Detection**
|
|
312
|
-
Alfred classifies new vs existing projects by analyzing the directory structure:
|
|
313
|
-
- Empty directory β New project
|
|
314
|
-
- Code/documentation present β Existing project
|
|
176
|
+
## π§ SETTINGS MODE: Modify Existing Project Configuration
|
|
315
177
|
|
|
316
|
-
|
|
317
|
-
- pyproject.toml, requirements.txt β Python
|
|
318
|
-
- package.json, tsconfig.json β TypeScript/Node.js
|
|
319
|
-
- pom.xml, build.gradle β Java
|
|
320
|
-
- go.mod β Go
|
|
321
|
-
- Cargo.toml β Rust
|
|
322
|
-
- backend/ + frontend/ β full stack
|
|
178
|
+
**When to execute**: `/alfred:0-project setting` OR user selected "Modify Settings" from auto-detect mode
|
|
323
179
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
- Identify areas of insufficient information
|
|
327
|
-
- Organize items that need supplementation
|
|
180
|
+
### Step 1: Language-First Settings Context
|
|
181
|
+
**IMPORTANT**: Always establish language context BEFORE any settings modifications.
|
|
328
182
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
183
|
+
1. **Check `.moai/config.json`** for existing language settings
|
|
184
|
+
2. **Language Confirmation** (in current language):
|
|
185
|
+
- If no config exists β **STOP** and redirect to INITIALIZATION MODE
|
|
186
|
+
- If config exists β Display current language and confirm
|
|
187
|
+
3. **Set Settings Language Context**: ALL settings interactions in confirmed language
|
|
333
188
|
|
|
334
|
-
###
|
|
335
|
-
|
|
336
|
-
**
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
- **Technical Questions**: Language/Framework, Quality Policy, Deployment Strategy
|
|
347
|
-
- **Governance**: Security Requirements, Traceability Strategy (Optional)
|
|
348
|
-
|
|
349
|
-
### 1.4 Generate Interview Plan Report (when user selects βCreate Newβ)
|
|
350
|
-
|
|
351
|
-
**Format of plan to be presented to users**:
|
|
352
|
-
|
|
353
|
-
```markdown
|
|
354
|
-
## π Project initialization plan: [PROJECT-NAME]
|
|
189
|
+
### Step 2: Load and Display Current Configuration (in confirmed language)
|
|
190
|
+
1. **Read `.moai/config.json`** to verify it exists and is valid JSON
|
|
191
|
+
2. **Extract and display current settings** (in confirmed language):
|
|
192
|
+
```
|
|
193
|
+
β
**μΈμ΄**: [language.conversation_language_name]
|
|
194
|
+
β
**λλ€μ**: [user.nickname]
|
|
195
|
+
β
**μμ΄μ νΈ ν둬ννΈ μΈμ΄**: [language.agent_prompt_language]
|
|
196
|
+
β
**GitHub μλ λΈλμΉ μμ **: [github.auto_delete_branches]
|
|
197
|
+
β
**SPEC Git μν¬νλ‘μ°**: [github.spec_git_workflow]
|
|
198
|
+
β
**λ³΄κ³ μ μμ±**: [report_generation.user_choice]
|
|
199
|
+
β
**μ νλ λλ©μΈ**: [stack.selected_domains]
|
|
200
|
+
```
|
|
355
201
|
|
|
356
|
-
###
|
|
357
|
-
|
|
358
|
-
- **Languages ββDetected**: [Language List]
|
|
359
|
-
- **Current Document Status**: [Completeness Rating 0-100%]
|
|
360
|
-
- **Structure Complexity**: [Simple/Medium/Complex]
|
|
202
|
+
### Step 3: Language Change Option (CRITICAL)
|
|
203
|
+
**Before showing other settings, offer language change first** (in confirmed language):
|
|
361
204
|
|
|
362
|
-
|
|
363
|
-
-
|
|
364
|
-
-
|
|
365
|
-
-
|
|
366
|
-
- **Priority area**: [Focus on Areas to be covered]
|
|
205
|
+
1. **Language Priority Question**:
|
|
206
|
+
- "μΈμ΄ μ€μ μ λ³κ²½νμκ² μ΅λκΉ?" (in Korean)
|
|
207
|
+
- "Would you like to change language settings?" (in English)
|
|
208
|
+
- Options: "Change Language" | "Keep Current" | "Show All Settings"
|
|
367
209
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
-
|
|
371
|
-
|
|
210
|
+
2. **IF user selects "Change Language"**:
|
|
211
|
+
```python
|
|
212
|
+
Skill("moai-project-language-initializer", mode="language_change_only")
|
|
213
|
+
```
|
|
214
|
+
- Update language context
|
|
215
|
+
- Restart settings mode in new language
|
|
372
216
|
|
|
373
|
-
|
|
374
|
-
-
|
|
375
|
-
-
|
|
376
|
-
- **tech.md**: [Technology stack and policy document]
|
|
377
|
-
- **config.json**: [Project configuration file]
|
|
217
|
+
3. **IF user selects "Keep Current" or "Show All Settings"**:
|
|
218
|
+
- Continue with current language context
|
|
219
|
+
- Proceed to Step 4
|
|
378
220
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
221
|
+
### Step 4: Use Config Manager Skill (Language-Aware)
|
|
222
|
+
```python
|
|
223
|
+
Skill("moai-project-config-manager", language=confirmed_language)
|
|
382
224
|
```
|
|
383
225
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
226
|
+
**Purpose**: Let the skill handle all configuration modification workflows with language context
|
|
227
|
+
**The skill will** (in confirmed language):
|
|
228
|
+
- Ask which settings to modify (using batched questions in confirmed language)
|
|
229
|
+
- Collect new values using batched questions in confirmed language
|
|
230
|
+
- Update config.json with proper merge strategy
|
|
231
|
+
- Handle validation and error recovery with language-appropriate messages
|
|
232
|
+
- Provide completion report in confirmed language
|
|
233
|
+
|
|
234
|
+
### Step 5: Exit after completion (in confirmed language)
|
|
235
|
+
1. **Print**: "β
μ€μ μ
λ°μ΄νΈ μλ£!" (or equivalent in confirmed language)
|
|
236
|
+
2. **Offer Next Steps** (in confirmed language):
|
|
237
|
+
- Option 1: "μΆκ° μ€μ μμ " β Continue settings mode
|
|
238
|
+
- Option 2: "νλ‘μ νΈ λ¬Έμ μμ±" β Guide to `/alfred:1-plan`
|
|
239
|
+
- Option 3: "μ’
λ£" β End command
|
|
240
|
+
3. **Do NOT proceed** to any other workflows
|
|
241
|
+
4. **End command execution**
|
|
395
242
|
|
|
396
243
|
---
|
|
397
244
|
|
|
398
|
-
##
|
|
399
|
-
|
|
400
|
-
**Note**: This step will only be executed if the user selects **"New"**.
|
|
401
|
-
- When selecting "Merge": End the task in Phase 1.1 (Merge Backups)
|
|
402
|
-
- When selecting "Skip": End the task
|
|
403
|
-
- When selecting "New": Proceed with the process below
|
|
404
|
-
|
|
405
|
-
After user approval, the project-manager agent performs initialization.
|
|
406
|
-
|
|
407
|
-
### 2.1 Call project-manager agent (when user selects "New")
|
|
408
|
-
|
|
409
|
-
Alfred starts project initialization by calling the project-manager agent with the following parameters:
|
|
410
|
-
|
|
411
|
-
**Parameters passed to project-manager**:
|
|
412
|
-
- **conversation_language** (from STEP 0): Language code selected by user (e.g., "ko", "en", "ja", "zh")
|
|
413
|
-
- **language_name** (from STEP 0): Display name of selected language (e.g., "Korean", "English")
|
|
414
|
-
- Detected Languages: [Language List from codebase detection]
|
|
415
|
-
- Project Type: [New/Existing]
|
|
416
|
-
- Existing Document Status: [Existence/Absence]
|
|
417
|
-
- Approved Interview Plan: [Plan Summary]
|
|
418
|
-
|
|
419
|
-
**Execution**:
|
|
420
|
-
```bash
|
|
421
|
-
# Pseudo-code showing parameter flow
|
|
422
|
-
Task(
|
|
423
|
-
subagent_type="project-manager",
|
|
424
|
-
description="Initialize project with conversation language support",
|
|
425
|
-
prompt=f"""You are project-manager. Initialize project with these parameters:
|
|
426
|
-
- conversation_language: "{conversation_language}" # e.g., "ko"
|
|
427
|
-
- language_name: "{language_name}" # e.g., "Korean"
|
|
428
|
-
- project_type: "{project_type}" # e.g., "new"
|
|
429
|
-
- detected_languages: {detected_languages}
|
|
430
|
-
|
|
431
|
-
All interviews and documentation must be generated in the conversation_language.
|
|
432
|
-
Update .moai/config.json with these language parameters.
|
|
433
|
-
"""
|
|
434
|
-
)
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
**Outcome**: The project-manager agent conducts structured interviews entirely in the selected language and creates/updates product/structure/tech.md documents in that language.
|
|
438
|
-
|
|
439
|
-
### 2.2 Automatic activation of Alfred Skills (optional)
|
|
440
|
-
|
|
441
|
-
After the project-manager has finished creating the document, **Alfred can optionally call Skills** (upon user request).
|
|
442
|
-
|
|
443
|
-
**Automatic activation conditions** (optional):
|
|
444
|
-
|
|
445
|
-
| Conditions | Automatic selection Skill | Purpose |
|
|
446
|
-
| ------------------------------------ | ---------------------------- | -------------------------------------- |
|
|
447
|
-
| User Requests βQuality Verificationβ | moai-alfred-trust-validation | Initial project structure verification |
|
|
448
|
-
|
|
449
|
-
**Execution flow** (optional):
|
|
450
|
-
```
|
|
451
|
-
1. project-manager completion
|
|
452
|
-
β
|
|
453
|
-
2. User selection:
|
|
454
|
-
- "Quality verification required" β moai-alfred-trust-validation (Level 1 quick scan)
|
|
455
|
-
- "Skip" β Complete immediately
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
**Note**: Quality verification is optional during the project initialization phase.
|
|
459
|
-
|
|
460
|
-
### 2.3 Sub-agent moai-alfred-tui-survey (Nested)
|
|
461
|
-
|
|
462
|
-
**The project-manager agent can internally call the TUI survey skill** to check the details of the task.
|
|
463
|
-
|
|
464
|
-
**When to call**:
|
|
465
|
-
- Before overwriting existing project documents
|
|
466
|
-
- When selecting language/framework
|
|
467
|
-
- When changing important settings
|
|
468
|
-
|
|
469
|
-
**Example** (inside project-manager): Ask whether to "overwrite file" with `Skill("moai-alfred-tui-survey")`,
|
|
470
|
-
- Allows you to choose between **Overwrite** / **Merge** / **Skip**.
|
|
471
|
-
|
|
472
|
-
**Nested pattern**:
|
|
473
|
-
- **Command level** (Phase approval): Called by Alfred β "Shall we proceed with Phase 2?"
|
|
474
|
-
- **Sub-agent level** (Detailed confirmation): Called by project-manager β "Shall we overwrite the file?"
|
|
475
|
-
|
|
476
|
-
### 2.4 Processing method by project type
|
|
477
|
-
|
|
478
|
-
#### A. New project (Greenfield)
|
|
479
|
-
|
|
480
|
-
**Interview Flow**:
|
|
481
|
-
|
|
482
|
-
1. **Product Discovery** (create product.md)
|
|
483
|
-
- Define core mission (@DOC:MISSION-001)
|
|
484
|
-
- Identify key user base (@SPEC:USER-001)
|
|
485
|
-
- Identify key problems to solve (@SPEC:PROBLEM-001)
|
|
486
|
-
- Summary of differences and strengths (@DOC:STRATEGY-001)
|
|
487
|
-
- Setting success indicators (@SPEC:SUCCESS-001)
|
|
488
|
-
|
|
489
|
-
2. **Structure Blueprint** (create structure.md)
|
|
490
|
-
- Selection of architecture strategy (@DOC:ARCHITECTURE-001)
|
|
491
|
-
- Division of responsibilities by module (@DOC:MODULES-001)
|
|
492
|
-
- External system integration plan (@DOC:INTEGRATION-001)
|
|
493
|
-
- Define traceability strategy (@DOC:TRACEABILITY-001)
|
|
494
|
-
|
|
495
|
-
3. **Tech Stack Mapping** (written by tech.md)
|
|
496
|
-
- Select language & runtime (@DOC:STACK-001)
|
|
497
|
-
- Determine core framework (@DOC:FRAMEWORK-001)
|
|
498
|
-
- Set quality gate (@DOC:QUALITY-001)
|
|
499
|
-
- Define security policy (@DOC:SECURITY-001)
|
|
500
|
-
- Plan distribution channels (@DOC:DEPLOY-001)
|
|
501
|
-
|
|
502
|
-
**Automatically generate config.json**:
|
|
503
|
-
```json
|
|
504
|
-
{
|
|
505
|
-
"project_name": "detected-name",
|
|
506
|
-
"project_type": "single|fullstack|microservice",
|
|
507
|
-
"project_language": "python|typescript|java|go|rust",
|
|
508
|
-
"test_framework": "pytest|vitest|junit|go test|cargo test",
|
|
509
|
-
"linter": "ruff|biome|eslint|golint|clippy",
|
|
510
|
-
"formatter": "black|biome|prettier|gofmt|rustfmt",
|
|
511
|
-
"coverage_target": 85,
|
|
512
|
-
"mode": "personal"
|
|
513
|
-
}
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
#### B. Existing project (legacy introduction)
|
|
517
|
-
|
|
518
|
-
**Legacy Snapshot & Alignment**:
|
|
519
|
-
|
|
520
|
-
**STEP 1: Identify the overall project structure**
|
|
521
|
-
|
|
522
|
-
Alfred identifies the entire project structure:
|
|
523
|
-
- Visualize the directory structure using the tree or find commands
|
|
524
|
-
- Exclude build artifacts such as node_modules, .git, dist, build, __pycache__, etc.
|
|
525
|
-
- Identify key source directories and configuration files.
|
|
526
|
-
|
|
527
|
-
**Output**:
|
|
528
|
-
- Visualize the entire folder/file hierarchy of the project
|
|
529
|
-
- Identify major directories (src/, tests/, docs/, config/, etc.)
|
|
530
|
-
- Check language/framework hint files (package.json, pyproject.toml, go.mod, etc.)
|
|
531
|
-
|
|
532
|
-
**STEP 2: Establish parallel analysis strategy**
|
|
533
|
-
|
|
534
|
-
Alfred identifies groups of files by the Glob pattern:
|
|
535
|
-
1. **Configuration files**: *.json, *.toml, *.yaml, *.yml, *.config.js
|
|
536
|
-
2. **Source code files**: src/**/*.{ts,js,py,go,rs,java}
|
|
537
|
-
3. **Test files**: tests/**/*.{ts,js,py,go,rs,java}, **/*.test.*, **/*.spec.*
|
|
538
|
-
4. **Documentation files**: *.md, docs/**/*.md, README*, CHANGELOG*
|
|
539
|
-
|
|
540
|
-
**Parallel Read Strategy**:
|
|
541
|
-
- Speed ββup analysis by reading multiple files simultaneously with the Read tool
|
|
542
|
-
- Batch processing for each file group
|
|
543
|
-
- Priority: Configuration file β Core source β Test β Document
|
|
544
|
-
|
|
545
|
-
**STEP 3: Analysis and reporting of characteristics for each file**
|
|
546
|
-
|
|
547
|
-
As each file is read, the following information is collected:
|
|
548
|
-
|
|
549
|
-
1. **Configuration file analysis**
|
|
550
|
-
- Project metadata (name, version, description)
|
|
551
|
-
- Dependency list and versions
|
|
552
|
-
- Build/test script
|
|
553
|
-
- Confirm language/framework
|
|
554
|
-
|
|
555
|
-
2. **Source code analysis**
|
|
556
|
-
- Identify major modules and classes
|
|
557
|
-
- Architectural pattern inference (MVC, clean architecture, microservice, etc.)
|
|
558
|
-
- Identify external API calls and integration points
|
|
559
|
-
- Key areas of domain logic
|
|
560
|
-
|
|
561
|
-
3. **Test code analysis**
|
|
562
|
-
- Check test framework
|
|
563
|
-
- Identify coverage settings
|
|
564
|
-
- Identify key test scenarios
|
|
565
|
-
- Evaluate TDD compliance
|
|
566
|
-
|
|
567
|
-
4. **Document analysis**
|
|
568
|
-
- Existing README contents
|
|
569
|
-
- Existence of architecture document
|
|
570
|
-
- API document status
|
|
571
|
-
- Installation/deployment guide completeness
|
|
572
|
-
|
|
573
|
-
**Report Format**:
|
|
574
|
-
```markdown
|
|
575
|
-
## Analysis results for each file
|
|
576
|
-
|
|
577
|
-
### Configuration file
|
|
578
|
-
- package.json: Node.js 18+, TypeScript 5.x, Vitest test
|
|
579
|
-
- tsconfig.json: strict mode, ESNext target
|
|
580
|
-
- biome.json: Linter/formatter settings exist
|
|
581
|
-
|
|
582
|
-
### Source code (src/)
|
|
583
|
-
- src/core/: Core business logic (3 modules)
|
|
584
|
-
- src/api/: REST API endpoints (5 routers)
|
|
585
|
-
- src/utils/: Utility functions (logging, verification, etc.)
|
|
586
|
-
- Architecture: Hierarchical (controller) β service β repository)
|
|
587
|
-
|
|
588
|
-
### Tests (tests/)
|
|
589
|
-
- Vitest + @testing-library used
|
|
590
|
-
- Unit test coverage estimated at about 60%
|
|
591
|
-
- E2E testing lacking
|
|
592
|
-
|
|
593
|
-
### Documentation
|
|
594
|
-
- README.md: Only installation guide
|
|
595
|
-
- Absence of API documentation
|
|
596
|
-
- Absence of architecture document
|
|
597
|
-
```
|
|
245
|
+
## π UPDATE MODE: Template Optimization After moai-adk Update
|
|
598
246
|
|
|
599
|
-
**
|
|
600
|
-
|
|
601
|
-
Based on the collected information, it is reflected in three major documents:
|
|
602
|
-
|
|
603
|
-
1. Contents reflected in **product.md**
|
|
604
|
-
- Project mission extracted from existing README/document
|
|
605
|
-
- Main user base and scenario inferred from code
|
|
606
|
-
- Backtracking of core problem to be solved
|
|
607
|
-
- Preservation of existing assets in βLegacy Contextβ
|
|
608
|
-
|
|
609
|
-
2. Contents reflected in **structure.md**
|
|
610
|
-
- Identified actual directory structure
|
|
611
|
-
- Responsibility analysis results for each module
|
|
612
|
-
- External system integration points (API calls, DB connections, etc.)
|
|
613
|
-
- Technical debt items (marked with @CODE tag)
|
|
614
|
-
|
|
615
|
-
3. **tech.md reflection content**
|
|
616
|
-
- Languages/frameworks/libraries actually in use
|
|
617
|
-
- Existing build/test pipeline
|
|
618
|
-
- Status of quality gates (linter, formatter, test coverage)
|
|
619
|
-
- Identification of security/distribution policy
|
|
620
|
-
- Items requiring improvement (marked with TODO tags)
|
|
621
|
-
|
|
622
|
-
**Preservation Policy**:
|
|
623
|
-
- Supplement only the missing parts without overwriting existing documents
|
|
624
|
-
- Preserve conflicting content in the βLegacy Contextβ section
|
|
625
|
-
- Mark items needing improvement with @CODE and TODO tags
|
|
626
|
-
|
|
627
|
-
**Example Final Report**:
|
|
628
|
-
```markdown
|
|
629
|
-
## Complete analysis of existing project
|
|
630
|
-
|
|
631
|
-
### Environment Information
|
|
632
|
-
- **Language**: TypeScript 5.x (Node.js 18+)
|
|
633
|
-
- **Framework**: Express.js
|
|
634
|
-
- **Test**: Vitest (coverage ~60%)
|
|
635
|
-
- **Linter/Formatter**: Biome
|
|
636
|
-
|
|
637
|
-
### Main findings
|
|
638
|
-
1. **Strengths**:
|
|
639
|
-
- High type safety (strict mode)
|
|
640
|
-
- Clear module structure (separation of core/api/utils)
|
|
641
|
-
|
|
642
|
-
2. **Needs improvement**:
|
|
643
|
-
- Test coverage below 85% (TODO:TEST-COVERAGE-001)
|
|
644
|
-
- Absence of API documentation (TODO:DOCS-API-001)
|
|
645
|
-
- Insufficient E2E testing (@CODE:TEST-E2E-001)
|
|
646
|
-
|
|
647
|
-
### Next step
|
|
648
|
-
1. product/structure/tech.md creation completed
|
|
649
|
-
2. @CODE/TODO item priority confirmation
|
|
650
|
-
3. /alfred:Start writing an improvement SPEC with 1-spec
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
### 2.3 Document creation and verification
|
|
247
|
+
**When to execute**: `/alfred:0-project update` OR user selected template optimization
|
|
654
248
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
- `.moai/project/structure.md` (System Architecture)
|
|
658
|
-
- `.moai/project/tech.md` (Technology Stack and policy)
|
|
659
|
-
- `.moai/config.json` (project settings)
|
|
249
|
+
### Step 1: Language-First Update Context Detection
|
|
250
|
+
**IMPORTANT**: Always establish language context BEFORE any update operations.
|
|
660
251
|
|
|
661
|
-
**
|
|
662
|
-
|
|
663
|
-
-
|
|
664
|
-
-
|
|
665
|
-
|
|
252
|
+
1. **Check `.moai/config.json`** for existing language settings
|
|
253
|
+
2. **Language Confirmation** (in current language):
|
|
254
|
+
- If no config exists β Run language selection FIRST
|
|
255
|
+
- If config exists β Confirm current language settings
|
|
256
|
+
3. **Set Update Language Context**: ALL update interactions in confirmed language
|
|
666
257
|
|
|
667
|
-
### 2
|
|
258
|
+
### Step 2: Contextual Update Analysis
|
|
259
|
+
**Analyze the update context** (in confirmed language):
|
|
668
260
|
|
|
669
|
-
|
|
670
|
-
|
|
261
|
+
1. **Update Type Detection**:
|
|
262
|
+
```
|
|
263
|
+
π **μ
λ°μ΄νΈ μ ν λΆμ μ€...**
|
|
264
|
+
β
**moai-adk λ²μ λ³κ²½ κ°μ§**: [version detection]
|
|
265
|
+
β
**λ°±μ
νμΌ λ°κ²¬**: [backup analysis]
|
|
266
|
+
β
**ν
νλ¦Ώ λ³κ²½ μ¬ν**: [template differences]
|
|
267
|
+
```
|
|
671
268
|
|
|
672
|
-
|
|
673
|
-
-
|
|
674
|
-
-
|
|
675
|
-
-
|
|
676
|
-
- .moai/config.json (project settings)
|
|
269
|
+
2. **Backup Discovery**:
|
|
270
|
+
- Check `.moai-backups/` directory for existing backups
|
|
271
|
+
- Analyze backup versions and completeness
|
|
272
|
+
- Identify which backup to use for comparison
|
|
677
273
|
|
|
678
|
-
|
|
679
|
-
-
|
|
680
|
-
-
|
|
681
|
-
-
|
|
274
|
+
3. **Template Comparison**:
|
|
275
|
+
- Check template versions vs current project files
|
|
276
|
+
- Analyze what needs optimization
|
|
277
|
+
- Detect user customizations vs template defaults
|
|
682
278
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
3. If necessary, readjust with /alfred:8-project update
|
|
279
|
+
### Step 3: Use Template Optimizer Skill (Language-Aware)
|
|
280
|
+
```python
|
|
281
|
+
Skill("moai-project-template-optimizer", mode="update", language=confirmed_language)
|
|
687
282
|
```
|
|
688
283
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
- Basic verification of project documentation and configuration files
|
|
697
|
-
- Verification of compliance with the TRUST principles of the initial structure
|
|
698
|
-
- Validation of configuration files
|
|
699
|
-
|
|
700
|
-
**How ββit works**:
|
|
701
|
-
Alfred only calls the trust-checker agent to perform project initial structural verification if explicitly requested by the user.
|
|
702
|
-
|
|
703
|
-
**Verification items**:
|
|
704
|
-
- **Document completeness**: Check existence of required sections in product/structure/tech.md
|
|
705
|
-
- **Settings validity**: Verify config.json JSON syntax and required fields
|
|
706
|
-
- **TAG scheme**: Check compliance with @TAG format in document
|
|
707
|
-
- **EARS syntax**: Validation of the EARS template to be used when writing SPECs
|
|
284
|
+
**Purpose**: Let the skill handle template comparison and optimization with language context
|
|
285
|
+
**The skill will** (in confirmed language):
|
|
286
|
+
- Detect and analyze existing backups
|
|
287
|
+
- Compare current templates with backup files
|
|
288
|
+
- Perform smart merging to preserve user customizations
|
|
289
|
+
- Update optimization flags in config.json
|
|
290
|
+
- Generate completion report in confirmed language
|
|
708
291
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
β οΈ **Warning**: Proceed after warning
|
|
717
|
-
- Some optional sections are missing
|
|
718
|
-
- Recommendations not applied
|
|
719
|
-
|
|
720
|
-
β **Critical**: Needs fix
|
|
721
|
-
- Required section missing
|
|
722
|
-
- config.json syntax error
|
|
723
|
-
- User choice: βRevalidate after fixβ or βSkipβ
|
|
724
|
-
|
|
725
|
-
**Skip verification**:
|
|
726
|
-
- Verification is not run by default
|
|
727
|
-
- Run only when explicitly requested by the user
|
|
728
|
-
|
|
729
|
-
### 2.6: Agent & Skill Tailoring (Project Optimization)
|
|
730
|
-
|
|
731
|
-
Based on the results of the interviews and initial analysis, we recommend and activate sub-agents and skills that should be immediately utilized in the project.
|
|
732
|
-
Before actual application, user confirmation is received with `Skill("moai-alfred-tui-survey")`, and selected items are recorded in `CLAUDE.md` and `.moai/config.json`.
|
|
733
|
-
|
|
734
|
-
#### 2.6.0 Create cc-manager briefing
|
|
735
|
-
|
|
736
|
-
Once the document creation is complete, **read all three documents (product/structure/tech.md)** and summarize the following information to create a text called `cc_manager_briefing`.
|
|
737
|
-
|
|
738
|
-
- `product.md`: Organize the mission, key users, problems to be solved, success indicators, and backlog (TODO) with a quotation from the original text or a one-line summary.
|
|
739
|
-
- `structure.md`: Records architecture type, module boundaries and scope of responsibility, external integration, traceability strategy, and TODO contents.
|
|
740
|
-
- `tech.md`: Organizes language/framework version, build/test/deployment procedures, quality/security policy, operation/monitoring method, and TODO items.
|
|
741
|
-
|
|
742
|
-
Be sure to include the source (e.g. `product.md@SPEC:SUCCESS-001`) for each item so that cc-manager can understand the basis.
|
|
743
|
-
|
|
744
|
-
#### 2.6.1 cc-manager judgment guide
|
|
745
|
-
|
|
746
|
-
cc-manager selects the required sub-agents and skills based on the briefing.The table below is a reference guide to help you make a decision, and when making an actual call, the supporting sentences from the relevant document are also delivered.
|
|
747
|
-
|
|
748
|
-
|Project requirements (document basis) |Recommended sub-agent/skill |Purpose |
|
|
749
|
-
| -------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------ |
|
|
750
|
-
|High quality and coverage goals (`product.md@SPEC:SUCCESS-001`) |`tdd-implementer`, `moai-essentials-debug`, `moai-essentials-review` |Establishment of REDΒ·GREENΒ·REFACTOR workflow |
|
|
751
|
-
|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 |
|
|
752
|
-
|Deployment automation/branch strategy required (`structure.md` Architecture/TODO) |`git-manager`, `moai-alfred-git-workflow`, `moai-foundation-git` |Branch StrategyΒ·Commit PolicyΒ·PR Automation |
|
|
753
|
-
|Refactoring legacy modules (`product.md` BACKLOG, `tech.md` TODO) |`implementation-planner`, `moai-alfred-refactoring-coach`, `moai-essentials-refactor` |Technical Debt Diagnosis and Refactoring Roadmap |
|
|
754
|
-
|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 |
|
|
755
|
-
|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 |
|
|
756
|
-
|Data analysis/reporting needs (`product.md` DATA, `tech.md` ANALYTICS) |`implementation-planner`, `moai-domain-data-science`, detected language skills |Data PipelineΒ·Notebook Job Definition |
|
|
757
|
-
|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 |
|
|
758
|
-
|DevOps/Infrastructure automation required (`tech.md` DEVOPS, `structure.md` CI/CD) |`implementation-planner`, `moai-domain-devops`, `moai-alfred-git-workflow` |Establishing a deployment pipeline and IaC strategy |
|
|
759
|
-
|Introduction of ML/AI functions (`product.md` AI, `tech.md` MODEL) |`implementation-planner`, `moai-domain-ml`, detected language skills |Model training/inference pipeline definition |
|
|
760
|
-
|Mobile app strategy (`product.md` MOBILE, `structure.md` CLIENT) |`implementation-planner`, `moai-domain-mobile-app`, detected language skills (e.g. `moai-lang-dart`, `moai-lang-swift`) |Mobile client structure design |
|
|
761
|
-
|Strengthening coding standards/review process (`tech.md` REVIEW) |`quality-gate`, `moai-essentials-review`, `moai-alfred-code-reviewer` |Strengthening review checklist and quality reporting |
|
|
762
|
-
|Requires onboarding/training mode (`tech.md` STACK description, etc.) |`moai-alfred-tui-survey`, `moai-adk-learning`, `agentic-coding` Output style |Enhanced interview TUI and automatically provided onboarding materials |
|
|
763
|
-
|
|
764
|
-
> **Language/Domain Skill Selection Rules**
|
|
765
|
-
> - 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.
|
|
766
|
-
> - Skills listed in the domain row are automatically included by cc-manager in the `selected_skills` list when the conditions are met.
|
|
767
|
-
> - The skill directory is always copied in its entirety, and only actual activation is recorded in `skill_pack` and `CLAUDE.md`.
|
|
768
|
-
|
|
769
|
-
If multiple conditions are met, the candidates are merged without duplicates and organized into sets of `candidate_agents`, `candidate_skills`, and `candidate_styles`.
|
|
770
|
-
|
|
771
|
-
#### 2.6.2 User confirmation flow
|
|
772
|
-
|
|
773
|
-
`Skill("moai-alfred-tui-survey")` asks βwhether to enable recommended items.β
|
|
774
|
-
- Provides three options: **Install all** / **Install selectively** / **Do not install**.
|
|
775
|
-
Selecting βSelective Installβ presents the list of candidates again as multiple choices, allowing the user to select only the items they need.
|
|
776
|
-
|
|
777
|
-
#### 2.6.3 Activation and Recording Steps
|
|
778
|
-
|
|
779
|
-
1. **Preparing briefing**: Organize the results of user selection (install all/install selectively) and the full text of `cc_manager_briefing`.
|
|
780
|
-
2. **Call the cc-manager agent**:
|
|
781
|
-
- Call `subagent_type: "cc-manager"` with the `Task` tool and include a briefing and user selections in the prompt.
|
|
782
|
-
- 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.
|
|
783
|
-
3. **Check for configuration updates**: Review the results reflected by cc-manager.
|
|
784
|
-
- Sub-Agents: Keep the `.claude/agents/alfred/` template active and list it in the `CLAUDE.md` βAgentsβ section.
|
|
785
|
-
- Skills: Check the `.claude/skills/` document and add it to the `CLAUDE.md` βSkillsβ section.
|
|
786
|
-
- Output style: Apply `.claude/output-styles/alfred/` and record the activation in `CLAUDE.md` βOutput Stylesβ.
|
|
787
|
-
4. **Update config.json**
|
|
788
|
-
```json
|
|
789
|
-
{
|
|
790
|
-
"project": {
|
|
791
|
-
"optimized": true,
|
|
792
|
-
"agent_pack": ["tdd-implementer", "doc-syncer"],
|
|
793
|
-
"skill_pack": ["moai-alfred-git-workflow", "moai-alfred-tag-scanning"],
|
|
794
|
-
"output_styles": ["moai-adk-learning"]
|
|
795
|
-
}
|
|
796
|
-
}
|
|
292
|
+
### Step 4: Update Confirmation and Completion (in confirmed language)
|
|
293
|
+
1. **Display Update Results** (in confirmed language):
|
|
294
|
+
```
|
|
295
|
+
β
**ν
νλ¦Ώ μ΅μ ν μλ£!**
|
|
296
|
+
π **μ
λ°μ΄νΈλ νμΌ**: [number]κ°
|
|
297
|
+
π§ **μ¬μ©μ μ μ μ μ§**: [number]κ°
|
|
298
|
+
π **μμ±λ λ³΄κ³ μ**: [report location]
|
|
797
299
|
```
|
|
798
|
-
Merge existing properties, if any.
|
|
799
|
-
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.
|
|
800
|
-
|
|
801
|
-
## Interview guide by project type
|
|
802
|
-
|
|
803
|
-
### New project interview area
|
|
804
|
-
|
|
805
|
-
**Product Discovery** (product.md)
|
|
806
|
-
- Core mission and value proposition
|
|
807
|
-
- Key user bases and needs
|
|
808
|
-
- 3 key problems to solve
|
|
809
|
-
- Differentiation compared to competing solutions
|
|
810
|
-
- Measurable indicators of success
|
|
811
|
-
|
|
812
|
-
**Structure Blueprint** (structure.md)
|
|
813
|
-
- System architecture strategy
|
|
814
|
-
- Separation of modules and division of responsibilities
|
|
815
|
-
- External system integration plan
|
|
816
|
-
- @TAG-based traceability strategy
|
|
817
|
-
|
|
818
|
-
**Tech Stack Mapping** (tech.md)
|
|
819
|
-
- Language/runtime selection and version
|
|
820
|
-
- Framework and libraries
|
|
821
|
-
- Quality gate policy (coverage, linter)
|
|
822
|
-
- Security policy and distribution channel
|
|
823
|
-
|
|
824
|
-
### Existing project interview area
|
|
825
|
-
|
|
826
|
-
**Legacy Analysis**
|
|
827
|
-
- Identify current code structure and modules
|
|
828
|
-
- Status of build/test pipeline
|
|
829
|
-
- Identify technical debt and constraints
|
|
830
|
-
- External integration and authentication methods
|
|
831
|
-
- MoAI-ADK transition priority plan
|
|
832
|
-
|
|
833
|
-
**Retention Policy**: Preserve existing documents in the "Legacy Context" section and mark items needing improvement with @CODE/TODO tags
|
|
834
|
-
|
|
835
|
-
## π·οΈ TAG system application rules
|
|
836
|
-
|
|
837
|
-
**Automatically create @TAGs per section**:
|
|
838
300
|
|
|
839
|
-
|
|
840
|
-
-
|
|
841
|
-
-
|
|
842
|
-
-
|
|
843
|
-
- Technology Stack β @DOC:STACK-XXX, @DOC:FRAMEWORK-XXX
|
|
301
|
+
2. **Ask for Next Steps** (in confirmed language):
|
|
302
|
+
- Option 1: "μ
λ°μ΄νΈ λ΄μ© κ²ν " β Show detailed changes
|
|
303
|
+
- Option 2: "μ€μ μμ " β Go to settings mode
|
|
304
|
+
- Option 3: "μ’
λ£" β End command
|
|
844
305
|
|
|
845
|
-
**
|
|
306
|
+
3. **Exit after completion**
|
|
307
|
+
4. **Do NOT proceed** to any other workflows
|
|
308
|
+
5. **End command execution**
|
|
846
309
|
|
|
847
|
-
|
|
848
|
-
- Resolution plan β @CODE:MIGRATION-XXX, TODO:SPEC-BACKLOG-XXX
|
|
849
|
-
- Quality improvement β TODO:TEST-COVERAGE-XXX, TODO:DOCS-SYNC-XXX
|
|
310
|
+
---
|
|
850
311
|
|
|
851
|
-
##
|
|
312
|
+
## π INITIALIZATION MODE: First-time Project Setup
|
|
852
313
|
|
|
853
|
-
|
|
314
|
+
**When to execute**: `/alfred:0-project` with no existing config.json
|
|
854
315
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
Symptom: βLanguage not detectedβ message
|
|
858
|
-
Solution: Specify language manually or create language-specific settings file
|
|
859
|
-
```
|
|
316
|
+
### Step 1: Language-First Initialization (CRITICAL)
|
|
317
|
+
**IMPORTANT**: Language selection MUST happen BEFORE any other configuration.
|
|
860
318
|
|
|
861
|
-
**
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
319
|
+
1. **Display**: "π Starting first-time project initialization..."
|
|
320
|
+
2. **Immediate Language Selection**: Use Language Initializer Skill FIRST
|
|
321
|
+
```python
|
|
322
|
+
Skill("moai-project-language-initializer", mode="language_first")
|
|
323
|
+
```
|
|
324
|
+
3. **Language Detection Strategy**:
|
|
325
|
+
- Check environment variables (LANG, locale)
|
|
326
|
+
- Detect from system settings
|
|
327
|
+
- Present language options immediately
|
|
328
|
+
4. **Language Confirmation**: Display selected language and confirm
|
|
329
|
+
5. **Set Language Context**: ALL subsequent interactions MUST use selected language
|
|
330
|
+
|
|
331
|
+
### Step 2: Contextual Fresh Install Flow
|
|
332
|
+
**After language selection, proceed with fresh install workflow**:
|
|
333
|
+
|
|
334
|
+
```python
|
|
335
|
+
Skill("moai-project-language-initializer", mode="fresh_install", language=selected_language)
|
|
865
336
|
```
|
|
866
337
|
|
|
867
|
-
**
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
338
|
+
**Fresh Install Process**:
|
|
339
|
+
1. **User Profile Collection** (in selected language):
|
|
340
|
+
- Nickname and user preferences
|
|
341
|
+
- Experience level and role
|
|
342
|
+
- Team vs personal mode selection
|
|
343
|
+
|
|
344
|
+
2. **Project Analysis** (language-aware):
|
|
345
|
+
- Detect project type and codebase language
|
|
346
|
+
- Analyze existing structure (if any)
|
|
347
|
+
- Identify technology stack
|
|
348
|
+
|
|
349
|
+
3. **Comprehensive Configuration** (in selected language):
|
|
350
|
+
- Team settings (if team mode)
|
|
351
|
+
- Domain selection
|
|
352
|
+
- Report generation preferences
|
|
353
|
+
- GitHub and Git workflow configuration
|
|
354
|
+
|
|
355
|
+
4. **Create Initial Configuration**:
|
|
356
|
+
- Generate complete `.moai/config.json`
|
|
357
|
+
- Validate all settings
|
|
358
|
+
- Set up language-specific configurations
|
|
359
|
+
|
|
360
|
+
### Step 3: Project Documentation Creation (Language-Aware)
|
|
361
|
+
1. **Invoke**: `Task` with `project-manager` agent
|
|
362
|
+
2. **Pass Language Context**: Ensure all documentation in selected language
|
|
363
|
+
3. **Parameters**: Language, user preferences, project context
|
|
364
|
+
4. **The agent will**:
|
|
365
|
+
- Conduct environmental analysis
|
|
366
|
+
- Create interview strategy in selected language
|
|
367
|
+
- Generate project documentation in selected language
|
|
368
|
+
|
|
369
|
+
### Step 4: Completion and Next Steps (in selected language)
|
|
370
|
+
1. **Print**: "β
νλ‘μ νΈ μ΄κΈ°νκ° μλ£λμμ΅λλ€!" (or equivalent in selected language)
|
|
371
|
+
2. **Ask user what to do next** using AskUserQuestion (in selected language):
|
|
372
|
+
- Option 1: "μ¬μμ μμ±" β Guide to `/alfred:1-plan`
|
|
373
|
+
- Option 2: "νλ‘μ νΈ κ΅¬μ‘° κ²ν " β Show current state
|
|
374
|
+
- Option 3: "μ μΈμ
μμ" β Guide to `/clear`
|
|
375
|
+
3. **End command execution**
|
|
872
376
|
|
|
873
377
|
---
|
|
874
378
|
|
|
875
|
-
##
|
|
876
|
-
|
|
877
|
-
> **Purpose**: After running moai-adk update, compare the backup and new template to optimize the template while preserving user customization.
|
|
878
|
-
|
|
879
|
-
### Execution conditions
|
|
880
|
-
|
|
881
|
-
This subcommand is executed under the following conditions:
|
|
882
|
-
|
|
883
|
-
1. **After executing moai-adk update**: `optimized=false` status in `config.json`
|
|
884
|
-
2. **Template update required**: When there is a difference between the backup and the new template
|
|
885
|
-
3. **User explicit request**: User directly executes `/alfred:0-project update`
|
|
379
|
+
## π AUTO-DETECT MODE: Handle Already Initialized Projects
|
|
886
380
|
|
|
887
|
-
|
|
381
|
+
**When to execute**: `/alfred:0-project` with existing config.json
|
|
888
382
|
|
|
889
|
-
|
|
383
|
+
### Step 1: Language-First Context Detection
|
|
384
|
+
**IMPORTANT**: Always confirm/establish language context FIRST.
|
|
890
385
|
|
|
891
|
-
1. **
|
|
892
|
-
|
|
893
|
-
# Browse the latest backups in the .moai-backups/ directory
|
|
894
|
-
ls -lt .moai-backups/ | head -1
|
|
386
|
+
1. **Read `.moai/config.json`** to get current language settings
|
|
387
|
+
2. **Display Language Confirmation** (in current language):
|
|
895
388
|
```
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
- Compare `.claude/` directory from backup with current template
|
|
899
|
-
- Compare `.moai/project/` document from backup with current document
|
|
900
|
-
- Identify user customization items
|
|
901
|
-
|
|
902
|
-
3. **Create Comparison Report**:
|
|
903
|
-
```markdown
|
|
904
|
-
## π Template optimization analysis
|
|
905
|
-
|
|
906
|
-
### Changed items
|
|
907
|
-
- CLAUDE.md: "## Project Information" section needs to be preserved
|
|
908
|
-
- settings.json: 3 env variables need to be preserved
|
|
909
|
-
- product.md: Has user-written content
|
|
910
|
-
|
|
911
|
-
### Recommended Action
|
|
912
|
-
- Run Smart Merge
|
|
913
|
-
- Preserve User Customizations
|
|
914
|
-
- Set optimized=true
|
|
389
|
+
β
**νμ¬ μΈμ΄ μ€μ **: [language.conversation_language_name]
|
|
390
|
+
β
**λν μΈμ΄**: [language.conversation_language]
|
|
915
391
|
```
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
1. **Execute smart merge logic**:
|
|
926
|
-
- Run `TemplateProcessor.copy_templates()`
|
|
927
|
-
- CLAUDE.md: Preserve "## Project Information" section
|
|
928
|
-
- settings.json: env variables and permissions.allow merge
|
|
929
|
-
|
|
930
|
-
2. Set **optimized=true**:
|
|
392
|
+
3. **Language Confirmation Question** (in current language):
|
|
393
|
+
- "νμ¬ μΈμ΄ μ€μ μ κ³μ μ¬μ©νμκ² μ΅λκΉ?" (in Korean)
|
|
394
|
+
- "Continue using current language settings?" (in English)
|
|
395
|
+
- Options: "Continue" | "Change Language" | "Show Current Settings"
|
|
396
|
+
|
|
397
|
+
### Step 2: Language Context Handling
|
|
398
|
+
**IF user selects "Change Language"**:
|
|
399
|
+
1. **Immediate Language Selection**:
|
|
931
400
|
```python
|
|
932
|
-
|
|
933
|
-
config_data["project"]["optimized"] = True
|
|
401
|
+
Skill("moai-project-language-initializer", mode="language_change_only")
|
|
934
402
|
```
|
|
403
|
+
2. **Update Language Context**: Switch ALL subsequent interactions to new language
|
|
404
|
+
3. **Update Configuration**: Save new language settings
|
|
405
|
+
4. **Continue with new language context**
|
|
935
406
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
407
|
+
**IF user selects "Continue" or "Show Current Settings"**:
|
|
408
|
+
1. **Maintain Current Language Context**
|
|
409
|
+
2. **Proceed to Step 3** with confirmed language
|
|
939
410
|
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
411
|
+
### Step 3: Display Current Configuration (in confirmed language)
|
|
412
|
+
1. **Read `.moai/config.json`** to get all current settings
|
|
413
|
+
2. **Display current project status** (in confirmed language):
|
|
414
|
+
```
|
|
415
|
+
β
**μΈμ΄**: [language.conversation_language_name]
|
|
416
|
+
β
**λλ€μ**: [user.nickname]
|
|
417
|
+
β
**μμ΄μ νΈ ν둬ννΈ μΈμ΄**: [language.agent_prompt_language]
|
|
418
|
+
β
**GitHub μλ λΈλμΉ μμ **: [github.auto_delete_branches]
|
|
419
|
+
β
**SPEC Git μν¬νλ‘μ°**: [github.spec_git_workflow]
|
|
420
|
+
β
**λ³΄κ³ μ μμ±**: [report_generation.user_choice]
|
|
421
|
+
β
**μ νλ λλ©μΈ**: [stack.selected_domains]
|
|
945
422
|
```
|
|
946
423
|
|
|
947
|
-
###
|
|
948
|
-
|
|
949
|
-
**Alfred automatic decision**:
|
|
950
|
-
- Automatically call project-manager agent
|
|
951
|
-
- Check backup freshness (within 24 hours)
|
|
952
|
-
- Automatically analyze changes
|
|
953
|
-
|
|
954
|
-
**Auto-activation of Skills**:
|
|
955
|
-
- moai-alfred-tag-scanning: TAG chain verification
|
|
956
|
-
- moai-alfred-trust-validation: Verification of compliance with TRUST principles
|
|
957
|
-
|
|
958
|
-
### Running example
|
|
959
|
-
|
|
960
|
-
```bash
|
|
961
|
-
# After running moai-adk update
|
|
962
|
-
moai-adk update
|
|
963
|
-
|
|
964
|
-
# Output:
|
|
965
|
-
# β Update complete!
|
|
966
|
-
# βΉοΈ Next step: Run /alfred:0-project update to optimize template changes
|
|
967
|
-
|
|
968
|
-
# Run Alfred
|
|
969
|
-
/alfred:0-project update
|
|
970
|
-
|
|
971
|
-
# β Phase 1: Generate backup analysis and comparison report
|
|
972
|
-
# β Wait for user approval
|
|
973
|
-
# β Phase 2: Run smart merge, set optimized=true
|
|
974
|
-
```
|
|
975
|
-
|
|
976
|
-
### caution
|
|
977
|
-
|
|
978
|
-
- **Backup required**: Cannot run without backup in `.moai-backups/` directory
|
|
979
|
-
- **Manual review recommended**: Preview is required if there are important customizations
|
|
980
|
-
- **Conflict resolution**: Request user selection in case of merge conflict
|
|
981
|
-
|
|
982
|
-
---
|
|
983
|
-
|
|
984
|
-
## π STEP 3: Project Custom Optimization (Optional)
|
|
985
|
-
|
|
986
|
-
**Execution conditions**:
|
|
987
|
-
- After completion of Phase 2 (project initialization)
|
|
988
|
-
- or after completion of Phase 1.1 (backup merge)
|
|
989
|
-
- Explicitly requested by the user or automatically determined by Alfred
|
|
990
|
-
|
|
991
|
-
**Purpose**: Lightweight by selecting only Commands, Agents, and Skills that fit the project characteristics (37 skills β 3~5)
|
|
992
|
-
|
|
993
|
-
### 3.1 Automatic execution of Feature Selection
|
|
994
|
-
|
|
995
|
-
**Alfred automatically calls the moai-alfred-feature-selector skill**:
|
|
424
|
+
### Step 4: Ask what user wants to do (in confirmed language)
|
|
425
|
+
**Present these 4 options** to the user (in confirmed language):
|
|
996
426
|
|
|
997
|
-
**
|
|
998
|
-
-
|
|
999
|
-
-
|
|
1000
|
-
-
|
|
427
|
+
1. **"π§ μ€μ μμ "** - Change language, nickname, GitHub settings, or reports config
|
|
428
|
+
2. **"π νμ¬ μ€μ κ²ν "** - Display full current project configuration
|
|
429
|
+
3. **"π λ€μ μ΄κΈ°ν"** - Run full initialization again (with warning)
|
|
430
|
+
4. **"βΈοΈ μ·¨μ"** - Exit without making any changes
|
|
1001
431
|
|
|
1002
|
-
|
|
1003
|
-
```json
|
|
1004
|
-
{
|
|
1005
|
-
"category": "web-api",
|
|
1006
|
-
"language": "python",
|
|
1007
|
-
"framework": "fastapi",
|
|
1008
|
-
"commands": ["1-spec", "2-build", "3-sync"],
|
|
1009
|
-
"agents": ["spec-builder", "code-builder", "doc-syncer", "git-manager", "debug-helper"],
|
|
1010
|
-
"skills": ["moai-lang-python", "moai-domain-web-api", "moai-domain-backend"],
|
|
1011
|
-
"excluded_skills_count": 34,
|
|
1012
|
-
"optimization_rate": "87%"
|
|
1013
|
-
}
|
|
1014
|
-
```
|
|
432
|
+
### Step 6: Handle user selection
|
|
1015
433
|
|
|
1016
|
-
**
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
434
|
+
**IF user selected: "π§ Modify Settings"**:
|
|
435
|
+
1. Print: "π§ Entering Settings Mode..."
|
|
436
|
+
2. **Jump to SETTINGS MODE** above
|
|
437
|
+
3. Let SETTINGS MODE handle the rest
|
|
438
|
+
4. Stop after SETTINGS MODE completes
|
|
1020
439
|
|
|
1021
|
-
|
|
440
|
+
**ELSE IF user selected: "π Review Current Setup"**:
|
|
441
|
+
1. Print this header: `## Current Project Configuration`
|
|
442
|
+
2. Show all current settings (from config.json)
|
|
443
|
+
3. Print: "β
Configuration review complete."
|
|
444
|
+
4. Exit (stop the command)
|
|
1022
445
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
**Skill input**:
|
|
1028
|
-
- `.moai/.feature-selection.json` (feature-selector output)
|
|
1029
|
-
- `CLAUDE.md` template
|
|
1030
|
-
- Entire commands/agents/skills file
|
|
446
|
+
**ELSE IF user selected: "π Re-initialize"**:
|
|
447
|
+
1. Print this warning:
|
|
448
|
+
```
|
|
449
|
+
β οΈ WARNING: This will re-run the full project initialization
|
|
1031
450
|
|
|
1032
|
-
|
|
1033
|
-
-
|
|
1034
|
-
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
451
|
+
Your existing files will be preserved in:
|
|
452
|
+
- Backup: .moai-backups/[TIMESTAMP]/
|
|
453
|
+
- Current: .moai/project/*.md (will be UPDATED)
|
|
454
|
+
```
|
|
455
|
+
2. **Ask the user**: "Are you sure you want to continue? Type 'yes' to confirm or anything else to cancel"
|
|
456
|
+
3. **IF user typed 'yes'**:
|
|
457
|
+
- Print: "π Starting full re-initialization..."
|
|
458
|
+
- **Jump to INITIALIZATION MODE** above
|
|
459
|
+
- Let INITIALIZATION MODE handle the rest
|
|
460
|
+
4. **ELSE** (user typed anything else):
|
|
461
|
+
- Print: "β
Re-initialization cancelled."
|
|
462
|
+
- Exit (stop the command)
|
|
463
|
+
|
|
464
|
+
**ELSE IF user selected: "βΈοΈ Cancel"**:
|
|
465
|
+
1. Print:
|
|
466
|
+
```
|
|
467
|
+
β
Exiting without changes.
|
|
1038
468
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
469
|
+
Your project remains initialized with current settings.
|
|
470
|
+
To modify settings later, run: /alfred:0-project setting
|
|
471
|
+
```
|
|
472
|
+
2. Exit immediately (stop the command)
|
|
1043
473
|
|
|
1044
474
|
---
|
|
1045
475
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
**
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
- Lightweight: 87%
|
|
1066
|
-
- CLAUDE.md: Create custom agent table
|
|
1067
|
-
|
|
1068
|
-
π Next steps:
|
|
1069
|
-
1. Check the CLAUDE.md file (only 5 agents are displayed)
|
|
1070
|
-
2. Run /alfred:1-plan "first function"
|
|
1071
|
-
3. Start the MoAI-ADK workflow
|
|
476
|
+
## π Command Completion Pattern
|
|
477
|
+
|
|
478
|
+
**CRITICAL**: When any Alfred command completes, **ALWAYS use `AskUserQuestion` tool** to ask the user what to do next.
|
|
479
|
+
|
|
480
|
+
### Implementation Example
|
|
481
|
+
```python
|
|
482
|
+
AskUserQuestion(
|
|
483
|
+
questions=[
|
|
484
|
+
{
|
|
485
|
+
"question": "Project initialization is complete. What would you like to do next?",
|
|
486
|
+
"header": "Next Step",
|
|
487
|
+
"options": [
|
|
488
|
+
{"label": "Write Specifications", "description": "Run /alfred:1-plan to define requirements"},
|
|
489
|
+
{"label": "Review Project Structure", "description": "Check current project state"},
|
|
490
|
+
{"label": "Start New Session", "description": "Run /clear to start fresh"}
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
)
|
|
1072
495
|
```
|
|
1073
496
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
**
|
|
1079
|
-
|
|
1080
|
-
**Skip condition**:
|
|
1081
|
-
- User explicitly selects βSkipβ
|
|
1082
|
-
- βSimple projectβ when Alfred automatically determines (only basic features required)
|
|
1083
|
-
|
|
1084
|
-
**Skip effect**:
|
|
1085
|
-
- Maintain all 37 skills (no lightweighting)
|
|
1086
|
-
- Maintain default 9 agents in CLAUDE.md template
|
|
1087
|
-
- Maintain `optimized: false` in config.json
|
|
497
|
+
**Rules**:
|
|
498
|
+
1. **NO EMOJIS** in JSON fields (causes API errors)
|
|
499
|
+
2. **Always use AskUserQuestion** - Never suggest next steps in prose
|
|
500
|
+
3. **Provide 3-4 clear options** - Not open-ended
|
|
501
|
+
4. **Language**: Present options in user's `conversation_language`
|
|
1088
502
|
|
|
1089
503
|
---
|
|
1090
504
|
|
|
1091
|
-
##
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
- **
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
- **
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
-
|
|
1107
|
-
-
|
|
505
|
+
## π― Key Improvements Achieved
|
|
506
|
+
|
|
507
|
+
### β
Language-First Architecture
|
|
508
|
+
- **Core Principle**: Language selection ALWAYS happens before any other configuration
|
|
509
|
+
- **Context Persistence**: Once selected, ALL subsequent interactions use that language
|
|
510
|
+
- **Flow Adaptation**: Each flow (fresh install/update/settings) adapts based on language context
|
|
511
|
+
- **Improvement**: Eliminates language confusion and ensures consistent user experience
|
|
512
|
+
|
|
513
|
+
### β
Contextual Flow Differentiation
|
|
514
|
+
- **Fresh Install**: Language selection β Installation questionnaire β Setup completion
|
|
515
|
+
- **Update Mode**: Language confirmation β Update/merge options β Optimization
|
|
516
|
+
- **Existing Project**: Language confirmation β Settings options or re-initialization
|
|
517
|
+
- **Improvement**: Clear separation between installation types with appropriate workflows
|
|
518
|
+
|
|
519
|
+
### β
Modular Architecture
|
|
520
|
+
- **Original**: 3,647 lines in single monolithic file
|
|
521
|
+
- **Optimized**: ~600 lines main router + 4 specialized skills
|
|
522
|
+
- **Improvement**: 83% size reduction in main file with enhanced functionality
|
|
523
|
+
|
|
524
|
+
### β
Skills-Based Delegation
|
|
525
|
+
- **Language Initializer**: Handles language-first project setup workflows
|
|
526
|
+
- **Config Manager**: Manages all configuration operations with language context
|
|
527
|
+
- **Template Optimizer**: Handles template comparison and optimization
|
|
528
|
+
- **Batch Questions**: Standardizes user interaction patterns with language support
|
|
529
|
+
|
|
530
|
+
### β
Enhanced User Experience
|
|
531
|
+
- **Language-First Interactions**: All user-facing content respects language selection
|
|
532
|
+
- **Contextual Workflows**: Each flow type provides appropriate options and guidance
|
|
533
|
+
- **Faster Execution**: Skills optimized for specific tasks with language awareness
|
|
534
|
+
- **Better Error Handling**: Specialized error recovery with language-appropriate messages
|