moai-adk 0.32.8__py3-none-any.whl → 0.41.2__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 +56 -84
- 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 +40 -24
- moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +248 -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 +44 -6
- moai_adk/templates/.claude/skills/moai-ai-nano-banana/SKILL.md +303 -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 +252 -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 +19 -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 +21 -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 +124 -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 +17 -15
- moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +105 -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 +197 -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 +431 -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 +194 -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 +395 -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 +473 -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 +378 -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 +387 -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 +419 -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 +384 -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 +505 -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 +490 -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 +390 -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 +433 -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 +378 -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 +212 -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 +192 -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 +365 -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 +94 -227
- moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +26 -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 +17 -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 +284 -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 +426 -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 +229 -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 +250 -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 +231 -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 +206 -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 +224 -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 +207 -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 +210 -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 +474 -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 +307 -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 +215 -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 +190 -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 +188 -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 +337 -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 +13 -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 +222 -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 +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 +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.2.dist-info}/METADATA +905 -109
- moai_adk-0.41.2.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.2.dist-info}/WHEEL +0 -0
- {moai_adk-0.32.8.dist-info → moai_adk-0.41.2.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.32.8.dist-info → moai_adk-0.41.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
name: moai:9-feedback
|
|
3
3
|
description: "Submit feedback or report issues"
|
|
4
4
|
argument-hint: "[issue|suggestion|question]"
|
|
5
|
-
allowed-tools:
|
|
5
|
+
allowed-tools: Task, AskUserQuestion, TodoWrite
|
|
6
6
|
model: haiku
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Pre-execution Context
|
|
10
10
|
|
|
11
11
|
!git status --porcelain
|
|
12
12
|
!git branch --show-current
|
|
13
13
|
!git log --oneline -1
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Essential Files
|
|
16
16
|
|
|
17
17
|
@.moai/config/config.yaml
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# MoAI-ADK Step 9: Feedback Loop
|
|
22
22
|
|
|
23
23
|
> Architecture: Commands → Agents → Skills. This command orchestrates ONLY through `Task()` tool.
|
|
24
24
|
> Delegation Model: Feedback collection delegated to `manager-quality` agent.
|
|
@@ -27,7 +27,7 @@ Workflow Integration: This command implements the feedback loop of the MoAI work
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Command Purpose
|
|
31
31
|
|
|
32
32
|
Collect user feedback, bug reports, or feature suggestions and create GitHub issues automatically.
|
|
33
33
|
|
|
@@ -35,20 +35,17 @@ Run on: `$ARGUMENTS` (Feedback type)
|
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Execution Philosophy
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
/moai:9-feedback performs feedback collection through agent delegation:
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
User Command: /moai:9-feedback [type]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
↓
|
|
50
|
-
Output: Issue created with link
|
|
51
|
-
```
|
|
42
|
+
Execution Flow:
|
|
43
|
+
- User Command: /moai:9-feedback [type]
|
|
44
|
+
- Phase 1: Task with subagent_type "manager-quality"
|
|
45
|
+
- Analyze feedback type
|
|
46
|
+
- Collect details via AskUserQuestion
|
|
47
|
+
- Create GitHub Issue via Skill
|
|
48
|
+
- Output: Issue created with link
|
|
52
49
|
|
|
53
50
|
### Key Principle: Full Delegation Pattern
|
|
54
51
|
|
|
@@ -69,11 +66,11 @@ This command exclusively uses these tools:
|
|
|
69
66
|
|
|
70
67
|
---
|
|
71
68
|
|
|
72
|
-
##
|
|
69
|
+
## Associated Agents and Skills
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
Associated Agents for Feedback Collection:
|
|
72
|
+
|
|
73
|
+
- manager-quality: Feedback collection and GitHub issue creation
|
|
77
74
|
|
|
78
75
|
---
|
|
79
76
|
|
|
@@ -81,7 +78,7 @@ This command exclusively uses these tools:
|
|
|
81
78
|
|
|
82
79
|
This command uses agent execution patterns defined in CLAUDE.md (lines 96-120).
|
|
83
80
|
|
|
84
|
-
### Sequential Phase-Based Chaining
|
|
81
|
+
### Sequential Phase-Based Chaining PASS
|
|
85
82
|
|
|
86
83
|
Command implements simple sequential execution through 2 phases:
|
|
87
84
|
|
|
@@ -97,7 +94,7 @@ WHY: Sequential execution ensures complete feedback capture before submission
|
|
|
97
94
|
|
|
98
95
|
IMPACT: Skipping Phase 1 would create incomplete GitHub issues
|
|
99
96
|
|
|
100
|
-
### Parallel Execution
|
|
97
|
+
### Parallel Execution FAIL
|
|
101
98
|
|
|
102
99
|
Not applicable - simple linear workflow
|
|
103
100
|
|
|
@@ -108,7 +105,7 @@ WHY: Feedback workflow has minimal complexity
|
|
|
108
105
|
|
|
109
106
|
IMPACT: Parallel execution unnecessary for single-agent linear workflow
|
|
110
107
|
|
|
111
|
-
### Resumable Agent Support
|
|
108
|
+
### Resumable Agent Support FAIL
|
|
112
109
|
|
|
113
110
|
Not applicable - command completes in single execution
|
|
114
111
|
|
|
@@ -125,7 +122,7 @@ Refer to CLAUDE.md "Agent Chaining Patterns" (lines 96-120) for complete pattern
|
|
|
125
122
|
|
|
126
123
|
---
|
|
127
124
|
|
|
128
|
-
##
|
|
125
|
+
## Execution Process
|
|
129
126
|
|
|
130
127
|
### Step 1: Delegate to Quality Gate Agent
|
|
131
128
|
|
|
@@ -204,7 +201,7 @@ Language and Accessibility:
|
|
|
204
201
|
|
|
205
202
|
---
|
|
206
203
|
|
|
207
|
-
##
|
|
204
|
+
## Summary: Execution Verification Checklist
|
|
208
205
|
|
|
209
206
|
Before considering command execution complete, verify all requirements:
|
|
210
207
|
|
|
@@ -226,14 +223,23 @@ Before considering command execution complete, verify all requirements:
|
|
|
226
223
|
|
|
227
224
|
---
|
|
228
225
|
|
|
229
|
-
##
|
|
226
|
+
## Quick Reference
|
|
227
|
+
|
|
228
|
+
Scenario: Report bug
|
|
229
|
+
- Entry Point: /moai:9-feedback issue
|
|
230
|
+
- Expected Outcome: GitHub issue created with bug label
|
|
231
|
+
|
|
232
|
+
Scenario: Request feature
|
|
233
|
+
- Entry Point: /moai:9-feedback suggestion
|
|
234
|
+
- Expected Outcome: GitHub issue created with enhancement label
|
|
235
|
+
|
|
236
|
+
Scenario: Ask question
|
|
237
|
+
- Entry Point: /moai:9-feedback question
|
|
238
|
+
- Expected Outcome: GitHub issue created with question label
|
|
230
239
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
| Request feature | `/moai:9-feedback suggestion` | GitHub issue created with enhancement label |
|
|
235
|
-
| Ask question | `/moai:9-feedback question` | GitHub issue created with question label |
|
|
236
|
-
| General feedback | `/moai:9-feedback` | Interactive feedback collection |
|
|
240
|
+
Scenario: General feedback
|
|
241
|
+
- Entry Point: /moai:9-feedback
|
|
242
|
+
- Expected Outcome: Interactive feedback collection
|
|
237
243
|
|
|
238
244
|
Associated Agent:
|
|
239
245
|
|
|
@@ -306,7 +312,7 @@ Requirements:
|
|
|
306
312
|
|
|
307
313
|
---
|
|
308
314
|
|
|
309
|
-
##
|
|
315
|
+
## EXECUTION DIRECTIVE
|
|
310
316
|
|
|
311
317
|
You must NOW execute the command following the "Execution Process" described above.
|
|
312
318
|
|
|
File without changes
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# MoAI-ADK Hooks Library
|
|
2
|
+
|
|
3
|
+
Shared utilities for Claude Code hooks in MoAI-ADK.
|
|
4
|
+
|
|
5
|
+
## Module Overview
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
lib/
|
|
9
|
+
├── __init__.py # Package exports
|
|
10
|
+
├── common.py # Shared utilities (format_duration, merge_configs)
|
|
11
|
+
├── config_manager.py # Configuration loading and management
|
|
12
|
+
├── config_validator.py # Configuration schema validation
|
|
13
|
+
├── exceptions.py # Exception hierarchy
|
|
14
|
+
├── models.py # Data structures (HookPayload, HookResult)
|
|
15
|
+
├── path_utils.py # Project root detection, safe paths
|
|
16
|
+
├── project.py # Project metadata (language, Git, SPEC)
|
|
17
|
+
├── timeout.py # Cross-platform timeout (Windows/Unix)
|
|
18
|
+
├── unified_timeout_manager.py # Advanced timeout with retry
|
|
19
|
+
├── git_operations_manager.py # Optimized Git operations
|
|
20
|
+
├── checkpoint.py # Risky operation detection
|
|
21
|
+
├── language_validator.py # Language config validation
|
|
22
|
+
└── tool_registry.py # Formatter/linter tool registry
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Exit Codes
|
|
26
|
+
|
|
27
|
+
| Code | Meaning | Usage |
|
|
28
|
+
|------|---------|-------|
|
|
29
|
+
| 0 | Success | Normal completion |
|
|
30
|
+
| 1 | Warning/Error | Non-critical error, logged |
|
|
31
|
+
| 2 | Critical Error | Blocks operation |
|
|
32
|
+
| 3 | Configuration Error | Invalid config |
|
|
33
|
+
|
|
34
|
+
## Exception Hierarchy
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
HooksBaseError (base)
|
|
38
|
+
├── TimeoutError
|
|
39
|
+
│ └── HookTimeoutError (with context)
|
|
40
|
+
├── GitOperationError
|
|
41
|
+
├── ConfigurationError
|
|
42
|
+
├── ValidationError
|
|
43
|
+
└── SecurityError
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Key Functions
|
|
47
|
+
|
|
48
|
+
### Path Management (`path_utils.py`)
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from lib.path_utils import find_project_root, get_safe_moai_path
|
|
52
|
+
|
|
53
|
+
# Find project root (with caching)
|
|
54
|
+
root = find_project_root()
|
|
55
|
+
|
|
56
|
+
# Get safe path within .moai/
|
|
57
|
+
cache_path = get_safe_moai_path("cache/version.json")
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Configuration (`config_manager.py`)
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from lib.config_manager import ConfigManager, get_config
|
|
64
|
+
|
|
65
|
+
# Load configuration
|
|
66
|
+
config = ConfigManager().load_config()
|
|
67
|
+
|
|
68
|
+
# Get specific value
|
|
69
|
+
timeout = get_config("hooks.timeout_ms", default=5000)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Timeout Handling (`timeout.py`, `unified_timeout_manager.py`)
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
# Basic timeout
|
|
76
|
+
from lib.timeout import CrossPlatformTimeout
|
|
77
|
+
|
|
78
|
+
with CrossPlatformTimeout(5):
|
|
79
|
+
long_running_operation()
|
|
80
|
+
|
|
81
|
+
# Advanced timeout with retry
|
|
82
|
+
from lib.unified_timeout_manager import get_timeout_manager
|
|
83
|
+
|
|
84
|
+
manager = get_timeout_manager()
|
|
85
|
+
result = manager.execute_with_timeout("hook_name", func, config=config)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Common Utilities (`common.py`)
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
from lib.common import merge_configs, format_duration
|
|
92
|
+
|
|
93
|
+
# Merge configs recursively
|
|
94
|
+
merged = merge_configs(base_config, override_config)
|
|
95
|
+
|
|
96
|
+
# Format duration
|
|
97
|
+
formatted = format_duration(125.5) # "2.1m"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Configuration Files
|
|
101
|
+
|
|
102
|
+
### Main Config
|
|
103
|
+
Location: `.moai/config/config.yaml`
|
|
104
|
+
|
|
105
|
+
### Section Files
|
|
106
|
+
Location: `.moai/config/sections/`
|
|
107
|
+
- `user.yaml` - User name
|
|
108
|
+
- `language.yaml` - Language preferences
|
|
109
|
+
- `project.yaml` - Project metadata
|
|
110
|
+
- `git-strategy.yaml` - Git workflow
|
|
111
|
+
- `quality.yaml` - TDD settings
|
|
112
|
+
|
|
113
|
+
## Hook Data Flow
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Claude Code Event
|
|
117
|
+
↓
|
|
118
|
+
stdin (JSON)
|
|
119
|
+
↓
|
|
120
|
+
Hook Process
|
|
121
|
+
↓
|
|
122
|
+
stdout (JSON response)
|
|
123
|
+
↓
|
|
124
|
+
Claude Code
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Response Format
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"continue": true,
|
|
132
|
+
"systemMessage": "...",
|
|
133
|
+
"hookSpecificOutput": {
|
|
134
|
+
"hookEventName": "PreToolUse",
|
|
135
|
+
"permissionDecision": "allow|deny|ask"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Version
|
|
141
|
+
|
|
142
|
+
- Library Version: 1.0.0
|
|
143
|
+
- Last Updated: 2025-01
|
|
@@ -24,6 +24,7 @@ try:
|
|
|
24
24
|
get_file_pattern_category,
|
|
25
25
|
get_summary_stats,
|
|
26
26
|
is_root_whitelisted,
|
|
27
|
+
merge_configs,
|
|
27
28
|
suggest_moai_location,
|
|
28
29
|
)
|
|
29
30
|
from lib.config_manager import (
|
|
@@ -35,6 +36,16 @@ try:
|
|
|
35
36
|
get_timeout_seconds,
|
|
36
37
|
)
|
|
37
38
|
|
|
39
|
+
# Import exceptions
|
|
40
|
+
from lib.exceptions import (
|
|
41
|
+
ConfigurationError,
|
|
42
|
+
GitOperationError,
|
|
43
|
+
HooksBaseError,
|
|
44
|
+
HookTimeoutError,
|
|
45
|
+
SecurityError,
|
|
46
|
+
ValidationError,
|
|
47
|
+
)
|
|
48
|
+
|
|
38
49
|
# Import models
|
|
39
50
|
from lib.models import HookPayload, HookResult
|
|
40
51
|
|
|
@@ -51,6 +62,13 @@ try:
|
|
|
51
62
|
"CrossPlatformTimeout",
|
|
52
63
|
"TimeoutError",
|
|
53
64
|
"timeout_context",
|
|
65
|
+
# Core - Exceptions
|
|
66
|
+
"HooksBaseError",
|
|
67
|
+
"HookTimeoutError",
|
|
68
|
+
"GitOperationError",
|
|
69
|
+
"ConfigurationError",
|
|
70
|
+
"ValidationError",
|
|
71
|
+
"SecurityError",
|
|
54
72
|
# Core - Configuration
|
|
55
73
|
"ConfigManager",
|
|
56
74
|
"get_config_manager",
|
|
@@ -64,6 +82,7 @@ try:
|
|
|
64
82
|
"is_root_whitelisted",
|
|
65
83
|
"get_file_pattern_category",
|
|
66
84
|
"suggest_moai_location",
|
|
85
|
+
"merge_configs",
|
|
67
86
|
# Models
|
|
68
87
|
"HookPayload",
|
|
69
88
|
"HookResult",
|
|
@@ -70,9 +70,12 @@ def detect_risky_operation(tool_name: str, tool_args: dict[str, Any], cwd: str)
|
|
|
70
70
|
critical_files = [
|
|
71
71
|
"CLAUDE.md",
|
|
72
72
|
"config.json",
|
|
73
|
+
"config.yaml",
|
|
73
74
|
".claude/skills/moai-core-dev-guide/reference.md",
|
|
74
75
|
".claude/skills/moai-core-spec-metadata-extended/reference.md",
|
|
75
|
-
".moai/config/config.json",
|
|
76
|
+
".moai/config/config.json", # Legacy monolithic config
|
|
77
|
+
".moai/config/config.yaml", # Legacy monolithic config
|
|
78
|
+
".moai/config/sections/", # Section-based config (any file in sections/)
|
|
76
79
|
]
|
|
77
80
|
|
|
78
81
|
if any(cf in file_path for cf in critical_files):
|
|
@@ -3,9 +3,39 @@
|
|
|
3
3
|
Consolidated fallback implementations used across multiple hooks.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
6
8
|
import re
|
|
7
9
|
import statistics
|
|
8
|
-
from typing import Any
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def merge_configs(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]:
|
|
14
|
+
"""Recursively merge configuration dictionaries.
|
|
15
|
+
|
|
16
|
+
Deep merges two configuration dictionaries, with override values
|
|
17
|
+
taking precedence. Nested dictionaries are merged recursively.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
base: Base configuration dictionary
|
|
21
|
+
override: Override configuration dictionary (values take precedence)
|
|
22
|
+
|
|
23
|
+
Returns:
|
|
24
|
+
Merged configuration dictionary
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
>>> base = {"a": 1, "b": {"c": 2}}
|
|
28
|
+
>>> override = {"b": {"d": 3}}
|
|
29
|
+
>>> merge_configs(base, override)
|
|
30
|
+
{'a': 1, 'b': {'c': 2, 'd': 3}}
|
|
31
|
+
"""
|
|
32
|
+
result = base.copy()
|
|
33
|
+
for key, value in override.items():
|
|
34
|
+
if key in result and isinstance(result[key], dict) and isinstance(value, dict):
|
|
35
|
+
result[key] = merge_configs(result[key], value)
|
|
36
|
+
else:
|
|
37
|
+
result[key] = value
|
|
38
|
+
return result
|
|
9
39
|
|
|
10
40
|
|
|
11
41
|
def format_duration(seconds: float) -> str:
|
|
@@ -28,7 +58,7 @@ def format_duration(seconds: float) -> str:
|
|
|
28
58
|
return f"{hours:.1f}h"
|
|
29
59
|
|
|
30
60
|
|
|
31
|
-
def get_summary_stats(values:
|
|
61
|
+
def get_summary_stats(values: list[float]) -> dict[str, float]:
|
|
32
62
|
"""Get summary statistics for a list of values.
|
|
33
63
|
|
|
34
64
|
Calculates mean, min, max, and standard deviation.
|
|
@@ -50,7 +80,7 @@ def get_summary_stats(values: List[float]) -> Dict[str, float]:
|
|
|
50
80
|
}
|
|
51
81
|
|
|
52
82
|
|
|
53
|
-
def is_root_whitelisted(filename: str, config:
|
|
83
|
+
def is_root_whitelisted(filename: str, config: dict[str, Any]) -> bool:
|
|
54
84
|
"""Check if file is allowed in project root.
|
|
55
85
|
|
|
56
86
|
Consolidated from pre_tool__document_management.py and session_end__auto_cleanup.py
|
|
@@ -73,7 +103,7 @@ def is_root_whitelisted(filename: str, config: Dict[str, Any]) -> bool:
|
|
|
73
103
|
return False
|
|
74
104
|
|
|
75
105
|
|
|
76
|
-
def get_file_pattern_category(filename: str, config:
|
|
106
|
+
def get_file_pattern_category(filename: str, config: dict[str, Any]) -> tuple[str, str] | None:
|
|
77
107
|
"""Match filename against patterns to determine category.
|
|
78
108
|
|
|
79
109
|
Consolidated from pre_tool__document_management.py and session_end__auto_cleanup.py
|
|
@@ -98,7 +128,7 @@ def get_file_pattern_category(filename: str, config: Dict[str, Any]) -> Optional
|
|
|
98
128
|
return None
|
|
99
129
|
|
|
100
130
|
|
|
101
|
-
def suggest_moai_location(filename: str, config:
|
|
131
|
+
def suggest_moai_location(filename: str, config: dict[str, Any]) -> str:
|
|
102
132
|
"""Suggest appropriate .moai/ location based on file pattern.
|
|
103
133
|
|
|
104
134
|
Consolidated from pre_tool__document_management.py and session_end__auto_cleanup.py
|
|
@@ -121,14 +121,16 @@ class ConfigManager:
|
|
|
121
121
|
else:
|
|
122
122
|
file_config = json.load(f)
|
|
123
123
|
config = self._merge_configs(DEFAULT_CONFIG.copy(), file_config)
|
|
124
|
-
except (
|
|
125
|
-
json.JSONDecodeError,
|
|
126
|
-
yaml.YAMLError if YAML_AVAILABLE else Exception,
|
|
127
|
-
IOError,
|
|
128
|
-
OSError,
|
|
129
|
-
):
|
|
124
|
+
except (json.JSONDecodeError, IOError, OSError):
|
|
130
125
|
# Use defaults if file is corrupted or unreadable
|
|
131
126
|
config = DEFAULT_CONFIG.copy()
|
|
127
|
+
except Exception as e:
|
|
128
|
+
# Handle YAML errors or other parsing issues
|
|
129
|
+
if YAML_AVAILABLE and isinstance(e, yaml.YAMLError):
|
|
130
|
+
config = DEFAULT_CONFIG.copy()
|
|
131
|
+
else:
|
|
132
|
+
# Re-raise unexpected exceptions
|
|
133
|
+
raise
|
|
132
134
|
else:
|
|
133
135
|
# Use defaults if file doesn't exist
|
|
134
136
|
config = DEFAULT_CONFIG.copy()
|
|
@@ -342,6 +344,8 @@ class ConfigManager:
|
|
|
342
344
|
def _merge_configs(self, base: Dict[str, Any], override: Dict[str, Any]) -> Dict[str, Any]:
|
|
343
345
|
"""Recursively merge two configuration dictionaries.
|
|
344
346
|
|
|
347
|
+
This method delegates to common.merge_configs() for consistent behavior.
|
|
348
|
+
|
|
345
349
|
Args:
|
|
346
350
|
base: Base configuration dictionary
|
|
347
351
|
override: Override configuration dictionary
|
|
@@ -349,15 +353,9 @@ class ConfigManager:
|
|
|
349
353
|
Returns:
|
|
350
354
|
Merged configuration dictionary
|
|
351
355
|
"""
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
for key, value in override.items():
|
|
355
|
-
if key in result and isinstance(result[key], dict) and isinstance(value, dict):
|
|
356
|
-
result[key] = self._merge_configs(result[key], value)
|
|
357
|
-
else:
|
|
358
|
-
result[key] = value
|
|
356
|
+
from .common import merge_configs
|
|
359
357
|
|
|
360
|
-
return
|
|
358
|
+
return merge_configs(base, override)
|
|
361
359
|
|
|
362
360
|
|
|
363
361
|
# Module-level helper functions
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Exception hierarchy for MoAI-ADK hooks system.
|
|
3
|
+
|
|
4
|
+
Provides a consistent exception hierarchy for all hooks-related errors.
|
|
5
|
+
This enables structured error handling and proper exception chaining.
|
|
6
|
+
|
|
7
|
+
Hierarchy:
|
|
8
|
+
HooksBaseError
|
|
9
|
+
├── TimeoutError (base timeout from timeout.py)
|
|
10
|
+
│ └── HookTimeoutError (enhanced with context)
|
|
11
|
+
├── GitOperationError
|
|
12
|
+
├── ConfigurationError
|
|
13
|
+
└── ValidationError
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HooksBaseError(Exception):
|
|
20
|
+
"""Base exception for all hooks system errors.
|
|
21
|
+
|
|
22
|
+
All hook-related exceptions should inherit from this class
|
|
23
|
+
to enable consistent exception handling.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Re-export TimeoutError from timeout module for convenience
|
|
30
|
+
try:
|
|
31
|
+
from .timeout import TimeoutError
|
|
32
|
+
except ImportError:
|
|
33
|
+
|
|
34
|
+
class TimeoutError(HooksBaseError): # type: ignore[no-redef]
|
|
35
|
+
"""Timeout exception (fallback if timeout module unavailable)."""
|
|
36
|
+
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Re-export HookTimeoutError from unified_timeout_manager for convenience
|
|
41
|
+
try:
|
|
42
|
+
from .unified_timeout_manager import HookTimeoutError
|
|
43
|
+
except ImportError:
|
|
44
|
+
|
|
45
|
+
class HookTimeoutError(TimeoutError): # type: ignore[no-redef]
|
|
46
|
+
"""Hook-specific timeout with context (fallback)."""
|
|
47
|
+
|
|
48
|
+
def __init__(
|
|
49
|
+
self,
|
|
50
|
+
message: str,
|
|
51
|
+
hook_id: str = "",
|
|
52
|
+
timeout_seconds: float = 0,
|
|
53
|
+
execution_time: float = 0,
|
|
54
|
+
will_retry: bool = False,
|
|
55
|
+
):
|
|
56
|
+
super().__init__(message)
|
|
57
|
+
self.hook_id = hook_id
|
|
58
|
+
self.timeout_seconds = timeout_seconds
|
|
59
|
+
self.execution_time = execution_time
|
|
60
|
+
self.will_retry = will_retry
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class GitOperationError(HooksBaseError):
|
|
64
|
+
"""Exception for Git operation failures.
|
|
65
|
+
|
|
66
|
+
Attributes:
|
|
67
|
+
command: The Git command that failed
|
|
68
|
+
exit_code: Git command exit code (if available)
|
|
69
|
+
stderr: Error output from Git command
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
def __init__(
|
|
73
|
+
self,
|
|
74
|
+
message: str,
|
|
75
|
+
command: str = "",
|
|
76
|
+
exit_code: int | None = None,
|
|
77
|
+
stderr: str = "",
|
|
78
|
+
):
|
|
79
|
+
super().__init__(message)
|
|
80
|
+
self.command = command
|
|
81
|
+
self.exit_code = exit_code
|
|
82
|
+
self.stderr = stderr
|
|
83
|
+
|
|
84
|
+
def __str__(self) -> str:
|
|
85
|
+
parts = [super().__str__()]
|
|
86
|
+
if self.command:
|
|
87
|
+
parts.append(f"Command: {self.command}")
|
|
88
|
+
if self.exit_code is not None:
|
|
89
|
+
parts.append(f"Exit code: {self.exit_code}")
|
|
90
|
+
if self.stderr:
|
|
91
|
+
parts.append(f"Stderr: {self.stderr[:200]}")
|
|
92
|
+
return " | ".join(parts)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class ConfigurationError(HooksBaseError):
|
|
96
|
+
"""Exception for configuration-related errors.
|
|
97
|
+
|
|
98
|
+
Raised when configuration files are missing, malformed,
|
|
99
|
+
or contain invalid values.
|
|
100
|
+
|
|
101
|
+
Attributes:
|
|
102
|
+
config_path: Path to the configuration file (if applicable)
|
|
103
|
+
key: Configuration key that caused the error (if applicable)
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
def __init__(
|
|
107
|
+
self,
|
|
108
|
+
message: str,
|
|
109
|
+
config_path: str = "",
|
|
110
|
+
key: str = "",
|
|
111
|
+
):
|
|
112
|
+
super().__init__(message)
|
|
113
|
+
self.config_path = config_path
|
|
114
|
+
self.key = key
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class ValidationError(HooksBaseError):
|
|
118
|
+
"""Exception for validation failures.
|
|
119
|
+
|
|
120
|
+
Raised when input validation or schema validation fails.
|
|
121
|
+
|
|
122
|
+
Attributes:
|
|
123
|
+
field: The field that failed validation
|
|
124
|
+
value: The invalid value (if safe to include)
|
|
125
|
+
expected: Description of expected value format
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
def __init__(
|
|
129
|
+
self,
|
|
130
|
+
message: str,
|
|
131
|
+
field: str = "",
|
|
132
|
+
value: str | None = None,
|
|
133
|
+
expected: str = "",
|
|
134
|
+
):
|
|
135
|
+
super().__init__(message)
|
|
136
|
+
self.field = field
|
|
137
|
+
self.value = value
|
|
138
|
+
self.expected = expected
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class SecurityError(HooksBaseError):
|
|
142
|
+
"""Exception for security-related issues.
|
|
143
|
+
|
|
144
|
+
Raised when security checks fail (e.g., path traversal attempts,
|
|
145
|
+
unauthorized file access).
|
|
146
|
+
|
|
147
|
+
Attributes:
|
|
148
|
+
operation: The operation that was blocked
|
|
149
|
+
resource: The resource that was accessed
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
def __init__(
|
|
153
|
+
self,
|
|
154
|
+
message: str,
|
|
155
|
+
operation: str = "",
|
|
156
|
+
resource: str = "",
|
|
157
|
+
):
|
|
158
|
+
super().__init__(message)
|
|
159
|
+
self.operation = operation
|
|
160
|
+
self.resource = resource
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
__all__ = [
|
|
164
|
+
"HooksBaseError",
|
|
165
|
+
"TimeoutError",
|
|
166
|
+
"HookTimeoutError",
|
|
167
|
+
"GitOperationError",
|
|
168
|
+
"ConfigurationError",
|
|
169
|
+
"ValidationError",
|
|
170
|
+
"SecurityError",
|
|
171
|
+
]
|
|
@@ -188,7 +188,7 @@ class GitOperationsManager:
|
|
|
188
188
|
# Fallback to simple key
|
|
189
189
|
key_data = f"{operation_type.value}:{args}"
|
|
190
190
|
|
|
191
|
-
return hashlib.md5(key_data.encode()
|
|
191
|
+
return hashlib.md5(key_data.encode()).hexdigest()
|
|
192
192
|
|
|
193
193
|
def _is_cache_valid(self, entry: CacheEntry) -> bool:
|
|
194
194
|
"""Check if cache entry is still valid"""
|