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,23 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: alfred:1-plan
|
|
3
|
-
description:
|
|
4
|
-
argument-hint:
|
|
3
|
+
description: "Define specifications and create development branch"
|
|
4
|
+
argument-hint: Title 1 Title 2 ... | SPEC-ID modifications
|
|
5
5
|
allowed-tools:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- MultiEdit
|
|
10
|
+
- Grep
|
|
11
|
+
- Glob
|
|
12
|
+
- TodoWrite
|
|
13
|
+
- Bash(git:*)
|
|
14
|
+
- Bash(gh:*)
|
|
15
|
+
- Bash(rg:*)
|
|
16
|
+
- Bash(mkdir:*)
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# 🏗️ MoAI-ADK Step 1: Establish a plan (Plan) - Always make a plan first and then proceed.
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
> **Critical Note**: ALWAYS invoke `Skill("moai-alfred-ask-user-questions")` before using `AskUserQuestion` tool. This skill provides up-to-date best practices, field specifications, and validation rules for interactive prompts.
|
|
22
|
+
>
|
|
23
|
+
> **Batched Design**: All AskUserQuestion calls follow batched design principles (1-4 questions per call) to minimize user interaction turns. See CLAUDE.md section "Alfred Command Completion Pattern" for details.
|
|
24
|
+
|
|
25
|
+
<!-- @CODE:ALF-WORKFLOW-001:CMD-PLAN -->
|
|
26
|
+
|
|
27
|
+
**4-Step Workflow Integration**: This command implements Steps 1-2 of Alfred's workflow (Intent Understanding → Plan Creation). See CLAUDE.md for full workflow details.
|
|
21
28
|
|
|
22
29
|
## 🎯 Command Purpose
|
|
23
30
|
|
|
@@ -25,9 +32,25 @@ allowed-tools:
|
|
|
25
32
|
|
|
26
33
|
**Plan for**: $ARGUMENTS
|
|
27
34
|
|
|
28
|
-
##
|
|
35
|
+
## 🤖 CodeRabbit AI Integration (Local Only)
|
|
36
|
+
|
|
37
|
+
This local environment includes CodeRabbit AI review integration for SPEC documents:
|
|
38
|
+
|
|
39
|
+
**Automatic workflows:**
|
|
40
|
+
- ✅ SPEC review: CodeRabbit analyzes SPEC metadata and EARS structure
|
|
41
|
+
- ✅ GitHub Issue sync: SPEC files automatically create/update GitHub Issues
|
|
42
|
+
- ✅ Auto-approval: Draft PRs are approved when quality meets standards (80%+)
|
|
43
|
+
- ✅ SPEC quality validation: Checklist for metadata, structure, and content
|
|
29
44
|
|
|
30
|
-
|
|
45
|
+
**Scope:**
|
|
46
|
+
- 🏠 **Local environment**: Full CodeRabbit integration with auto-approval
|
|
47
|
+
- 📦 **Published packages**: Users get GitHub Issue sync only (no CodeRabbit)
|
|
48
|
+
|
|
49
|
+
> See `.coderabbit.yaml` for detailed review rules and SPEC validation checklist
|
|
50
|
+
|
|
51
|
+
## 💡 Planning philosophy: "Always make a plan first and then proceed."
|
|
52
|
+
|
|
53
|
+
`/alfred:1-plan` is a general-purpose command that **creates a plan**, rather than simply "creating" a SPEC document.
|
|
31
54
|
|
|
32
55
|
### 3 main scenarios
|
|
33
56
|
|
|
@@ -58,516 +81,777 @@ allowed-tools:
|
|
|
58
81
|
|
|
59
82
|
> **Standard two-step workflow** (see `CLAUDE.md` - "Alfred Command Execution Pattern" for details)
|
|
60
83
|
|
|
61
|
-
## 📋
|
|
84
|
+
## 📋 Your Task
|
|
85
|
+
|
|
86
|
+
You are executing the `/alfred:1-plan` command. Your job is to analyze the user's request and create a SPEC document following the EARS (Event-Action-Response-State) structure.
|
|
62
87
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
The command has **THREE execution phases**:
|
|
89
|
+
|
|
90
|
+
1. **PHASE 1**: Project Analysis & SPEC Planning (STEP 1)
|
|
91
|
+
2. **PHASE 2**: SPEC Document Creation (STEP 2)
|
|
92
|
+
3. **PHASE 3**: Git Branch & PR Setup (STEP 2 continuation)
|
|
93
|
+
|
|
94
|
+
Each phase contains explicit step-by-step instructions.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🔍 PHASE 1: Project Analysis & SPEC Planning (STEP 1)
|
|
99
|
+
|
|
100
|
+
PHASE 1 consists of **two independent sub-phases** to provide flexible workflow based on user request clarity:
|
|
101
|
+
|
|
102
|
+
### 📋 PHASE 1 Workflow Overview
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
106
|
+
│ PHASE 1: Project Analysis & SPEC Planning │
|
|
107
|
+
├─────────────────────────────────────────────────────────────┤
|
|
108
|
+
│ │
|
|
109
|
+
│ Phase A (OPTIONAL) │
|
|
110
|
+
│ ┌─────────────────────────────────────────┐ │
|
|
111
|
+
│ │ 🔍 Explore Agent │ │
|
|
112
|
+
│ │ • Find relevant files by keywords │ │
|
|
113
|
+
│ │ • Locate existing SPEC documents │ │
|
|
114
|
+
│ │ • Identify implementation patterns │ │
|
|
115
|
+
│ └─────────────────────────────────────────┘ │
|
|
116
|
+
│ ↓ │
|
|
117
|
+
│ (exploration results) │
|
|
118
|
+
│ ↓ │
|
|
119
|
+
│ Phase B (REQUIRED) │
|
|
120
|
+
│ ┌─────────────────────────────────────────┐ │
|
|
121
|
+
│ │ ⚙️ spec-builder Agent │ │
|
|
122
|
+
│ │ • Analyze project documents │ │
|
|
123
|
+
│ │ • Propose SPEC candidates │ │
|
|
124
|
+
│ │ • Design EARS structure │ │
|
|
125
|
+
│ │ • Request user approval │ │
|
|
126
|
+
│ └─────────────────────────────────────────┘ │
|
|
127
|
+
│ ↓ │
|
|
128
|
+
│ (user approval via AskUserQuestion) │
|
|
129
|
+
│ ↓ │
|
|
130
|
+
│ PROCEED TO PHASE 2 │
|
|
131
|
+
└─────────────────────────────────────────────────────────────┘
|
|
132
|
+
```
|
|
68
133
|
|
|
69
|
-
|
|
134
|
+
**Key Points**:
|
|
135
|
+
- **Phase A is optional** - Skip if user provides clear SPEC title
|
|
136
|
+
- **Phase B is required** - Always runs to analyze project and create SPEC
|
|
137
|
+
- **Results flow forward** - Exploration results (if any) are passed to spec-builder
|
|
70
138
|
|
|
71
|
-
|
|
72
|
-
| ----- | -------- | ------- |
|
|
73
|
-
| spec-builder | `moai-foundation-ears` | Write SPEC with EARS syntax |
|
|
74
|
-
| git-manager | `moai-alfred-git-workflow` | Create branch and PR |
|
|
139
|
+
---
|
|
75
140
|
|
|
76
|
-
|
|
141
|
+
### 🔍 Phase A: Codebase Exploration (OPTIONAL)
|
|
77
142
|
|
|
78
|
-
|
|
143
|
+
**When to execute Phase A:**
|
|
79
144
|
|
|
80
|
-
|
|
81
|
-
- **Secondary**: git-manager (🚀 Release Engineer) - Dedicated to creating Git branches/PRs
|
|
145
|
+
You should execute Phase A ONLY IF the user's request meets one of these criteria:
|
|
82
146
|
|
|
83
|
-
|
|
147
|
+
- ✅ User uses vague keywords ("where is...", "find me...", "related to...")
|
|
148
|
+
- ✅ Need to understand existing code structure before planning
|
|
149
|
+
- ✅ Feature spans multiple files or modules
|
|
150
|
+
- ❌ User provides clear SPEC title (skip to Phase B immediately)
|
|
84
151
|
|
|
85
|
-
|
|
86
|
-
- `/alfred:1-plan` - Auto-suggestion based on project documents
|
|
87
|
-
- `/alfred:1-plan "JWT authentication system"` - Manually create a single SPEC
|
|
88
|
-
- `/alfred:1-plan SPEC-001 "Security hardening"` - Supplementation of existing SPEC
|
|
152
|
+
**Decision rule**: If user typed a clear SPEC title (e.g., "JWT authentication system"), skip Phase A and proceed directly to Phase B.
|
|
89
153
|
|
|
90
|
-
|
|
154
|
+
#### How to execute Phase A:
|
|
91
155
|
|
|
92
|
-
|
|
156
|
+
**Step 1**: Determine IF you need exploration
|
|
93
157
|
|
|
94
|
-
|
|
158
|
+
1. Read the user's `$ARGUMENTS` input
|
|
159
|
+
2. Check if the input contains vague keywords:
|
|
160
|
+
- "where is..."
|
|
161
|
+
- "find me..."
|
|
162
|
+
- "related to..."
|
|
163
|
+
- "somewhere..."
|
|
164
|
+
- "I think there's..."
|
|
165
|
+
3. IF the input is vague → proceed to Step 2
|
|
166
|
+
4. IF the input is clear → skip to Phase B
|
|
95
167
|
|
|
96
|
-
|
|
168
|
+
**Step 2**: Invoke the Explore agent
|
|
97
169
|
|
|
98
|
-
|
|
170
|
+
Use the Task tool to call the Explore agent:
|
|
99
171
|
|
|
100
172
|
```
|
|
101
|
-
|
|
173
|
+
Tool: Task
|
|
174
|
+
Parameters:
|
|
102
175
|
- subagent_type: "Explore"
|
|
103
176
|
- description: "Explore related files in the codebase"
|
|
104
|
-
- prompt: "
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
177
|
+
- prompt: "다음 키워드와 관련된 모든 파일을 찾아주세요: $ARGUMENTS
|
|
178
|
+
- 파일 위치 (src/, tests/, docs/)
|
|
179
|
+
- 관련 SPEC 문서 (.moai/specs/)
|
|
180
|
+
- 기존 구현 코드
|
|
181
|
+
상세도 수준: medium"
|
|
109
182
|
```
|
|
110
183
|
|
|
111
|
-
**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
184
|
+
**Step 3**: Wait for exploration results
|
|
185
|
+
|
|
186
|
+
1. The Explore agent will search the codebase
|
|
187
|
+
2. It will return a list of relevant files and locations
|
|
188
|
+
3. Store these results in a variable called `$EXPLORE_RESULTS`
|
|
189
|
+
4. Proceed to Phase B with this variable
|
|
190
|
+
|
|
191
|
+
---
|
|
116
192
|
|
|
117
|
-
### ⚙️
|
|
193
|
+
### ⚙️ Phase B: SPEC Planning (REQUIRED)
|
|
118
194
|
|
|
119
|
-
**
|
|
195
|
+
**This phase ALWAYS runs** regardless of whether Phase A was executed.
|
|
196
|
+
|
|
197
|
+
Your task is to analyze the project documents and propose SPEC candidates to the user.
|
|
198
|
+
|
|
199
|
+
#### Step 1: Invoke the spec-builder agent
|
|
200
|
+
|
|
201
|
+
Use the Task tool to call the spec-builder agent:
|
|
120
202
|
|
|
121
203
|
```
|
|
122
|
-
|
|
204
|
+
Tool: Task
|
|
205
|
+
Parameters:
|
|
123
206
|
- subagent_type: "spec-builder"
|
|
124
207
|
- description: "Analyze the plan and establish a plan"
|
|
125
|
-
- prompt: "
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
(
|
|
208
|
+
- prompt: """당신은 spec-builder 에이전트입니다.
|
|
209
|
+
|
|
210
|
+
언어 설정:
|
|
211
|
+
- 대화_언어: {{CONVERSATION_LANGUAGE}}
|
|
212
|
+
- 언어명: {{CONVERSATION_LANGUAGE_NAME}}
|
|
213
|
+
|
|
214
|
+
중요 지시사항:
|
|
215
|
+
SPEC 문서는 이중 언어 구조를 따라야 합니다 (사용자 언어 + 영어 요약):
|
|
216
|
+
|
|
217
|
+
conversation_language == 'ko' (한국어)인 경우:
|
|
218
|
+
- YAML 메타데이터: 영어만 사용
|
|
219
|
+
- 제목 (@SPEC 태그): 한국어 주요, 영어 버전은 하단에 기재
|
|
220
|
+
- 주요 내용 (분석, 요구사항, EARS): 한국어
|
|
221
|
+
- SUMMARY 섹션: 영어 (국제 기여자를 위해 100-200단어)
|
|
222
|
+
- HISTORY: 한국어 (새로운 항목), 주요 버전에는 영어 요약
|
|
223
|
+
|
|
224
|
+
conversation_language == 'ja' (일본어)인 경우:
|
|
225
|
+
- 한국어와 동일한 이중 언어 패턴 사용
|
|
226
|
+
- 주요 내용: 일본어
|
|
227
|
+
- SUMMARY: 영어
|
|
228
|
+
|
|
229
|
+
다른 언어인 경우:
|
|
230
|
+
- 주요 내용: 사용자 지정 언어
|
|
231
|
+
- SUMMARY: 영어 (항상)
|
|
232
|
+
|
|
233
|
+
스킬 호출:
|
|
234
|
+
필요 시 명시적 Skill() 호출 사용:
|
|
235
|
+
- Skill("moai-foundation-specs") - SPEC 구조 가이드
|
|
236
|
+
- Skill("moai-foundation-ears") - EARS 문법 요구사항
|
|
237
|
+
- Skill("moai-alfred-spec-metadata-validation") - 메타데이터 검증
|
|
238
|
+
|
|
239
|
+
작업:
|
|
240
|
+
프로젝트 문서를 분석하여 SPEC 후보자를 제시해주세요.
|
|
241
|
+
분석 모드로 실행하며, 다음을 포함해야 합니다:
|
|
242
|
+
1. product/structure/tech.md의 심층 분석
|
|
243
|
+
2. SPEC 후보자 식별 및 우선순위 결정
|
|
244
|
+
3. EARS 구조 설계
|
|
245
|
+
4. 사용자 승인 대기
|
|
246
|
+
|
|
247
|
+
사용자 입력: $ARGUMENTS
|
|
248
|
+
(선택사항) 탐색 결과: $EXPLORE_RESULTS"""
|
|
133
249
|
```
|
|
134
250
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
1. **Project document analysis**
|
|
138
|
-
- In-depth analysis of product/structure/tech.md
|
|
139
|
-
- Review existing SPEC list and priorities (.moai/specs/ scan)
|
|
140
|
-
- Evaluate implementation feasibility and complexity
|
|
141
|
-
- (Optional) Identify existing code structure by reflecting the Explore results
|
|
251
|
+
**Important**: IF Phase A was executed, include the `$EXPLORE_RESULTS` variable in the prompt. IF Phase A was skipped, omit the last line.
|
|
142
252
|
|
|
143
|
-
2
|
|
144
|
-
- Extracting core business requirements
|
|
145
|
-
- Reflecting technical constraints
|
|
146
|
-
- Creating a list of SPEC candidates by priority
|
|
253
|
+
#### Step 2: Wait for spec-builder analysis
|
|
147
254
|
|
|
148
|
-
|
|
149
|
-
- Present step-by-step plan creation plan
|
|
150
|
-
- Estimated scope of work and dependency analysis
|
|
151
|
-
- Design EARS structure and Acceptance Criteria
|
|
255
|
+
The spec-builder agent will:
|
|
152
256
|
|
|
153
|
-
|
|
257
|
+
1. **Read project documents**:
|
|
258
|
+
- `.moai/project/product.md` (business requirements)
|
|
259
|
+
- `.moai/project/structure.md` (architecture constraints)
|
|
260
|
+
- `.moai/project/tech.md` (technical stack and policies)
|
|
154
261
|
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
262
|
+
2. **Scan existing SPECs**:
|
|
263
|
+
- List all directories in `.moai/specs/`
|
|
264
|
+
- Check for existing SPEC IDs to prevent duplicates
|
|
265
|
+
- Identify current priorities and gaps
|
|
159
266
|
|
|
160
|
-
|
|
267
|
+
3. **Evaluate feasibility**:
|
|
268
|
+
- Implementation complexity
|
|
269
|
+
- Dependencies on other SPECs
|
|
270
|
+
- Technical constraints
|
|
271
|
+
- Resource requirements
|
|
161
272
|
|
|
162
|
-
|
|
273
|
+
4. **Propose SPEC candidates**:
|
|
274
|
+
- Extract core business requirements
|
|
275
|
+
- Reflect technical constraints
|
|
276
|
+
- Create prioritized list of SPEC candidates
|
|
163
277
|
|
|
164
|
-
|
|
278
|
+
5. **Present implementation plan report**:
|
|
165
279
|
|
|
166
|
-
|
|
280
|
+
The spec-builder will generate a report in this format:
|
|
167
281
|
|
|
168
282
|
```
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
283
|
+
## Plan Creation Plan Report: [TARGET]
|
|
284
|
+
|
|
285
|
+
### Analysis Results
|
|
286
|
+
- **Discovered SPEC Candidates**: [Number and Category]
|
|
287
|
+
- **High Priority**: [List of Core SPECs]
|
|
288
|
+
- **Estimated Work Time**: [Time Estimation]
|
|
289
|
+
|
|
290
|
+
### Writing Strategy
|
|
291
|
+
- **Selected SPEC**: [SPEC ID and Title to Write]
|
|
292
|
+
- **EARS Structure**: [Event-Action-Response-State Design]
|
|
293
|
+
- **Acceptance Criteria**: [Given-When-Then Scenario]
|
|
294
|
+
|
|
295
|
+
### Technology stack and library versions (optional)
|
|
296
|
+
**Included only if technology stack is determined during planning stage**:
|
|
297
|
+
- **Web search**: Use `WebSearch` to find the latest stable versions of key libraries to use
|
|
298
|
+
- **Specify versions**: Specify exact versions for each library, e.g. `fastapi>=0.118.3`)
|
|
299
|
+
- **Stability priority**: Exclude beta/alpha versions, select only production stable versions
|
|
300
|
+
- **Note**: Detailed version is finalized in `/alfred:2-run` stage
|
|
301
|
+
|
|
302
|
+
### Precautions
|
|
303
|
+
- **Technical constraints**: [Restraints to consider]
|
|
304
|
+
- **Dependency**: [Relevance with other SPECs]
|
|
305
|
+
- **Branch strategy**: [Processing by Personal/Team mode]
|
|
174
306
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
|
|
307
|
+
### Expected deliverables
|
|
308
|
+
- **spec.md**: [Core specifications of the EARS structure]
|
|
309
|
+
- **plan.md**: [Implementation plan]
|
|
310
|
+
- **acceptance.md**: [Acceptance criteria]
|
|
311
|
+
- **Branches/PR**: [Git operations by mode]
|
|
179
312
|
```
|
|
180
313
|
|
|
181
|
-
|
|
314
|
+
#### Step 3: Request user approval
|
|
315
|
+
|
|
316
|
+
After the spec-builder presents the implementation plan report, you MUST ask the user for explicit approval before proceeding to PHASE 2.
|
|
317
|
+
|
|
318
|
+
**Ask the user this question**:
|
|
182
319
|
|
|
183
|
-
|
|
184
|
-
- **Personal mode**: Create a `.moai/specs/SPEC-{ID}/` directory and a template document (**Directory name format required**: `SPEC-` prefix + TAG ID).
|
|
185
|
-
- **Team mode**: Create a GitHub Issue (or Discussion) Associate it with a branch template.
|
|
320
|
+
"Plan development is complete. Would you like to proceed with SPEC creation based on this plan?"
|
|
186
321
|
|
|
187
|
-
|
|
322
|
+
**Present these options**:
|
|
188
323
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
324
|
+
1. **Proceed with SPEC Creation** - Create SPEC files in `.moai/specs/SPEC-{ID}/` based on approved plan
|
|
325
|
+
2. **Request Modifications** - Specify changes to the plan before SPEC creation
|
|
326
|
+
3. **Save as Draft** - Save plan as draft without creating SPEC files yet
|
|
327
|
+
4. **Cancel** - Discard plan and return to planning phase
|
|
193
328
|
|
|
194
|
-
|
|
329
|
+
**Wait for the user to answer**.
|
|
195
330
|
|
|
196
|
-
|
|
331
|
+
#### Step 4: Process user's answer
|
|
197
332
|
|
|
198
|
-
|
|
199
|
-
| -------- | -------------------------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
|
200
|
-
| Personal | Templates `.moai/specs/SPEC-XXX/spec.md`, `plan.md`, `acceptance.md`, etc. | Branch from `main` or `develop` (based on settings) | git-manager agent automatically creates checkpoints |
|
|
201
|
-
| Team | GitHub Issue (`[SPEC-XXX] Title`), Draft PR (optional) | **Always branch from `develop`** (GitFlow standard) | `gh` CLI stay logged in, Draft PR → develop created |
|
|
333
|
+
Based on the user's choice:
|
|
202
334
|
|
|
203
|
-
|
|
335
|
+
**IF user selected "Proceed with SPEC Creation"**:
|
|
336
|
+
1. Store approval confirmation
|
|
337
|
+
2. Proceed to PHASE 2 (SPEC Document Creation)
|
|
204
338
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
339
|
+
**IF user selected "Request Modifications"**:
|
|
340
|
+
1. Ask the user: "What changes would you like to make to the plan?"
|
|
341
|
+
2. Wait for user's feedback
|
|
342
|
+
3. Pass feedback to spec-builder agent
|
|
343
|
+
4. spec-builder updates the plan
|
|
344
|
+
5. Return to Step 3 (request approval again with updated plan)
|
|
208
345
|
|
|
209
|
-
|
|
346
|
+
**IF user selected "Save as Draft"**:
|
|
347
|
+
1. Create directory: `.moai/specs/SPEC-{ID}/`
|
|
348
|
+
2. Save plan to `.moai/specs/SPEC-{ID}/plan.md` with status: draft
|
|
349
|
+
3. Create commit: `draft(spec): WIP SPEC-{ID} - {title}`
|
|
350
|
+
4. Print to user: "Draft saved. Resume with: `/alfred:1-plan resume SPEC-{ID}`"
|
|
351
|
+
5. End command execution (stop here)
|
|
210
352
|
|
|
211
|
-
|
|
353
|
+
**IF user selected "Cancel"**:
|
|
354
|
+
1. Print to user: "Plan discarded. No files created."
|
|
355
|
+
2. End command execution (stop here)
|
|
212
356
|
|
|
213
|
-
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## 🚀 PHASE 2: SPEC Document Creation (STEP 2 - After Approval)
|
|
360
|
+
|
|
361
|
+
This phase ONLY executes IF the user selected "Proceed with SPEC Creation" in Phase B Step 4.
|
|
362
|
+
|
|
363
|
+
Your task is to create the SPEC document files in the correct directory structure.
|
|
364
|
+
|
|
365
|
+
### ⚠️ Critical Rule: Directory Naming Convention
|
|
214
366
|
|
|
215
|
-
**
|
|
367
|
+
**Format that MUST be followed**: `.moai/specs/SPEC-{ID}/`
|
|
368
|
+
|
|
369
|
+
**Correct Examples**:
|
|
216
370
|
- ✅ `SPEC-AUTH-001/`
|
|
217
371
|
- ✅ `SPEC-REFACTOR-001/`
|
|
218
372
|
- ✅ `SPEC-UPDATE-REFACTOR-001/`
|
|
219
373
|
|
|
220
|
-
**Incorrect
|
|
374
|
+
**Incorrect examples**:
|
|
221
375
|
- ❌ `AUTH-001/` (missing SPEC- prefix)
|
|
222
376
|
- ❌ `SPEC-001-auth/` (additional text after ID)
|
|
223
377
|
- ❌ `SPEC-AUTH-001-jwt/` (additional text after ID)
|
|
224
378
|
|
|
225
|
-
**Duplicate check required**: Before creating a new SPEC ID,
|
|
379
|
+
**Duplicate check required**: Before creating a new SPEC ID, search existing TAG IDs to prevent duplication:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
rg "@SPEC:{ID}" -n .moai/specs/
|
|
383
|
+
```
|
|
226
384
|
|
|
227
385
|
**Composite Domain Rules**:
|
|
228
386
|
- ✅ Allow: `UPDATE-REFACTOR-001` (2 domains)
|
|
229
387
|
- ⚠️ Caution: `UPDATE-REFACTOR-FIX-001` (3+ domains, simplification recommended)
|
|
230
388
|
|
|
231
|
-
|
|
389
|
+
### Step 1: Invoke spec-builder for SPEC creation
|
|
232
390
|
|
|
233
|
-
|
|
391
|
+
Use the Task tool to call the spec-builder agent:
|
|
234
392
|
|
|
235
|
-
|
|
393
|
+
```
|
|
394
|
+
Tool: Task
|
|
395
|
+
Parameters:
|
|
396
|
+
- subagent_type: "spec-builder"
|
|
397
|
+
- description: "Create SPEC document"
|
|
398
|
+
- prompt: """당신은 spec-builder 에이전트입니다.
|
|
399
|
+
|
|
400
|
+
언어 설정:
|
|
401
|
+
- 대화_언어: {{CONVERSATION_LANGUAGE}}
|
|
402
|
+
- 언어명: {{CONVERSATION_LANGUAGE_NAME}}
|
|
403
|
+
|
|
404
|
+
중요 지시사항:
|
|
405
|
+
모든 SPEC 문서는 대화_언어로 작성되어야 합니다:
|
|
406
|
+
- spec.md: 전체 문서를 대화_언어로 작성
|
|
407
|
+
- plan.md: 전체 문서를 대화_언어로 작성
|
|
408
|
+
- acceptance.md: 전체 문서를 대화_언어로 작성
|
|
409
|
+
|
|
410
|
+
YAML 프론트매터와 @TAG 식별자는 반드시 영어로 유지합니다.
|
|
411
|
+
코드 예제와 기술 키워드는 혼합 가능 (코드는 영어, 설명은 사용자 언어).
|
|
412
|
+
|
|
413
|
+
스킬 호출:
|
|
414
|
+
필요 시 명시적 Skill() 호출 사용:
|
|
415
|
+
- Skill("moai-foundation-specs") - SPEC 구조 가이드
|
|
416
|
+
- Skill("moai-foundation-ears") - EARS 문법 요구사항
|
|
417
|
+
- Skill("moai-alfred-spec-metadata-validation") - 메타데이터 검증
|
|
418
|
+
- Skill("moai-alfred-tag-scanning") - TAG 체인 참조
|
|
419
|
+
|
|
420
|
+
작업:
|
|
421
|
+
STEP 1에서 승인된 계획에 따라 SPEC 문서를 작성해주세요.
|
|
422
|
+
EARS 구조에 대한 명세를 작성합니다."""
|
|
423
|
+
```
|
|
236
424
|
|
|
237
|
-
|
|
425
|
+
### Step 2: Wait for spec-builder to create files
|
|
426
|
+
|
|
427
|
+
The spec-builder agent will:
|
|
428
|
+
|
|
429
|
+
1. **Create directory structure**:
|
|
430
|
+
```bash
|
|
431
|
+
mkdir -p .moai/specs/SPEC-{ID}/
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
2. **Create spec.md** (main SPEC document):
|
|
435
|
+
|
|
436
|
+
**YAML Front Matter** (top of file):
|
|
437
|
+
```yaml
|
|
438
|
+
---
|
|
439
|
+
id: AUTH-001
|
|
440
|
+
version: 0.0.1
|
|
441
|
+
status: draft
|
|
442
|
+
created: 2025-09-15
|
|
443
|
+
updated: 2025-09-15
|
|
444
|
+
author: @Goos
|
|
445
|
+
priority: high
|
|
446
|
+
---
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Required fields**:
|
|
450
|
+
- `id`: Same as TAG ID (`<domain>-<3 digits>`) - Never change after creation
|
|
451
|
+
- `version`: v0.0.1 (INITIAL) → v0.1.0 (Implementation Completed) → v1.0.0 (Stable)
|
|
452
|
+
- `status`: draft | in_progress | completed | deprecated
|
|
453
|
+
- `created`: YYYY-MM-DD
|
|
454
|
+
- `updated`: YYYY-MM-DD
|
|
455
|
+
- `author`: GitHub @ prefix + ID (e.g. `@Goos`)
|
|
456
|
+
- `priority`: critical | high | medium | low
|
|
457
|
+
|
|
458
|
+
**Optional fields** (9 total):
|
|
459
|
+
- `category`: Feature type
|
|
460
|
+
- `labels`: Tags for grouping
|
|
461
|
+
- `depends_on`: List of SPEC IDs this depends on
|
|
462
|
+
- `blocks`: List of SPEC IDs blocked by this
|
|
463
|
+
- `related_specs`: List of related SPEC IDs
|
|
464
|
+
- `related_issue`: GitHub Issue number
|
|
465
|
+
- `scope`: Implementation scope estimate
|
|
466
|
+
|
|
467
|
+
**HISTORY section** (immediately after YAML):
|
|
468
|
+
```markdown
|
|
469
|
+
# @SPEC:DOMAIN-NNN: [SPEC title]
|
|
470
|
+
|
|
471
|
+
## HISTORY
|
|
472
|
+
|
|
473
|
+
### v0.0.1 (2025-09-15)
|
|
474
|
+
- **INITIAL**: Initial creation of [feature name] specification
|
|
475
|
+
- **AUTHOR**: @Goos
|
|
476
|
+
- **SCOPE**: [Brief scope description]
|
|
477
|
+
- **CONTEXT**: [Why this SPEC was created]
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
**EARS Requirements sections**:
|
|
481
|
+
```markdown
|
|
482
|
+
## Requirements
|
|
483
|
+
|
|
484
|
+
### Ubiquitous
|
|
485
|
+
- The system must provide [feature]
|
|
486
|
+
|
|
487
|
+
### Event-driven (event-driven)
|
|
488
|
+
- WHEN [condition], the system must [operate]
|
|
489
|
+
|
|
490
|
+
### State-driven
|
|
491
|
+
- WHILE When in [state], the system must [operate]
|
|
492
|
+
|
|
493
|
+
### Optional (Optional function)
|
|
494
|
+
- If WHERE [condition], the system can [operate]
|
|
495
|
+
|
|
496
|
+
### Unwanted Behaviors
|
|
497
|
+
- IF [condition], the system must [respond appropriately with error handling or quality gates]
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
**Traceability section**:
|
|
501
|
+
```markdown
|
|
502
|
+
## Traceability (@TAG)
|
|
503
|
+
- **SPEC**: @SPEC:DOMAIN-NNN
|
|
504
|
+
- **TEST**: tests/[domain]/test_[feature].py
|
|
505
|
+
- **CODE**: src/[domain]/[feature].py
|
|
506
|
+
- **DOC**: docs/[domain]/[feature].md
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
3. **Create plan.md** (implementation plan):
|
|
510
|
+
- Step-by-step implementation roadmap
|
|
511
|
+
- Technical approach
|
|
512
|
+
- Resource requirements
|
|
513
|
+
- Timeline estimates
|
|
514
|
+
|
|
515
|
+
4. **Create acceptance.md** (acceptance criteria):
|
|
516
|
+
- Given-When-Then scenarios
|
|
517
|
+
- Test cases
|
|
518
|
+
- Success criteria
|
|
519
|
+
|
|
520
|
+
### Step 3: Verify SPEC files were created
|
|
521
|
+
|
|
522
|
+
After spec-builder completes:
|
|
523
|
+
|
|
524
|
+
1. Check that directory exists:
|
|
525
|
+
```bash
|
|
526
|
+
ls -la .moai/specs/SPEC-{ID}/
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
2. Verify all 3 files exist:
|
|
530
|
+
- `spec.md`
|
|
531
|
+
- `plan.md`
|
|
532
|
+
- `acceptance.md`
|
|
533
|
+
|
|
534
|
+
3. IF any file is missing:
|
|
535
|
+
- Print error: "SPEC file creation failed: missing {filename}"
|
|
536
|
+
- End command execution (stop here)
|
|
537
|
+
|
|
538
|
+
4. IF all files exist:
|
|
539
|
+
- Proceed to PHASE 3
|
|
238
540
|
|
|
239
|
-
|
|
240
|
-
- [ ] **Architectural constraints**: Identify system design constraints in structure.md
|
|
241
|
-
- [ ] **Technical constraints**: Technology stack and quality policy in tech.md
|
|
242
|
-
- [ ] **Existing SPEC**: Review current SPEC list and priorities
|
|
541
|
+
---
|
|
243
542
|
|
|
244
|
-
|
|
543
|
+
## 🚀 PHASE 3: Git Setup based on spec_git_workflow (STEP 2 continuation)
|
|
245
544
|
|
|
246
|
-
|
|
545
|
+
This phase ONLY executes IF PHASE 2 completed successfully and all SPEC files were created.
|
|
247
546
|
|
|
248
|
-
|
|
249
|
-
| ---------- | --------------------------- | ------------------------------------------- |
|
|
250
|
-
| **High** | Core Business Values | User core functions, API design |
|
|
251
|
-
| **Medium** | System Stability | Authentication/Security, Data Management |
|
|
252
|
-
| **Low** | Improvements and expansions | UI/UX improvement, performance optimization |
|
|
547
|
+
Your task is to handle Git operations based on the project's `spec_git_workflow` setting.
|
|
253
548
|
|
|
254
|
-
|
|
549
|
+
### Step 1: Check spec_git_workflow setting
|
|
255
550
|
|
|
256
|
-
|
|
257
|
-
- **Frontend**: User interface, state management, routing
|
|
258
|
-
- **Infrastructure**: Deployment, monitoring, security policy
|
|
259
|
-
- **Quality**: Test strategy, performance criteria, documentation
|
|
551
|
+
First, read the current workflow configuration:
|
|
260
552
|
|
|
261
|
-
|
|
553
|
+
```bash
|
|
554
|
+
# Check spec_git_workflow setting from .moai/config.json
|
|
555
|
+
spec_workflow=$(grep -o '"spec_git_workflow": "[^"]*"' .moai/config.json | cut -d'"' -f4)
|
|
556
|
+
echo "Current SPEC Git workflow: $spec_workflow"
|
|
557
|
+
```
|
|
262
558
|
|
|
263
|
-
|
|
559
|
+
### Step 2: Execute workflow-specific actions
|
|
264
560
|
|
|
265
|
-
|
|
266
|
-
|
|
561
|
+
**IF `spec_workflow` is "develop_direct":**
|
|
562
|
+
1. Print: "✅ Direct commit mode: Staying on develop branch (feature branch creation skipped)"
|
|
563
|
+
2. Skip feature branch creation
|
|
564
|
+
3. Skip PR creation
|
|
565
|
+
4. Proceed to completion message
|
|
267
566
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
- **High Priority**: [List of Core SPECs]
|
|
271
|
-
- **Estimated Work Time**: [Time Estimation]
|
|
567
|
+
**IF `spec_workflow` is "feature_branch":**
|
|
568
|
+
1. Proceed to Step 3: Create feature branch and PR
|
|
272
569
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
-
|
|
276
|
-
|
|
570
|
+
**IF `spec_workflow` is "per_spec":**
|
|
571
|
+
1. Ask user: "Which workflow do you want for this SPEC?"
|
|
572
|
+
- Options: ["Create feature branch + PR", "Direct commit to develop"]
|
|
573
|
+
2. IF user chooses "Create feature branch + PR" → proceed to Step 3
|
|
574
|
+
3. IF user chooses "Direct commit to develop" → skip branch creation
|
|
277
575
|
|
|
278
|
-
###
|
|
279
|
-
**Included only if technology stack is determined during planning stage**:
|
|
280
|
-
- **Web search**: Use `WebSearch` to find the latest stable versions of key libraries to use
|
|
281
|
-
- **Specify versions**: Specify exact versions for each library, e.g. `fastapi>=0.118.3`)
|
|
282
|
-
- **Stability priority**: Exclude beta/alpha versions, select only production stable versions
|
|
283
|
-
- **Note**: Detailed version is finalized in `/alfred:2-run` stage
|
|
576
|
+
### Step 3: Create Git branch & PR (only for feature_branch workflow)
|
|
284
577
|
|
|
285
|
-
|
|
286
|
-
- **Technical constraints**: [Restraints to consider]
|
|
287
|
-
- **Dependency**: [Relevance with other SPECs]
|
|
288
|
-
- **Branch strategy**: [Processing by Personal/Team mode]
|
|
578
|
+
**This step only executes if workflow requires feature branch creation**
|
|
289
579
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
- **acceptance.md**: [Acceptance criteria]
|
|
294
|
-
- **Branches/PR**: [Git operations by mode]
|
|
580
|
+
Invoke git-manager agent:
|
|
581
|
+
|
|
582
|
+
Use the Task tool to call the git-manager agent:
|
|
295
583
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
584
|
+
```
|
|
585
|
+
Tool: Task
|
|
586
|
+
Parameters:
|
|
587
|
+
- subagent_type: "git-manager"
|
|
588
|
+
- description: "Create Git branch/PR with duplicate prevention"
|
|
589
|
+
- prompt: """당신은 git-manager 에이전트입니다.
|
|
590
|
+
|
|
591
|
+
언어 설정:
|
|
592
|
+
- 대화_언어: {{CONVERSATION_LANGUAGE}}
|
|
593
|
+
- 언어명: {{CONVERSATION_LANGUAGE_NAME}}
|
|
594
|
+
|
|
595
|
+
중요 지시사항 (팀 모드 중복 방지):
|
|
596
|
+
GitHub Issue 또는 PR을 만들기 전에:
|
|
597
|
+
1. 항상 제목에 SPEC-ID가 있는 기존 Issue를 확인하세요
|
|
598
|
+
2. 항상 feature/SPEC-{ID} 브랜치명의 기존 PR을 확인하세요
|
|
599
|
+
3. Issue가 존재하면 → 업데이트, 중복 생성 금지
|
|
600
|
+
4. PR이 존재하면 → 업데이트, 중복 생성 금지
|
|
601
|
+
5. 둘 다 존재하면 → 최신 SPEC 버전으로 모두 업데이트
|
|
602
|
+
6. 레이블 필터 실패 시 대체 검색 사용 (일부 Issue는 레이블 없을 수 있음)
|
|
603
|
+
7. 항상 레이블 추가: "spec", "planning", + 우선순위 레이블
|
|
604
|
+
|
|
605
|
+
git-manager.md의 "SPEC 작성 시" 섹션에서 자세한 중복 방지 프로토콜과 코드 예제를 참고하세요.
|
|
606
|
+
|
|
607
|
+
작업:
|
|
608
|
+
완성된 SPEC 문서에 대해 기능 브랜치(feature/SPEC-{SPEC_ID})와 Draft PR(→ develop)을 생성합니다.
|
|
609
|
+
GitHub 엔티티를 생성하기 전에 중복 방지 프로토콜을 구현합니다.
|
|
610
|
+
|
|
611
|
+
출력 언어: {{CONVERSATION_LANGUAGE}}"""
|
|
299
612
|
```
|
|
300
613
|
|
|
301
|
-
|
|
614
|
+
### Step 2: Wait for git-manager to complete
|
|
302
615
|
|
|
303
|
-
|
|
616
|
+
The git-manager agent will:
|
|
304
617
|
|
|
305
|
-
|
|
618
|
+
1. **Check project mode** (Personal or Team):
|
|
619
|
+
- Read `.moai/config.json`
|
|
620
|
+
- Check `project.mode` field
|
|
621
|
+
- IF mode == "Personal" → create local branch only
|
|
622
|
+
- IF mode == "Team" → create branch + GitHub Issue + PR
|
|
306
623
|
|
|
307
|
-
|
|
624
|
+
2. **Create Git branch**:
|
|
308
625
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
626
|
+
**Personal mode**:
|
|
627
|
+
- Branch from `main` or `develop` (based on `git_strategy.personal.branch_from` in config)
|
|
628
|
+
- Branch name: `feature/SPEC-{ID}`
|
|
629
|
+
- Example: `git checkout -b feature/SPEC-AUTH-001`
|
|
313
630
|
|
|
314
|
-
**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
-
|
|
631
|
+
**Team mode** (CRITICAL - GitFlow enforcement):
|
|
632
|
+
- **ALWAYS branch from `develop`** (GitFlow standard)
|
|
633
|
+
- Branch name: `feature/SPEC-{ID}`
|
|
634
|
+
- Example: `git checkout -b feature/SPEC-AUTH-001 develop`
|
|
318
635
|
|
|
319
|
-
|
|
320
|
-
|
|
636
|
+
3. **Create initial commit**:
|
|
637
|
+
```bash
|
|
638
|
+
git add .moai/specs/SPEC-{ID}/
|
|
639
|
+
git commit -m "spec(SPEC-{ID}): Initial SPEC creation
|
|
321
640
|
|
|
322
|
-
|
|
323
|
-
- When the WHILE token is in an unexpired state, the system must allow access to the protected resource.
|
|
641
|
+
🤖 Generated with Claude Code
|
|
324
642
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
```
|
|
643
|
+
Co-Authored-By: 🎩 Alfred@MoAI"
|
|
644
|
+
```
|
|
328
645
|
|
|
329
|
-
|
|
646
|
+
4. **Push branch to remote** (Team mode only):
|
|
647
|
+
```bash
|
|
648
|
+
git push -u origin feature/SPEC-{ID}
|
|
649
|
+
```
|
|
330
650
|
|
|
331
|
-
|
|
651
|
+
5. **Create GitHub Issue** (Team mode only):
|
|
652
|
+
- Title: `[SPEC-{ID}] {SPEC title}`
|
|
653
|
+
- Body: Summary of SPEC content
|
|
654
|
+
- Labels: `spec`, `planning`, `{priority}`
|
|
655
|
+
- Check for duplicates BEFORE creating
|
|
656
|
+
- IF duplicate exists → update existing Issue
|
|
332
657
|
|
|
333
|
-
|
|
658
|
+
6. **Create Draft PR** (Team mode only):
|
|
659
|
+
- Source: `feature/SPEC-{ID}`
|
|
660
|
+
- Target: **ALWAYS `develop`** (GitFlow rule)
|
|
661
|
+
- Title: `[SPEC-{ID}] {SPEC title}`
|
|
662
|
+
- Body: Link to Issue + SPEC summary
|
|
663
|
+
- Status: Draft (not ready for review)
|
|
664
|
+
- Check for duplicates BEFORE creating
|
|
665
|
+
- IF duplicate exists → update existing PR
|
|
334
666
|
|
|
335
|
-
|
|
336
|
-
- **7 required fields**: id, version, status, created, updated, author, priority
|
|
337
|
-
- **9 optional fields**: category, labels, depends_on, blocks, related_specs, related_issue, scope
|
|
667
|
+
### Step 3: Verify Git operations completed
|
|
338
668
|
|
|
339
|
-
|
|
340
|
-
```yaml
|
|
341
|
-
---
|
|
342
|
-
id: AUTH-001
|
|
343
|
-
version: 0.0.1
|
|
344
|
-
status: draft
|
|
345
|
-
created: 2025-09-15
|
|
346
|
-
updated: 2025-09-15
|
|
347
|
-
author: @Goos
|
|
348
|
-
priority: high
|
|
349
|
-
---
|
|
350
|
-
```
|
|
669
|
+
After git-manager completes:
|
|
351
670
|
|
|
352
|
-
**
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
-
|
|
357
|
-
-
|
|
358
|
-
- **priority**: critical | high | medium | low
|
|
671
|
+
1. **Check branch was created**:
|
|
672
|
+
```bash
|
|
673
|
+
git branch --list feature/SPEC-{ID}
|
|
674
|
+
```
|
|
675
|
+
- IF branch exists → success
|
|
676
|
+
- IF branch missing → print error and stop
|
|
359
677
|
|
|
360
|
-
**
|
|
678
|
+
2. **Personal mode verification**:
|
|
679
|
+
- Check local commit exists
|
|
680
|
+
- Print success message
|
|
361
681
|
|
|
362
|
-
|
|
682
|
+
3. **Team mode verification**:
|
|
683
|
+
- Check remote branch exists: `git ls-remote origin feature/SPEC-{ID}`
|
|
684
|
+
- Check GitHub Issue was created: `gh issue list --label spec`
|
|
685
|
+
- Check Draft PR was created: `gh pr list --state open --head feature/SPEC-{ID}`
|
|
686
|
+
- IF any verification fails → print error and stop
|
|
363
687
|
|
|
364
|
-
|
|
688
|
+
### Step 4: CodeRabbit SPEC Review (Local Only - Automatic)
|
|
365
689
|
|
|
366
|
-
|
|
367
|
-
# @SPEC:AUTH-001: JWT-based authentication system
|
|
368
|
-
|
|
369
|
-
## HISTORY
|
|
370
|
-
|
|
371
|
-
### v0.0.1 (2025-09-15)
|
|
372
|
-
- **INITIAL**: Initial creation of JWT-based authentication system specification
|
|
373
|
-
- **AUTHOR**: @Goos
|
|
374
|
-
- **SCOPE**: Token issuance, verification, and renewal logic
|
|
375
|
-
- **CONTEXT**: Reflects requirements for strengthening user authentication
|
|
376
|
-
|
|
377
|
-
### v0.0.2 (2025-09-20)
|
|
378
|
-
- **ADDED**: Added social login requirements (Draft modification)
|
|
379
|
-
- **AUTHOR**: @Goos
|
|
380
|
-
- **REVIEW**: @security-team (approved)
|
|
381
|
-
- **CHANGES**:
|
|
382
|
-
- OAuth2 integration requirements
|
|
383
|
-
- Google/GitHub login support
|
|
384
|
-
|
|
385
|
-
### v0.1.0 (2025-10-01)
|
|
386
|
-
- **IMPLEMENTATION COMPLETED**: TDD implementation completed (status: draft → completed)
|
|
387
|
-
- **TDD CYCLE**: RED → GREEN → REFACTOR
|
|
388
|
-
- **COMMITS**: [Implementation commit hash list]
|
|
389
|
-
- **FILES**: [Created/modified file list]
|
|
390
|
-
```
|
|
690
|
+
**This step happens automatically in the background. You DO NOT need to execute anything.**
|
|
391
691
|
|
|
392
|
-
|
|
393
|
-
- **Version system**: v0.0.1 (INITIAL) → v0.1.0 (implementation complete) → v1.0.0 (stabilization)
|
|
394
|
-
- Detailed version system: See `.moai/memory/spec-metadata.md#version-system`
|
|
395
|
-
- **Version order**: Latest version on top (reverse order)
|
|
396
|
-
- **Change type tag**: INITIAL, ADDED, CHANGED, IMPLEMENTATION COMPLETED, BREAKING, DEPRECATED, REMOVED, FIXED
|
|
397
|
-
- Detailed description: See `.moai/memory/spec-metadata.md#history-writing-guide`
|
|
398
|
-
- **Required items**: Version, date, AUTHOR, changes
|
|
399
|
-
- **Optional items**: REVIEW, SCOPE, CONTEXT, MIGRATION
|
|
692
|
+
After Draft PR is created, CodeRabbit automatically triggers SPEC review:
|
|
400
693
|
|
|
401
|
-
|
|
694
|
+
**What CodeRabbit reviews**:
|
|
695
|
+
- ✅ YAML frontmatter validation (7 required fields)
|
|
696
|
+
- ✅ HISTORY section structure and completeness
|
|
697
|
+
- ✅ EARS requirements clarity (Ubiquitous/Event-driven/State-driven/Optional/Unwanted Behaviors)
|
|
698
|
+
- ✅ Acceptance criteria quality (Given-When-Then scenarios)
|
|
699
|
+
- ✅ @TAG system compliance (SPEC/TEST/CODE/DOC traceability)
|
|
700
|
+
- ✅ Documentation and formatting
|
|
701
|
+
|
|
702
|
+
**Expected timeline**: 1-2 minutes
|
|
703
|
+
|
|
704
|
+
**IF you are running in local environment**:
|
|
705
|
+
1. Print to user: "🤖 CodeRabbit is reviewing SPEC PR (1-2 minutes)..."
|
|
706
|
+
2. Print to user: "→ PR will be auto-approved if quality meets standards (80%+)"
|
|
707
|
+
3. Print to user: "→ Check `.coderabbit.yaml` for detailed review checklist"
|
|
708
|
+
|
|
709
|
+
**IF you are running in published package**:
|
|
710
|
+
1. Print to user: "✅ Draft PR created"
|
|
711
|
+
2. Print to user: "→ Manual review required (CodeRabbit not available)"
|
|
402
712
|
|
|
403
|
-
```markdown
|
|
404
|
-
---
|
|
405
|
-
id: AUTH-001
|
|
406
|
-
version: 1.0.0
|
|
407
|
-
status: draft
|
|
408
|
-
created: 2025-09-15
|
|
409
|
-
updated: 2025-09-15
|
|
410
|
-
author: @username
|
|
411
713
|
---
|
|
412
714
|
|
|
413
|
-
|
|
715
|
+
## ✅ Command Completion & Next Steps
|
|
414
716
|
|
|
415
|
-
|
|
416
|
-
[Change history by version – see example above]
|
|
717
|
+
After PHASE 3 completes successfully, you MUST ask the user what to do next.
|
|
417
718
|
|
|
418
|
-
|
|
419
|
-
[System environment and prerequisites]
|
|
719
|
+
### Ask the user this question:
|
|
420
720
|
|
|
421
|
-
|
|
422
|
-
[Design assumptions]
|
|
721
|
+
"SPEC creation is complete. What would you like to do next?"
|
|
423
722
|
|
|
424
|
-
|
|
425
|
-
### Ubiquitous
|
|
426
|
-
- The system must provide [feature]
|
|
723
|
+
### Present these options:
|
|
427
724
|
|
|
428
|
-
|
|
429
|
-
-
|
|
725
|
+
1. **Start Implementation** - Proceed to `/alfred:2-run SPEC-XXX` for TDD implementation
|
|
726
|
+
2. **Review SPEC** - Review and modify SPEC documents before implementation
|
|
727
|
+
3. **New Session** - Execute `/clear` for better context management (recommended)
|
|
728
|
+
4. **Cancel** - Return to planning phase
|
|
430
729
|
|
|
431
|
-
###
|
|
432
|
-
- WHILE When in [state], the system must [operate]
|
|
730
|
+
### Wait for the user to answer
|
|
433
731
|
|
|
434
|
-
###
|
|
435
|
-
- If WHERE [condition], the system can [operate]
|
|
732
|
+
### Process user's answer:
|
|
436
733
|
|
|
437
|
-
|
|
438
|
-
|
|
734
|
+
**IF user selected "Start Implementation"**:
|
|
735
|
+
1. Print: "Starting TDD implementation workflow..."
|
|
736
|
+
2. Print: "You can execute: `/alfred:2-run SPEC-XXX`"
|
|
737
|
+
3. End command execution (user will manually run next command)
|
|
439
738
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
-
|
|
444
|
-
|
|
445
|
-
```
|
|
739
|
+
**IF user selected "Review SPEC"**:
|
|
740
|
+
1. Print: "📁 SPEC files created in `.moai/specs/SPEC-XXX/`"
|
|
741
|
+
2. Print: "Files: spec.md, plan.md, acceptance.md"
|
|
742
|
+
3. Print: "After review, run: `/alfred:2-run SPEC-XXX`"
|
|
743
|
+
4. End command execution
|
|
446
744
|
|
|
447
|
-
|
|
745
|
+
**IF user selected "New Session"**:
|
|
746
|
+
1. Print: "⏳ Clearing session for better context management..."
|
|
747
|
+
2. Print: "Note: This improves performance for large projects"
|
|
748
|
+
3. Print: "Next session: Run `/alfred:2-run SPEC-XXX`"
|
|
749
|
+
4. End command execution (user will manually run /clear)
|
|
448
750
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
751
|
+
**IF user selected "Cancel"**:
|
|
752
|
+
1. Print: "Returning to planning phase..."
|
|
753
|
+
2. Print: "SPEC files preserved for future use"
|
|
754
|
+
3. Print: "Create more SPECs with: `/alfred:1-plan`"
|
|
755
|
+
4. End command execution
|
|
454
756
|
|
|
455
|
-
|
|
757
|
+
---
|
|
456
758
|
|
|
457
|
-
|
|
759
|
+
## 📚 Reference Information
|
|
458
760
|
|
|
459
|
-
**
|
|
761
|
+
The following sections provide reference information for understanding SPEC structure and requirements. **You do not need to memorize these - they are available when needed.**
|
|
460
762
|
|
|
461
|
-
|
|
462
|
-
Task 1 (haiku): Scan project structure
|
|
463
|
-
├── Detect languages/frameworks
|
|
464
|
-
├── Collect list of existing SPECs
|
|
465
|
-
└── Draft priority backlog
|
|
466
|
-
|
|
467
|
-
Task 2 (sonnet): In-depth document analysis
|
|
468
|
-
├── product.md requirements extraction
|
|
469
|
-
├── structure.md architecture analysis
|
|
470
|
-
└── tech.md technical constraints
|
|
471
|
-
```
|
|
763
|
+
### EARS Specification Writing Guide
|
|
472
764
|
|
|
473
|
-
|
|
765
|
+
When creating SPEC requirements, follow the EARS (Event-Action-Response-State) structure:
|
|
766
|
+
|
|
767
|
+
1. **Event**: Define trigger events that occur in the system
|
|
768
|
+
2. **Action**: Specification of the system's action for an event
|
|
769
|
+
3. **Response**: Defining a response as a result of an action
|
|
770
|
+
4. **State**: Specifies system state changes and side effects
|
|
474
771
|
|
|
475
|
-
|
|
772
|
+
**Example**:
|
|
773
|
+
```markdown
|
|
774
|
+
### Ubiquitous Requirements
|
|
775
|
+
- The system must provide user authentication functionality
|
|
476
776
|
|
|
477
|
-
|
|
777
|
+
### Event-driven Requirements
|
|
778
|
+
- WHEN the user logs in with valid credentials, the system must issue a JWT token
|
|
478
779
|
|
|
479
|
-
-
|
|
480
|
-
-
|
|
481
|
-
- Simultaneous creation of 3 files (spec.md, plan.md, acceptance.md)
|
|
780
|
+
### State-driven Requirements
|
|
781
|
+
- WHILE the token is in an unexpired state, the system must allow access to the protected resource
|
|
482
782
|
|
|
483
|
-
###
|
|
783
|
+
### Unwanted Behaviors
|
|
784
|
+
- IF the token has expired, the system must return a 401 Unauthorized response
|
|
785
|
+
```
|
|
484
786
|
|
|
485
|
-
|
|
787
|
+
For complete EARS syntax and examples, invoke: `Skill("moai-foundation-ears")`
|
|
486
788
|
|
|
487
|
-
|
|
488
|
-
- **Personal mode**: Branch from `main` or `develop` (based on project settings)
|
|
489
|
-
- **Team mode**: **Always branch from `develop`** (GitFlow standard)
|
|
490
|
-
- Branch name: `feature/SPEC-{ID}` format
|
|
491
|
-
- **Create GitHub Issue**: Create SPEC Issue in Team mode
|
|
492
|
-
- **Create Draft PR**: `feature/SPEC-{ID}` → `develop` in Team mode Create PR
|
|
493
|
-
- **Initial Commit**: Commit SPEC document and create tags
|
|
789
|
+
### SPEC Metadata Standard
|
|
494
790
|
|
|
495
|
-
|
|
791
|
+
For complete metadata field descriptions, validation rules, and version system guide, invoke: `Skill("moai-alfred-spec-metadata-validation")`
|
|
496
792
|
|
|
497
|
-
|
|
793
|
+
**Quick reference**:
|
|
794
|
+
- **7 required fields**: id, version, status, created, updated, author, priority
|
|
795
|
+
- **9 optional fields**: category, labels, depends_on, blocks, related_specs, related_issue, scope
|
|
498
796
|
|
|
499
|
-
###
|
|
797
|
+
### Agent Role Separation
|
|
500
798
|
|
|
799
|
+
**spec-builder dedicated area**:
|
|
501
800
|
- Analysis of project documents and discovery of SPEC candidates
|
|
502
801
|
- Preparation of EARS structure specifications
|
|
503
802
|
- Preparation of Acceptance Criteria (Given-When-Then)
|
|
504
803
|
- Verification of SPEC document quality
|
|
505
804
|
- Application of @TAG system
|
|
506
805
|
|
|
507
|
-
|
|
508
|
-
|
|
806
|
+
**git-manager dedicated area**:
|
|
509
807
|
- Create and manage all Git branches
|
|
510
|
-
-
|
|
511
|
-
|
|
512
|
-
- Team: **Always branch from `develop`** (GitFlow)
|
|
513
|
-
- Create GitHub Issue/PR
|
|
514
|
-
- Team Mode: Create Draft PR (`feature/SPEC-{ID}` → `develop`)
|
|
808
|
+
- Apply branch strategy for each mode (Personal: branch from main/develop, Team: ALWAYS branch from develop)
|
|
809
|
+
- Create GitHub Issue/PR (Team Mode: Create Draft PR `feature/SPEC-{ID}` → `develop`)
|
|
515
810
|
- Create initial commit and tags
|
|
516
811
|
- Handle remote synchronization
|
|
517
812
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
### Phase 1: Analysis and planning phase
|
|
521
|
-
|
|
522
|
-
**Plan Analyzer** does the following:
|
|
523
|
-
|
|
524
|
-
1. **Loading project document**: In-depth analysis of product/structure/tech.md
|
|
525
|
-
2. **SPEC candidate discovery**: Prioritization based on business requirements
|
|
526
|
-
3. **Establishment of implementation strategy**: EARS structure and acceptance design
|
|
527
|
-
4. **Creating a Writing Plan**: Presents a step-by-step approach to writing a plan
|
|
528
|
-
5. **Awaiting user approval**: Review plan and gather feedback
|
|
813
|
+
**Single Responsibility Principle**: spec-builder only writes plans, git-manager only performs Git/GitHub operations.
|
|
529
814
|
|
|
530
|
-
|
|
815
|
+
**Sequential execution**: Executes in the order spec-builder → git-manager to maintain clear dependencies.
|
|
531
816
|
|
|
532
|
-
|
|
817
|
+
**No inter-agent calls**: Each agent does NOT call other agents directly. They are executed sequentially only at the command level.
|
|
533
818
|
|
|
534
|
-
|
|
535
|
-
2. **Acceptance Criteria**: Given-When-Then Scenario Writing
|
|
536
|
-
3. **Document quality verification**: Apply TRUST principles and @TAG
|
|
537
|
-
4. **Template creation**: Simultaneous creation of spec.md, plan.md, acceptance.md
|
|
819
|
+
### Context Management Strategy
|
|
538
820
|
|
|
539
|
-
|
|
821
|
+
**Load first**: `.moai/project/product.md` (business requirement)
|
|
540
822
|
|
|
541
|
-
The `
|
|
823
|
+
**Recommendation after completion**: The plan is complete. You can experience better performance and context management by starting a new chat session with the `/clear` or `/new` command before proceeding to the next step (`/alfred:2-run`).
|
|
542
824
|
|
|
543
|
-
|
|
544
|
-
2. **GitHub Issue**: Create SPEC Issue in Team mode
|
|
545
|
-
3. **Initial commit**: Commit SPEC document and create tags
|
|
546
|
-
4. **Remote Sync**: Apply synchronization strategy for each mode
|
|
825
|
+
For complete context engineering strategy, invoke: `Skill("moai-alfred-dev-guide")`
|
|
547
826
|
|
|
548
|
-
|
|
827
|
+
### Writing Tips
|
|
549
828
|
|
|
550
|
-
- Information that is not in the product/structure/tech document is supplemented by asking a new question
|
|
551
|
-
- Acceptance Criteria is encouraged to be written at least 2 times in 3 columns Given/When/Then
|
|
552
|
-
- The number of modules is reduced due to the relaxation of the Readable standard among the TRUST principles. If the recommended value (default 5) is exceeded,
|
|
829
|
+
- Information that is not in the product/structure/tech document is supplemented by asking a new question
|
|
830
|
+
- Acceptance Criteria is encouraged to be written at least 2 times in 3 columns Given/When/Then
|
|
831
|
+
- The number of modules is reduced due to the relaxation of the Readable standard among the TRUST principles. If the recommended value (default 5) is exceeded, include justification in the SPEC `context` section
|
|
553
832
|
|
|
554
833
|
---
|
|
555
834
|
|
|
556
|
-
##
|
|
835
|
+
## 🎯 Summary: Your Execution Checklist
|
|
557
836
|
|
|
558
|
-
|
|
837
|
+
Before you consider this command complete, verify:
|
|
559
838
|
|
|
560
|
-
|
|
839
|
+
- [ ] **PHASE 1 executed**: spec-builder analyzed project and proposed SPEC candidates
|
|
840
|
+
- [ ] **User approval obtained**: User explicitly approved SPEC creation (via AskUserQuestion)
|
|
841
|
+
- [ ] **PHASE 2 executed**: spec-builder created all 3 SPEC files (spec.md, plan.md, acceptance.md)
|
|
842
|
+
- [ ] **Directory naming correct**: `.moai/specs/SPEC-{ID}/` format followed
|
|
843
|
+
- [ ] **YAML frontmatter valid**: All 7 required fields present
|
|
844
|
+
- [ ] **HISTORY section present**: Immediately after YAML frontmatter
|
|
845
|
+
- [ ] **EARS structure complete**: All 5 requirement types included
|
|
846
|
+
- [ ] **PHASE 3 executed**: git-manager created branch and PR (if Team mode)
|
|
847
|
+
- [ ] **Branch naming correct**: `feature/SPEC-{ID}` format
|
|
848
|
+
- [ ] **GitFlow enforced**: PR targets `develop` branch (not `main`)
|
|
849
|
+
- [ ] **Next steps presented**: User asked what to do next (via AskUserQuestion)
|
|
561
850
|
|
|
562
|
-
|
|
851
|
+
IF all checkboxes are checked → Command execution successful
|
|
563
852
|
|
|
564
|
-
|
|
853
|
+
IF any checkbox is unchecked → Identify missing step and complete it before ending
|
|
565
854
|
|
|
566
855
|
---
|
|
567
856
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
**Recommendation**: For better performance and context management, start a new chat session with the `/clear` or `/new` command before proceeding to the next step.
|
|
571
|
-
|
|
572
|
-
- Start implementing TDD with `/alfred:2-run SPEC-XXX`
|
|
573
|
-
- Team mode: After creating an issue, the git-manager agent automatically creates a branch.
|
|
857
|
+
**End of command execution guide**
|