moai-adk 0.25.4__py3-none-any.whl → 0.32.8__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 +2 -5
- moai_adk/__main__.py +114 -82
- moai_adk/cli/__init__.py +6 -1
- moai_adk/cli/commands/__init__.py +1 -3
- moai_adk/cli/commands/analyze.py +5 -16
- moai_adk/cli/commands/doctor.py +6 -18
- moai_adk/cli/commands/init.py +56 -125
- moai_adk/cli/commands/language.py +14 -35
- moai_adk/cli/commands/status.py +9 -15
- moai_adk/cli/commands/update.py +1555 -190
- moai_adk/cli/prompts/init_prompts.py +112 -56
- moai_adk/cli/spec_status.py +263 -0
- moai_adk/cli/ui/__init__.py +44 -0
- moai_adk/cli/ui/progress.py +422 -0
- moai_adk/cli/ui/prompts.py +389 -0
- moai_adk/cli/ui/theme.py +129 -0
- moai_adk/cli/worktree/__init__.py +27 -0
- moai_adk/cli/worktree/__main__.py +31 -0
- moai_adk/cli/worktree/cli.py +672 -0
- moai_adk/cli/worktree/exceptions.py +89 -0
- moai_adk/cli/worktree/manager.py +490 -0
- moai_adk/cli/worktree/models.py +65 -0
- moai_adk/cli/worktree/registry.py +128 -0
- moai_adk/core/PHASE2_OPTIMIZATIONS.md +467 -0
- moai_adk/core/analysis/session_analyzer.py +17 -56
- moai_adk/core/claude_integration.py +26 -54
- moai_adk/core/command_helpers.py +10 -10
- moai_adk/core/comprehensive_monitoring_system.py +1183 -0
- moai_adk/core/config/auto_spec_config.py +5 -11
- moai_adk/core/config/migration.py +19 -9
- moai_adk/core/config/unified.py +436 -0
- moai_adk/core/context_manager.py +6 -12
- moai_adk/core/enterprise_features.py +1404 -0
- moai_adk/core/error_recovery_system.py +725 -112
- moai_adk/core/event_driven_hook_system.py +1371 -0
- moai_adk/core/git/__init__.py +8 -0
- moai_adk/core/git/branch_manager.py +3 -11
- moai_adk/core/git/checkpoint.py +1 -3
- moai_adk/core/git/conflict_detector.py +413 -0
- moai_adk/core/git/manager.py +91 -1
- moai_adk/core/hooks/post_tool_auto_spec_completion.py +56 -80
- moai_adk/core/input_validation_middleware.py +1006 -0
- moai_adk/core/integration/engine.py +6 -18
- moai_adk/core/integration/integration_tester.py +10 -9
- moai_adk/core/integration/utils.py +1 -1
- moai_adk/core/issue_creator.py +10 -28
- moai_adk/core/jit_context_loader.py +956 -0
- moai_adk/core/jit_enhanced_hook_manager.py +1987 -0
- moai_adk/core/language_config_resolver.py +485 -0
- moai_adk/core/language_validator.py +28 -41
- moai_adk/core/mcp/setup.py +15 -12
- moai_adk/core/merge/__init__.py +9 -0
- moai_adk/core/merge/analyzer.py +481 -0
- moai_adk/core/migration/alfred_to_moai_migrator.py +383 -0
- moai_adk/core/migration/backup_manager.py +78 -9
- moai_adk/core/migration/custom_element_scanner.py +358 -0
- moai_adk/core/migration/file_migrator.py +8 -17
- moai_adk/core/migration/interactive_checkbox_ui.py +488 -0
- moai_adk/core/migration/selective_restorer.py +470 -0
- moai_adk/core/migration/template_utils.py +74 -0
- moai_adk/core/migration/user_selection_ui.py +338 -0
- moai_adk/core/migration/version_detector.py +6 -10
- moai_adk/core/migration/version_migrator.py +3 -3
- moai_adk/core/performance/cache_system.py +8 -10
- moai_adk/core/phase_optimized_hook_scheduler.py +879 -0
- moai_adk/core/project/checker.py +2 -4
- moai_adk/core/project/detector.py +1 -3
- moai_adk/core/project/initializer.py +135 -23
- moai_adk/core/project/phase_executor.py +54 -81
- moai_adk/core/project/validator.py +6 -12
- moai_adk/core/quality/trust_checker.py +9 -27
- moai_adk/core/realtime_monitoring_dashboard.py +1724 -0
- moai_adk/core/robust_json_parser.py +611 -0
- moai_adk/core/rollback_manager.py +73 -148
- moai_adk/core/session_manager.py +10 -26
- moai_adk/core/skill_loading_system.py +579 -0
- moai_adk/core/spec/confidence_scoring.py +31 -100
- moai_adk/core/spec/ears_template_engine.py +351 -286
- moai_adk/core/spec/quality_validator.py +35 -69
- moai_adk/core/spec_status_manager.py +64 -74
- moai_adk/core/template/backup.py +45 -20
- moai_adk/core/template/config.py +112 -39
- moai_adk/core/template/merger.py +11 -19
- moai_adk/core/template/processor.py +253 -149
- moai_adk/core/template_engine.py +73 -40
- moai_adk/core/template_variable_synchronizer.py +417 -0
- moai_adk/core/unified_permission_manager.py +745 -0
- moai_adk/core/user_behavior_analytics.py +851 -0
- moai_adk/core/version_sync.py +429 -0
- moai_adk/foundation/__init__.py +56 -0
- moai_adk/foundation/backend.py +1027 -0
- moai_adk/foundation/database.py +1115 -0
- moai_adk/foundation/devops.py +1585 -0
- moai_adk/foundation/ears.py +431 -0
- moai_adk/foundation/frontend.py +870 -0
- moai_adk/foundation/git/commit_templates.py +4 -12
- moai_adk/foundation/git.py +376 -0
- moai_adk/foundation/langs.py +484 -0
- moai_adk/foundation/ml_ops.py +1162 -0
- moai_adk/foundation/testing.py +1524 -0
- moai_adk/foundation/trust/trust_principles.py +23 -72
- moai_adk/foundation/trust/validation_checklist.py +57 -162
- moai_adk/project/__init__.py +0 -0
- moai_adk/project/configuration.py +1084 -0
- moai_adk/project/documentation.py +566 -0
- moai_adk/project/schema.py +447 -0
- moai_adk/statusline/alfred_detector.py +1 -3
- moai_adk/statusline/config.py +13 -4
- moai_adk/statusline/enhanced_output_style_detector.py +23 -15
- moai_adk/statusline/main.py +51 -15
- moai_adk/statusline/renderer.py +104 -48
- moai_adk/statusline/update_checker.py +3 -9
- moai_adk/statusline/version_reader.py +140 -46
- moai_adk/templates/.claude/agents/moai/ai-nano-banana.md +549 -0
- moai_adk/templates/.claude/agents/moai/builder-agent.md +445 -0
- moai_adk/templates/.claude/agents/moai/builder-command.md +1132 -0
- moai_adk/templates/.claude/agents/moai/builder-skill.md +601 -0
- moai_adk/templates/.claude/agents/moai/expert-backend.md +831 -0
- moai_adk/templates/.claude/agents/moai/expert-database.md +774 -0
- moai_adk/templates/.claude/agents/moai/expert-debug.md +396 -0
- moai_adk/templates/.claude/agents/moai/expert-devops.md +711 -0
- moai_adk/templates/.claude/agents/moai/expert-frontend.md +666 -0
- moai_adk/templates/.claude/agents/moai/expert-security.md +474 -0
- moai_adk/templates/.claude/agents/moai/expert-uiux.md +1038 -0
- moai_adk/templates/.claude/agents/moai/manager-claude-code.md +429 -0
- moai_adk/templates/.claude/agents/moai/manager-docs.md +570 -0
- moai_adk/templates/.claude/agents/moai/manager-git.md +937 -0
- moai_adk/templates/.claude/agents/moai/manager-project.md +891 -0
- moai_adk/templates/.claude/agents/moai/manager-quality.md +598 -0
- moai_adk/templates/.claude/agents/moai/manager-spec.md +713 -0
- moai_adk/templates/.claude/agents/moai/manager-strategy.md +600 -0
- moai_adk/templates/.claude/agents/moai/manager-tdd.md +603 -0
- moai_adk/templates/.claude/agents/moai/mcp-context7.md +369 -0
- moai_adk/templates/.claude/agents/moai/mcp-figma.md +1567 -0
- moai_adk/templates/.claude/agents/moai/mcp-notion.md +749 -0
- moai_adk/templates/.claude/agents/moai/mcp-playwright.md +427 -0
- moai_adk/templates/.claude/agents/moai/mcp-sequential-thinking.md +994 -0
- moai_adk/templates/.claude/commands/moai/0-project.md +1143 -0
- moai_adk/templates/.claude/commands/moai/1-plan.md +1435 -0
- moai_adk/templates/.claude/commands/moai/2-run.md +883 -0
- moai_adk/templates/.claude/commands/moai/3-sync.md +993 -0
- moai_adk/templates/.claude/commands/moai/9-feedback.md +314 -0
- moai_adk/templates/.claude/hooks/__init__.py +8 -0
- moai_adk/templates/.claude/hooks/moai/__init__.py +8 -0
- moai_adk/templates/.claude/hooks/moai/lib/__init__.py +85 -0
- moai_adk/templates/.claude/hooks/moai/lib/checkpoint.py +244 -0
- moai_adk/templates/.claude/hooks/moai/lib/common.py +131 -0
- moai_adk/templates/.claude/hooks/moai/lib/config_manager.py +446 -0
- moai_adk/templates/.claude/hooks/moai/lib/config_validator.py +639 -0
- moai_adk/templates/.claude/hooks/moai/lib/example_config.json +104 -0
- moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +590 -0
- moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +317 -0
- moai_adk/templates/.claude/hooks/moai/lib/models.py +102 -0
- moai_adk/templates/.claude/hooks/moai/lib/path_utils.py +28 -0
- moai_adk/templates/.claude/hooks/moai/lib/project.py +768 -0
- moai_adk/templates/.claude/hooks/moai/lib/test_hooks_improvements.py +443 -0
- moai_adk/templates/.claude/hooks/moai/lib/timeout.py +160 -0
- moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +530 -0
- moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +862 -0
- moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +921 -0
- moai_adk/templates/.claude/output-styles/moai/r2d2.md +380 -0
- moai_adk/templates/.claude/output-styles/moai/yoda.md +338 -0
- moai_adk/templates/.claude/settings.json +172 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +247 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/README.md +44 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/api-documentation.md +130 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/code-documentation.md +152 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/multi-format-output.md +178 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/user-guides.md +147 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +319 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +320 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/README.md +53 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/mongodb.md +231 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/postgresql.md +169 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/redis.md +262 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +496 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +453 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/examples.md +560 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/accessibility-wcag.md +260 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/component-architecture.md +228 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/design-system-tokens.md +405 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/icon-libraries.md +401 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/theming-system.md +373 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/reference.md +243 -0
- moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +491 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +98 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/SKILL-MODULARIZATION-TEMPLATE.md +278 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/caching-performance.md +459 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/data-validation.md +485 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/json-optimization.md +374 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/toon-encoding.md +308 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +201 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/best-practices-checklist.md +616 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-custom-slash-commands-official.md +729 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-hooks-official.md +560 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-iam-official.md +635 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-memory-official.md +543 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-settings-official.md +663 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-skills-official.md +113 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sub-agents-official.md +238 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/complete-configuration-guide.md +175 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-examples.md +1674 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-formatting-guide.md +729 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-examples.md +1513 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-formatting-guide.md +1086 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-integration-patterns.md +1100 -0
- moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +438 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +515 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/README.md +296 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/agents-reference.md +346 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/commands-reference.md +432 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-patterns.md +757 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/execution-rules.md +687 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/modular-system.md +665 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/progressive-disclosure.md +649 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-first-tdd.md +864 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/token-optimization.md +708 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-framework.md +981 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +362 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/examples.md +1232 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/best-practices.md +261 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/integration-patterns.md +194 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/proactive-analysis.md +229 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/trust5-validation.md +169 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/reference.md +1266 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/scripts/quality-gate.sh +668 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/templates/github-actions-quality.yml +481 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/templates/quality-config.yaml +519 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/SKILL.md +352 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/README.md +52 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/error-handling.md +334 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/integration-patterns.md +310 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/security-authentication.md +256 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/server-architecture.md +253 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/README.md +133 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/SKILL.md +296 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/examples.md +1269 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/reference.md +331 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +298 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/advanced-patterns.md +465 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/examples.md +270 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/optimization.md +440 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/reference.md +228 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +316 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/advanced-patterns.md +336 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-deployment-patterns.md +182 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-patterns.md +17 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/configuration.md +57 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/content-architecture-optimization.md +162 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/deployment.md +52 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/framework-core-configuration.md +186 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/i18n-setup.md +55 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/mdx-components.md +52 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/optimization.md +303 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +370 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/examples.md +575 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/advanced-patterns.md +394 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/optimization.md +278 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-components.md +457 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-theming.md +373 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/reference.md +74 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/README.md +186 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/SKILL.md +290 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/examples.md +1225 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/reference.md +567 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/scripts/provider-selector.py +323 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/templates/stack-config.yaml +204 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +446 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/advanced-patterns.md +379 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/optimization.md +286 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/README.md +190 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +387 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/__init__.py +520 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/complete_workflow_demo_fixed.py +574 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_project_setup.py +317 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_workflow_demo.py +663 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/config-migration-example.json +190 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/question-examples.json +135 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/quick_start.py +196 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/__init__.py +17 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/advanced-patterns.md +158 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/ask_user_integration.py +340 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/batch_questions.py +713 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/config_manager.py +538 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/documentation_manager.py +1336 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/language_initializer.py +730 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/migration_manager.py +608 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/template_optimizer.py +1005 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/schemas/config-schema.json +316 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +1362 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/config-template.json +71 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/product-template.md +44 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/structure-template.md +48 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/tech-template.md +71 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/config-manager-setup.json +109 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/language-initializer.json +228 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/menu-project-config.json +130 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/project-batch-questions.json +97 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/spec-workflow-setup.json +150 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/test_integration_simple.py +436 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +374 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/modules/code-templates.md +124 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/modules/feedback-templates.md +100 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/modules/template-optimizer.md +138 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/LICENSE.txt +202 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +453 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/advanced-patterns.md +576 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/ai-powered-testing.py +294 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/console_logging.py +35 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/element_discovery.py +40 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/static_html_automation.py +34 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/README.md +220 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/ai-debugging.md +845 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review.md +1416 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization.md +1234 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/smart-refactoring.md +1243 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7.md +1260 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/optimization.md +505 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/reference/playwright-best-practices.md +57 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/scripts/with_server.py +218 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/templates/alfred-integration.md +376 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/workflows/enterprise-testing-workflow.py +571 -0
- moai_adk/templates/.claude/skills/moai-worktree/SKILL.md +410 -0
- moai_adk/templates/.claude/skills/moai-worktree/examples.md +606 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/integration-patterns.md +982 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/parallel-development.md +778 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-commands.md +646 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-management.md +782 -0
- moai_adk/templates/.claude/skills/moai-worktree/reference.md +357 -0
- moai_adk/templates/.git-hooks/pre-commit +103 -41
- moai_adk/templates/.git-hooks/pre-push +116 -21
- moai_adk/templates/.github/workflows/ci-universal.yml +513 -0
- moai_adk/templates/.github/workflows/security-secrets-check.yml +179 -0
- moai_adk/templates/.gitignore +184 -44
- moai_adk/templates/.mcp.json +7 -9
- moai_adk/templates/.moai/cache/personalization.json +10 -0
- moai_adk/templates/.moai/config/config.yaml +344 -0
- moai_adk/templates/.moai/config/presets/manual.yaml +28 -0
- moai_adk/templates/.moai/config/presets/personal.yaml +30 -0
- moai_adk/templates/.moai/config/presets/team.yaml +33 -0
- moai_adk/templates/.moai/config/questions/_schema.yaml +79 -0
- moai_adk/templates/.moai/config/questions/tab1-user.yaml +108 -0
- moai_adk/templates/.moai/config/questions/tab2-project.yaml +122 -0
- moai_adk/templates/.moai/config/questions/tab3-git.yaml +542 -0
- moai_adk/templates/.moai/config/questions/tab4-quality.yaml +167 -0
- moai_adk/templates/.moai/config/questions/tab5-system.yaml +152 -0
- moai_adk/templates/.moai/config/sections/git-strategy.yaml +40 -0
- moai_adk/templates/.moai/config/sections/language.yaml +11 -0
- moai_adk/templates/.moai/config/sections/project.yaml +13 -0
- moai_adk/templates/.moai/config/sections/quality.yaml +15 -0
- moai_adk/templates/.moai/config/sections/system.yaml +14 -0
- moai_adk/templates/.moai/config/sections/user.yaml +5 -0
- moai_adk/templates/.moai/config/statusline-config.yaml +86 -0
- moai_adk/templates/.moai/scripts/setup-glm.py +136 -0
- moai_adk/templates/CLAUDE.md +382 -501
- moai_adk/utils/__init__.py +24 -1
- moai_adk/utils/banner.py +7 -10
- moai_adk/utils/common.py +16 -30
- moai_adk/utils/link_validator.py +4 -12
- moai_adk/utils/safe_file_reader.py +2 -6
- moai_adk/utils/timeout.py +160 -0
- moai_adk/utils/toon_utils.py +256 -0
- moai_adk/version.py +22 -0
- moai_adk-0.32.8.dist-info/METADATA +2478 -0
- moai_adk-0.32.8.dist-info/RECORD +396 -0
- {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/WHEEL +1 -1
- {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/entry_points.txt +1 -0
- moai_adk/cli/commands/backup.py +0 -82
- moai_adk/cli/commands/improve_user_experience.py +0 -348
- moai_adk/cli/commands/migrate.py +0 -158
- moai_adk/cli/commands/validate_links.py +0 -118
- moai_adk/templates/.github/workflows/moai-gitflow.yml +0 -413
- moai_adk/templates/.github/workflows/moai-release-create.yml +0 -100
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +0 -188
- moai_adk/utils/user_experience.py +0 -531
- moai_adk-0.25.4.dist-info/METADATA +0 -2279
- moai_adk-0.25.4.dist-info/RECORD +0 -112
- {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/licenses/LICENSE +0 -0
moai_adk/templates/CLAUDE.md
CHANGED
|
@@ -1,588 +1,469 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mr. Alfred Execution Directive
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Alfred: The Strategic Orchestrator (Claude Code Official Guidelines)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
> **Current Conversation Language**: {{CONVERSATION_LANGUAGE_NAME}} (conversation_language: "{{CONVERSATION_LANGUAGE}}")
|
|
7
|
-
> **Claude Code Compatibility**: Latest v4.0+ Features Integrated
|
|
5
|
+
Core Principle: Alfred delegates all tasks to specialized agents and coordinates their execution.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
### Mandatory Requirements
|
|
8
|
+
|
|
9
|
+
- [HARD] Full Delegation: All tasks must be delegated to appropriate specialized agents
|
|
10
|
+
WHY: Specialized agents have domain-specific knowledge and optimized tool access
|
|
11
|
+
|
|
12
|
+
- [HARD] Complexity Analysis: Analyze task complexity and requirements to select appropriate approach
|
|
13
|
+
WHY: Matching task complexity to agent capability ensures optimal outcomes
|
|
14
|
+
|
|
15
|
+
- [SOFT] Result Integration: Consolidate agent execution results and report to user
|
|
16
|
+
|
|
17
|
+
- [HARD] Language-Aware Responses: Always respond in user's selected language (internal agent instructions remain in English)
|
|
18
|
+
WHY: User comprehension is paramount; English internals ensure consistency
|
|
19
|
+
See "Language-Aware Responses" section for detailed rules
|
|
10
20
|
|
|
11
21
|
---
|
|
12
22
|
|
|
13
|
-
##
|
|
23
|
+
## Documentation Standards
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
### Required Practices
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
/alfred:0-project # Auto-detects and sets up optimal configuration
|
|
20
|
-
```
|
|
27
|
+
All instruction documents must follow these standards:
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
Formatting Requirements:
|
|
30
|
+
- Use detailed markdown formatting for explanations
|
|
31
|
+
- Document step-by-step procedures in text form
|
|
32
|
+
- Describe concepts and logic in narrative style
|
|
33
|
+
- Present workflows with clear textual descriptions
|
|
34
|
+
- Organize information using list format
|
|
35
|
+
- Express everything in pure text format
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
/alfred:2-run SPEC-001 # Leverages Haiku 4.5 for codebase exploration
|
|
30
|
-
```
|
|
37
|
+
### Content Restrictions
|
|
31
38
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
Restricted Content:
|
|
40
|
+
- Conceptual explanations expressed as code examples
|
|
41
|
+
- Workflow descriptions presented as code snippets
|
|
42
|
+
- Executable code examples in instructions
|
|
43
|
+
- Programming code used to explain concepts
|
|
44
|
+
- Flow control logic expressed as code (if/else, loops, conditions)
|
|
45
|
+
- Branching logic presented as programming syntax
|
|
46
|
+
- Comparison operations written as code expressions
|
|
47
|
+
- Decision trees shown as code structures
|
|
48
|
+
- Table format in instructions
|
|
49
|
+
- Emoji or emoji characters in instructions
|
|
50
|
+
- Time estimates or duration predictions (e.g., "4-6 hours", "takes 2 days")
|
|
36
51
|
|
|
37
|
-
|
|
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`)
|
|
52
|
+
WHY: Code examples can be misinterpreted as executable commands. Tables and emojis reduce parsing reliability. Time estimates are unverifiable and create false expectations. Flow control and branching logic must use narrative text format (e.g., "If condition A is true, then execute step 1. Otherwise, proceed to step 2.") instead of code syntax (e.g., if A: step1 else: step2).
|
|
41
53
|
|
|
42
|
-
|
|
54
|
+
### Scope of Application
|
|
43
55
|
|
|
44
|
-
|
|
56
|
+
These standards apply to: CLAUDE.md, agent definitions, slash commands, skill definitions, hook definitions, and configuration files.
|
|
45
57
|
|
|
46
|
-
|
|
58
|
+
### Correct vs Incorrect Examples
|
|
47
59
|
|
|
48
|
-
|
|
60
|
+
Flow Control - INCORRECT (code block):
|
|
49
61
|
|
|
50
|
-
|
|
51
|
-
```
|
|
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
|
|
59
|
-
```
|
|
62
|
+
If auto_branch equals False, set ROUTE to USE_CURRENT_BRANCH. Otherwise, set ROUTE to CREATE_BRANCH.
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
Flow Control - CORRECT (text instructions):
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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)
|
|
66
|
+
Check the auto_branch configuration value:
|
|
67
|
+
- If auto_branch equals false: Set ROUTE to USE_CURRENT_BRANCH
|
|
68
|
+
- If auto_branch equals true: Set ROUTE to CREATE_BRANCH
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Branching Logic - INCORRECT (code):
|
|
71
71
|
|
|
72
|
-
|
|
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
|
|
72
|
+
Process each file in the list. For files with .py extension, perform processing. For other files, skip to next.
|
|
76
73
|
|
|
77
|
-
|
|
74
|
+
Branching Logic - CORRECT (text):
|
|
75
|
+
|
|
76
|
+
For each file in the file list:
|
|
77
|
+
- Check if the file extension is .py
|
|
78
|
+
- If yes: Process the file
|
|
79
|
+
- If no: Skip to the next file
|
|
80
|
+
|
|
81
|
+
Comparison Operations - INCORRECT (code):
|
|
82
|
+
|
|
83
|
+
Check if the score is greater than or equal to 80, less than 50, or between 50 and 79.
|
|
84
|
+
|
|
85
|
+
Comparison Operations - CORRECT (text):
|
|
86
|
+
|
|
87
|
+
Compare the score against thresholds:
|
|
88
|
+
- If score is 80 or higher: Apply high-priority action
|
|
89
|
+
- If score is below 50: Apply low-priority action
|
|
90
|
+
- If score is between 50 and 79: Apply medium-priority action
|
|
78
91
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
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
|
-
}
|
|
130
|
-
```
|
|
92
|
+
Decision Trees - INCORRECT (code):
|
|
93
|
+
|
|
94
|
+
Based on user role, determine access level. For admin role, grant full access. For user role, grant read-only access.
|
|
95
|
+
|
|
96
|
+
Decision Trees - CORRECT (text):
|
|
97
|
+
|
|
98
|
+
Determine access level based on user role:
|
|
99
|
+
- Admin role detected: Grant full access to all resources
|
|
100
|
+
- User role detected: Grant read-only access to public resources
|
|
101
|
+
- Guest role detected: Grant limited access to welcome page only
|
|
131
102
|
|
|
132
103
|
---
|
|
133
104
|
|
|
134
|
-
##
|
|
135
|
-
|
|
136
|
-
###
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Explore Subagent**:
|
|
169
|
-
```bash
|
|
170
|
-
# Fast codebase exploration
|
|
171
|
-
"Where are error handling patterns implemented?"
|
|
172
|
-
# Explore subagent automatically searches code patterns
|
|
173
|
-
# Saves context with efficient summarization
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
**MCP Integration**:
|
|
177
|
-
```bash
|
|
178
|
-
# External service integration
|
|
179
|
-
@github list issues
|
|
180
|
-
@filesystem search pattern
|
|
181
|
-
/mcp manage servers
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**Context Management**:
|
|
185
|
-
```bash
|
|
186
|
-
/context # Check usage
|
|
187
|
-
/add-dir src/components # Add directory
|
|
188
|
-
/memory # Memory management
|
|
189
|
-
/compact # Optimize conversation
|
|
190
|
-
```
|
|
105
|
+
## Claude Code Official Agent Invocation Patterns
|
|
106
|
+
|
|
107
|
+
### Explicit Agent Invocation
|
|
108
|
+
|
|
109
|
+
Invoke agents using clear, direct natural language:
|
|
110
|
+
|
|
111
|
+
- "Use the expert-backend subagent to develop the API"
|
|
112
|
+
- "Use the manager-tdd subagent to implement with TDD approach"
|
|
113
|
+
- "Use the Explore subagent to analyze the codebase structure"
|
|
114
|
+
|
|
115
|
+
WHY: Explicit invocation patterns ensure consistent agent activation and clear task boundaries.
|
|
116
|
+
|
|
117
|
+
### Agent Chaining Patterns
|
|
118
|
+
|
|
119
|
+
Sequential Chaining:
|
|
120
|
+
First use the code-analyzer subagent to identify issues, then use the optimizer subagent to implement fixes, finally use the tester subagent to validate the solution
|
|
121
|
+
|
|
122
|
+
Parallel Execution:
|
|
123
|
+
Use the expert-backend subagent to develop the API, simultaneously use the expert-frontend subagent to create the UI
|
|
124
|
+
|
|
125
|
+
### Resumable Agents
|
|
126
|
+
|
|
127
|
+
Resume interrupted agent work:
|
|
128
|
+
- Resume agent abc123 and continue the security analysis
|
|
129
|
+
- Continue with the frontend development using the existing context
|
|
191
130
|
|
|
192
131
|
---
|
|
193
132
|
|
|
194
|
-
##
|
|
195
|
-
|
|
196
|
-
###
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
**MCP Agent Integration** (20% complex cases):
|
|
232
|
-
```bash
|
|
233
|
-
@agent-mcp-context7-integrator
|
|
234
|
-
@agent-mcp-sequential-thinking-integrator
|
|
235
|
-
```
|
|
133
|
+
## Alfred's Three-Step Execution Model
|
|
134
|
+
|
|
135
|
+
### Step 1: Understand
|
|
136
|
+
|
|
137
|
+
- Analyze user request complexity and scope
|
|
138
|
+
- Clarify ambiguous requirements using AskUserQuestion at command level (not in subagents)
|
|
139
|
+
- Dynamically load required Skills for knowledge acquisition
|
|
140
|
+
- Collect all necessary user preferences before delegating to agents
|
|
141
|
+
|
|
142
|
+
Core Execution Skills:
|
|
143
|
+
- Skill("moai-foundation-claude") - Alfred orchestration rules
|
|
144
|
+
- Skill("moai-foundation-core") - SPEC system and core workflows
|
|
145
|
+
- Skill("moai-workflow-project") - Project management and documentation
|
|
146
|
+
- Skill("moai-workflow-docs") - Integrated document management
|
|
147
|
+
|
|
148
|
+
### Step 2: Plan
|
|
149
|
+
|
|
150
|
+
- Explicitly invoke Plan subagent to plan the task
|
|
151
|
+
- Establish optimal agent selection strategy after request analysis
|
|
152
|
+
- Decompose work into steps and determine execution order
|
|
153
|
+
- Report detailed plan to user and request approval
|
|
154
|
+
|
|
155
|
+
Agent Selection Guide by Task Type:
|
|
156
|
+
- API Development: Use expert-backend subagent
|
|
157
|
+
- React Components: Use expert-frontend subagent
|
|
158
|
+
- Security Review: Use expert-security subagent
|
|
159
|
+
- TDD-Based Development: Use manager-tdd subagent
|
|
160
|
+
- Documentation Generation: Use manager-docs subagent
|
|
161
|
+
- Complex Multi-Step Tasks: Use general-purpose subagent
|
|
162
|
+
- Codebase Analysis: Use Explore subagent
|
|
163
|
+
|
|
164
|
+
### Step 3: Execute
|
|
165
|
+
|
|
166
|
+
- Invoke agents explicitly according to approved plan
|
|
167
|
+
- Monitor agent execution and adjust as needed
|
|
168
|
+
- Integrate completed work results into final deliverables
|
|
169
|
+
- [HARD] Ensure all agent responses are provided in user's language
|
|
236
170
|
|
|
237
171
|
---
|
|
238
172
|
|
|
239
|
-
##
|
|
240
|
-
|
|
241
|
-
###
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
173
|
+
## Agent Design Principles (Claude Code Official Guidelines)
|
|
174
|
+
|
|
175
|
+
### Single Responsibility Design
|
|
176
|
+
|
|
177
|
+
Each agent maintains clear, narrow domain expertise:
|
|
178
|
+
- "Use the expert-backend subagent to implement JWT authentication"
|
|
179
|
+
- "Use the expert-frontend subagent to create reusable button components"
|
|
180
|
+
|
|
181
|
+
WHY: Single responsibility enables deep expertise and reduces context switching overhead.
|
|
182
|
+
|
|
183
|
+
### Detailed Prompt Composition
|
|
184
|
+
|
|
185
|
+
Prompt Composition Requirements:
|
|
186
|
+
- Specify the target subagent and action clearly
|
|
187
|
+
- Include language directive for user responses
|
|
188
|
+
- List concrete requirements with specific parameters
|
|
189
|
+
- Detail technical stack and security requirements
|
|
190
|
+
- Define expected outputs and deliverables
|
|
191
|
+
|
|
192
|
+
### Language-Aware Responses
|
|
193
|
+
|
|
194
|
+
Critical Principle: All agents must respond in the user's selected language.
|
|
195
|
+
|
|
196
|
+
Language Response Requirements:
|
|
197
|
+
- User-facing responses: Always use the user's selected language from conversation_language
|
|
198
|
+
- Internal agent instructions: Always use English for consistency and clarity
|
|
199
|
+
- Code comments and documentation: Use English as specified in development standards
|
|
200
|
+
|
|
201
|
+
Language Resolution:
|
|
202
|
+
- Korean user receives Korean responses
|
|
203
|
+
- Japanese user receives Japanese responses
|
|
204
|
+
- English user receives English responses
|
|
205
|
+
|
|
206
|
+
WHY: User comprehension is the primary goal; English internals ensure maintainability.
|
|
207
|
+
|
|
208
|
+
### Tool Access Restrictions
|
|
209
|
+
|
|
210
|
+
Tool Access Levels:
|
|
211
|
+
- Read-Only Agents: Read, Grep, Glob tools only
|
|
212
|
+
- Write-Limited Agents: Can create new files, cannot modify existing production code
|
|
213
|
+
- Full-Access Agents: Full access to Read, Write, Edit, Bash tools as needed
|
|
214
|
+
|
|
215
|
+
WHY: Least-privilege access prevents accidental modifications and enforces role boundaries.
|
|
216
|
+
|
|
217
|
+
### User Interaction Architecture
|
|
218
|
+
|
|
219
|
+
Critical Constraint: Subagents invoked via Task() operate in isolated, stateless contexts and cannot interact with users directly.
|
|
220
|
+
|
|
221
|
+
Subagent Limitations:
|
|
222
|
+
- Subagents receive input once from the main thread at invocation
|
|
223
|
+
- Subagents return output once as a final report when execution completes
|
|
224
|
+
- Subagents cannot pause execution to wait for user responses
|
|
225
|
+
- Subagents cannot use AskUserQuestion tool effectively
|
|
226
|
+
|
|
227
|
+
WHY: Task() creates isolated execution contexts for parallelization and context management.
|
|
228
|
+
|
|
229
|
+
Correct User Interaction Pattern:
|
|
230
|
+
|
|
231
|
+
- [HARD] Commands must handle all user interaction via AskUserQuestion before delegating to agents
|
|
232
|
+
WHY: Commands run in the main thread where user interaction is possible
|
|
233
|
+
|
|
234
|
+
- [HARD] Pass user choices as parameters when invoking Task()
|
|
235
|
+
WHY: Subagents need pre-collected user decisions to execute without interaction
|
|
236
|
+
|
|
237
|
+
- [HARD] Agents must return structured responses for follow-up decisions
|
|
238
|
+
WHY: Commands can use agent responses to determine next user questions
|
|
239
|
+
|
|
240
|
+
Correct Workflow Pattern:
|
|
241
|
+
Step 1: Command uses AskUserQuestion to collect user preferences
|
|
242
|
+
Step 2: Command invokes Task() with user choices in the prompt
|
|
243
|
+
Step 3: Subagent executes based on provided parameters without user interaction
|
|
244
|
+
Step 4: Subagent returns structured response with results
|
|
245
|
+
Step 5: Command uses AskUserQuestion for next decision based on agent response
|
|
246
|
+
|
|
247
|
+
AskUserQuestion Tool Constraints:
|
|
248
|
+
- Maximum 4 options per question
|
|
249
|
+
- No emoji characters in question text, headers, or option labels
|
|
250
|
+
- Questions must be in user's conversation_language
|
|
251
|
+
- multiSelect parameter enables multiple choice selection when needed
|
|
296
252
|
|
|
297
253
|
---
|
|
298
254
|
|
|
299
|
-
##
|
|
300
|
-
|
|
301
|
-
###
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
# Performance baseline establishment
|
|
309
|
-
```
|
|
310
|
-
|
|
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
|
-
```
|
|
318
|
-
|
|
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
|
-
```
|
|
326
|
-
|
|
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
|
-
```
|
|
334
|
-
|
|
335
|
-
### Enhanced Git Integration
|
|
336
|
-
|
|
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
|
|
342
|
-
|
|
343
|
-
- Plan Mode for complex task breakdown
|
|
344
|
-
- Explore subagent for codebase analysis
|
|
345
|
-
- MCP integration for external services
|
|
346
|
-
|
|
347
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
348
|
-
|
|
349
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
350
|
-
EOF
|
|
351
|
-
)"
|
|
352
|
-
|
|
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
|
|
357
|
-
|
|
358
|
-
## Features
|
|
359
|
-
- [ ] Plan Mode integration
|
|
360
|
-
- [ ] Explore subagent utilization
|
|
361
|
-
- [ ] MCP server connectivity
|
|
362
|
-
- [ ] Context optimization
|
|
363
|
-
|
|
364
|
-
## Test Plan
|
|
365
|
-
- [ ] Automated tests pass
|
|
366
|
-
- [ ] Manual validation complete
|
|
367
|
-
- [ ] Performance benchmarks met
|
|
368
|
-
|
|
369
|
-
🤖 Generated with [Claude Code](https://claude.ai/code)
|
|
370
|
-
EOF
|
|
371
|
-
)"
|
|
372
|
-
```
|
|
255
|
+
## Advanced Agent Usage
|
|
256
|
+
|
|
257
|
+
### Dynamic Agent Selection
|
|
258
|
+
|
|
259
|
+
Dynamic Selection Process:
|
|
260
|
+
- First analyze task complexity using task-analyzer subagent
|
|
261
|
+
- For simple tasks: use general-purpose subagent
|
|
262
|
+
- For medium complexity: use appropriate expert-* subagent
|
|
263
|
+
- For complex tasks: use workflow-manager subagent to coordinate multiple specialized agents
|
|
373
264
|
|
|
374
265
|
---
|
|
375
266
|
|
|
376
|
-
##
|
|
267
|
+
## Tool Execution Optimization
|
|
268
|
+
|
|
269
|
+
### Parallel vs Sequential Execution
|
|
377
270
|
|
|
378
|
-
|
|
271
|
+
Parallel Execution Indicators:
|
|
272
|
+
- Operations on different files with no shared state
|
|
273
|
+
- Read-only operations with no dependencies
|
|
274
|
+
- Independent API calls or searches
|
|
379
275
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
/context # Current context usage
|
|
385
|
-
/memory # Memory management
|
|
386
|
-
```
|
|
276
|
+
Sequential Execution Indicators:
|
|
277
|
+
- Output of one operation feeds input of another
|
|
278
|
+
- Write operations to the same file
|
|
279
|
+
- Operations with explicit ordering requirements
|
|
387
280
|
|
|
388
|
-
|
|
281
|
+
Execution Rule:
|
|
282
|
+
- [HARD] Execute all independent tool calls in parallel when no dependencies exist
|
|
283
|
+
- [HARD] Chain dependent operations sequentially with context passing
|
|
389
284
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
- Token usage optimization
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## SPEC-Based Workflow Integration
|
|
394
288
|
|
|
395
|
-
|
|
396
|
-
- Dynamic model switching
|
|
397
|
-
- Cost-effective execution
|
|
398
|
-
- Quality optimization
|
|
289
|
+
### MoAI Commands and Agent Coordination
|
|
399
290
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
291
|
+
MoAI Command Integration Process:
|
|
292
|
+
1. /moai:1-plan "user authentication system" leads to Use the spec-builder subagent
|
|
293
|
+
2. /moai:2-run SPEC-001 leads to Use the manager-tdd subagent
|
|
294
|
+
3. /moai:3-sync SPEC-001 leads to Use the manager-docs subagent
|
|
404
295
|
|
|
405
|
-
###
|
|
296
|
+
### Agent Chain for SPEC Execution
|
|
406
297
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
298
|
+
SPEC Execution Agent Chain:
|
|
299
|
+
- Phase 1: Use the spec-analyzer subagent to understand requirements
|
|
300
|
+
- Phase 2: Use the architect-designer subagent to create system design
|
|
301
|
+
- Phase 3: Use the expert-backend subagent to implement core features
|
|
302
|
+
- Phase 4: Use the expert-frontend subagent to create user interface
|
|
303
|
+
- Phase 5: Use the tester-validator subagent to ensure quality standards
|
|
304
|
+
- Phase 6: Use the docs-generator subagent to create documentation
|
|
413
305
|
|
|
414
306
|
---
|
|
415
307
|
|
|
416
|
-
##
|
|
417
|
-
|
|
418
|
-
###
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
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)
|
|
462
|
-
```
|
|
308
|
+
## MCP Integration and External Services
|
|
309
|
+
|
|
310
|
+
### Context7 Integration
|
|
311
|
+
|
|
312
|
+
Leverage Context7 MCP server for current API documentation and information:
|
|
313
|
+
- Use the mcp-context7 subagent to research latest API documentation
|
|
314
|
+
- Get current framework best practices and patterns
|
|
315
|
+
- Check library version compatibility and migration guides
|
|
316
|
+
|
|
317
|
+
### Sequential-Thinking for Complex Tasks
|
|
318
|
+
|
|
319
|
+
Use Sequential-Thinking MCP for complex analysis and architecture design:
|
|
320
|
+
- For complex tasks (greater than 10 files, architecture changes): First activate the sequential-thinking subagent
|
|
321
|
+
- Then use the appropriate expert-* subagents for implementation
|
|
463
322
|
|
|
464
323
|
---
|
|
465
324
|
|
|
466
|
-
##
|
|
325
|
+
## Token Management and Optimization
|
|
467
326
|
|
|
468
|
-
###
|
|
327
|
+
### Context Optimization
|
|
469
328
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
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 |
|
|
329
|
+
Context Optimization Process:
|
|
330
|
+
- Before delegating to agents: Use the context-optimizer subagent to create minimal context
|
|
331
|
+
- Include: spec_id, key_requirements (max 3 bullet points), architecture_summary (max 200 chars)
|
|
332
|
+
- Exclude: background information, reasoning, and non-essential details
|
|
478
333
|
|
|
479
|
-
###
|
|
334
|
+
### Session Management
|
|
480
335
|
|
|
481
|
-
|
|
482
|
-
-
|
|
483
|
-
-
|
|
484
|
-
- `Skill("moai-alfred-context-budget")` - Optimized context management
|
|
485
|
-
- `Skill("moai-alfred-personas")` - Enhanced communication patterns
|
|
336
|
+
Each agent invocation creates an independent 200K token session:
|
|
337
|
+
- Complex tasks break into multiple agent sessions
|
|
338
|
+
- Session boundaries prevent context overflow and enable parallel processing
|
|
486
339
|
|
|
487
340
|
---
|
|
488
341
|
|
|
489
|
-
##
|
|
342
|
+
## User Personalization and Language Settings
|
|
343
|
+
|
|
344
|
+
User and language configuration is automatically loaded from section files below.
|
|
345
|
+
|
|
346
|
+
@.moai/config/sections/user.yaml
|
|
347
|
+
@.moai/config/sections/language.yaml
|
|
348
|
+
|
|
349
|
+
### Configuration Structure
|
|
350
|
+
|
|
351
|
+
Configuration is split into modular section files for token efficiency:
|
|
352
|
+
- sections/user.yaml: User name for personalized greetings
|
|
353
|
+
- sections/language.yaml: All language preferences (conversation, code, docs)
|
|
354
|
+
- sections/project.yaml: Project metadata
|
|
355
|
+
- sections/git-strategy.yaml: Git workflow configuration
|
|
356
|
+
- sections/quality.yaml: TDD and quality settings
|
|
357
|
+
- sections/system.yaml: MoAI system settings
|
|
490
358
|
|
|
491
|
-
###
|
|
359
|
+
### Configuration Priority
|
|
492
360
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
claude mcp serve
|
|
361
|
+
1. Environment Variables (highest priority): MOAI_USER_NAME, MOAI_CONVERSATION_LANG
|
|
362
|
+
2. Section Files: .moai/config/sections/*.yaml
|
|
363
|
+
3. Default Values: English, default greeting
|
|
497
364
|
|
|
498
|
-
|
|
499
|
-
claude /doctor
|
|
365
|
+
### Agent Delegation Rules
|
|
500
366
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
```
|
|
367
|
+
Include personalization information in all subagent invocations:
|
|
368
|
+
- "Use the [subagent] subagent to [task]. User: {name}, Language: [user_language]"
|
|
504
369
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
/context
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Error Recovery and Problem Resolution
|
|
509
373
|
|
|
510
|
-
|
|
511
|
-
/compact
|
|
374
|
+
### Systematic Error Handling
|
|
512
375
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
376
|
+
Error Handling Process:
|
|
377
|
+
- Agent execution errors: Use the expert-debug subagent to troubleshoot issues
|
|
378
|
+
- Token limit errors: Execute /clear to refresh context, then resume agent work
|
|
379
|
+
- Permission errors: Use the system-admin subagent to check settings and permissions
|
|
380
|
+
- Integration errors: Use the integration-specialist subagent to resolve issues
|
|
516
381
|
|
|
517
|
-
|
|
518
|
-
```bash
|
|
519
|
-
# Check costs and usage
|
|
520
|
-
/cost
|
|
521
|
-
/usage
|
|
382
|
+
---
|
|
522
383
|
|
|
523
|
-
|
|
524
|
-
claude --debug
|
|
525
|
-
```
|
|
384
|
+
## Success Metrics and Quality Standards
|
|
526
385
|
|
|
527
|
-
### Alfred
|
|
386
|
+
### Alfred Success Metrics
|
|
528
387
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
# Verify agent structure
|
|
532
|
-
ls -la .claude/agents/
|
|
533
|
-
head -5 .claude/agents/alfred/cc-manager.md
|
|
388
|
+
- [HARD] 100% Task Delegation Rate: Alfred performs no direct implementation
|
|
389
|
+
WHY: Direct implementation bypasses the agent ecosystem
|
|
534
390
|
|
|
535
|
-
|
|
536
|
-
cat .claude/agents/alfred/cc-manager.md | jq .
|
|
537
|
-
```
|
|
391
|
+
- [SOFT] Appropriate Agent Selection: Accuracy in selecting optimal agent for task
|
|
538
392
|
|
|
539
|
-
|
|
540
|
-
```bash
|
|
541
|
-
# Verify skill structure
|
|
542
|
-
ls -la .claude/skills/moai-cc-*/
|
|
543
|
-
cat .claude/skills/moai-cc-claude-md/SKILL.md
|
|
393
|
+
- [SOFT] Task Completion Success Rate: Successful completion through agents
|
|
544
394
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
```
|
|
395
|
+
- [HARD] 0 Direct Tool Usage: Alfred's direct tool usage rate is always zero
|
|
396
|
+
WHY: Tool usage belongs to specialized agents
|
|
548
397
|
|
|
549
398
|
---
|
|
550
399
|
|
|
551
|
-
##
|
|
400
|
+
## Quick Reference
|
|
401
|
+
|
|
402
|
+
### Core Commands
|
|
403
|
+
|
|
404
|
+
- /moai:0-project - Project configuration management
|
|
405
|
+
- /moai:1-plan "description" - Specification generation
|
|
406
|
+
- /moai:2-run SPEC-001 - TDD implementation
|
|
407
|
+
- /moai:3-sync SPEC-001 - Documentation synchronization
|
|
408
|
+
- /moai:9-feedback "feedback" - Improvement feedback
|
|
409
|
+
- /clear - Context refresh
|
|
552
410
|
|
|
553
|
-
###
|
|
411
|
+
### Language Response Rules
|
|
554
412
|
|
|
555
|
-
|
|
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
|
|
413
|
+
See "Language-Aware Responses" section for complete rules.
|
|
560
414
|
|
|
561
|
-
|
|
415
|
+
Summary:
|
|
416
|
+
- User Responses: Always in user's conversation_language
|
|
417
|
+
- Internal Communication: English
|
|
418
|
+
- Code Comments: Per code_comments setting (default: English)
|
|
562
419
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
420
|
+
### Output Format Rules (All Agents)
|
|
421
|
+
|
|
422
|
+
- [HARD] User-Facing: Always use Markdown for all user communication
|
|
423
|
+
- [HARD] Internal Data: XML tags reserved for agent-to-agent data transfer only
|
|
424
|
+
- [HARD] Never display XML tags in user-facing responses
|
|
425
|
+
|
|
426
|
+
### Required Skills
|
|
427
|
+
|
|
428
|
+
- Skill("moai-foundation-claude") - Alfred orchestration patterns
|
|
429
|
+
- Skill("moai-foundation-core") - SPEC system and core workflows
|
|
430
|
+
- Skill("moai-workflow-project") - Project management and configuration
|
|
431
|
+
- Skill("moai-workflow-docs") - Integrated document management
|
|
432
|
+
|
|
433
|
+
### Agent Selection Decision Tree
|
|
434
|
+
|
|
435
|
+
1. Read-only codebase exploration? Use the Explore subagent
|
|
436
|
+
2. External service or current API documentation needed? Use the mcp-context7 subagent
|
|
437
|
+
3. Domain expertise needed? Use the expert-[domain] subagent
|
|
438
|
+
4. Workflow coordination needed? Use the manager-[workflow] subagent
|
|
439
|
+
5. Complex multi-step tasks? Use the general-purpose subagent
|
|
568
440
|
|
|
569
441
|
---
|
|
570
442
|
|
|
571
|
-
##
|
|
443
|
+
## Output Format
|
|
572
444
|
|
|
573
|
-
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
-
|
|
577
|
-
-
|
|
578
|
-
-
|
|
579
|
-
-
|
|
580
|
-
|
|
581
|
-
|
|
445
|
+
### User-Facing Communication (Markdown)
|
|
446
|
+
|
|
447
|
+
All responses to users must use Markdown formatting:
|
|
448
|
+
- Headers for section organization
|
|
449
|
+
- Lists for itemized information
|
|
450
|
+
- Bold and italic for emphasis
|
|
451
|
+
- Code blocks for technical content
|
|
452
|
+
|
|
453
|
+
### Internal Agent Communication (XML)
|
|
454
|
+
|
|
455
|
+
XML tags are reserved for internal agent-to-agent data transfer only:
|
|
456
|
+
- Phase outputs between workflow stages
|
|
457
|
+
- Structured data for automated parsing
|
|
458
|
+
|
|
459
|
+
[HARD] Never display XML tags in user-facing responses.
|
|
582
460
|
|
|
583
461
|
---
|
|
584
462
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
463
|
+
Version: 8.2.0 (Optimized - Duplicate Removal)
|
|
464
|
+
Last Updated: 2025-12-05
|
|
465
|
+
Core Rule: Alfred is an orchestrator; direct implementation is prohibited
|
|
466
|
+
Language: Dynamic setting (language.conversation_language)
|
|
467
|
+
|
|
468
|
+
Critical: Alfred must delegate all tasks to specialized agents
|
|
469
|
+
Required: All tasks use "Use the [subagent] subagent to..." format for specialized agent delegation
|