moai-adk 0.8.0__py3-none-any.whl → 0.8.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.

@@ -0,0 +1,150 @@
1
+ # 📌 GitHub Issue Label Mapping Configuration
2
+
3
+ > **MoAI-ADK Label Management** - Centralized configuration for issue type labels and priority indicators
4
+
5
+ **Version**: 1.0.0
6
+ **Related**: `/alfred:9-feedback`
7
+
8
+ ---
9
+
10
+ ## 🏷️ Issue Type Label Mapping
11
+
12
+ ### Bug Issues (`--bug`)
13
+
14
+ **Primary Labels**: `bug`, `reported`
15
+
16
+ **Optional Labels** (based on priority):
17
+ - `priority-critical` - System down, data loss risk
18
+ - `priority-high` - Major feature broken
19
+ - `priority-medium` - Normal bug
20
+ - `priority-low` - Minor issue
21
+
22
+ ---
23
+
24
+ ### Feature Request Issues (`--feature`)
25
+
26
+ **Primary Labels**: `feature-request`, `enhancement`
27
+
28
+ **Optional Labels** (based on priority):
29
+ - `priority-critical` - Blocking, must implement immediately
30
+ - `priority-high` - Important feature
31
+ - `priority-medium` - Normal priority feature (default)
32
+ - `priority-low` - Nice to have
33
+
34
+ ---
35
+
36
+ ### Improvement Issues (`--improvement`)
37
+
38
+ **Primary Labels**: `improvement`, `enhancement`
39
+
40
+ **Optional Labels** (based on priority):
41
+ - `priority-critical` - Critical refactoring needed
42
+ - `priority-high` - Important improvement
43
+ - `priority-medium` - Normal priority (default)
44
+ - `priority-low` - Technical debt, can wait
45
+
46
+ ---
47
+
48
+ ### Question/Discussion Issues (`--question`)
49
+
50
+ **Primary Labels**: `question`, `help-wanted`
51
+
52
+ **Optional Labels** (based on priority):
53
+ - `priority-critical` - Urgent decision needed
54
+ - `priority-high` - Important decision
55
+ - `priority-medium` - Normal discussion (default)
56
+ - `priority-low` - Optional discussion
57
+
58
+ ---
59
+
60
+ ## 🎯 Priority Emoji Mapping
61
+
62
+ | Priority | Emoji | Use Case |
63
+ |----------|-------|----------|
64
+ | Critical | 🔴 | System outage, data loss, security breach |
65
+ | High | 🟠 | Major feature broken, significant impact |
66
+ | Medium | 🟡 | Normal bugs/features (default) |
67
+ | Low | 🟢 | Minor issues, nice-to-have features |
68
+
69
+ ---
70
+
71
+ ## 🚀 Issue Type Emoji Mapping
72
+
73
+ | Type | Emoji | Description |
74
+ |------|-------|-------------|
75
+ | Bug | 🐛 | Defect or unexpected behavior |
76
+ | Feature | ✨ | New functionality or capability |
77
+ | Improvement | ⚡ | Code quality, performance, or design improvement |
78
+ | Question | ❓ | Question, discussion, or decision needed |
79
+
80
+ ---
81
+
82
+ ## 🛠️ GitHub Labels Setup
83
+
84
+ To create labels in your GitHub repository, use GitHub CLI:
85
+
86
+ ```bash
87
+ # Authenticate first
88
+ gh auth login
89
+
90
+ # Create bug labels
91
+ gh label create "bug" \
92
+ --description "Something isn't working" \
93
+ --color "d73a49"
94
+
95
+ gh label create "reported" \
96
+ --description "User-reported issue" \
97
+ --color "fc2929"
98
+
99
+ # Create feature labels
100
+ gh label create "feature-request" \
101
+ --description "New feature or request" \
102
+ --color "a2eeef"
103
+
104
+ gh label create "enhancement" \
105
+ --description "Improvement or enhancement" \
106
+ --color "0075ca"
107
+
108
+ # Create improvement label
109
+ gh label create "improvement" \
110
+ --description "Performance or code quality improvement" \
111
+ --color "5ebcf6"
112
+
113
+ # Create question labels
114
+ gh label create "question" \
115
+ --description "Question for discussion" \
116
+ --color "fbca04"
117
+
118
+ gh label create "help-wanted" \
119
+ --description "We need help with this" \
120
+ --color "fcfc03"
121
+
122
+ # Create priority labels
123
+ gh label create "priority-critical" \
124
+ --description "Critical priority - URGENT" \
125
+ --color "ff0000"
126
+
127
+ gh label create "priority-high" \
128
+ --description "High priority" \
129
+ --color "ff6600"
130
+
131
+ gh label create "priority-medium" \
132
+ --description "Medium priority" \
133
+ --color "ffcc00"
134
+
135
+ gh label create "priority-low" \
136
+ --description "Low priority" \
137
+ --color "00cc00"
138
+ ```
139
+
140
+ ---
141
+
142
+ ## ✨ Summary
143
+
144
+ This configuration enables:
145
+ - ✅ **Standardized issue labels** across all issue types
146
+ - ✅ **Priority indicators** with emoji for visual identification
147
+ - ✅ **Type emoji** for quick issue categorization
148
+ - ✅ **Automated label assignment** via `/alfred:9-feedback`
149
+
150
+ For more information, see `.moai/docs/quick-issue-creation-guide.md`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moai-adk
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: MoAI Agentic Development Kit - SPEC-First TDD with Alfred SuperAgent & Complete Skills v2.0
5
5
  Project-URL: Homepage, https://github.com/modu-ai/moai-adk
6
6
  Project-URL: Repository, https://github.com/modu-ai/moai-adk
@@ -696,8 +696,11 @@ graph TD
696
696
  | `/alfred:1-plan <description>` | Analyze requirements, draft SPEC, write Plan Board | `.moai/specs/SPEC-*/spec.md`, plan/acceptance docs, feature branch |
697
697
  | `/alfred:2-run <SPEC-ID>` | Execute TDD, test/implement/refactor, verify quality | `tests/`, `src/` implementation, quality report, TAG connection |
698
698
  | `/alfred:3-sync` | Sync docs/README/CHANGELOG, organize TAG/PR status | `docs/`, `.moai/reports/sync-report.md`, Ready PR |
699
+ | `/alfred:9-feedback` | Interactively create GitHub Issues (type → title → description → priority) | GitHub Issue with auto labels, priority, URL |
699
700
 
700
701
  > ❗ All commands maintain **Phase 0 (optional) → Phase 1 → Phase 2 → Phase 3** cycle structure. Alfred automatically reports execution status and next-step suggestions.
702
+ >
703
+ > 💡 **New in v0.7.0+**: `/alfred:9-feedback` enables instant GitHub Issue creation during development, keeping your workflow uninterrupted while keeping issues tracked and visible to the team.
701
704
 
702
705
  ---
703
706
 
@@ -814,6 +817,125 @@ When working in your **local development environment**, CodeRabbit provides auto
814
817
 
815
818
  ---
816
819
 
820
+ ## Quick Issue Creation with `/alfred:9-feedback`
821
+
822
+ MoAI-ADK v0.7.0+ includes the **Quick Issue Creation** feature, allowing developers to instantly create GitHub Issues without interrupting their development workflow.
823
+
824
+ ### Why Quick Issue Creation?
825
+
826
+ During development, you frequently encounter:
827
+ - 🐛 Bugs that need immediate reporting
828
+ - ✨ Feature ideas that come to mind
829
+ - ⚡ Performance improvements to suggest
830
+ - ❓ Architecture questions that need team discussion
831
+
832
+ **The old way**: Stop coding, go to GitHub, manually fill issue form, remember what you were working on.
833
+ **The new way**: Type one command, GitHub Issue is created instantly, continue coding.
834
+
835
+ ### Interactive Dialog Flow
836
+
837
+ When you run `/alfred:9-help`, Alfred guides you through an interactive multi-step dialog:
838
+
839
+ **Step 1: Select Issue Type**
840
+ ```
841
+ Alfred: What type of issue do you want to create?
842
+ [ ] 🐛 Bug Report - Something isn't working
843
+ [ ] ✨ Feature Request - Suggest new functionality
844
+ [ ] ⚡ Improvement - Enhance existing features
845
+ [ ] ❓ Question/Discussion - Ask the team
846
+ ```
847
+
848
+ **Step 2: Enter Issue Title**
849
+ ```
850
+ Alfred: What's the issue title?
851
+ Your input: "Login button not responding to clicks"
852
+ ```
853
+
854
+ **Step 3: Enter Description (Optional)**
855
+ ```
856
+ Alfred: Provide a detailed description (optional—press Enter to skip)
857
+ Your input: "When I click the login button on iPhone 15, it freezes for 5 seconds then crashes"
858
+ ```
859
+
860
+ **Step 4: Select Priority Level**
861
+ ```
862
+ Alfred: What's the priority level?
863
+ [ ] 🔴 Critical - System down, data loss, security breach
864
+ [ ] 🟠 High - Major feature broken, significant impact
865
+ [✓] 🟡 Medium - Normal priority (default)
866
+ [ ] 🟢 Low - Minor issues, nice-to-have
867
+ ```
868
+
869
+ **Step 5: Automatic Issue Creation**
870
+ ```
871
+ Alfred automatically:
872
+ 1. Determines appropriate labels based on issue type and priority
873
+ 2. Formats title with emoji: "🐛 [BUG] Login button not responding..."
874
+ 3. Creates GitHub Issue with all information
875
+ 4. Returns the issue number and URL
876
+ ```
877
+
878
+ ### Key Features
879
+
880
+ 1. **⚡ Instant Creation**: Create GitHub Issues in seconds
881
+ 2. **🏷️ Automatic Labels**: Issue type + priority automatically labeled
882
+ 3. **🎯 Priority Selection**: Choose from Critical/High/Medium/Low
883
+ 4. **🔗 Team Visibility**: Issues immediately visible and discussable
884
+ 5. **📋 Standardized Format**: All issues follow consistent structure
885
+
886
+ ### Complete Example: Bug Report During Code Review
887
+
888
+ ```bash
889
+ # During code review, you notice a critical issue and want to report it instantly
890
+ $ /alfred:9-feedback
891
+
892
+ Alfred: What type of issue do you want to create?
893
+ > 🐛 Bug Report
894
+
895
+ Alfred: What's the issue title?
896
+ > Login button crash on mobile devices
897
+
898
+ Alfred: Provide a detailed description (optional—press Enter to skip)
899
+ > Tapping the login button on iPhone 15 causes app to freeze for 5 seconds then crash.
900
+ > Tested on iOS 17.2, Chrome 120 on macOS 14.2.
901
+ > Expected: Login modal should appear
902
+ > Actual: No response then crash
903
+
904
+ Alfred: What's the priority level?
905
+ > 🟠 High
906
+
907
+ ✅ GitHub Issue #234 created successfully!
908
+
909
+ 📋 Title: 🐛 [BUG] Login button crash on mobile devices
910
+ 🟠 Priority: High
911
+ 🏷️ Labels: bug, reported, priority-high
912
+ 🔗 URL: https://github.com/owner/repo/issues/234
913
+
914
+ 💡 Next: Continue with your work—the issue is now tracked!
915
+ ```
916
+
917
+ ### Integration with MoAI-ADK Workflow
918
+
919
+ 1. **During Development**: Use `/alfred:9-help` to report bugs/ideas instantly
920
+ 2. **In Code Review**: Convert improvement suggestions to tracked issues
921
+ 3. **When Planning**: Reference created issues in SPEC documents
922
+ 4. **During Sync**: Link issues to SPEC requirements with `/alfred:3-sync`
923
+
924
+ ### Prerequisites
925
+
926
+ - GitHub CLI (`gh`) installed and authenticated
927
+ - Repository initialized with Git
928
+
929
+ ### Learn More
930
+
931
+ See `.moai/docs/quick-issue-creation-guide.md` for comprehensive documentation including:
932
+ - Detailed usage examples
933
+ - Best practices and tips
934
+ - Troubleshooting guide
935
+ - Integration with SPEC documents
936
+
937
+ ---
938
+
817
939
  ## 5 Key Concepts
818
940
 
819
941
  MoAI-ADK consists of 5 key concepts. Each concept connects to the others, and together they create a powerful development system.
@@ -11,6 +11,8 @@ moai_adk/cli/commands/update.py,sha256=iwDDD_ozCfkGUk1ci2CPfybzRtNFPMi-680NxmKhD
11
11
  moai_adk/cli/prompts/__init__.py,sha256=a4_ctS4KEvGtmM9j7z8XIlMkpftohjVb9woUwZu38gE,136
12
12
  moai_adk/cli/prompts/init_prompts.py,sha256=OZ_T-b4XfkyXQsKXTwLcDYwmLbaf0k5oZfbi_asTH9M,5226
13
13
  moai_adk/core/__init__.py,sha256=1sJO-PHEKF1NmYjeOPPPzn_HRgYln3CKlCpUH4E2Jrs,129
14
+ moai_adk/core/issue_creator.py,sha256=guE8LMi9JaiJkHgIz_gE9pJwjteWLsY4myrYTY6uius,9520
15
+ moai_adk/core/template_engine.py,sha256=08--7FE4VWQxIBOTooi9irfe2UOjBQPRWOfOtY0RhJE,9023
14
16
  moai_adk/core/config/__init__.py,sha256=30Qx-GSN1LLI_9ngNqQ6A6d40J92xK10AQxhKw1-MzU,328
15
17
  moai_adk/core/config/migration.py,sha256=KzFGx3kPNoOaZCmAQvNpvlrQq48N3Gj6o2COVV7jciA,3541
16
18
  moai_adk/core/diagnostics/__init__.py,sha256=aF-qC2CW0wxZDpxnlh-TILYs3kqwOIj2EjXYEXY-2j8,387
@@ -46,7 +48,7 @@ moai_adk/templates/.claude/settings.json,sha256=SwjID_m0XWmHT12lqkhJXL1Sh30zAr9_
46
48
  moai_adk/templates/.claude/agents/alfred/cc-manager.md,sha256=ievRB2BMAXjQ6iepWTLTCIHR9Dc4_L-Ab-dqhKQDdxE,8382
47
49
  moai_adk/templates/.claude/agents/alfred/debug-helper.md,sha256=C6jF54jsbI1y4xmb6s-MWVpuYISaFDQzY88M_HJhurw,7289
48
50
  moai_adk/templates/.claude/agents/alfred/doc-syncer.md,sha256=iFP09SKUEMfb4OdMT3gMBakwHf0UvIaBfQHhb0YzdWo,8704
49
- moai_adk/templates/.claude/agents/alfred/git-manager.md,sha256=t3iDdVgs0TZUQRHQS_F9GtLcAvnXWihM7t2oy_BPJBQ,14142
51
+ moai_adk/templates/.claude/agents/alfred/git-manager.md,sha256=3fRvc0-sNVT2k8GTGilFHXJ0UudAD8OG7d3nL69Is9M,14694
50
52
  moai_adk/templates/.claude/agents/alfred/implementation-planner.md,sha256=Xysj1KinbZt-PTw0Sx1bGFlTCxBuQGFfTCNLdatjb8E,11613
51
53
  moai_adk/templates/.claude/agents/alfred/project-manager.md,sha256=N-CaSiWnCdaJXWM3tZegMg4ispm-ioHKnuzmUdwQ2YE,15111
52
54
  moai_adk/templates/.claude/agents/alfred/quality-gate.md,sha256=_OebbNOxpKmUAde1zmjjYL8UrniFnIp710xFd7EtuU0,10779
@@ -59,14 +61,14 @@ moai_adk/templates/.claude/commands/alfred/0-project.md,sha256=Acx7045n1e6-GC1g6
59
61
  moai_adk/templates/.claude/commands/alfred/1-plan.md,sha256=wHROuePWaQwrbRm4SL4369vD7EpzKpVRvQBcWPcpUw0,25272
60
62
  moai_adk/templates/.claude/commands/alfred/2-run.md,sha256=KTUuQQPheLr0YY79asbK0oH9ajlp8vDsQC_2c8BvzWY,20956
61
63
  moai_adk/templates/.claude/commands/alfred/3-sync.md,sha256=WNlBzf5I_mDbdWhcITYE7oiHziHD1UQOG-HD12sqSwQ,23162
64
+ moai_adk/templates/.claude/commands/alfred/9-feedback.md,sha256=VMaKo-ZODHun87uUfiihtHGf8eT4vrEWwxXdQ9RAz3k,3764
62
65
  moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md,sha256=5dd6KRFQXzp0L8lAWKRN7Momgg_8XNV1QZ6VGs03_pc,9064
63
66
  moai_adk/templates/.claude/hooks/alfred/README.md,sha256=8JirNg3Jn2OUFmHySYBd8QxQgPkG7kcev86Zkf80asY,6852
64
67
  moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py,sha256=PjdyJluyoQgaIpq3n9K9r-a3VeLMH1eWcXaAA6ohvrw,7723
65
- moai_adk/templates/.claude/hooks/alfred/test_hook_output.py,sha256=3pk-JBUPdSQZBjx27qKu-db7D1WFYBmlIZmeAFBil6M,5646
66
68
  moai_adk/templates/.claude/hooks/alfred/core/__init__.py,sha256=nx_02kZDVFlKOgxBfFz3nqVrxMkmrkE0x7crJhdjl5E,6377
67
69
  moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py,sha256=dsvFDSXQNSQlaQLpvhqFbytGOrOivyovi43Y18EmNeI,8483
68
70
  moai_adk/templates/.claude/hooks/alfred/core/context.py,sha256=RQd6yk8OGT-twgYtUiNmJIL-UEt_h4oktxqiRP_wXAI,2103
69
- moai_adk/templates/.claude/hooks/alfred/core/project.py,sha256=Jgm8BEJOtCywiO83k2rcoGtzFYPeTXHd5LcMsP2MVsI,14141
71
+ moai_adk/templates/.claude/hooks/alfred/core/project.py,sha256=7S5GUyN_GkfKy_g-SZfzFjqLQbFYKpC2sNpbSpN2b6w,14141
70
72
  moai_adk/templates/.claude/hooks/alfred/core/tags.py,sha256=XcYYCS1VmCejp7Ga9xZ3hDfrWWsKM-WyPD_N5gY1q1w,6359
71
73
  moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py,sha256=j5L7nayKt7tnFQOZuO5sWiie815vmbmYJOn2VRiidLY,569
72
74
  moai_adk/templates/.claude/hooks/alfred/handlers/notification.py,sha256=8TcEqGlz4EpLf2lpouaIuhVbpKOVeY31KPmIq2snt9U,662
@@ -253,11 +255,12 @@ moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md,sha256=oJCo2cKOXq
253
255
  moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md,sha256=k-3QWf6d4HI_kvss_QyzYrOH0kemgAqGMEeqGtxokAM,15522
254
256
  moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md,sha256=Wbz1GM8nN64D7X49I0TffQPKxtUPWWmhOcaf_Ci0ZSA,16624
255
257
  moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh,sha256=QzwhuMnNK2itb6DLI_htqA4l_EHSgO0FG2pikV7I-ME,4241
256
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md,sha256=q753rSPFZfylgwh6HkEP2ggEqB9qK-VnoLuXTxueTzw,2146
257
- moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml,sha256=c6WaTy7Vh6IsNsIJzSTGuGpaGhZAZ1prQXGIUM7P8PA,5212
258
- moai_adk/templates/.github/workflows/moai-gitflow.yml,sha256=D9ob1O7tzsUvk3WQPPaHFx1Oo6_RxnbCb5WHJ6DWyrI,8589
259
- moai_adk/templates/.github/workflows/spec-issue-sync.yml,sha256=VJ0IQcIEnlnZ-3jdvQNruhBxpygYRZAP2bkn35CCO-Q,6307
260
- moai_adk/templates/.moai/config.json,sha256=oAL0Gb4jy-dEvhnPvitkc95dckzAU5w95mekV514YX0,2348
258
+ moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md,sha256=Y1WTubsATr7C54-zO5H3dg4MFB_M6MBefFRAG27rftM,2384
259
+ moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml,sha256=6Zqfo_kLOZs1ElAXMshukQDVyz3rAktgZQCbnM_OoLY,5277
260
+ moai_adk/templates/.github/workflows/moai-gitflow.yml,sha256=9QDqqscY7npu_1Sfsn0g9piX0QRDRZFhbEEwkZGXIG0,8684
261
+ moai_adk/templates/.github/workflows/spec-issue-sync.yml,sha256=GIYeQQvwcoi0r-o85nEbSSLwT5EsrSEzJKLhLMX7GPk,6483
262
+ moai_adk/templates/.moai/config.json,sha256=b9AHxl-m71y3bewFiSG0URptvEWW8aUB19QpVOfYE4M,2830
263
+ moai_adk/templates/.moai/docs/quick-issue-creation-guide.md,sha256=tFJqsNr9SpXlGao6HXXm6I8FmC7yCkUo9cu6lE1GaVA,5460
261
264
  moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md,sha256=37Qj5DYcyUniLM1g8IU7UWFI_16tutZrcAkJc4E5i20,15876
262
265
  moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md,sha256=Tf3q68X1DiA3MkIBYu7AMXoeparYrDRpyqVI5Nw92OY,12653
263
266
  moai_adk/templates/.moai/memory/CLAUDE-RULES.md,sha256=S9GODGRzwwleOmROVtBDa471Ok5NyQLWIkaO_4peHhU,19783
@@ -268,6 +271,7 @@ moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md,sha256=uMEFi6uojnpO
268
271
  moai_adk/templates/.moai/memory/SPEC-METADATA.md,sha256=Ha4ATMxyH2PgQdVbS1fYwVH0PnIkfqk4hfuB5ksMFFk,9702
269
272
  moai_adk/templates/.moai/memory/config-schema.md,sha256=XmvogEnGedRItVc9OABKr4lDNEZhcKZQ3Qa6KlfxE3E,12477
270
273
  moai_adk/templates/.moai/memory/gitflow-protection-policy.md,sha256=tm2ZOmNMvomAhh4_AGTUNjmSsc-eKzo1SGshojx2QL0,6228
274
+ moai_adk/templates/.moai/memory/issue-label-mapping.md,sha256=bKzC2v1ZZWyng0eHSj9oFQ9w9xCbadPe9T9IYWub7wM,3824
271
275
  moai_adk/templates/.moai/memory/spec-metadata.md,sha256=Ha4ATMxyH2PgQdVbS1fYwVH0PnIkfqk4hfuB5ksMFFk,9702
272
276
  moai_adk/templates/.moai/project/product.md,sha256=IrRSqhu0o5KNfn453DUWoUKzdoO3m6013iYCwaHYCxM,5166
273
277
  moai_adk/templates/.moai/project/structure.md,sha256=YWZ4ggmfzveKx8SQGFQWXdDUh5mxOLkEyy5yVdR3Rn0,4791
@@ -275,8 +279,8 @@ moai_adk/templates/.moai/project/tech.md,sha256=REecMv8wOvutt-pQZ5nlGk5YdReTan7A
275
279
  moai_adk/utils/__init__.py,sha256=VnVfQzzKHvKw4bNdEw5xdscnRQYFrnr-v_TOBr3naPs,225
276
280
  moai_adk/utils/banner.py,sha256=znppKd5yo-tTqgyhgPVJjstrTrfcy_v3X1_RFQxP4Fk,1878
277
281
  moai_adk/utils/logger.py,sha256=g-m07PGKjK2bKRIInfSn6m-024Bedai-pV_WjZKDeu8,5064
278
- moai_adk-0.8.0.dist-info/METADATA,sha256=rKLmKLvWkLBTzpf5UN8I0WHgWdYJF5Q-yEDmNZ6xkag,71251
279
- moai_adk-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
280
- moai_adk-0.8.0.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
281
- moai_adk-0.8.0.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
282
- moai_adk-0.8.0.dist-info/RECORD,,
282
+ moai_adk-0.8.1.dist-info/METADATA,sha256=zEPvdQBK_mM5S1y9M6mptWfBF8VBYXikaAMF9H7SwVc,75540
283
+ moai_adk-0.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
284
+ moai_adk-0.8.1.dist-info/entry_points.txt,sha256=P9no1794UipqH72LP-ltdyfVd_MeB1WKJY_6-JQgV3U,52
285
+ moai_adk-0.8.1.dist-info/licenses/LICENSE,sha256=M1M2b07fWcSWRM6_P3wbZKndZvyfHyYk_Wu9bS8F7o8,1069
286
+ moai_adk-0.8.1.dist-info/RECORD,,
@@ -1,175 +0,0 @@
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 # noqa: E402
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()