moai-adk 0.9.1__py3-none-any.whl → 0.11.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/core/project/phase_executor.py +4 -0
- moai_adk/core/tags/ci_validator.py +33 -3
- moai_adk/core/template_engine.py +6 -2
- moai_adk/templates/.git-hooks/pre-push +143 -0
- moai_adk/templates/.github/workflows/moai-gitflow.yml +6 -1
- moai_adk/templates/.github/workflows/release.yml +6 -2
- moai_adk/templates/.github/workflows/tag-validation.yml +57 -8
- moai_adk/templates/CLAUDE.md +477 -28
- moai_adk/templates/README.md +256 -0
- {moai_adk-0.9.1.dist-info → moai_adk-0.11.0.dist-info}/METADATA +740 -90
- moai_adk-0.11.0.dist-info/RECORD +77 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +0 -316
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +0 -208
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -214
- moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -406
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -350
- moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -273
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +0 -343
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +0 -865
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +0 -287
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -287
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -326
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -375
- moai_adk/templates/.claude/commands/alfred/0-project.md +0 -1189
- moai_adk/templates/.claude/commands/alfred/1-plan.md +0 -728
- moai_adk/templates/.claude/commands/alfred/2-run.md +0 -545
- moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -683
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +0 -149
- moai_adk/templates/.claude/hooks/alfred/.moai/cache/version-check.json +0 -9
- moai_adk/templates/.claude/hooks/alfred/README.md +0 -343
- moai_adk/templates/.claude/hooks/alfred/TROUBLESHOOTING.md +0 -471
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -209
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +0 -198
- moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +0 -108
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +0 -170
- moai_adk/templates/.claude/hooks/alfred/shared/core/checkpoint.py +0 -271
- moai_adk/templates/.claude/hooks/alfred/shared/core/context.py +0 -67
- moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +0 -683
- moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +0 -198
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +0 -198
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +0 -21
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +0 -25
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +0 -175
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +0 -90
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +0 -61
- moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +0 -102
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +0 -120
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -640
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -696
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -474
- moai_adk/templates/.claude/settings.json +0 -144
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -122
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +0 -237
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +0 -615
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +0 -653
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +0 -269
- moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +0 -32
- moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +0 -298
- moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +0 -26
- moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +0 -307
- moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +0 -21
- moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +0 -252
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +0 -19
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +0 -19
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +0 -24
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +0 -199
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +0 -39
- moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +0 -316
- moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +0 -18
- moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +0 -263
- moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +0 -30
- moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +0 -291
- moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +0 -15
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +0 -290
- moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +0 -1633
- moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +0 -660
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-database/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-database/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-security/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-security/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +0 -303
- moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +0 -1064
- moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +0 -1047
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +0 -116
- moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +0 -122
- moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +0 -29
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +0 -307
- moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +0 -1099
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-c/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-c/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-go/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-go/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-java/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-java/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +0 -125
- moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +0 -32
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-php/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-php/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +0 -431
- moai_adk/templates/.claude/skills/moai-lang-python/examples.md +0 -624
- moai_adk/templates/.claude/skills/moai-lang-python/reference.md +0 -316
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-r/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-r/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +0 -127
- moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +0 -34
- moai_adk/templates/.claude/skills/moai-skill-factory/CHECKLIST.md +0 -482
- moai_adk/templates/.claude/skills/moai-skill-factory/EXAMPLES.md +0 -278
- moai_adk/templates/.claude/skills/moai-skill-factory/INTERACTIVE-DISCOVERY.md +0 -524
- moai_adk/templates/.claude/skills/moai-skill-factory/METADATA.md +0 -477
- moai_adk/templates/.claude/skills/moai-skill-factory/PARALLEL-ANALYSIS-REPORT.md +0 -429
- moai_adk/templates/.claude/skills/moai-skill-factory/PYTHON-VERSION-MATRIX.md +0 -391
- moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-FACTORY-WORKFLOW.md +0 -431
- moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-UPDATE-ADVISOR.md +0 -577
- moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +0 -271
- moai_adk/templates/.claude/skills/moai-skill-factory/STEP-BY-STEP-GUIDE.md +0 -466
- moai_adk/templates/.claude/skills/moai-skill-factory/STRUCTURE.md +0 -583
- moai_adk/templates/.claude/skills/moai-skill-factory/WEB-RESEARCH.md +0 -526
- moai_adk/templates/.claude/skills/moai-skill-factory/reference.md +0 -465
- moai_adk/templates/.claude/skills/moai-skill-factory/scripts/generate-structure.sh +0 -328
- moai_adk/templates/.claude/skills/moai-skill-factory/scripts/validate-skill.sh +0 -312
- moai_adk/templates/.claude/skills/moai-skill-factory/templates/SKILL_TEMPLATE.md +0 -245
- moai_adk/templates/.claude/skills/moai-skill-factory/templates/examples-template.md +0 -285
- moai_adk/templates/.claude/skills/moai-skill-factory/templates/reference-template.md +0 -278
- moai_adk/templates/.claude/skills/moai-skill-factory/templates/scripts-template.sh +0 -303
- moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +0 -137
- moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +0 -219
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh +0 -161
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +0 -541
- moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +0 -622
- moai_adk/templates/.github/workflows/tag-report.yml +0 -261
- moai_adk/templates/.moai/config.json +0 -113
- moai_adk/templates/.moai/docs/quick-issue-creation-guide.md +0 -219
- moai_adk/templates/.moai/hooks/install.sh +0 -79
- moai_adk/templates/.moai/hooks/pre-commit.sh +0 -66
- moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md +0 -208
- moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md +0 -369
- moai_adk/templates/.moai/memory/CLAUDE-RULES.md +0 -539
- moai_adk/templates/.moai/memory/DEVELOPMENT-GUIDE.md +0 -344
- moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
- moai_adk/templates/.moai/memory/ISSUE-LABEL-MAPPING.md +0 -150
- moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md +0 -218
- moai_adk/templates/.moai/memory/SPEC-METADATA.md +0 -356
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
- moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
- moai_adk/templates/.moai/project/product.md +0 -161
- moai_adk/templates/.moai/project/structure.md +0 -156
- moai_adk/templates/.moai/project/tech.md +0 -227
- moai_adk/templates/src/moai_adk/core/__init__.py +0 -5
- moai_adk/templates/src/moai_adk/core/tags/__init__.py +0 -86
- moai_adk/templates/src/moai_adk/core/tags/ci_validator.py +0 -433
- moai_adk/templates/src/moai_adk/core/tags/cli.py +0 -283
- moai_adk/templates/src/moai_adk/core/tags/validator.py +0 -897
- moai_adk-0.9.1.dist-info/RECORD +0 -320
- {moai_adk-0.9.1.dist-info → moai_adk-0.11.0.dist-info}/WHEEL +0 -0
- {moai_adk-0.9.1.dist-info → moai_adk-0.11.0.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.9.1.dist-info → moai_adk-0.11.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -312,8 +312,12 @@ class PhaseExecutor:
|
|
|
312
312
|
cwd=project_path,
|
|
313
313
|
check=True,
|
|
314
314
|
capture_output=True,
|
|
315
|
+
timeout=30, # Default timeout for git operations
|
|
315
316
|
)
|
|
316
317
|
# Intentionally avoid printing to keep progress output clean
|
|
318
|
+
except subprocess.TimeoutExpired:
|
|
319
|
+
# Timeout is non-fatal
|
|
320
|
+
pass
|
|
317
321
|
except subprocess.CalledProcessError:
|
|
318
322
|
# Only log on error; failures are non-fatal
|
|
319
323
|
pass
|
|
@@ -16,6 +16,8 @@ import os
|
|
|
16
16
|
from typing import Any, Dict, List, Optional
|
|
17
17
|
|
|
18
18
|
import requests
|
|
19
|
+
from requests.adapters import HTTPAdapter
|
|
20
|
+
from urllib3.util import Retry
|
|
19
21
|
|
|
20
22
|
from .pre_commit_validator import (
|
|
21
23
|
PreCommitValidator,
|
|
@@ -87,16 +89,44 @@ class CIValidator(PreCommitValidator):
|
|
|
87
89
|
'Accept': 'application/vnd.github.v3+json'
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
# Create session with retry strategy
|
|
93
|
+
session = requests.Session()
|
|
94
|
+
retry = Retry(
|
|
95
|
+
total=3,
|
|
96
|
+
backoff_factor=0.5,
|
|
97
|
+
status_forcelist=[500, 502, 503, 504],
|
|
98
|
+
allowed_methods=["GET"]
|
|
99
|
+
)
|
|
100
|
+
adapter = HTTPAdapter(max_retries=retry)
|
|
101
|
+
session.mount("https://", adapter)
|
|
102
|
+
|
|
90
103
|
try:
|
|
91
|
-
|
|
104
|
+
# Dual timeout: (connect_timeout, read_timeout)
|
|
105
|
+
response = session.get(
|
|
106
|
+
url,
|
|
107
|
+
headers=headers,
|
|
108
|
+
timeout=(5, 10)
|
|
109
|
+
)
|
|
92
110
|
response.raise_for_status()
|
|
93
111
|
|
|
94
112
|
files_data = response.json()
|
|
95
113
|
return [file_info['filename'] for file_info in files_data]
|
|
96
114
|
|
|
97
|
-
except
|
|
98
|
-
#
|
|
115
|
+
except requests.exceptions.Timeout:
|
|
116
|
+
# Network timeout - return empty list gracefully
|
|
117
|
+
return []
|
|
118
|
+
except requests.exceptions.HTTPError as e:
|
|
119
|
+
# HTTP error (4xx, 5xx)
|
|
120
|
+
if e.response.status_code == 404:
|
|
121
|
+
# PR not found
|
|
122
|
+
return []
|
|
123
|
+
# Other HTTP errors: log but continue
|
|
124
|
+
return []
|
|
125
|
+
except requests.exceptions.RequestException:
|
|
126
|
+
# Network/connection errors
|
|
99
127
|
return []
|
|
128
|
+
finally:
|
|
129
|
+
session.close()
|
|
100
130
|
|
|
101
131
|
def validate_pr_changes(
|
|
102
132
|
self,
|
moai_adk/core/template_engine.py
CHANGED
|
@@ -31,13 +31,17 @@ class TemplateEngine:
|
|
|
31
31
|
- File-based and string-based template rendering
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
|
-
def __init__(self, strict_undefined: bool =
|
|
34
|
+
def __init__(self, strict_undefined: bool = True):
|
|
35
35
|
"""
|
|
36
36
|
Initialize the template engine.
|
|
37
37
|
|
|
38
38
|
Args:
|
|
39
|
-
strict_undefined: If True, raise error on undefined variables.
|
|
39
|
+
strict_undefined: If True, raise error on undefined variables (default: True).
|
|
40
40
|
If False, render undefined variables as empty strings.
|
|
41
|
+
|
|
42
|
+
Note:
|
|
43
|
+
Changed to strict_undefined=True (v0.10.2+) for safer template rendering.
|
|
44
|
+
Variables must be explicitly provided to avoid silent template failures.
|
|
41
45
|
"""
|
|
42
46
|
self.strict_undefined = strict_undefined
|
|
43
47
|
self.undefined_behavior = StrictUndefined if strict_undefined else None
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# MoAI-ADK GitFlow Main Branch Control Hook
|
|
4
|
+
# Purpose: Enforce GitFlow in team mode, advisory in personal mode
|
|
5
|
+
# Enforces: Strict team workflow, flexible personal development
|
|
6
|
+
#
|
|
7
|
+
# This hook runs before any git push operation:
|
|
8
|
+
# Team Mode: Blocks direct main/master push (non-develop), requires confirmation for develop→main
|
|
9
|
+
# Personal Mode: Advisory warnings, allows flexibility
|
|
10
|
+
#
|
|
11
|
+
# Exit codes:
|
|
12
|
+
# 0 - Push allowed
|
|
13
|
+
# 1 - Push blocked (team mode violation or user declined)
|
|
14
|
+
|
|
15
|
+
# Check team mode from .moai/config.json
|
|
16
|
+
is_team_mode() {
|
|
17
|
+
if [ -f ".moai/config.json" ]; then
|
|
18
|
+
# Check if mode is "team"
|
|
19
|
+
grep -q '"mode".*:.*"team"' ".moai/config.json" 2>/dev/null
|
|
20
|
+
return $?
|
|
21
|
+
fi
|
|
22
|
+
return 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Colors for output
|
|
26
|
+
RED='\033[0;31m'
|
|
27
|
+
YELLOW='\033[1;33m'
|
|
28
|
+
GREEN='\033[0;32m'
|
|
29
|
+
BLUE='\033[0;34m'
|
|
30
|
+
NC='\033[0m' # No Color
|
|
31
|
+
|
|
32
|
+
TEAM_MODE=false
|
|
33
|
+
is_team_mode && TEAM_MODE=true
|
|
34
|
+
|
|
35
|
+
# Read from stdin (git sends remote, local ref info)
|
|
36
|
+
# Format: <local ref> <local oid> <remote ref> <remote oid>
|
|
37
|
+
while read local_ref local_oid remote_ref remote_oid; do
|
|
38
|
+
# Extract the remote branch name from the reference
|
|
39
|
+
# remote_ref format: refs/heads/main
|
|
40
|
+
remote_branch=$(echo "$remote_ref" | sed 's|refs/heads/||')
|
|
41
|
+
local_branch=$(echo "$local_ref" | sed 's|refs/heads/||')
|
|
42
|
+
|
|
43
|
+
# Check if attempting to push to main branch
|
|
44
|
+
if [ "$remote_branch" = "main" ] || [ "$remote_branch" = "master" ]; then
|
|
45
|
+
# Get the current branch to determine if this is the develop branch
|
|
46
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
47
|
+
|
|
48
|
+
# TEAM MODE ENFORCEMENT
|
|
49
|
+
if [ "$TEAM_MODE" = true ]; then
|
|
50
|
+
# Block non-develop, non-release branches from pushing to main
|
|
51
|
+
if [ "$local_branch" != "develop" ] && [ "${local_branch#release/}" = "$local_branch" ]; then
|
|
52
|
+
echo ""
|
|
53
|
+
echo -e "${RED}❌ BLOCKED: Non-standard GitFlow in TEAM MODE${NC}"
|
|
54
|
+
echo ""
|
|
55
|
+
echo -e "${BLUE}Current branch: ${local_branch}${NC}"
|
|
56
|
+
echo -e "${BLUE}Target branch: ${remote_branch}${NC}"
|
|
57
|
+
echo ""
|
|
58
|
+
echo "🚀 Correct GitFlow workflow for TEAM MODE:"
|
|
59
|
+
echo " 1. Work on feature/SPEC-{ID} branch (created from develop)"
|
|
60
|
+
echo " 2. Push to feature/SPEC-{ID} and create PR to develop"
|
|
61
|
+
echo " 3. Code review & merge into develop"
|
|
62
|
+
echo " 4. When develop is stable, create PR from develop to main"
|
|
63
|
+
echo " 5. Release manager merges develop → main with tag"
|
|
64
|
+
echo ""
|
|
65
|
+
echo -e "${RED}⚠️ Push to ${remote_branch} blocked in team mode${NC}"
|
|
66
|
+
echo ""
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# For develop → main or release/* → main, ask for confirmation
|
|
71
|
+
if [ "$local_branch" = "develop" ] || [ "${local_branch#release/}" != "$local_branch" ]; then
|
|
72
|
+
echo ""
|
|
73
|
+
echo -e "${YELLOW}⚠️ TEAM MODE: Pushing ${local_branch} → ${remote_branch}${NC}"
|
|
74
|
+
echo ""
|
|
75
|
+
echo "📋 Summary:"
|
|
76
|
+
echo " • Source branch: ${local_branch}"
|
|
77
|
+
echo " • Target branch: ${remote_branch}"
|
|
78
|
+
echo " • Mode: TEAM MODE (strict enforcement)"
|
|
79
|
+
echo ""
|
|
80
|
+
read -p "❓ Are you sure you want to push ${local_branch} to ${remote_branch}? (y/n) " -n 1 -r
|
|
81
|
+
echo ""
|
|
82
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
83
|
+
echo -e "${RED}✓ Push cancelled by user${NC}"
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
86
|
+
fi
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
# PERSONAL MODE: Advisory warnings (allow all pushes)
|
|
90
|
+
if [ "$TEAM_MODE" = false ]; then
|
|
91
|
+
# Advisory: recommend develop -> main workflow
|
|
92
|
+
if [ "$local_branch" != "develop" ] && [ "${local_branch#release/}" = "$local_branch" ]; then
|
|
93
|
+
echo ""
|
|
94
|
+
echo -e "${YELLOW}⚠️ ADVISORY: Non-standard GitFlow detected${NC}"
|
|
95
|
+
echo ""
|
|
96
|
+
echo -e "${BLUE}Current branch: ${local_branch}${NC}"
|
|
97
|
+
echo -e "${BLUE}Target branch: ${remote_branch}${NC}"
|
|
98
|
+
echo ""
|
|
99
|
+
echo "Recommended GitFlow workflow:"
|
|
100
|
+
echo " 1. Work on feature/SPEC-{ID} branch (created from develop)"
|
|
101
|
+
echo " 2. Push to feature/SPEC-{ID} and create PR to develop"
|
|
102
|
+
echo " 3. Merge into develop after code review"
|
|
103
|
+
echo " 4. When develop is stable, create PR from develop to main"
|
|
104
|
+
echo " 5. Release manager merges develop -> main with tag"
|
|
105
|
+
echo ""
|
|
106
|
+
echo -e "${GREEN}✓ Push will proceed (personal mode - flexibility enabled)${NC}"
|
|
107
|
+
echo ""
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# Check for delete operation
|
|
111
|
+
if [ "$local_oid" = "0000000000000000000000000000000000000000" ]; then
|
|
112
|
+
echo ""
|
|
113
|
+
echo -e "${RED}⚠️ WARNING: Attempting to delete main branch${NC}"
|
|
114
|
+
echo ""
|
|
115
|
+
echo -e "${YELLOW}This operation is highly discouraged.${NC}"
|
|
116
|
+
echo -e "${GREEN}✓ Push will proceed (personal mode - flexibility enabled)${NC}"
|
|
117
|
+
echo ""
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
# Check for force push attempts to main
|
|
121
|
+
if [ "$remote_branch" = "main" ] || [ "$remote_branch" = "master" ]; then
|
|
122
|
+
# Check if remote_oid exists (non-zero means we're trying to update existing ref)
|
|
123
|
+
if [ "$remote_oid" != "0000000000000000000000000000000000000000" ]; then
|
|
124
|
+
# Verify this is a fast-forward merge (no force push)
|
|
125
|
+
if ! git merge-base --is-ancestor "$remote_oid" "$local_oid" 2>/dev/null; then
|
|
126
|
+
echo ""
|
|
127
|
+
echo -e "${YELLOW}⚠️ ADVISORY: Force-push to main branch detected${NC}"
|
|
128
|
+
echo ""
|
|
129
|
+
echo "Recommended approach:"
|
|
130
|
+
echo " - Use GitHub PR with proper code review"
|
|
131
|
+
echo " - Ensure changes are merged via fast-forward"
|
|
132
|
+
echo ""
|
|
133
|
+
echo -e "${GREEN}✓ Push will proceed (personal mode - flexibility enabled)${NC}"
|
|
134
|
+
echo ""
|
|
135
|
+
fi
|
|
136
|
+
fi
|
|
137
|
+
fi
|
|
138
|
+
fi
|
|
139
|
+
fi
|
|
140
|
+
done
|
|
141
|
+
|
|
142
|
+
# All checks passed (or advisory warnings shown)
|
|
143
|
+
exit 0
|
|
@@ -13,6 +13,11 @@ jobs:
|
|
|
13
13
|
moai-pipeline:
|
|
14
14
|
name: "{{PROJECT_NAME}} Pipeline"
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
20
|
+
|
|
16
21
|
steps:
|
|
17
22
|
- name: Checkout
|
|
18
23
|
uses: actions/checkout@v4
|
|
@@ -22,7 +27,7 @@ jobs:
|
|
|
22
27
|
if: ${{ hashFiles('requirements.txt') != '' || hashFiles('pyproject.toml') != '' || hashFiles('setup.py') != '' }}
|
|
23
28
|
uses: actions/setup-python@v5
|
|
24
29
|
with:
|
|
25
|
-
python-version:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
26
31
|
|
|
27
32
|
- name: Setup Node.js
|
|
28
33
|
if: ${{ hashFiles('package.json') != '' }}
|
|
@@ -10,14 +10,18 @@ jobs:
|
|
|
10
10
|
name: 📦 Deploy to PyPI
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
13
17
|
steps:
|
|
14
18
|
- name: 📥 Checkout code
|
|
15
19
|
uses: actions/checkout@v4
|
|
16
20
|
|
|
17
|
-
- name: 🐍 Setup Python
|
|
21
|
+
- name: 🐍 Setup Python ${{ matrix.python-version }}
|
|
18
22
|
uses: actions/setup-python@v5
|
|
19
23
|
with:
|
|
20
|
-
python-version:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
21
25
|
|
|
22
26
|
- name: 📦 Install uv
|
|
23
27
|
uses: astral-sh/setup-uv@v2
|
|
@@ -10,33 +10,82 @@ on:
|
|
|
10
10
|
branches: [main, develop, "feature/**"]
|
|
11
11
|
|
|
12
12
|
jobs:
|
|
13
|
+
detect-language:
|
|
14
|
+
name: 🔍 Detect Project Language
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
language: ${{ steps.detect.outputs.language }}
|
|
18
|
+
is-python: ${{ steps.detect.outputs.is-python }}
|
|
19
|
+
is-javascript: ${{ steps.detect.outputs.is-javascript }}
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Detect language
|
|
26
|
+
id: detect
|
|
27
|
+
run: |
|
|
28
|
+
if [ -f "pyproject.toml" ] || [ -f "setup.py" ] || [ -f "requirements.txt" ]; then
|
|
29
|
+
echo "language=python" >> $GITHUB_OUTPUT
|
|
30
|
+
echo "is-python=true" >> $GITHUB_OUTPUT
|
|
31
|
+
echo "is-javascript=false" >> $GITHUB_OUTPUT
|
|
32
|
+
elif [ -f "package.json" ]; then
|
|
33
|
+
echo "language=javascript" >> $GITHUB_OUTPUT
|
|
34
|
+
echo "is-python=false" >> $GITHUB_OUTPUT
|
|
35
|
+
echo "is-javascript=true" >> $GITHUB_OUTPUT
|
|
36
|
+
else
|
|
37
|
+
echo "language=unknown" >> $GITHUB_OUTPUT
|
|
38
|
+
echo "is-python=false" >> $GITHUB_OUTPUT
|
|
39
|
+
echo "is-javascript=false" >> $GITHUB_OUTPUT
|
|
40
|
+
fi
|
|
41
|
+
|
|
13
42
|
validate-tags:
|
|
14
43
|
name: 🏷️ Validate TAG Annotations
|
|
15
44
|
runs-on: ubuntu-latest
|
|
45
|
+
needs: detect-language
|
|
16
46
|
|
|
17
47
|
# Skip validation on draft PRs (allow WIP)
|
|
18
48
|
if: github.event.pull_request.draft == false || github.event_name == 'push'
|
|
19
49
|
|
|
50
|
+
permissions:
|
|
51
|
+
contents: read
|
|
52
|
+
pull-requests: write
|
|
53
|
+
|
|
54
|
+
strategy:
|
|
55
|
+
matrix:
|
|
56
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
57
|
+
node-version: ["18", "20"]
|
|
58
|
+
|
|
20
59
|
steps:
|
|
21
60
|
- name: Checkout code
|
|
22
61
|
uses: actions/checkout@v4
|
|
23
62
|
with:
|
|
24
63
|
fetch-depth: 0 # Fetch all history for comprehensive validation
|
|
25
64
|
|
|
26
|
-
- name: Setup Python
|
|
65
|
+
- name: Setup Python (if Python project)
|
|
66
|
+
if: needs.detect-language.outputs.is-python == 'true'
|
|
27
67
|
uses: actions/setup-python@v5
|
|
28
68
|
with:
|
|
29
|
-
python-version:
|
|
69
|
+
python-version: ${{ matrix.python-version }}
|
|
30
70
|
|
|
31
|
-
- name:
|
|
32
|
-
|
|
71
|
+
- name: Setup Node.js (if JavaScript project)
|
|
72
|
+
if: needs.detect-language.outputs.is-javascript == 'true'
|
|
73
|
+
uses: actions/setup-node@v4
|
|
33
74
|
with:
|
|
34
|
-
version:
|
|
75
|
+
node-version: ${{ matrix.node-version }}
|
|
76
|
+
|
|
77
|
+
- name: Install dependencies (Python)
|
|
78
|
+
if: needs.detect-language.outputs.is-python == 'true'
|
|
79
|
+
run: |
|
|
80
|
+
python -m pip install --upgrade pip
|
|
81
|
+
pip install -e .
|
|
82
|
+
pip install requests
|
|
35
83
|
|
|
36
|
-
- name: Install dependencies
|
|
84
|
+
- name: Install dependencies (JavaScript)
|
|
85
|
+
if: needs.detect-language.outputs.is-javascript == 'true'
|
|
37
86
|
run: |
|
|
38
|
-
|
|
39
|
-
|
|
87
|
+
npm ci
|
|
88
|
+
npm install requests 2>/dev/null || true
|
|
40
89
|
|
|
41
90
|
- name: Get PR number
|
|
42
91
|
id: pr
|