moai-adk 0.4.5__py3-none-any.whl โ 0.20.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +1 -1
- moai_adk/__main__.py +74 -1
- moai_adk/cli/commands/__init__.py +1 -1
- moai_adk/cli/commands/analyze.py +119 -0
- moai_adk/cli/commands/backup.py +25 -1
- moai_adk/cli/commands/doctor.py +31 -5
- moai_adk/cli/commands/improve_user_experience.py +307 -0
- moai_adk/cli/commands/init.py +111 -10
- moai_adk/cli/commands/status.py +33 -3
- moai_adk/cli/commands/update.py +921 -130
- moai_adk/cli/commands/validate_links.py +120 -0
- moai_adk/cli/prompts/init_prompts.py +22 -87
- moai_adk/core/analysis/__init__.py +9 -0
- moai_adk/core/analysis/session_analyzer.py +388 -0
- moai_adk/core/analysis/tag_chain_analyzer.py +344 -0
- moai_adk/core/analysis/tag_chain_repair.py +879 -0
- moai_adk/core/config/__init__.py +19 -0
- moai_adk/core/config/migration.py +235 -0
- moai_adk/core/git/__init__.py +1 -1
- moai_adk/core/git/branch.py +1 -1
- moai_adk/core/git/commit.py +1 -1
- moai_adk/core/git/manager.py +1 -1
- moai_adk/core/issue_creator.py +313 -0
- moai_adk/core/mcp/setup.py +56 -0
- moai_adk/core/mcp/setup_old.py +296 -0
- moai_adk/core/project/backup_utils.py +1 -1
- moai_adk/core/project/checker.py +2 -2
- moai_adk/core/project/detector.py +211 -12
- moai_adk/core/project/initializer.py +85 -15
- moai_adk/core/project/phase_executor.py +76 -13
- moai_adk/core/project/validator.py +13 -13
- moai_adk/core/quality/__init__.py +1 -1
- moai_adk/core/quality/trust_checker.py +1 -1
- moai_adk/core/quality/validators/__init__.py +1 -1
- moai_adk/core/quality/validators/base_validator.py +1 -1
- moai_adk/core/tags/__init__.py +86 -0
- moai_adk/core/tags/auto_corrector.py +693 -0
- moai_adk/core/tags/ci_validator.py +463 -0
- moai_adk/core/tags/cli.py +283 -0
- moai_adk/core/tags/generator.py +109 -0
- moai_adk/core/tags/inserter.py +99 -0
- moai_adk/core/tags/mapper.py +126 -0
- moai_adk/core/tags/parser.py +76 -0
- moai_adk/core/tags/policy_validator.py +580 -0
- moai_adk/core/tags/pre_commit_validator.py +421 -0
- moai_adk/core/tags/reporter.py +956 -0
- moai_adk/core/tags/rollback_manager.py +525 -0
- moai_adk/core/tags/tags.py +149 -0
- moai_adk/core/tags/validator.py +897 -0
- moai_adk/core/template/__init__.py +1 -1
- moai_adk/core/template/backup.py +1 -1
- moai_adk/core/template/merger.py +50 -1
- moai_adk/core/template/processor.py +119 -13
- moai_adk/core/template_engine.py +268 -0
- moai_adk/templates/.claude/agents/alfred/backend-expert.md +348 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +209 -944
- moai_adk/templates/.claude/agents/alfred/database-expert.md +352 -0
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +34 -5
- moai_adk/templates/.claude/agents/alfred/devops-expert.md +464 -0
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +38 -8
- moai_adk/templates/.claude/agents/alfred/format-expert.md +469 -0
- moai_adk/templates/.claude/agents/alfred/frontend-expert.md +357 -0
- moai_adk/templates/.claude/agents/alfred/git-manager.md +128 -9
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +104 -6
- moai_adk/templates/.claude/agents/alfred/project-manager.md +88 -16
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +36 -9
- moai_adk/templates/.claude/agents/alfred/security-expert.md +270 -0
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +865 -0
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +214 -43
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +111 -9
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +309 -160
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +36 -7
- moai_adk/templates/.claude/agents/alfred/ui-ux-expert.md +605 -0
- moai_adk/templates/.claude/commands/alfred/0-project.md +393 -966
- moai_adk/templates/.claude/commands/alfred/1-plan.md +651 -367
- moai_adk/templates/.claude/commands/alfred/2-run.md +388 -241
- moai_adk/templates/.claude/commands/alfred/3-sync.md +1921 -410
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +153 -0
- moai_adk/templates/.claude/commands/alfred/release-new.md +3604 -0
- moai_adk/templates/.claude/hooks/alfred/core/project.py +484 -20
- moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
- moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +108 -0
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +14 -6
- moai_adk/templates/.claude/hooks/alfred/post_tool__enable_streaming_ui.py +50 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +93 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__tag_auto_corrector.py +407 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +99 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__realtime_tag_monitor.py +335 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__tag_policy_validator.py +325 -0
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +93 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__auto_cleanup.py +580 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +298 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +170 -0
- moai_adk/templates/.claude/hooks/alfred/{core โ shared/core}/checkpoint.py +3 -3
- moai_adk/templates/.claude/hooks/alfred/{core โ shared/core}/context.py +5 -5
- moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +749 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +230 -0
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/__init__.py +21 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/daily_analysis.py +351 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +154 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +174 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +87 -0
- moai_adk/templates/.claude/hooks/alfred/shared/handlers/user.py +61 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +111 -0
- moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
- moai_adk/templates/.claude/hooks/alfred/utils/hook_config.py +94 -0
- moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +161 -0
- moai_adk/templates/.claude/output-styles/alfred/alfred-moai-adk-beginner.md +267 -0
- moai_adk/templates/.claude/output-styles/alfred/keating-personal-tutor.md +440 -0
- moai_adk/templates/.claude/output-styles/alfred/r2d2-agentic-coding.md +583 -0
- moai_adk/templates/.claude/settings.json +96 -14
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/SKILL.md +70 -0
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-agent-guide/reference.md +242 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/SKILL.md +237 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/examples.md +871 -0
- moai_adk/templates/.claude/skills/moai-alfred-ask-user-questions/reference.md +653 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/README.md +162 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/SKILL.md +227 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/examples.md +354 -0
- moai_adk/templates/.claude/skills/moai-alfred-clone-pattern/reference.md +158 -0
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +179 -79
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +117 -0
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/scripts/pre-review-check.sh +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/SKILL.md +132 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-config-schema/reference.md +444 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/SKILL.md +62 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/examples.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-context-budget/reference.md +405 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/SKILL.md +51 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/examples.md +355 -0
- moai_adk/templates/.claude/skills/moai-alfred-dev-guide/reference.md +239 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/SKILL.md +323 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/examples.md +286 -0
- moai_adk/templates/.claude/skills/moai-alfred-expertise-detection/reference.md +126 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/SKILL.md +229 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-issue-labels/reference.md +150 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/README.md +42 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/SKILL.md +429 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/examples.md +520 -0
- moai_adk/templates/.claude/skills/moai-alfred-personas/reference.md +405 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/SKILL.md +89 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/examples.md +122 -0
- moai_adk/templates/.claude/skills/moai-alfred-practices/reference.md +369 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/SKILL.md +508 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/examples.md +481 -0
- moai_adk/templates/.claude/skills/moai-alfred-proactive-suggestions/reference.md +100 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/SKILL.md +77 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/examples.md +265 -0
- moai_adk/templates/.claude/skills/moai-alfred-rules/reference.md +539 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/SKILL.md +320 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-session-state/reference.md +84 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/README.md +137 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/SKILL.md +219 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples/validate-spec.sh +161 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/examples.md +541 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-authoring/reference.md +622 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/SKILL.md +19 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/examples.md +4 -0
- moai_adk/templates/.claude/skills/moai-alfred-todowrite-pattern/reference.md +211 -0
- moai_adk/templates/.claude/skills/moai-alfred-workflow/SKILL.md +288 -0
- moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +269 -0
- moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
- moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +298 -0
- moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
- moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +307 -0
- moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +252 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
- moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +199 -0
- moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
- moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +316 -0
- moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +263 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/CHECKLIST.md +482 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/EXAMPLES.md +303 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/METADATA.md +477 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/SKILL.md +273 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/STRUCTURE.md +583 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/WEB-RESEARCH.md +526 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/reference.md +608 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/generate-structure.sh +328 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/scripts/validate-skill.sh +312 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/examples-template.md +285 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/reference-template.md +278 -0
- moai_adk/templates/.claude/skills/moai-cc-skill-factory/templates/scripts-template.sh +303 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +291 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
- moai_adk/templates/.claude/skills/moai-change-logger/SKILL.md +563 -0
- moai_adk/templates/.claude/skills/moai-design-systems/SKILL.md +802 -0
- moai_adk/templates/.claude/skills/moai-design-systems/examples.md +1238 -0
- moai_adk/templates/.claude/skills/moai-design-systems/reference.md +673 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
- moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
- moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
- moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +102 -73
- moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
- moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
- moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
- moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +265 -64
- moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1064 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1047 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
- moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
- moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
- moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +80 -62
- moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +207 -50
- moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
- moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
- moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
- moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/.!11330!examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
- moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
- moai_adk/templates/.claude/skills/moai-jit-docs-enhanced/SKILL.md +460 -0
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
- moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +2358 -70
- moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +2962 -68
- moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +1898 -70
- moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +1465 -68
- moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +2364 -66
- moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +1630 -69
- moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +89 -61
- moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +735 -66
- moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
- moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
- moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
- moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +1834 -70
- moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +99 -74
- moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
- moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
- moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +1959 -69
- moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
- moai_adk/templates/.claude/skills/moai-lang-template/SKILL.md +348 -0
- moai_adk/templates/.claude/skills/moai-lang-template/VARIABLES.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +1230 -66
- moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
- moai_adk/templates/.claude/skills/moai-learning-optimizer/SKILL.md +575 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/README.md +50 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/SKILL.md +304 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/examples.md +417 -0
- moai_adk/templates/.claude/skills/moai-project-batch-questions/reference.md +704 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/README.md +87 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/SKILL.md +552 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/examples.md +1109 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/reference.md +514 -0
- moai_adk/templates/.claude/skills/moai-project-config-manager/validate.py +106 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/README.md +11 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/SKILL.md +622 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/examples.md +20 -0
- moai_adk/templates/.claude/skills/moai-project-documentation/reference.md +12 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/README.md +152 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/SKILL.md +285 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/examples.md +333 -0
- moai_adk/templates/.claude/skills/moai-project-language-initializer/reference.md +386 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/README.md +49 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/SKILL.md +319 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/examples.md +58 -0
- moai_adk/templates/.claude/skills/moai-project-template-optimizer/reference.md +123 -0
- moai_adk/templates/.claude/skills/moai-session-info/SKILL.md +314 -0
- moai_adk/templates/.claude/skills/moai-streaming-ui/SKILL.md +552 -0
- moai_adk/templates/.claude/skills/moai-tag-policy-validator/SKILL.md +570 -0
- moai_adk/templates/.git-hooks/pre-commit +66 -0
- moai_adk/templates/.git-hooks/pre-push +255 -0
- moai_adk/templates/.github/workflows/c-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/cpp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/csharp-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/dart-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/go-tag-validation.yml +130 -0
- moai_adk/templates/.github/workflows/java-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/javascript-tag-validation.yml +135 -0
- moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/moai-gitflow.yml +166 -3
- moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +188 -0
- moai_adk/templates/.github/workflows/php-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/python-tag-validation.yml +118 -0
- moai_adk/templates/.github/workflows/release.yml +118 -0
- moai_adk/templates/.github/workflows/ruby-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/rust-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/shell-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/spec-issue-sync.yml +338 -0
- moai_adk/templates/.github/workflows/swift-tag-validation.yml +11 -0
- moai_adk/templates/.github/workflows/tag-report.yml +269 -0
- moai_adk/templates/.github/workflows/tag-validation.yml +186 -0
- moai_adk/templates/.github/workflows/typescript-tag-validation.yml +154 -0
- moai_adk/templates/.mcp.json +31 -0
- moai_adk/templates/.moai/config.json +80 -7
- moai_adk/templates/CLAUDE.md +562 -546
- moai_adk/utils/banner.py +5 -5
- moai_adk/utils/common.py +294 -0
- moai_adk/utils/link_validator.py +235 -0
- moai_adk/utils/logger.py +8 -8
- moai_adk/utils/user_experience.py +451 -0
- moai_adk-0.20.1.dist-info/METADATA +233 -0
- moai_adk-0.20.1.dist-info/RECORD +404 -0
- moai_adk/templates/.claude/hooks/alfred/README.md +0 -230
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +0 -156
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +0 -85
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +0 -25
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +0 -92
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +0 -70
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +0 -41
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +0 -636
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +0 -692
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +0 -470
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +0 -103
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +0 -95
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +0 -97
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +0 -90
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +0 -99
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -69
- moai_adk/templates/.moai/memory/development-guide.md +0 -344
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
- moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
- moai_adk/templates/.moai/project/product.md +0 -161
- moai_adk/templates/.moai/project/structure.md +0 -156
- moai_adk/templates/.moai/project/tech.md +0 -227
- moai_adk/templates/__init__.py +0 -2
- moai_adk-0.4.5.dist-info/METADATA +0 -369
- moai_adk-0.4.5.dist-info/RECORD +0 -152
- {moai_adk-0.4.5.dist-info โ moai_adk-0.20.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.5.dist-info โ moai_adk-0.20.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.5.dist-info โ moai_adk-0.20.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @CODE:LINK-VALIDATION-CLI-001 | @TEST:LINK-VALIDATION-CLI-001
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Link Validation CLI Command
|
|
5
|
+
๋งํฌ ๊ฒ์ฆ CLI ๋ช
๋ น์ด
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
import asyncio
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
from moai_adk.utils.link_validator import LinkValidator
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def create_parser(subparsers) -> argparse.ArgumentParser:
|
|
16
|
+
"""๋งํฌ ๊ฒ์ฆ ํ์ ์์ฑ"""
|
|
17
|
+
parser = subparsers.add_parser(
|
|
18
|
+
'validate-links',
|
|
19
|
+
help='์จ๋ผ์ธ ๋ฌธ์ ๋งํฌ ๊ฒ์ฆ',
|
|
20
|
+
description='README.ko.md์ ์๋ ๋ชจ๋ ์จ๋ผ์ธ ๋ฌธ์ ๋งํฌ๋ฅผ ์๋์ผ๋ก ๊ฒ์ฆํฉ๋๋ค'
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
parser.add_argument(
|
|
24
|
+
'--file', '-f',
|
|
25
|
+
type=str,
|
|
26
|
+
default='README.ko.md',
|
|
27
|
+
help='๊ฒ์ฆํ ํ์ผ ๊ฒฝ๋ก (๊ธฐ๋ณธ๊ฐ: README.ko.md)'
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
parser.add_argument(
|
|
31
|
+
'--max-concurrent', '-c',
|
|
32
|
+
type=int,
|
|
33
|
+
default=3,
|
|
34
|
+
help='๋์์ ๊ฒ์ฆํ ์ต๋ ๋งํฌ ์ (๊ธฐ๋ณธ๊ฐ: 3)'
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
parser.add_argument(
|
|
38
|
+
'--timeout', '-t',
|
|
39
|
+
type=int,
|
|
40
|
+
default=8,
|
|
41
|
+
help='์์ฒญ ํ์์์ (์ด) (๊ธฐ๋ณธ๊ฐ: 8)'
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
parser.add_argument(
|
|
45
|
+
'--output', '-o',
|
|
46
|
+
type=str,
|
|
47
|
+
help='๊ฒฐ๊ณผ๋ฅผ ์ ์ฅํ ํ์ผ ๊ฒฝ๋ก'
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
'--verbose', '-v',
|
|
52
|
+
action='store_true',
|
|
53
|
+
help='์์ธํ ์งํ ์ํฉ ํ์'
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return parser
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def run_command(args) -> int:
|
|
60
|
+
"""๋งํฌ ๊ฒ์ฆ ๋ช
๋ น ์คํ"""
|
|
61
|
+
try:
|
|
62
|
+
# ํ์ผ ๊ฒฝ๋ก ์ค์
|
|
63
|
+
file_path = Path(args.file)
|
|
64
|
+
if not file_path.exists():
|
|
65
|
+
print(f"์ค๋ฅ: ํ์ผ์ด ์กด์ฌํ์ง ์์ต๋๋ค: {file_path}")
|
|
66
|
+
return 1
|
|
67
|
+
|
|
68
|
+
# ๊ฒ์ฆ๊ธฐ ์์ฑ
|
|
69
|
+
validator = LinkValidator(
|
|
70
|
+
max_concurrent=args.max_concurrent,
|
|
71
|
+
timeout=args.timeout
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
if args.verbose:
|
|
75
|
+
print(f"ํ์ผ์์ ๋งํฌ ์ถ์ถ ์ค: {file_path}")
|
|
76
|
+
|
|
77
|
+
# ๋งํฌ ์ถ์ถ
|
|
78
|
+
links = validator.extract_links_from_file(file_path)
|
|
79
|
+
|
|
80
|
+
if not links:
|
|
81
|
+
print("๊ฒ์ฆํ ๋งํฌ๊ฐ ์์ต๋๋ค.")
|
|
82
|
+
return 0
|
|
83
|
+
|
|
84
|
+
if args.verbose:
|
|
85
|
+
print(f"์ด {len(links)}๊ฐ์ ๋งํฌ๋ฅผ ๊ฒ์ฆํฉ๋๋ค...")
|
|
86
|
+
|
|
87
|
+
# ๋น๋๊ธฐ ๊ฒ์ฆ ์คํ
|
|
88
|
+
async def validate_links():
|
|
89
|
+
async with validator:
|
|
90
|
+
result = await validator.validate_all_links(links)
|
|
91
|
+
return result
|
|
92
|
+
|
|
93
|
+
result = asyncio.run(validate_links())
|
|
94
|
+
|
|
95
|
+
# ๊ฒฐ๊ณผ ์์ฑ
|
|
96
|
+
report = validator.generate_report(result)
|
|
97
|
+
|
|
98
|
+
# ์ถ๋ ฅ
|
|
99
|
+
print(report)
|
|
100
|
+
|
|
101
|
+
# ํ์ผ ์ ์ฅ
|
|
102
|
+
if args.output:
|
|
103
|
+
output_path = Path(args.output)
|
|
104
|
+
output_path.write_text(report, encoding='utf-8')
|
|
105
|
+
print(f"\n๊ฒฐ๊ณผ๊ฐ ์ ์ฅ๋์์ต๋๋ค: {output_path}")
|
|
106
|
+
|
|
107
|
+
# ์ข
๋ฃ ์ฝ๋ ๋ฐํ
|
|
108
|
+
if result.invalid_links > 0:
|
|
109
|
+
print(f"\nโ ๏ธ {result.invalid_links}๊ฐ์ ๋งํฌ๊ฐ ๊ฒ์ฆ์ ์คํจํ์ต๋๋ค.")
|
|
110
|
+
return 1
|
|
111
|
+
else:
|
|
112
|
+
print("\nโ
๋ชจ๋ ๋งํฌ๊ฐ ์ ์์ ์ผ๋ก ๊ฒ์ฆ๋์์ต๋๋ค.")
|
|
113
|
+
return 0
|
|
114
|
+
|
|
115
|
+
except KeyboardInterrupt:
|
|
116
|
+
print("\n๊ฒ์ฆ์ด ์ฌ์ฉ์์ ์ํด ์ค๋จ๋์์ต๋๋ค.")
|
|
117
|
+
return 1
|
|
118
|
+
except Exception as e:
|
|
119
|
+
print(f"์ค๋ฅ ๋ฐ์: {e}")
|
|
120
|
+
return 1
|
|
@@ -17,10 +17,11 @@ class ProjectSetupAnswers(TypedDict):
|
|
|
17
17
|
"""Project setup answers"""
|
|
18
18
|
|
|
19
19
|
project_name: str
|
|
20
|
-
mode: str # personal | team
|
|
21
|
-
locale: str # ko | en
|
|
22
|
-
language: str | None
|
|
23
|
-
author: str
|
|
20
|
+
mode: str # personal | team (default from init)
|
|
21
|
+
locale: str # ko | en (default from init)
|
|
22
|
+
language: str | None # Will be set in /alfred:0-project
|
|
23
|
+
author: str # Will be set in /alfred:0-project
|
|
24
|
+
mcp_servers: list[str] # Selected MCP servers to install
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def prompt_project_setup(
|
|
@@ -45,13 +46,17 @@ def prompt_project_setup(
|
|
|
45
46
|
"""
|
|
46
47
|
answers: ProjectSetupAnswers = {
|
|
47
48
|
"project_name": "",
|
|
48
|
-
"mode": "personal",
|
|
49
|
-
"locale": "
|
|
50
|
-
"language": None,
|
|
51
|
-
"author": "",
|
|
49
|
+
"mode": "personal", # Default: will be configurable in /alfred:0-project
|
|
50
|
+
"locale": "en", # Default: will be configurable in /alfred:0-project
|
|
51
|
+
"language": None, # Will be detected in /alfred:0-project
|
|
52
|
+
"author": "", # Will be set in /alfred:0-project
|
|
53
|
+
"mcp_servers": [], # Selected MCP servers
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
try:
|
|
57
|
+
# SIMPLIFIED: Only ask for project name
|
|
58
|
+
# All other settings (mode, locale, language, author) are now configured in /alfred:0-project
|
|
59
|
+
|
|
55
60
|
# 1. Project name (only when not using the current directory)
|
|
56
61
|
if not is_current_dir:
|
|
57
62
|
if project_name:
|
|
@@ -78,86 +83,16 @@ def prompt_project_setup(
|
|
|
78
83
|
f"[cyan]๐ฆ Project Name:[/cyan] {answers['project_name']} [dim](current directory)[/dim]"
|
|
79
84
|
)
|
|
80
85
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
],
|
|
88
|
-
default="personal",
|
|
89
|
-
).ask()
|
|
90
|
-
if result is None:
|
|
91
|
-
raise KeyboardInterrupt
|
|
92
|
-
answers["mode"] = result
|
|
93
|
-
answers["locale"] = initial_locale or "en"
|
|
94
|
-
if initial_locale:
|
|
95
|
-
console.print(
|
|
96
|
-
f"[cyan]๐ Preferred Language:[/cyan] {answers['locale']} (specified via CLI option)"
|
|
97
|
-
)
|
|
98
|
-
else:
|
|
99
|
-
console.print(
|
|
100
|
-
"[cyan]๐ Preferred Language:[/cyan] en (default, changeable in /alfred:0-project)"
|
|
101
|
-
)
|
|
86
|
+
# MCP ์๋ฒ ์๋ ์ค์น
|
|
87
|
+
mcp_servers = ["context7", "playwright", "sequential-thinking"]
|
|
88
|
+
answers["mcp_servers"] = mcp_servers
|
|
89
|
+
console.print("\n[blue]๐ง MCP (Model Context Protocol) Configuration[/blue]")
|
|
90
|
+
console.print("[dim]Enhance AI capabilities with MCP servers (auto-installing recommended servers)[/dim]\n")
|
|
91
|
+
console.print(f"[green]โ
MCP servers auto-installed: {', '.join(mcp_servers)}[/green]")
|
|
102
92
|
|
|
103
|
-
#
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
default=True,
|
|
107
|
-
).ask()
|
|
108
|
-
if result is None:
|
|
109
|
-
raise KeyboardInterrupt
|
|
110
|
-
detect_language = result
|
|
111
|
-
|
|
112
|
-
if not detect_language:
|
|
113
|
-
result = questionary.select(
|
|
114
|
-
"๐ป Select programming language:",
|
|
115
|
-
choices=[
|
|
116
|
-
"Python",
|
|
117
|
-
"TypeScript",
|
|
118
|
-
"JavaScript",
|
|
119
|
-
"Java",
|
|
120
|
-
"Go",
|
|
121
|
-
"Rust",
|
|
122
|
-
"Ruby",
|
|
123
|
-
"Dart",
|
|
124
|
-
"Swift",
|
|
125
|
-
"Kotlin",
|
|
126
|
-
"PHP",
|
|
127
|
-
"C#",
|
|
128
|
-
"C",
|
|
129
|
-
"C++",
|
|
130
|
-
"Elixir",
|
|
131
|
-
"Scala",
|
|
132
|
-
"Clojure",
|
|
133
|
-
"Haskell",
|
|
134
|
-
"Lua",
|
|
135
|
-
"OCaml",
|
|
136
|
-
"Generic",
|
|
137
|
-
],
|
|
138
|
-
).ask()
|
|
139
|
-
if result is None:
|
|
140
|
-
raise KeyboardInterrupt
|
|
141
|
-
answers["language"] = result
|
|
142
|
-
|
|
143
|
-
# 4. Author information (optional)
|
|
144
|
-
result = questionary.confirm(
|
|
145
|
-
"๐ค Add author information? (optional)",
|
|
146
|
-
default=False,
|
|
147
|
-
).ask()
|
|
148
|
-
if result is None:
|
|
149
|
-
raise KeyboardInterrupt
|
|
150
|
-
add_author = result
|
|
151
|
-
|
|
152
|
-
if add_author:
|
|
153
|
-
result = questionary.text(
|
|
154
|
-
"Author (GitHub ID):",
|
|
155
|
-
default="",
|
|
156
|
-
validate=lambda text: text.startswith("@") or "Must start with @",
|
|
157
|
-
).ask()
|
|
158
|
-
if result is None:
|
|
159
|
-
raise KeyboardInterrupt
|
|
160
|
-
answers["author"] = result
|
|
93
|
+
# NOTE: All other configuration (mode, language, author) is now handled in /alfred:0-project
|
|
94
|
+
# This significantly reduces init time and improves UX
|
|
95
|
+
answers["locale"] = initial_locale or "en"
|
|
161
96
|
|
|
162
97
|
return answers
|
|
163
98
|
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MoAI-ADK Session Analyzer
|
|
3
|
+
|
|
4
|
+
Claude Code ์ธ์
๋ก๊ทธ๋ฅผ ๋ถ์ํ์ฌ ๋ฐ์ดํฐ ๊ธฐ๋ฐ ๊ฐ์ ์ ์ ์์ฑ
|
|
5
|
+
|
|
6
|
+
This module provides the SessionAnalyzer class for analyzing Claude Code session logs
|
|
7
|
+
and generating improvement suggestions based on usage patterns.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
from collections import defaultdict
|
|
12
|
+
from datetime import datetime, timedelta
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import Any, Dict, Optional
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SessionAnalyzer:
|
|
18
|
+
"""Claude Code ์ธ์
๋ก๊ทธ ๋ถ์๊ธฐ"""
|
|
19
|
+
|
|
20
|
+
def __init__(self, days_back: int = 7, verbose: bool = False):
|
|
21
|
+
"""
|
|
22
|
+
Initialize SessionAnalyzer
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
days_back: Number of days to analyze (default: 7)
|
|
26
|
+
verbose: Enable verbose output (default: False)
|
|
27
|
+
"""
|
|
28
|
+
self.claude_projects = Path.home() / ".claude" / "projects"
|
|
29
|
+
self.days_back = days_back
|
|
30
|
+
self.verbose = verbose
|
|
31
|
+
|
|
32
|
+
self.patterns = {
|
|
33
|
+
"total_sessions": 0,
|
|
34
|
+
"total_events": 0,
|
|
35
|
+
"tool_usage": defaultdict(int),
|
|
36
|
+
"tool_failures": defaultdict(int),
|
|
37
|
+
"error_patterns": defaultdict(int),
|
|
38
|
+
"permission_requests": defaultdict(int),
|
|
39
|
+
"hook_failures": defaultdict(int),
|
|
40
|
+
"command_frequency": defaultdict(int),
|
|
41
|
+
"average_session_length": 0,
|
|
42
|
+
"success_rate": 0.0,
|
|
43
|
+
"failed_sessions": 0,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
self.sessions_data = []
|
|
47
|
+
|
|
48
|
+
def parse_sessions(self) -> Dict[str, Any]:
|
|
49
|
+
"""
|
|
50
|
+
Parse all session logs from the last N days
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
Dictionary containing analysis patterns and metrics
|
|
54
|
+
"""
|
|
55
|
+
if not self.claude_projects.exists():
|
|
56
|
+
if self.verbose:
|
|
57
|
+
print(f"โ ๏ธ Claude projects directory not found: {self.claude_projects}")
|
|
58
|
+
return self.patterns
|
|
59
|
+
|
|
60
|
+
cutoff_date = datetime.now() - timedelta(days=self.days_back)
|
|
61
|
+
|
|
62
|
+
# Look for both session-*.json and UUID.jsonl files
|
|
63
|
+
session_files = []
|
|
64
|
+
session_files.extend(self.claude_projects.glob("*/session-*.json"))
|
|
65
|
+
session_files.extend(self.claude_projects.glob("*/*.jsonl"))
|
|
66
|
+
|
|
67
|
+
if self.verbose:
|
|
68
|
+
print(f"Found {len(session_files)} session files")
|
|
69
|
+
|
|
70
|
+
for session_file in session_files:
|
|
71
|
+
# ํ์ผ ์์ ์๊ฐ ํ์ธ
|
|
72
|
+
if datetime.fromtimestamp(session_file.stat().st_mtime) < cutoff_date:
|
|
73
|
+
continue
|
|
74
|
+
|
|
75
|
+
try:
|
|
76
|
+
# Handle both JSON and JSONL formats
|
|
77
|
+
if session_file.suffix == '.jsonl':
|
|
78
|
+
# JSONL format: read line by line
|
|
79
|
+
sessions = []
|
|
80
|
+
with open(session_file, encoding="utf-8") as f:
|
|
81
|
+
for line_num, line in enumerate(f, 1):
|
|
82
|
+
line = line.strip()
|
|
83
|
+
if line:
|
|
84
|
+
try:
|
|
85
|
+
session = json.loads(line)
|
|
86
|
+
sessions.append(session)
|
|
87
|
+
except json.JSONDecodeError as e:
|
|
88
|
+
if self.verbose:
|
|
89
|
+
print(f"โ ๏ธ Error reading line {line_num} in {session_file}: {e}")
|
|
90
|
+
|
|
91
|
+
# Analyze each session from the JSONL file
|
|
92
|
+
for session in sessions:
|
|
93
|
+
self._analyze_session(session)
|
|
94
|
+
self.sessions_data.append(session)
|
|
95
|
+
else:
|
|
96
|
+
# JSON format: single session per file
|
|
97
|
+
with open(session_file, encoding="utf-8") as f:
|
|
98
|
+
session = json.load(f)
|
|
99
|
+
self._analyze_session(session)
|
|
100
|
+
self.sessions_data.append(session)
|
|
101
|
+
except (json.JSONDecodeError, IOError) as e:
|
|
102
|
+
if self.verbose:
|
|
103
|
+
print(f"โ ๏ธ Error reading {session_file}: {e}")
|
|
104
|
+
|
|
105
|
+
self.patterns["total_sessions"] = len(self.sessions_data)
|
|
106
|
+
return self.patterns
|
|
107
|
+
|
|
108
|
+
def _analyze_session(self, session: Dict[str, Any]):
|
|
109
|
+
"""
|
|
110
|
+
Analyze individual session
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
session: Session data dictionary from Claude Code
|
|
114
|
+
"""
|
|
115
|
+
# Handle session summary format (current JSONL format)
|
|
116
|
+
if session.get("type") == "summary":
|
|
117
|
+
# Count session types by summary content
|
|
118
|
+
summary = session.get("summary", "").lower()
|
|
119
|
+
|
|
120
|
+
# Simple analysis of session summaries
|
|
121
|
+
if any(keyword in summary for keyword in ["error", "fail", "issue", "problem"]):
|
|
122
|
+
self.patterns["failed_sessions"] += 1
|
|
123
|
+
self.patterns["tool_failures"]["session_error_in_summary"] += 1
|
|
124
|
+
|
|
125
|
+
# Extract potential tool usage from summary
|
|
126
|
+
tool_keywords = ["test", "build", "deploy", "analyze", "create", "update", "fix", "check"]
|
|
127
|
+
for keyword in tool_keywords:
|
|
128
|
+
if keyword in summary:
|
|
129
|
+
self.patterns["tool_usage"][f"summary_{keyword}"] += 1
|
|
130
|
+
|
|
131
|
+
# Track session summaries as events
|
|
132
|
+
self.patterns["total_events"] += 1
|
|
133
|
+
return
|
|
134
|
+
|
|
135
|
+
# Handle detailed event format (legacy session-*.json format)
|
|
136
|
+
events = session.get("events", [])
|
|
137
|
+
self.patterns["total_events"] += len(events)
|
|
138
|
+
|
|
139
|
+
has_error = False
|
|
140
|
+
|
|
141
|
+
for event in events:
|
|
142
|
+
event_type = event.get("type", "unknown")
|
|
143
|
+
|
|
144
|
+
# Tool ์ฌ์ฉ ํจํด ์ถ์ถ
|
|
145
|
+
if event_type == "tool_call":
|
|
146
|
+
tool_name = event.get("toolName", "unknown").split("(")[0]
|
|
147
|
+
self.patterns["tool_usage"][tool_name] += 1
|
|
148
|
+
|
|
149
|
+
# Tool ์ค๋ฅ ํจํด
|
|
150
|
+
elif event_type == "tool_error":
|
|
151
|
+
error_msg = event.get("error", "unknown error")
|
|
152
|
+
self.patterns["tool_failures"][error_msg[:50]] += 1 # ์ฒ์ 50์
|
|
153
|
+
has_error = True
|
|
154
|
+
|
|
155
|
+
# ๊ถํ ์์ฒญ
|
|
156
|
+
elif event_type == "permission_request":
|
|
157
|
+
perm_type = event.get("permission_type", "unknown")
|
|
158
|
+
self.patterns["permission_requests"][perm_type] += 1
|
|
159
|
+
|
|
160
|
+
# Hook ์คํจ
|
|
161
|
+
elif event_type == "hook_failure":
|
|
162
|
+
hook_name = event.get("hook_name", "unknown")
|
|
163
|
+
self.patterns["hook_failures"][hook_name] += 1
|
|
164
|
+
has_error = True
|
|
165
|
+
|
|
166
|
+
# ๋ช
๋ น์ด ์ฌ์ฉ
|
|
167
|
+
if "command" in event:
|
|
168
|
+
cmd = event.get("command", "").split()[0]
|
|
169
|
+
if cmd:
|
|
170
|
+
self.patterns["command_frequency"][cmd] += 1
|
|
171
|
+
|
|
172
|
+
if has_error:
|
|
173
|
+
self.patterns["failed_sessions"] += 1
|
|
174
|
+
|
|
175
|
+
def generate_report(self) -> str:
|
|
176
|
+
"""
|
|
177
|
+
Generate markdown report
|
|
178
|
+
|
|
179
|
+
Returns:
|
|
180
|
+
Formatted markdown report string
|
|
181
|
+
"""
|
|
182
|
+
timestamp = datetime.now().isoformat()
|
|
183
|
+
total_sessions = self.patterns["total_sessions"]
|
|
184
|
+
success_rate = (
|
|
185
|
+
((total_sessions - self.patterns["failed_sessions"]) / total_sessions * 100)
|
|
186
|
+
if total_sessions > 0
|
|
187
|
+
else 0
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
report = f"""# MoAI-ADK ์ธ์
๋ฉํ๋ถ์ ๋ฆฌํฌํธ
|
|
191
|
+
|
|
192
|
+
**์์ฑ ์ผ์**: {timestamp}
|
|
193
|
+
**๋ถ์ ๊ธฐ๊ฐ**: ์ต๊ทผ {self.days_back}์ผ
|
|
194
|
+
**๋ถ์ ๋ฒ์**: `~/.claude/projects/`
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## ๐ ์ ์ฒด ๋ฉํธ๋ฆญ
|
|
199
|
+
|
|
200
|
+
| ๋ฉํธ๋ฆญ | ๊ฐ |
|
|
201
|
+
|------|-----|
|
|
202
|
+
| **์ด ์ธ์
์** | {total_sessions} |
|
|
203
|
+
| **์ด ์ด๋ฒคํธ ์** | {self.patterns['total_events']} |
|
|
204
|
+
| **์ฑ๊ณต ์ธ์
** | {total_sessions - self.patterns['failed_sessions']} ({success_rate:.1f}%) |
|
|
205
|
+
| **์คํจ ์ธ์
** | {self.patterns['failed_sessions']} ({100 - success_rate:.1f}%) |
|
|
206
|
+
| **ํ๊ท ์ธ์
๊ธธ์ด** | {self.patterns['total_events'] / total_sessions if total_sessions > 0 else 0:.1f} ์ด๋ฒคํธ |
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## ๐ง ๋๊ตฌ ์ฌ์ฉ ํจํด (์์ 10)
|
|
211
|
+
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
# ์์ ๋๊ตฌ ์ฌ์ฉ
|
|
215
|
+
sorted_tools = sorted(
|
|
216
|
+
self.patterns["tool_usage"].items(), key=lambda x: x[1], reverse=True
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
report += "| ๋๊ตฌ | ์ฌ์ฉ ํ์ |\n|------|----------|\n"
|
|
220
|
+
for tool, count in sorted_tools[:10]:
|
|
221
|
+
report += f"| `{tool}` | {count} |\n"
|
|
222
|
+
|
|
223
|
+
# Tool ์ค๋ฅ ํจํด
|
|
224
|
+
report += "\n## โ ๏ธ ๋๊ตฌ ์ค๋ฅ ํจํด (์์ 5)\n\n"
|
|
225
|
+
|
|
226
|
+
if self.patterns["tool_failures"]:
|
|
227
|
+
sorted_errors = sorted(
|
|
228
|
+
self.patterns["tool_failures"].items(),
|
|
229
|
+
key=lambda x: x[1],
|
|
230
|
+
reverse=True,
|
|
231
|
+
)
|
|
232
|
+
report += "| ์ค๋ฅ | ๋ฐ์ ํ์ |\n|------|----------|\n"
|
|
233
|
+
for error, count in sorted_errors[:5]:
|
|
234
|
+
report += f"| {error}... | {count} |\n"
|
|
235
|
+
else:
|
|
236
|
+
report += "โ
๋๊ตฌ ์ค๋ฅ ์์\n"
|
|
237
|
+
|
|
238
|
+
# Hook ์คํจ ๋ถ์
|
|
239
|
+
report += "\n## ๐ช Hook ์คํจ ๋ถ์\n\n"
|
|
240
|
+
|
|
241
|
+
if self.patterns["hook_failures"]:
|
|
242
|
+
for hook, count in sorted(
|
|
243
|
+
self.patterns["hook_failures"].items(),
|
|
244
|
+
key=lambda x: x[1],
|
|
245
|
+
reverse=True,
|
|
246
|
+
):
|
|
247
|
+
report += f"- **{hook}**: {count}ํ\n"
|
|
248
|
+
else:
|
|
249
|
+
report += "โ
Hook ์คํจ ์์\n"
|
|
250
|
+
|
|
251
|
+
# ๊ถํ ์์ฒญ ๋ถ์
|
|
252
|
+
report += "\n## ๐ ๊ถํ ์์ฒญ ํจํด\n\n"
|
|
253
|
+
|
|
254
|
+
if self.patterns["permission_requests"]:
|
|
255
|
+
sorted_perms = sorted(
|
|
256
|
+
self.patterns["permission_requests"].items(),
|
|
257
|
+
key=lambda x: x[1],
|
|
258
|
+
reverse=True,
|
|
259
|
+
)
|
|
260
|
+
report += "| ๊ถํ ์ ํ | ์์ฒญ ํ์ |\n|---------|----------|\n"
|
|
261
|
+
for perm, count in sorted_perms:
|
|
262
|
+
report += f"| {perm} | {count} |\n"
|
|
263
|
+
else:
|
|
264
|
+
report += "โ
๊ถํ ์์ฒญ ์์\n"
|
|
265
|
+
|
|
266
|
+
# ๊ฐ์ ์ ์
|
|
267
|
+
report += "\n## ๐ก ๊ฐ์ ์ ์\n\n"
|
|
268
|
+
report += self._generate_suggestions()
|
|
269
|
+
|
|
270
|
+
return report
|
|
271
|
+
|
|
272
|
+
def _generate_suggestions(self) -> str:
|
|
273
|
+
"""
|
|
274
|
+
Generate improvement suggestions based on patterns
|
|
275
|
+
|
|
276
|
+
Returns:
|
|
277
|
+
Formatted suggestions string
|
|
278
|
+
"""
|
|
279
|
+
suggestions = []
|
|
280
|
+
|
|
281
|
+
# ๋์ ๊ถํ ์์ฒญ โ ๊ถํ ์ค์ ์ฌ๊ฒํ
|
|
282
|
+
if self.patterns["permission_requests"]:
|
|
283
|
+
top_perm = max(
|
|
284
|
+
self.patterns["permission_requests"].items(),
|
|
285
|
+
key=lambda x: x[1],
|
|
286
|
+
)
|
|
287
|
+
if top_perm[1] >= 5:
|
|
288
|
+
suggestions.append(
|
|
289
|
+
f"๐ **{top_perm[0]}** ๊ถํ์ด ์์ฃผ ์์ฒญ๋จ ({top_perm[1]}ํ)\n"
|
|
290
|
+
f" โ `.claude/settings.json`์ `permissions` ์ฌ๊ฒํ ํ์\n"
|
|
291
|
+
f" โ `allow` โ `ask`๋ก ๋ณ๊ฒฝํ๊ฑฐ๋ ์ Bash ๋๊ตฌ ๊ท์น ์ถ๊ฐ"
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
# Tool ์คํจ ํจํด โ ํํผ ์ ๋ต ์ถ๊ฐ
|
|
295
|
+
if self.patterns["tool_failures"]:
|
|
296
|
+
top_error = max(
|
|
297
|
+
self.patterns["tool_failures"].items(),
|
|
298
|
+
key=lambda x: x[1],
|
|
299
|
+
)
|
|
300
|
+
if top_error[1] >= 3:
|
|
301
|
+
suggestions.append(
|
|
302
|
+
f"๐ง **๋๊ตฌ ์ค๋ฅ**: '{top_error[0]}...' ({top_error[1]}ํ)\n"
|
|
303
|
+
f" โ CLAUDE.md์ ํํผ ์ ๋ต ์ถ๊ฐ\n"
|
|
304
|
+
f" โ ์: 'X ์ค๋ฅ ์ Y๋ฅผ ์๋ํ์ธ์'"
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
# Hook ์คํจ โ Hook ๋ก์ง ๊ฒํ
|
|
308
|
+
if self.patterns["hook_failures"]:
|
|
309
|
+
for hook, count in sorted(
|
|
310
|
+
self.patterns["hook_failures"].items(),
|
|
311
|
+
key=lambda x: x[1],
|
|
312
|
+
reverse=True,
|
|
313
|
+
)[:3]:
|
|
314
|
+
if count >= 2:
|
|
315
|
+
suggestions.append(
|
|
316
|
+
f"๐ช **Hook ์คํจ**: {hook} ({count}ํ)\n"
|
|
317
|
+
f" โ `.claude/hooks/alfred/{hook}.py` ๋๋ฒ๊น
ํ์\n"
|
|
318
|
+
f" โ ํ์์์, ๊ถํ, ํ์ผ ๊ฒฝ๋ก ํ์ธ"
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
# ๋ฎ์ ์ฑ๊ณต๋ฅ โ ์ ๋ฐ์ ์ง๋จ
|
|
322
|
+
success_rate = (
|
|
323
|
+
((self.patterns["total_sessions"] - self.patterns["failed_sessions"])
|
|
324
|
+
/ self.patterns["total_sessions"] * 100)
|
|
325
|
+
if self.patterns["total_sessions"] > 0
|
|
326
|
+
else 0
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
if success_rate < 80 and self.patterns["total_sessions"] >= 5:
|
|
330
|
+
suggestions.append(
|
|
331
|
+
f"๐ **๋ฎ์ ์ฑ๊ณต๋ฅ ** ({success_rate:.1f}%)\n"
|
|
332
|
+
f" โ ์ต๊ทผ ์ธ์
๋ก๊ทธ ์์ธ ๊ฒํ \n"
|
|
333
|
+
f" โ CLAUDE.md์ ๊ท์น/์ ์ฝ ์ฌํ๊ฐ\n"
|
|
334
|
+
f" โ Alfred์ Sub-agent ๊ฐ ์ปจํ
์คํธ ๋๊ธฐํ ํ์ธ"
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
if not suggestions:
|
|
338
|
+
suggestions.append(
|
|
339
|
+
"โ
**No major issues detected**\n"
|
|
340
|
+
" โ ํ์ฌ ์ค์ ๊ณผ ๊ท์น์ด ์ ์๋ ์ค"
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
return "\n\n".join(suggestions)
|
|
344
|
+
|
|
345
|
+
def save_report(self, output_path: Optional[Path] = None, project_path: Optional[Path] = None) -> Path:
|
|
346
|
+
"""
|
|
347
|
+
Save report to file
|
|
348
|
+
|
|
349
|
+
Args:
|
|
350
|
+
output_path: Custom output file path (optional)
|
|
351
|
+
project_path: Project root path (defaults to current working directory)
|
|
352
|
+
|
|
353
|
+
Returns:
|
|
354
|
+
Path to the saved report file
|
|
355
|
+
"""
|
|
356
|
+
if output_path is None:
|
|
357
|
+
if project_path is None:
|
|
358
|
+
project_path = Path.cwd()
|
|
359
|
+
|
|
360
|
+
output_dir = project_path / ".moai" / "reports"
|
|
361
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
362
|
+
output_path = output_dir / f"daily-{datetime.now().strftime('%Y-%m-%d')}.md"
|
|
363
|
+
|
|
364
|
+
report = self.generate_report()
|
|
365
|
+
output_path.write_text(report, encoding="utf-8")
|
|
366
|
+
|
|
367
|
+
if self.verbose:
|
|
368
|
+
print(f"๐ Report saved: {output_path}")
|
|
369
|
+
|
|
370
|
+
return output_path
|
|
371
|
+
|
|
372
|
+
def get_metrics(self) -> Dict[str, Any]:
|
|
373
|
+
"""
|
|
374
|
+
Get analysis metrics as dictionary
|
|
375
|
+
|
|
376
|
+
Returns:
|
|
377
|
+
Dictionary containing analysis metrics
|
|
378
|
+
"""
|
|
379
|
+
total_sessions = self.patterns["total_sessions"]
|
|
380
|
+
if total_sessions > 0:
|
|
381
|
+
self.patterns["success_rate"] = (
|
|
382
|
+
(total_sessions - self.patterns["failed_sessions"]) / total_sessions * 100
|
|
383
|
+
)
|
|
384
|
+
self.patterns["average_session_length"] = (
|
|
385
|
+
self.patterns["total_events"] / total_sessions
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
return self.patterns.copy()
|