moai-adk 0.4.5__py3-none-any.whl → 0.20.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +1 -1
- moai_adk/__main__.py +74 -1
- moai_adk/cli/commands/__init__.py +1 -1
- moai_adk/cli/commands/analyze.py +119 -0
- moai_adk/cli/commands/backup.py +25 -1
- moai_adk/cli/commands/doctor.py +31 -5
- moai_adk/cli/commands/improve_user_experience.py +307 -0
- moai_adk/cli/commands/init.py +111 -10
- moai_adk/cli/commands/status.py +33 -3
- moai_adk/cli/commands/update.py +921 -130
- moai_adk/cli/commands/validate_links.py +120 -0
- moai_adk/cli/prompts/init_prompts.py +22 -87
- moai_adk/core/analysis/__init__.py +9 -0
- moai_adk/core/analysis/session_analyzer.py +388 -0
- moai_adk/core/analysis/tag_chain_analyzer.py +344 -0
- moai_adk/core/analysis/tag_chain_repair.py +879 -0
- moai_adk/core/config/__init__.py +19 -0
- moai_adk/core/config/migration.py +235 -0
- moai_adk/core/git/__init__.py +1 -1
- moai_adk/core/git/branch.py +1 -1
- moai_adk/core/git/commit.py +1 -1
- moai_adk/core/git/manager.py +1 -1
- moai_adk/core/issue_creator.py +313 -0
- moai_adk/core/mcp/setup.py +56 -0
- moai_adk/core/mcp/setup_old.py +296 -0
- moai_adk/core/project/backup_utils.py +1 -1
- moai_adk/core/project/checker.py +2 -2
- moai_adk/core/project/detector.py +211 -12
- moai_adk/core/project/initializer.py +85 -15
- moai_adk/core/project/phase_executor.py +76 -13
- moai_adk/core/project/validator.py +13 -13
- moai_adk/core/quality/__init__.py +1 -1
- moai_adk/core/quality/trust_checker.py +1 -1
- moai_adk/core/quality/validators/__init__.py +1 -1
- moai_adk/core/quality/validators/base_validator.py +1 -1
- moai_adk/core/tags/__init__.py +86 -0
- moai_adk/core/tags/auto_corrector.py +693 -0
- moai_adk/core/tags/ci_validator.py +463 -0
- moai_adk/core/tags/cli.py +283 -0
- moai_adk/core/tags/generator.py +109 -0
- moai_adk/core/tags/inserter.py +99 -0
- moai_adk/core/tags/mapper.py +126 -0
- moai_adk/core/tags/parser.py +76 -0
- moai_adk/core/tags/policy_validator.py +580 -0
- moai_adk/core/tags/pre_commit_validator.py +421 -0
- moai_adk/core/tags/reporter.py +956 -0
- moai_adk/core/tags/rollback_manager.py +525 -0
- moai_adk/core/tags/tags.py +149 -0
- moai_adk/core/tags/validator.py +897 -0
- moai_adk/core/template/__init__.py +1 -1
- moai_adk/core/template/backup.py +1 -1
- moai_adk/core/template/merger.py +50 -1
- moai_adk/core/template/processor.py +119 -13
- moai_adk/core/template_engine.py +268 -0
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +348 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +209 -944
- moai_adk/templates/.claude/agents/alfred/database-expert.md +352 -0
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +34 -5
- moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +38 -8
- moai_adk/templates/.claude/agents/alfred/format-expert.md +469 -0
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +128 -9
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +104 -6
- moai_adk/templates/.claude/agents/alfred/project-manager.md +88 -16
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +36 -9
- moai_adk/templates/.claude/agents/alfred/security-expert.md +270 -0
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +214 -43
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +111 -9
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +309 -160
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +36 -7
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +605 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +393 -966
- moai_adk/templates/.claude/commands/alfred/1-plan.md +651 -367
- moai_adk/templates/.claude/commands/alfred/2-run.md +388 -241
- moai_adk/templates/.claude/commands/alfred/3-sync.md +1921 -410
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +153 -0
- moai_adk/templates/.claude/commands/alfred/release-new.md +3604 -0
- moai_adk/templates/.claude/hooks/alfred/core/project.py +484 -20
- moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
- moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
- moai_adk/templates/.claude/hooks/alfred/post_tool__enable_streaming_ui.py +50 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +93 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__tag_auto_corrector.py +407 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +99 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__realtime_tag_monitor.py +335 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__tag_policy_validator.py +325 -0
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +93 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__auto_cleanup.py +580 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +298 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +3 -3
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +5 -5
- moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +230 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/daily_analysis.py +351 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
- moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
- moai_adk/templates/.claude/hooks/alfred/utils/hook_config.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
- moai_adk/templates/.claude/output-styles/alfred/alfred-moai-adk-beginner.md +267 -0
- moai_adk/templates/.claude/output-styles/alfred/keating-personal-tutor.md +440 -0
- moai_adk/templates/.claude/output-styles/alfred/r2d2-agentic-coding.md +583 -0
- moai_adk/templates/.claude/settings.json +96 -14
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +242 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/SKILL.md +237 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/examples.md +871 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/reference.md +653 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/README.md +162 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/SKILL.md +227 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/examples.md +354 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/reference.md +158 -0
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +179 -79
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +117 -0
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/scripts/pre-review-check.sh +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +132 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +229 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/README.md +42 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/SKILL.md +429 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/examples.md +520 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/reference.md +405 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +369 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +539 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +320 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +161 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
- moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
- moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +269 -0
- moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
- moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
- moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
- moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
- moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
- moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
- moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +482 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +303 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +477 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +273 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +583 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +526 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +608 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +328 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +312 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +285 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +278 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +303 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
- moai_adk/templates/.claude/skills/moai-change-logger/SKILL.md +563 -0
- moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
- moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
- moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
- moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
- moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
- moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +102 -73
- moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
- moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
- moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
- moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +265 -64
- moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
- moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
- moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
- moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +80 -62
- moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +207 -50
- moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
- moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
- moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
- moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/.!11330!examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
- moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
- moai_adk/templates/.claude/skills/moai-jit-docs-enhanced/SKILL.md +460 -0
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
- moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +2358 -70
- moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +2962 -68
- moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +1898 -70
- moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +1465 -68
- moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +2364 -66
- moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +1630 -69
- moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +89 -61
- moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +735 -66
- moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
- moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
- moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
- moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +1834 -70
- moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +99 -74
- moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
- moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +1959 -69
- moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-template/SKILL.md +348 -0
- moai_adk/templates/.claude/skills/moai-lang-template/VARIABLES.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +1230 -66
- moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
- moai_adk/templates/.claude/skills/moai-learning-optimizer/SKILL.md +575 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/README.md +50 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/SKILL.md +304 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/examples.md +417 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/reference.md +704 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/README.md +87 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/SKILL.md +552 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/examples.md +1109 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/reference.md +514 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/validate.py +106 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/README.md +11 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/SKILL.md +622 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/examples.md +20 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/reference.md +12 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/README.md +152 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/SKILL.md +285 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/examples.md +333 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/reference.md +386 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/README.md +49 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/SKILL.md +319 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/examples.md +58 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/reference.md +123 -0
- moai_adk/templates/.claude/skills/moai-session-info/SKILL.md +314 -0
- moai_adk/templates/.claude/skills/moai-streaming-ui/SKILL.md +552 -0
- moai_adk/templates/.claude/skills/moai-tag-policy-validator/SKILL.md +570 -0
- moai_adk/templates/.git-hooks/pre-commit +66 -0
- moai_adk/templates/.git-hooks/pre-push +255 -0
- moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
- moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
- moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
- moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
- moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
- moai_adk/templates/.github/workflows/release.yml +118 -0
- moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/spec-issue-sync.yml +338 -0
- moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/tag-report.yml +269 -0
- moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
- moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
- moai_adk/templates/.mcp.json +31 -0
- moai_adk/templates/.moai/config.json +80 -7
- moai_adk/templates/CLAUDE.md +562 -546
- moai_adk/utils/banner.py +5 -5
- moai_adk/utils/common.py +294 -0
- moai_adk/utils/link_validator.py +235 -0
- moai_adk/utils/logger.py +8 -8
- moai_adk/utils/user_experience.py +451 -0
- moai_adk-0.20.1.dist-info/METADATA +233 -0
- moai_adk-0.20.1.dist-info/RECORD +404 -0
- moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -156
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -85
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -92
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -70
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -41
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -636
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -692
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -470
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -103
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -95
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -97
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -90
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -99
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
- moai_adk/templates/.moai/memory/development-guide.md +0 -344
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
- moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
- moai_adk/templates/.moai/project/product.md +0 -161
- moai_adk/templates/.moai/project/structure.md +0 -156
- moai_adk/templates/.moai/project/tech.md +0 -227
- moai_adk/templates/__init__.py +0 -2
- moai_adk-0.4.5.dist-info/METADATA +0 -369
- moai_adk-0.4.5.dist-info/RECORD +0 -152
- {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.5.dist-info → moai_adk-0.20.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,692 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: MoAI ADK Learning
|
|
3
|
-
description: Learning mode to easily learn MoAI-ADK concepts and workflow
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# MoAI ADK Learning
|
|
7
|
-
> Interactive prompts rely on `Skill("moai-alfred-tui-survey")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
|
|
8
|
-
|
|
9
|
-
**Audience**: Developers new to MoAI-ADK
|
|
10
|
-
|
|
11
|
-
This is a learning mode that helps you learn quickly by carefully explaining the core concepts and three-step workflow of MoAI-ADK.
|
|
12
|
-
|
|
13
|
-
## MoAI-ADK?
|
|
14
|
-
|
|
15
|
-
**Core philosophy**: “No code without specification, no implementation without testing.”
|
|
16
|
-
|
|
17
|
-
MoAI-ADK consists of three core concepts:
|
|
18
|
-
1. **SPEC-First**: Write specifications first before writing code
|
|
19
|
-
2. **@TAG Traceability**: Link all code to SPEC
|
|
20
|
-
3. **TRUST Quality**: 5 principles to ensure code quality
|
|
21
|
-
|
|
22
|
-
Let’s learn how these three concepts work one by one!
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Core Concept 1: SPEC-First
|
|
27
|
-
|
|
28
|
-
### What is SPEC?
|
|
29
|
-
|
|
30
|
-
**To put it simply**:
|
|
31
|
-
- A blueprint that writes down in advance what to make
|
|
32
|
-
- Steps and ingredients are clearly defined, like a cooking recipe.
|
|
33
|
-
|
|
34
|
-
**Why do you need it?**
|
|
35
|
-
- Clarify requirements before development
|
|
36
|
-
- Provide a baseline for communicating with team members
|
|
37
|
-
- Allows you to track changes later
|
|
38
|
-
- Answers the question, “Why was this code written?”
|
|
39
|
-
|
|
40
|
-
### EARS syntax: How to write requirements
|
|
41
|
-
|
|
42
|
-
EARS is a method of writing requirements using five patterns:
|
|
43
|
-
|
|
44
|
-
#### 1. Ubiquitous (basic function)
|
|
45
|
-
```markdown
|
|
46
|
-
The system must provide [function]
|
|
47
|
-
|
|
48
|
-
Example:
|
|
49
|
-
- The system must provide JWT based authentication
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
#### 2. Event-driven (conditional operation)
|
|
53
|
-
```markdown
|
|
54
|
-
WHEN [condition], the system must [operate]
|
|
55
|
-
|
|
56
|
-
Example:
|
|
57
|
-
- WHEN If valid credentials are provided, the system SHOULD issue a JWT token
|
|
58
|
-
- If the WHEN token expires, the system should return a 401 error
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
#### 3. State-driven
|
|
62
|
-
```markdown
|
|
63
|
-
WHILE When in [state], the system must [run]
|
|
64
|
-
|
|
65
|
-
Example:
|
|
66
|
-
- WHILE When the user is authenticated, the system SHOULD allow access to the protected resource
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
#### 4. Optional (Optional function)
|
|
70
|
-
```markdown
|
|
71
|
-
WHERE [condition], the system can [operate]
|
|
72
|
-
|
|
73
|
-
Example:
|
|
74
|
-
- WHERE If a refresh token is provided, the system can issue a new access token
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
#### 5. Constraints
|
|
78
|
-
```markdown
|
|
79
|
-
IF [condition], then the system SHOULD be [constrained]
|
|
80
|
-
|
|
81
|
-
Example:
|
|
82
|
-
- Token expiration time must not exceed 15 minutes
|
|
83
|
-
- Password must be at least 8 characters long
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Real-world example: Login function SPEC
|
|
87
|
-
|
|
88
|
-
```markdown
|
|
89
|
-
# @SPEC:AUTH-001: JWT authentication system
|
|
90
|
-
|
|
91
|
-
## Ubiquitous Requirements (Basic Features)
|
|
92
|
-
- The system must provide JWT-based authentication
|
|
93
|
-
|
|
94
|
-
## Event-driven Requirements (Conditional Actions)
|
|
95
|
-
- WHEN When valid credentials are provided, the system MUST issue a JWT token
|
|
96
|
-
- WHEN When the token expires, the system MUST return a 401 error
|
|
97
|
-
- WHEN If an invalid token is provided, the system MUST deny access
|
|
98
|
-
|
|
99
|
-
## State-driven Requirements
|
|
100
|
-
- WHILE When the user is authenticated, the system must allow access to protected resources.
|
|
101
|
-
|
|
102
|
-
## Optional Features
|
|
103
|
-
- WHERE If a refresh token is provided, the system can issue a new access token
|
|
104
|
-
|
|
105
|
-
## Constraints
|
|
106
|
-
- Access token expiration time must not exceed 15 minutes
|
|
107
|
-
- Refresh token expiration time must not exceed 7 days
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Key Concept 2: @TAG Traceability
|
|
113
|
-
|
|
114
|
-
### What is TAG?
|
|
115
|
-
|
|
116
|
-
**To put it simply**:
|
|
117
|
-
- Name tag attached to each piece of code
|
|
118
|
-
- String connecting SPEC → TEST → CODE → DOC
|
|
119
|
-
- When looking for code later, you can search by SPEC number
|
|
120
|
-
|
|
121
|
-
**Why do you need TAGs?**
|
|
122
|
-
- Can search by SPEC number when looking for code later
|
|
123
|
-
- Clear which code to modify if SPEC changes
|
|
124
|
-
- When reviewing code, ask yourself, “What requirements is this code?” Instant identification
|
|
125
|
-
- When a bug occurs, you can quickly find all related files
|
|
126
|
-
|
|
127
|
-
### TAG system
|
|
128
|
-
|
|
129
|
-
MoAI-ADK uses four TAGs:
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
@SPEC:ID → @TEST:ID → @CODE:ID → @DOC:ID
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
| TAG | Meaning | Location | Example |
|
|
136
|
-
| ---------- | -------------------------- | -------------- | -------------- |
|
|
137
|
-
| `@SPEC:ID` | Requirements Specification | `.moai/specs/` | @SPEC:AUTH-001 |
|
|
138
|
-
| `@TEST:ID` | test code | `tests/` | @TEST:AUTH-001 |
|
|
139
|
-
| `@CODE:ID` | Implementation code | `src/` | @CODE:AUTH-001 |
|
|
140
|
-
| `@DOC:ID` | document | `docs/` | @DOC:AUTH-001 |
|
|
141
|
-
|
|
142
|
-
### TAG ID Rule
|
|
143
|
-
|
|
144
|
-
**Format**: `<domain>-<3-digit number>`
|
|
145
|
-
|
|
146
|
-
**Example**:
|
|
147
|
-
- `AUTH-001`: First function related to authentication
|
|
148
|
-
- `USER-002`: Second function related to user
|
|
149
|
-
- `PAYMENT-015`: 15th function related to payment
|
|
150
|
-
|
|
151
|
-
**Important**: Once assigned, the TAG ID should never be changed!
|
|
152
|
-
|
|
153
|
-
### Real-world example: How to use TAG
|
|
154
|
-
|
|
155
|
-
#### SPEC File (`.moai/specs/SPEC-AUTH-001/spec.md`)
|
|
156
|
-
```yaml
|
|
157
|
-
---
|
|
158
|
-
id: AUTH-001
|
|
159
|
-
version: 0.0.1
|
|
160
|
-
status: draft
|
|
161
|
-
created: 2025-10-16
|
|
162
|
-
updated: 2025-10-16
|
|
163
|
-
author: @YourName
|
|
164
|
-
priority: high
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
# @SPEC:AUTH-001: JWT authentication system
|
|
168
|
-
|
|
169
|
-
[Requirement details...]
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
#### Test file (`tests/auth/service.test.ts`)
|
|
173
|
-
```typescript
|
|
174
|
-
// @TEST:AUTH-001 | SPEC: SPEC-AUTH-001.md
|
|
175
|
-
|
|
176
|
-
test('@TEST:AUTH-001: JWT issuance on valid credentials', async () => {
|
|
177
|
-
const service = new AuthService();
|
|
178
|
-
const result = await service.authenticate('user', 'pass');
|
|
179
|
-
expect(result.token).toBeDefined();
|
|
180
|
-
});
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
#### Implementation file (`src/auth/service.ts`)
|
|
184
|
-
```typescript
|
|
185
|
-
// @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/service.test.ts
|
|
186
|
-
|
|
187
|
-
export class AuthService {
|
|
188
|
-
async authenticate(username: string, password: string): Promise<AuthResult> {
|
|
189
|
-
//implementation
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
#### Documentation file (`docs/api/auth.md`)
|
|
195
|
-
```markdown
|
|
196
|
-
# @DOC:AUTH-001: Authentication API documentation
|
|
197
|
-
|
|
198
|
-
## POST /auth/login
|
|
199
|
-
[API description...]
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Search TAG
|
|
203
|
-
|
|
204
|
-
**Find a specific TAG**:
|
|
205
|
-
```bash
|
|
206
|
-
# Find all files related to AUTH-001
|
|
207
|
-
rg "AUTH-001" -n
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
**TAG Chain Verification**:
|
|
211
|
-
```bash
|
|
212
|
-
# Check all TAGs
|
|
213
|
-
rg '@(SPEC|TEST|CODE|DOC):' -n .moai/specs/ tests/ src/ docs/
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## Key Concept 3: TRUST 5 Principles
|
|
219
|
-
|
|
220
|
-
The five principles of writing good code are explained with an analogy:
|
|
221
|
-
|
|
222
|
-
### 1. 🧪 Test
|
|
223
|
-
|
|
224
|
-
**Metaphor**: Imagining the taste before cooking.
|
|
225
|
-
|
|
226
|
-
**Meaning**:
|
|
227
|
-
- Write tests first before writing code
|
|
228
|
-
- If the tests pass, the code works properly.
|
|
229
|
-
|
|
230
|
-
**Standard**:
|
|
231
|
-
- Test coverage ≥85%
|
|
232
|
-
- SPEC → Test → Code Strict order
|
|
233
|
-
|
|
234
|
-
**example**:
|
|
235
|
-
```typescript
|
|
236
|
-
// Write a test first (RED)
|
|
237
|
-
test('should add two numbers', () => {
|
|
238
|
-
expect(add(2, 3)).toBe(5); // Failed because there is no add function yet
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
// Write the next code (GREEN)
|
|
242
|
-
function add(a: number, b: number): number {
|
|
243
|
-
return a + b; // Test passed!
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### 2. 📖 Readable
|
|
248
|
-
|
|
249
|
-
**Similar**: Writing with neat handwriting
|
|
250
|
-
|
|
251
|
-
**Meaning**:
|
|
252
|
-
- Code that others can understand even if they read it
|
|
253
|
-
- Code that is easy to understand even if they look at it again later
|
|
254
|
-
|
|
255
|
-
**Criteria**:
|
|
256
|
-
- Function ≤50 lines
|
|
257
|
-
- File ≤300 lines
|
|
258
|
-
- Complexity ≤10
|
|
259
|
-
- Parameters ≤5
|
|
260
|
-
- Use meaningful names
|
|
261
|
-
|
|
262
|
-
**example**:
|
|
263
|
-
```typescript
|
|
264
|
-
// ❌ Bad example: difficult to understand
|
|
265
|
-
function f(x, y) {
|
|
266
|
-
return x + y;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// ✅ Good example: clear name
|
|
270
|
-
function calculateTotal(price: number, tax: number): number {
|
|
271
|
-
return price + tax;
|
|
272
|
-
}
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### 3. 🎯 Unified
|
|
276
|
-
|
|
277
|
-
**analogy**: using the same method
|
|
278
|
-
|
|
279
|
-
**Meaning**:
|
|
280
|
-
- Apply the same pattern consistently
|
|
281
|
-
- Once you learn one method, you can apply it everywhere.
|
|
282
|
-
|
|
283
|
-
**Criteria**:
|
|
284
|
-
- SPEC-based architecture
|
|
285
|
-
- Type safety or runtime verification
|
|
286
|
-
- Consistent coding style
|
|
287
|
-
|
|
288
|
-
**example**:
|
|
289
|
-
```typescript
|
|
290
|
-
// ✅ Uniformity: All APIs have the same pattern
|
|
291
|
-
async function getUser(id: string): Promise<User> { ... }
|
|
292
|
-
async function getPost(id: string): Promise<Post> { ... }
|
|
293
|
-
async function getComment(id: string): Promise<Comment> { ... }
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### 4. 🔒 Secured
|
|
297
|
-
|
|
298
|
-
**Similar**: Locking the door when you leave the house
|
|
299
|
-
|
|
300
|
-
**Meaning**:
|
|
301
|
-
- Protect your code from being exploited by hackers or bad actors
|
|
302
|
-
- Keep user data safe
|
|
303
|
-
|
|
304
|
-
**Criteria**:
|
|
305
|
-
- Input validation
|
|
306
|
-
- SQL Injection protection
|
|
307
|
-
- XSS/CSRF protection
|
|
308
|
-
- Password hashing
|
|
309
|
-
- Sensitive data protection
|
|
310
|
-
|
|
311
|
-
**example**:
|
|
312
|
-
```typescript
|
|
313
|
-
// ❌ Bad example: SQL Injection risk
|
|
314
|
-
const query = `SELECT * FROM users WHERE id = '${userId}'`;
|
|
315
|
-
|
|
316
|
-
// ✅ Good example: Using Prepared Statement
|
|
317
|
-
const query = 'SELECT * FROM users WHERE id = ?';
|
|
318
|
-
const user = await db.execute(query, [userId]);
|
|
319
|
-
|
|
320
|
-
// ❌ Bad example: storing password plaintext
|
|
321
|
-
user.password = password;
|
|
322
|
-
|
|
323
|
-
// ✅ Good example: password hashing
|
|
324
|
-
user.password = await bcrypt.hash(password, 10);
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
### 5. 🔗 Trackable
|
|
328
|
-
|
|
329
|
-
**Similar**: When organizing your closet, put a label on each box.
|
|
330
|
-
|
|
331
|
-
**Means**:
|
|
332
|
-
- You can quickly find the code you need later
|
|
333
|
-
- You can track the history of code changes
|
|
334
|
-
|
|
335
|
-
**Criteria**:
|
|
336
|
-
- Use the @TAG system
|
|
337
|
-
- Link code with SPEC
|
|
338
|
-
- Include TAG in Git commit messages
|
|
339
|
-
|
|
340
|
-
**example**:
|
|
341
|
-
```typescript
|
|
342
|
-
// @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/service.test.ts
|
|
343
|
-
export class AuthService {
|
|
344
|
-
//implementation
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
// Git commit message
|
|
348
|
-
// 🟢 feat(AUTH-001): implement JWT authentication
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
---
|
|
352
|
-
|
|
353
|
-
## Key Concept 4: Alfred and the 9 Agents
|
|
354
|
-
|
|
355
|
-
### What is Alfred?
|
|
356
|
-
|
|
357
|
-
**In a nutshell**:
|
|
358
|
-
- Central orchestrator (conductor) of MoAI-ADK
|
|
359
|
-
- Coordinates 9 specialized agents to provide optimal help
|
|
360
|
-
- Analyzes user requests and delegates tasks to appropriate agents
|
|
361
|
-
|
|
362
|
-
**Metaphor**: Coordinating multiple experts like an orchestra conductor
|
|
363
|
-
|
|
364
|
-
### Main Agents (Brief Introduction)
|
|
365
|
-
|
|
366
|
-
| agent | Role | When to use |
|
|
367
|
-
| --------------- | ------------------------------- | ----------------------------------------- |
|
|
368
|
-
| 🏗️ spec-builder | SPEC Writing Expert | `/alfred:1-plan` command |
|
|
369
|
-
| 💎 code-builder | TDD Implementation Expert | `/alfred:2-run` command |
|
|
370
|
-
| 📖 doc-syncer | Document Synchronization Expert | `/alfred:3-sync` command |
|
|
371
|
-
| 🔬debug-helper | Debugging expert | Automatically called when an error occurs |
|
|
372
|
-
| ✅ trust-checker | Quality verification expert | When checking code quality |
|
|
373
|
-
| 🏷️ tag-agent | TAG Management Expert | When verifying TAG |
|
|
374
|
-
|
|
375
|
-
**Full list of agents**: see `AGENTS.md` file
|
|
376
|
-
|
|
377
|
-
### How Alfred Works
|
|
378
|
-
|
|
379
|
-
```
|
|
380
|
-
user request
|
|
381
|
-
↓
|
|
382
|
-
Alfred analyzes the request
|
|
383
|
-
↓
|
|
384
|
-
Delegate to appropriate professional agent
|
|
385
|
-
↓
|
|
386
|
-
Agent performs task
|
|
387
|
-
↓
|
|
388
|
-
Alfred consolidates and reports results
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
---
|
|
392
|
-
|
|
393
|
-
## Learn the 3-step workflow
|
|
394
|
-
|
|
395
|
-
The core of MoAI-ADK is this three-step workflow:
|
|
396
|
-
|
|
397
|
-
```
|
|
398
|
-
/alfred:1-plan → /alfred:2-run → /alfred:3-sync
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
### Step 1: Write a SPEC (`/alfred:1-plan`)
|
|
402
|
-
|
|
403
|
-
**What do you do?**
|
|
404
|
-
- Write requirements in EARS syntax
|
|
405
|
-
- Create `.moai/specs/SPEC-{ID}/spec.md` file
|
|
406
|
-
- Automatically assign @SPEC:ID TAG
|
|
407
|
-
- Create Git branch (optional)
|
|
408
|
-
|
|
409
|
-
**Use example**:
|
|
410
|
-
```bash
|
|
411
|
-
/alfred:1-plan "JWT authentication system"
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
**Alfred does this automatically**:
|
|
415
|
-
1. Duplicate check: “Does AUTH-001 already exist?”
|
|
416
|
-
2. Create SPEC file: `.moai/specs/SPEC-AUTH-001/spec.md`
|
|
417
|
-
3. Add YAML metadata:
|
|
418
|
-
```yaml
|
|
419
|
-
---
|
|
420
|
-
id: AUTH-001
|
|
421
|
-
version: 0.0.1
|
|
422
|
-
status: draft
|
|
423
|
-
created: 2025-10-16
|
|
424
|
-
updated: 2025-10-16
|
|
425
|
-
author: @YourName
|
|
426
|
-
priority: high
|
|
427
|
-
---
|
|
428
|
-
```
|
|
429
|
-
4. EARS syntax template provided
|
|
430
|
-
5. @SPEC:AUTH-001 TAG allocation
|
|
431
|
-
|
|
432
|
-
**Example of deliverable**:
|
|
433
|
-
```yaml
|
|
434
|
-
---
|
|
435
|
-
id: AUTH-001
|
|
436
|
-
version: 0.0.1
|
|
437
|
-
status: draft
|
|
438
|
-
created: 2025-10-16
|
|
439
|
-
updated: 2025-10-16
|
|
440
|
-
author: @YourName
|
|
441
|
-
priority: high
|
|
442
|
-
---
|
|
443
|
-
|
|
444
|
-
# @SPEC:AUTH-001: JWT authentication system
|
|
445
|
-
|
|
446
|
-
## Ubiquitous Requirements
|
|
447
|
-
- The system must provide JWT-based authentication
|
|
448
|
-
|
|
449
|
-
## Event-driven Requirements
|
|
450
|
-
- WHEN Upon providing valid credentials, the system SHOULD issue a JWT token
|
|
451
|
-
- If the WHEN token expires, the system SHOULD return a 401 error
|
|
452
|
-
|
|
453
|
-
## Constraints
|
|
454
|
-
- Token expiration time must not exceed 15 minutes.
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
### Step 2: Implement TDD (`/alfred:2-run`)
|
|
458
|
-
|
|
459
|
-
**What do you do?**
|
|
460
|
-
- **RED**: Write tests that fail (`@TEST:ID`)
|
|
461
|
-
- **GREEN**: Pass tests with minimal implementation (`@CODE:ID`)
|
|
462
|
-
- **REFACTOR**: Improve code quality (apply TRUST 5 principles)
|
|
463
|
-
|
|
464
|
-
**Use example**:
|
|
465
|
-
```bash
|
|
466
|
-
/alfred:2-run AUTH-001
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
**Alfred does this automatically**:
|
|
470
|
-
|
|
471
|
-
#### 🔴 RED: Writing tests that fail
|
|
472
|
-
```typescript
|
|
473
|
-
// tests/auth/service.test.ts
|
|
474
|
-
// @TEST:AUTH-001 | SPEC: SPEC-AUTH-001.md
|
|
475
|
-
|
|
476
|
-
test('@TEST:AUTH-001: JWT issuance on valid credentials', async () => {
|
|
477
|
-
const service = new AuthService();
|
|
478
|
-
const result = await service.authenticate('user', 'pass');
|
|
479
|
-
expect(result.token).toBeDefined();
|
|
480
|
-
expect(result.expiresIn).toBeLessThanOrEqual(900); // 15 minutes
|
|
481
|
-
});
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
**Test Run**: ❌ FAIL (AuthService does not exist yet)
|
|
485
|
-
|
|
486
|
-
#### 🟢 GREEN: Minimal implementation
|
|
487
|
-
```typescript
|
|
488
|
-
// src/auth/service.ts
|
|
489
|
-
// @CODE:AUTH-001 | SPEC: SPEC-AUTH-001.md | TEST: tests/auth/service.test.ts
|
|
490
|
-
|
|
491
|
-
export class AuthService {
|
|
492
|
-
async authenticate(username: string, password: string): Promise<AuthResult> {
|
|
493
|
-
return {
|
|
494
|
-
token: jwt.sign({ username }, SECRET, { expiresIn: '15m' }),
|
|
495
|
-
expiresIn: 900
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
**Test Run**: ✅ PASS
|
|
502
|
-
|
|
503
|
-
#### ♻️ REFACTOR: Quality Improvement
|
|
504
|
-
```typescript
|
|
505
|
-
// Add input validation (Secured)
|
|
506
|
-
if (!username || !password) {
|
|
507
|
-
throw new ValidationError('Username and password required');
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// Function Separation (Readable)
|
|
511
|
-
private generateToken(username: string): string {
|
|
512
|
-
return jwt.sign({ username }, SECRET, { expiresIn: '15m' });
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
// Reduce complexity (Unified)
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
**Run Test**: ✅ PASS
|
|
519
|
-
**TRUST Verify**: ✅ All pass
|
|
520
|
-
|
|
521
|
-
**Git commit**:
|
|
522
|
-
```bash
|
|
523
|
-
1. 🔴 RED: test(AUTH-001): add failing auth service test
|
|
524
|
-
2. 🟢 GREEN: feat(AUTH-001): implement minimal auth service
|
|
525
|
-
3. ♻️ REFACTOR: refactor(AUTH-001): improve code quality per TRUST
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
### Step 3: Synchronize documents (`/alfred:3-sync`)
|
|
529
|
-
|
|
530
|
-
**What does it do?**
|
|
531
|
-
- TAG chain verification (@SPEC → @TEST → @CODE → @DOC)
|
|
532
|
-
- Orphan TAG detection (CODE without SPEC, etc.)
|
|
533
|
-
- Automatic creation of Living Document
|
|
534
|
-
- PR status update (Draft → Ready)
|
|
535
|
-
|
|
536
|
-
**Use example**:
|
|
537
|
-
```bash
|
|
538
|
-
/alfred:3-sync
|
|
539
|
-
```
|
|
540
|
-
|
|
541
|
-
**Alfred does this automatically**:
|
|
542
|
-
|
|
543
|
-
1. **TAG Chain Verification**:
|
|
544
|
-
```bash
|
|
545
|
-
rg '@(SPEC|TEST|CODE|DOC):' -n .moai/specs/ tests/ src/ docs/
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
2. **Verification results**:
|
|
549
|
-
```
|
|
550
|
-
✓ @SPEC:AUTH-001 → .moai/specs/SPEC-AUTH-001.md
|
|
551
|
-
✓ @TEST:AUTH-001 → tests/auth/service.test.ts
|
|
552
|
-
✓ @CODE:AUTH-001 → src/auth/service.ts
|
|
553
|
-
✓ @DOC:AUTH-001 → docs/api/auth.md
|
|
554
|
-
|
|
555
|
-
TAG Chain Integrity: 100%
|
|
556
|
-
Orphan TAG: None
|
|
557
|
-
SPEC Version Match: v0.0.1
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
3. **Create Living Document**:
|
|
561
|
-
```markdown
|
|
562
|
-
# @DOC:AUTH-001: Authentication API documentation
|
|
563
|
-
|
|
564
|
-
## POST /auth/login
|
|
565
|
-
|
|
566
|
-
**Requirements**: @SPEC:AUTH-001
|
|
567
|
-
**Implementation**: @CODE:AUTH-001
|
|
568
|
-
**Test**: @TEST:AUTH-001
|
|
569
|
-
|
|
570
|
-
[Automatically generated API documentation...]
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
4. **PR Status Transition Proposal**:
|
|
574
|
-
```
|
|
575
|
-
PR #123: feature/spec-auth-001
|
|
576
|
-
Current Status: Draft
|
|
577
|
-
Proposal: Ready for Review
|
|
578
|
-
|
|
579
|
-
SPEC requirements: ✅ All met
|
|
580
|
-
TDD history: ✅ RED → GREEN → REFACTOR
|
|
581
|
-
TRUST Verification: ✅ All passed
|
|
582
|
-
|
|
583
|
-
PR Ready conversion? (y/n)
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
---
|
|
587
|
-
|
|
588
|
-
## Practical example: Creating a simple calculator
|
|
589
|
-
|
|
590
|
-
Let’s put the 3-step workflow into practice!
|
|
591
|
-
|
|
592
|
-
### 1️⃣ Write SPEC
|
|
593
|
-
```bash
|
|
594
|
-
/alfred:1-plan "Calculator for adding two numbers"
|
|
595
|
-
|
|
596
|
-
# Created by Alfred: .moai/specs/SPEC-CALC-001/spec.md
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
**Generated SPEC**:
|
|
600
|
-
```yaml
|
|
601
|
-
---
|
|
602
|
-
id: CALC-001
|
|
603
|
-
version: 0.0.1
|
|
604
|
-
status: draft
|
|
605
|
-
created: 2025-10-16
|
|
606
|
-
updated: 2025-10-16
|
|
607
|
-
author: @YourName
|
|
608
|
-
priority: medium
|
|
609
|
-
---
|
|
610
|
-
|
|
611
|
-
# @SPEC:CALC-001: Calculator - addition function
|
|
612
|
-
|
|
613
|
-
## Ubiquitous Requirements
|
|
614
|
-
- The system must provide addition of two numbers
|
|
615
|
-
|
|
616
|
-
## Event-driven Requirements
|
|
617
|
-
- WHEN two numbers are entered, the system should return the sum
|
|
618
|
-
|
|
619
|
-
## Constraints
|
|
620
|
-
- Input must be numeric
|
|
621
|
-
- Results must be accurate
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
### 2️⃣ TDD implementation
|
|
625
|
-
```bash
|
|
626
|
-
/alfred:2-run CALC-001
|
|
627
|
-
|
|
628
|
-
# Alfred performs Red-Green-Refactor automatically
|
|
629
|
-
```
|
|
630
|
-
|
|
631
|
-
**Generated Code**:
|
|
632
|
-
```typescript
|
|
633
|
-
// tests/calc.test.ts
|
|
634
|
-
// @TEST:CALC-001 | SPEC: SPEC-CALC-001.md
|
|
635
|
-
test('@TEST:CALC-001: should add two numbers', () => {
|
|
636
|
-
expect(add(2, 3)).toBe(5);
|
|
637
|
-
expect(add(10, 20)).toBe(30);
|
|
638
|
-
});
|
|
639
|
-
|
|
640
|
-
// src/calc.ts
|
|
641
|
-
// @CODE:CALC-001 | SPEC: SPEC-CALC-001.md | TEST: tests/calc.test.ts
|
|
642
|
-
export function add(a: number, b: number): number {
|
|
643
|
-
if (typeof a !== 'number' || typeof b !== 'number') {
|
|
644
|
-
throw new TypeError('Both arguments must be numbers');
|
|
645
|
-
}
|
|
646
|
-
return a + b;
|
|
647
|
-
}
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
### 3️⃣ Document synchronization
|
|
651
|
-
```bash
|
|
652
|
-
/alfred:3-sync
|
|
653
|
-
|
|
654
|
-
# TAG verification and document generation
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
**result**:
|
|
658
|
-
```
|
|
659
|
-
✓ @SPEC:CALC-001
|
|
660
|
-
✓ @TEST:CALC-001
|
|
661
|
-
✓ @CODE:CALC-001
|
|
662
|
-
✓ @DOC:CALC-001
|
|
663
|
-
|
|
664
|
-
completion! SPEC → TEST → CODE → DOC completed with 3 commands!
|
|
665
|
-
```
|
|
666
|
-
|
|
667
|
-
---
|
|
668
|
-
|
|
669
|
-
## Next steps
|
|
670
|
-
|
|
671
|
-
### If you have learned MoAI-ADK
|
|
672
|
-
|
|
673
|
-
Now let's switch to a different style and put it into practice:
|
|
674
|
-
|
|
675
|
-
| Next goal | Recommended Style | Conversion command |
|
|
676
|
-
| --------------------------------- | --------------------- | --------------------------------- |
|
|
677
|
-
| Practical project development | **agentic-coding** | `/output-style agentic-coding` |
|
|
678
|
-
| Learning a new language/framework | **study-with-alfred** | `/output-style study-with-alfred` |
|
|
679
|
-
|
|
680
|
-
### Learn more
|
|
681
|
-
|
|
682
|
-
**Detailed guide**:
|
|
683
|
-
- `.moai/memory/development-guide.md` - Detailed development guide
|
|
684
|
-
- `.moai/project/structure.md` - Project structure
|
|
685
|
-
- `.moai/memory/spec-metadata.md` - SPEC metadata standard
|
|
686
|
-
|
|
687
|
-
**Agent Documentation**:
|
|
688
|
-
- `AGENTS.md` - Detailed description of 9 specialized agents
|
|
689
|
-
|
|
690
|
-
---
|
|
691
|
-
|
|
692
|
-
**MoAI ADK Learning**: A friendly learning mode that helps you quickly learn the core concepts and workflow of MoAI-ADK.
|