moai-adk 0.32.8__py3-none-any.whl → 0.41.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/cli/commands/init.py +4 -1
- moai_adk/cli/commands/update.py +31 -26
- moai_adk/cli/worktree/cli.py +54 -43
- moai_adk/cli/worktree/manager.py +17 -14
- moai_adk/cli/worktree/registry.py +313 -19
- moai_adk/core/config/unified.py +237 -63
- 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/language_config_resolver.py +96 -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/project/backup_utils.py +9 -1
- moai_adk/core/project/initializer.py +33 -96
- moai_adk/core/project/phase_executor.py +79 -33
- moai_adk/core/quality/trust_checker.py +30 -10
- moai_adk/core/realtime_monitoring_dashboard.py +3 -3
- moai_adk/core/rollback_manager.py +46 -19
- moai_adk/core/template/backup.py +4 -3
- moai_adk/core/template/config.py +33 -9
- moai_adk/core/template/merger.py +34 -8
- moai_adk/core/template/processor.py +144 -9
- 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/project/configuration.py +1 -1
- moai_adk/statusline/config.py +5 -2
- moai_adk/statusline/main.py +58 -0
- moai_adk/statusline/renderer.py +38 -78
- moai_adk/templates/.claude/agents/moai/ai-nano-banana.md +218 -51
- moai_adk/templates/.claude/agents/moai/builder-agent.md +46 -11
- moai_adk/templates/.claude/agents/moai/builder-command.md +88 -26
- moai_adk/templates/.claude/agents/moai/builder-plugin.md +753 -0
- moai_adk/templates/.claude/agents/moai/builder-skill.md +79 -8
- moai_adk/templates/.claude/agents/moai/expert-backend.md +100 -28
- moai_adk/templates/.claude/agents/moai/expert-database.md +20 -12
- moai_adk/templates/.claude/agents/moai/expert-debug.md +19 -8
- moai_adk/templates/.claude/agents/moai/expert-devops.md +36 -25
- moai_adk/templates/.claude/agents/moai/expert-frontend.md +99 -38
- moai_adk/templates/.claude/agents/moai/expert-performance.md +661 -0
- moai_adk/templates/.claude/agents/moai/expert-refactoring.md +218 -0
- moai_adk/templates/.claude/agents/moai/expert-security.md +55 -4
- moai_adk/templates/.claude/agents/moai/expert-testing.md +737 -0
- moai_adk/templates/.claude/agents/moai/expert-uiux.md +20 -11
- moai_adk/templates/.claude/agents/moai/manager-claude-code.md +13 -4
- moai_adk/templates/.claude/agents/moai/manager-docs.md +15 -7
- moai_adk/templates/.claude/agents/moai/manager-git.md +192 -37
- moai_adk/templates/.claude/agents/moai/manager-project.md +13 -7
- moai_adk/templates/.claude/agents/moai/manager-quality.md +48 -6
- moai_adk/templates/.claude/agents/moai/manager-spec.md +110 -8
- moai_adk/templates/.claude/agents/moai/manager-strategy.md +203 -17
- moai_adk/templates/.claude/agents/moai/manager-tdd.md +217 -23
- moai_adk/templates/.claude/agents/moai/mcp-context7.md +102 -7
- moai_adk/templates/.claude/agents/moai/mcp-figma.md +107 -86
- moai_adk/templates/.claude/agents/moai/mcp-notion.md +50 -4
- moai_adk/templates/.claude/agents/moai/mcp-playwright.md +52 -4
- moai_adk/templates/.claude/agents/moai/mcp-sequential-thinking.md +49 -5
- moai_adk/templates/.claude/commands/moai/0-project.md +503 -307
- moai_adk/templates/.claude/commands/moai/1-plan.md +255 -323
- moai_adk/templates/.claude/commands/moai/2-run.md +257 -315
- moai_adk/templates/.claude/commands/moai/3-sync.md +421 -56
- moai_adk/templates/.claude/commands/moai/9-feedback.md +40 -34
- moai_adk/templates/.claude/hooks/moai/__init__.py +0 -0
- moai_adk/templates/.claude/hooks/moai/lib/README.md +143 -0
- moai_adk/templates/.claude/hooks/moai/lib/__init__.py +19 -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_manager.py +12 -14
- moai_adk/templates/.claude/hooks/moai/lib/exceptions.py +171 -0
- moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +1 -1
- moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +104 -14
- 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/tool_registry.py +804 -0
- moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +14 -2
- moai_adk/templates/.claude/hooks/moai/post_tool__ast_grep_scan.py +256 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__code_formatter.py +253 -0
- moai_adk/templates/.claude/hooks/moai/post_tool__linter.py +307 -0
- moai_adk/templates/.claude/hooks/moai/pre_tool__security_guard.py +231 -0
- moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +28 -24
- moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +236 -32
- moai_adk/templates/.claude/output-styles/moai/r2d2.md +265 -2
- moai_adk/templates/.claude/output-styles/moai/yoda.md +23 -2
- moai_adk/templates/.claude/settings.json +43 -6
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/SKILL.md +302 -0
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/examples.md +431 -0
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/reference.md +139 -0
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/scripts/batch_generate.py +560 -0
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/scripts/generate_image.py +362 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +251 -196
- moai_adk/templates/.claude/skills/moai-docs-generation/examples.md +252 -0
- 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 +234 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +18 -13
- moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +718 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +464 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +20 -14
- moai_adk/templates/.claude/skills/moai-domain-database/examples.md +830 -0
- moai_adk/templates/.claude/skills/moai-domain-database/reference.md +545 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +123 -425
- moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +968 -0
- 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-frontend/reference.md +664 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +16 -15
- moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +104 -315
- moai_adk/templates/.claude/skills/moai-formats-data/examples.md +804 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +299 -70
- moai_adk/templates/.claude/skills/moai-formats-data/modules/toon-encoding.md +6 -6
- moai_adk/templates/.claude/skills/moai-formats-data/reference.md +585 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +196 -154
- moai_adk/templates/.claude/skills/moai-foundation-claude/examples.md +732 -0
- 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-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-memory-official.md +2 -2
- 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 +432 -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-claude/reference.md +209 -0
- moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +12 -1
- moai_adk/templates/.claude/skills/moai-foundation-context/examples.md +1048 -0
- moai_adk/templates/.claude/skills/moai-foundation-context/reference.md +246 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +33 -134
- moai_adk/templates/.claude/skills/moai-foundation-core/examples.md +358 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/agents-reference.md +31 -18
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/commands-reference.md +30 -30
- 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-core/reference.md +478 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/SKILL.md +311 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/examples.md +228 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/assumption-matrix.md +80 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/cognitive-bias.md +199 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/first-principles.md +140 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/modules/trade-off-analysis.md +154 -0
- moai_adk/templates/.claude/skills/moai-foundation-philosopher/reference.md +157 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +17 -16
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +430 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +17 -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 +17 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +193 -0
- 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 +394 -0
- moai_adk/templates/.claude/skills/moai-lang-elixir/examples.md +17 -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 +17 -0
- moai_adk/templates/.claude/skills/moai-lang-flutter/SKILL.md +472 -0
- moai_adk/templates/.claude/skills/moai-lang-flutter/examples.md +1090 -0
- moai_adk/templates/.claude/skills/moai-lang-flutter/reference.md +686 -0
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +377 -0
- moai_adk/templates/.claude/skills/moai-lang-go/examples.md +919 -0
- moai_adk/templates/.claude/skills/moai-lang-go/reference.md +737 -0
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +386 -0
- moai_adk/templates/.claude/skills/moai-lang-java/examples.md +864 -0
- moai_adk/templates/.claude/skills/moai-lang-java/reference.md +291 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +418 -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 +383 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +1006 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +562 -0
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +504 -0
- moai_adk/templates/.claude/skills/moai-lang-php/examples.md +17 -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 +17 -0
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +489 -0
- moai_adk/templates/.claude/skills/moai-lang-python/examples.md +977 -0
- moai_adk/templates/.claude/skills/moai-lang-python/reference.md +804 -0
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +389 -0
- moai_adk/templates/.claude/skills/moai-lang-r/examples.md +17 -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 +17 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +432 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +17 -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 +17 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +377 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +659 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +504 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +211 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +633 -0
- 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-scala/reference.md +423 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +191 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +918 -0
- 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-swift/reference.md +672 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +364 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +1089 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +731 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +93 -227
- moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +25 -6
- moai_adk/templates/.claude/skills/moai-library-nextra/examples.md +592 -0
- 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-nextra/reference.md +379 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +16 -13
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-theming.md +1 -1
- moai_adk/templates/.claude/skills/moai-platform-auth0/SKILL.md +283 -0
- 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 +425 -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 +228 -0
- 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 +249 -0
- 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 +230 -0
- 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 +205 -0
- 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 +223 -0
- 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 +206 -0
- 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 +209 -0
- 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-plugin-builder/SKILL.md +473 -0
- moai_adk/templates/.claude/skills/moai-plugin-builder/examples.md +621 -0
- moai_adk/templates/.claude/skills/moai-plugin-builder/modules/migration.md +341 -0
- moai_adk/templates/.claude/skills/moai-plugin-builder/modules/validation.md +373 -0
- moai_adk/templates/.claude/skills/moai-plugin-builder/reference.md +464 -0
- moai_adk/templates/.claude/skills/moai-tool-ast-grep/SKILL.md +306 -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-tool-opencode/SKILL.md +214 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/examples.md +697 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/index.md +96 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/acp.md +115 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/agents.md +241 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/commands.md +197 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/custom-tools.md +197 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/formatters.md +164 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/keybinds.md +150 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/lsp-servers.md +156 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/mcp-servers.md +214 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/models.md +197 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/permissions.md +162 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/rules.md +129 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/skills.md +192 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/themes.md +200 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/configure/tools.md +169 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/config.md +211 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/enterprise.md +68 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/intro.md +127 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/migration-1.0.md +82 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/network.md +72 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/providers.md +310 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/core/troubleshooting.md +124 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/develop/ecosystem.md +75 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/develop/plugins.md +218 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/develop/sdk.md +266 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/develop/server.md +207 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/cli.md +159 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/github.md +181 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/gitlab.md +122 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/ide.md +74 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/share.md +106 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/tui.md +129 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/modules/usage/zen.md +118 -0
- moai_adk/templates/.claude/skills/moai-tool-opencode/reference.md +790 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +189 -424
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/examples.md +544 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/reference.md +307 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +187 -314
- moai_adk/templates/.claude/skills/moai-workflow-project/examples.md +547 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/reference.md +275 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +284 -212
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/product-template.md +2 -2
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/structure-template.md +1 -1
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/tech-template.md +22 -1
- moai_adk/templates/.claude/skills/moai-workflow-spec/SKILL.md +336 -0
- moai_adk/templates/.claude/skills/moai-workflow-spec/examples.md +900 -0
- moai_adk/templates/.claude/skills/moai-workflow-spec/modules/advanced-patterns.md +237 -0
- moai_adk/templates/.claude/skills/moai-workflow-spec/reference.md +704 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +12 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/examples.md +552 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/reference.md +346 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +221 -367
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples.md +672 -0
- 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-testing/reference.md +440 -0
- moai_adk/templates/.claude/skills/moai-workflow-worktree/SKILL.md +227 -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 +168 -50
- moai_adk/templates/.gitignore +0 -3
- moai_adk/templates/.lsp.json +152 -0
- moai_adk/templates/.mcp.json +5 -12
- moai_adk/templates/.moai/config/config.yaml +20 -306
- moai_adk/templates/.moai/config/multilingual-triggers.yaml +213 -0
- moai_adk/templates/.moai/config/questions/_schema.yaml +105 -10
- moai_adk/templates/.moai/config/questions/tab0-init.yaml +259 -0
- moai_adk/templates/.moai/config/questions/tab1-user.yaml +4 -5
- moai_adk/templates/.moai/config/questions/tab2-project.yaml +12 -55
- moai_adk/templates/.moai/config/questions/tab3-git.yaml +111 -21
- moai_adk/templates/.moai/config/questions/tab4-quality.yaml +34 -18
- moai_adk/templates/.moai/config/questions/tab5-system.yaml +19 -75
- moai_adk/templates/.moai/config/sections/git-strategy.yaml +83 -7
- moai_adk/templates/.moai/config/sections/language.yaml +7 -7
- moai_adk/templates/.moai/config/sections/project.yaml +1 -1
- moai_adk/templates/.moai/config/sections/quality.yaml +7 -4
- moai_adk/templates/.moai/config/sections/system.yaml +11 -1
- moai_adk/templates/.moai/config/statusline-config.yaml +19 -13
- moai_adk/templates/.moai/scripts/setup-glm.py +4 -4
- moai_adk/templates/CLAUDE.md +578 -154
- moai_adk/utils/common.py +33 -0
- moai_adk/version.py +1 -1
- {moai_adk-0.32.8.dist-info → moai_adk-0.41.0.dist-info}/METADATA +905 -109
- moai_adk-0.41.0.dist-info/RECORD +683 -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/skills/moai-domain-uiux/modules/design-system-tokens.md +0 -405
- moai_adk/templates/.claude/skills/moai-integration-mcp/SKILL.md +0 -352
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/README.md +0 -52
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/error-handling.md +0 -334
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/integration-patterns.md +0 -310
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/security-authentication.md +0 -256
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/server-architecture.md +0 -253
- moai_adk/templates/.claude/skills/moai-lang-unified/README.md +0 -133
- moai_adk/templates/.claude/skills/moai-lang-unified/SKILL.md +0 -296
- moai_adk/templates/.claude/skills/moai-lang-unified/examples.md +0 -1269
- moai_adk/templates/.claude/skills/moai-lang-unified/reference.md +0 -331
- moai_adk/templates/.claude/skills/moai-library-nextra/advanced-patterns.md +0 -336
- moai_adk/templates/.claude/skills/moai-platform-baas/README.md +0 -186
- moai_adk/templates/.claude/skills/moai-platform-baas/SKILL.md +0 -290
- moai_adk/templates/.claude/skills/moai-platform-baas/examples.md +0 -1225
- moai_adk/templates/.claude/skills/moai-platform-baas/reference.md +0 -567
- moai_adk/templates/.claude/skills/moai-platform-baas/scripts/provider-selector.py +0 -323
- moai_adk/templates/.claude/skills/moai-platform-baas/templates/stack-config.yaml +0 -204
- 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 -135
- 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 -410
- 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/cache/personalization.json +0 -10
- moai_adk/templates/.moai/config/presets/manual.yaml +0 -28
- moai_adk/templates/.moai/config/presets/personal.yaml +0 -30
- moai_adk/templates/.moai/config/presets/team.yaml +0 -33
- moai_adk-0.32.8.dist-info/RECORD +0 -396
- /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.32.8.dist-info → moai_adk-0.41.0.dist-info}/WHEEL +0 -0
- {moai_adk-0.32.8.dist-info → moai_adk-0.41.0.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.32.8.dist-info → moai_adk-0.41.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -342,17 +342,37 @@ class TrustChecker:
|
|
|
342
342
|
Returns:
|
|
343
343
|
dict[str, str]: Selected tool dictionary
|
|
344
344
|
"""
|
|
345
|
-
|
|
346
|
-
if not config_path.exists():
|
|
347
|
-
return {
|
|
348
|
-
"test_framework": "pytest",
|
|
349
|
-
"coverage_tool": "coverage.py",
|
|
350
|
-
"linter": "ruff",
|
|
351
|
-
"type_checker": "mypy",
|
|
352
|
-
}
|
|
345
|
+
import yaml
|
|
353
346
|
|
|
354
|
-
|
|
355
|
-
|
|
347
|
+
language = "python" # Default
|
|
348
|
+
|
|
349
|
+
# Try section YAML file first (new format)
|
|
350
|
+
project_section_path = project_path / ".moai" / "config" / "sections" / "project.yaml"
|
|
351
|
+
if project_section_path.exists():
|
|
352
|
+
try:
|
|
353
|
+
with open(project_section_path, encoding="utf-8") as f:
|
|
354
|
+
project_config = yaml.safe_load(f) or {}
|
|
355
|
+
language = project_config.get("project", {}).get("language", "python")
|
|
356
|
+
except (yaml.YAMLError, OSError):
|
|
357
|
+
pass # Use default
|
|
358
|
+
else:
|
|
359
|
+
# Fall back to main config file (YAML or JSON)
|
|
360
|
+
yaml_config_path = project_path / ".moai" / "config" / "config.yaml"
|
|
361
|
+
json_config_path = project_path / ".moai" / "config" / "config.json"
|
|
362
|
+
|
|
363
|
+
if yaml_config_path.exists():
|
|
364
|
+
try:
|
|
365
|
+
with open(yaml_config_path, encoding="utf-8") as f:
|
|
366
|
+
config = yaml.safe_load(f) or {}
|
|
367
|
+
language = config.get("project", {}).get("language", "python")
|
|
368
|
+
except (yaml.YAMLError, OSError):
|
|
369
|
+
pass # Use default
|
|
370
|
+
elif json_config_path.exists():
|
|
371
|
+
try:
|
|
372
|
+
config = json.loads(json_config_path.read_text())
|
|
373
|
+
language = config.get("project", {}).get("language", "python")
|
|
374
|
+
except (json.JSONDecodeError, OSError):
|
|
375
|
+
pass # Use default
|
|
356
376
|
|
|
357
377
|
if language == "python":
|
|
358
378
|
return {
|
|
@@ -208,7 +208,7 @@ class MetricsCollector:
|
|
|
208
208
|
self.metrics_buffer: Dict[str, deque] = defaultdict(lambda: deque(maxlen=buffer_size))
|
|
209
209
|
self.aggregated_metrics: Dict[str, Dict[str, Any]] = defaultdict(dict)
|
|
210
210
|
self.tenant_metrics: Dict[str, Dict[str, deque]] = defaultdict(lambda: defaultdict(deque))
|
|
211
|
-
self._lock = threading.
|
|
211
|
+
self._lock = threading.RLock()
|
|
212
212
|
self._last_cleanup = datetime.now()
|
|
213
213
|
|
|
214
214
|
def add_metric(self, metric: MetricData) -> None:
|
|
@@ -437,7 +437,7 @@ class AlertManager:
|
|
|
437
437
|
self.alert_history: List[Alert] = []
|
|
438
438
|
self.alert_callbacks: List[Callable[[Alert], None]] = []
|
|
439
439
|
self.tenant_alerts: Dict[str, Dict[str, Alert]] = defaultdict(dict)
|
|
440
|
-
self._lock = threading.
|
|
440
|
+
self._lock = threading.RLock()
|
|
441
441
|
|
|
442
442
|
def add_alert_rule(
|
|
443
443
|
self,
|
|
@@ -706,7 +706,7 @@ class DashboardManager:
|
|
|
706
706
|
self.dashboards: Dict[str, Dashboard] = {}
|
|
707
707
|
self.tenant_dashboards: Dict[str, Dict[str, Dashboard]] = defaultdict(dict)
|
|
708
708
|
self.default_dashboards: Dict[str, Dashboard] = {}
|
|
709
|
-
self._lock = threading.
|
|
709
|
+
self._lock = threading.RLock()
|
|
710
710
|
|
|
711
711
|
# Create default dashboards
|
|
712
712
|
self._create_default_dashboards()
|
|
@@ -450,14 +450,21 @@ class RollbackManager:
|
|
|
450
450
|
raise
|
|
451
451
|
|
|
452
452
|
def _backup_configuration(self, rollback_dir: Path) -> str:
|
|
453
|
-
"""Backup configuration files"""
|
|
453
|
+
"""Backup configuration files (both legacy and section-based)"""
|
|
454
454
|
config_backup_path = rollback_dir / "config"
|
|
455
455
|
config_backup_path.mkdir(parents=True, exist_ok=True)
|
|
456
456
|
|
|
457
|
-
# Backup
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
457
|
+
# Backup legacy monolithic config files
|
|
458
|
+
for config_name in ["config.json", "config.yaml"]:
|
|
459
|
+
config_file = self.project_root / ".moai" / "config" / config_name
|
|
460
|
+
if config_file.exists():
|
|
461
|
+
shutil.copy2(config_file, config_backup_path / config_name)
|
|
462
|
+
|
|
463
|
+
# Backup section-based config directory
|
|
464
|
+
sections_dir = self.project_root / ".moai" / "config" / "sections"
|
|
465
|
+
if sections_dir.exists():
|
|
466
|
+
sections_backup_path = config_backup_path / "sections"
|
|
467
|
+
shutil.copytree(sections_dir, sections_backup_path, dirs_exist_ok=True)
|
|
461
468
|
|
|
462
469
|
# Backup .claude/settings.json
|
|
463
470
|
settings_file = self.project_root / ".claude" / "settings.json"
|
|
@@ -541,15 +548,18 @@ class RollbackManager:
|
|
|
541
548
|
if current_checksum != rollback_point.checksum:
|
|
542
549
|
warnings.append("Backup checksum mismatch - possible corruption")
|
|
543
550
|
|
|
544
|
-
# Check essential files exist
|
|
545
|
-
|
|
546
|
-
backup_path / "config" / "config.json"
|
|
547
|
-
backup_path / "
|
|
548
|
-
|
|
551
|
+
# Check essential files exist (check for either legacy or section-based config)
|
|
552
|
+
config_exists = (
|
|
553
|
+
(backup_path / "config" / "config.json").exists()
|
|
554
|
+
or (backup_path / "config" / "config.yaml").exists()
|
|
555
|
+
or (backup_path / "config" / "sections").exists()
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
if not config_exists:
|
|
559
|
+
warnings.append("No configuration backup found (expected config.json, config.yaml, or sections/)")
|
|
549
560
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
warnings.append(f"Missing backup files: {missing_files}")
|
|
561
|
+
if not (backup_path / "research").exists():
|
|
562
|
+
warnings.append("Missing research component backup")
|
|
553
563
|
|
|
554
564
|
except Exception as e:
|
|
555
565
|
validation_result["valid"] = False
|
|
@@ -677,18 +687,35 @@ class RollbackManager:
|
|
|
677
687
|
}
|
|
678
688
|
|
|
679
689
|
try:
|
|
680
|
-
# Validate configuration
|
|
681
|
-
|
|
682
|
-
|
|
690
|
+
# Validate configuration (check for both legacy and section-based)
|
|
691
|
+
config_json = self.project_root / ".moai" / "config" / "config.json"
|
|
692
|
+
config_yaml = self.project_root / ".moai" / "config" / "config.yaml"
|
|
693
|
+
sections_dir = self.project_root / ".moai" / "config" / "sections"
|
|
694
|
+
|
|
695
|
+
config_found = False
|
|
696
|
+
|
|
697
|
+
# Validate legacy JSON config
|
|
698
|
+
if config_json.exists():
|
|
699
|
+
config_found = True
|
|
683
700
|
try:
|
|
684
|
-
with open(
|
|
701
|
+
with open(config_json, "r", encoding="utf-8") as f:
|
|
685
702
|
json.load(f) # Validate JSON syntax
|
|
686
703
|
except json.JSONDecodeError:
|
|
687
704
|
validation_results["config_valid"] = False
|
|
688
705
|
issues.append("Invalid JSON in config.json")
|
|
689
|
-
|
|
706
|
+
|
|
707
|
+
# Validate legacy YAML config
|
|
708
|
+
if config_yaml.exists():
|
|
709
|
+
config_found = True
|
|
710
|
+
# YAML validation would require PyYAML, skip for now
|
|
711
|
+
|
|
712
|
+
# Check for section-based config
|
|
713
|
+
if sections_dir.exists() and sections_dir.is_dir():
|
|
714
|
+
config_found = True
|
|
715
|
+
|
|
716
|
+
if not config_found:
|
|
690
717
|
validation_results["config_valid"] = False
|
|
691
|
-
issues.append("config.json
|
|
718
|
+
issues.append("No configuration found (expected config.json, config.yaml, or sections/)")
|
|
692
719
|
|
|
693
720
|
# Validate research components
|
|
694
721
|
for research_dir in self.research_dirs:
|
moai_adk/core/template/backup.py
CHANGED
|
@@ -43,7 +43,8 @@ class TemplateBackup:
|
|
|
43
43
|
Returns:
|
|
44
44
|
True when any tracked file exists.
|
|
45
45
|
"""
|
|
46
|
-
|
|
46
|
+
tracked_items = [".moai", ".claude", ".github", "CLAUDE.md", ".mcp.json", ".lsp.json", ".git-hooks"]
|
|
47
|
+
return any((self.target_path / item).exists() for item in tracked_items)
|
|
47
48
|
|
|
48
49
|
def create_backup(self) -> Path:
|
|
49
50
|
"""Create a timestamped backup under .moai-backups/.
|
|
@@ -61,7 +62,7 @@ class TemplateBackup:
|
|
|
61
62
|
backup_path.mkdir(parents=True, exist_ok=True)
|
|
62
63
|
|
|
63
64
|
# Copy backup targets
|
|
64
|
-
for item in [".moai", ".claude", ".github", "CLAUDE.md"]:
|
|
65
|
+
for item in [".moai", ".claude", ".github", "CLAUDE.md", ".mcp.json", ".lsp.json", ".git-hooks"]:
|
|
65
66
|
src = self.target_path / item
|
|
66
67
|
if not src.exists():
|
|
67
68
|
continue
|
|
@@ -152,7 +153,7 @@ class TemplateBackup:
|
|
|
152
153
|
raise FileNotFoundError(f"Backup not found: {backup_path}")
|
|
153
154
|
|
|
154
155
|
# Restore each item from backup
|
|
155
|
-
for item in [".moai", ".claude", ".github", "CLAUDE.md"]:
|
|
156
|
+
for item in [".moai", ".claude", ".github", "CLAUDE.md", ".mcp.json", ".lsp.json", ".git-hooks"]:
|
|
156
157
|
src = backup_path / item
|
|
157
158
|
dst = self.target_path / item
|
|
158
159
|
|
moai_adk/core/template/config.py
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
"""Configuration Manager (Migrated to Unified Config)
|
|
1
|
+
"""Configuration Manager (Migrated to Unified Config).
|
|
2
2
|
|
|
3
|
-
DEPRECATED: This module is
|
|
4
|
-
New code should use: moai_adk.core.config.unified.UnifiedConfigManager
|
|
3
|
+
⚠️ DEPRECATED: This module is deprecated and will be removed in a future version.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
New code should use: from moai_adk.core.config.unified import UnifiedConfigManager, get_unified_config
|
|
6
|
+
|
|
7
|
+
Migration Guide:
|
|
8
|
+
OLD:
|
|
9
|
+
>>> from moai_adk.core.template.config import ConfigManager
|
|
10
|
+
>>> config = ConfigManager()
|
|
11
|
+
|
|
12
|
+
NEW:
|
|
13
|
+
>>> from moai_adk.core.config.unified import UnifiedConfigManager
|
|
14
|
+
>>> config = UnifiedConfigManager()
|
|
15
|
+
>>> data = config.get_all()
|
|
16
|
+
|
|
17
|
+
Configuration sources (in priority order):
|
|
18
|
+
1. Section YAML files: .moai/config/sections/*.yaml (new approach)
|
|
19
|
+
- language.yaml: Language settings
|
|
20
|
+
- user.yaml: User settings
|
|
21
|
+
- project.yaml: Project metadata
|
|
22
|
+
- system.yaml: MoAI system settings
|
|
23
|
+
- git-strategy.yaml: Git workflow settings
|
|
24
|
+
- quality.yaml: Quality and TDD settings
|
|
25
|
+
2. Monolithic config.yaml: .moai/config/config.yaml (legacy)
|
|
26
|
+
3. Monolithic config.json: .moai/config/config.json (legacy fallback)
|
|
11
27
|
|
|
12
28
|
Migration Path:
|
|
13
29
|
OLD:
|
|
@@ -19,6 +35,10 @@ Migration Path:
|
|
|
19
35
|
>>> from moai_adk.core.config.unified import get_unified_config
|
|
20
36
|
>>> config = get_unified_config()
|
|
21
37
|
>>> data = config.get_all()
|
|
38
|
+
|
|
39
|
+
Status: Deprecated - Maintained for backward compatibility only
|
|
40
|
+
Removal Target: v10.0.0
|
|
41
|
+
Last Updated: 2026-01-06
|
|
22
42
|
"""
|
|
23
43
|
|
|
24
44
|
import json
|
|
@@ -36,10 +56,14 @@ except ImportError:
|
|
|
36
56
|
|
|
37
57
|
class ConfigManager:
|
|
38
58
|
"""
|
|
39
|
-
Read and write .
|
|
59
|
+
Read and write MoAI configuration.
|
|
40
60
|
|
|
41
61
|
DEPRECATED: Use moai_adk.core.config.unified.UnifiedConfigManager instead.
|
|
42
62
|
This class is now a thin wrapper around UnifiedConfigManager for backward compatibility.
|
|
63
|
+
|
|
64
|
+
Supports both:
|
|
65
|
+
- New: Section YAML files (.moai/config/sections/*.yaml)
|
|
66
|
+
- Legacy: Monolithic config.json (.moai/config/config.json)
|
|
43
67
|
"""
|
|
44
68
|
|
|
45
69
|
DEFAULT_CONFIG = {"mode": "personal", "locale": "ko", "moai": {"version": "0.3.0"}}
|
moai_adk/core/template/merger.py
CHANGED
|
@@ -93,7 +93,11 @@ class TemplateMerger:
|
|
|
93
93
|
existing_path.write_text("\n".join(merged_lines) + "\n", encoding="utf-8")
|
|
94
94
|
|
|
95
95
|
def merge_config(self, detected_language: str | None = None) -> dict[str, str]:
|
|
96
|
-
"""Smart merge for
|
|
96
|
+
"""Smart merge for configuration using section YAML files with JSON fallback.
|
|
97
|
+
|
|
98
|
+
Supports both:
|
|
99
|
+
- New: Section YAML files (.moai/config/sections/*.yaml)
|
|
100
|
+
- Legacy: Monolithic config.json (.moai/config/config.json)
|
|
97
101
|
|
|
98
102
|
Rules:
|
|
99
103
|
- Prefer existing settings.
|
|
@@ -105,19 +109,41 @@ class TemplateMerger:
|
|
|
105
109
|
Returns:
|
|
106
110
|
Merged configuration dictionary.
|
|
107
111
|
"""
|
|
108
|
-
|
|
112
|
+
try:
|
|
113
|
+
import yaml
|
|
114
|
+
|
|
115
|
+
yaml_available = True
|
|
116
|
+
except ImportError:
|
|
117
|
+
yaml_available = False
|
|
109
118
|
|
|
110
|
-
#
|
|
119
|
+
# Check for section-based YAML configuration first (new approach)
|
|
120
|
+
sections_dir = self.target_path / ".moai" / "config" / "sections"
|
|
111
121
|
existing_config: dict[str, Any] = {}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
122
|
+
|
|
123
|
+
if yaml_available and sections_dir.exists() and sections_dir.is_dir():
|
|
124
|
+
# Load from section YAML files
|
|
125
|
+
for section_file in sections_dir.glob("*.yaml"):
|
|
126
|
+
try:
|
|
127
|
+
with open(section_file, "r", encoding="utf-8") as f:
|
|
128
|
+
section_data = yaml.safe_load(f) or {}
|
|
129
|
+
existing_config.update(section_data)
|
|
130
|
+
except Exception:
|
|
131
|
+
pass # Skip unreadable section files
|
|
132
|
+
else:
|
|
133
|
+
# Fallback to legacy config.json
|
|
134
|
+
config_path = self.target_path / ".moai" / "config" / "config.json"
|
|
135
|
+
if config_path.exists():
|
|
136
|
+
with open(config_path, encoding="utf-8") as f:
|
|
137
|
+
existing_config = json.load(f)
|
|
138
|
+
|
|
139
|
+
# Extract project-related settings from nested structure
|
|
140
|
+
project_config = existing_config.get("project", {})
|
|
115
141
|
|
|
116
142
|
# Build new config while preferring existing values
|
|
117
143
|
new_config: dict[str, str] = {
|
|
118
|
-
"projectName": existing_config.get("projectName", self.target_path.name),
|
|
144
|
+
"projectName": project_config.get("name", existing_config.get("projectName", self.target_path.name)),
|
|
119
145
|
"mode": existing_config.get("mode", "personal"),
|
|
120
|
-
"locale": existing_config.get("locale", "ko"),
|
|
146
|
+
"locale": project_config.get("locale", existing_config.get("locale", "ko")),
|
|
121
147
|
"language": existing_config.get("language", detected_language or "generic"),
|
|
122
148
|
}
|
|
123
149
|
|
|
@@ -85,7 +85,8 @@ class TemplateProcessor:
|
|
|
85
85
|
".moai/specs/", # User SPEC documents
|
|
86
86
|
".moai/reports/", # User reports
|
|
87
87
|
".moai/project/", # User project documents (product/structure/tech.md)
|
|
88
|
-
#
|
|
88
|
+
".moai/config/sections/", # User configuration section files (YAML)
|
|
89
|
+
# config.json/config.yaml is now FORCE OVERWRITTEN (backup in .moai-backups/)
|
|
89
90
|
# Merge via /moai:0-project when optimized=false
|
|
90
91
|
]
|
|
91
92
|
|
|
@@ -107,6 +108,7 @@ class TemplateProcessor:
|
|
|
107
108
|
"MOAI_VERSION_SOURCE": "Version source information",
|
|
108
109
|
"MOAI_VERSION_CACHE_AGE": "Cache age for debugging",
|
|
109
110
|
"CREATION_TIMESTAMP": "Project creation timestamp",
|
|
111
|
+
"STATUSLINE_COMMAND": "Cross-platform statusline command (OS-specific)",
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
def __init__(self, target_path: Path, config: Optional[TemplateProcessorConfig] = None) -> None:
|
|
@@ -800,7 +802,7 @@ class TemplateProcessor:
|
|
|
800
802
|
"output-styles/moai",
|
|
801
803
|
"agents/alfred",
|
|
802
804
|
"agents/moai",
|
|
803
|
-
"skills"
|
|
805
|
+
# NOTE: "skills" handled by _sync_skills_selective() to preserve custom skills
|
|
804
806
|
]
|
|
805
807
|
|
|
806
808
|
# 1. Copy Alfred and Moai folders wholesale (backup before delete & overwrite)
|
|
@@ -847,6 +849,9 @@ class TemplateProcessor:
|
|
|
847
849
|
if not silent:
|
|
848
850
|
console.print(f" ✅ .claude/{rel_subdir}/ copied")
|
|
849
851
|
|
|
852
|
+
# 1.6 Sync skills selectively (preserve custom skills, update moai-* skills)
|
|
853
|
+
self._sync_skills_selective(src, dst, silent)
|
|
854
|
+
|
|
850
855
|
# 2. Copy other files/folders individually (smart merge for settings.json and config.json)
|
|
851
856
|
all_warnings = []
|
|
852
857
|
for item in src.iterdir():
|
|
@@ -854,11 +859,13 @@ class TemplateProcessor:
|
|
|
854
859
|
dst_item = dst / rel_path
|
|
855
860
|
|
|
856
861
|
# Skip Alfred parent folders (already handled above)
|
|
862
|
+
# Also skip "skills" - handled by _sync_skills_selective()
|
|
857
863
|
if item.is_dir() and item.name in [
|
|
858
864
|
"hooks",
|
|
859
865
|
"commands",
|
|
860
866
|
"output-styles",
|
|
861
867
|
"agents",
|
|
868
|
+
"skills", # Handled by _sync_skills_selective() to preserve custom skills
|
|
862
869
|
]:
|
|
863
870
|
continue
|
|
864
871
|
|
|
@@ -896,6 +903,54 @@ class TemplateProcessor:
|
|
|
896
903
|
if not silent:
|
|
897
904
|
console.print(" ✅ .claude/ copy complete (variables substituted)")
|
|
898
905
|
|
|
906
|
+
def _sync_skills_selective(self, src: Path, dst: Path, silent: bool = False) -> None:
|
|
907
|
+
"""Sync only moai-* template skills, preserve custom skills.
|
|
908
|
+
|
|
909
|
+
This method ensures that:
|
|
910
|
+
- Template skills (moai-* prefix) are updated from source
|
|
911
|
+
- Custom skills (any other prefix) are preserved untouched
|
|
912
|
+
|
|
913
|
+
Args:
|
|
914
|
+
src: Source .claude directory from template
|
|
915
|
+
dst: Destination .claude directory in project
|
|
916
|
+
silent: Suppress console output if True
|
|
917
|
+
"""
|
|
918
|
+
skills_src = src / "skills"
|
|
919
|
+
skills_dst = dst / "skills"
|
|
920
|
+
|
|
921
|
+
if not skills_src.exists():
|
|
922
|
+
return
|
|
923
|
+
|
|
924
|
+
skills_dst.mkdir(parents=True, exist_ok=True)
|
|
925
|
+
|
|
926
|
+
# Step 1: Identify template skills in source (moai-* prefix)
|
|
927
|
+
template_skills = {d.name for d in skills_src.iterdir() if d.is_dir() and d.name.startswith("moai-")}
|
|
928
|
+
|
|
929
|
+
# Step 2: Delete only template skills in destination
|
|
930
|
+
if skills_dst.exists():
|
|
931
|
+
for skill_dir in list(skills_dst.iterdir()):
|
|
932
|
+
if skill_dir.is_dir() and skill_dir.name.startswith("moai-"):
|
|
933
|
+
shutil.rmtree(skill_dir)
|
|
934
|
+
if not silent:
|
|
935
|
+
console.print(f" [dim]Updating template skill: {skill_dir.name}[/dim]")
|
|
936
|
+
|
|
937
|
+
# Step 3: Copy template skills from source
|
|
938
|
+
for skill_name in sorted(template_skills):
|
|
939
|
+
src_skill = skills_src / skill_name
|
|
940
|
+
dst_skill = skills_dst / skill_name
|
|
941
|
+
shutil.copytree(src_skill, dst_skill)
|
|
942
|
+
|
|
943
|
+
if not silent and template_skills:
|
|
944
|
+
console.print(f" ✅ Synced {len(template_skills)} template skill(s)")
|
|
945
|
+
|
|
946
|
+
# Step 4: Report preserved custom skills
|
|
947
|
+
if skills_dst.exists():
|
|
948
|
+
custom_skills = [d.name for d in skills_dst.iterdir() if d.is_dir() and not d.name.startswith("moai-")]
|
|
949
|
+
if custom_skills and not silent:
|
|
950
|
+
preview = ", ".join(sorted(custom_skills)[:3])
|
|
951
|
+
suffix = "..." if len(custom_skills) > 3 else ""
|
|
952
|
+
console.print(f" ✅ Preserved {len(custom_skills)} custom skill(s): {preview}{suffix}")
|
|
953
|
+
|
|
899
954
|
def _copy_moai(self, silent: bool = False) -> None:
|
|
900
955
|
""".moai/ directory copy with variable substitution (excludes protected paths)."""
|
|
901
956
|
src = self.template_root / ".moai"
|
|
@@ -906,11 +961,11 @@ class TemplateProcessor:
|
|
|
906
961
|
console.print("⚠️ .moai/ template not found")
|
|
907
962
|
return
|
|
908
963
|
|
|
909
|
-
# Paths excluded from template copying (specs/, reports/,
|
|
964
|
+
# Paths excluded from template copying (specs/, reports/, sections/)
|
|
910
965
|
template_protected_paths = [
|
|
911
966
|
"specs",
|
|
912
967
|
"reports",
|
|
913
|
-
"
|
|
968
|
+
"config/sections", # User section YAML files
|
|
914
969
|
]
|
|
915
970
|
|
|
916
971
|
all_warnings = []
|
|
@@ -1015,14 +1070,34 @@ class TemplateProcessor:
|
|
|
1015
1070
|
self.merger.merge_settings_json(src, dst, backup_path)
|
|
1016
1071
|
|
|
1017
1072
|
def _merge_config_json(self, src: Path, dst: Path) -> None:
|
|
1018
|
-
"""Smart merge for config
|
|
1073
|
+
"""Smart merge for config using section YAML files with JSON fallback.
|
|
1074
|
+
|
|
1075
|
+
Supports both new section-based YAML files and legacy config.json.
|
|
1076
|
+
Priority: Section YAML files > config.json fallback
|
|
1019
1077
|
|
|
1020
1078
|
Args:
|
|
1021
|
-
src: Template config.json.
|
|
1022
|
-
dst: Project config.
|
|
1079
|
+
src: Template config file (config.json for legacy projects).
|
|
1080
|
+
dst: Project config file destination.
|
|
1023
1081
|
"""
|
|
1024
1082
|
import json
|
|
1083
|
+
import os
|
|
1084
|
+
|
|
1085
|
+
try:
|
|
1086
|
+
import yaml # noqa: F401
|
|
1025
1087
|
|
|
1088
|
+
yaml_available = True
|
|
1089
|
+
except ImportError:
|
|
1090
|
+
yaml_available = False
|
|
1091
|
+
|
|
1092
|
+
# Check for section-based YAML configuration (new approach)
|
|
1093
|
+
sections_dir = self.target_path / ".moai" / "config" / "sections"
|
|
1094
|
+
|
|
1095
|
+
if yaml_available and sections_dir.exists() and sections_dir.is_dir():
|
|
1096
|
+
# Use section YAML files - merge each section individually
|
|
1097
|
+
self._merge_section_yaml_files(sections_dir)
|
|
1098
|
+
return
|
|
1099
|
+
|
|
1100
|
+
# Fallback to legacy config.json merging
|
|
1026
1101
|
# Load template config
|
|
1027
1102
|
try:
|
|
1028
1103
|
template_config = json.loads(src.read_text(encoding="utf-8"))
|
|
@@ -1071,8 +1146,6 @@ class TemplateProcessor:
|
|
|
1071
1146
|
merged_config[key] = value
|
|
1072
1147
|
|
|
1073
1148
|
# Apply environment variables (highest priority)
|
|
1074
|
-
import os
|
|
1075
|
-
|
|
1076
1149
|
env_mappings = {
|
|
1077
1150
|
"MOAI_USER_NAME": ("user", "name"),
|
|
1078
1151
|
"MOAI_CONVERSATION_LANG": ("language", "conversation_language"),
|
|
@@ -1119,6 +1192,68 @@ class TemplateProcessor:
|
|
|
1119
1192
|
)
|
|
1120
1193
|
console.print(" ⚠️ Warning: Using simple merge (LanguageConfigResolver not available)")
|
|
1121
1194
|
|
|
1195
|
+
def _merge_section_yaml_files(self, sections_dir: Path) -> None:
|
|
1196
|
+
"""Merge section YAML files with user-specific values preserved.
|
|
1197
|
+
|
|
1198
|
+
Args:
|
|
1199
|
+
sections_dir: Path to sections directory (.moai/config/sections/)
|
|
1200
|
+
"""
|
|
1201
|
+
import os
|
|
1202
|
+
|
|
1203
|
+
try:
|
|
1204
|
+
import yaml
|
|
1205
|
+
except ImportError:
|
|
1206
|
+
console.print("⚠️ Warning: PyYAML not available, skipping section merge")
|
|
1207
|
+
return
|
|
1208
|
+
|
|
1209
|
+
# Environment variable mappings for each section
|
|
1210
|
+
env_mappings = {
|
|
1211
|
+
"language.yaml": {
|
|
1212
|
+
"MOAI_CONVERSATION_LANG": ["language", "conversation_language"],
|
|
1213
|
+
"MOAI_AGENT_PROMPT_LANG": ["language", "agent_prompt_language"],
|
|
1214
|
+
"MOAI_CONVERSATION_LANG_NAME": ["language", "conversation_language_name"],
|
|
1215
|
+
"MOAI_GIT_COMMIT_MESSAGES_LANG": ["language", "git_commit_messages"],
|
|
1216
|
+
"MOAI_CODE_COMMENTS_LANG": ["language", "code_comments"],
|
|
1217
|
+
"MOAI_DOCUMENTATION_LANG": ["language", "documentation"],
|
|
1218
|
+
"MOAI_ERROR_MESSAGES_LANG": ["language", "error_messages"],
|
|
1219
|
+
},
|
|
1220
|
+
"user.yaml": {
|
|
1221
|
+
"MOAI_USER_NAME": ["user", "name"],
|
|
1222
|
+
},
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
for section_file in sections_dir.glob("*.yaml"):
|
|
1226
|
+
try:
|
|
1227
|
+
# Read existing section content
|
|
1228
|
+
with open(section_file, "r", encoding="utf-8") as f:
|
|
1229
|
+
section_data = yaml.safe_load(f) or {}
|
|
1230
|
+
|
|
1231
|
+
# Apply environment variable overrides if applicable
|
|
1232
|
+
if section_file.name in env_mappings:
|
|
1233
|
+
for env_var, path in env_mappings[section_file.name].items():
|
|
1234
|
+
env_value = os.getenv(env_var)
|
|
1235
|
+
if env_value:
|
|
1236
|
+
# Navigate to the correct nested location
|
|
1237
|
+
current = section_data
|
|
1238
|
+
for key in path[:-1]:
|
|
1239
|
+
if key not in current:
|
|
1240
|
+
current[key] = {}
|
|
1241
|
+
current = current[key]
|
|
1242
|
+
current[path[-1]] = env_value
|
|
1243
|
+
|
|
1244
|
+
# Write back if environment variables were applied
|
|
1245
|
+
with open(section_file, "w", encoding="utf-8") as f:
|
|
1246
|
+
yaml.safe_dump(
|
|
1247
|
+
section_data,
|
|
1248
|
+
f,
|
|
1249
|
+
default_flow_style=False,
|
|
1250
|
+
allow_unicode=True,
|
|
1251
|
+
sort_keys=False,
|
|
1252
|
+
)
|
|
1253
|
+
|
|
1254
|
+
except Exception as e:
|
|
1255
|
+
console.print(f"⚠️ Warning: Failed to merge {section_file.name}: {e}")
|
|
1256
|
+
|
|
1122
1257
|
def _copy_gitignore(self, silent: bool = False) -> None:
|
|
1123
1258
|
""".gitignore copy (optional)."""
|
|
1124
1259
|
src = self.template_root / ".gitignore"
|
moai_adk/core/template_engine.py
CHANGED
|
@@ -209,7 +209,16 @@ class TemplateEngine:
|
|
|
209
209
|
Extract template variables from project configuration.
|
|
210
210
|
|
|
211
211
|
Args:
|
|
212
|
-
config: Project configuration dictionary (from
|
|
212
|
+
config: Project configuration dictionary (from section YAML files
|
|
213
|
+
or legacy .moai/config/config.json)
|
|
214
|
+
|
|
215
|
+
Configuration sources (in priority order):
|
|
216
|
+
1. Section YAML files: .moai/config/sections/*.yaml
|
|
217
|
+
- project.yaml: Project settings (name, description, owner)
|
|
218
|
+
- language.yaml: Language settings
|
|
219
|
+
- user.yaml: User settings
|
|
220
|
+
- system.yaml: MoAI/GitHub settings
|
|
221
|
+
2. Legacy: .moai/config/config.json
|
|
213
222
|
|
|
214
223
|
Returns:
|
|
215
224
|
Dictionary of template variables
|
|
@@ -41,7 +41,8 @@ class TemplateVariableSynchronizer:
|
|
|
41
41
|
TEMPLATE_TRACKING_PATTERNS = [
|
|
42
42
|
".claude/settings.json",
|
|
43
43
|
".claude/settings.local.json",
|
|
44
|
-
".moai/config/
|
|
44
|
+
".moai/config/sections/*.yaml", # Section YAML files (new)
|
|
45
|
+
".moai/config/config.json", # Legacy config.json (fallback)
|
|
45
46
|
".claude/output-styles/**/*.md",
|
|
46
47
|
".claude/hooks/**/*.py",
|
|
47
48
|
".claude/commands/**/*.md",
|
|
@@ -126,12 +127,25 @@ class TemplateVariableSynchronizer:
|
|
|
126
127
|
# If a specific config file changed, prioritize files that depend on it
|
|
127
128
|
if changed_config_path:
|
|
128
129
|
dependency_map = {
|
|
130
|
+
# Section YAML file dependencies (new approach)
|
|
131
|
+
".moai/config/sections/language.yaml": [
|
|
132
|
+
".claude/settings.json",
|
|
133
|
+
".claude/settings.local.json",
|
|
134
|
+
".claude/output-styles",
|
|
135
|
+
".claude/hooks",
|
|
136
|
+
],
|
|
137
|
+
".moai/config/sections/user.yaml": [
|
|
138
|
+
".claude/settings.json",
|
|
139
|
+
".claude/settings.local.json",
|
|
140
|
+
".claude/output-styles",
|
|
141
|
+
],
|
|
142
|
+
# Legacy config.json dependencies (fallback)
|
|
129
143
|
".moai/config/config.json": [
|
|
130
144
|
".claude/settings.json",
|
|
131
145
|
".claude/settings.local.json",
|
|
132
146
|
".claude/output-styles",
|
|
133
147
|
".claude/hooks",
|
|
134
|
-
]
|
|
148
|
+
],
|
|
135
149
|
}
|
|
136
150
|
|
|
137
151
|
config_key = str(changed_config_path.relative_to(self.project_root))
|