hyodo 3.0.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.
hyodo/__init__.py ADDED
@@ -0,0 +1,76 @@
1
+ """HyoDo (孝道) - AI Code Quality Automation
2
+
3
+ The Way of Devotion: Philosophy-driven code review for AI-assisted development.
4
+
5
+ Built with the Five Pillars:
6
+ - 眞 (Truth): Technical accuracy
7
+ - 善 (Goodness): Security and stability
8
+ - 美 (Beauty): Code clarity
9
+ - 孝 (Serenity): User experience
10
+ - 永 (Eternity): Long-term maintainability
11
+ """
12
+
13
+ __version__ = "3.0.1"
14
+ __author__ = "AFO Kingdom"
15
+ __license__ = "MIT"
16
+
17
+ # Trinity Score weights
18
+ TRINITY_WEIGHTS = {
19
+ "truth": 0.35, # 眞
20
+ "goodness": 0.35, # 善
21
+ "beauty": 0.20, # 美
22
+ "serenity": 0.08, # 孝
23
+ "eternity": 0.02, # 永
24
+ }
25
+
26
+
27
+ def calculate_trinity_score(
28
+ truth: float,
29
+ goodness: float,
30
+ beauty: float,
31
+ serenity: float = 1.0,
32
+ eternity: float = 1.0,
33
+ ) -> float:
34
+ """Calculate Trinity Score from pillar values.
35
+
36
+ Args:
37
+ truth: Technical accuracy score (0-1)
38
+ goodness: Security/stability score (0-1)
39
+ beauty: Code clarity score (0-1)
40
+ serenity: UX score (0-1), default 1.0
41
+ eternity: Maintainability score (0-1), default 1.0
42
+
43
+ Returns:
44
+ Trinity Score as percentage (0-100)
45
+ """
46
+ score = (
47
+ TRINITY_WEIGHTS["truth"] * truth
48
+ + TRINITY_WEIGHTS["goodness"] * goodness
49
+ + TRINITY_WEIGHTS["beauty"] * beauty
50
+ + TRINITY_WEIGHTS["serenity"] * serenity
51
+ + TRINITY_WEIGHTS["eternity"] * eternity
52
+ )
53
+ return round(score * 100, 2)
54
+
55
+
56
+ def should_auto_approve(trinity_score: float, risk_score: float = 0) -> bool:
57
+ """Determine if changes can be auto-approved.
58
+
59
+ Args:
60
+ trinity_score: Trinity Score (0-100)
61
+ risk_score: Risk score (0-100), lower is better
62
+
63
+ Returns:
64
+ True if auto-approve eligible (Trinity >= 90, Risk <= 10)
65
+ """
66
+ return trinity_score >= 90 and risk_score <= 10
67
+
68
+
69
+ __all__ = [
70
+ "__version__",
71
+ "__author__",
72
+ "__license__",
73
+ "TRINITY_WEIGHTS",
74
+ "calculate_trinity_score",
75
+ "should_auto_approve",
76
+ ]
hyodo/py.typed ADDED
File without changes
@@ -0,0 +1,192 @@
1
+ Metadata-Version: 2.4
2
+ Name: hyodo
3
+ Version: 3.0.1
4
+ Summary: AI Code Quality Automation - Claude Code Extension
5
+ Project-URL: Homepage, https://github.com/lofibrainwav/HyoDo
6
+ Project-URL: Documentation, https://github.com/lofibrainwav/HyoDo#readme
7
+ Project-URL: Repository, https://github.com/lofibrainwav/HyoDo
8
+ Project-URL: Issues, https://github.com/lofibrainwav/HyoDo/issues
9
+ Author-email: AFO Kingdom <afokingdom@example.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ License-File: LICENSE.md
13
+ Keywords: ai,automation,claude,claude-code,code-quality,llm,trinity-score
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Quality Assurance
24
+ Classifier: Topic :: Software Development :: Testing
25
+ Requires-Python: >=3.10
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.4; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # HyoDo (孝道)
33
+
34
+ > **Automated Code Review for AI-Assisted Development**
35
+ > Built Where Philosophy Breathes Through Code
36
+
37
+ <p align="center">
38
+ <a href="./i18n/ko/README.md">한국어</a> •
39
+ <a href="./i18n/zh/README.md">中文</a> •
40
+ <a href="./i18n/ja/README.md">日本語</a>
41
+ </p>
42
+
43
+ <p align="center">
44
+ <img src="https://img.shields.io/badge/Works_with-Claude_Code-blueviolet" alt="Claude Code">
45
+ <img src="https://img.shields.io/badge/Saves-50--70%25_AI_Costs-green" alt="Cost Savings">
46
+ <img src="https://img.shields.io/badge/License-MIT-yellow" alt="License">
47
+ <img src="https://img.shields.io/badge/Python-3.10+-blue" alt="Python">
48
+ </p>
49
+
50
+ ---
51
+
52
+ ## What is HyoDo?
53
+
54
+ HyoDo is a **code quality automation system** designed for AI-assisted development workflows. It integrates with [Claude Code](https://claude.ai/code) to provide:
55
+
56
+ - **Trinity Score** - 5-pillar philosophy-based code evaluation
57
+ - **Automated Quality Gates** - CI/CD integration with smart routing
58
+ - **Cost-Aware Routing** - Reduce AI API costs by 40-70%
59
+ - **Multi-Agent Collaboration** - Parallel strategist analysis
60
+
61
+ ## The Five Pillars (眞善美孝永)
62
+
63
+ HyoDo evaluates code through five philosophical pillars:
64
+
65
+ | Pillar | Weight | Focus |
66
+ |--------|--------|-------|
67
+ | **眞 (Truth)** | 35% | Technical accuracy, type safety, test coverage |
68
+ | **善 (Goodness)** | 35% | Security, stability, error handling |
69
+ | **美 (Beauty)** | 20% | Code clarity, documentation, UX |
70
+ | **孝 (Serenity)** | 8% | Maintainability, low cognitive load |
71
+ | **永 (Eternity)** | 2% | Long-term sustainability |
72
+
73
+ **Trinity Score Formula:**
74
+ ```
75
+ Score = 0.35×眞 + 0.35×善 + 0.20×美 + 0.08×孝 + 0.02×永
76
+ ```
77
+
78
+ ## Quick Start
79
+
80
+ ### Installation
81
+
82
+ ```bash
83
+ # Clone the repository
84
+ git clone https://github.com/lofibrainwav/HyoDo.git
85
+ cd HyoDo
86
+
87
+ # Install (creates Claude Code skills)
88
+ ./install.sh
89
+ ```
90
+
91
+ ### Basic Usage
92
+
93
+ In Claude Code, use these commands:
94
+
95
+ ```bash
96
+ /check # Run 4-Gate CI quality check
97
+ /score # Calculate Trinity Score
98
+ /safe # Security and risk scan
99
+ /trinity # Full Trinity analysis
100
+ ```
101
+
102
+ ### Score Interpretation
103
+
104
+ | Score | Status | Action |
105
+ |-------|--------|--------|
106
+ | **90+** | Excellent | Auto-approve eligible |
107
+ | **70-89** | Good | Review recommended |
108
+ | **50-69** | Needs Work | Improvements required |
109
+ | **<50** | Critical | Block until fixed |
110
+
111
+ ## Features
112
+
113
+ ### 4-Gate CI Protocol
114
+
115
+ ```
116
+ Gate 1: Pyright (眞 Truth) → Type checking
117
+ Gate 2: Ruff (美 Beauty) → Lint + format
118
+ Gate 3: pytest (善 Goodness) → Test coverage
119
+ Gate 4: SBOM (永 Eternity) → Security seal
120
+ ```
121
+
122
+ ### Three Strategists
123
+
124
+ HyoDo uses three AI strategists for balanced analysis:
125
+
126
+ - **Jang Yeong-sil (장영실)** - Technical architecture (眞)
127
+ - **Yi Sun-sin (이순신)** - Security & stability (善)
128
+ - **Shin Saimdang (신사임당)** - UX & clarity (美)
129
+
130
+ ### Cost-Aware Routing
131
+
132
+ Automatically routes tasks to appropriate tiers:
133
+
134
+ | Tier | Use Case | Cost |
135
+ |------|----------|------|
136
+ | FREE | Read-only, search | $0 |
137
+ | CHEAP | Simple edits | Low |
138
+ | EXPENSIVE | Complex refactors | Standard |
139
+
140
+ ## Project Structure
141
+
142
+ ```
143
+ hyodo/
144
+ ├── commands/ # Claude Code slash commands
145
+ ├── skills/ # Skill definitions
146
+ ├── agents/ # AI agent configurations
147
+ ├── scripts/ # Automation scripts
148
+ ├── hooks/ # Git hooks
149
+ └── afo_core/ # Core library
150
+ ```
151
+
152
+ ## Requirements
153
+
154
+ - Python 3.10+
155
+ - Claude Code CLI
156
+ - Git
157
+
158
+ ## Configuration
159
+
160
+ Create `.env` from the example:
161
+
162
+ ```bash
163
+ cp .env.example .env
164
+ ```
165
+
166
+ Key settings:
167
+ - `TRINITY_THRESHOLD=90` - Auto-approve threshold
168
+ - `RISK_THRESHOLD=10` - Max acceptable risk
169
+
170
+ ## Contributing
171
+
172
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
173
+
174
+ All contributions are evaluated using the Five Pillars. A Trinity Score >= 70 is required for PRs.
175
+
176
+ ## License
177
+
178
+ MIT License - see [LICENSE](./LICENSE)
179
+
180
+ ## Links
181
+
182
+ - [Documentation](./docs/)
183
+ - [Roadmap](./ROADMAP.md)
184
+ - [Changelog](./CHANGELOG.md)
185
+ - [Security Policy](./SECURITY.md)
186
+
187
+ ---
188
+
189
+ <p align="center">
190
+ <em>"孝道 (HyoDo) - The Way of Devotion"</em><br>
191
+ Built with the Spirit of King Sejong
192
+ </p>
@@ -0,0 +1,7 @@
1
+ hyodo/__init__.py,sha256=ZfYJR5jXEATCJf4e3TvF6WyO3dXhyMdRLc1Dmydx_gM,1956
2
+ hyodo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ hyodo-3.0.1.dist-info/METADATA,sha256=gjyyuSbs8Fpw_KqHEoIYCE0R9HD4Lu_Ckqil_kXVbto,5461
4
+ hyodo-3.0.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
5
+ hyodo-3.0.1.dist-info/licenses/LICENSE,sha256=zYOZ6hE-1WlK_MhGUKGi8VbprFw5QJXCKYVlx0HuIpo,1068
6
+ hyodo-3.0.1.dist-info/licenses/LICENSE.md,sha256=a8DsfBs8Sy5EsYEt6QYPGtqw8TlTEgsa4LNKqPELXNY,1070
7
+ hyodo-3.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AFO Kingdom
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hyodo Authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.