moai-adk 0.34.0__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moai_adk/__main__.py +136 -5
- moai_adk/astgrep/__init__.py +37 -0
- moai_adk/astgrep/analyzer.py +522 -0
- moai_adk/astgrep/models.py +124 -0
- moai_adk/astgrep/rules.py +179 -0
- moai_adk/cli/commands/analyze.py +11 -2
- moai_adk/cli/commands/doctor.py +7 -1
- moai_adk/cli/commands/init.py +321 -11
- moai_adk/cli/commands/language.py +7 -1
- moai_adk/cli/commands/rank.py +449 -0
- moai_adk/cli/commands/status.py +7 -1
- moai_adk/cli/commands/switch.py +325 -0
- moai_adk/cli/commands/update.py +296 -23
- moai_adk/cli/prompts/init_prompts.py +362 -66
- moai_adk/cli/prompts/translations/__init__.py +573 -0
- moai_adk/cli/ui/prompts.py +61 -2
- moai_adk/cli/worktree/cli.py +106 -1
- moai_adk/cli/worktree/manager.py +155 -0
- moai_adk/core/config/unified.py +244 -63
- moai_adk/core/credentials.py +264 -0
- moai_adk/core/error_recovery_system.py +22 -4
- moai_adk/core/git/conflict_detector.py +10 -1
- moai_adk/core/git/event_detector.py +16 -5
- moai_adk/core/integration/engine.py +2 -2
- moai_adk/core/integration/integration_tester.py +5 -5
- moai_adk/core/language_config_resolver.py +9 -3
- moai_adk/core/merge/analyzer.py +509 -324
- moai_adk/core/migration/alfred_to_moai_migrator.py +7 -1
- moai_adk/core/migration/backup_manager.py +54 -4
- moai_adk/core/migration/file_migrator.py +174 -2
- moai_adk/core/migration/interactive_checkbox_ui.py +42 -31
- moai_adk/core/migration/version_detector.py +123 -19
- moai_adk/core/migration/version_migrator.py +44 -9
- moai_adk/core/model_allocator.py +241 -0
- moai_adk/core/project/backup_utils.py +12 -2
- moai_adk/core/project/initializer.py +44 -87
- moai_adk/core/project/phase_executor.py +95 -33
- moai_adk/core/project/validator.py +16 -1
- moai_adk/core/quality/trust_checker.py +30 -10
- moai_adk/core/rollback_manager.py +60 -25
- moai_adk/core/template/backup.py +88 -6
- moai_adk/core/template/config.py +33 -9
- moai_adk/core/template/merger.py +34 -8
- moai_adk/core/template/processor.py +334 -11
- moai_adk/core/template_engine.py +10 -1
- moai_adk/core/template_variable_synchronizer.py +16 -2
- moai_adk/core/version_sync.py +54 -6
- moai_adk/foundation/__init__.py +1 -20
- moai_adk/foundation/testing.py +1 -1
- moai_adk/loop/__init__.py +54 -0
- moai_adk/loop/controller.py +305 -0
- moai_adk/loop/feedback.py +230 -0
- moai_adk/loop/state.py +209 -0
- moai_adk/loop/storage.py +220 -0
- moai_adk/lsp/__init__.py +70 -0
- moai_adk/lsp/client.py +320 -0
- moai_adk/lsp/models.py +261 -0
- moai_adk/lsp/protocol.py +404 -0
- moai_adk/lsp/server_manager.py +248 -0
- moai_adk/project/configuration.py +8 -1
- moai_adk/py.typed +0 -0
- moai_adk/ralph/__init__.py +37 -0
- moai_adk/ralph/engine.py +307 -0
- moai_adk/rank/__init__.py +21 -0
- moai_adk/rank/auth.py +425 -0
- moai_adk/rank/client.py +557 -0
- moai_adk/rank/config.py +147 -0
- moai_adk/rank/hook.py +1503 -0
- moai_adk/rank/py.typed +0 -0
- moai_adk/statusline/__init__.py +3 -0
- moai_adk/statusline/enhanced_output_style_detector.py +5 -5
- moai_adk/statusline/main.py +20 -1
- moai_adk/statusline/memory_collector.py +268 -0
- moai_adk/statusline/renderer.py +54 -38
- moai_adk/tag_system/__init__.py +48 -0
- moai_adk/tag_system/atomic_ops.py +117 -0
- moai_adk/tag_system/linkage.py +335 -0
- moai_adk/tag_system/parser.py +176 -0
- moai_adk/tag_system/validator.py +200 -0
- moai_adk/templates/.claude/agents/moai/builder-agent.md +19 -3
- moai_adk/templates/.claude/agents/moai/builder-command.md +62 -16
- moai_adk/templates/.claude/agents/moai/builder-plugin.md +763 -0
- moai_adk/templates/.claude/agents/moai/builder-skill.md +21 -5
- moai_adk/templates/.claude/agents/moai/expert-backend.md +103 -39
- moai_adk/templates/.claude/agents/moai/expert-debug.md +9 -3
- moai_adk/templates/.claude/agents/moai/expert-devops.md +16 -14
- moai_adk/templates/.claude/agents/moai/expert-frontend.md +45 -31
- moai_adk/templates/.claude/agents/moai/expert-performance.md +13 -9
- moai_adk/templates/.claude/agents/moai/expert-refactoring.md +228 -0
- moai_adk/templates/.claude/agents/moai/expert-security.md +19 -3
- moai_adk/templates/.claude/agents/moai/expert-testing.md +13 -9
- moai_adk/templates/.claude/agents/moai/manager-claude-code.md +8 -2
- moai_adk/templates/.claude/agents/moai/manager-docs.md +10 -5
- moai_adk/templates/.claude/agents/moai/manager-git.md +99 -27
- moai_adk/templates/.claude/agents/moai/manager-project.md +87 -7
- moai_adk/templates/.claude/agents/moai/manager-quality.md +22 -5
- moai_adk/templates/.claude/agents/moai/manager-spec.md +8 -2
- moai_adk/templates/.claude/agents/moai/manager-strategy.md +45 -14
- moai_adk/templates/.claude/agents/moai/manager-tdd.md +16 -3
- moai_adk/templates/.claude/commands/moai/0-project.md +239 -1185
- moai_adk/templates/.claude/commands/moai/1-plan.md +383 -363
- moai_adk/templates/.claude/commands/moai/2-run.md +254 -347
- moai_adk/templates/.claude/commands/moai/3-sync.md +174 -100
- moai_adk/templates/.claude/commands/moai/9-feedback.md +49 -33
- moai_adk/templates/.claude/commands/moai/alfred.md +339 -0
- moai_adk/templates/.claude/commands/moai/cancel-loop.md +163 -0
- moai_adk/templates/.claude/commands/moai/fix.md +264 -0
- moai_adk/templates/.claude/commands/moai/loop.md +363 -0
- moai_adk/templates/.claude/hooks/moai/lib/README.md +143 -0
- moai_adk/templates/.claude/hooks/moai/lib/__init__.py +37 -81
- moai_adk/templates/.claude/hooks/moai/lib/alfred_detector.py +105 -0
- moai_adk/templates/.claude/hooks/moai/lib/atomic_write.py +122 -0
- moai_adk/templates/.claude/hooks/moai/lib/checkpoint.py +4 -1
- moai_adk/templates/.claude/hooks/moai/lib/common.py +35 -5
- moai_adk/templates/.claude/hooks/moai/lib/config.py +376 -0
- moai_adk/templates/.claude/hooks/moai/lib/config_manager.py +24 -28
- moai_adk/templates/.claude/hooks/moai/lib/config_validator.py +14 -14
- moai_adk/templates/.claude/hooks/moai/lib/enhanced_output_style_detector.py +372 -0
- moai_adk/templates/.claude/hooks/moai/lib/exceptions.py +171 -0
- moai_adk/templates/.claude/hooks/moai/lib/file_utils.py +95 -0
- moai_adk/templates/.claude/hooks/moai/lib/git_collector.py +190 -0
- moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +15 -13
- moai_adk/templates/.claude/hooks/moai/lib/language_detector.py +298 -0
- moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +125 -25
- moai_adk/templates/.claude/hooks/moai/lib/main.py +341 -0
- moai_adk/templates/.claude/hooks/moai/lib/memory_collector.py +268 -0
- moai_adk/templates/.claude/hooks/moai/lib/metrics_tracker.py +78 -0
- moai_adk/templates/.claude/hooks/moai/lib/models.py +9 -7
- moai_adk/templates/.claude/hooks/moai/lib/path_utils.py +204 -13
- moai_adk/templates/.claude/hooks/moai/lib/project.py +23 -14
- moai_adk/templates/.claude/hooks/moai/lib/renderer.py +359 -0
- moai_adk/templates/.claude/hooks/moai/lib/tag_linkage.py +333 -0
- moai_adk/templates/.claude/hooks/moai/lib/tag_parser.py +176 -0
- moai_adk/templates/.claude/hooks/moai/lib/tag_validator.py +200 -0
- moai_adk/templates/.claude/hooks/moai/lib/timeout.py +5 -5
- moai_adk/templates/.claude/hooks/moai/lib/tool_registry.py +896 -0
- moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +30 -18
- moai_adk/templates/.claude/hooks/moai/lib/update_checker.py +129 -0
- moai_adk/templates/.claude/hooks/moai/lib/version_reader.py +741 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__ast_grep_scan.py +276 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__code_formatter.py +255 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__coverage_guard.py +325 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__linter.py +315 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__lsp_diagnostic.py +508 -0
- moai_adk/templates/.claude/hooks/moai/pre_commit__tag_validator.py +287 -0
- moai_adk/templates/.claude/hooks/moai/pre_tool__security_guard.py +268 -0
- moai_adk/templates/.claude/hooks/moai/pre_tool__tdd_enforcer.py +208 -0
- moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +93 -61
- moai_adk/templates/.claude/hooks/moai/session_end__rank_submit.py +69 -0
- moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +165 -70
- moai_adk/templates/.claude/hooks/moai/shared/utils/announcement_translator.py +206 -0
- moai_adk/templates/.claude/hooks/moai/stop__loop_controller.py +621 -0
- moai_adk/templates/.claude/output-styles/moai/alfred.md +758 -0
- moai_adk/templates/.claude/output-styles/moai/r2d2.md +86 -3
- moai_adk/templates/.claude/output-styles/moai/yoda.md +2 -2
- moai_adk/templates/.claude/settings.json +154 -77
- moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +252 -198
- moai_adk/templates/.claude/skills/moai-docs-generation/examples.md +169 -323
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/README.md +39 -27
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/api-documentation.md +115 -125
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/code-documentation.md +150 -150
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/multi-format-output.md +182 -175
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/user-guides.md +198 -138
- moai_adk/templates/.claude/skills/moai-docs-generation/reference.md +226 -320
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +43 -222
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +75 -219
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +103 -463
- moai_adk/templates/.claude/skills/moai-domain-frontend/modules/component-architecture.md +723 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/modules/nextjs16-patterns.md +713 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/modules/performance-optimization.md +694 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/modules/react19-patterns.md +591 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/modules/state-management.md +680 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/modules/vue35-patterns.md +802 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +118 -339
- moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +74 -377
- moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +299 -70
- moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +205 -182
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/advanced-agent-patterns.md +370 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-cli-reference-official.md +420 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-custom-slash-commands-official.md +32 -22
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-devcontainers-official.md +381 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-discover-plugins-official.md +379 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-headless-official.md +378 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-hooks-official.md +110 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-plugin-marketplaces-official.md +308 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-plugins-official.md +640 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sandboxing-official.md +282 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-skills-official.md +425 -71
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-statusline-official.md +293 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sub-agents-official.md +325 -143
- moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +96 -316
- moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +116 -294
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-advanced.md +279 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-implementation.md +267 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-patterns.md +121 -650
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/patterns.md +22 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-ears-format.md +200 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-first-tdd.md +37 -730
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-tdd-implementation.md +275 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-framework.md +77 -819
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-implementation.md +244 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-validation.md +219 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/SKILL.md +14 -18
- moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +86 -270
- moai_adk/templates/.claude/skills/moai-framework-electron/SKILL.md +288 -0
- moai_adk/templates/.claude/skills/moai-framework-electron/examples.md +2082 -0
- moai_adk/templates/.claude/skills/moai-framework-electron/reference.md +1649 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +76 -582
- moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +1239 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/modules/advanced-patterns.md +401 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +1136 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +82 -436
- moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +585 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/modules/aspnet-core.md +627 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/modules/blazor-components.md +767 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/modules/cqrs-validation.md +626 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/modules/csharp12-features.md +580 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/modules/efcore-patterns.md +622 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +403 -0
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +65 -542
- moai_adk/templates/.claude/skills/moai-lang-elixir/examples.md +1171 -0
- moai_adk/templates/.claude/skills/moai-lang-elixir/modules/advanced-patterns.md +531 -0
- moai_adk/templates/.claude/skills/moai-lang-elixir/reference.md +889 -0
- moai_adk/templates/.claude/skills/moai-lang-flutter/SKILL.md +32 -405
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +114 -293
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +83 -307
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +179 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +973 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +1543 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +42 -279
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +94 -556
- moai_adk/templates/.claude/skills/moai-lang-php/examples.md +1608 -0
- moai_adk/templates/.claude/skills/moai-lang-php/modules/advanced-patterns.md +538 -0
- moai_adk/templates/.claude/skills/moai-lang-php/reference.md +1323 -0
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +108 -358
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +84 -482
- moai_adk/templates/.claude/skills/moai-lang-r/examples.md +1154 -0
- moai_adk/templates/.claude/skills/moai-lang-r/modules/advanced-patterns.md +489 -0
- moai_adk/templates/.claude/skills/moai-lang-r/reference.md +1087 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +106 -610
- moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +1106 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/modules/advanced-patterns.md +309 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/modules/testing-patterns.md +306 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +1024 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +51 -265
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +106 -442
- moai_adk/templates/.claude/skills/moai-lang-scala/modules/akka-actors.md +479 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/modules/cats-effect.md +489 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/modules/functional-programming.md +460 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/modules/spark-data.md +498 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/modules/zio-patterns.md +541 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +88 -457
- moai_adk/templates/.claude/skills/moai-lang-swift/modules/combine-reactive.md +256 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/modules/concurrency.md +270 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/modules/swift6-features.md +265 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/modules/swiftui-patterns.md +314 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +75 -283
- moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +97 -252
- moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +64 -240
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-patterns.md +331 -12
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/configuration.md +330 -37
- moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +90 -287
- moai_adk/templates/.claude/skills/moai-platform-auth0/SKILL.md +200 -206
- moai_adk/templates/.claude/skills/moai-platform-auth0/examples.md +2446 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/adaptive-mfa.md +233 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/akamai-integration.md +214 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/application-credentials.md +280 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/attack-protection-log-events.md +224 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/attack-protection-overview.md +140 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/bot-detection.md +144 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/breached-password-detection.md +187 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/brute-force-protection.md +189 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/certifications.md +282 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/compliance-overview.md +263 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/continuous-session-protection.md +307 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/customize-mfa.md +177 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/dpop-implementation.md +283 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/fapi-implementation.md +259 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/gdpr-compliance.md +313 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/guardian-configuration.md +269 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/highly-regulated-identity.md +272 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/jwt-fundamentals.md +248 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mdl-verification.md +210 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mfa-api-management.md +278 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mfa-factors.md +226 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mfa-overview.md +174 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/mtls-sender-constraining.md +316 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/ropg-flow-mfa.md +216 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/security-center.md +325 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/security-guidance.md +277 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/state-parameters.md +177 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/step-up-authentication.md +251 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/suspicious-ip-throttling.md +240 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/tenant-access-control.md +179 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/modules/webauthn-fido.md +235 -0
- moai_adk/templates/.claude/skills/moai-platform-auth0/reference.md +224 -0
- moai_adk/templates/.claude/skills/moai-platform-clerk/SKILL.md +75 -330
- moai_adk/templates/.claude/skills/moai-platform-clerk/examples.md +1426 -0
- moai_adk/templates/.claude/skills/moai-platform-clerk/modules/advanced-patterns.md +417 -0
- moai_adk/templates/.claude/skills/moai-platform-clerk/reference.md +273 -0
- moai_adk/templates/.claude/skills/moai-platform-convex/SKILL.md +100 -340
- moai_adk/templates/.claude/skills/moai-platform-convex/examples.md +506 -0
- moai_adk/templates/.claude/skills/moai-platform-convex/modules/auth-integration.md +421 -0
- moai_adk/templates/.claude/skills/moai-platform-convex/modules/file-storage.md +474 -0
- moai_adk/templates/.claude/skills/moai-platform-convex/modules/reactive-queries.md +302 -0
- moai_adk/templates/.claude/skills/moai-platform-convex/modules/server-functions.md +452 -0
- moai_adk/templates/.claude/skills/moai-platform-convex/reference.md +385 -0
- moai_adk/templates/.claude/skills/moai-platform-firebase-auth/SKILL.md +113 -326
- moai_adk/templates/.claude/skills/moai-platform-firebase-auth/examples.md +514 -0
- moai_adk/templates/.claude/skills/moai-platform-firebase-auth/modules/custom-claims.md +374 -0
- moai_adk/templates/.claude/skills/moai-platform-firebase-auth/modules/phone-auth.md +372 -0
- moai_adk/templates/.claude/skills/moai-platform-firebase-auth/modules/social-auth.md +339 -0
- moai_adk/templates/.claude/skills/moai-platform-firebase-auth/reference.md +382 -0
- moai_adk/templates/.claude/skills/moai-platform-firestore/SKILL.md +71 -302
- moai_adk/templates/.claude/skills/moai-platform-firestore/examples.md +445 -0
- moai_adk/templates/.claude/skills/moai-platform-firestore/modules/offline-cache.md +392 -0
- moai_adk/templates/.claude/skills/moai-platform-firestore/modules/realtime-listeners.md +441 -0
- moai_adk/templates/.claude/skills/moai-platform-firestore/modules/security-rules.md +352 -0
- moai_adk/templates/.claude/skills/moai-platform-firestore/modules/transactions.md +452 -0
- moai_adk/templates/.claude/skills/moai-platform-firestore/reference.md +322 -0
- moai_adk/templates/.claude/skills/moai-platform-neon/SKILL.md +101 -412
- moai_adk/templates/.claude/skills/moai-platform-neon/examples.md +470 -0
- moai_adk/templates/.claude/skills/moai-platform-neon/modules/auto-scaling.md +349 -0
- moai_adk/templates/.claude/skills/moai-platform-neon/modules/branching-workflows.md +354 -0
- moai_adk/templates/.claude/skills/moai-platform-neon/modules/connection-pooling.md +412 -0
- moai_adk/templates/.claude/skills/moai-platform-neon/modules/pitr-backups.md +458 -0
- moai_adk/templates/.claude/skills/moai-platform-neon/reference.md +272 -0
- moai_adk/templates/.claude/skills/moai-platform-railway/SKILL.md +96 -327
- moai_adk/templates/.claude/skills/moai-platform-railway/examples.md +539 -0
- moai_adk/templates/.claude/skills/moai-platform-railway/modules/docker-deployment.md +261 -0
- moai_adk/templates/.claude/skills/moai-platform-railway/modules/multi-service.md +291 -0
- moai_adk/templates/.claude/skills/moai-platform-railway/modules/networking-domains.md +338 -0
- moai_adk/templates/.claude/skills/moai-platform-railway/modules/volumes-storage.md +353 -0
- moai_adk/templates/.claude/skills/moai-platform-railway/reference.md +374 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/SKILL.md +103 -428
- moai_adk/templates/.claude/skills/moai-platform-supabase/examples.md +502 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/auth-integration.md +384 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/edge-functions.md +371 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/postgresql-pgvector.md +231 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/realtime-presence.md +354 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/row-level-security.md +286 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/storage-cdn.md +319 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/modules/typescript-patterns.md +453 -0
- moai_adk/templates/.claude/skills/moai-platform-supabase/reference.md +284 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/SKILL.md +96 -446
- moai_adk/templates/.claude/skills/moai-platform-vercel/examples.md +502 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/modules/analytics-speed.md +348 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/modules/deployment-config.md +344 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/modules/edge-functions.md +222 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/modules/isr-caching.md +306 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/modules/kv-storage.md +399 -0
- moai_adk/templates/.claude/skills/moai-platform-vercel/reference.md +360 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/SKILL.md +193 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/examples.md +1099 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/language-specific.md +307 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/pattern-syntax.md +237 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/refactoring-patterns.md +260 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/modules/security-rules.md +239 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/reference.md +288 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/languages/go.yml +90 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/languages/python.yml +101 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/languages/typescript.yml +83 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/quality/complexity-check.yml +94 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/quality/deprecated-apis.yml +84 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/security/secrets-detection.yml +89 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/security/sql-injection.yml +45 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/security/xss-prevention.yml +50 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/rules/sgconfig.yml +54 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +225 -423
- moai_adk/templates/.claude/skills/moai-workflow-loop/SKILL.md +197 -0
- moai_adk/templates/.claude/skills/moai-workflow-loop/examples.md +1063 -0
- moai_adk/templates/.claude/skills/moai-workflow-loop/reference.md +1414 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +211 -314
- moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +15 -43
- moai_adk/templates/.claude/skills/moai-workflow-spec/SKILL.md +119 -316
- moai_adk/templates/.claude/skills/moai-workflow-spec/modules/advanced-patterns.md +237 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +96 -203
- moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +201 -388
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/README.md +52 -3
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/ai-debugging.md +263 -806
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/context7-integration.md +286 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/review-workflows.md +500 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/relevance-analysis.md +154 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/safety-analysis.md +148 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/scoring-algorithms.md +196 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/timeliness-analysis.md +168 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/truthfulness-analysis.md +136 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework/usability-analysis.md +153 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review/trust5-framework.md +257 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review.md +191 -1344
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/code-review/analysis-patterns.md +340 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/code-review/core-classes.md +299 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/code-review/tool-integration.md +380 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/debugging/debugging-workflows.md +451 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/debugging/error-analysis.md +442 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance/optimization-patterns.md +473 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance/profiling-techniques.md +481 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/ai-optimization.md +241 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/bottleneck-detection.md +397 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/optimization-plan.md +315 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/profiler-core.md +277 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization/real-time-monitoring.md +187 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization.md +287 -1194
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/quality-metrics.md +415 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/refactoring/ai-workflows.md +620 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/refactoring/patterns.md +692 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/security-analysis.md +429 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/smart-refactoring.md +262 -1192
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/static-analysis.md +438 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd/core-classes.md +397 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/advanced-features.md +494 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/red-green-refactor.md +316 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/test-generation.md +471 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7/test-patterns.md +371 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7.md +227 -1222
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/trust5-validation.md +428 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/SKILL.md +228 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/integration-patterns.md +149 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/moai-adk-integration.md +245 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/parallel-advanced.md +310 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/parallel-development.md +202 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/parallel-workflows.md +302 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/registry-architecture.md +271 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/resource-optimization.md +300 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/tools-integration.md +280 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/troubleshooting.md +397 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/worktree-commands.md +296 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/modules/worktree-management.md +217 -0
- moai_adk/templates/.git-hooks/pre-push +162 -59
- moai_adk/templates/.github/workflows/ci-universal.yml +934 -133
- moai_adk/templates/.gitignore +65 -107
- moai_adk/templates/.lsp.json +152 -0
- moai_adk/templates/.mcp.json +2 -20
- moai_adk/templates/.moai/announcements/en.json +18 -0
- moai_adk/templates/.moai/announcements/ja.json +18 -0
- moai_adk/templates/.moai/announcements/ko.json +18 -0
- moai_adk/templates/.moai/announcements/zh.json +18 -0
- moai_adk/templates/.moai/config/config.yaml +8 -2
- moai_adk/templates/.moai/config/multilingual-triggers.yaml +213 -0
- moai_adk/templates/.moai/config/sections/language.yaml +2 -2
- moai_adk/templates/.moai/config/sections/llm.yaml +41 -0
- moai_adk/templates/.moai/config/sections/pricing.yaml +30 -0
- moai_adk/templates/.moai/config/sections/project.yaml +2 -2
- moai_adk/templates/.moai/config/sections/quality.yaml +43 -5
- moai_adk/templates/.moai/config/sections/ralph.yaml +55 -0
- moai_adk/templates/.moai/config/sections/system.yaml +46 -1
- moai_adk/templates/.moai/config/sections/user.yaml +1 -1
- moai_adk/templates/.moai/config/statusline-config.yaml +2 -2
- moai_adk/templates/.moai/llm-configs/glm.json +22 -0
- moai_adk/templates/CLAUDE.ja.md +343 -0
- moai_adk/templates/CLAUDE.ko.md +343 -0
- moai_adk/templates/CLAUDE.md +200 -499
- moai_adk/templates/CLAUDE.zh.md +343 -0
- moai_adk/utils/common.py +37 -0
- moai_adk/version.py +1 -1
- moai_adk-1.1.0.dist-info/METADATA +2443 -0
- moai_adk-1.1.0.dist-info/RECORD +701 -0
- {moai_adk-0.34.0.dist-info → moai_adk-1.1.0.dist-info}/entry_points.txt +2 -0
- moai_adk-1.1.0.dist-info/licenses/LICENSE +99 -0
- moai_adk/core/config/auto_spec_config.py +0 -340
- moai_adk/core/hooks/post_tool_auto_spec_completion.py +0 -901
- moai_adk/core/spec/confidence_scoring.py +0 -680
- moai_adk/core/spec/ears_template_engine.py +0 -1247
- moai_adk/core/spec/quality_validator.py +0 -687
- moai_adk/templates/.claude/agents/moai/ai-nano-banana.md +0 -670
- moai_adk/templates/.claude/agents/moai/expert-database.md +0 -777
- moai_adk/templates/.claude/agents/moai/expert-uiux.md +0 -1041
- moai_adk/templates/.claude/agents/moai/mcp-context7.md +0 -458
- moai_adk/templates/.claude/agents/moai/mcp-figma.md +0 -1607
- moai_adk/templates/.claude/agents/moai/mcp-notion.md +0 -789
- moai_adk/templates/.claude/agents/moai/mcp-playwright.md +0 -469
- moai_adk/templates/.claude/agents/moai/mcp-sequential-thinking.md +0 -1032
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/SKILL.md +0 -438
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/examples.md +0 -431
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/design-system-tokens.md +0 -405
- moai_adk/templates/.claude/skills/moai-library-nextra/advanced-patterns.md +0 -336
- moai_adk/templates/.claude/skills/moai-mcp-figma/SKILL.md +0 -402
- moai_adk/templates/.claude/skills/moai-mcp-figma/advanced-patterns.md +0 -607
- moai_adk/templates/.claude/skills/moai-mcp-notion/SKILL.md +0 -300
- moai_adk/templates/.claude/skills/moai-mcp-notion/advanced-patterns.md +0 -537
- moai_adk/templates/.claude/skills/moai-workflow-project/__init__.py +0 -520
- moai_adk/templates/.claude/skills/moai-workflow-project/complete_workflow_demo_fixed.py +0 -574
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_project_setup.py +0 -317
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_workflow_demo.py +0 -663
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/config-migration-example.json +0 -190
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/question-examples.json +0 -175
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/quick_start.py +0 -196
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/__init__.py +0 -17
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/advanced-patterns.md +0 -158
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/ask_user_integration.py +0 -340
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/batch_questions.py +0 -713
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/config_manager.py +0 -538
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/documentation_manager.py +0 -1336
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/language_initializer.py +0 -730
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/migration_manager.py +0 -608
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/template_optimizer.py +0 -1005
- moai_adk/templates/.claude/skills/moai-workflow-project/test_integration_simple.py +0 -436
- moai_adk/templates/.claude/skills/moai-worktree/SKILL.md +0 -411
- moai_adk/templates/.claude/skills/moai-worktree/modules/integration-patterns.md +0 -982
- moai_adk/templates/.claude/skills/moai-worktree/modules/parallel-development.md +0 -778
- moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-commands.md +0 -646
- moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-management.md +0 -782
- moai_adk/templates/.moai/config/questions/_schema.yaml +0 -151
- moai_adk/templates/.moai/config/questions/tab0-init.yaml +0 -251
- moai_adk/templates/.moai/config/questions/tab1-user.yaml +0 -108
- moai_adk/templates/.moai/config/questions/tab2-project.yaml +0 -81
- moai_adk/templates/.moai/config/questions/tab3-git.yaml +0 -634
- moai_adk/templates/.moai/config/questions/tab4-quality.yaml +0 -170
- moai_adk/templates/.moai/config/questions/tab5-system.yaml +0 -87
- moai_adk/templates/.moai/scripts/setup-glm.py +0 -136
- moai_adk-0.34.0.dist-info/METADATA +0 -2999
- moai_adk-0.34.0.dist-info/RECORD +0 -463
- moai_adk-0.34.0.dist-info/licenses/LICENSE +0 -21
- /moai_adk/foundation/{git.py → git/__init__.py} +0 -0
- /moai_adk/templates/.claude/skills/moai-library-mermaid/{advanced-patterns.md → modules/advanced-patterns.md} +0 -0
- /moai_adk/templates/.claude/skills/moai-library-mermaid/{optimization.md → modules/optimization.md} +0 -0
- /moai_adk/templates/.claude/skills/moai-library-nextra/{optimization.md → modules/optimization.md} +0 -0
- /moai_adk/templates/.claude/skills/moai-workflow-jit-docs/{advanced-patterns.md → modules/advanced-patterns.md} +0 -0
- /moai_adk/templates/.claude/skills/moai-workflow-jit-docs/{optimization.md → modules/optimization.md} +0 -0
- /moai_adk/templates/.claude/skills/moai-workflow-testing/{advanced-patterns.md → modules/advanced-patterns.md} +0 -0
- /moai_adk/templates/.claude/skills/moai-workflow-testing/{optimization.md → modules/optimization.md} +0 -0
- /moai_adk/templates/.claude/skills/{moai-worktree → moai-workflow-worktree}/examples.md +0 -0
- /moai_adk/templates/.claude/skills/{moai-worktree → moai-workflow-worktree}/reference.md +0 -0
- {moai_adk-0.34.0.dist-info → moai_adk-1.1.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,2443 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: moai-adk
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent & Unified moai-core-* Skills
|
|
5
|
+
Project-URL: Homepage, https://github.com/modu-ai/moai-adk
|
|
6
|
+
Project-URL: Repository, https://github.com/modu-ai/moai-adk
|
|
7
|
+
Project-URL: Issues, https://github.com/modu-ai/moai-adk/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/modu-ai/moai-adk/releases
|
|
9
|
+
Author-email: MoAI Team <support@moduai.kr>
|
|
10
|
+
License: COPYLEFT-3.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agentic,ai,alfred,claude,development,spec-first,tdd,toolkit
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: Other/Proprietary License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Classifier: Topic :: Software Development :: Testing
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Requires-Dist: aiohttp>=3.13.2
|
|
26
|
+
Requires-Dist: click>=8.1.0
|
|
27
|
+
Requires-Dist: gitpython>=3.1.45
|
|
28
|
+
Requires-Dist: inquirerpy>=0.3.4
|
|
29
|
+
Requires-Dist: jinja2>=3.0.0
|
|
30
|
+
Requires-Dist: packaging>=21.0
|
|
31
|
+
Requires-Dist: psutil>=7.1.3
|
|
32
|
+
Requires-Dist: pyfiglet>=1.0.2
|
|
33
|
+
Requires-Dist: pyyaml>=6.0
|
|
34
|
+
Requires-Dist: questionary>=2.0.0
|
|
35
|
+
Requires-Dist: requests>=2.28.0
|
|
36
|
+
Requires-Dist: rich>=13.0.0
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: black>=24.0.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: hypothesis>=6.100.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: mypy>=1.7.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-asyncio>=1.2.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest<9.0.0,>=8.4.2; extra == 'dev'
|
|
46
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: types-requests>=2.28.0; extra == 'dev'
|
|
49
|
+
Provides-Extra: security
|
|
50
|
+
Requires-Dist: bandit>=1.8.0; extra == 'security'
|
|
51
|
+
Requires-Dist: pip-audit>=2.7.0; extra == 'security'
|
|
52
|
+
Description-Content-Type: text/markdown
|
|
53
|
+
|
|
54
|
+
# 🗿 MoAI-ADK: Agentic AI Development Framework
|
|
55
|
+
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
**Available Languages:** [🇰🇷 한국어](./README.ko.md) | [🇺🇸 English](./README.md) | [🇯🇵 日本語](./README.ja.md) | [🇨🇳 中文](./README.zh.md)
|
|
59
|
+
|
|
60
|
+
[](https://pypi.org/project/moai-adk/)
|
|
61
|
+
[](./LICENSE)
|
|
62
|
+
[](https://www.python.org/)
|
|
63
|
+
|
|
64
|
+
> **"The purpose of vibe coding is not rapid productivity but code quality."**
|
|
65
|
+
|
|
66
|
+
MoAI-ADK provides an **AI development environment for quality code**. SPEC-First TDD, test-driven development, continuous refactoring, and 20 specialized AI agents work together.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 🎁 MoAI-ADK Sponsor: z.ai GLM 4.7
|
|
71
|
+
|
|
72
|
+
**💎 Optimal Solution for Cost-Effective AI Development**
|
|
73
|
+
|
|
74
|
+
MoAI-ADK partners with **z.ai GLM 4.7** to provide developers with an economical AI development environment.
|
|
75
|
+
|
|
76
|
+
### 🚀 GLM 4.7 Special Benefits
|
|
77
|
+
|
|
78
|
+
| Benefit | Description |
|
|
79
|
+
| -------------------------- | -------------------------------------------------------------- |
|
|
80
|
+
| **💰 70% Cost Savings** | 1/7 the price of Claude with equivalent performance |
|
|
81
|
+
| **⚡ Fast Response Speed** | Low-latency responses with optimized infrastructure |
|
|
82
|
+
| **🔄 Compatibility** | Fully compatible with Claude Code, no code modification needed |
|
|
83
|
+
| **📈 Unlimited Usage** | Use freely without daily/weekly token limits |
|
|
84
|
+
|
|
85
|
+
### 🎁 Sign-Up Special Discount
|
|
86
|
+
|
|
87
|
+
**👉 [GLM 4.7 Sign Up (10% Additional Discount)](https://z.ai/subscribe?ic=1NDV03BGWU)**
|
|
88
|
+
|
|
89
|
+
By signing up through this link:
|
|
90
|
+
|
|
91
|
+
- ✅ **Additional 10% discount** benefit
|
|
92
|
+
- ✅ **Contribute to MoAI open source development** (reward credits are used for open source projects)
|
|
93
|
+
|
|
94
|
+
### 💡 Usage Guide
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# 1. Get GLM API Key
|
|
98
|
+
Sign up at the link above and get your API key
|
|
99
|
+
|
|
100
|
+
# 2. Configure GLM in MoAI-ADK
|
|
101
|
+
moai glm YOUR_API_KEY
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
> **💡 Tip**: Using GLM 4.7 in a Worktree environment allows you to design with Opus and implement in bulk with GLM, saving up to 70% on costs.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 🌟 Core Values
|
|
109
|
+
|
|
110
|
+
- **🎯 SPEC-First**: 90% reduction in rework with clear specifications
|
|
111
|
+
- **🔴 TDD Enforcement**: Automatic guarantee of 85%+ test coverage
|
|
112
|
+
- **🤖 AI Orchestration**: 20 specialized agents + 48 skills
|
|
113
|
+
- **🌐 Multilingual Routing**: Automatic support for Korean/English/Japanese/Chinese
|
|
114
|
+
- **🌳 Worktree Parallel Development**: Unlimited parallel work in completely isolated environments
|
|
115
|
+
- **🏆 MoAI Rank**: Motivation through vibe coding leaderboard
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
> **📚 For detailed information, see the official online documentation:** [https://adk.mo.ai.kr](https://adk.mo.ai.kr)
|
|
120
|
+
|
|
121
|
+
## 1. 30-Second Installation
|
|
122
|
+
|
|
123
|
+
### 🚀 Method 1: Quick Install (Recommended)
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
curl -LsSf https://modu-ai.github.io/moai-adk/install.sh | sh
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 🔧 Method 2: Manual Install
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Step 1: Install uv (macOS/Linux)
|
|
133
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
134
|
+
|
|
135
|
+
# Step 2: Install MoAI-ADK
|
|
136
|
+
uv tool install moai-adk
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 🎨 Interactive Setup Wizard
|
|
140
|
+
|
|
141
|
+
Running `moai init` starts a **9-step interactive wizard**:
|
|
142
|
+
|
|
143
|
+

|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
#### Step 1: Language Selection
|
|
148
|
+
|
|
149
|
+
Select your conversation language. All subsequent instructions will be displayed in your chosen language.
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
🌐 Language Selection
|
|
153
|
+
❯ Select your conversation language: [↑↓] Navigate [Enter] Select
|
|
154
|
+
❯ Korean (한국어)
|
|
155
|
+
English
|
|
156
|
+
Japanese (日本語)
|
|
157
|
+
Chinese (中文)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
#### Step 2: Name Input
|
|
163
|
+
|
|
164
|
+
Enter your user name. AI will provide personalized responses.
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
👤 User Settings
|
|
168
|
+
❯ Enter your user name (optional):
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
#### Step 3: GLM API Key Input
|
|
174
|
+
|
|
175
|
+
Enter your GLM API key from Z.AI.
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
🔑 API Key Input
|
|
179
|
+
GLM CodePlan API key (optional - press Enter to skip)
|
|
180
|
+
|
|
181
|
+
✓ Found existing GLM API key: 99c1a2df...
|
|
182
|
+
Press Enter to keep existing key, or enter new key to replace
|
|
183
|
+
|
|
184
|
+
? Enter your GLM API key:
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
> 🎁 **GLM Sign-Up Benefit**: If you don't have a GLM account, sign up using the link below!
|
|
188
|
+
>
|
|
189
|
+
> **👉 [GLM Sign Up (10% Additional Discount)](https://z.ai/subscribe?ic=1NDV03BGWU)**
|
|
190
|
+
>
|
|
191
|
+
> By signing up through this link, you'll receive an **additional 10% discount**.
|
|
192
|
+
> Also, rewards generated from link sign-ups are used for **MoAI open source development**. 🙏
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
#### Step 4: Project Setup
|
|
197
|
+
|
|
198
|
+
Enter your project name.
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
📁 Project Setup
|
|
202
|
+
❯ Project name: MoAI-ADK
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
#### Step 5: Git Setup
|
|
208
|
+
|
|
209
|
+
Select your Git mode.
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
🔀 Git Setup
|
|
213
|
+
❯ Select your Git mode: [↑↓] Navigate [Enter] Select
|
|
214
|
+
❯ manual (local only) - Use local repository only
|
|
215
|
+
personal (GitHub personal) - Use GitHub personal account
|
|
216
|
+
team (GitHub team) - Use GitHub team/organization
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
#### Step 6: GitHub Username
|
|
222
|
+
|
|
223
|
+
For personal/team selection, enter your GitHub username.
|
|
224
|
+
|
|
225
|
+
```text
|
|
226
|
+
❯ GitHub username:
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
#### Step 7: Commit Message Language
|
|
232
|
+
|
|
233
|
+
Select the language for Git commit messages.
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
🗣️ Output Language Settings
|
|
237
|
+
❯ Commit message language: [↑↓] Navigate [Enter] Select
|
|
238
|
+
English
|
|
239
|
+
❯ Korean (한국어)
|
|
240
|
+
Japanese (日本語)
|
|
241
|
+
Chinese (中文)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
#### Step 8: Code Comment Language
|
|
247
|
+
|
|
248
|
+
Select the language for code comments.
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
❯ Code comment language: [↑↓] Navigate [Enter] Select
|
|
252
|
+
English
|
|
253
|
+
❯ Korean (한국어)
|
|
254
|
+
Japanese (日本語)
|
|
255
|
+
Chinese (中文)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
#### Step 9: Documentation Language
|
|
261
|
+
|
|
262
|
+
Select the language for documentation.
|
|
263
|
+
|
|
264
|
+
```text
|
|
265
|
+
❯ Documentation language: [↑↓] Navigate [Enter] Select
|
|
266
|
+
English
|
|
267
|
+
❯ Korean (한국어)
|
|
268
|
+
Japanese (日本語)
|
|
269
|
+
Chinese (中文)
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
> 💡 **Token Optimization Strategy**: Internal prompts for agent instructions are **fixed in English**.
|
|
273
|
+
>
|
|
274
|
+
> **Reason**: Non-English languages consume **12-20% additional tokens** in Claude. When infinite agent loops are frequent, this significantly impacts costs and weekly token limits, so MoAI fixes internal agent instructions in English and **provides user conversations only in the user's language**.
|
|
275
|
+
>
|
|
276
|
+
> This is MoAI's **effort to reduce token waste**.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
#### Step 10: TAG System Activation
|
|
281
|
+
|
|
282
|
+
🎯 TAG System: Code ↔ Documentation Tracking for TDD
|
|
283
|
+
|
|
284
|
+
The TAG system maintains traceability between code and SPEC documents
|
|
285
|
+
to support the TDD (Test-Driven Development) cycle.
|
|
286
|
+
|
|
287
|
+
TDD Purpose:
|
|
288
|
+
• RED (Write tests) → @SPEC SPEC-XXX verify
|
|
289
|
+
• GREEN (Implement code) → @SPEC SPEC-XXX impl
|
|
290
|
+
• REFACTOR (Improve) → @SPEC SPEC-XXX impl or related
|
|
291
|
+
|
|
292
|
+
Clearly tracks which SPEC each code file implements,
|
|
293
|
+
promoting documentation-driven development and maintaining quality.
|
|
294
|
+
|
|
295
|
+
💡 TAG activation is recommended. Maintains consistency between code and
|
|
296
|
+
documentation in the TDD cycle, improving quality and maintainability.
|
|
297
|
+
|
|
298
|
+
```text
|
|
299
|
+
? Enable TAG system? (TDD recommended) (Y/n)
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
**TAG Validation Mode Guide**
|
|
305
|
+
|
|
306
|
+
• warn: Warn during development (default, recommended)
|
|
307
|
+
• enforce: Block commit on missing TAG (strict quality control)
|
|
308
|
+
• off: Skip validation (not recommended)
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
❯ Select TAG validation mode: [↑↓] Navigate [Enter] Select
|
|
312
|
+
❯ warn (Warning) - Show warnings for missing TAGs only. Flexible during development
|
|
313
|
+
enforce (Enforce) - Block commits if TAGs are missing. Strict quality control
|
|
314
|
+
off (Off) - Skip TAG validation. Not recommended
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
#### Installation Complete
|
|
320
|
+
|
|
321
|
+
When all settings are complete, 5-phase installation runs automatically:
|
|
322
|
+
|
|
323
|
+
```text
|
|
324
|
+
🚀 Starting installation...
|
|
325
|
+
|
|
326
|
+
Phase 1: Preparation and backup... ████████████████ 100%
|
|
327
|
+
Phase 2: Creating directory structure... ████████████████ 100%
|
|
328
|
+
Phase 3: Installing resources... ████████████████ 100%
|
|
329
|
+
Phase 4: Generating configurations... ████████████████ 100%
|
|
330
|
+
Phase 5: Validation and finalization... ████████████████ 100%
|
|
331
|
+
|
|
332
|
+
✅ Initialization Completed Successfully!
|
|
333
|
+
────────────────────────────────────────────────────────────────
|
|
334
|
+
|
|
335
|
+
📊 Summary:
|
|
336
|
+
📁 Location: /path/to/my-project
|
|
337
|
+
🌐 Language: Auto-detect (use /moai:0-project)
|
|
338
|
+
🔀 Git: manual (github-flow, branch: manual)
|
|
339
|
+
🌍 Locale: ko
|
|
340
|
+
📄 Files: 47 created
|
|
341
|
+
⏱️ Duration: 1234ms
|
|
342
|
+
|
|
343
|
+
🚀 Next Steps:
|
|
344
|
+
1. Run cd my-project to enter the project
|
|
345
|
+
2. Run /moai:0-project in Claude Code for full setup
|
|
346
|
+
3. Start developing with MoAI-ADK!
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Add to Existing Project
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
cd your-existing-project
|
|
353
|
+
moai init .
|
|
354
|
+
# Existing files are preserved
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### 🔄 MoAI-ADK Update
|
|
360
|
+
|
|
361
|
+
Update existing projects to the latest version.
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
moai update
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**3-Phase Smart Update Workflow**:
|
|
368
|
+
|
|
369
|
+
```text
|
|
370
|
+
Stage 1: 📦 Package Version Check
|
|
371
|
+
└─ Check latest version from PyPI → Auto-upgrade if needed
|
|
372
|
+
|
|
373
|
+
Stage 2: 🔍 Config Version Comparison
|
|
374
|
+
└─ Compare package template vs project config
|
|
375
|
+
└─ Skip if same (70-80% performance improvement)
|
|
376
|
+
|
|
377
|
+
Stage 3: 📄 Template Synchronization
|
|
378
|
+
└─ Create backup → Update template → Restore user settings
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**Key Options**:
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# Check version only (no update)
|
|
385
|
+
moai update --check
|
|
386
|
+
|
|
387
|
+
# Synchronize templates only (skip package upgrade)
|
|
388
|
+
moai update --templates-only
|
|
389
|
+
|
|
390
|
+
# Config edit mode (re-run init wizard)
|
|
391
|
+
moai update --config
|
|
392
|
+
moai update -c
|
|
393
|
+
|
|
394
|
+
# Force update without backup
|
|
395
|
+
moai update --force
|
|
396
|
+
|
|
397
|
+
# All is well~ Auto mode (auto-approve all confirmations)
|
|
398
|
+
moai update --yes
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Merge Strategy Selection**:
|
|
402
|
+
|
|
403
|
+
```text
|
|
404
|
+
🔀 Choose merge strategy:
|
|
405
|
+
[1] Auto-merge (default)
|
|
406
|
+
→ Automatically preserve template + user changes
|
|
407
|
+
[2] Manual merge
|
|
408
|
+
→ Create backup + merge guide (direct control)
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# Force auto-merge (default)
|
|
413
|
+
moai update --merge
|
|
414
|
+
|
|
415
|
+
# Force manual merge
|
|
416
|
+
moai update --manual
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
**Automatically Preserved Items**:
|
|
420
|
+
|
|
421
|
+
| Item | Description |
|
|
422
|
+
| ------------------- | ------------------------------------------------- |
|
|
423
|
+
| **User Settings** | `.claude/settings.local.json` (MCP, GLM settings) |
|
|
424
|
+
| **Custom Agents** | User-created agents not in template |
|
|
425
|
+
| **Custom Commands** | User-defined slash commands |
|
|
426
|
+
| **Custom Skills** | User-defined skills |
|
|
427
|
+
| **Custom Hooks** | User-defined hook scripts |
|
|
428
|
+
| **SPEC Documents** | Entire `.moai/specs/` folder |
|
|
429
|
+
| **Reports** | Entire `.moai/reports/` folder |
|
|
430
|
+
|
|
431
|
+
> 💡 **Update Tip**: You can change language, API key, and Git settings anytime with `moai update -c`.
|
|
432
|
+
> It's recommended to create your commands, agents, skills, and hooks in folders other than moai.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 2. Project Documentation Generation (Optional)
|
|
437
|
+
|
|
438
|
+
For new or existing projects, you can automatically generate **project documentation to help Claude Code understand your project**:
|
|
439
|
+
|
|
440
|
+
```text
|
|
441
|
+
> /moai:0-project
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### 3 Generated Files
|
|
445
|
+
|
|
446
|
+
| File | Purpose | Key Content |
|
|
447
|
+
| ---------------------------- | ---------------------- | ------------------------------------------------------------------------------------------ |
|
|
448
|
+
| `.moai/project/product.md` | **Product Overview** | Project name/description, target users, core features, use cases |
|
|
449
|
+
| `.moai/project/structure.md` | **Structure Analysis** | Directory tree, main folder purposes, core file locations, module composition |
|
|
450
|
+
| `.moai/project/tech.md` | **Tech Stack** | Technologies used, framework selection reasons, dev environment, build/deployment settings |
|
|
451
|
+
|
|
452
|
+
### Why Do You Need This?
|
|
453
|
+
|
|
454
|
+
- **Context Provision**: Claude Code quickly grasps project context
|
|
455
|
+
- **Consistency Maintenance**: Share project understanding among team members
|
|
456
|
+
- **Onboarding Acceleration**: Reduce new developer project ramp-up time
|
|
457
|
+
- **AI Collaboration Optimization**: More accurate code suggestions and reviews
|
|
458
|
+
|
|
459
|
+
> 💡 **Tip**: Running `/moai:0-project` at project start or after structure changes updates documentation to the latest state.
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## 3. Core Commands Collection
|
|
464
|
+
|
|
465
|
+
### 🎯 `/moai:0-project` - Project Initialization
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
> /moai:0-project
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
Automatically analyzes your project's current state and configures the optimal development environment. Detects programming languages and frameworks, and automatically sets up Git workflows and quality assurance standards. Once all configuration is complete, you're ready to start development immediately.
|
|
472
|
+
|
|
473
|
+
**Tasks**:
|
|
474
|
+
|
|
475
|
+
- ✅ Project structure analysis
|
|
476
|
+
- ✅ Programming language/framework detection
|
|
477
|
+
- ✅ `.moai/config/config.yaml` creation
|
|
478
|
+
- ✅ Git workflow setup
|
|
479
|
+
- ✅ Session memory system configuration
|
|
480
|
+
- ✅ Quality assurance standards setup
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
### 📋 `/moai:1-plan` - SPEC Writing
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
> /moai:1-plan "feature description"
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Automatically generates unambiguous specifications using EARS format. Includes requirements definition, success criteria, and test scenarios to clearly present development direction. The generated SPEC serves as a single source of truth that the development team and AI share the same understanding.
|
|
491
|
+
|
|
492
|
+
**Auto-generated**:
|
|
493
|
+
|
|
494
|
+
- EARS format specification
|
|
495
|
+
- Requirements definition
|
|
496
|
+
- Success criteria
|
|
497
|
+
- Test scenarios
|
|
498
|
+
|
|
499
|
+
**Example**:
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
> /moai:1-plan "user profile page"
|
|
503
|
+
# → Creates SPEC-002
|
|
504
|
+
|
|
505
|
+
> /moai:1-plan "payment API"
|
|
506
|
+
# → Creates SPEC-003
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
**Important**: Must execute `> /clear` next
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
### 💻 `/moai:2-run` - TDD Implementation
|
|
514
|
+
|
|
515
|
+
```bash
|
|
516
|
+
> /moai:2-run SPEC-001
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
Through the Red-Green-Refactor cycle, writes tests first and implements code to pass them. All implementations must pass 85%+ test coverage, linting, type checking, and security checks. Automatically validates TRUST 5 quality principles to ensure only stable code is committed.
|
|
520
|
+
|
|
521
|
+
**Auto-executed**:
|
|
522
|
+
|
|
523
|
+
- 🔴 Write tests first (Red)
|
|
524
|
+
- 🟢 Pass tests with code (Green)
|
|
525
|
+
- 🔵 Refactor (Refactor)
|
|
526
|
+
- ✅ TRUST 5 validation
|
|
527
|
+
|
|
528
|
+
**Verification items**:
|
|
529
|
+
|
|
530
|
+
- Test coverage >= 85%
|
|
531
|
+
- Pass linting
|
|
532
|
+
- Pass type checking
|
|
533
|
+
- Pass security checks
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
### 📚 `/moai:3-sync` - Documentation Sync
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
> /clear # Always run clear before sync to reset session and run quality checks
|
|
541
|
+
> /moai:3-sync SPEC-001
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Performs quality verification followed by documentation synchronization, Git commits, and PR automation. Automatically generates API documentation, architecture diagrams, README, and CHANGELOG, keeping them up to date. Automatically commits changes and converts PRs from Draft to Ready in team mode.
|
|
545
|
+
|
|
546
|
+
**Auto-executed tasks**:
|
|
547
|
+
|
|
548
|
+
1. **Phase 1: Quality Verification**
|
|
549
|
+
- Run tests (pytest, jest, go test, etc.)
|
|
550
|
+
- Linter checks (ruff, eslint, golangci-lint, etc.)
|
|
551
|
+
- Type checkers (mypy, tsc, go vet, etc.)
|
|
552
|
+
- Code review (manager-quality)
|
|
553
|
+
|
|
554
|
+
2. **Phase 2-3: Documentation Sync**
|
|
555
|
+
- Auto-generate API documentation
|
|
556
|
+
- Update architecture diagrams
|
|
557
|
+
- Update README
|
|
558
|
+
- Sync SPEC documents
|
|
559
|
+
|
|
560
|
+
3. **Phase 4: Git Automation**
|
|
561
|
+
- Commit changes
|
|
562
|
+
- PR Draft → Ready conversion
|
|
563
|
+
- (Optional) Auto-merge
|
|
564
|
+
|
|
565
|
+
**Execution modes**:
|
|
566
|
+
|
|
567
|
+
- `auto` (default): Selective sync of changed files only
|
|
568
|
+
- `force`: Regenerate all documentation
|
|
569
|
+
- `status`: Perform status check only
|
|
570
|
+
- `project`: Sync entire project
|
|
571
|
+
|
|
572
|
+
**Details**: Refer to command file
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
### 🚀 `/moai:alfred` - Fully Autonomous Automation
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
> /moai:alfred "feature description"
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
User presents the goal and AI autonomously performs exploration, planning, implementation, and verification. Analyzes codebase through parallel exploration and self-corrects issues through autonomous loops. Automatically terminates when completion marker (`<moai>DONE</moai>`) is detected, so developer only needs to verify final result.
|
|
583
|
+
|
|
584
|
+
#### Concept and Workflow
|
|
585
|
+
|
|
586
|
+
```mermaid
|
|
587
|
+
flowchart TB
|
|
588
|
+
Start([User Request<br/>/moai:alfred 'feature description']) --> Phase0[Phase 0: Parallel Exploration]
|
|
589
|
+
|
|
590
|
+
Phase0 --> Explore[🔍 Explore Agent<br/>Analyze codebase structure]
|
|
591
|
+
Phase0 --> Research[📚 Research Agent<br/>Research technical docs]
|
|
592
|
+
Phase0 --> Quality[✅ Quality Agent<br/>Assess quality state]
|
|
593
|
+
|
|
594
|
+
Explore --> Phase1[Phase 1: SPEC Creation]
|
|
595
|
+
Research --> Phase1
|
|
596
|
+
Quality --> Phase1
|
|
597
|
+
|
|
598
|
+
Phase1 --> Spec[📋 EARS format SPEC doc<br/>Requirements specification]
|
|
599
|
+
|
|
600
|
+
Spec --> Phase2[Phase 2: TDD Implementation]
|
|
601
|
+
|
|
602
|
+
Phase2 --> Red[🔴 RED: Write failing test]
|
|
603
|
+
Red --> Green[🟢 GREEN: Minimal implementation]
|
|
604
|
+
Green --> Refactor[🔵 REFACTOR: Code improvement]
|
|
605
|
+
|
|
606
|
+
Refactor --> Check{Quality Check<br/>TRUST 5}
|
|
607
|
+
|
|
608
|
+
Check -->|Pass| Phase3[Phase 3: Documentation Sync]
|
|
609
|
+
Check -->|Fail| Loop[🔄 Autonomous Loop<br/>Auto-fix issues]
|
|
610
|
+
|
|
611
|
+
Loop --> Red
|
|
612
|
+
|
|
613
|
+
Phase3 --> Docs[📚 README, API docs<br/>Auto-update]
|
|
614
|
+
|
|
615
|
+
Docs --> Done{<moai>DONE</moai><br/>Completion marker detected}
|
|
616
|
+
|
|
617
|
+
Done -->|Yes| End([✅ Complete<br/>Deliver result only])
|
|
618
|
+
Done -->|No| Loop
|
|
619
|
+
|
|
620
|
+
style Phase0 fill:#e1f5fe
|
|
621
|
+
style Phase1 fill:#fff3e0
|
|
622
|
+
style Phase2 fill:#f3e5f5
|
|
623
|
+
style Phase3 fill:#e8f5e9
|
|
624
|
+
style Done fill:#c8e6c9
|
|
625
|
+
style End fill:#4caf50,color:#fff
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
#### Detailed Process
|
|
629
|
+
|
|
630
|
+
**Single Execution**:
|
|
631
|
+
|
|
632
|
+
1. **Phase 1: Parallel Exploration** (3-4x faster analysis)
|
|
633
|
+
- **Explore Agent**: Codebase structure, patterns, related files
|
|
634
|
+
- **Research Agent**: Technical docs, best practices
|
|
635
|
+
- **Quality Agent**: Current quality state, potential issues
|
|
636
|
+
|
|
637
|
+
2. **Phase 2: SPEC Creation** (EARS format)
|
|
638
|
+
- Clear requirement definitions
|
|
639
|
+
- Acceptance criteria specification
|
|
640
|
+
- User story writing
|
|
641
|
+
|
|
642
|
+
3. **Phase 3: TDD Implementation** (Autonomous loop)
|
|
643
|
+
- **RED**: Write failing test first
|
|
644
|
+
- **GREEN**: Minimal implementation to pass test
|
|
645
|
+
- **REFACTOR**: Improve code quality
|
|
646
|
+
- **Loop**: Auto-fix if quality check fails
|
|
647
|
+
|
|
648
|
+
4. **Phase 4: Documentation Sync**
|
|
649
|
+
- README, API docs auto-update
|
|
650
|
+
- CHANGELOG auto-generation
|
|
651
|
+
- User guide update
|
|
652
|
+
|
|
653
|
+
#### When to use?
|
|
654
|
+
|
|
655
|
+
| Situation | Description | Example |
|
|
656
|
+
| ------------------------ | ---------------------------------------- | ------------------------------- |
|
|
657
|
+
| **New feature development** | AI handles everything from start to finish | "Add JWT authentication system" |
|
|
658
|
+
| **Complex refactoring** | Large changes affecting multiple files | "Database layer restructure" |
|
|
659
|
+
| **Bug fixing** | Automate from root cause analysis to fix | "Fix login failure bug" |
|
|
660
|
+
| **SPEC-based development** | Implement features with SPEC documents | `/moai:alfred SPEC-AUTH-001` |
|
|
661
|
+
|
|
662
|
+
**Options**:
|
|
663
|
+
|
|
664
|
+
- `--loop`: Enable autonomous iterative fixes (AI self-resolves issues)
|
|
665
|
+
- `--max N`: Specify max iterations (default: 100)
|
|
666
|
+
- `--sequential` / `--seq`: Sequential exploration (for debugging) - parallel is default
|
|
667
|
+
- `--branch`: Auto-create feature branch
|
|
668
|
+
- `--pr`: Create Pull Request after completion
|
|
669
|
+
- `--resume SPEC`: Resume work
|
|
670
|
+
|
|
671
|
+
> **Performance**: Parallel exploration is now the default, providing 3-4x faster analysis. Use `--sequential` only for debugging.
|
|
672
|
+
|
|
673
|
+
**Example**:
|
|
674
|
+
|
|
675
|
+
```bash
|
|
676
|
+
# Basic autonomous execution (parallel by default)
|
|
677
|
+
> /moai:alfred "Add JWT authentication"
|
|
678
|
+
|
|
679
|
+
# Auto loop with sequential exploration (for debugging)
|
|
680
|
+
> /moai:alfred "JWT authentication" --loop --seq
|
|
681
|
+
|
|
682
|
+
# Resume
|
|
683
|
+
> /moai:alfred resume SPEC-AUTH-001
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
688
|
+
### 🔁 `/moai:loop` - Autonomous Iterative Fixing
|
|
689
|
+
|
|
690
|
+
```bash
|
|
691
|
+
> /moai:loop
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
AI autonomously diagnoses and fixes LSP errors, test failures, and coverage deficiencies. Parallel diagnosis executes LSP, AST-grep, Tests, and Coverage simultaneously, resolving issues 3-4x faster. Runs autonomously until completion marker is detected or max iterations reached.
|
|
695
|
+
|
|
696
|
+
#### Concept and Workflow
|
|
697
|
+
|
|
698
|
+
```mermaid
|
|
699
|
+
flowchart TB
|
|
700
|
+
Start([User Request<br/>/moai:loop]) --> Parallel[Parallel Diagnosis]
|
|
701
|
+
|
|
702
|
+
Parallel --> LSP[LSP Diagnosis<br/>Type errors, not found]
|
|
703
|
+
Parallel --> AST[AST-grep<br/>Pattern check, security]
|
|
704
|
+
Parallel --> Tests[Test Execution<br/>Unit, integration]
|
|
705
|
+
Parallel --> Coverage[Coverage<br/>85% target]
|
|
706
|
+
|
|
707
|
+
LSP --> Collect[Issue Collection]
|
|
708
|
+
AST --> Collect
|
|
709
|
+
Tests --> Collect
|
|
710
|
+
Coverage --> Collect
|
|
711
|
+
|
|
712
|
+
Collect --> HasIssues{Has Issues?}
|
|
713
|
+
|
|
714
|
+
HasIssues -->|No| Done[<moai>DONE</moai><br/>Completion marker]
|
|
715
|
+
HasIssues -->|Yes| CreateTODO[TODO Creation<br/>Priority sorted]
|
|
716
|
+
|
|
717
|
+
CreateTODO --> Process[Sequential Processing]
|
|
718
|
+
|
|
719
|
+
Process --> Fix1[Level 1: Immediate fix<br/>Import sort, whitespace]
|
|
720
|
+
Process --> Fix2[Level 2: Safe fix<br/>Variable name, type]
|
|
721
|
+
Process --> Fix3[Level 3: Approval fix<br/>Logic change]
|
|
722
|
+
|
|
723
|
+
Fix1 --> Validate[Verification]
|
|
724
|
+
Fix2 --> Validate
|
|
725
|
+
Fix3 --> Validate
|
|
726
|
+
|
|
727
|
+
Validate --> ReCheck{Diagnose again?}
|
|
728
|
+
|
|
729
|
+
ReCheck -->|Yes| Parallel
|
|
730
|
+
ReCheck -->|No| MaxIter{Max iteration<br/>100 reached?}
|
|
731
|
+
|
|
732
|
+
MaxIter -->|No| Parallel
|
|
733
|
+
MaxIter -->|Yes| Snapshot[Snapshot saved<br/>Can resume later]
|
|
734
|
+
|
|
735
|
+
Done --> End([✅ Complete])
|
|
736
|
+
Snapshot --> End([⏸️ Paused])
|
|
737
|
+
|
|
738
|
+
style Parallel fill:#e1f5fe
|
|
739
|
+
style Collect fill:#fff3e0
|
|
740
|
+
style Process fill:#f3e5f5
|
|
741
|
+
style Validate fill:#e8f5e9
|
|
742
|
+
style Done fill:#c8e6c9
|
|
743
|
+
style End fill:#4caf50,color:#fff
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
#### Parallel Diagnosis Details
|
|
747
|
+
|
|
748
|
+
**Parallel diagnosis** (3.75x faster):
|
|
749
|
+
|
|
750
|
+
```mermaid
|
|
751
|
+
flowchart TB
|
|
752
|
+
Start([Parallel diagnosis start]) --> Parallel
|
|
753
|
+
|
|
754
|
+
subgraph Parallel[Concurrent execution]
|
|
755
|
+
direction TB
|
|
756
|
+
LSP[LSP diagnosis]
|
|
757
|
+
AST[AST-grep inspection]
|
|
758
|
+
TESTS[Test execution]
|
|
759
|
+
COVERAGE[Coverage check]
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
LSP --> Collect[Issue integration and priority<br/>Level 1 → 2 → 3 order]
|
|
763
|
+
AST --> Collect
|
|
764
|
+
TESTS --> Collect
|
|
765
|
+
COVERAGE --> Collect
|
|
766
|
+
|
|
767
|
+
style Start fill:#e3f2fd
|
|
768
|
+
style Parallel fill:#f3f4f6
|
|
769
|
+
style LSP fill:#fff9c4
|
|
770
|
+
style AST fill:#ffccbc
|
|
771
|
+
style TESTS fill:#c8e6c9
|
|
772
|
+
style COVERAGE fill:#b2dfdb
|
|
773
|
+
style Collect fill:#e1bee7
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
#### 📖 What is AST-grep?
|
|
777
|
+
|
|
778
|
+
> **"grep finds text, but AST-grep finds code structure."**
|
|
779
|
+
|
|
780
|
+
**Concept**:
|
|
781
|
+
|
|
782
|
+
AST-grep is a **structural code inspection tool**. Unlike normal grep or regex that searches for text, AST-grep analyzes the **Abstract Syntax Tree (AST)** of code to inspect code **structure and patterns**.
|
|
783
|
+
|
|
784
|
+
**Text search vs Structure search**:
|
|
785
|
+
|
|
786
|
+
| Feature | grep/regex | AST-grep |
|
|
787
|
+
| ------------ | ----------------------------- | ------------------- |
|
|
788
|
+
| Search target| Text strings | Code structure (AST)|
|
|
789
|
+
| Example | `print("hello")` | `print(__)` |
|
|
790
|
+
| Meaning | Find "print" characters | Find print function call pattern |
|
|
791
|
+
| Space sensitive? | Yes (whitespace, indent matters) | No (structure only) |
|
|
792
|
+
| Variable distinguish | Hard (e.g., `x=1`, `y=1` are different) | Possible (all variable assignment patterns) |
|
|
793
|
+
|
|
794
|
+
**How it works**:
|
|
795
|
+
|
|
796
|
+
```mermaid
|
|
797
|
+
flowchart LR
|
|
798
|
+
Source[Source code<br/>def foo x:<br/> return x + 1] --> AST[AST analysis]
|
|
799
|
+
|
|
800
|
+
AST --> |transform| Tree[Abstract syntax tree<br/>Function<br/> Call<br/>]
|
|
801
|
+
|
|
802
|
+
Tree --> Pattern[Pattern matching]
|
|
803
|
+
|
|
804
|
+
Pattern --> Result1[✓ Function definition]
|
|
805
|
+
Pattern --> Result2[✓ Return statement]
|
|
806
|
+
Pattern --> Result3[✓ Addition operation]
|
|
807
|
+
|
|
808
|
+
style Source fill:#e3f2fd
|
|
809
|
+
style AST fill:#fff3e0
|
|
810
|
+
style Tree fill:#f3e5f5
|
|
811
|
+
style Pattern fill:#e8f5e9
|
|
812
|
+
style Result1 fill:#c8e6c9
|
|
813
|
+
style Result2 fill:#c8e6c9
|
|
814
|
+
style Result3 fill:#c8e6c9
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
**What AST-grep detects**:
|
|
818
|
+
|
|
819
|
+
1. **Security vulnerabilities**
|
|
820
|
+
- SQL injection patterns: `execute(f"SELECT * FROM users WHERE id={user_input}")`
|
|
821
|
+
- Hardcoded passwords: `password = "123456"`
|
|
822
|
+
- Unsafe function usage: `eval(user_input)`
|
|
823
|
+
|
|
824
|
+
2. **Code smells**
|
|
825
|
+
- Duplicate code: Repetition of similar structures
|
|
826
|
+
- Long functions: Too much complexity
|
|
827
|
+
- Magic numbers: `if x == 42` (meaningless numbers)
|
|
828
|
+
|
|
829
|
+
3. **Anti-patterns**
|
|
830
|
+
- Empty except blocks: `except: pass`
|
|
831
|
+
- Global variable modification
|
|
832
|
+
- Circular dependencies
|
|
833
|
+
|
|
834
|
+
4. **Best practice violations**
|
|
835
|
+
- Missing type hints
|
|
836
|
+
- Missing documentation
|
|
837
|
+
- Missing error handling
|
|
838
|
+
|
|
839
|
+
**Example scenario**:
|
|
840
|
+
|
|
841
|
+
```python
|
|
842
|
+
# Example code where AST-grep finds problems
|
|
843
|
+
def process_user_input(user_input):
|
|
844
|
+
# ⚠️ Warning: eval usage (security vulnerability)
|
|
845
|
+
result = eval(user_input)
|
|
846
|
+
|
|
847
|
+
# ⚠️ Warning: empty except (anti-pattern)
|
|
848
|
+
try:
|
|
849
|
+
save_to_database(result)
|
|
850
|
+
except:
|
|
851
|
+
pass
|
|
852
|
+
|
|
853
|
+
# ⚠️ Warning: magic number (code smell)
|
|
854
|
+
if result > 42:
|
|
855
|
+
return True
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
**Why is it important?**
|
|
859
|
+
|
|
860
|
+
- **Accuracy**: Understands code meaning, so fewer false positives
|
|
861
|
+
- **40 language support**: Works on Python, TypeScript, Go, Rust, Java, etc.
|
|
862
|
+
- **Auto-fix possible**: Not just finds patterns, but generates fix suggestions
|
|
863
|
+
- **Security enhancement**: Automatically detects security vulnerabilities like OWASP Top 10
|
|
864
|
+
|
|
865
|
+
**Usage in MoAI-ADK**:
|
|
866
|
+
|
|
867
|
+
In `/moai:loop` and `/moai:fix` commands, AST-grep operates as a core component of parallel diagnosis:
|
|
868
|
+
|
|
869
|
+
- **LSP**: Type errors, find definitions
|
|
870
|
+
- **AST-grep**: Structural patterns, security vulnerabilities ← **This is our focus!**
|
|
871
|
+
- **Tests**: Test failures
|
|
872
|
+
- **Coverage**: Coverage deficiency
|
|
873
|
+
|
|
874
|
+
These four run **simultaneously** to diagnose code quality 3.75x faster.
|
|
875
|
+
|
|
876
|
+
---
|
|
877
|
+
|
|
878
|
+
#### Detailed Process
|
|
879
|
+
|
|
880
|
+
**Autonomous loop flow**:
|
|
881
|
+
|
|
882
|
+
1. **Parallel diagnosis** (concurrent execution)
|
|
883
|
+
- **LSP**: Type errors, definitions not found, potential bugs
|
|
884
|
+
- **AST-grep**: Code pattern check, security vulnerabilities
|
|
885
|
+
- **Tests**: Unit tests, integration tests
|
|
886
|
+
- **Coverage**: 85% coverage target achievement
|
|
887
|
+
|
|
888
|
+
2. **TODO creation** (by priority)
|
|
889
|
+
- Level 1: Immediate fix (import sort, whitespace, formatting)
|
|
890
|
+
- Level 2: Safe fix (variable names, type addition)
|
|
891
|
+
- Level 3: Approval fix (logic change, API modification)
|
|
892
|
+
- Level 4: Manual needed (security, architecture)
|
|
893
|
+
|
|
894
|
+
3. **Sequential fixing**
|
|
895
|
+
- Process TODO items one by one
|
|
896
|
+
- Verify after each fix
|
|
897
|
+
- Re-diagnose on failure
|
|
898
|
+
|
|
899
|
+
4. **Repeat or complete**
|
|
900
|
+
- `<moai>DONE</moai>` marker when all issues resolved
|
|
901
|
+
- Save snapshot after max 100 iterations
|
|
902
|
+
|
|
903
|
+
#### When to use?
|
|
904
|
+
|
|
905
|
+
| Situation | Description | Example |
|
|
906
|
+
| ------------------------ | ---------------------------------------- | ------------------------------------ |
|
|
907
|
+
| **Quality after implementation** | Automatically improve quality after coding | Run `/moai:loop` after feature implementation |
|
|
908
|
+
| **Test failure fix** | Automatically analyze and fix test failures | Run after test execution on failure |
|
|
909
|
+
| **Coverage improvement** | Automatically achieve 85% target | After writing new code |
|
|
910
|
+
| **Refactoring** | Continuously improve code quality | Periodic execution for maintenance |
|
|
911
|
+
|
|
912
|
+
**Options**:
|
|
913
|
+
|
|
914
|
+
- `--max N`: Maximum iterations (default: 100)
|
|
915
|
+
- `--auto`: Enable auto-fix (Level 1-3)
|
|
916
|
+
- `--sequential` / `--seq`: Sequential diagnosis (for debugging) - parallel is default
|
|
917
|
+
- `--errors`: Fix errors only
|
|
918
|
+
- `--coverage`: Include coverage (100% target)
|
|
919
|
+
- `--resume ID`: Restore snapshot
|
|
920
|
+
|
|
921
|
+
> **Performance**: Parallel diagnosis is now the default, executing LSP, AST-grep, Tests, and Coverage simultaneously (3.75x faster).
|
|
922
|
+
|
|
923
|
+
**Example**:
|
|
924
|
+
|
|
925
|
+
```bash
|
|
926
|
+
# Basic autonomous loop (parallel by default)
|
|
927
|
+
> /moai:loop
|
|
928
|
+
|
|
929
|
+
# Sequential + auto-fix (for debugging)
|
|
930
|
+
> /moai:loop --seq --auto
|
|
931
|
+
|
|
932
|
+
# Max 50 iterations
|
|
933
|
+
> /moai:loop --max 50
|
|
934
|
+
|
|
935
|
+
# Restore snapshot
|
|
936
|
+
> /moai:loop --resume latest
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
---
|
|
940
|
+
|
|
941
|
+
### 🔧 `/moai:fix` - One-Shot Auto Fix
|
|
942
|
+
|
|
943
|
+
```bash
|
|
944
|
+
> /moai:fix
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
Scans LSP errors and linting issues in parallel and fixes them at once. Level 1-2 fixes immediately, Level 3 fixes after user approval, Level 4 reports as requiring manual fix. Use `--dry` option to preview before applying actual fixes.
|
|
948
|
+
|
|
949
|
+
#### Concept and Workflow
|
|
950
|
+
|
|
951
|
+
```mermaid
|
|
952
|
+
flowchart
|
|
953
|
+
Start([User Request<br/>/moai:fix]) --> Dry{--dry mode?}
|
|
954
|
+
|
|
955
|
+
Dry -->|Yes| ScanOnly[Scan only<br/>No fixes]
|
|
956
|
+
Dry -->|No| Scan[Parallel scan]
|
|
957
|
+
|
|
958
|
+
Scan --> LSP[LSP diagnosis<br/>Type, definition errors]
|
|
959
|
+
Scan --> AST[AST-grep<br/>Patterns, security]
|
|
960
|
+
Scan --> Linter[Linter<br/>Style, format]
|
|
961
|
+
|
|
962
|
+
LSP --> Collect[Issue collection]
|
|
963
|
+
AST --> Collect
|
|
964
|
+
Linter --> Collect
|
|
965
|
+
|
|
966
|
+
ScanOnly --> Report[Report output<br/>Expected fix content]
|
|
967
|
+
|
|
968
|
+
Collect --> Categorize[Level classification]
|
|
969
|
+
|
|
970
|
+
Categorize --> L1[Level 1<br/>Immediate fix]
|
|
971
|
+
Categorize --> L2[Level 2<br/>Safe fix]
|
|
972
|
+
Categorize --> L3[Level 3<br/>Approval needed]
|
|
973
|
+
Categorize --> L4[Level 4<br/>Manual needed]
|
|
974
|
+
|
|
975
|
+
L1 --> AutoFix1[Auto fix]
|
|
976
|
+
L2 --> AutoFix2[Auto fix+log]
|
|
977
|
+
L3 --> Approve{User approval?}
|
|
978
|
+
|
|
979
|
+
Approve -->|Yes| AutoFix3[Execute fix]
|
|
980
|
+
Approve -->|No| Skip[Skip]
|
|
981
|
+
|
|
982
|
+
L4 --> Manual[Report manual fix needed]
|
|
983
|
+
|
|
984
|
+
AutoFix1 --> Validate[Verification]
|
|
985
|
+
AutoFix2 --> Validate
|
|
986
|
+
AutoFix3 --> Validate
|
|
987
|
+
Skip --> Validate
|
|
988
|
+
|
|
989
|
+
Validate --> Results[Result summary]
|
|
990
|
+
|
|
991
|
+
Manual --> Results
|
|
992
|
+
Report --> End([✅ Complete])
|
|
993
|
+
Results --> End
|
|
994
|
+
|
|
995
|
+
style Scan fill:#e1f5fe
|
|
996
|
+
style Collect fill:#fff3e0
|
|
997
|
+
style AutoFix1 fill:#c8e6c9
|
|
998
|
+
style AutoFix2 fill:#c8e6c9
|
|
999
|
+
style AutoFix3 fill:#fff9c4
|
|
1000
|
+
style Manual fill:#ffccbc
|
|
1001
|
+
style End fill:#4caf50,color:#fff
|
|
1002
|
+
```
|
|
1003
|
+
|
|
1004
|
+
#### Parallel Scan Details
|
|
1005
|
+
|
|
1006
|
+
**Parallel scan** (3.75x faster):
|
|
1007
|
+
|
|
1008
|
+
```mermaid
|
|
1009
|
+
flowchart TB
|
|
1010
|
+
Start([Parallel scan start]) --> Parallel
|
|
1011
|
+
|
|
1012
|
+
subgraph Parallel[Concurrent execution]
|
|
1013
|
+
direction TB
|
|
1014
|
+
LSP[LSP diagnosis]
|
|
1015
|
+
AST[AST-grep inspection]
|
|
1016
|
+
Linter[Linter inspection]
|
|
1017
|
+
end
|
|
1018
|
+
|
|
1019
|
+
LSP --> Collect[Issue integration and level classification<br/>Level 1 → 2 → 3 → 4]
|
|
1020
|
+
AST --> Collect
|
|
1021
|
+
Linter --> Collect
|
|
1022
|
+
|
|
1023
|
+
style Start fill:#e3f2fd
|
|
1024
|
+
style Parallel fill:#f3f4f6
|
|
1025
|
+
style LSP fill:#fff9c4
|
|
1026
|
+
style AST fill:#ffccbc
|
|
1027
|
+
style Linter fill:#c8e6c9
|
|
1028
|
+
style Collect fill:#e1bee7
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
#### Detailed Process
|
|
1032
|
+
|
|
1033
|
+
**Fix level processing**:
|
|
1034
|
+
|
|
1035
|
+
| Level | Description | Risk | Approval | Auto | Example |
|
|
1036
|
+
| ----- | --------------- | ------- | -------- | ------ | ------------------------------- |
|
|
1037
|
+
| 1 | Immediate fix | Low | Not needed | ✅ | import sorting, whitespace |
|
|
1038
|
+
| 2 | Safe fix | Low | Log only | ✅ | variable names, type addition |
|
|
1039
|
+
| 3 | Approval needed | Medium | Needed | ⚠️ | logic changes, API modification |
|
|
1040
|
+
| 4 | Manual needed | High | Impossible | ❌ | security, architecture |
|
|
1041
|
+
|
|
1042
|
+
**One-time execution process**:
|
|
1043
|
+
|
|
1044
|
+
1. **Parallel scan** (concurrent execution)
|
|
1045
|
+
- **LSP**: Type errors, definitions not found, serious bugs
|
|
1046
|
+
- **AST-grep**: Code patterns, security vulnerabilities
|
|
1047
|
+
- **Linter**: Style, formatting, naming
|
|
1048
|
+
|
|
1049
|
+
2. **Issue collection and classification**
|
|
1050
|
+
- Classify all issues by level
|
|
1051
|
+
- Priority: Level 1 → 2 → 3 → 4
|
|
1052
|
+
|
|
1053
|
+
3. **Batch fix** (execute at once)
|
|
1054
|
+
- Level 1-2: Auto-fix immediately
|
|
1055
|
+
- Level 3: Fix after user approval
|
|
1056
|
+
- Level 4: Report manual fix needed
|
|
1057
|
+
|
|
1058
|
+
4. **Verification and results**
|
|
1059
|
+
- Run tests after fixes
|
|
1060
|
+
- Report summary of changes
|
|
1061
|
+
|
|
1062
|
+
#### When to use?
|
|
1063
|
+
|
|
1064
|
+
| Situation | Description | Example |
|
|
1065
|
+
| ------------------------ | ---------------------------------------- | ------------------------------------ |
|
|
1066
|
+
| **Clean up after coding** | Clean up style, formatting all at once | Run `/moai:fix` after coding |
|
|
1067
|
+
| **Pre-commit inspection** | Resolve LSP errors, linting in advance | Run before `git commit` |
|
|
1068
|
+
| **Quick fix** | Solve at once without repetitive fixes | When fixing simple issues |
|
|
1069
|
+
| **Preview confirmation** | Check fix content before applying | Run `/moai:fix --dry` |
|
|
1070
|
+
|
|
1071
|
+
#### `/moai:fix` vs `/moai:loop` Selection Guide
|
|
1072
|
+
|
|
1073
|
+
```mermaid
|
|
1074
|
+
flowchart
|
|
1075
|
+
Start([Code quality issue occurred]) --> Question{Need repetitive<br/>fixing?}
|
|
1076
|
+
|
|
1077
|
+
Question -->|Yes| Loop[🔄 /moai:loop<br/>Autonomous iterative fixing]
|
|
1078
|
+
Question -->|No| Fix{Can solve<br/>at once?}
|
|
1079
|
+
|
|
1080
|
+
Fix -->|Yes| FixCmd[🔧 /moai:fix<br/>One-shot auto fix]
|
|
1081
|
+
Fix -->|No| Loop
|
|
1082
|
+
|
|
1083
|
+
Loop --> LoopDesc[Complex issues<br/>Multiple files affected<br/>Repeated test failures]
|
|
1084
|
+
FixCmd --> FixDesc[Simple issues<br/>Style, format<br/>LSP errors]
|
|
1085
|
+
|
|
1086
|
+
LoopDesc --> When1[Usage timing:<br/>Quality after implementation]
|
|
1087
|
+
FixDesc --> When2[Usage timing:<br/>Quick clean up before commit]
|
|
1088
|
+
|
|
1089
|
+
style Loop fill:#f3e5f5
|
|
1090
|
+
style FixCmd fill:#e8f5e9
|
|
1091
|
+
style LoopDesc fill:#fff3e0
|
|
1092
|
+
style FixDesc fill:#e1f5fe
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
**Fix levels**:
|
|
1096
|
+
|
|
1097
|
+
| Level | Description | Approval | Example |
|
|
1098
|
+
| ----- | --------------- | ---------- | ------------------------------- |
|
|
1099
|
+
| 1 | Immediate fix | Not needed | import sorting, whitespace |
|
|
1100
|
+
| 2 | Safe fix | Log only | variable names, type addition |
|
|
1101
|
+
| 3 | Approval needed | Needed | logic changes, API modification |
|
|
1102
|
+
| 4 | Manual needed | Impossible | security, architecture |
|
|
1103
|
+
|
|
1104
|
+
**Options**:
|
|
1105
|
+
|
|
1106
|
+
- `--dry`: Preview only (no actual fixes)
|
|
1107
|
+
- `--sequential` / `--seq`: Sequential scan (for debugging) - parallel is default
|
|
1108
|
+
- `--level N`: Max fix level (default: 3)
|
|
1109
|
+
- `--errors`: Fix errors only
|
|
1110
|
+
- `--security`: Include security check
|
|
1111
|
+
- `--no-fmt`: Skip formatting
|
|
1112
|
+
|
|
1113
|
+
> **Performance**: Parallel scan is now the default, combining LSP, AST-grep, and Linter results simultaneously (3.75x faster).
|
|
1114
|
+
|
|
1115
|
+
**Example**:
|
|
1116
|
+
|
|
1117
|
+
```bash
|
|
1118
|
+
# Basic fix (parallel by default)
|
|
1119
|
+
> /moai:fix
|
|
1120
|
+
|
|
1121
|
+
# Sequential scan (for debugging)
|
|
1122
|
+
> /moai:fix --seq
|
|
1123
|
+
|
|
1124
|
+
# Preview
|
|
1125
|
+
> /moai:fix --dry
|
|
1126
|
+
|
|
1127
|
+
# Specific files
|
|
1128
|
+
> /moai:fix src/auth.py
|
|
1129
|
+
```
|
|
1130
|
+
|
|
1131
|
+
---
|
|
1132
|
+
|
|
1133
|
+
### ⏹️ `/moai:cancel-loop` - Cancel Loop
|
|
1134
|
+
|
|
1135
|
+
```bash
|
|
1136
|
+
> /moai:cancel-loop
|
|
1137
|
+
```
|
|
1138
|
+
|
|
1139
|
+
Safely cancels running autonomous loop and saves all progress state as snapshot. On cancel, TODO status, fix history, and iteration count are all preserved for later resumption. Use `--list` option to view previous snapshots and restore to specific point.
|
|
1140
|
+
|
|
1141
|
+
**Options**:
|
|
1142
|
+
|
|
1143
|
+
- `--force`: Cancel without confirmation
|
|
1144
|
+
- `--snapshot`: Save snapshot
|
|
1145
|
+
- `--keep`: Preserve state file
|
|
1146
|
+
- `--reason TEXT`: Record cancellation reason
|
|
1147
|
+
- `--list`: List snapshots
|
|
1148
|
+
|
|
1149
|
+
**Restore**:
|
|
1150
|
+
|
|
1151
|
+
```bash
|
|
1152
|
+
# Restore latest snapshot
|
|
1153
|
+
> /moai:loop --resume latest
|
|
1154
|
+
|
|
1155
|
+
# Restore specific snapshot
|
|
1156
|
+
> /moai:loop --resume cancel-20240111-105230
|
|
1157
|
+
```
|
|
1158
|
+
|
|
1159
|
+
**Example**:
|
|
1160
|
+
|
|
1161
|
+
```bash
|
|
1162
|
+
# Basic cancel (after confirmation)
|
|
1163
|
+
> /moai:cancel-loop
|
|
1164
|
+
|
|
1165
|
+
# Force cancel
|
|
1166
|
+
> /moai:cancel-loop --force
|
|
1167
|
+
|
|
1168
|
+
# Save snapshot
|
|
1169
|
+
> /moai:cancel-loop --snapshot
|
|
1170
|
+
|
|
1171
|
+
# List snapshots
|
|
1172
|
+
> /moai:cancel-loop --list
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
**Actual Output Result**:
|
|
1176
|
+
|
|
1177
|
+
```text
|
|
1178
|
+
|
|
1179
|
+
⏺ ✅ Loop Cancel Complete
|
|
1180
|
+
|
|
1181
|
+
Status Report
|
|
1182
|
+
|
|
1183
|
+
═══════════════════════════════════════════════════════
|
|
1184
|
+
Loop: Cancelled (No Active Loop)
|
|
1185
|
+
═══════════════════════════════════════════════════════
|
|
1186
|
+
|
|
1187
|
+
### Status
|
|
1188
|
+
- Running loop: None
|
|
1189
|
+
- Completed tasks: 100%
|
|
1190
|
+
- Remaining TODO: 0
|
|
1191
|
+
|
|
1192
|
+
### Completed Tasks
|
|
1193
|
+
✅ README.ko.md "3. 핵심 명령어 모음" 섹션 업데이트
|
|
1194
|
+
✅ Fenced code blocks 언어 지정 추가 (MD040) - 9건
|
|
1195
|
+
✅ Emphasis → Heading 변경 (MD036) - 2건
|
|
1196
|
+
✅ Table column style 수정 (MD060) - 2건
|
|
1197
|
+
|
|
1198
|
+
### Changes Summary
|
|
1199
|
+
- 명령어 개수: 4개 → 8개 (loop, fix, cancel-loop 추가)
|
|
1200
|
+
- 설명 스타일: 간단 목록 → 3문장 이상 상세 설명
|
|
1201
|
+
- Markdown linting: 13건 이슈 → 0건
|
|
1202
|
+
|
|
1203
|
+
═══════════════════════════════════════════════════════
|
|
1204
|
+
|
|
1205
|
+
Final File Status
|
|
1206
|
+
|
|
1207
|
+
README.ko.md:
|
|
1208
|
+
- 모든 markdown linting 이슈 해결
|
|
1209
|
+
- 8개 핵심 명령어 상세 설명 완료
|
|
1210
|
+
- 표준 markdown 형식 준수
|
|
1211
|
+
|
|
1212
|
+
---
|
|
1213
|
+
모든 작업이 성공적으로 완료되었습니다! 🎉
|
|
1214
|
+
```
|
|
1215
|
+
|
|
1216
|
+
---
|
|
1217
|
+
|
|
1218
|
+
## 4. 🤖 All is Well - Agentic Autonomous Automation
|
|
1219
|
+
|
|
1220
|
+
**The most powerful feature of MoAI-ADK**: AI autonomously explores, plans, implements, and verifies until the completion marker is detected.
|
|
1221
|
+
|
|
1222
|
+
### Core Concept
|
|
1223
|
+
|
|
1224
|
+
```text
|
|
1225
|
+
User: "Add authentication feature"
|
|
1226
|
+
↓
|
|
1227
|
+
AI: Explore → Plan → Implement → Verify → Repeat
|
|
1228
|
+
↓
|
|
1229
|
+
AI: All issues resolved
|
|
1230
|
+
↓
|
|
1231
|
+
AI: <moai>DONE</moai> ← Completion Marker
|
|
1232
|
+
```
|
|
1233
|
+
|
|
1234
|
+
### Three-Command Hierarchy
|
|
1235
|
+
|
|
1236
|
+
MoAI-ADK provides three levels of autonomous automation:
|
|
1237
|
+
|
|
1238
|
+
| Command | Scope | Iteration | Purpose |
|
|
1239
|
+
|---------|-------|-----------|---------|
|
|
1240
|
+
| `/moai:fix` | Code fixes only | 1 time | Single scan + auto-fix |
|
|
1241
|
+
| `/moai:loop` | Code fixes | Until marker/max | Autonomous iterative fixing |
|
|
1242
|
+
| `/moai:alfred` | Full dev cycle | Until marker/max | Goal → SPEC → Implement → Docs |
|
|
1243
|
+
|
|
1244
|
+
### Command Chain Relationship
|
|
1245
|
+
|
|
1246
|
+
```text
|
|
1247
|
+
/moai:alfred (Full Automation)
|
|
1248
|
+
│
|
|
1249
|
+
├── Phase 0: Parallel Exploration
|
|
1250
|
+
├── Phase 1: SPEC Generation
|
|
1251
|
+
├── Phase 2: Implementation ←─┬── /moai:loop (Iterative)
|
|
1252
|
+
│ │ │
|
|
1253
|
+
│ │ └── /moai:fix (Single)
|
|
1254
|
+
└── Phase 3: Documentation
|
|
1255
|
+
```
|
|
1256
|
+
|
|
1257
|
+
### Completion Markers
|
|
1258
|
+
|
|
1259
|
+
AI uses completion markers to signal task completion:
|
|
1260
|
+
|
|
1261
|
+
```markdown
|
|
1262
|
+
## Task Complete
|
|
1263
|
+
|
|
1264
|
+
All implementations done, tests passing, docs updated. <moai>DONE</moai>
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1267
|
+
**Supported Markers**:
|
|
1268
|
+
- `<moai>DONE</moai>` - Task complete
|
|
1269
|
+
- `<moai>COMPLETE</moai>` - Full completion
|
|
1270
|
+
- `<moai:done />` - XML format
|
|
1271
|
+
|
|
1272
|
+
### Auto-Fix Levels
|
|
1273
|
+
|
|
1274
|
+
| Level | Description | Approval | Examples |
|
|
1275
|
+
|-------|-------------|----------|----------|
|
|
1276
|
+
| 1 | Immediate fix | Not required | import sorting, whitespace |
|
|
1277
|
+
| 2 | Safe fix | Log only | variable rename, type hints |
|
|
1278
|
+
| 3 | Approval needed | Required | logic changes, API modifications |
|
|
1279
|
+
| 4 | Manual required | Cannot auto | security, architecture |
|
|
1280
|
+
|
|
1281
|
+
### Quick Start Examples
|
|
1282
|
+
|
|
1283
|
+
```bash
|
|
1284
|
+
# Single scan and fix (parallel by default)
|
|
1285
|
+
> /moai:fix
|
|
1286
|
+
|
|
1287
|
+
# Autonomous loop until resolved
|
|
1288
|
+
> /moai:loop --max 50
|
|
1289
|
+
|
|
1290
|
+
# Full autonomous development (parallel by default)
|
|
1291
|
+
> /moai:alfred "Add JWT authentication" --loop
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
### Why "All is Well"?
|
|
1295
|
+
|
|
1296
|
+
The name reflects the philosophy: **set the goal and trust the AI**. MoAI-ADK's agentic automation handles the entire development cycle autonomously. When you see `<moai>DONE</moai>`, all is truly well.
|
|
1297
|
+
|
|
1298
|
+
---
|
|
1299
|
+
|
|
1300
|
+
## 5. Mr.Alfred and Sub-Agents
|
|
1301
|
+
|
|
1302
|
+
### 🎩 Mr.Alfred - Super Agent (Chief Orchestrator)
|
|
1303
|
+
|
|
1304
|
+
**Role**: Analyze user requests and delegate to appropriate specialized agents
|
|
1305
|
+
|
|
1306
|
+
**Workflow**:
|
|
1307
|
+
|
|
1308
|
+
1. **Understand**: Request analysis and clarification
|
|
1309
|
+
2. **Plan**: Establish execution plan via Plan agent
|
|
1310
|
+
3. **Execute**: Delegate tasks to specialized agents (sequential/parallel)
|
|
1311
|
+
4. **Integrate**: Integrate results and report to user
|
|
1312
|
+
|
|
1313
|
+
### 🌐 Multilingual Automatic Routing (NEW)
|
|
1314
|
+
|
|
1315
|
+
Alfred automatically recognizes 4 language requests and invokes the correct agent:
|
|
1316
|
+
|
|
1317
|
+
| Request Language | Example | Agent Invoked |
|
|
1318
|
+
| ---------------- | --------------------------- | -------------- |
|
|
1319
|
+
| English | "Design backend API" | expert-backend |
|
|
1320
|
+
| Korean | "백엔드 API 설계해줘" | expert-backend |
|
|
1321
|
+
| Japanese | "バックエンドAPIを設計して" | expert-backend |
|
|
1322
|
+
| Chinese | "设计后端API" | expert-backend |
|
|
1323
|
+
|
|
1324
|
+
---
|
|
1325
|
+
|
|
1326
|
+
### 🔧 Tier 1: Domain Experts (8)
|
|
1327
|
+
|
|
1328
|
+
| Agent | Expertise | Usage Example |
|
|
1329
|
+
| ---------------------- | -------------------------- | ---------------------------------------- |
|
|
1330
|
+
| **expert-backend** | FastAPI, Django, DB design | API design, query optimization |
|
|
1331
|
+
| **expert-frontend** | React, Vue, Next.js | UI components, state management |
|
|
1332
|
+
| **expert-security** | Security analysis, OWASP | Security audit, vulnerability analysis |
|
|
1333
|
+
| **expert-devops** | Docker, K8s, CI/CD | Deployment automation, infrastructure |
|
|
1334
|
+
| **expert-debug** | Bug analysis, performance | Problem diagnosis, bottleneck resolution |
|
|
1335
|
+
| **expert-performance** | Profiling, optimization | Response time improvement |
|
|
1336
|
+
| **expert-refactoring** | Code refactoring, AST-Grep | Large-scale code transformation |
|
|
1337
|
+
| **expert-testing** | Test strategy, E2E | Test planning, coverage |
|
|
1338
|
+
|
|
1339
|
+
---
|
|
1340
|
+
|
|
1341
|
+
### 🎯 Tier 2: Workflow Managers (8)
|
|
1342
|
+
|
|
1343
|
+
| Agent | Role | Auto Invocation Timing |
|
|
1344
|
+
| ----------------------- | -------------------------------- | ------------------------------- |
|
|
1345
|
+
| **manager-spec** | SPEC writing (EARS) | `/moai:1-plan` |
|
|
1346
|
+
| **manager-tdd** | TDD auto execution | `/moai:2-run` |
|
|
1347
|
+
| **manager-docs** | Documentation auto generation | `/moai:3-sync` |
|
|
1348
|
+
| **manager-quality** | TRUST 5 verification | After implementation completion |
|
|
1349
|
+
| **manager-strategy** | Execution strategy establishment | Complex planning |
|
|
1350
|
+
| **manager-project** | Project initialization | `/moai:0-project` |
|
|
1351
|
+
| **manager-git** | Git workflow | Branch/PR management |
|
|
1352
|
+
| **manager-claude-code** | Claude Code integration | Settings optimization |
|
|
1353
|
+
|
|
1354
|
+
---
|
|
1355
|
+
|
|
1356
|
+
### 🏗️ Tier 3: Claude Code Builder (4)
|
|
1357
|
+
|
|
1358
|
+
| Agent | Role | Usage Example |
|
|
1359
|
+
| ------------------- | ------------------ | ----------------------------- |
|
|
1360
|
+
| **builder-agent** | Create new agent | Organization specialist agent |
|
|
1361
|
+
| **builder-skill** | Create new skill | Team-specific skill module |
|
|
1362
|
+
| **builder-command** | Create new command | Custom workflow |
|
|
1363
|
+
| **builder-plugin** | Create plugin | Distribution plugin |
|
|
1364
|
+
|
|
1365
|
+
---
|
|
1366
|
+
|
|
1367
|
+
## 6. Agent-Skills
|
|
1368
|
+
|
|
1369
|
+
### 📚 Skill Library Structure
|
|
1370
|
+
|
|
1371
|
+
```text
|
|
1372
|
+
🏗️ Foundation (5) → Core philosophy, execution rules
|
|
1373
|
+
🎯 Domain (4) → Domain expertise
|
|
1374
|
+
💻 Language (16) → 16 programming languages
|
|
1375
|
+
🚀 Platform (10) → Cloud/BaaS integration
|
|
1376
|
+
📋 Workflow (7) → Automation workflows
|
|
1377
|
+
📚 Library (4) → Special libraries
|
|
1378
|
+
🛠️ Tool (2) → Development tools
|
|
1379
|
+
```
|
|
1380
|
+
|
|
1381
|
+
### Frequently Used Skill Combinations
|
|
1382
|
+
|
|
1383
|
+
| Purpose | Skill Combination |
|
|
1384
|
+
| ----------------- | ------------------------------------------------------------------------ |
|
|
1385
|
+
| **Backend API** | `moai-lang-python` + `moai-domain-backend` + `moai-platform-supabase` |
|
|
1386
|
+
| **Frontend UI** | `moai-lang-typescript` + `moai-domain-frontend` + `moai-library-shadcn` |
|
|
1387
|
+
| **Documentation** | `moai-library-nextra` + `moai-workflow-docs` + `moai-library-mermaid` |
|
|
1388
|
+
| **Testing** | `moai-lang-python` + `moai-workflow-testing` + `moai-foundation-quality` |
|
|
1389
|
+
|
|
1390
|
+
### Skill Usage
|
|
1391
|
+
|
|
1392
|
+
```python
|
|
1393
|
+
# Method 1: Direct call (Agent)
|
|
1394
|
+
Skill("moai-lang-python")
|
|
1395
|
+
|
|
1396
|
+
# Method 2: Alfred auto selection (general user)
|
|
1397
|
+
"FastAPI server 만들어줘"
|
|
1398
|
+
→ Alfred automatically selects moai-lang-python
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
---
|
|
1402
|
+
|
|
1403
|
+
## 7. TRUST 5 Quality Principles
|
|
1404
|
+
|
|
1405
|
+
All MoAI-ADK projects follow the **TRUST 5** quality framework.
|
|
1406
|
+
|
|
1407
|
+
### 🏆 TRUST 5 = Test + Readable + Unified + Secured + Trackable
|
|
1408
|
+
|
|
1409
|
+
```mermaid
|
|
1410
|
+
graph TD
|
|
1411
|
+
T1["🔴 T: Test-First<br/>━━━━━━━━<br/>• TDD Red-Green-Refactor<br/>• 85%+ coverage<br/>• Automated testing"]
|
|
1412
|
+
R["📖 R: Readable<br/>━━━━━━━━<br/>• Clear naming<br/>• Code comments<br/>• Linter compliance"]
|
|
1413
|
+
U["🔄 U: Unified<br/>━━━━━━━━<br/>• Consistent style<br/>• Standard patterns<br/>• Error handling"]
|
|
1414
|
+
S["🔒 S: Secured<br/>━━━━━━━━<br/>• OWASP Top 10<br/>• Vulnerability scan<br/>• Encryption policy"]
|
|
1415
|
+
T2["📋 T: Trackable<br/>━━━━━━━━<br/>• Clear commits<br/>• Issue tracking<br/>• CHANGELOG"]
|
|
1416
|
+
|
|
1417
|
+
T1 --> R --> U --> S --> T2 --> Deploy["✅ Production Ready"]
|
|
1418
|
+
```
|
|
1419
|
+
|
|
1420
|
+
### T - Test-First
|
|
1421
|
+
|
|
1422
|
+
**Principle**: All implementation starts with tests
|
|
1423
|
+
|
|
1424
|
+
**Verification**:
|
|
1425
|
+
|
|
1426
|
+
- Test coverage >= 85%
|
|
1427
|
+
- Write failing tests first (Red)
|
|
1428
|
+
- Pass tests with code (Green)
|
|
1429
|
+
- Refactor
|
|
1430
|
+
|
|
1431
|
+
### R - Readable
|
|
1432
|
+
|
|
1433
|
+
**Principle**: Code must be clear and easy to understand
|
|
1434
|
+
|
|
1435
|
+
**Verification**:
|
|
1436
|
+
|
|
1437
|
+
- Clear variable names
|
|
1438
|
+
- Comments on complex logic
|
|
1439
|
+
- Pass code review
|
|
1440
|
+
- Pass linter checks
|
|
1441
|
+
|
|
1442
|
+
### U - Unified
|
|
1443
|
+
|
|
1444
|
+
**Principle**: Maintain consistent style across project
|
|
1445
|
+
|
|
1446
|
+
**Verification**:
|
|
1447
|
+
|
|
1448
|
+
- Follow project style guide
|
|
1449
|
+
- Consistent naming conventions
|
|
1450
|
+
- Unified error handling
|
|
1451
|
+
- Standard document format
|
|
1452
|
+
|
|
1453
|
+
### S - Secured
|
|
1454
|
+
|
|
1455
|
+
**Principle**: All code must pass security verification
|
|
1456
|
+
|
|
1457
|
+
**Verification**:
|
|
1458
|
+
|
|
1459
|
+
- OWASP Top 10 checks
|
|
1460
|
+
- Dependency vulnerability scanning
|
|
1461
|
+
- Encryption policy compliance
|
|
1462
|
+
- Access control verification
|
|
1463
|
+
|
|
1464
|
+
### T - Trackable
|
|
1465
|
+
|
|
1466
|
+
**Principle**: All changes must be clearly trackable
|
|
1467
|
+
|
|
1468
|
+
**Verification**:
|
|
1469
|
+
|
|
1470
|
+
- Clear commit messages
|
|
1471
|
+
- Issue tracking (GitHub Issues)
|
|
1472
|
+
- Maintain CHANGELOG
|
|
1473
|
+
- Code review records
|
|
1474
|
+
|
|
1475
|
+
---
|
|
1476
|
+
|
|
1477
|
+
## 8. TAG System v2.0 - Code-to-Documentation Traceability
|
|
1478
|
+
|
|
1479
|
+
TAG System v2.0 provides bidirectional traceability between code and SPEC documents. Use `@SPEC` tags to automatically link code to documentation and documentation to code.
|
|
1480
|
+
|
|
1481
|
+
### Core Problem Solved: "What if I write code without a SPEC first?"
|
|
1482
|
+
|
|
1483
|
+
TAG System v2.0's **Context-Aware Validation** perfectly solves this:
|
|
1484
|
+
|
|
1485
|
+
| Situation | TAG Type | Commit without SPEC? | Description |
|
|
1486
|
+
| ---------------------- | ------------------------- | -------------------- | -------------------------------- |
|
|
1487
|
+
| **Simple fixes** | `related` (all files) | ✅ Allowed | Shows relationship only |
|
|
1488
|
+
| **Write tests first** | `verify` or `@TEST` (test files) | ✅ Allowed | Supports TDD workflow |
|
|
1489
|
+
| **Implementation code**| `impl` (implementation files) | ⚠️ Warning/block | Depends on warn/enforce mode |
|
|
1490
|
+
| **Show dependencies** | `depends` (all files) | ✅ Allowed | Shows dependency only |
|
|
1491
|
+
|
|
1492
|
+
### TAG Overview
|
|
1493
|
+
|
|
1494
|
+
MoAI-ADK supports two TAG types:
|
|
1495
|
+
|
|
1496
|
+
| TAG Type | Purpose | Format | Location |
|
|
1497
|
+
| -------- | --------------- | ------------------------- | ------------ |
|
|
1498
|
+
| **@SPEC** | Code-to-SPEC link| `@SPEC SPEC-XXX [verb]` | All files |
|
|
1499
|
+
| **@TEST** | Test ID | `@TEST TEST-XXX` | Test files only |
|
|
1500
|
+
|
|
1501
|
+
### TAG Usage Guide
|
|
1502
|
+
|
|
1503
|
+
#### 1. @SPEC TAG Verb Selection Guide
|
|
1504
|
+
|
|
1505
|
+
| Verb | When to use? | Usage Example |
|
|
1506
|
+
| --------- | ------------------------- | ------------------------------ |
|
|
1507
|
+
| **impl** | Implementation code links | `# @SPEC SPEC-AUTH-001 impl` |
|
|
1508
|
+
| **verify**| Verify SPEC in tests | `# @SPEC SPEC-AUTH-001 verify` |
|
|
1509
|
+
| **related**| Simple fixes/relationships | `# @SPEC SPEC-AUTH-001 related` |
|
|
1510
|
+
| **depends**| Dependency on other SPEC | `# @SPEC SPEC-DB-004 depends` |
|
|
1511
|
+
|
|
1512
|
+
#### 2. @TEST vs @SPEC verify Selection Guide
|
|
1513
|
+
|
|
1514
|
+
| Distinction | @TEST | @SPEC verify |
|
|
1515
|
+
| ----------- | ------------------------ | -------------------------- |
|
|
1516
|
+
| **Purpose** | Test identification | SPEC verification |
|
|
1517
|
+
| **SPEC link**| Optional | Required |
|
|
1518
|
+
| **Usage** | Independent tests | TDD (SPEC → impl → test) |
|
|
1519
|
+
| **Combined** | `@SPEC verify` + `@TEST` | Standalone |
|
|
1520
|
+
|
|
1521
|
+
#### 3. Recommended Usage Patterns
|
|
1522
|
+
|
|
1523
|
+
```python
|
|
1524
|
+
# Pattern 1: TDD (SPEC exists)
|
|
1525
|
+
# @SPEC SPEC-AUTH-001 verify
|
|
1526
|
+
# @TEST TEST-AUTH-001
|
|
1527
|
+
def test_login():
|
|
1528
|
+
pass
|
|
1529
|
+
|
|
1530
|
+
# Pattern 2: Independent test (no SPEC)
|
|
1531
|
+
# @TEST TEST-AUTH-001
|
|
1532
|
+
def test_login():
|
|
1533
|
+
pass
|
|
1534
|
+
|
|
1535
|
+
# Pattern 3: Implementation code
|
|
1536
|
+
# @SPEC SPEC-AUTH-001 impl
|
|
1537
|
+
def login():
|
|
1538
|
+
pass
|
|
1539
|
+
```
|
|
1540
|
+
|
|
1541
|
+
### Summary: TAG Selection Decision Tree
|
|
1542
|
+
|
|
1543
|
+
```
|
|
1544
|
+
Is this a test file?
|
|
1545
|
+
├── Yes
|
|
1546
|
+
│ ├── SPEC exists and needs verification? → @SPEC verify
|
|
1547
|
+
│ ├── Independent test identification? → @TEST
|
|
1548
|
+
│ └── Need both? → @SPEC verify + @TEST
|
|
1549
|
+
└── No (implementation code)
|
|
1550
|
+
├── SPEC exists and implementation? → @SPEC impl
|
|
1551
|
+
├── Simple fix? → @SPEC related
|
|
1552
|
+
└── Depends on other SPEC? → @SPEC depends
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
### TAG Syntax
|
|
1556
|
+
|
|
1557
|
+
Add @TAG in code comments. Recommended to place above the function:
|
|
1558
|
+
|
|
1559
|
+
```python
|
|
1560
|
+
# Basic format
|
|
1561
|
+
@SPEC SPEC-{DOMAIN}-{NUMBER} [verb] # General code
|
|
1562
|
+
@TEST TEST-{DOMAIN}-{NUMBER} # Test code
|
|
1563
|
+
|
|
1564
|
+
# Example
|
|
1565
|
+
# @SPEC SPEC-AUTH-001 impl
|
|
1566
|
+
def login(): ...
|
|
1567
|
+
|
|
1568
|
+
# @SPEC SPEC-AUTH-001 verify
|
|
1569
|
+
# @TEST TEST-AUTH-001
|
|
1570
|
+
def test_login(): ...
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
### Real-World Workflow
|
|
1574
|
+
|
|
1575
|
+
#### Scenario 1: Simple Bug Fix (no SPEC)
|
|
1576
|
+
|
|
1577
|
+
```python
|
|
1578
|
+
# auth.py
|
|
1579
|
+
# @SPEC SPEC-AUTH-001 related
|
|
1580
|
+
def fix_login_bug():
|
|
1581
|
+
"""Login bug fix
|
|
1582
|
+
|
|
1583
|
+
No related SPEC exists, using related
|
|
1584
|
+
"""
|
|
1585
|
+
pass
|
|
1586
|
+
```
|
|
1587
|
+
|
|
1588
|
+
**Pre-commit Hook Result**:
|
|
1589
|
+
```
|
|
1590
|
+
TAG Validation Results:
|
|
1591
|
+
==================================================
|
|
1592
|
+
auth.py:10: Hint: Consider creating SPEC for SPEC-AUTH-001
|
|
1593
|
+
(related TAG - SPEC not required)
|
|
1594
|
+
==================================================
|
|
1595
|
+
|
|
1596
|
+
Commit allowed with warning (warn mode)
|
|
1597
|
+
```
|
|
1598
|
+
|
|
1599
|
+
✅ **Commit Allowed**: related TAG allows commit without SPEC
|
|
1600
|
+
|
|
1601
|
+
#### Scenario 2: Write Tests First (TDD)
|
|
1602
|
+
|
|
1603
|
+
```python
|
|
1604
|
+
# test_auth.py
|
|
1605
|
+
# @SPEC SPEC-AUTH-002 verify
|
|
1606
|
+
# @TEST TEST-AUTH-002
|
|
1607
|
+
def test_login_success():
|
|
1608
|
+
"""Login success test
|
|
1609
|
+
|
|
1610
|
+
Tests written first, impl later
|
|
1611
|
+
"""
|
|
1612
|
+
pass
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
**Pre-commit Hook Result**:
|
|
1616
|
+
```
|
|
1617
|
+
TAG Validation Results:
|
|
1618
|
+
==================================================
|
|
1619
|
+
test_auth.py:15: Warning: Test references non-existent SPEC: SPEC-AUTH-002
|
|
1620
|
+
(verify TAG in test file - commit allowed)
|
|
1621
|
+
==================================================
|
|
1622
|
+
|
|
1623
|
+
Commit allowed with warning (warn mode)
|
|
1624
|
+
```
|
|
1625
|
+
|
|
1626
|
+
✅ **Commit Allowed**: verify TAG in test files allows commit without SPEC
|
|
1627
|
+
|
|
1628
|
+
#### Scenario 3: Official Development (SPEC first)
|
|
1629
|
+
|
|
1630
|
+
```bash
|
|
1631
|
+
# 1. Create SPEC first
|
|
1632
|
+
> /moai:1-plan "user authentication system"
|
|
1633
|
+
# → SPEC-AUTH-003 created
|
|
1634
|
+
|
|
1635
|
+
# 2. Write implementation code
|
|
1636
|
+
# @SPEC SPEC-AUTH-003 impl
|
|
1637
|
+
def login(username, password):
|
|
1638
|
+
"""User login
|
|
1639
|
+
|
|
1640
|
+
Official development uses impl TAG
|
|
1641
|
+
"""
|
|
1642
|
+
pass
|
|
1643
|
+
|
|
1644
|
+
# 3. Write test code
|
|
1645
|
+
# @SPEC SPEC-AUTH-003 verify
|
|
1646
|
+
# @TEST TEST-AUTH-003
|
|
1647
|
+
def test_login():
|
|
1648
|
+
"""Login test"""
|
|
1649
|
+
pass
|
|
1650
|
+
```
|
|
1651
|
+
|
|
1652
|
+
**Pre-commit Hook Result** (SPEC exists):
|
|
1653
|
+
```
|
|
1654
|
+
TAG Validation: All TAGs valid
|
|
1655
|
+
```
|
|
1656
|
+
|
|
1657
|
+
✅ **Commit Allowed**: SPEC existence confirmed
|
|
1658
|
+
|
|
1659
|
+
**Pre-commit Hook Result** (SPEC doesn't exist, enforce mode):
|
|
1660
|
+
```
|
|
1661
|
+
TAG Validation Results:
|
|
1662
|
+
==================================================
|
|
1663
|
+
auth.py:25: Error: Implementation references non-existent SPEC: SPEC-AUTH-003
|
|
1664
|
+
(commit blocked in enforce mode)
|
|
1665
|
+
==================================================
|
|
1666
|
+
|
|
1667
|
+
Commit blocked due to TAG validation error (enforce mode)
|
|
1668
|
+
```
|
|
1669
|
+
|
|
1670
|
+
❌ **Commit Blocked**: enforce mode blocks impl TAG without SPEC
|
|
1671
|
+
|
|
1672
|
+
### Configuration Options
|
|
1673
|
+
|
|
1674
|
+
Configure TAG validation behavior in `.moai/config/sections/quality.yaml`:
|
|
1675
|
+
|
|
1676
|
+
```yaml
|
|
1677
|
+
tag_validation:
|
|
1678
|
+
enabled: true # Enable TAG checking
|
|
1679
|
+
mode: warn # warn | enforce | off
|
|
1680
|
+
check_spec_exists: true # Check SPEC document exists
|
|
1681
|
+
max_tags_per_file: 100 # Maximum TAGs per file
|
|
1682
|
+
```
|
|
1683
|
+
|
|
1684
|
+
### Mode-Specific Behavior
|
|
1685
|
+
|
|
1686
|
+
| Mode | impl TAG (no SPEC) | verify/@TEST TAG (test file) | related TAG | depends TAG |
|
|
1687
|
+
| --------------- | ------------------ | ----------------------------- | ----------- | ----------- |
|
|
1688
|
+
| **warn** (default) | Warn then allow | Warn then allow | Hint only | Hint only |
|
|
1689
|
+
| **enforce** | Block commit | Allow | Hint only | Hint only |
|
|
1690
|
+
| **off** | No check | No check | No check | No check |
|
|
1691
|
+
|
|
1692
|
+
### Recommended TAG Usage Strategy
|
|
1693
|
+
|
|
1694
|
+
| Development Type | Recommended Strategy | TAG Example |
|
|
1695
|
+
| ---------------- | ------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
1696
|
+
| **Hotfix** | Use `related` | `@SPEC SPEC-XXX related` |
|
|
1697
|
+
| **Test-first** | `verify` or `@TEST` first, then `impl` | Tests: `@SPEC SPEC-XXX verify` or `@TEST TEST-XXX` → Impl: `@SPEC SPEC-XXX impl` |
|
|
1698
|
+
| **Official dev** | Create SPEC first, use `impl` | `/moai:1-plan` → `@SPEC SPEC-XXX impl` |
|
|
1699
|
+
| **Refactoring** | Keep existing TAGs | No changes |
|
|
1700
|
+
| **Documentation** | Use `related` to show relationship | `@SPEC SPEC-XXX related` |
|
|
1701
|
+
| **Dependency** | Use `depends` to show dependency | `@SPEC SPEC-YYY depends` (depends on other SPEC) |
|
|
1702
|
+
|
|
1703
|
+
### Pre-commit Hook Automatic Validation
|
|
1704
|
+
|
|
1705
|
+
All Git commits automatically validate TAG:
|
|
1706
|
+
|
|
1707
|
+
```bash
|
|
1708
|
+
# Attempt commit
|
|
1709
|
+
git commit -m "Add login feature"
|
|
1710
|
+
|
|
1711
|
+
# Automatic execution
|
|
1712
|
+
TAG Validation Results:
|
|
1713
|
+
==================================================
|
|
1714
|
+
auth.py:10: Hint: Consider creating SPEC for SPEC-AUTH-001
|
|
1715
|
+
(related TAG - SPEC not required)
|
|
1716
|
+
==================================================
|
|
1717
|
+
|
|
1718
|
+
Commit allowed with warning (warn mode)
|
|
1719
|
+
```
|
|
1720
|
+
|
|
1721
|
+
### TAG Linkage Database
|
|
1722
|
+
|
|
1723
|
+
TAG System stores bidirectional mapping in `.moai/cache/tag-linkage.json`:
|
|
1724
|
+
|
|
1725
|
+
```json
|
|
1726
|
+
{
|
|
1727
|
+
"tags": [
|
|
1728
|
+
{
|
|
1729
|
+
"spec_id": "SPEC-AUTH-001",
|
|
1730
|
+
"verb": "impl",
|
|
1731
|
+
"file_path": "src/auth.py",
|
|
1732
|
+
"line": 10
|
|
1733
|
+
}
|
|
1734
|
+
],
|
|
1735
|
+
"files": {
|
|
1736
|
+
"src/auth.py": ["SPEC-AUTH-001"]
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
```
|
|
1740
|
+
|
|
1741
|
+
**Auto-update**:
|
|
1742
|
+
- Automatically extracts and saves TAGs on commit
|
|
1743
|
+
- Automatically removes TAGs when files are deleted
|
|
1744
|
+
- Detects orphaned TAGs (references to deleted SPECs)
|
|
1745
|
+
|
|
1746
|
+
### Advanced Features
|
|
1747
|
+
|
|
1748
|
+
#### SPEC-ID Format Validation
|
|
1749
|
+
|
|
1750
|
+
```python
|
|
1751
|
+
# Correct format
|
|
1752
|
+
@SPEC SPEC-AUTH-001 # ✅
|
|
1753
|
+
@SPEC SPEC-PAY-002 # ✅
|
|
1754
|
+
@SPEC SPEC-UI-003 # ✅
|
|
1755
|
+
|
|
1756
|
+
# Incorrect format
|
|
1757
|
+
@SPEC AUTH-001 # ❌ SPEC- prefix missing
|
|
1758
|
+
@SPEC SPEC-001 # ❌ Domain missing
|
|
1759
|
+
@SPEC SPEC-AUTH-1 # ❌ 3-digit number required
|
|
1760
|
+
```
|
|
1761
|
+
|
|
1762
|
+
#### File Type Auto-Detection
|
|
1763
|
+
|
|
1764
|
+
TAG System auto-detects by file pattern:
|
|
1765
|
+
- **Test files**: `test_*.py`, `*_test.py`, `tests/` directory
|
|
1766
|
+
- **Implementation files**: All other Python files
|
|
1767
|
+
|
|
1768
|
+
### Getting Started
|
|
1769
|
+
|
|
1770
|
+
```bash
|
|
1771
|
+
# 1. TAG System already enabled
|
|
1772
|
+
cat .moai/config/sections/quality.yaml
|
|
1773
|
+
|
|
1774
|
+
# 2. Add TAGs to your code
|
|
1775
|
+
# auth.py (implementation file)
|
|
1776
|
+
# @SPEC SPEC-AUTH-001 impl
|
|
1777
|
+
def login():
|
|
1778
|
+
pass
|
|
1779
|
+
|
|
1780
|
+
# test_auth.py (test file)
|
|
1781
|
+
# @SPEC SPEC-AUTH-001 verify
|
|
1782
|
+
# @TEST TEST-AUTH-001
|
|
1783
|
+
def test_login():
|
|
1784
|
+
pass
|
|
1785
|
+
|
|
1786
|
+
# 3. Automatic validation on commit
|
|
1787
|
+
git add .
|
|
1788
|
+
git commit -m "Add login feature"
|
|
1789
|
+
# → TAG Validation runs automatically
|
|
1790
|
+
```
|
|
1791
|
+
|
|
1792
|
+
### Troubleshooting
|
|
1793
|
+
|
|
1794
|
+
**Q: Skip TAG validation**
|
|
1795
|
+
```bash
|
|
1796
|
+
git commit --no-verify
|
|
1797
|
+
```
|
|
1798
|
+
|
|
1799
|
+
**Q: Temporarily commit in enforce mode**
|
|
1800
|
+
```yaml
|
|
1801
|
+
# quality.yaml (temporary change)
|
|
1802
|
+
tag_validation:
|
|
1803
|
+
mode: warn # enforce → warn
|
|
1804
|
+
```
|
|
1805
|
+
|
|
1806
|
+
**Q: Find orphaned TAGs**
|
|
1807
|
+
```bash
|
|
1808
|
+
# Orphaned TAGs = TAGs referencing non-existent SPECs
|
|
1809
|
+
# Automatically detected by Pre-commit Hook
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
### Core Innovations of TAG System v2.0
|
|
1813
|
+
|
|
1814
|
+
| Problem | TAG System v1 | TAG System v2 |
|
|
1815
|
+
| ------------------------ | ----------------- | -------------------------------------- |
|
|
1816
|
+
| Write code without SPEC | ❌ Impossible | ✅ Possible with `related`/`verify` |
|
|
1817
|
+
| Write tests first | ❌ Impossible | ✅ Test file `verify`/`@TEST` allowed |
|
|
1818
|
+
| Flexible validation | ❌ All or nothing | ✅ warn/enforce/off modes |
|
|
1819
|
+
| File type awareness | ❌ None | ✅ Auto-detects (test/implementation) |
|
|
1820
|
+
| Show dependencies | ❌ Not supported | ✅ `depends` shows SPEC dependencies |
|
|
1821
|
+
| Test identification TAG | ❌ Not supported | ✅ `@TEST` for independent test IDs |
|
|
1822
|
+
|
|
1823
|
+
**TAG System v2.0**: Maintains SPEC-First TDD benefits while perfectly supporting real-world development flexibility.
|
|
1824
|
+
|
|
1825
|
+
---
|
|
1826
|
+
|
|
1827
|
+
## 10. Automated Quality Checks
|
|
1828
|
+
|
|
1829
|
+
### 🔍 AST-Grep Based Structural Inspection
|
|
1830
|
+
|
|
1831
|
+
**AST-Grep** analyzes **code structure** not text:
|
|
1832
|
+
|
|
1833
|
+
| Feature | Description | Example |
|
|
1834
|
+
| -------------------------- | ---------------------------- | ----------------------------------------- |
|
|
1835
|
+
| **Structural Search** | AST pattern matching | Find unparameterized SQL queries |
|
|
1836
|
+
| **Security Scan** | Auto vulnerability detection | SQL Injection, XSS, hardcoded secrets |
|
|
1837
|
+
| **Pattern Refactoring** | Safe code transformation | Bulk variable rename, function extraction |
|
|
1838
|
+
| **Multi-language Support** | 40+ languages | Python, TypeScript, Go, Rust... |
|
|
1839
|
+
|
|
1840
|
+
### Auto Inspection Flow
|
|
1841
|
+
|
|
1842
|
+
```text
|
|
1843
|
+
Code writing
|
|
1844
|
+
↓
|
|
1845
|
+
[Hook] AST-Grep auto scan
|
|
1846
|
+
↓
|
|
1847
|
+
⚠️ Immediate alert on vulnerability detection
|
|
1848
|
+
↓
|
|
1849
|
+
✅ Refactor to safe code
|
|
1850
|
+
```
|
|
1851
|
+
|
|
1852
|
+
**Detection Example**:
|
|
1853
|
+
|
|
1854
|
+
```bash
|
|
1855
|
+
⚠️ AST-Grep: Potential SQL injection in src/auth.py:47
|
|
1856
|
+
Pattern: execute(f"SELECT * FROM users WHERE id={user_id}")
|
|
1857
|
+
Suggestion: execute("SELECT * FROM users WHERE id=%s", (user_id,))
|
|
1858
|
+
```
|
|
1859
|
+
|
|
1860
|
+
---
|
|
1861
|
+
|
|
1862
|
+
## 11. 📊 Statusline Customization
|
|
1863
|
+
|
|
1864
|
+
MoAI-ADK provides a **customizable statusline** that displays real-time project information in Claude Code.
|
|
1865
|
+
|
|
1866
|
+
### Default Statusline Layout
|
|
1867
|
+
|
|
1868
|
+
```text
|
|
1869
|
+
🤖 Opus 4.5 | 💰 152K/200K | 💬 Mr. Alfred | 📁 MoAI-ADK | 📊 +0 M58 ?5 | 💾 57.7MB | 🔀 main
|
|
1870
|
+
```
|
|
1871
|
+
|
|
1872
|
+
### Statusline Components
|
|
1873
|
+
|
|
1874
|
+
| Icon | Component | Description | Config Key |
|
|
1875
|
+
|------|-----------|-------------|------------|
|
|
1876
|
+
| 🤖 | **Model** | Claude model (Opus, Sonnet, etc.) | `model` |
|
|
1877
|
+
| 💰 | **Context** | Context window usage (e.g., 77K/200K) | `context_window` |
|
|
1878
|
+
| 💬 | **Style** | Active output style (e.g., Mr. Alfred) | `output_style` |
|
|
1879
|
+
| 📁 | **Directory** | Current project name | `directory` |
|
|
1880
|
+
| 📊 | **Git Status** | Staged/Modified/Untracked files | `git_status` |
|
|
1881
|
+
| 💾 | **Memory** | Process memory usage | `memory_usage` |
|
|
1882
|
+
| 🔀 | **Branch** | Current Git branch | `branch` |
|
|
1883
|
+
| 🔅 | **Version** | Claude Code version (optional) | `version` |
|
|
1884
|
+
|
|
1885
|
+
### Configuration
|
|
1886
|
+
|
|
1887
|
+
Edit `.moai/config/statusline-config.yaml`:
|
|
1888
|
+
|
|
1889
|
+
```yaml
|
|
1890
|
+
display:
|
|
1891
|
+
model: true # 🤖 Claude model
|
|
1892
|
+
context_window: true # 💰 Context window
|
|
1893
|
+
output_style: true # 💬 Output style
|
|
1894
|
+
directory: true # 📁 Project name
|
|
1895
|
+
git_status: true # 📊 Git status
|
|
1896
|
+
memory_usage: true # 💾 Memory usage
|
|
1897
|
+
branch: true # 🔀 Git branch
|
|
1898
|
+
version: 1.1.0 # 🔅 Version (optional)
|
|
1899
|
+
active_task: true # Active task
|
|
1900
|
+
```
|
|
1901
|
+
|
|
1902
|
+
### Memory Collector
|
|
1903
|
+
|
|
1904
|
+
When `memory_usage` is enabled, MoAI-ADK uses `psutil` to collect real-time memory usage:
|
|
1905
|
+
|
|
1906
|
+
- **Process Memory**: RSS (Resident Set Size) of the current Python process
|
|
1907
|
+
- **Caching**: Performance optimization with 10-second TTL
|
|
1908
|
+
- **Cross-Platform**: Supports macOS, Linux, Windows
|
|
1909
|
+
- **Graceful Degradation**: Displays "N/A" when psutil is unavailable
|
|
1910
|
+
|
|
1911
|
+
### Display Modes
|
|
1912
|
+
|
|
1913
|
+
| Mode | Max Length | Use Case |
|
|
1914
|
+
|------|------------|----------|
|
|
1915
|
+
| `compact` | 80 chars | Standard terminal |
|
|
1916
|
+
| `extended` | 120 chars | Wide terminal |
|
|
1917
|
+
| `minimal` | 40 chars | Narrow terminal |
|
|
1918
|
+
|
|
1919
|
+
Set mode:
|
|
1920
|
+
|
|
1921
|
+
```bash
|
|
1922
|
+
export MOAI_STATUSLINE_MODE=extended
|
|
1923
|
+
```
|
|
1924
|
+
|
|
1925
|
+
---
|
|
1926
|
+
|
|
1927
|
+
## 12. 🌳 Worktree Parallel Development
|
|
1928
|
+
|
|
1929
|
+
MoAI-ADK's core innovation: **Worktree for complete isolation, unlimited parallel development**
|
|
1930
|
+
|
|
1931
|
+
### 💡 Why Worktree?
|
|
1932
|
+
|
|
1933
|
+
**Problem**: Changing LLMs with `moai glm`/`moai cc` applies to **all open sessions**. Changing models in the same session leads to authentication errors, making continuation difficult.
|
|
1934
|
+
|
|
1935
|
+
**Solution**: Git Worktree completely isolates each SPEC to maintain independent LLM settings
|
|
1936
|
+
|
|
1937
|
+
---
|
|
1938
|
+
|
|
1939
|
+
### 📦 Worktree Workflow
|
|
1940
|
+
|
|
1941
|
+
```text
|
|
1942
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
1943
|
+
│ Terminal 1 (Claude Opus) - SPEC Design Only │
|
|
1944
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
1945
|
+
│ $ cd my-project │
|
|
1946
|
+
│ $ claude │
|
|
1947
|
+
│ │
|
|
1948
|
+
│ > /moai:1-plan "사용자 인증 시스템" --worktree │
|
|
1949
|
+
│ ✅ SPEC-AUTH-001 생성 완료 │
|
|
1950
|
+
│ ✅ Worktree 생성: ~/moai/worktrees/my-project/SPEC-AUTH-001 │
|
|
1951
|
+
│ ✅ Branch: feature/SPEC-AUTH-001 │
|
|
1952
|
+
│ │
|
|
1953
|
+
│ > /moai:1-plan "결제 시스템" --worktree │
|
|
1954
|
+
│ ✅ SPEC-PAY-002 생성 완료 │
|
|
1955
|
+
│ ✅ Worktree 생성: ~/moai/worktrees/my-project/SPEC-PAY-002 │
|
|
1956
|
+
│ │
|
|
1957
|
+
│ > /moai:1-plan "대시보드 UI" --worktree │
|
|
1958
|
+
│ ✅ SPEC-UI-003 생성 완료 │
|
|
1959
|
+
│ ✅ Worktree 생성: ~/moai/worktrees/my-project/SPEC-UI-003 │
|
|
1960
|
+
│ │
|
|
1961
|
+
│ 💡 Opus로 모든 SPEC 계획 완료 (세션 유지 중...) │
|
|
1962
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
1963
|
+
|
|
1964
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
1965
|
+
│ Terminal 2 - SPEC-AUTH-001 Worktree (GLM 4.7) │
|
|
1966
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
1967
|
+
│ $ moai-worktree go SPEC-AUTH-001 │
|
|
1968
|
+
│ # Or shortcut: moai-wt go SPEC-AUTH-001 │
|
|
1969
|
+
│ │
|
|
1970
|
+
│ 📁 Current location: ~/moai/worktrees/my-project/SPEC-AUTH-001 │
|
|
1971
|
+
│ 🔀 Branch: feature/SPEC-AUTH-001 │
|
|
1972
|
+
│ │
|
|
1973
|
+
│ $ moai glm │
|
|
1974
|
+
│ ✅ Switched to GLM backend │
|
|
1975
|
+
│ │
|
|
1976
|
+
│ $ claude │
|
|
1977
|
+
│ > /moai:2-run SPEC-AUTH-001 │
|
|
1978
|
+
│ 🔄 TDD 실행 중... (Red → Green → Refactor) │
|
|
1979
|
+
│ ✅ 구현 완료! │
|
|
1980
|
+
│ ✅ 테스트 통과 (Coverage: 92%) │
|
|
1981
|
+
│ │
|
|
1982
|
+
│ > /moai:3-sync SPEC-AUTH-001 │
|
|
1983
|
+
│ ✅ 문서 동기화 완료 │
|
|
1984
|
+
│ │
|
|
1985
|
+
│ # After completion, merge │
|
|
1986
|
+
│ $ git checkout main │
|
|
1987
|
+
│ $ git merge feature/SPEC-AUTH-001 │
|
|
1988
|
+
│ $ moai-worktree clean --merged-only │
|
|
1989
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
1990
|
+
|
|
1991
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
1992
|
+
│ Terminal 3 - SPEC-PAY-002 Worktree (GLM 4.7) │
|
|
1993
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
1994
|
+
│ $ moai-wt go SPEC-PAY-002 │
|
|
1995
|
+
│ $ moai glm │
|
|
1996
|
+
│ $ claude │
|
|
1997
|
+
│ │
|
|
1998
|
+
│ > /moai:alfred SPEC-PAY-002 │
|
|
1999
|
+
│ 🔄 Plan → Run → Sync 자동 실행 │
|
|
2000
|
+
│ ✅ 완료! │
|
|
2001
|
+
│ │
|
|
2002
|
+
│ $ git checkout main && git merge feature/SPEC-PAY-002 │
|
|
2003
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
2004
|
+
|
|
2005
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
2006
|
+
│ Terminal 4 - SPEC-UI-003 Worktree (GLM 4.7) │
|
|
2007
|
+
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
|
2008
|
+
│ $ moai-wt go SPEC-UI-003 │
|
|
2009
|
+
│ $ moai glm │
|
|
2010
|
+
│ $ claude │
|
|
2011
|
+
│ > /moai:alfred SPEC-UI-003 │
|
|
2012
|
+
│ ✅ 완료! │
|
|
2013
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
2014
|
+
```
|
|
2015
|
+
|
|
2016
|
+
---
|
|
2017
|
+
|
|
2018
|
+
### 🎯 Core Workflow
|
|
2019
|
+
|
|
2020
|
+
#### Phase 1: Plan with Claude 4.5 Opus (Terminal 1)
|
|
2021
|
+
|
|
2022
|
+
```bash
|
|
2023
|
+
/moai:1-plan "feature description" --worktree
|
|
2024
|
+
```
|
|
2025
|
+
|
|
2026
|
+
- ✅ SPEC document generation
|
|
2027
|
+
- ✅ Worktree auto creation
|
|
2028
|
+
- ✅ Feature branch auto creation
|
|
2029
|
+
|
|
2030
|
+
#### Phase 2: Implement with GLM 4.7 (Terminals 2, 3, 4...)
|
|
2031
|
+
|
|
2032
|
+
```bash
|
|
2033
|
+
moai-wt go SPEC-ID
|
|
2034
|
+
moai glm
|
|
2035
|
+
claude
|
|
2036
|
+
> /moai:2-run SPEC-ID
|
|
2037
|
+
> /moai:3-sync SPEC-ID
|
|
2038
|
+
```
|
|
2039
|
+
|
|
2040
|
+
- ✅ Isolated work environment
|
|
2041
|
+
- ✅ GLM cost efficiency
|
|
2042
|
+
- ✅ Conflict-free parallel development
|
|
2043
|
+
|
|
2044
|
+
#### Phase 3: Merge and Cleanup
|
|
2045
|
+
|
|
2046
|
+
```bash
|
|
2047
|
+
# Option 1: Complete in one step (Recommended)
|
|
2048
|
+
moai-wt done SPEC-ID # checkout main → merge → cleanup
|
|
2049
|
+
moai-wt done SPEC-ID --push # above + push to remote
|
|
2050
|
+
|
|
2051
|
+
# Option 2: Manual steps
|
|
2052
|
+
git checkout main
|
|
2053
|
+
git merge feature/SPEC-ID
|
|
2054
|
+
moai-wt clean --merged-only
|
|
2055
|
+
```
|
|
2056
|
+
|
|
2057
|
+
---
|
|
2058
|
+
|
|
2059
|
+
### ✨ Worktree Benefits
|
|
2060
|
+
|
|
2061
|
+
| Benefit | Description |
|
|
2062
|
+
| ---------------------- | -------------------------------------------------------- |
|
|
2063
|
+
| **Complete Isolation** | Each SPEC has independent Git state, no file conflicts |
|
|
2064
|
+
| **LLM Independence** | Separate LLM settings per Worktree |
|
|
2065
|
+
| **Unlimited Parallel** | Unlimited SPEC parallel development without dependencies |
|
|
2066
|
+
| **Safe Merge** | Only completed SPECs sequentially merge to main |
|
|
2067
|
+
|
|
2068
|
+
---
|
|
2069
|
+
|
|
2070
|
+
### 📊 Worktree Commands
|
|
2071
|
+
|
|
2072
|
+
| Command | Description | Usage Example |
|
|
2073
|
+
| ------------------------ | ---------------------------------- | -------------------------------- |
|
|
2074
|
+
| `moai-wt new SPEC-ID` | Create new Worktree | `moai-wt new SPEC-AUTH-001` |
|
|
2075
|
+
| `moai-wt go SPEC-ID` | Enter Worktree (open new shell) | `moai-wt go SPEC-AUTH-001` |
|
|
2076
|
+
| `moai-wt list` | List Worktrees | `moai-wt list` |
|
|
2077
|
+
| `moai-wt done SPEC-ID` | Merge and cleanup (checkout→merge) | `moai-wt done SPEC-AUTH-001` |
|
|
2078
|
+
| `moai-wt remove SPEC-ID` | Remove Worktree | `moai-wt remove SPEC-AUTH-001` |
|
|
2079
|
+
| `moai-wt status` | Check Worktree status and registry | `moai-wt status` |
|
|
2080
|
+
| `moai-wt sync [SPEC-ID]` | Synchronize Worktree | `moai-wt sync --all` |
|
|
2081
|
+
| `moai-wt clean` | Clean merged Worktrees | `moai-wt clean --merged-only` |
|
|
2082
|
+
| `moai-wt recover` | Recover registry from disk | `moai-wt recover` |
|
|
2083
|
+
| `moai-wt config` | Check Worktree settings | `moai-wt config root` |
|
|
2084
|
+
|
|
2085
|
+
---
|
|
2086
|
+
|
|
2087
|
+
## 13. Understanding CLAUDE.md
|
|
2088
|
+
|
|
2089
|
+
The `CLAUDE.md` file generated in your project root after MoAI-ADK installation is **Alfred's (AI Orchestrator) execution directive**. This file defines how Claude Code behaves in your project.
|
|
2090
|
+
|
|
2091
|
+
### What is CLAUDE.md?
|
|
2092
|
+
|
|
2093
|
+
`CLAUDE.md` is a project configuration file that Claude Code automatically reads at session start. In MoAI-ADK, this file defines the behavioral rules for the **Alfred orchestrator**.
|
|
2094
|
+
|
|
2095
|
+
```text
|
|
2096
|
+
📁 Project Root
|
|
2097
|
+
├── CLAUDE.md ← Alfred execution directive (don't modify)
|
|
2098
|
+
├── CLAUDE.local.md ← Personal custom directives (optional)
|
|
2099
|
+
├── .claude/
|
|
2100
|
+
│ ├── settings.json ← Claude Code settings
|
|
2101
|
+
│ ├── agents/ ← Sub-agent definitions
|
|
2102
|
+
│ ├── commands/ ← Slash commands
|
|
2103
|
+
│ └── skills/ ← Skill definitions
|
|
2104
|
+
└── .moai/
|
|
2105
|
+
└── config/ ← MoAI configuration
|
|
2106
|
+
```
|
|
2107
|
+
|
|
2108
|
+
### CLAUDE.md Core Structure
|
|
2109
|
+
|
|
2110
|
+
| Section | Description | Key Content |
|
|
2111
|
+
|---------|-------------|-------------|
|
|
2112
|
+
| **Core Identity** | Alfred's role definition | Strategic orchestrator, HARD rules |
|
|
2113
|
+
| **Request Processing Pipeline** | Request handling flow | Analyze → Route → Execute → Report |
|
|
2114
|
+
| **Command Reference** | Command classification | Type A (Workflow), Type B (Utility), Type C (Feedback) |
|
|
2115
|
+
| **Agent Catalog** | Sub-agent listing | 8 Managers, 8 Experts, 4 Builders |
|
|
2116
|
+
| **SPEC-Based Workflow** | SPEC-driven development | Plan → Run → Sync flow |
|
|
2117
|
+
| **Quality Gates** | Quality validation rules | HARD/SOFT rules checklist |
|
|
2118
|
+
| **Configuration Reference** | Settings reference | Language, output format rules |
|
|
2119
|
+
|
|
2120
|
+
### Usage: Don't Modify It
|
|
2121
|
+
|
|
2122
|
+
> **Recommendation**: Use `CLAUDE.md` **as-is without modification**.
|
|
2123
|
+
|
|
2124
|
+
**Reasons**:
|
|
2125
|
+
- Automatically replaced with the latest version during MoAI-ADK updates
|
|
2126
|
+
- Modifications may cause update conflicts
|
|
2127
|
+
- Ensures consistent behavior across agents
|
|
2128
|
+
|
|
2129
|
+
```bash
|
|
2130
|
+
# CLAUDE.md is automatically updated
|
|
2131
|
+
moai update
|
|
2132
|
+
```
|
|
2133
|
+
|
|
2134
|
+
### Customization: Use CLAUDE.local.md
|
|
2135
|
+
|
|
2136
|
+
If you need additional directives, create a **`CLAUDE.local.md`** file.
|
|
2137
|
+
|
|
2138
|
+
```bash
|
|
2139
|
+
# Create CLAUDE.local.md in project root
|
|
2140
|
+
touch CLAUDE.local.md
|
|
2141
|
+
```
|
|
2142
|
+
|
|
2143
|
+
**CLAUDE.local.md Example**:
|
|
2144
|
+
|
|
2145
|
+
```markdown
|
|
2146
|
+
# Project Local Directives
|
|
2147
|
+
|
|
2148
|
+
## Coding Style
|
|
2149
|
+
- Type hints required for all functions
|
|
2150
|
+
- Use Google-style docstrings
|
|
2151
|
+
|
|
2152
|
+
## Project-Specific Rules
|
|
2153
|
+
- API responses always use snake_case
|
|
2154
|
+
- Test files must have test_ prefix
|
|
2155
|
+
|
|
2156
|
+
## Prohibited
|
|
2157
|
+
- No console.log (use logger)
|
|
2158
|
+
- No any type usage
|
|
2159
|
+
```
|
|
2160
|
+
|
|
2161
|
+
**Benefits**:
|
|
2162
|
+
- No conflicts with `CLAUDE.md` updates
|
|
2163
|
+
- Project-specific customization
|
|
2164
|
+
- Can add to `.gitignore` for personal settings
|
|
2165
|
+
|
|
2166
|
+
### CLAUDE.md vs CLAUDE.local.md
|
|
2167
|
+
|
|
2168
|
+
| Aspect | CLAUDE.md | CLAUDE.local.md |
|
|
2169
|
+
|--------|-----------|-----------------|
|
|
2170
|
+
| **Purpose** | Alfred execution directives | Personal/project additional directives |
|
|
2171
|
+
| **Modification** | Not recommended | Freely modifiable |
|
|
2172
|
+
| **Updates** | Managed by MoAI | Managed by user |
|
|
2173
|
+
| **Git** | Committed | Optional (.gitignore possible) |
|
|
2174
|
+
| **Priority** | Base rules | Additional/override rules |
|
|
2175
|
+
|
|
2176
|
+
### Core Rules (HARD Rules)
|
|
2177
|
+
|
|
2178
|
+
**HARD rules** defined in `CLAUDE.md` are always enforced:
|
|
2179
|
+
|
|
2180
|
+
1. **Language-Aware Responses**: Respond in user's language
|
|
2181
|
+
2. **Parallel Execution**: Execute independent tasks in parallel
|
|
2182
|
+
3. **No XML in User Responses**: No XML tags in user-facing responses
|
|
2183
|
+
|
|
2184
|
+
These rules cannot be overridden even by `CLAUDE.local.md`.
|
|
2185
|
+
|
|
2186
|
+
---
|
|
2187
|
+
|
|
2188
|
+
## 14. MoAI Rank Introduction
|
|
2189
|
+
|
|
2190
|
+
**A new dimension of agentic coding**: Track your coding journey and compete with global developers!
|
|
2191
|
+
|
|
2192
|
+
### Why MoAI Rank?
|
|
2193
|
+
|
|
2194
|
+
| Feature | Description |
|
|
2195
|
+
| ---------------------------- | ----------------------------------------- |
|
|
2196
|
+
| **📊 Token Tracking** | Automatic AI usage tracking per session |
|
|
2197
|
+
| **🏆 Global Leaderboard** | Daily/Weekly/Monthly/All-time rankings |
|
|
2198
|
+
| **🎭 Coding Style Analysis** | Discover your unique development patterns |
|
|
2199
|
+
| **📈 Dashboard** | Visualized statistics and insights |
|
|
2200
|
+
|
|
2201
|
+
---
|
|
2202
|
+
|
|
2203
|
+
### 🚀 CLI Commands
|
|
2204
|
+
|
|
2205
|
+
```bash
|
|
2206
|
+
❯ moai rank
|
|
2207
|
+
Usage: moai rank [OPTIONS] COMMAND [ARGS]...
|
|
2208
|
+
|
|
2209
|
+
MoAI Rank - Token usage leaderboard.
|
|
2210
|
+
|
|
2211
|
+
Track your Claude Code token usage and compete on the leaderboard.
|
|
2212
|
+
Visit https://rank.mo.ai.kr for the web dashboard.
|
|
2213
|
+
|
|
2214
|
+
Commands:
|
|
2215
|
+
register Register with MoAI Rank via GitHub OAuth.
|
|
2216
|
+
status Show your current rank and statistics.
|
|
2217
|
+
exclude Exclude a project from session tracking.
|
|
2218
|
+
include Re-include a previously excluded project.
|
|
2219
|
+
logout Remove stored MoAI Rank credentials.
|
|
2220
|
+
```
|
|
2221
|
+
|
|
2222
|
+
---
|
|
2223
|
+
|
|
2224
|
+
### Step 1: GitHub OAuth Registration
|
|
2225
|
+
|
|
2226
|
+
```bash
|
|
2227
|
+
❯ moai rank register
|
|
2228
|
+
|
|
2229
|
+
╭──────────────────────────── Registration ────────────────────────────╮
|
|
2230
|
+
│ MoAI Rank Registration │
|
|
2231
|
+
│ │
|
|
2232
|
+
│ This will open your browser to authorize with GitHub. │
|
|
2233
|
+
│ After authorization, your API key will be stored securely. │
|
|
2234
|
+
╰──────────────────────────────────────────────────────────────────────╯
|
|
2235
|
+
|
|
2236
|
+
Opening browser for GitHub authorization...
|
|
2237
|
+
Waiting for authorization (timeout: 5 minutes)...
|
|
2238
|
+
|
|
2239
|
+
╭───────────────────────── Registration Complete ──────────────────────╮
|
|
2240
|
+
│ Successfully registered as your-github-id │
|
|
2241
|
+
│ │
|
|
2242
|
+
│ API Key: moai_rank_a9011fac_c... │
|
|
2243
|
+
│ Stored in: ~/.moai/rank/credentials.json │
|
|
2244
|
+
╰──────────────────────────────────────────────────────────────────────╯
|
|
2245
|
+
|
|
2246
|
+
╭───────────────────────── Global Hook Installed ──────────────────────╮
|
|
2247
|
+
│ Session tracking hook installed globally. │
|
|
2248
|
+
│ │
|
|
2249
|
+
│ Your Claude Code sessions will be automatically tracked. │
|
|
2250
|
+
│ Hook location: ~/.claude/hooks/moai/session_end__rank_submit.py │
|
|
2251
|
+
│ │
|
|
2252
|
+
│ To exclude specific projects: │
|
|
2253
|
+
│ moai rank exclude /path/to/project │
|
|
2254
|
+
╰──────────────────────────────────────────────────────────────────────╯
|
|
2255
|
+
```
|
|
2256
|
+
|
|
2257
|
+
---
|
|
2258
|
+
|
|
2259
|
+
### Step 2: Sync Session Data
|
|
2260
|
+
|
|
2261
|
+
Sync your existing Claude Code session data to MoAI Rank.
|
|
2262
|
+
|
|
2263
|
+
```bash
|
|
2264
|
+
❯ moai rank sync
|
|
2265
|
+
|
|
2266
|
+
Syncing 2577 session(s) to MoAI Rank
|
|
2267
|
+
Phase 1: Parsing transcripts (parallel: 20 workers)
|
|
2268
|
+
|
|
2269
|
+
Parsing transcripts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (2577/2577)
|
|
2270
|
+
|
|
2271
|
+
Phase 2: Submitting 1873 session(s) (batch mode)
|
|
2272
|
+
Batch size: 100 | Batches: 19
|
|
2273
|
+
|
|
2274
|
+
Submitting batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (19/19)
|
|
2275
|
+
|
|
2276
|
+
Sync Complete
|
|
2277
|
+
✓ Submitted: 1169
|
|
2278
|
+
○ Skipped: 704 (no usage or duplicate)
|
|
2279
|
+
✗ Failed: 0
|
|
2280
|
+
```
|
|
2281
|
+
|
|
2282
|
+
---
|
|
2283
|
+
|
|
2284
|
+
### Step 3: Check Your Rank
|
|
2285
|
+
|
|
2286
|
+
```bash
|
|
2287
|
+
❯ moai rank status
|
|
2288
|
+
|
|
2289
|
+
╭────────────────────────────── MoAI Rank ─────────────────────────────╮
|
|
2290
|
+
│ your-github-id │
|
|
2291
|
+
│ │
|
|
2292
|
+
│ 🏆 Global Rank: #42 │
|
|
2293
|
+
╰──────────────────────────────────────────────────────────────────────╯
|
|
2294
|
+
╭───── Daily ──────╮ ╭───── Weekly ─────╮ ╭──── Monthly ─────╮ ╭──── All Time ────╮
|
|
2295
|
+
│ #12 │ │ #28 │ │ #42 │ │ #156 │
|
|
2296
|
+
╰──────────────────╯ ╰──────────────────╯ ╰──────────────────╯ ╰──────────────────╯
|
|
2297
|
+
╭─────────────────────────── Token Usage ──────────────────────────────╮
|
|
2298
|
+
│ 1,247,832 total tokens │
|
|
2299
|
+
│ │
|
|
2300
|
+
│ Input ██████████████░░░░░░ 847,291 (68%) │
|
|
2301
|
+
│ Output ██████░░░░░░░░░░░░░░ 400,541 (32%) │
|
|
2302
|
+
│ │
|
|
2303
|
+
│ Sessions: 47 │
|
|
2304
|
+
╰──────────────────────────────────────────────────────────────────────╯
|
|
2305
|
+
|
|
2306
|
+
● Hook: Installed | https://rank.mo.ai.kr
|
|
2307
|
+
```
|
|
2308
|
+
|
|
2309
|
+
---
|
|
2310
|
+
|
|
2311
|
+
### Step 3: Web Dashboard
|
|
2312
|
+
|
|
2313
|
+

|
|
2314
|
+
|
|
2315
|
+
**[https://rank.mo.ai.kr](https://rank.mo.ai.kr)**
|
|
2316
|
+
|
|
2317
|
+
On the dashboard:
|
|
2318
|
+
|
|
2319
|
+
- Token usage trends
|
|
2320
|
+
- Tool usage statistics
|
|
2321
|
+
- Model-specific usage analysis
|
|
2322
|
+
- Weekly/monthly reports
|
|
2323
|
+
|
|
2324
|
+
📖 **Details**: Refer to [modu-ai/moai-rank](https://github.com/modu-ai/moai-rank) repository.
|
|
2325
|
+
|
|
2326
|
+
---
|
|
2327
|
+
|
|
2328
|
+
### Step 4: Collected Metrics
|
|
2329
|
+
|
|
2330
|
+
| Metric | Description |
|
|
2331
|
+
| ---------------- | ----------------------------------- |
|
|
2332
|
+
| **Token Usage** | Input/output tokens, cache tokens |
|
|
2333
|
+
| **Tool Usage** | Read, Edit, Bash usage counts |
|
|
2334
|
+
| **Model Usage** | Opus, Sonnet, Haiku breakdown |
|
|
2335
|
+
| **Code Metrics** | Added/deleted lines, modified files |
|
|
2336
|
+
| **Session Info** | Duration, turn count, timestamps |
|
|
2337
|
+
|
|
2338
|
+
### 🔒 Privacy Protection
|
|
2339
|
+
|
|
2340
|
+
```bash
|
|
2341
|
+
# Exclude current project
|
|
2342
|
+
moai rank exclude
|
|
2343
|
+
|
|
2344
|
+
# Exclude specific path
|
|
2345
|
+
moai rank exclude /path/to/private
|
|
2346
|
+
|
|
2347
|
+
# Wildcard pattern
|
|
2348
|
+
moai rank exclude "*/confidential/*"
|
|
2349
|
+
|
|
2350
|
+
# List excluded
|
|
2351
|
+
moai rank list-excluded
|
|
2352
|
+
```
|
|
2353
|
+
|
|
2354
|
+
**Guarantee**: Collected data is **numeric metrics only** (code content, file paths not transmitted)
|
|
2355
|
+
|
|
2356
|
+
---
|
|
2357
|
+
|
|
2358
|
+
## 15. FAQ 7 Questions
|
|
2359
|
+
|
|
2360
|
+
### Q1: Is SPEC Always Required?
|
|
2361
|
+
|
|
2362
|
+
| Condition | SPEC Required |
|
|
2363
|
+
| -------------------- | ------------------- |
|
|
2364
|
+
| 1-2 files modified | Optional (can skip) |
|
|
2365
|
+
| 3-5 files modified | Recommended |
|
|
2366
|
+
| 10+ files modified | Required |
|
|
2367
|
+
| New feature addition | Recommended |
|
|
2368
|
+
| Bug fix | Optional |
|
|
2369
|
+
|
|
2370
|
+
### Q2: What TAG Should I Use When Writing Code Without a SPEC?
|
|
2371
|
+
|
|
2372
|
+
TAG System v2.0 supports flexible development:
|
|
2373
|
+
|
|
2374
|
+
| Situation | Recommended TAG | SPEC Required? |
|
|
2375
|
+
| ---------------------- | -------------------- | -------------- |
|
|
2376
|
+
| Hotfix | `@SPEC SPEC-XXX related` | No |
|
|
2377
|
+
| Write tests first | `@TEST TEST-XXX` or `@SPEC SPEC-XXX verify` | No |
|
|
2378
|
+
| Implementation code | `@SPEC SPEC-XXX impl` | Yes (in enforce mode) |
|
|
2379
|
+
| Show dependency | `@SPEC SPEC-XXX depends` | No |
|
|
2380
|
+
|
|
2381
|
+
### Q3: Is MCP Server Installation Required?
|
|
2382
|
+
|
|
2383
|
+
**Required (2)**:
|
|
2384
|
+
|
|
2385
|
+
- **Context7**: For latest library documentation and Skill reference generation
|
|
2386
|
+
|
|
2387
|
+
**Optional**:
|
|
2388
|
+
|
|
2389
|
+
- claude-in-chrome: Use Claude in browser and web automation testing
|
|
2390
|
+
- Playwright: Web automation testing
|
|
2391
|
+
- Figma: Design system
|
|
2392
|
+
|
|
2393
|
+
### Q4: What's the Difference Between @TEST and @SPEC verify?
|
|
2394
|
+
|
|
2395
|
+
| Distinction | @TEST | @SPEC verify |
|
|
2396
|
+
| ----------- | ------------------------ | -------------------------- |
|
|
2397
|
+
| **Purpose** | Test identification | SPEC verification |
|
|
2398
|
+
| **SPEC link**| Optional | Required |
|
|
2399
|
+
| **Usage** | Independent tests | TDD (SPEC → impl → test) |
|
|
2400
|
+
| **Combined** | `@SPEC verify` + `@TEST` | Standalone |
|
|
2401
|
+
|
|
2402
|
+
### Q5: Does MoAI Rank Cost Money?
|
|
2403
|
+
|
|
2404
|
+
It's free. Only automatically collects session data.
|
|
2405
|
+
|
|
2406
|
+
### Q6: Is GLM Configuration Required?
|
|
2407
|
+
|
|
2408
|
+
No. You can use Claude only. However, it's recommended for cost savings.
|
|
2409
|
+
|
|
2410
|
+
### Q7: Can It Be Applied to Existing Projects?
|
|
2411
|
+
|
|
2412
|
+
Yes. `moai init .` preserves existing files.
|
|
2413
|
+
|
|
2414
|
+
---
|
|
2415
|
+
|
|
2416
|
+
## 16. Community & Support
|
|
2417
|
+
|
|
2418
|
+
### 🌐 Participate
|
|
2419
|
+
|
|
2420
|
+
- **Discord (Official)**: [https://discord.gg/umywNygN](https://discord.gg/umywNygN)
|
|
2421
|
+
- **GitHub**: [https://github.com/modu-ai/moai-adk](https://github.com/modu-ai/moai-adk)
|
|
2422
|
+
- **Developer Blog**: [https://goos.kim](https://goos.kim)
|
|
2423
|
+
|
|
2424
|
+
### 🆘 Support
|
|
2425
|
+
|
|
2426
|
+
- Email: [support@mo.ai.kr](mailto:support@mo.ai.kr)
|
|
2427
|
+
- Documentation: [https://adk.mo.ai.kr](https://adk.mo.ai.kr)
|
|
2428
|
+
|
|
2429
|
+
---
|
|
2430
|
+
|
|
2431
|
+
## 📝 License
|
|
2432
|
+
|
|
2433
|
+
Copyleft License (COPYLEFT-3.0) - [LICENSE](./LICENSE)
|
|
2434
|
+
|
|
2435
|
+
---
|
|
2436
|
+
|
|
2437
|
+
## 🙏 Made with ❤️ by MoAI-ADK Team
|
|
2438
|
+
|
|
2439
|
+
**Last Updated:** 2026-01-13
|
|
2440
|
+
**Philosophy**: SPEC-First TDD + Agent Orchestration + Hybrid LLM
|
|
2441
|
+
**MoAI**: MoAI means "Modu-ui AI" (AI for Everyone).
|
|
2442
|
+
|
|
2443
|
+
> **"Infinite Possibilism - AI for All"**
|