moai-adk 0.4.7__py3-none-any.whl → 0.4.10__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/templates/.claude/agents/alfred/cc-manager.md +188 -954
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +4 -5
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +2 -2
- moai_adk/templates/.claude/agents/alfred/git-manager.md +2 -2
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +3 -3
- moai_adk/templates/.claude/agents/alfred/project-manager.md +6 -6
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +4 -6
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +36 -36
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +2 -2
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +2 -2
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +3 -3
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +5 -5
- moai_adk/templates/.claude/commands/alfred/0-project.md +98 -42
- moai_adk/templates/.claude/commands/alfred/1-plan.md +7 -7
- moai_adk/templates/.claude/commands/alfred/2-run.md +36 -36
- moai_adk/templates/.claude/commands/alfred/3-sync.md +10 -10
- moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +313 -0
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +14 -1
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +117 -33
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +8 -9
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +6 -6
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +5 -4
- moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +175 -0
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +1 -1
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +1 -1
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +1 -1
- moai_adk/templates/.claude/settings.json +42 -2
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +480 -0
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +257 -0
- moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +120 -0
- moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +249 -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 +278 -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 +287 -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 +232 -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 +179 -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 +296 -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 +243 -0
- moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +271 -0
- moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
- moai_adk/templates/.claude/skills/moai-skill-factory/EXAMPLES.md +261 -35
- moai_adk/templates/.claude/skills/moai-skill-factory/INTERACTIVE-DISCOVERY.md +15 -15
- moai_adk/templates/.claude/skills/moai-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
- moai_adk/templates/.claude/skills/moai-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
- moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
- moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +33 -33
- moai_adk/templates/.claude/skills/moai-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
- moai_adk/templates/.claude/skills/moai-skill-factory/reference.md +438 -42
- moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +129 -0
- moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +1300 -0
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh +161 -0
- moai_adk/templates/CLAUDE.md +111 -92
- {moai_adk-0.4.7.dist-info → moai_adk-0.4.10.dist-info}/METADATA +542 -150
- {moai_adk-0.4.7.dist-info → moai_adk-0.4.10.dist-info}/RECORD +65 -73
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -113
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/reference.md +0 -28
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -635
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -992
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/reference.md +0 -801
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -121
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -28
- 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 -123
- moai_adk/templates/.claude/skills/moai-lang-clojure/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-clojure/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-elixir/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-elixir/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -124
- moai_adk/templates/.claude/skills/moai-lang-haskell/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-haskell/reference.md +0 -31
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-julia/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-julia/reference.md +0 -30
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -123
- moai_adk/templates/.claude/skills/moai-lang-lua/examples.md +0 -29
- moai_adk/templates/.claude/skills/moai-lang-lua/reference.md +0 -30
- {moai_adk-0.4.7.dist-info → moai_adk-0.4.10.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.7.dist-info → moai_adk-0.4.10.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.7.dist-info → moai_adk-0.4.10.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env -S uv run --script
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.11"
|
|
4
|
+
# ///
|
|
5
|
+
"""Test Hook Output Validation
|
|
6
|
+
|
|
7
|
+
자동 테스트: Claude Code Hook JSON 스키마 검증
|
|
8
|
+
|
|
9
|
+
- SessionStart Hook JSON 출력 검증
|
|
10
|
+
- UserPromptSubmit Hook 특수 스키마 검증
|
|
11
|
+
- 모든 Hook 이벤트 스키마 일관성 검증
|
|
12
|
+
|
|
13
|
+
실행:
|
|
14
|
+
uv run test_hook_output.py
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import sys
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
|
|
21
|
+
# Add hooks directory to sys.path
|
|
22
|
+
HOOKS_DIR = Path(__file__).parent
|
|
23
|
+
if str(HOOKS_DIR) not in sys.path:
|
|
24
|
+
sys.path.insert(0, str(HOOKS_DIR))
|
|
25
|
+
|
|
26
|
+
from core import HookResult
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_basic_output():
|
|
30
|
+
"""Test 1: Basic output with only continue flag"""
|
|
31
|
+
result = HookResult(continue_execution=True)
|
|
32
|
+
output = result.to_dict()
|
|
33
|
+
|
|
34
|
+
assert output == {"continue": True}, f"Expected {{'continue': True}}, got {output}"
|
|
35
|
+
print("✅ Test 1: Basic output - PASSED")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def test_system_message_top_level():
|
|
39
|
+
"""Test 2: systemMessage at TOP-LEVEL (not in hookSpecificOutput)"""
|
|
40
|
+
result = HookResult(system_message="Test message")
|
|
41
|
+
output = result.to_dict()
|
|
42
|
+
|
|
43
|
+
assert "systemMessage" in output, "systemMessage not found in output"
|
|
44
|
+
assert output["systemMessage"] == "Test message"
|
|
45
|
+
assert "hookSpecificOutput" not in output, "hookSpecificOutput should not be in to_dict() output"
|
|
46
|
+
print("✅ Test 2: systemMessage (top-level) - PASSED")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_decision_with_reason():
|
|
50
|
+
"""Test 3: decision + reason (block pattern)"""
|
|
51
|
+
result = HookResult(decision="block", reason="Dangerous operation")
|
|
52
|
+
output = result.to_dict()
|
|
53
|
+
|
|
54
|
+
assert output.get("decision") == "block"
|
|
55
|
+
assert output.get("reason") == "Dangerous operation"
|
|
56
|
+
assert "continue" not in output, "continue should not appear when decision is set"
|
|
57
|
+
print("✅ Test 3: decision + reason - PASSED")
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def test_user_prompt_submit_schema():
|
|
61
|
+
"""Test 4: UserPromptSubmit special schema"""
|
|
62
|
+
result = HookResult(context_files=["tests/", "docs/"])
|
|
63
|
+
output = result.to_user_prompt_submit_dict()
|
|
64
|
+
|
|
65
|
+
assert "hookSpecificOutput" in output
|
|
66
|
+
assert output["hookSpecificOutput"]["hookEventName"] == "UserPromptSubmit"
|
|
67
|
+
assert "additionalContext" in output["hookSpecificOutput"]
|
|
68
|
+
assert "📎 Context: tests/" in output["hookSpecificOutput"]["additionalContext"]
|
|
69
|
+
print("✅ Test 4: UserPromptSubmit schema - PASSED")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def test_permission_decision():
|
|
73
|
+
"""Test 5: permissionDecision field"""
|
|
74
|
+
result = HookResult(permission_decision="deny")
|
|
75
|
+
output = result.to_dict()
|
|
76
|
+
|
|
77
|
+
assert output.get("permissionDecision") == "deny"
|
|
78
|
+
assert "continue" in output # continue should still be present
|
|
79
|
+
print("✅ Test 5: permissionDecision - PASSED")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def test_session_start_typical_output():
|
|
83
|
+
"""Test 6: Typical SessionStart output"""
|
|
84
|
+
result = HookResult(
|
|
85
|
+
continue_execution=True,
|
|
86
|
+
system_message="🚀 MoAI-ADK Session Started\n Language: python\n Branch: develop"
|
|
87
|
+
)
|
|
88
|
+
output = result.to_dict()
|
|
89
|
+
|
|
90
|
+
# Validate schema
|
|
91
|
+
assert "continue" in output or "decision" in output, "Missing continue or decision"
|
|
92
|
+
assert output.get("systemMessage", "").startswith("🚀 MoAI-ADK")
|
|
93
|
+
|
|
94
|
+
# Ensure internal fields are NOT in output
|
|
95
|
+
assert "context_files" not in output, "Internal field context_files leaked to output"
|
|
96
|
+
assert "suggestions" not in output, "Internal field suggestions leaked to output"
|
|
97
|
+
assert "exit_code" not in output, "Internal field exit_code leaked to output"
|
|
98
|
+
|
|
99
|
+
print("✅ Test 6: SessionStart typical output - PASSED")
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def test_json_serializable():
|
|
103
|
+
"""Test 7: Output is JSON serializable"""
|
|
104
|
+
result = HookResult(
|
|
105
|
+
system_message="Test",
|
|
106
|
+
decision="approve",
|
|
107
|
+
reason="Valid operation"
|
|
108
|
+
)
|
|
109
|
+
output = result.to_dict()
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
json_str = json.dumps(output)
|
|
113
|
+
parsed = json.loads(json_str)
|
|
114
|
+
assert parsed == output
|
|
115
|
+
print("✅ Test 7: JSON serializable - PASSED")
|
|
116
|
+
except Exception as e:
|
|
117
|
+
print(f"❌ Test 7: JSON serialization FAILED: {e}")
|
|
118
|
+
sys.exit(1)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def test_user_prompt_submit_with_system_message():
|
|
122
|
+
"""Test 8: UserPromptSubmit with both context and system message"""
|
|
123
|
+
result = HookResult(
|
|
124
|
+
context_files=["src/"],
|
|
125
|
+
system_message="Loading context..."
|
|
126
|
+
)
|
|
127
|
+
output = result.to_user_prompt_submit_dict()
|
|
128
|
+
|
|
129
|
+
assert "hookSpecificOutput" in output
|
|
130
|
+
assert "Loading context..." in output["hookSpecificOutput"]["additionalContext"]
|
|
131
|
+
assert "📎 Context: src/" in output["hookSpecificOutput"]["additionalContext"]
|
|
132
|
+
print("✅ Test 8: UserPromptSubmit with system_message - PASSED")
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def main():
|
|
136
|
+
"""Run all tests"""
|
|
137
|
+
print("\n" + "="*60)
|
|
138
|
+
print("🧪 Claude Code Hook Output Validation Tests")
|
|
139
|
+
print("="*60 + "\n")
|
|
140
|
+
|
|
141
|
+
tests = [
|
|
142
|
+
test_basic_output,
|
|
143
|
+
test_system_message_top_level,
|
|
144
|
+
test_decision_with_reason,
|
|
145
|
+
test_user_prompt_submit_schema,
|
|
146
|
+
test_permission_decision,
|
|
147
|
+
test_session_start_typical_output,
|
|
148
|
+
test_json_serializable,
|
|
149
|
+
test_user_prompt_submit_with_system_message,
|
|
150
|
+
]
|
|
151
|
+
|
|
152
|
+
failed = 0
|
|
153
|
+
for test in tests:
|
|
154
|
+
try:
|
|
155
|
+
test()
|
|
156
|
+
except AssertionError as e:
|
|
157
|
+
print(f"❌ {test.__name__}: FAILED - {e}")
|
|
158
|
+
failed += 1
|
|
159
|
+
except Exception as e:
|
|
160
|
+
print(f"❌ {test.__name__}: ERROR - {e}")
|
|
161
|
+
failed += 1
|
|
162
|
+
|
|
163
|
+
print("\n" + "="*60)
|
|
164
|
+
if failed == 0:
|
|
165
|
+
print(f"✅ ALL {len(tests)} TESTS PASSED")
|
|
166
|
+
print("="*60 + "\n")
|
|
167
|
+
sys.exit(0)
|
|
168
|
+
else:
|
|
169
|
+
print(f"❌ {failed}/{len(tests)} TESTS FAILED")
|
|
170
|
+
print("="*60 + "\n")
|
|
171
|
+
sys.exit(1)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
if __name__ == "__main__":
|
|
175
|
+
main()
|
|
@@ -4,7 +4,7 @@ description: Agent-based coding mode that integrates hands-on development and co
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agentic Coding
|
|
7
|
-
> Interactive prompts rely on `Skill("moai-alfred-
|
|
7
|
+
> Interactive prompts rely on `Skill("moai-alfred-interactive-questions")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
|
|
8
8
|
|
|
9
9
|
**Audience**: Professional developers, team leaders, architects
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: Learning mode to easily learn MoAI-ADK concepts and workflow
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# MoAI ADK Learning
|
|
7
|
-
> Interactive prompts rely on `Skill("moai-alfred-
|
|
7
|
+
> Interactive prompts rely on `Skill("moai-alfred-interactive-questions")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
|
|
8
8
|
|
|
9
9
|
**Audience**: Developers new to MoAI-ADK
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: Learning mode to easily learn new skills with Alfred
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Study with Alfred
|
|
7
|
-
> Interactive prompts rely on `Skill("moai-alfred-
|
|
7
|
+
> Interactive prompts rely on `Skill("moai-alfred-interactive-questions")` so AskUserQuestion renders TUI selection menus for user surveys and approvals.
|
|
8
8
|
|
|
9
9
|
**Audience**: Developers looking to learn new technologies/languages/frameworks
|
|
10
10
|
|
|
@@ -6,18 +6,58 @@
|
|
|
6
6
|
"PYTHON_ENV": "{{PROJECT_MODE}}"
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
|
+
"SessionStart": [
|
|
10
|
+
{
|
|
11
|
+
"hooks": [
|
|
12
|
+
{
|
|
13
|
+
"command": "uv run \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/alfred/alfred_hooks.py SessionStart",
|
|
14
|
+
"type": "command"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
9
19
|
"PreToolUse": [
|
|
10
20
|
{
|
|
11
21
|
"hooks": [
|
|
12
22
|
{
|
|
13
|
-
"command": "uv run
|
|
23
|
+
"command": "uv run \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/alfred/alfred_hooks.py PreToolUse",
|
|
14
24
|
"type": "command"
|
|
15
25
|
}
|
|
16
26
|
],
|
|
17
27
|
"matcher": "Edit|Write|MultiEdit"
|
|
18
28
|
}
|
|
19
29
|
],
|
|
20
|
-
"
|
|
30
|
+
"UserPromptSubmit": [
|
|
31
|
+
{
|
|
32
|
+
"hooks": [
|
|
33
|
+
{
|
|
34
|
+
"command": "uv run \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/alfred/alfred_hooks.py UserPromptSubmit",
|
|
35
|
+
"type": "command"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"SessionEnd": [
|
|
41
|
+
{
|
|
42
|
+
"hooks": [
|
|
43
|
+
{
|
|
44
|
+
"command": "uv run \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/alfred/alfred_hooks.py SessionEnd",
|
|
45
|
+
"type": "command"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"PostToolUse": [
|
|
51
|
+
{
|
|
52
|
+
"hooks": [
|
|
53
|
+
{
|
|
54
|
+
"command": "uv run \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/alfred/alfred_hooks.py PostToolUse",
|
|
55
|
+
"type": "command"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"matcher": "Edit|Write|MultiEdit"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
21
61
|
},
|
|
22
62
|
"permissions": {
|
|
23
63
|
"defaultMode": "default",
|