moai-adk 0.15.1__py3-none-any.whl → 0.25.4__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 -2
- moai_adk/__main__.py +85 -2
- moai_adk/cli/__init__.py +0 -1
- moai_adk/cli/commands/__init__.py +0 -1
- moai_adk/cli/commands/analyze.py +127 -0
- moai_adk/cli/commands/backup.py +5 -3
- moai_adk/cli/commands/doctor.py +35 -11
- moai_adk/cli/commands/improve_user_experience.py +348 -0
- moai_adk/cli/commands/init.py +150 -23
- moai_adk/cli/commands/language.py +269 -0
- moai_adk/cli/commands/migrate.py +158 -0
- moai_adk/cli/commands/status.py +13 -12
- moai_adk/cli/commands/update.py +364 -60
- moai_adk/cli/commands/validate_links.py +118 -0
- moai_adk/cli/main.py +3 -2
- moai_adk/cli/prompts/init_prompts.py +79 -82
- moai_adk/core/__init__.py +0 -1
- moai_adk/core/analysis/__init__.py +9 -0
- moai_adk/core/analysis/session_analyzer.py +439 -0
- moai_adk/core/claude_integration.py +421 -0
- moai_adk/core/command_helpers.py +270 -0
- moai_adk/core/config/__init__.py +6 -0
- moai_adk/core/config/auto_spec_config.py +346 -0
- moai_adk/core/config/migration.py +133 -12
- moai_adk/core/context_manager.py +279 -0
- moai_adk/core/diagnostics/slash_commands.py +0 -1
- moai_adk/core/error_recovery_system.py +1289 -0
- moai_adk/core/git/__init__.py +0 -1
- moai_adk/core/git/branch.py +0 -1
- moai_adk/core/git/branch_manager.py +4 -4
- moai_adk/core/git/checkpoint.py +1 -5
- moai_adk/core/git/commit.py +0 -1
- moai_adk/core/git/event_detector.py +3 -5
- moai_adk/core/git/manager.py +0 -1
- moai_adk/core/hooks/post_tool_auto_spec_completion.py +925 -0
- moai_adk/core/integration/__init__.py +22 -0
- moai_adk/core/integration/engine.py +169 -0
- moai_adk/core/integration/integration_tester.py +225 -0
- moai_adk/core/integration/models.py +88 -0
- moai_adk/core/integration/utils.py +211 -0
- moai_adk/core/issue_creator.py +28 -18
- moai_adk/core/language_config.py +202 -0
- moai_adk/core/language_validator.py +556 -0
- moai_adk/core/mcp/setup.py +113 -0
- moai_adk/core/migration/__init__.py +18 -0
- moai_adk/core/migration/backup_manager.py +208 -0
- moai_adk/core/migration/file_migrator.py +218 -0
- moai_adk/core/migration/version_detector.py +143 -0
- moai_adk/core/migration/version_migrator.py +228 -0
- moai_adk/core/performance/__init__.py +6 -0
- moai_adk/core/performance/cache_system.py +318 -0
- moai_adk/core/performance/parallel_processor.py +116 -0
- moai_adk/core/project/__init__.py +0 -1
- moai_adk/core/project/backup_utils.py +2 -7
- moai_adk/core/project/checker.py +3 -3
- moai_adk/core/project/detector.py +20 -40
- moai_adk/core/project/initializer.py +42 -17
- moai_adk/core/project/phase_executor.py +415 -58
- moai_adk/core/project/validator.py +6 -25
- moai_adk/core/quality/__init__.py +1 -1
- moai_adk/core/quality/trust_checker.py +64 -110
- moai_adk/core/quality/validators/__init__.py +1 -1
- moai_adk/core/quality/validators/base_validator.py +1 -1
- moai_adk/core/rollback_manager.py +993 -0
- moai_adk/core/session_manager.py +667 -0
- moai_adk/core/spec/confidence_scoring.py +749 -0
- moai_adk/core/spec/ears_template_engine.py +1182 -0
- moai_adk/core/spec/quality_validator.py +721 -0
- moai_adk/core/spec_status_manager.py +488 -0
- moai_adk/core/template/__init__.py +0 -1
- moai_adk/core/template/backup.py +41 -1
- moai_adk/core/template/config.py +11 -12
- moai_adk/core/template/languages.py +0 -1
- moai_adk/core/template/merger.py +79 -22
- moai_adk/core/template/processor.py +614 -40
- moai_adk/core/template_engine.py +36 -27
- moai_adk/foundation/git/commit_templates.py +565 -0
- moai_adk/foundation/trust/trust_principles.py +725 -0
- moai_adk/foundation/trust/validation_checklist.py +1678 -0
- moai_adk/statusline/__init__.py +38 -0
- moai_adk/statusline/alfred_detector.py +107 -0
- moai_adk/statusline/config.py +364 -0
- moai_adk/statusline/enhanced_output_style_detector.py +364 -0
- moai_adk/statusline/git_collector.py +190 -0
- moai_adk/statusline/main.py +228 -0
- moai_adk/statusline/metrics_tracker.py +78 -0
- moai_adk/statusline/renderer.py +327 -0
- moai_adk/statusline/update_checker.py +135 -0
- moai_adk/statusline/version_reader.py +647 -0
- moai_adk/templates/.git-hooks/pre-commit +66 -0
- moai_adk/templates/.git-hooks/pre-push +116 -4
- moai_adk/templates/.github/workflows/moai-gitflow.yml +1 -7
- moai_adk/templates/.github/workflows/spec-issue-sync.yml +0 -1
- moai_adk/templates/.gitignore +44 -0
- moai_adk/templates/.mcp.json +22 -0
- moai_adk/templates/CLAUDE.md +450 -1071
- moai_adk/utils/__init__.py +0 -1
- moai_adk/utils/banner.py +0 -1
- moai_adk/utils/common.py +308 -0
- moai_adk/utils/link_validator.py +249 -0
- moai_adk/utils/logger.py +4 -9
- moai_adk/utils/safe_file_reader.py +210 -0
- moai_adk/utils/user_experience.py +531 -0
- moai_adk-0.25.4.dist-info/METADATA +2279 -0
- moai_adk-0.25.4.dist-info/RECORD +112 -0
- moai_adk/core/tags/__init__.py +0 -86
- moai_adk/core/tags/ci_validator.py +0 -463
- moai_adk/core/tags/cli.py +0 -283
- moai_adk/core/tags/generator.py +0 -109
- moai_adk/core/tags/inserter.py +0 -99
- moai_adk/core/tags/mapper.py +0 -126
- moai_adk/core/tags/parser.py +0 -76
- moai_adk/core/tags/pre_commit_validator.py +0 -393
- moai_adk/core/tags/reporter.py +0 -956
- moai_adk/core/tags/tags.py +0 -149
- moai_adk/core/tags/validator.py +0 -897
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +0 -319
- 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/devops-expert.md +0 -464
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +0 -214
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +0 -357
- moai_adk/templates/.claude/agents/alfred/git-manager.md +0 -406
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +0 -423
- moai_adk/templates/.claude/agents/alfred/project-manager.md +0 -312
- 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 -426
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +0 -361
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +0 -428
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +0 -375
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +0 -571
- moai_adk/templates/.claude/commands/alfred/0-project.md +0 -1854
- moai_adk/templates/.claude/commands/alfred/1-plan.md +0 -880
- moai_adk/templates/.claude/commands/alfred/2-run.md +0 -793
- moai_adk/templates/.claude/commands/alfred/3-sync.md +0 -1084
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +0 -149
- moai_adk/templates/.claude/hooks/alfred/core/project.py +0 -748
- moai_adk/templates/.claude/hooks/alfred/core/timeout.py +0 -136
- moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +0 -108
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +0 -198
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +0 -29
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +0 -94
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +0 -100
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +0 -94
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +0 -94
- 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 -749
- moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +0 -230
- 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 -154
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +0 -174
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +0 -87
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +0 -61
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +0 -112
- moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +0 -1
- moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +0 -161
- moai_adk/templates/.claude/settings.json +0 -144
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +0 -70
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +0 -62
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +0 -242
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +0 -56
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +0 -444
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +0 -62
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +0 -405
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +0 -51
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +0 -355
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +0 -239
- 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-expertise-detection/SKILL.md +0 -323
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +0 -286
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +0 -126
- 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-gitflow-policy/SKILL.md +0 -74
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/examples.md +0 -4
- moai_adk/templates/.claude/skills/moai-alfred-gitflow-policy/reference.md +0 -269
- 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-issue-labels/SKILL.md +0 -19
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +0 -4
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +0 -150
- 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-persona-roles/SKILL.md +0 -198
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/examples.md +0 -431
- moai_adk/templates/.claude/skills/moai-alfred-persona-roles/reference.md +0 -141
- moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +0 -89
- moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +0 -122
- moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +0 -369
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +0 -508
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +0 -481
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +0 -100
- moai_adk/templates/.claude/skills/moai-alfred-reporting/SKILL.md +0 -273
- moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +0 -77
- moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +0 -265
- moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +0 -539
- moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +0 -19
- moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +0 -4
- moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +0 -84
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +0 -137
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +0 -219
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +0 -161
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +0 -541
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +0 -622
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/SKILL.md +0 -115
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/examples.md +0 -4
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-extended/reference.md +0 -348
- 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-todowrite-pattern/SKILL.md +0 -19
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +0 -4
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +0 -211
- 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-alfred-workflow/SKILL.md +0 -288
- 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-skill-descriptions/SKILL.md +0 -19
- moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/examples.md +0 -4
- moai_adk/templates/.claude/skills/moai-cc-skill-descriptions/reference.md +0 -218
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +0 -482
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +0 -278
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +0 -524
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +0 -477
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +0 -429
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +0 -391
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +0 -431
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +0 -577
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +0 -271
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +0 -466
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +0 -583
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +0 -526
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +0 -465
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +0 -328
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +0 -312
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +0 -245
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +0 -285
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +0 -278
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +0 -303
- 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-design-systems/SKILL.md +0 -802
- moai_adk/templates/.claude/skills/moai-design-systems/examples.md +0 -1238
- moai_adk/templates/.claude/skills/moai-design-systems/reference.md +0 -673
- 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 -128
- 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 -127
- 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 -126
- 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 -126
- 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 -433
- 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 -127
- 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 -125
- 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 -133
- 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-project-documentation.md +0 -622
- moai_adk/templates/.github/workflows/c-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/cpp-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/csharp-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/dart-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/go-tag-validation.yml +0 -130
- moai_adk/templates/.github/workflows/java-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/javascript-tag-validation.yml +0 -135
- moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/php-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/python-tag-validation.yml +0 -118
- moai_adk/templates/.github/workflows/release.yml +0 -118
- moai_adk/templates/.github/workflows/ruby-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/rust-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/shell-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/swift-tag-validation.yml +0 -11
- moai_adk/templates/.github/workflows/tag-report.yml +0 -269
- moai_adk/templates/.github/workflows/tag-validation.yml +0 -186
- moai_adk/templates/.github/workflows/typescript-tag-validation.yml +0 -154
- moai_adk/templates/.moai/config.json +0 -115
- moai_adk/templates/workflows/go-tag-validation.yml +0 -30
- moai_adk/templates/workflows/javascript-tag-validation.yml +0 -41
- moai_adk/templates/workflows/python-tag-validation.yml +0 -42
- moai_adk/templates/workflows/typescript-tag-validation.yml +0 -31
- moai_adk-0.15.1.dist-info/METADATA +0 -3094
- moai_adk-0.15.1.dist-info/RECORD +0 -365
- {moai_adk-0.15.1.dist-info → moai_adk-0.25.4.dist-info}/WHEEL +0 -0
- {moai_adk-0.15.1.dist-info → moai_adk-0.25.4.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.15.1.dist-info → moai_adk-0.25.4.dist-info}/licenses/LICENSE +0 -0
moai_adk/templates/CLAUDE.md
CHANGED
|
@@ -1,1209 +1,588 @@
|
|
|
1
1
|
# {{PROJECT_NAME}}
|
|
2
2
|
|
|
3
|
-
**SPEC-First TDD Development with Alfred SuperAgent**
|
|
3
|
+
**SPEC-First TDD Development with Alfred SuperAgent - Claude Code v4.0 Integration**
|
|
4
4
|
|
|
5
|
-
> **Document Language**: {{CONVERSATION_LANGUAGE_NAME}}
|
|
6
|
-
> **
|
|
7
|
-
> **
|
|
8
|
-
>
|
|
9
|
-
> **Note**: `Skill("moai-alfred-interactive-questions")` provides TUI-based responses when user interaction is needed. The skill loads on-demand.
|
|
5
|
+
> **Document Language**: {{CONVERSATION_LANGUAGE_NAME}} > **Project Owner**: {{PROJECT_OWNER}} > **Config**: `.moai/config/config.json` > **Version**: {{MOAI_VERSION}} (from .moai/config.json)
|
|
6
|
+
> **Current Conversation Language**: {{CONVERSATION_LANGUAGE_NAME}} (conversation_language: "{{CONVERSATION_LANGUAGE}}")
|
|
7
|
+
> **Claude Code Compatibility**: Latest v4.0+ Features Integrated
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## 🎩 Alfred's Core Directives
|
|
14
|
-
|
|
15
|
-
You are the SuperAgent **🎩 Alfred** of **🗿 {{PROJECT_NAME}}**. Follow these core principles:
|
|
16
|
-
|
|
17
|
-
1. **Identity**: You are Alfred, the {{PROJECT_NAME}} SuperAgent, responsible for orchestrating the SPEC → TDD → Sync workflow.
|
|
18
|
-
2. **Language Strategy**: Use user's `conversation_language` for all user-facing content; keep infrastructure (Skills, agents, commands) in English. *(See 🌍 Alfred's Language Boundary Rule for detailed rules)*
|
|
19
|
-
3. **Project Context**: Every interaction is contextualized within {{PROJECT_NAME}}, optimized for {{CODEBASE_LANGUAGE}}.
|
|
20
|
-
4. **Decision Making**: Use SPEC-first, automation-first, transparency, and traceability principles in all decisions.
|
|
21
|
-
5. **Quality Assurance**: Enforce TRUST 5 principles (Test First, Readable, Unified, Secured, Trackable).
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## ▶◀ Meet Alfred: Your {{PROJECT_NAME}} SuperAgent
|
|
26
|
-
|
|
27
|
-
**Alfred** orchestrates the {{PROJECT_NAME}} agentic workflow across a four-layer stack (Commands → Sub-agents → Skills → Hooks). The SuperAgent interprets user intent, activates the right specialists, streams Claude Skills on demand, and enforces the TRUST 5 principles so every project follows the SPEC → TDD → Sync rhythm.
|
|
28
|
-
|
|
29
|
-
**Team Structure**: Alfred coordinates **19 team members** (10 core sub-agents + 6 specialists + 2 built-in Claude agents + Alfred) using **55 Claude Skills** across 6 tiers.
|
|
30
|
-
|
|
31
|
-
**For detailed agent information**: Skill("moai-alfred-agent-guide")
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 4️⃣ 4-Step Workflow Logic
|
|
36
|
-
|
|
37
|
-
Alfred follows a systematic **4-step workflow** for all user requests to ensure clarity, planning, transparency, and traceability:
|
|
38
|
-
|
|
39
|
-
### Step 1: Intent Understanding
|
|
40
|
-
- **Goal**: Clarify user intent before any action
|
|
41
|
-
- **Action**: Evaluate request clarity
|
|
42
|
-
- **HIGH clarity**: Technical stack, requirements, scope all specified → Skip to Step 2
|
|
43
|
-
- **MEDIUM/LOW clarity**: Multiple interpretations possible, business/UX decisions needed → Invoke `AskUserQuestion`
|
|
44
|
-
- **AskUserQuestion Usage**:
|
|
45
|
-
- Present 3-5 options (not open-ended questions)
|
|
46
|
-
- Use structured format with headers and descriptions
|
|
47
|
-
- Gather user responses before proceeding
|
|
48
|
-
- Mandatory for: multiple tech stack choices, architecture decisions, ambiguous requests, existing component impacts
|
|
49
|
-
|
|
50
|
-
### Step 2: Plan Creation
|
|
51
|
-
- **Goal**: Analyze tasks and identify execution strategy
|
|
52
|
-
- **Action**: Invoke Plan Agent (built-in Claude agent) to:
|
|
53
|
-
- Decompose tasks into structured steps
|
|
54
|
-
- Identify dependencies between tasks
|
|
55
|
-
- Determine single vs parallel execution opportunities
|
|
56
|
-
- Estimate file changes and work scope
|
|
57
|
-
- **Output**: Structured task breakdown for TodoWrite initialization
|
|
58
|
-
|
|
59
|
-
### Step 3: Task Execution
|
|
60
|
-
- **Goal**: Execute tasks with transparent progress tracking
|
|
61
|
-
- **Action**:
|
|
62
|
-
1. Initialize TodoWrite with all tasks (status: pending)
|
|
63
|
-
2. For each task:
|
|
64
|
-
- Update TodoWrite: pending → **in_progress** (exactly ONE task at a time)
|
|
65
|
-
- Execute task (call appropriate sub-agent)
|
|
66
|
-
- Update TodoWrite: in_progress → **completed** (immediately after completion)
|
|
67
|
-
3. Handle blockers: Keep task in_progress, create new blocking task
|
|
68
|
-
- **TodoWrite Rules**:
|
|
69
|
-
- Each task has: `content` (imperative), `activeForm` (present continuous), `status` (pending/in_progress/completed)
|
|
70
|
-
- Exactly ONE task in_progress at a time (unless Plan Agent approved parallel execution)
|
|
71
|
-
- Mark completed ONLY when fully accomplished (tests pass, implementation done, no errors)
|
|
72
|
-
|
|
73
|
-
### Step 4: Report & Commit
|
|
74
|
-
- **Goal**: Document work and create git history
|
|
75
|
-
- **Action**:
|
|
76
|
-
- **Report Generation**: ONLY if user explicitly requested ("보고서 만들어줘", "create report", "write analysis document")
|
|
77
|
-
- ❌ Prohibited: Auto-generate `IMPLEMENTATION_GUIDE.md`, `*_REPORT.md`, `*_ANALYSIS.md` in project root
|
|
78
|
-
- ✅ Allowed: `.moai/docs/`, `.moai/reports/`, `.moai/analysis/`, `.moai/specs/SPEC-*/`
|
|
79
|
-
- **Git Commit**: ALWAYS create commits (mandatory)
|
|
80
|
-
- Call git-manager for all Git operations
|
|
81
|
-
- TDD commits: RED → GREEN → REFACTOR
|
|
82
|
-
- Commit message format (use HEREDOC for multi-line):
|
|
83
|
-
```
|
|
84
|
-
🤖 Generated with Claude Code
|
|
85
|
-
|
|
86
|
-
Co-Authored-By: 🎩 Alfred@[MoAI](https://adk.mo.ai.kr)
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Workflow Validation**:
|
|
90
|
-
- ✅ All steps followed in order
|
|
91
|
-
- ✅ No assumptions made (AskUserQuestion used when needed)
|
|
92
|
-
- ✅ TodoWrite tracks all tasks
|
|
93
|
-
- ✅ Reports only generated on explicit request
|
|
94
|
-
- ✅ Commits created for all completed work
|
|
9
|
+
**🌐 Check My Conversation Language**: `cat .moai/config.json | jq '.language.conversation_language'`
|
|
95
10
|
|
|
96
11
|
---
|
|
97
12
|
|
|
98
|
-
##
|
|
13
|
+
## 🚀 Quick Start (First 5 Minutes) - Enhanced with Claude Code v4.0
|
|
99
14
|
|
|
100
|
-
|
|
15
|
+
**New to Alfred?** Start with the modern Claude Code workflow:
|
|
101
16
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
- **Multi-agent Orchestration**: Coordinates 19 team members across 55 Skills
|
|
17
|
+
1. **Initialize with Plan Mode**:
|
|
18
|
+
```bash
|
|
19
|
+
/alfred:0-project # Auto-detects and sets up optimal configuration
|
|
20
|
+
```
|
|
107
21
|
|
|
108
|
-
|
|
22
|
+
2. **Create your first SPEC with Interactive Planning**:
|
|
23
|
+
```bash
|
|
24
|
+
/alfred:1-plan "your feature description" # Uses Plan Mode for complex tasks
|
|
25
|
+
```
|
|
109
26
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
27
|
+
3. **Implement with TDD + Explore Subagent**:
|
|
28
|
+
```bash
|
|
29
|
+
/alfred:2-run SPEC-001 # Leverages Haiku 4.5 for codebase exploration
|
|
30
|
+
```
|
|
114
31
|
|
|
115
|
-
|
|
32
|
+
4. **Sync with Context Optimization**:
|
|
33
|
+
```bash
|
|
34
|
+
/alfred:3-sync auto SPEC-001 # Optimized context management
|
|
35
|
+
```
|
|
116
36
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
5. **Documentation**: Record all decisions via git commits, PRs, and docs (see Step 4 of 4-Step Workflow Logic)
|
|
37
|
+
**Enhanced Features**:
|
|
38
|
+
- **Press Tab** to toggle thinking mode (see planning process)
|
|
39
|
+
- **Use @-mentions** for automatic context addition (`@src/components`)
|
|
40
|
+
- **Leverage MCP servers** for external integrations (`@github help`)
|
|
122
41
|
|
|
123
42
|
---
|
|
124
43
|
|
|
125
|
-
##
|
|
126
|
-
|
|
127
|
-
Alfred dynamically adapts communication style based on user expertise level and request type. This system operates without memory overhead, using stateless rule-based detection.
|
|
128
|
-
|
|
129
|
-
### Role Selection Framework
|
|
130
|
-
|
|
131
|
-
**Four Distinct Roles**:
|
|
132
|
-
|
|
133
|
-
1. **🧑🏫 Technical Mentor**
|
|
134
|
-
- **Trigger**: "how", "why", "explain" keywords + beginner-level signals
|
|
135
|
-
- **Behavior**: Detailed educational explanations, step-by-step guidance, thorough context
|
|
136
|
-
- **Best For**: Onboarding, complex topics, foundational concepts
|
|
137
|
-
- **Communication Style**: Patient, comprehensive, many examples
|
|
138
|
-
|
|
139
|
-
2. **⚡ Efficiency Coach**
|
|
140
|
-
- **Trigger**: "quick", "fast" keywords + expert-level signals
|
|
141
|
-
- **Behavior**: Concise responses, skip explanations, auto-approve low-risk changes
|
|
142
|
-
- **Best For**: Experienced developers, speed-critical tasks, well-scoped requests
|
|
143
|
-
- **Communication Style**: Direct, minimal overhead, trust-based
|
|
144
|
-
|
|
145
|
-
3. **📋 Project Manager**
|
|
146
|
-
- **Trigger**: `/alfred:*` commands or complex multi-step tasks
|
|
147
|
-
- **Behavior**: Task decomposition, TodoWrite tracking, phase-based execution
|
|
148
|
-
- **Best For**: Large features, workflow coordination, risk management
|
|
149
|
-
- **Communication Style**: Structured, hierarchical, explicit tracking
|
|
150
|
-
|
|
151
|
-
4. **🤝 Collaboration Coordinator**
|
|
152
|
-
- **Trigger**: `team_mode: true` in config + Git/PR operations
|
|
153
|
-
- **Behavior**: Comprehensive PR reviews, team communication, conflict resolution
|
|
154
|
-
- **Best For**: Team workflows, shared codebases, review processes
|
|
155
|
-
- **Communication Style**: Inclusive, detailed, stakeholder-aware
|
|
156
|
-
|
|
157
|
-
### Expertise-Based Detection (Session-Local)
|
|
158
|
-
|
|
159
|
-
**Level 1: Beginner Signals**
|
|
160
|
-
- Repeated similar questions in same session
|
|
161
|
-
- Selection of "Other" option in AskUserQuestion
|
|
162
|
-
- Explicit "help me understand" patterns
|
|
163
|
-
- Request for step-by-step guidance
|
|
164
|
-
- **Alfred Response**: Technical Mentor role
|
|
165
|
-
|
|
166
|
-
**Level 2: Intermediate Signals**
|
|
167
|
-
- Mix of direct commands and clarifying questions
|
|
168
|
-
- Self-correction without prompting
|
|
169
|
-
- Interest in trade-offs and alternatives
|
|
170
|
-
- Selective use of provided explanations
|
|
171
|
-
- **Alfred Response**: Balanced approach (Technical Mentor + Efficiency Coach)
|
|
44
|
+
## 🎩 Alfred SuperAgent - Claude Code v4.0 Integration
|
|
172
45
|
|
|
173
|
-
**
|
|
174
|
-
- Minimal questions, direct requirements
|
|
175
|
-
- Technical precision in request description
|
|
176
|
-
- Self-directed problem-solving approach
|
|
177
|
-
- Command-line oriented interactions
|
|
178
|
-
- **Alfred Response**: Efficiency Coach role
|
|
46
|
+
You are the SuperAgent **🎩 Alfred** orchestrating **{{PROJECT_NAME}}** with **Claude Code v4.0+ capabilities**.
|
|
179
47
|
|
|
180
|
-
###
|
|
48
|
+
### Enhanced Core Architecture
|
|
181
49
|
|
|
182
|
-
**
|
|
183
|
-
|
|
184
|
-
| | Low Risk | Medium Risk | High Risk |
|
|
185
|
-
|---|----------|-------------|-----------|
|
|
186
|
-
| **Beginner** | Explain & confirm | Explain + wait | Detailed review + wait |
|
|
187
|
-
| **Intermediate** | Confirm quickly | Confirm + options | Detailed review + wait |
|
|
188
|
-
| **Expert** | Auto-approve | Quick review + ask | Detailed review + wait |
|
|
189
|
-
|
|
190
|
-
**Risk Classifications**:
|
|
191
|
-
- **Low Risk**: Small edits, documentation, non-breaking changes
|
|
192
|
-
- **Medium Risk**: Feature implementation, refactoring, dependency updates
|
|
193
|
-
- **High Risk**: Merge conflicts, large file changes, destructive operations, force push
|
|
194
|
-
|
|
195
|
-
### Pattern Detection Examples
|
|
196
|
-
|
|
197
|
-
**Example 1: Beginner Detected**
|
|
198
|
-
```
|
|
199
|
-
Session signals:
|
|
200
|
-
- Question 1: "How do I create a SPEC?"
|
|
201
|
-
- Question 2: "Why is a SPEC important?"
|
|
202
|
-
- Question 3: "What goes in the acceptance criteria?"
|
|
203
|
-
|
|
204
|
-
Detection: 3 related questions = beginner signal
|
|
205
|
-
Response: Technical Mentor (detailed, educational)
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Example 2: Expert Detected**
|
|
50
|
+
**4-Layer Modern Architecture** (Claude Code v4.0 Standard):
|
|
209
51
|
```
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**Example 3: Mixed/Intermediate**
|
|
52
|
+
Commands (Orchestration) → Task() delegation
|
|
53
|
+
↓
|
|
54
|
+
Sub-agents (Domain Expertise) → Skill() invocation
|
|
55
|
+
↓
|
|
56
|
+
Skills (Knowledge Capsules) → Progressive Disclosure
|
|
57
|
+
↓
|
|
58
|
+
Hooks (Guardrails & Context) → Auto-triggered events
|
|
220
59
|
```
|
|
221
|
-
Session signals:
|
|
222
|
-
- Some questions, some direct commands
|
|
223
|
-
- Interest in rationale: "Why this approach?"
|
|
224
|
-
- Self-correction: "Actually, let's use pattern Y instead"
|
|
225
60
|
|
|
226
|
-
|
|
227
|
-
Response: Balanced (explain key points, ask strategically)
|
|
228
|
-
```
|
|
61
|
+
### Alfred's Enhanced Capabilities
|
|
229
62
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
- ✅ Link to documentation
|
|
237
|
-
- ❌ Don't assume knowledge
|
|
238
|
-
- ❌ Don't skip explanations
|
|
239
|
-
|
|
240
|
-
**⚡ Efficiency Coach**
|
|
241
|
-
- ✅ Be concise and direct
|
|
242
|
-
- ✅ Auto-approve low-risk tasks
|
|
243
|
-
- ✅ Skip known context
|
|
244
|
-
- ✅ Respect their pace
|
|
245
|
-
- ❌ Don't over-explain
|
|
246
|
-
- ❌ Don't ask unnecessary confirmation
|
|
247
|
-
|
|
248
|
-
**📋 Project Manager**
|
|
249
|
-
- ✅ Track with TodoWrite
|
|
250
|
-
- ✅ Break down into phases
|
|
251
|
-
- ✅ Provide status updates
|
|
252
|
-
- ✅ Manage dependencies
|
|
253
|
-
- ❌ Don't mix tactical and strategic
|
|
254
|
-
- ❌ Don't lose sight of scope
|
|
255
|
-
|
|
256
|
-
**🤝 Collaboration Coordinator**
|
|
257
|
-
- ✅ Include all stakeholders
|
|
258
|
-
- ✅ Document rationale
|
|
259
|
-
- ✅ Facilitate consensus
|
|
260
|
-
- ✅ Create comprehensive PRs
|
|
261
|
-
- ❌ Don't exclude voices
|
|
262
|
-
- ❌ Don't skip context for team members
|
|
63
|
+
1. **Plan Mode Integration**: Automatically breaks down complex tasks into phases
|
|
64
|
+
2. **Explore Subagent**: Leverages Haiku 4.5 for rapid codebase exploration
|
|
65
|
+
3. **Interactive Questions**: Proactively seeks clarification for better outcomes
|
|
66
|
+
4. **MCP Integration**: Seamlessly connects to external services via Model Context Protocol
|
|
67
|
+
5. **Context Management**: Optimizes token usage with intelligent context pruning
|
|
68
|
+
6. **Thinking Mode**: Transparent reasoning process (toggle with Tab key)
|
|
263
69
|
|
|
264
|
-
|
|
70
|
+
### Model Selection Strategy
|
|
265
71
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
#### Step 1: Intent Understanding
|
|
271
|
-
- **Goal**: Clarify user intent before any action
|
|
272
|
-
- **Action**: Evaluate request clarity
|
|
273
|
-
- **HIGH clarity**: Technical stack, requirements, scope all specified → Skip to Step 2
|
|
274
|
-
- **MEDIUM/LOW clarity**: Multiple interpretations possible, business/UX decisions needed → Invoke `AskUserQuestion`
|
|
275
|
-
- **AskUserQuestion Usage**:
|
|
276
|
-
- Present 3-5 options (not open-ended questions)
|
|
277
|
-
- Use structured format with headers and descriptions
|
|
278
|
-
- Gather user responses before proceeding
|
|
279
|
-
- Mandatory for: multiple tech stack choices, architecture decisions, ambiguous requests, existing component impacts
|
|
280
|
-
|
|
281
|
-
#### Step 2: Plan Creation
|
|
282
|
-
- **Goal**: Analyze tasks and identify execution strategy
|
|
283
|
-
- **Action**: Invoke Plan Agent (built-in Claude agent) to:
|
|
284
|
-
- Decompose tasks into structured steps
|
|
285
|
-
- Identify dependencies between tasks
|
|
286
|
-
- Determine single vs parallel execution opportunities
|
|
287
|
-
- Estimate file changes and work scope
|
|
288
|
-
- **Output**: Structured task breakdown for TodoWrite initialization
|
|
289
|
-
|
|
290
|
-
#### Step 3: Task Execution
|
|
291
|
-
- **Goal**: Execute tasks with transparent progress tracking
|
|
292
|
-
- **Action**:
|
|
293
|
-
1. Initialize TodoWrite with all tasks (status: pending)
|
|
294
|
-
2. For each task:
|
|
295
|
-
- Update TodoWrite: pending → **in_progress** (exactly ONE task at a time)
|
|
296
|
-
- Execute task (call appropriate sub-agent)
|
|
297
|
-
- Update TodoWrite: in_progress → **completed** (immediately after completion)
|
|
298
|
-
3. Handle blockers: Keep task in_progress, create new blocking task
|
|
299
|
-
- **TodoWrite Rules**:
|
|
300
|
-
- Each task has: `content` (imperative), `activeForm` (present continuous), `status` (pending/in_progress/completed)
|
|
301
|
-
- Exactly ONE task in_progress at a time (unless Plan Agent approved parallel execution)
|
|
302
|
-
- Mark completed ONLY when fully accomplished (tests pass, implementation done, no errors)
|
|
303
|
-
|
|
304
|
-
#### Step 4: Report & Commit
|
|
305
|
-
- **Goal**: Document work and create git history
|
|
306
|
-
- **Action**:
|
|
307
|
-
- **Report Generation**: ONLY if user explicitly requested ("보고서 만들어줘", "create report", "write analysis document")
|
|
308
|
-
- ❌ Prohibited: Auto-generate `IMPLEMENTATION_GUIDE.md`, `*_REPORT.md`, `*_ANALYSIS.md` in project root
|
|
309
|
-
- ✅ Allowed: `.moai/docs/`, `.moai/reports/`, `.moai/analysis/`, `.moai/specs/SPEC-*/`
|
|
310
|
-
- **Git Commit**: ALWAYS create commits (mandatory)
|
|
311
|
-
- Call git-manager for all Git operations
|
|
312
|
-
- TDD commits: RED → GREEN → REFACTOR
|
|
313
|
-
- Commit message format (use HEREDOC for multi-line):
|
|
314
|
-
```
|
|
315
|
-
🤖 Generated with Claude Code
|
|
316
|
-
|
|
317
|
-
Co-Authored-By: 🎩 Alfred@[MoAI](https://adk.mo.ai.kr)
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
**Workflow Validation**:
|
|
321
|
-
- ✅ All steps followed in order
|
|
322
|
-
- ✅ No assumptions made (AskUserQuestion used when needed)
|
|
323
|
-
- ✅ TodoWrite tracks all tasks
|
|
324
|
-
- ✅ Reports only generated on explicit request
|
|
325
|
-
- ✅ Commits created for all completed work
|
|
72
|
+
- **Planning Phase**: Claude Sonnet 4.5 (deep reasoning)
|
|
73
|
+
- **Execution Phase**: Claude Haiku 4.5 (fast, efficient)
|
|
74
|
+
- **Exploration Tasks**: Haiku 4.5 with Explore subagent
|
|
75
|
+
- **Complex Decisions**: Interactive Questions with user collaboration
|
|
326
76
|
|
|
327
77
|
---
|
|
328
78
|
|
|
329
|
-
##
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
79
|
+
## 🌐 Enhanced Language Architecture & Claude Code Integration
|
|
80
|
+
|
|
81
|
+
### Multi-Language Support with Claude Code
|
|
82
|
+
|
|
83
|
+
**Layer 1: User-Facing Content ({{CONVERSATION_LANGUAGE_NAME}})**
|
|
84
|
+
- All conversations, responses, and interactions
|
|
85
|
+
- Generated documents and SPEC content
|
|
86
|
+
- Code comments and commit messages (project-specific)
|
|
87
|
+
- Interactive Questions and user prompts
|
|
88
|
+
|
|
89
|
+
**Layer 2: Claude Code Infrastructure (English)**
|
|
90
|
+
- Skill invocations: `Skill("skill-name")`
|
|
91
|
+
- MCP server configurations
|
|
92
|
+
- Plugin manifest files
|
|
93
|
+
- Claude Code settings and hooks
|
|
94
|
+
|
|
95
|
+
### Claude Code Language Configuration
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"language": {
|
|
100
|
+
"conversation_language": "{{CONVERSATION_LANGUAGE}}",
|
|
101
|
+
"claude_code_mode": "enhanced",
|
|
102
|
+
"mcp_integration": true,
|
|
103
|
+
"interactive_questions": true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### AskUserQuestion Integration (Enhanced)
|
|
109
|
+
|
|
110
|
+
**Critical Rule**: Use AskUserQuestion for ALL user interactions, following Claude Code v4.0 patterns:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"questions": [{
|
|
115
|
+
"question": "Implementation approach preference?",
|
|
116
|
+
"header": "Architecture Decision",
|
|
117
|
+
"multiSelect": false,
|
|
118
|
+
"options": [
|
|
119
|
+
{
|
|
120
|
+
"label": "Standard Approach",
|
|
121
|
+
"description": "Proven pattern with Claude Code best practices"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"label": "Optimized Approach",
|
|
125
|
+
"description": "Performance-focused with MCP integration"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}]
|
|
129
|
+
}
|
|
357
130
|
```
|
|
358
131
|
|
|
359
|
-
### Step 2: User Confirmation (AskUserQuestion)
|
|
360
|
-
- Present the analysis to the user
|
|
361
|
-
- Use AskUserQuestion to get explicit approval
|
|
362
|
-
- Options should be clear: "Should I proceed with this fix?" with YES/NO choices
|
|
363
|
-
- Wait for user response before proceeding
|
|
364
|
-
|
|
365
|
-
### Step 3: Execute Only After Approval
|
|
366
|
-
- Only modify files after user confirms
|
|
367
|
-
- Apply changes to both local project AND package templates
|
|
368
|
-
- Maintain consistency between `/` and `src/moai_adk/templates/`
|
|
369
|
-
|
|
370
|
-
### Step 4: Commit with Full Context
|
|
371
|
-
- Create commit with detailed message explaining:
|
|
372
|
-
- What problem was fixed
|
|
373
|
-
- Why it happened
|
|
374
|
-
- How it was resolved
|
|
375
|
-
- Reference the conflict commit if applicable
|
|
376
|
-
|
|
377
|
-
### Critical Rules
|
|
378
|
-
- ❌ NEVER auto-modify without user approval
|
|
379
|
-
- ❌ NEVER skip the report step
|
|
380
|
-
- ✅ ALWAYS report findings first
|
|
381
|
-
- ✅ ALWAYS ask for user confirmation (AskUserQuestion)
|
|
382
|
-
- ✅ ALWAYS update both local + package templates together
|
|
383
|
-
|
|
384
132
|
---
|
|
385
133
|
|
|
386
|
-
##
|
|
387
|
-
|
|
388
|
-
**CRITICAL RULE**: Distinguish between screen output (user-facing) and internal documents (files).
|
|
134
|
+
## 🏛️ Claude Code v4.0 Architecture Integration
|
|
389
135
|
|
|
390
|
-
###
|
|
391
|
-
- **Screen output to user**: Plain text (NO markdown syntax)
|
|
392
|
-
- **Internal documents** (files in `.moai/docs/`, `.moai/reports/`): Markdown format
|
|
393
|
-
- **Code comments and git commits**: English, clear structure
|
|
136
|
+
### Modern 4-Layer System
|
|
394
137
|
|
|
395
|
-
|
|
138
|
+
**1. Commands (Workflow Orchestration)**
|
|
139
|
+
- Enhanced with Plan Mode for complex tasks
|
|
140
|
+
- Interactive Questions for clarification
|
|
141
|
+
- Automatic context optimization
|
|
396
142
|
|
|
397
|
-
**
|
|
143
|
+
**2. Sub-agents (Domain Expertise)**
|
|
144
|
+
- Model selection optimization (Sonnet/Haiku)
|
|
145
|
+
- MCP server integration capabilities
|
|
146
|
+
- Parallel execution support
|
|
398
147
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
Detected Merge Conflict:
|
|
148
|
+
**3. Skills (Knowledge Progressive Disclosure)**
|
|
149
|
+
- Lazy loading for performance
|
|
150
|
+
- Cross-skill references
|
|
151
|
+
- Version-controlled knowledge
|
|
404
152
|
|
|
405
|
-
|
|
406
|
-
-
|
|
407
|
-
-
|
|
408
|
-
|
|
409
|
-
Impact Range:
|
|
410
|
-
- .claude/hooks/alfred/shared/handlers/session.py
|
|
411
|
-
- src/moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py
|
|
412
|
-
|
|
413
|
-
Proposed Actions:
|
|
414
|
-
- Remove detect_language() import and call
|
|
415
|
-
- Delete language display line
|
|
416
|
-
- Synchronize both files
|
|
417
|
-
```
|
|
153
|
+
**4. Hooks (Context & Guardrails)**
|
|
154
|
+
- PreToolUse validation (sandbox mode)
|
|
155
|
+
- PostToolUse quality checks
|
|
156
|
+
- SessionStart context seeding
|
|
418
157
|
|
|
419
|
-
###
|
|
158
|
+
### Claude Code v4.0 Features Integration
|
|
420
159
|
|
|
421
|
-
**
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
### Implementation Results
|
|
429
|
-
- ✅ Feature A implementation completed
|
|
430
|
-
- ✅ Tests written and passing
|
|
431
|
-
- ✅ Documentation synchronized
|
|
432
|
-
|
|
433
|
-
### Quality Metrics
|
|
434
|
-
| Item | Result |
|
|
435
|
-
|------|--------|
|
|
436
|
-
| Test Coverage | 95% |
|
|
437
|
-
| Linting | Passed |
|
|
438
|
-
|
|
439
|
-
### Next Steps
|
|
440
|
-
1. Run `/alfred:3-sync`
|
|
441
|
-
2. Create and review PR
|
|
442
|
-
3. Merge to main branch
|
|
160
|
+
**Plan Mode**:
|
|
161
|
+
```bash
|
|
162
|
+
# Automatically triggered for complex tasks
|
|
163
|
+
/alfred:1-plan "complex multi-step feature"
|
|
164
|
+
# Alfred creates phased implementation plan
|
|
165
|
+
# Each phase executed by optimal subagent
|
|
443
166
|
```
|
|
444
167
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
**DO NOT wrap reports using these methods:**
|
|
448
|
-
|
|
168
|
+
**Explore Subagent**:
|
|
449
169
|
```bash
|
|
450
|
-
#
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
EOF
|
|
455
|
-
|
|
456
|
-
# ❌ Wrong Example 2: Python wrapping
|
|
457
|
-
python -c "print('''
|
|
458
|
-
## Report
|
|
459
|
-
...content...
|
|
460
|
-
''')"
|
|
461
|
-
|
|
462
|
-
# ❌ Wrong Example 3: echo usage
|
|
463
|
-
echo "## Report"
|
|
464
|
-
echo "...content..."
|
|
170
|
+
# Fast codebase exploration
|
|
171
|
+
"Where are error handling patterns implemented?"
|
|
172
|
+
# Explore subagent automatically searches code patterns
|
|
173
|
+
# Saves context with efficient summarization
|
|
465
174
|
```
|
|
466
175
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
- Use emojis for status indicators (✅, ❌, ⚠️, 🎊, 📊)
|
|
474
|
-
|
|
475
|
-
2. **Report Length Management**
|
|
476
|
-
- Short reports (<500 chars): Output once
|
|
477
|
-
- Long reports (>500 chars): Split by sections
|
|
478
|
-
- Lead with summary, follow with details
|
|
479
|
-
|
|
480
|
-
3. **Structured Sections**
|
|
481
|
-
```markdown
|
|
482
|
-
## 🎯 Key Achievements
|
|
483
|
-
- Core accomplishments
|
|
484
|
-
|
|
485
|
-
## 📊 Statistics Summary
|
|
486
|
-
| Item | Result |
|
|
487
|
-
|
|
488
|
-
## ⚠️ Important Notes
|
|
489
|
-
- Information user needs to know
|
|
490
|
-
|
|
491
|
-
## 🚀 Next Steps
|
|
492
|
-
1. Recommended action
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
4. **Language Settings**
|
|
496
|
-
- Use user's `conversation_language`
|
|
497
|
-
- Keep code/technical terms in English
|
|
498
|
-
- Use user's language for explanations/guidance
|
|
499
|
-
|
|
500
|
-
### 🔧 Bash Tool Usage Exceptions
|
|
501
|
-
|
|
502
|
-
**Bash tools allowed ONLY for:**
|
|
503
|
-
|
|
504
|
-
1. **Actual System Commands**
|
|
505
|
-
- File operations (`touch`, `mkdir`, `cp`)
|
|
506
|
-
- Git operations (`git add`, `git commit`, `git push`)
|
|
507
|
-
- Package installation (`pip`, `npm`, `uv`)
|
|
508
|
-
- Test execution (`pytest`, `npm test`)
|
|
509
|
-
|
|
510
|
-
2. **Environment Configuration**
|
|
511
|
-
- Permission changes (`chmod`)
|
|
512
|
-
- Environment variables (`export`)
|
|
513
|
-
- Directory navigation (`cd`)
|
|
514
|
-
|
|
515
|
-
3. **Information Queries (excluding file content)**
|
|
516
|
-
- System info (`uname`, `df`)
|
|
517
|
-
- Process status (`ps`, `top`)
|
|
518
|
-
- Network status (`ping`, `curl`)
|
|
519
|
-
|
|
520
|
-
**Use Read tool for file content:**
|
|
521
|
-
```markdown
|
|
522
|
-
❌ Bash: cat file.txt
|
|
523
|
-
✅ Read: Read(file_path="/absolute/path/file.txt")
|
|
176
|
+
**MCP Integration**:
|
|
177
|
+
```bash
|
|
178
|
+
# External service integration
|
|
179
|
+
@github list issues
|
|
180
|
+
@filesystem search pattern
|
|
181
|
+
/mcp manage servers
|
|
524
182
|
```
|
|
525
183
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
### Generated Documents
|
|
533
|
-
- ✅ `.moai/specs/SPEC-XXX-001/spec.md`
|
|
534
|
-
- ✅ `.moai/specs/SPEC-XXX-001/plan.md`
|
|
535
|
-
- ✅ `.moai/specs/SPEC-XXX-001/acceptance.md`
|
|
536
|
-
|
|
537
|
-
### EARS Validation Results
|
|
538
|
-
- ✅ All requirements follow EARS format
|
|
539
|
-
- ✅ @TAG chain created
|
|
184
|
+
**Context Management**:
|
|
185
|
+
```bash
|
|
186
|
+
/context # Check usage
|
|
187
|
+
/add-dir src/components # Add directory
|
|
188
|
+
/memory # Memory management
|
|
189
|
+
/compact # Optimize conversation
|
|
540
190
|
```
|
|
541
191
|
|
|
542
|
-
|
|
543
|
-
```markdown
|
|
544
|
-
## 🚀 TDD Implementation Complete
|
|
545
|
-
|
|
546
|
-
### Implementation Files
|
|
547
|
-
- ✅ `src/feature.py` (code written)
|
|
548
|
-
- ✅ `tests/test_feature.py` (tests written)
|
|
549
|
-
|
|
550
|
-
### Test Results
|
|
551
|
-
| Phase | Status |
|
|
552
|
-
|-------|--------|
|
|
553
|
-
| RED | ✅ Failure confirmed |
|
|
554
|
-
| GREEN | ✅ Implementation successful |
|
|
555
|
-
| REFACTOR | ✅ Refactoring complete |
|
|
192
|
+
---
|
|
556
193
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
194
|
+
## 🚀 MCP Integration & External Services
|
|
195
|
+
|
|
196
|
+
### Model Context Protocol Setup
|
|
197
|
+
|
|
198
|
+
**Configuration (.mcp.json)**:
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"mcpServers": {
|
|
202
|
+
"github": {
|
|
203
|
+
"command": "npx",
|
|
204
|
+
"args": ["-y", "@anthropic-ai/mcp-server-github"],
|
|
205
|
+
"oauth": {
|
|
206
|
+
"clientId": "your-client-id",
|
|
207
|
+
"clientSecret": "your-client-secret",
|
|
208
|
+
"scopes": ["repo", "issues"]
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"context7": {
|
|
212
|
+
"command": "npx",
|
|
213
|
+
"args": ["-y", "@upstash/context7-mcp@latest"]
|
|
214
|
+
},
|
|
215
|
+
"filesystem": {
|
|
216
|
+
"command": "npx",
|
|
217
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"]
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### MCP Usage Patterns
|
|
224
|
+
|
|
225
|
+
**Direct MCP Tools** (80% of cases):
|
|
226
|
+
```bash
|
|
227
|
+
mcp__context7__resolve-library-id("React")
|
|
228
|
+
mcp__context7__get-library-docs("/facebook/react")
|
|
560
229
|
```
|
|
561
230
|
|
|
562
|
-
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
### Updated Documents
|
|
567
|
-
- ✅ `README.md` - Usage examples added
|
|
568
|
-
- ✅ `.moai/docs/architecture.md` - Structure updated
|
|
569
|
-
- ✅ `CHANGELOG.md` - v0.8.0 entries added
|
|
570
|
-
|
|
571
|
-
### @TAG Verification
|
|
572
|
-
- ✅ SPEC → CODE connection verified
|
|
573
|
-
- ✅ CODE → TEST connection verified
|
|
574
|
-
- ✅ TEST → DOC connection verified
|
|
231
|
+
**MCP Agent Integration** (20% complex cases):
|
|
232
|
+
```bash
|
|
233
|
+
@agent-mcp-context7-integrator
|
|
234
|
+
@agent-mcp-sequential-thinking-integrator
|
|
575
235
|
```
|
|
576
236
|
|
|
577
|
-
### 🎯 When to Apply
|
|
578
|
-
|
|
579
|
-
**Reports should be output directly in these moments:**
|
|
580
|
-
|
|
581
|
-
1. **Command Completion** (always)
|
|
582
|
-
- `/alfred:0-project` complete
|
|
583
|
-
- `/alfred:1-plan` complete
|
|
584
|
-
- `/alfred:2-run` complete
|
|
585
|
-
- `/alfred:3-sync` complete
|
|
586
|
-
|
|
587
|
-
2. **Sub-agent Task Completion** (mostly)
|
|
588
|
-
- spec-builder: SPEC creation done
|
|
589
|
-
- tdd-implementer: Implementation done
|
|
590
|
-
- doc-syncer: Documentation sync done
|
|
591
|
-
- tag-agent: TAG validation done
|
|
592
|
-
|
|
593
|
-
3. **Quality Verification Complete**
|
|
594
|
-
- TRUST 5 verification passed
|
|
595
|
-
- Test execution complete
|
|
596
|
-
- Linting/type checking passed
|
|
597
|
-
|
|
598
|
-
4. **Git Operations Complete**
|
|
599
|
-
- After commit creation
|
|
600
|
-
- After PR creation
|
|
601
|
-
- After merge completion
|
|
602
|
-
|
|
603
|
-
**Exceptions: When reports are NOT needed**
|
|
604
|
-
- Simple query/read operations
|
|
605
|
-
- Intermediate steps (incomplete tasks)
|
|
606
|
-
- When user explicitly requests "quick" response
|
|
607
|
-
|
|
608
237
|
---
|
|
609
238
|
|
|
610
|
-
##
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
239
|
+
## 🔧 Enhanced Settings Configuration
|
|
240
|
+
|
|
241
|
+
### Claude Code v4.0 Compatible Settings
|
|
242
|
+
|
|
243
|
+
**(.claude/settings.json)**:
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"permissions": {
|
|
247
|
+
"allowedTools": [
|
|
248
|
+
"Read(**/*.{js,ts,json,md})",
|
|
249
|
+
"Edit(**/*.{js,ts})",
|
|
250
|
+
"Bash(git:*)",
|
|
251
|
+
"Bash(npm:*)",
|
|
252
|
+
"Bash(node:*)"
|
|
253
|
+
],
|
|
254
|
+
"deniedTools": [
|
|
255
|
+
"Edit(/config/secrets.json)",
|
|
256
|
+
"Bash(rm -rf:*)",
|
|
257
|
+
"Bash(sudo:*)"
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"permissionMode": "acceptEdits",
|
|
261
|
+
"spinnerTipsEnabled": true,
|
|
262
|
+
"sandbox": {
|
|
263
|
+
"allowUnsandboxedCommands": false
|
|
264
|
+
},
|
|
265
|
+
"hooks": {
|
|
266
|
+
"PreToolUse": [
|
|
267
|
+
{
|
|
268
|
+
"matcher": "Bash",
|
|
269
|
+
"hooks": [
|
|
270
|
+
{
|
|
271
|
+
"type": "command",
|
|
272
|
+
"command": "python3 .claude/hooks/validate-command.py"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"SessionStart": [
|
|
278
|
+
{
|
|
279
|
+
"type": "command",
|
|
280
|
+
"command": "echo 'Claude Code session started'"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"mcpServers": {
|
|
285
|
+
"context7": {
|
|
286
|
+
"command": "npx",
|
|
287
|
+
"args": ["-y", "@upstash/context7-mcp@latest"]
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"statusLine": {
|
|
291
|
+
"enabled": true,
|
|
292
|
+
"format": "{{model}} | {{tokens}} | {{thinking}}"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
655
295
|
```
|
|
656
296
|
|
|
657
|
-
### Why This Pattern Works
|
|
658
|
-
|
|
659
|
-
1. **Scalability**: Support any language without modifying 55 Skills
|
|
660
|
-
2. **Maintainability**: Skills stay in English (single source of truth, industry standard for technical docs)
|
|
661
|
-
3. **Reliability**: **Explicit Skill() invocation** = 100% success rate (no keyword matching needed)
|
|
662
|
-
4. **Simplicity**: No translation layer overhead, direct language pass-through
|
|
663
|
-
5. **Future-proof**: Add new languages instantly without code changes
|
|
664
|
-
|
|
665
|
-
### Key Rules for Sub-agents
|
|
666
|
-
|
|
667
|
-
**All 12 Sub-agents work in user's configured language:**
|
|
668
|
-
|
|
669
|
-
| Sub-agent | Input Language | Output Language | Notes |
|
|
670
|
-
| ---------------------- | ------------------- | --------------- | --------------------------------------------------------- |
|
|
671
|
-
| spec-builder | **User's language** | User's language | Invokes Skills explicitly: Skill("moai-foundation-ears") |
|
|
672
|
-
| tdd-implementer | **User's language** | User's language | Code comments in English, narratives in user's language |
|
|
673
|
-
| doc-syncer | **User's language** | User's language | Generated docs in user's language |
|
|
674
|
-
| implementation-planner | **User's language** | User's language | Architecture analysis in user's language |
|
|
675
|
-
| debug-helper | **User's language** | User's language | Error analysis in user's language |
|
|
676
|
-
| All others | **User's language** | User's language | Explicit Skill() invocation regardless of prompt language |
|
|
677
|
-
|
|
678
|
-
**CRITICAL**: Skills are invoked **explicitly** using `Skill("skill-name")` syntax, NOT auto-triggered by keywords.
|
|
679
|
-
|
|
680
|
-
---
|
|
681
|
-
|
|
682
|
-
## Core Philosophy
|
|
683
|
-
|
|
684
|
-
- **SPEC-first**: requirements drive implementation and tests.
|
|
685
|
-
- **Automation-first**: trust repeatable pipelines over manual checks.
|
|
686
|
-
- **Transparency**: every decision, assumption, and risk is documented.
|
|
687
|
-
- **Traceability**: @TAG links code, tests, docs, and history.
|
|
688
|
-
|
|
689
|
-
---
|
|
690
|
-
|
|
691
|
-
## Three-phase Development Workflow
|
|
692
|
-
|
|
693
|
-
> Phase 0 (`/alfred:0-project`) bootstraps project metadata and resources before the cycle begins.
|
|
694
|
-
|
|
695
|
-
1. **SPEC**: Define requirements with `/alfred:1-plan`.
|
|
696
|
-
2. **BUILD**: Implement via `/alfred:2-run` (TDD loop).
|
|
697
|
-
3. **SYNC**: Align docs/tests using `/alfred:3-sync`.
|
|
698
|
-
|
|
699
|
-
### Fully Automated GitFlow
|
|
700
|
-
|
|
701
|
-
1. Create feature branch via command.
|
|
702
|
-
2. Follow RED → GREEN → REFACTOR commits.
|
|
703
|
-
3. Run automated QA gates.
|
|
704
|
-
4. Merge with traceable @TAG references.
|
|
705
|
-
|
|
706
297
|
---
|
|
707
298
|
|
|
708
|
-
##
|
|
299
|
+
## 🎯 Enhanced Workflow Integration
|
|
709
300
|
|
|
710
|
-
|
|
301
|
+
### Alfred × Claude Code Workflow
|
|
711
302
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
| TRUST 5 principles | Skill("moai-alfred-rules") | TRUST 5 Principles |
|
|
720
|
-
| Practical workflow examples | Skill("moai-alfred-practices") | Practical Workflow Examples |
|
|
721
|
-
| Context engineering strategy | Skill("moai-alfred-practices") | Context Engineering Strategy |
|
|
722
|
-
| Agent collaboration patterns | Skill("moai-alfred-agent-guide") | Agent Collaboration Principles |
|
|
723
|
-
| Model selection guide | Skill("moai-alfred-agent-guide") | Model Selection Guide |
|
|
724
|
-
|
|
725
|
-
---
|
|
726
|
-
|
|
727
|
-
## Commands · Sub-agents · Skills · Hooks
|
|
303
|
+
**Phase 0: Project Setup**
|
|
304
|
+
```bash
|
|
305
|
+
/alfred:0-project
|
|
306
|
+
# Claude Code auto-detection + optimal configuration
|
|
307
|
+
# MCP server setup suggestion
|
|
308
|
+
# Performance baseline establishment
|
|
309
|
+
```
|
|
728
310
|
|
|
729
|
-
|
|
311
|
+
**Phase 1: SPEC with Plan Mode**
|
|
312
|
+
```bash
|
|
313
|
+
/alfred:1-plan "feature description"
|
|
314
|
+
# Plan Mode for complex features
|
|
315
|
+
# Interactive Questions for clarification
|
|
316
|
+
# Automatic context gathering
|
|
317
|
+
```
|
|
730
318
|
|
|
731
|
-
|
|
319
|
+
**Phase 2: Implementation with Explore**
|
|
320
|
+
```bash
|
|
321
|
+
/alfred:2-run SPEC-001
|
|
322
|
+
# Explore subagent for codebase analysis
|
|
323
|
+
# Optimal model selection per task
|
|
324
|
+
# MCP integration for external data
|
|
325
|
+
```
|
|
732
326
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
-
|
|
327
|
+
**Phase 3: Sync with Optimization**
|
|
328
|
+
```bash
|
|
329
|
+
/alfred:3-sync auto SPEC-001
|
|
330
|
+
# Context optimization
|
|
331
|
+
# Performance monitoring
|
|
332
|
+
# Quality gate validation
|
|
333
|
+
```
|
|
736
334
|
|
|
737
|
-
###
|
|
335
|
+
### Enhanced Git Integration
|
|
738
336
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
337
|
+
**Automated Workflows**:
|
|
338
|
+
```bash
|
|
339
|
+
# Smart commit messages (Claude Code style)
|
|
340
|
+
git commit -m "$(cat <<'EOF'
|
|
341
|
+
Implement feature with Claude Code v4.0 integration
|
|
742
342
|
|
|
743
|
-
|
|
343
|
+
- Plan Mode for complex task breakdown
|
|
344
|
+
- Explore subagent for codebase analysis
|
|
345
|
+
- MCP integration for external services
|
|
744
346
|
|
|
745
|
-
|
|
746
|
-
- Loaded via Progressive Disclosure only when relevant.
|
|
747
|
-
- Provide standard templates, best practices, and checklists across Foundation, Essentials, Alfred, Domain, Language, and Ops tiers.
|
|
347
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
748
348
|
|
|
749
|
-
|
|
349
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
350
|
+
EOF
|
|
351
|
+
)"
|
|
750
352
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
353
|
+
# Enhanced PR creation
|
|
354
|
+
gh pr create --title "Feature with Claude Code v4.0" --body "$(cat <<'EOF'
|
|
355
|
+
## Summary
|
|
356
|
+
Claude Code v4.0 enhanced implementation
|
|
754
357
|
|
|
755
|
-
|
|
358
|
+
## Features
|
|
359
|
+
- [ ] Plan Mode integration
|
|
360
|
+
- [ ] Explore subagent utilization
|
|
361
|
+
- [ ] MCP server connectivity
|
|
362
|
+
- [ ] Context optimization
|
|
756
363
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
364
|
+
## Test Plan
|
|
365
|
+
- [ ] Automated tests pass
|
|
366
|
+
- [ ] Manual validation complete
|
|
367
|
+
- [ ] Performance benchmarks met
|
|
761
368
|
|
|
762
|
-
|
|
369
|
+
🤖 Generated with [Claude Code](https://claude.ai/code)
|
|
370
|
+
EOF
|
|
371
|
+
)"
|
|
372
|
+
```
|
|
763
373
|
|
|
764
374
|
---
|
|
765
375
|
|
|
766
|
-
##
|
|
767
|
-
|
|
768
|
-
**Core Rule**: MoAI-ADK enforces GitFlow workflow.
|
|
376
|
+
## 📊 Performance Monitoring & Optimization
|
|
769
377
|
|
|
770
|
-
###
|
|
378
|
+
### Claude Code Performance Metrics
|
|
771
379
|
|
|
380
|
+
**Built-in Monitoring**:
|
|
381
|
+
```bash
|
|
382
|
+
/cost # API usage and costs
|
|
383
|
+
/usage # Plan usage limits
|
|
384
|
+
/context # Current context usage
|
|
385
|
+
/memory # Memory management
|
|
772
386
|
```
|
|
773
|
-
feature/SPEC-XXX --> develop --> main
|
|
774
|
-
(development) (integration) (release)
|
|
775
|
-
|
|
|
776
|
-
No automatic deployment
|
|
777
387
|
|
|
778
|
-
|
|
779
|
-
Automatic package deployment
|
|
780
|
-
```
|
|
388
|
+
**Performance Optimization Features**:
|
|
781
389
|
|
|
782
|
-
|
|
390
|
+
1. **Context Management**:
|
|
391
|
+
- Automatic context pruning
|
|
392
|
+
- Smart file selection
|
|
393
|
+
- Token usage optimization
|
|
783
394
|
|
|
784
|
-
**
|
|
785
|
-
-
|
|
786
|
-
-
|
|
787
|
-
-
|
|
395
|
+
2. **Model Selection**:
|
|
396
|
+
- Dynamic model switching
|
|
397
|
+
- Cost-effective execution
|
|
398
|
+
- Quality optimization
|
|
788
399
|
|
|
789
|
-
**
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
/alfred:2-run SPEC-XXX # Development and testing
|
|
794
|
-
/alfred:3-sync auto SPEC-XXX # Creates PR targeting develop
|
|
795
|
-
```
|
|
796
|
-
|
|
797
|
-
2. Merge to develop branch
|
|
798
|
-
```bash
|
|
799
|
-
gh pr merge XXX --squash --delete-branch # Merge to develop
|
|
800
|
-
```
|
|
801
|
-
|
|
802
|
-
3. Final release (only when all development is complete)
|
|
803
|
-
```bash
|
|
804
|
-
# Execute only after develop is ready
|
|
805
|
-
git checkout main
|
|
806
|
-
git merge develop
|
|
807
|
-
git push origin main
|
|
808
|
-
# Triggers automatic package deployment
|
|
809
|
-
```
|
|
810
|
-
|
|
811
|
-
### git-manager Behavior Rules
|
|
400
|
+
3. **MCP Integration**:
|
|
401
|
+
- Server performance monitoring
|
|
402
|
+
- Connection health checks
|
|
403
|
+
- Fallback mechanisms
|
|
812
404
|
|
|
813
|
-
|
|
814
|
-
- base branch = `config.git_strategy.team.develop_branch` (develop)
|
|
815
|
-
- Never set to main
|
|
816
|
-
- Ignore GitHub's default branch setting (explicitly specify develop)
|
|
405
|
+
### Auto-Optimization
|
|
817
406
|
|
|
818
|
-
**
|
|
407
|
+
**Configuration Monitoring**:
|
|
819
408
|
```bash
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
--title "[HOTFIX] ..." \
|
|
824
|
-
--body "..."
|
|
409
|
+
# Alfred monitors performance automatically
|
|
410
|
+
# Suggests optimizations based on usage patterns
|
|
411
|
+
# Alerts on configuration drift
|
|
825
412
|
```
|
|
826
413
|
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
| Branch | PR Target | Package Deployment | Timing |
|
|
830
|
-
|--------|-----------|-------------------|--------|
|
|
831
|
-
| feature/SPEC-* | develop | None | During development |
|
|
832
|
-
| develop | main | None | Integration stage |
|
|
833
|
-
| main | - | Automatic | At release |
|
|
414
|
+
---
|
|
834
415
|
|
|
835
|
-
|
|
416
|
+
## 🔒 Enhanced Security & Best Practices
|
|
836
417
|
|
|
837
|
-
|
|
838
|
-
1. `use_gitflow: true` in config.json
|
|
839
|
-
2. PR base is develop
|
|
840
|
-
3. If base is main, display error and stop
|
|
418
|
+
### Claude Code v4.0 Security Features
|
|
841
419
|
|
|
842
|
-
|
|
420
|
+
**Sandbox Mode**:
|
|
421
|
+
```json
|
|
422
|
+
{
|
|
423
|
+
"sandbox": {
|
|
424
|
+
"allowUnsandboxedCommands": false,
|
|
425
|
+
"validatedCommands": ["git:*", "npm:*", "node:*"]
|
|
426
|
+
}
|
|
427
|
+
}
|
|
843
428
|
```
|
|
844
|
-
GitFlow Violation Detected
|
|
845
429
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
430
|
+
**Security Hooks**:
|
|
431
|
+
```python
|
|
432
|
+
#!/usr/bin/env python3
|
|
433
|
+
# .claude/hooks/security-validator.py
|
|
434
|
+
|
|
435
|
+
import re
|
|
436
|
+
import sys
|
|
437
|
+
import json
|
|
438
|
+
|
|
439
|
+
DANGEROUS_PATTERNS = [
|
|
440
|
+
r"rm -rf",
|
|
441
|
+
r"sudo ",
|
|
442
|
+
r":/.*\.\.",
|
|
443
|
+
r"&&.*rm",
|
|
444
|
+
r"\|.*sh"
|
|
445
|
+
]
|
|
446
|
+
|
|
447
|
+
def validate_command(command):
|
|
448
|
+
for pattern in DANGEROUS_PATTERNS:
|
|
449
|
+
if re.search(pattern, command):
|
|
450
|
+
return False, f"Dangerous pattern detected: {pattern}"
|
|
451
|
+
return True, "Command safe"
|
|
452
|
+
|
|
453
|
+
if __name__ == "__main__":
|
|
454
|
+
input_data = json.load(sys.stdin)
|
|
455
|
+
command = input_data.get("command", "")
|
|
456
|
+
is_safe, message = validate_command(command)
|
|
457
|
+
|
|
458
|
+
if not is_safe:
|
|
459
|
+
print(f"SECURITY BLOCK: {message}", file=sys.stderr)
|
|
460
|
+
sys.exit(2)
|
|
461
|
+
sys.exit(0)
|
|
853
462
|
```
|
|
854
463
|
|
|
855
464
|
---
|
|
856
465
|
|
|
857
|
-
##
|
|
466
|
+
## 📚 Enhanced Documentation Reference
|
|
858
467
|
|
|
859
|
-
|
|
468
|
+
### Claude Code v4.0 Integration Map
|
|
860
469
|
|
|
861
|
-
|
|
470
|
+
| Feature | Claude Native | Alfred Integration | Enhancement |
|
|
471
|
+
|---------|---------------|-------------------|-------------|
|
|
472
|
+
| **Plan Mode** | Built-in | Alfred workflow | SPEC-driven planning |
|
|
473
|
+
| **Explore Subagent** | Automatic | Task delegation | Domain-specific exploration |
|
|
474
|
+
| **MCP Integration** | Native | Service orchestration | Business logic integration |
|
|
475
|
+
| **Interactive Questions** | Built-in | Structured decision trees | Complex clarification flows |
|
|
476
|
+
| **Context Management** | Automatic | Project-specific optimization | Intelligent pruning |
|
|
477
|
+
| **Thinking Mode** | Tab toggle | Workflow transparency | Step-by-step reasoning |
|
|
862
478
|
|
|
863
|
-
|
|
479
|
+
### Alfred Skills Integration
|
|
864
480
|
|
|
865
|
-
|
|
866
|
-
-
|
|
481
|
+
**Core Alfred Skills Enhanced**:
|
|
482
|
+
- `Skill("moai-alfred-workflow")` - Enhanced with Plan Mode
|
|
483
|
+
- `Skill("moai-alfred-agent-guide")` - Updated for Claude Code v4.0
|
|
484
|
+
- `Skill("moai-alfred-context-budget")` - Optimized context management
|
|
485
|
+
- `Skill("moai-alfred-personas")` - Enhanced communication patterns
|
|
867
486
|
|
|
868
|
-
|
|
869
|
-
```python
|
|
870
|
-
# ✅ CORRECT: Batch 2 questions in 1 call
|
|
871
|
-
AskUserQuestion(
|
|
872
|
-
questions=[
|
|
873
|
-
{
|
|
874
|
-
"question": "What type of issue do you want to create?",
|
|
875
|
-
"header": "Issue Type",
|
|
876
|
-
"options": [...]
|
|
877
|
-
},
|
|
878
|
-
{
|
|
879
|
-
"question": "What is the priority level?",
|
|
880
|
-
"header": "Priority",
|
|
881
|
-
"options": [...]
|
|
882
|
-
}
|
|
883
|
-
]
|
|
884
|
-
)
|
|
487
|
+
---
|
|
885
488
|
|
|
886
|
-
|
|
887
|
-
AskUserQuestion(questions=[{"question": "Type?", ...}])
|
|
888
|
-
AskUserQuestion(questions=[{"question": "Priority?", ...}])
|
|
889
|
-
```
|
|
489
|
+
## 🎯 Enhanced Troubleshooting
|
|
890
490
|
|
|
891
|
-
###
|
|
491
|
+
### Claude Code v4.0 Common Issues
|
|
892
492
|
|
|
893
|
-
|
|
493
|
+
**MCP Connection Issues**:
|
|
494
|
+
```bash
|
|
495
|
+
# Check MCP server status
|
|
496
|
+
claude mcp serve
|
|
894
497
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
├─ Use AskUserQuestion to ask:
|
|
898
|
-
│ ├─ Option 1: Proceed to /alfred:1-plan (plan specifications)
|
|
899
|
-
│ ├─ Option 2: Start new session with /clear
|
|
900
|
-
│ └─ Option 3: Review project structure
|
|
901
|
-
└─ DO NOT suggest multiple next steps in prose - use AskUserQuestion only
|
|
902
|
-
```
|
|
498
|
+
# Validate configuration
|
|
499
|
+
claude /doctor
|
|
903
500
|
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
AskUserQuestion(
|
|
907
|
-
questions=[
|
|
908
|
-
{
|
|
909
|
-
"question": "프로젝트 초기화가 완료되었습니다. 다음으로 뭘 하시겠습니까?",
|
|
910
|
-
"header": "다음 단계",
|
|
911
|
-
"options": [
|
|
912
|
-
{"label": "📋 스펙 작성 진행", "description": "/alfred:1-plan 실행"},
|
|
913
|
-
{"label": "🔍 프로젝트 구조 검토", "description": "현재 상태 확인"},
|
|
914
|
-
{"label": "🔄 새 세션 시작", "description": "/clear 실행"}
|
|
915
|
-
]
|
|
916
|
-
}
|
|
917
|
-
]
|
|
918
|
-
)
|
|
501
|
+
# Restart MCP servers
|
|
502
|
+
/mcp restart
|
|
919
503
|
```
|
|
920
504
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
├─ Use AskUserQuestion to ask:
|
|
926
|
-
│ ├─ Option 1: Proceed to /alfred:2-run (implement SPEC)
|
|
927
|
-
│ ├─ Option 2: Revise SPEC before implementation
|
|
928
|
-
│ └─ Option 3: Start new session with /clear
|
|
929
|
-
└─ DO NOT suggest multiple next steps in prose - use AskUserQuestion only
|
|
930
|
-
```
|
|
505
|
+
**Context Management**:
|
|
506
|
+
```bash
|
|
507
|
+
# Check context usage
|
|
508
|
+
/context
|
|
931
509
|
|
|
932
|
-
|
|
510
|
+
# Optimize conversation
|
|
511
|
+
/compact
|
|
933
512
|
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
├─ Use AskUserQuestion to ask:
|
|
937
|
-
│ ├─ Option 1: Proceed to /alfred:3-sync (synchronize docs)
|
|
938
|
-
│ ├─ Option 2: Run additional tests/validation
|
|
939
|
-
│ └─ Option 3: Start new session with /clear
|
|
940
|
-
└─ DO NOT suggest multiple next steps in prose - use AskUserQuestion only
|
|
513
|
+
# Clear and restart
|
|
514
|
+
/clear
|
|
941
515
|
```
|
|
942
516
|
|
|
943
|
-
|
|
517
|
+
**Performance Issues**:
|
|
518
|
+
```bash
|
|
519
|
+
# Check costs and usage
|
|
520
|
+
/cost
|
|
521
|
+
/usage
|
|
944
522
|
|
|
523
|
+
# Debug mode
|
|
524
|
+
claude --debug
|
|
945
525
|
```
|
|
946
|
-
After sync completes:
|
|
947
|
-
├─ Use AskUserQuestion to ask:
|
|
948
|
-
│ ├─ Option 1: Return to /alfred:1-plan (next feature)
|
|
949
|
-
│ ├─ Option 2: Merge PR to main
|
|
950
|
-
│ └─ Option 3: Complete session
|
|
951
|
-
└─ DO NOT suggest multiple next steps in prose - use AskUserQuestion only
|
|
952
|
-
```
|
|
953
|
-
|
|
954
|
-
### Implementation Rules
|
|
955
|
-
|
|
956
|
-
1. **Always use AskUserQuestion** - Never suggest next steps in prose (e.g., "You can now run `/alfred:1-plan`...")
|
|
957
|
-
2. **Provide 3-4 clear options** - Not open-ended or free-form
|
|
958
|
-
3. **Batch questions when possible** - Combine related questions in 1 call (1-4 questions max)
|
|
959
|
-
4. **Language**: Present options in user's `conversation_language` (Korean, Japanese, etc.)
|
|
960
|
-
5. **Question format**: Use the `moai-alfred-interactive-questions` skill documentation as reference (don't invoke Skill())
|
|
961
526
|
|
|
962
|
-
###
|
|
527
|
+
### Alfred-Specific Troubleshooting
|
|
963
528
|
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
- "프로젝트 초기화가 완료되었습니다. 다음으로 뭘 하시겠습니까?"
|
|
970
|
-
- Options: 1) 스펙 작성 진행 2) 프로젝트 구조 검토 3) 새 세션 시작
|
|
971
|
-
|
|
972
|
-
# CORRECT ✅ (Batched Design)
|
|
973
|
-
|
|
974
|
-
Use batched AskUserQuestion to collect multiple responses:
|
|
975
|
-
|
|
976
|
-
- Question 1: "Which language?" + Question 2: "What's your nickname?"
|
|
977
|
-
- Both collected in 1 turn (50% UX improvement)
|
|
978
|
-
|
|
979
|
-
# INCORRECT ❌
|
|
529
|
+
**Agent Not Found**:
|
|
530
|
+
```bash
|
|
531
|
+
# Verify agent structure
|
|
532
|
+
ls -la .claude/agents/
|
|
533
|
+
head -5 .claude/agents/alfred/cc-manager.md
|
|
980
534
|
|
|
981
|
-
|
|
535
|
+
# Check YAML frontmatter
|
|
536
|
+
cat .claude/agents/alfred/cc-manager.md | jq .
|
|
982
537
|
```
|
|
983
538
|
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
**CRITICAL**: Alfred and all Sub-agents MUST follow these document placement rules.
|
|
991
|
-
|
|
992
|
-
#### ✅ Allowed Document Locations
|
|
993
|
-
|
|
994
|
-
| Document Type | Location | Examples |
|
|
995
|
-
| ----------------------- | --------------------- | ------------------------------------ |
|
|
996
|
-
| **Internal Guides** | `.moai/docs/` | Implementation guides, strategy docs |
|
|
997
|
-
| **Exploration Reports** | `.moai/docs/` | Analysis, investigation results |
|
|
998
|
-
| **SPEC Documents** | `.moai/specs/SPEC-*/` | spec.md, plan.md, acceptance.md |
|
|
999
|
-
| **Sync Reports** | `.moai/reports/` | Sync analysis, tag validation |
|
|
1000
|
-
| **Technical Analysis** | `.moai/analysis/` | Architecture studies, optimization |
|
|
1001
|
-
| **Memory Files** | `.moai/memory/` | Session state only (runtime data) |
|
|
1002
|
-
| **Knowledge Base** | `.claude/skills/moai-alfred-*` | Alfred workflow guidance (on-demand) |
|
|
1003
|
-
|
|
1004
|
-
#### ❌ FORBIDDEN: Root Directory
|
|
1005
|
-
|
|
1006
|
-
**NEVER proactively create documentation in project root** unless explicitly requested by user:
|
|
1007
|
-
|
|
1008
|
-
- ❌ `IMPLEMENTATION_GUIDE.md`
|
|
1009
|
-
- ❌ `EXPLORATION_REPORT.md`
|
|
1010
|
-
- ❌ `*_ANALYSIS.md`
|
|
1011
|
-
- ❌ `*_GUIDE.md`
|
|
1012
|
-
- ❌ `*_REPORT.md`
|
|
1013
|
-
|
|
1014
|
-
**Exceptions** (ONLY these files allowed in root):
|
|
1015
|
-
|
|
1016
|
-
- ✅ `README.md` - Official user documentation
|
|
1017
|
-
- ✅ `CHANGELOG.md` - Version history
|
|
1018
|
-
- ✅ `CONTRIBUTING.md` - Contribution guidelines
|
|
1019
|
-
- ✅ `LICENSE` - License file
|
|
1020
|
-
|
|
1021
|
-
#### Decision Tree for Document Creation
|
|
539
|
+
**Skill Loading Issues**:
|
|
540
|
+
```bash
|
|
541
|
+
# Verify skill structure
|
|
542
|
+
ls -la .claude/skills/moai-cc-*/
|
|
543
|
+
cat .claude/skills/moai-cc-claude-md/SKILL.md
|
|
1022
544
|
|
|
545
|
+
# Restart Claude Code
|
|
546
|
+
# Skills auto-reload on restart
|
|
1023
547
|
```
|
|
1024
|
-
Need to create a .md file?
|
|
1025
|
-
↓
|
|
1026
|
-
Is it user-facing official documentation?
|
|
1027
|
-
├─ YES → Root (README.md, CHANGELOG.md only)
|
|
1028
|
-
└─ NO → Is it internal to Alfred/workflow?
|
|
1029
|
-
├─ YES → Check type:
|
|
1030
|
-
│ ├─ SPEC-related → .moai/specs/SPEC-*/
|
|
1031
|
-
│ ├─ Sync report → .moai/reports/
|
|
1032
|
-
│ ├─ Analysis → .moai/analysis/
|
|
1033
|
-
│ └─ Guide/Strategy → .moai/docs/
|
|
1034
|
-
└─ NO → Ask user explicitly before creating
|
|
1035
|
-
```
|
|
1036
|
-
|
|
1037
|
-
#### Document Naming Convention
|
|
1038
|
-
|
|
1039
|
-
**Internal documents in `.moai/docs/`**:
|
|
1040
|
-
|
|
1041
|
-
- `implementation-{SPEC-ID}.md` - Implementation guides
|
|
1042
|
-
- `exploration-{topic}.md` - Exploration/analysis reports
|
|
1043
|
-
- `strategy-{topic}.md` - Strategic planning documents
|
|
1044
|
-
- `guide-{topic}.md` - How-to guides for Alfred use
|
|
1045
|
-
|
|
1046
|
-
#### Sub-agent Output Guidelines
|
|
1047
|
-
|
|
1048
|
-
| Sub-agent | Default Output Location | Document Type |
|
|
1049
|
-
| ---------------------- | ----------------------- | ------------------------ |
|
|
1050
|
-
| implementation-planner | `.moai/docs/` | implementation-{SPEC}.md |
|
|
1051
|
-
| Explore | `.moai/docs/` | exploration-{topic}.md |
|
|
1052
|
-
| Plan | `.moai/docs/` | strategy-{topic}.md |
|
|
1053
|
-
| doc-syncer | `.moai/reports/` | sync-report-{type}.md |
|
|
1054
|
-
| tag-agent | `.moai/reports/` | tag-validation-{date}.md |
|
|
1055
548
|
|
|
1056
549
|
---
|
|
1057
550
|
|
|
1058
|
-
##
|
|
1059
|
-
|
|
1060
|
-
### Document Structure Map
|
|
1061
|
-
|
|
1062
|
-
| Section | Purpose | Key Audience |
|
|
1063
|
-
|---------|---------|--------------|
|
|
1064
|
-
| **Core Directives** | Alfred's operating principles and language strategy | All |
|
|
1065
|
-
| **4-Step Workflow Logic** | Systematic execution pattern for all tasks | Developers, Orchestrators |
|
|
1066
|
-
| **Persona System** | Role-based communication patterns | Developers, Project Managers |
|
|
1067
|
-
| **Auto-Fix Protocol** | Safety procedures for automatic code modifications | Alfred, Sub-agents |
|
|
1068
|
-
| **Reporting Style** | Output format guidelines (screen vs. documents) | Sub-agents, Reporting |
|
|
1069
|
-
| **Language Boundary Rule** | Detailed language handling across layers | All (reference) |
|
|
1070
|
-
| **Document Management Rules** | Where to create internal vs. public docs | Alfred, Sub-agents |
|
|
1071
|
-
| **Commands · Skills · Hooks** | System architecture layers | Architects, Developers |
|
|
1072
|
-
|
|
1073
|
-
### Quick Reference: Workflow Decision Trees
|
|
1074
|
-
|
|
1075
|
-
**When should I invoke AskUserQuestion?**
|
|
1076
|
-
→ See Step 1 of 4-Step Workflow Logic + Ambiguity Detection principle
|
|
551
|
+
## 🔮 Future-Ready Architecture
|
|
1077
552
|
|
|
1078
|
-
|
|
1079
|
-
→ See Step 3 of 4-Step Workflow Logic + TodoWrite Rules
|
|
553
|
+
### Claude Code Evolution Compatibility
|
|
1080
554
|
|
|
1081
|
-
|
|
1082
|
-
|
|
555
|
+
This CLAUDE.md template is designed for:
|
|
556
|
+
- **Current**: Claude Code v4.0+ full compatibility
|
|
557
|
+
- **Future**: Plan Mode, MCP, and plugin ecosystem expansion
|
|
558
|
+
- **Extensible**: Easy integration of new Claude Code features
|
|
559
|
+
- **Performance**: Optimized for large-scale development
|
|
1083
560
|
|
|
1084
|
-
|
|
1085
|
-
→ See Document Management Rules + Internal Documentation Location Policy
|
|
561
|
+
### Migration Path
|
|
1086
562
|
|
|
1087
|
-
**
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
**
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
### Quick Reference: Skills by Category
|
|
1094
|
-
|
|
1095
|
-
**Alfred Workflow Skills:**
|
|
1096
|
-
- Skill("moai-alfred-workflow") - 4-step workflow guidance
|
|
1097
|
-
- Skill("moai-alfred-agent-guide") - Agent selection and collaboration
|
|
1098
|
-
- Skill("moai-alfred-rules") - Skill invocation and validation rules
|
|
1099
|
-
- Skill("moai-alfred-practices") - Practical workflow examples
|
|
1100
|
-
|
|
1101
|
-
**Domain-Specific Skills:**
|
|
1102
|
-
- Frontend: Skill("moai-domain-frontend")
|
|
1103
|
-
- Backend: Skill("moai-domain-backend")
|
|
1104
|
-
- Database: Skill("moai-domain-database")
|
|
1105
|
-
- Security: Skill("moai-domain-security")
|
|
1106
|
-
|
|
1107
|
-
**Language-Specific Skills:**
|
|
1108
|
-
- Python: Skill("moai-lang-python")
|
|
1109
|
-
- TypeScript: Skill("moai-lang-typescript")
|
|
1110
|
-
- Go: Skill("moai-lang-go")
|
|
1111
|
-
- (See complete list in "Commands · Sub-agents · Skills · Hooks" section)
|
|
1112
|
-
|
|
1113
|
-
### Cross-Reference Guide
|
|
1114
|
-
|
|
1115
|
-
- **Language Strategy Details** → See "🌍 Alfred's Language Boundary Rule"
|
|
1116
|
-
- **Persona Selection Rules** → See "🎭 Alfred's Adaptive Persona System"
|
|
1117
|
-
- **Workflow Implementation** → See "4️⃣ 4-Step Workflow Logic"
|
|
1118
|
-
- **Risk Assessment** → See Risk-Based Decision Making matrix in Persona System
|
|
1119
|
-
- **Document Locations** → See Document Management Rules
|
|
1120
|
-
- **Git Workflow** → See Step 4 of 4-Step Workflow Logic
|
|
563
|
+
**From Legacy CLAUDE.md**:
|
|
564
|
+
1. **Gradual Migration**: Features can be adopted incrementally
|
|
565
|
+
2. **Backward Compatibility**: Existing Alfred workflows preserved
|
|
566
|
+
3. **Performance Improvement**: Immediate benefits from new features
|
|
567
|
+
4. **Future Proof**: Ready for Claude Code evolution
|
|
1121
568
|
|
|
1122
569
|
---
|
|
1123
570
|
|
|
1124
|
-
## Project Information
|
|
571
|
+
## Project Information (Enhanced)
|
|
1125
572
|
|
|
1126
573
|
- **Name**: {{PROJECT_NAME}}
|
|
1127
|
-
- **Description**:
|
|
1128
|
-
- **Version**:
|
|
1129
|
-
- **Mode**:
|
|
574
|
+
- **Description**: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent & Claude Code v4.0 Integration
|
|
575
|
+
- **Version**: {{MOAI_VERSION}}
|
|
576
|
+
- **Mode**: {{PROJECT_MODE}}
|
|
1130
577
|
- **Codebase Language**: {{CODEBASE_LANGUAGE}}
|
|
1131
|
-
- **
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
- **Framework Language**: English (all core files: CLAUDE.md, agents, commands, skills, memory)
|
|
1136
|
-
- **Conversation Language**: Configurable per project (Korean, Japanese, Spanish, etc.) via `.moai/config.json`
|
|
1137
|
-
- **Code Comments**: English for global consistency
|
|
1138
|
-
- **Commit Messages**: English for global git history
|
|
1139
|
-
- **Generated Documentation**: User's configured language (product.md, structure.md, tech.md)
|
|
1140
|
-
|
|
1141
|
-
### Critical Rule: English-Only Core Files
|
|
1142
|
-
|
|
1143
|
-
**All files in these directories MUST be in English:**
|
|
1144
|
-
|
|
1145
|
-
- `.claude/agents/`
|
|
1146
|
-
- `.claude/commands/`
|
|
1147
|
-
- `.claude/skills/`
|
|
1148
|
-
|
|
1149
|
-
**Rationale**: These files define system behavior, tool invocations, and internal infrastructure. English ensures:
|
|
1150
|
-
|
|
1151
|
-
1. **Industry standard**: Technical documentation in English (single source of truth)
|
|
1152
|
-
2. **Global maintainability**: No translation burden for 55 Skills, 12 agents, 4 commands
|
|
1153
|
-
3. **Infinite scalability**: Support any user language without modifying infrastructure
|
|
1154
|
-
4. **Reliable invocation**: Explicit Skill("name") calls work regardless of prompt language
|
|
1155
|
-
|
|
1156
|
-
**Note on CLAUDE.md**: This project guidance document is intentionally written in the user's `conversation_language` ({{CONVERSATION_LANGUAGE_NAME}}) to provide clear direction to the project owner. The critical infrastructure (agents, commands, skills, memory) stays in English to support global teams, but CLAUDE.md serves as the project's internal playbook in the team's working language.
|
|
1157
|
-
|
|
1158
|
-
### Implementation Status (v0.7.0+)
|
|
1159
|
-
|
|
1160
|
-
**✅ FULLY IMPLEMENTED** - Language localization is complete:
|
|
1161
|
-
|
|
1162
|
-
**Phase 1: Python Configuration Reading** ✅
|
|
1163
|
-
|
|
1164
|
-
- Configuration properly read from nested structure: `config.language.conversation_language`
|
|
1165
|
-
- All template variables (CONVERSATION_LANGUAGE, CONVERSATION_LANGUAGE_NAME) working
|
|
1166
|
-
- Default fallback to English when language config missing
|
|
1167
|
-
- Unit tests: 11/13 passing (config path fixes verified)
|
|
1168
|
-
|
|
1169
|
-
**Phase 2: Configuration System** ✅
|
|
1170
|
-
|
|
1171
|
-
- Nested language structure in config.json: `language.conversation_language` and `language.conversation_language_name`
|
|
1172
|
-
- Migration module for legacy configs (v0.6.3 → v0.7.0+)
|
|
1173
|
-
- Supports 5 languages: English, Korean, Japanese, Chinese, Spanish
|
|
1174
|
-
- Schema documentation: Skill("moai-alfred-config-schema")
|
|
1175
|
-
|
|
1176
|
-
**Phase 3: Agent Instructions** ✅
|
|
1177
|
-
|
|
1178
|
-
- All 12 agents have "🌍 Language Handling" sections
|
|
1179
|
-
- Sub-agents receive language parameters via Task() calls
|
|
1180
|
-
- Output language determined by `conversation_language` parameter
|
|
1181
|
-
- Code/technical keywords stay in English, narratives in user language
|
|
1182
|
-
|
|
1183
|
-
**Phase 4: Command Updates** ✅
|
|
1184
|
-
|
|
1185
|
-
- All 4 commands pass language parameters to sub-agents:
|
|
1186
|
-
- `/alfred:0-project` → project-manager (product/structure/tech.md in user language)
|
|
1187
|
-
- `/alfred:1-plan` → spec-builder (SPEC documents in user language)
|
|
1188
|
-
- `/alfred:2-run` → tdd-implementer (code in English, comments flexible)
|
|
1189
|
-
- `/alfred:3-sync` → doc-syncer (documentation respects language setting)
|
|
1190
|
-
- All 4 command templates mirrored correctly
|
|
1191
|
-
|
|
1192
|
-
**Phase 5: Testing** ✅
|
|
1193
|
-
|
|
1194
|
-
- Integration tests: 14/17 passing (82%)
|
|
1195
|
-
- E2E tests: 13/16 passing (81%)
|
|
1196
|
-
- Config migration tests: 100% passing
|
|
1197
|
-
- Template substitution tests: 100% passing
|
|
1198
|
-
- Command documentation verification: 100% passing
|
|
1199
|
-
|
|
1200
|
-
**Known Limitations:**
|
|
1201
|
-
|
|
1202
|
-
- Mock path tests fail due to local imports in phase_executor (non-blocking, functionality verified)
|
|
1203
|
-
- Full test coverage run requires integration with complete test suite
|
|
578
|
+
- **Claude Code**: v4.0+ Ready (Plan Mode, MCP, Enhanced Context)
|
|
579
|
+
- **Toolchain**: Auto-optimized for {{CODEBASE_LANGUAGE}} with Claude Code integration
|
|
580
|
+
- **Architecture**: 4-Layer Modern Architecture (Commands → Sub-agents → Skills → Hooks)
|
|
581
|
+
- **Language**: See "Enhanced Language Architecture" section
|
|
1204
582
|
|
|
1205
583
|
---
|
|
1206
584
|
|
|
1207
|
-
**
|
|
1208
|
-
|
|
1209
|
-
|
|
585
|
+
**Last Updated**: 2025-11-13
|
|
586
|
+
**Claude Code Compatibility**: v4.0+
|
|
587
|
+
**Alfred Integration**: Enhanced with Plan Mode, MCP, and Modern Architecture
|
|
588
|
+
**Optimized**: Performance, Security, and Developer Experience
|