moai-adk 0.3.13__py3-none-any.whl → 0.4.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 +1 -1
- moai_adk/cli/commands/__init__.py +1 -1
- moai_adk/cli/commands/doctor.py +2 -2
- moai_adk/cli/commands/init.py +10 -5
- moai_adk/cli/commands/status.py +1 -1
- moai_adk/cli/commands/update.py +210 -8
- moai_adk/cli/prompts/init_prompts.py +15 -19
- moai_adk/core/__init__.py +1 -1
- moai_adk/core/diagnostics/slash_commands.py +1 -1
- moai_adk/core/git/branch.py +1 -1
- moai_adk/core/git/manager.py +1 -1
- moai_adk/core/project/backup_utils.py +1 -0
- moai_adk/core/project/phase_executor.py +3 -1
- moai_adk/core/project/validator.py +3 -2
- 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/template/__init__.py +1 -1
- moai_adk/core/template/backup.py +12 -3
- moai_adk/core/template/config.py +24 -0
- moai_adk/core/template/languages.py +1 -1
- moai_adk/core/template/merger.py +74 -4
- moai_adk/core/template/processor.py +62 -14
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +765 -191
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
- moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
- moai_adk/templates/.claude/agents/alfred/project-manager.md +205 -125
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
- moai_adk/templates/.claude/commands/alfred/0-project.md +856 -355
- moai_adk/templates/.claude/commands/alfred/1-plan.md +572 -0
- moai_adk/templates/.claude/commands/alfred/2-run.md +470 -0
- moai_adk/templates/.claude/commands/alfred/3-sync.md +366 -356
- moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
- moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
- moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
- moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +30 -51
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +94 -0
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +513 -0
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +433 -0
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +332 -0
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +384 -0
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +363 -0
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +595 -0
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +496 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +95 -0
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +93 -0
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +105 -0
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +102 -0
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +104 -0
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +96 -0
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +112 -0
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +90 -0
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +94 -0
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +93 -0
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +86 -0
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +86 -0
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +102 -0
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +96 -0
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +98 -0
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +96 -0
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +100 -0
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +96 -0
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
- moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
- moai_adk/templates/.moai/config.json +9 -6
- moai_adk/templates/.moai/memory/development-guide.md +220 -221
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
- moai_adk/templates/.moai/memory/spec-metadata.md +149 -150
- moai_adk/templates/.moai/project/product.md +90 -90
- moai_adk/templates/.moai/project/structure.md +85 -85
- moai_adk/templates/.moai/project/tech.md +117 -117
- moai_adk/templates/CLAUDE.md +354 -573
- moai_adk/templates/__init__.py +1 -1
- moai_adk/utils/__init__.py +1 -1
- moai_adk/utils/banner.py +7 -7
- moai_adk/utils/logger.py +1 -1
- moai_adk-0.4.1.dist-info/METADATA +303 -0
- moai_adk-0.4.1.dist-info/RECORD +152 -0
- moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -532
- moai_adk/templates/.claude/commands/alfred/2-build.md +0 -432
- moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
- moai_adk-0.3.13.dist-info/METADATA +0 -1586
- moai_adk-0.3.13.dist-info/RECORD +0 -90
- {moai_adk-0.3.13.dist-info → moai_adk-0.4.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.3.13.dist-info → moai_adk-0.4.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.3.13.dist-info → moai_adk-0.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,75 +1,54 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Session event handlers
|
|
3
3
|
|
|
4
|
-
SessionStart, SessionEnd
|
|
4
|
+
SessionStart, SessionEnd event handling
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
import os
|
|
8
|
-
import time
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
7
|
from core import HookPayload, HookResult
|
|
12
8
|
from core.checkpoint import list_checkpoints
|
|
13
9
|
from core.project import count_specs, detect_language, get_git_info
|
|
14
10
|
|
|
15
11
|
|
|
16
12
|
def handle_session_start(payload: HookPayload) -> HookResult:
|
|
17
|
-
"""SessionStart
|
|
13
|
+
"""SessionStart event handler (with Checkpoint list)
|
|
18
14
|
|
|
19
|
-
Claude Code
|
|
20
|
-
|
|
15
|
+
When Claude Code Session starts, it displays a summary of project status.
|
|
16
|
+
You can check the language, Git status, SPEC progress, and checkpoint list at a glance.
|
|
21
17
|
|
|
22
18
|
Args:
|
|
23
|
-
payload: Claude Code
|
|
19
|
+
payload: Claude Code event payload (cwd key required)
|
|
24
20
|
|
|
25
21
|
Returns:
|
|
26
|
-
HookResult(message
|
|
22
|
+
HookResult(message=project status summary message, systemMessage=for user display)
|
|
27
23
|
|
|
28
24
|
Message Format:
|
|
29
25
|
🚀 MoAI-ADK Session Started
|
|
30
|
-
Language: {
|
|
31
|
-
Branch: {
|
|
32
|
-
Changes: {
|
|
33
|
-
SPEC Progress: {
|
|
34
|
-
Checkpoints: {
|
|
26
|
+
Language: {language}
|
|
27
|
+
Branch: {branch} ({commit hash})
|
|
28
|
+
Changes: {Number of Changed Files}
|
|
29
|
+
SPEC Progress: {Complete}/{Total} ({percent}%)
|
|
30
|
+
Checkpoints: {number} available (showing the latest 3 items)
|
|
35
31
|
|
|
36
32
|
Note:
|
|
37
|
-
- Claude Code
|
|
38
|
-
-
|
|
39
|
-
-
|
|
33
|
+
- Claude Code processes SessionStart in several stages (clear → compact)
|
|
34
|
+
- Display message only at “compact” stage to prevent duplicate output
|
|
35
|
+
- "clear" step returns empty result (invisible to user)
|
|
40
36
|
|
|
41
37
|
TDD History:
|
|
42
|
-
- RED:
|
|
43
|
-
- GREEN:
|
|
44
|
-
- REFACTOR:
|
|
45
|
-
- FIX:
|
|
38
|
+
- RED: Session startup message format test
|
|
39
|
+
- GREEN: Generate status message by combining helper functions
|
|
40
|
+
- REFACTOR: Improved message format, improved readability, added checkpoint list
|
|
41
|
+
- FIX: Prevent duplicate output of clear step (only compact step is displayed)
|
|
46
42
|
|
|
47
43
|
@TAG:CHECKPOINT-EVENT-001
|
|
48
44
|
"""
|
|
49
|
-
#
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# 기존 세션 파일이 있고 5초 이내면 중복 실행으로 간주
|
|
56
|
-
if session_file.exists():
|
|
57
|
-
file_age = time.time() - session_file.stat().st_mtime
|
|
58
|
-
if file_age < 5.0:
|
|
59
|
-
return HookResult() # 중복 실행 방지
|
|
60
|
-
|
|
61
|
-
# 세션 파일 생성/갱신
|
|
62
|
-
session_file.touch()
|
|
63
|
-
|
|
64
|
-
# 1시간 이상 된 세션 파일 자동 정리
|
|
65
|
-
if session_file.parent.exists():
|
|
66
|
-
for old_file in session_file.parent.glob("moai-session-*.lock"):
|
|
67
|
-
try:
|
|
68
|
-
if time.time() - old_file.stat().st_mtime > 3600:
|
|
69
|
-
old_file.unlink()
|
|
70
|
-
except Exception:
|
|
71
|
-
pass # 정리 실패는 무시
|
|
45
|
+
# Claude Code SessionStart runs in several stages (clear, compact, etc.)
|
|
46
|
+
# Ignore the "clear" stage and output messages only at the "compact" stage
|
|
47
|
+
event_phase = payload.get("phase", "")
|
|
48
|
+
if event_phase == "clear":
|
|
49
|
+
return HookResult() # returns an empty result (prevents duplicate output)
|
|
72
50
|
|
|
51
|
+
cwd = payload.get("cwd", ".")
|
|
73
52
|
language = detect_language(cwd)
|
|
74
53
|
git_info = get_git_info(cwd)
|
|
75
54
|
specs = count_specs(cwd)
|
|
@@ -80,7 +59,7 @@ def handle_session_start(payload: HookPayload) -> HookResult:
|
|
|
80
59
|
changes = git_info.get("changes", 0)
|
|
81
60
|
spec_progress = f"{specs['completed']}/{specs['total']}"
|
|
82
61
|
|
|
83
|
-
# systemMessage:
|
|
62
|
+
# systemMessage: displayed directly to the user
|
|
84
63
|
lines = [
|
|
85
64
|
"🚀 MoAI-ADK Session Started",
|
|
86
65
|
f" Language: {language}",
|
|
@@ -89,10 +68,10 @@ def handle_session_start(payload: HookPayload) -> HookResult:
|
|
|
89
68
|
f" SPEC Progress: {spec_progress} ({specs['percentage']}%)",
|
|
90
69
|
]
|
|
91
70
|
|
|
92
|
-
# Checkpoint
|
|
71
|
+
# Add Checkpoint list (show only the latest 3 items)
|
|
93
72
|
if checkpoints:
|
|
94
73
|
lines.append(f" Checkpoints: {len(checkpoints)} available")
|
|
95
|
-
for cp in reversed(checkpoints[-3:]): #
|
|
74
|
+
for cp in reversed(checkpoints[-3:]): # Latest 3 items
|
|
96
75
|
branch_short = cp["branch"].replace("before-", "")
|
|
97
76
|
lines.append(f" - {branch_short}")
|
|
98
77
|
lines.append(" Restore: /alfred:0-project restore")
|
|
@@ -100,13 +79,13 @@ def handle_session_start(payload: HookPayload) -> HookResult:
|
|
|
100
79
|
system_message = "\n".join(lines)
|
|
101
80
|
|
|
102
81
|
return HookResult(
|
|
103
|
-
message=system_message,
|
|
104
|
-
systemMessage=system_message,
|
|
82
|
+
message=system_message, # for Claude context
|
|
83
|
+
systemMessage=system_message, # For user display
|
|
105
84
|
)
|
|
106
85
|
|
|
107
86
|
|
|
108
87
|
def handle_session_end(payload: HookPayload) -> HookResult:
|
|
109
|
-
"""SessionEnd
|
|
88
|
+
"""SessionEnd event handler (default implementation)"""
|
|
110
89
|
return HookResult()
|
|
111
90
|
|
|
112
91
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Tool usage handlers
|
|
3
3
|
|
|
4
|
-
PreToolUse, PostToolUse
|
|
4
|
+
PreToolUse, PostToolUse event handling
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from core import HookPayload, HookResult
|
|
@@ -9,19 +9,19 @@ from core.checkpoint import create_checkpoint, detect_risky_operation
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def handle_pre_tool_use(payload: HookPayload) -> HookResult:
|
|
12
|
-
"""PreToolUse
|
|
12
|
+
"""PreToolUse event handler (Event-Driven Checkpoint integration)
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
Claude Code tool
|
|
14
|
+
Automatically creates checkpoints before dangerous operations.
|
|
15
|
+
Called before using the Claude Code tool, it notifies the user when danger is detected.
|
|
16
16
|
|
|
17
17
|
Args:
|
|
18
|
-
payload: Claude Code
|
|
19
|
-
(tool, arguments, cwd
|
|
18
|
+
payload: Claude Code event payload
|
|
19
|
+
(includes tool, arguments, cwd keys)
|
|
20
20
|
|
|
21
21
|
Returns:
|
|
22
22
|
HookResult(
|
|
23
|
-
message=checkpoint
|
|
24
|
-
blocked=False (
|
|
23
|
+
message=checkpoint creation notification (when danger is detected);
|
|
24
|
+
blocked=False (always continue operation)
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
Checkpoint Triggers:
|
|
@@ -30,13 +30,13 @@ def handle_pre_tool_use(payload: HookPayload) -> HookResult:
|
|
|
30
30
|
- MultiEdit: ≥10 files
|
|
31
31
|
|
|
32
32
|
Examples:
|
|
33
|
-
Bash tool (rm -rf)
|
|
33
|
+
Bash tool (rm -rf) detection:
|
|
34
34
|
→ "🛡️ Checkpoint created: before-delete-20251015-143000"
|
|
35
35
|
|
|
36
36
|
Notes:
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
37
|
+
- Return blocked=False even after detection of danger (continue operation)
|
|
38
|
+
- Work continues even when checkpoint fails (ignores)
|
|
39
|
+
- Transparent background operation
|
|
40
40
|
|
|
41
41
|
@TAG:CHECKPOINT-EVENT-001
|
|
42
42
|
"""
|
|
@@ -44,18 +44,17 @@ def handle_pre_tool_use(payload: HookPayload) -> HookResult:
|
|
|
44
44
|
tool_args = payload.get("arguments", {})
|
|
45
45
|
cwd = payload.get("cwd", ".")
|
|
46
46
|
|
|
47
|
-
#
|
|
47
|
+
# Dangerous operation detection
|
|
48
48
|
is_risky, operation_type = detect_risky_operation(tool_name, tool_args, cwd)
|
|
49
49
|
|
|
50
|
-
#
|
|
50
|
+
# Create checkpoint when danger is detected
|
|
51
51
|
if is_risky:
|
|
52
52
|
checkpoint_branch = create_checkpoint(cwd, operation_type)
|
|
53
53
|
|
|
54
54
|
if checkpoint_branch != "checkpoint-failed":
|
|
55
55
|
message = (
|
|
56
56
|
f"🛡️ Checkpoint created: {checkpoint_branch}\n"
|
|
57
|
-
f" Operation: {operation_type}
|
|
58
|
-
f" Restore: /alfred:0-project restore"
|
|
57
|
+
f" Operation: {operation_type}"
|
|
59
58
|
)
|
|
60
59
|
|
|
61
60
|
return HookResult(message=message, blocked=False)
|
|
@@ -64,7 +63,7 @@ def handle_pre_tool_use(payload: HookPayload) -> HookResult:
|
|
|
64
63
|
|
|
65
64
|
|
|
66
65
|
def handle_post_tool_use(payload: HookPayload) -> HookResult:
|
|
67
|
-
"""PostToolUse
|
|
66
|
+
"""PostToolUse event handler (default implementation)"""
|
|
68
67
|
return HookResult()
|
|
69
68
|
|
|
70
69
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""User interaction handlers
|
|
3
3
|
|
|
4
|
-
UserPromptSubmit
|
|
4
|
+
Handling the UserPromptSubmit event
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from core import HookPayload, HookResult
|
|
@@ -9,25 +9,25 @@ from core.context import get_jit_context
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def handle_user_prompt_submit(payload: HookPayload) -> HookResult:
|
|
12
|
-
"""UserPromptSubmit
|
|
12
|
+
"""UserPromptSubmit event handler
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Analyze user prompts and automatically add relevant documents into context.
|
|
15
|
+
Follow the just-in-time (JIT) retrieval principle to load only the documents you need.
|
|
16
16
|
|
|
17
17
|
Args:
|
|
18
|
-
payload: Claude Code
|
|
19
|
-
(userPrompt, cwd
|
|
18
|
+
payload: Claude Code event payload
|
|
19
|
+
(includes userPrompt, cwd keys)
|
|
20
20
|
|
|
21
21
|
Returns:
|
|
22
22
|
HookResult(
|
|
23
|
-
message
|
|
24
|
-
contextFiles
|
|
23
|
+
message=Number of Files loaded (or None),
|
|
24
|
+
contextFiles=Recommended document path list
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
TDD History:
|
|
28
|
-
- RED: JIT
|
|
29
|
-
- GREEN: get_jit_context()
|
|
30
|
-
- REFACTOR:
|
|
28
|
+
- RED: JIT document loading scenario testing
|
|
29
|
+
- GREEN: Recommend documents by calling get_jit_context()
|
|
30
|
+
- REFACTOR: Message conditional display (only when there is a file)
|
|
31
31
|
"""
|
|
32
32
|
user_prompt = payload.get("userPrompt", "")
|
|
33
33
|
cwd = payload.get("cwd", ".")
|