somnus-debug 0.1.0__tar.gz
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.
- somnus_debug-0.1.0/.gitignore +49 -0
- somnus_debug-0.1.0/LICENSE +21 -0
- somnus_debug-0.1.0/PKG-INFO +404 -0
- somnus_debug-0.1.0/README.md +376 -0
- somnus_debug-0.1.0/docs/AGENTS_APPENDIX.md +65 -0
- somnus_debug-0.1.0/docs/CONTRACT.md +117 -0
- somnus_debug-0.1.0/docs/MANUAL.md +386 -0
- somnus_debug-0.1.0/docs/PUBLISHING.md +125 -0
- somnus_debug-0.1.0/docs/Python_Doctor_QUICKSTART.md +215 -0
- somnus_debug-0.1.0/pyproject.toml +69 -0
- somnus_debug-0.1.0/src/somnus_debug/__init__.py +27 -0
- somnus_debug-0.1.0/src/somnus_debug/cli.py +96 -0
- somnus_debug-0.1.0/src/somnus_debug/doctor/__init__.py +13 -0
- somnus_debug-0.1.0/src/somnus_debug/doctor/core.py +2171 -0
- somnus_debug-0.1.0/src/somnus_debug/doctor/default_config.yaml +64 -0
- somnus_debug-0.1.0/src/somnus_debug/pycache_cleaner/__init__.py +11 -0
- somnus_debug-0.1.0/src/somnus_debug/pycache_cleaner/core.py +344 -0
- somnus_debug-0.1.0/src/somnus_debug/structure/__init__.py +11 -0
- somnus_debug-0.1.0/src/somnus_debug/structure/core.py +319 -0
- somnus_debug-0.1.0/src/somnus_debug/test_harness/__init__.py +0 -0
- somnus_debug-0.1.0/src/somnus_debug/test_harness/scaffold.py +97 -0
- somnus_debug-0.1.0/src/somnus_debug/test_harness/templates/CONTRACT.md +117 -0
- somnus_debug-0.1.0/src/somnus_debug/test_harness/templates/__init__.py +0 -0
- somnus_debug-0.1.0/src/somnus_debug/test_harness/templates/run_test.py +827 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
.eggs/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.python_doctor/
|
|
11
|
+
*_report.md
|
|
12
|
+
*_report.json
|
|
13
|
+
reports/
|
|
14
|
+
*.log
|
|
15
|
+
.remember/
|
|
16
|
+
.smart-index/
|
|
17
|
+
.sovereign/
|
|
18
|
+
/.codex/
|
|
19
|
+
/.claude/
|
|
20
|
+
/.opencode/
|
|
21
|
+
/.commandcode/
|
|
22
|
+
/.codegraph/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# Local operator state (intentionally untracked)
|
|
26
|
+
/.gitignore
|
|
27
|
+
/AGENTS.md
|
|
28
|
+
/AGENTS.backup_*.md
|
|
29
|
+
/CLAUDE.md
|
|
30
|
+
/MEMORY.md
|
|
31
|
+
/CONTEXT.md
|
|
32
|
+
/NOTEPAD.md
|
|
33
|
+
/filetree.md
|
|
34
|
+
/codex-filetree.md
|
|
35
|
+
/SPECS.md
|
|
36
|
+
/TASKS.md
|
|
37
|
+
/STATE.md
|
|
38
|
+
/PLAN.md
|
|
39
|
+
/TASK.md
|
|
40
|
+
|
|
41
|
+
/PROVENANCE.md
|
|
42
|
+
/.sovereign/
|
|
43
|
+
/archives/
|
|
44
|
+
/packages/
|
|
45
|
+
delete_test_in_repo.tmp
|
|
46
|
+
HANDOFF.md
|
|
47
|
+
OPSEC.md
|
|
48
|
+
|
|
49
|
+
/.pypirc
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Daeron Rowell / Somnus Sovereign Systems
|
|
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,404 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: somnus-debug
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Somnus Sovereign Systems' project-agnostic Python developer toolkit: production-readiness diagnostics, class/definition structure indexing, pycache cleanup, and a portable single-test harness scaffold.
|
|
5
|
+
Project-URL: Homepage, https://github.com/calisweetleaf/somnus-debug
|
|
6
|
+
Project-URL: Repository, https://github.com/calisweetleaf/somnus-debug
|
|
7
|
+
Project-URL: Issues, https://github.com/calisweetleaf/somnus-debug/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/calisweetleaf/somnus-debug/blob/master/docs/MANUAL.md
|
|
9
|
+
Author: Daeron Rowell / Somnus Sovereign Systems
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ast,cli,devtools,linter,somnus,static-analysis
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: pyyaml
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+
<img src="assets/somnus-debug-banner.svg" width="460" alt="somnus-debug — Python Developer Toolkit" />
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!--
|
|
36
|
+
ORIGINAL INLINE SVG — preserved verbatim.
|
|
37
|
+
GitHub sanitizes inline SVG in README rendering, so the renderable copy lives at
|
|
38
|
+
assets/somnus-debug-banner.svg and is referenced above.
|
|
39
|
+
|
|
40
|
+
<div align="center">
|
|
41
|
+
|
|
42
|
+
<svg width="460" height="200" viewBox="0 0 460 200" xmlns="http://www.w3.org/2000/svg">
|
|
43
|
+
<defs>
|
|
44
|
+
<linearGradient id="sdGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
45
|
+
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
|
|
46
|
+
<stop offset="50%" style="stop-color:#764ba2;stop-opacity:1" />
|
|
47
|
+
<stop offset="100%" style="stop-color:#c9a0dc;stop-opacity:1" />
|
|
48
|
+
</linearGradient>
|
|
49
|
+
<filter id="sdGlow">
|
|
50
|
+
<feGaussianBlur stdDeviation="3" result="b"/>
|
|
51
|
+
<feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
52
|
+
</filter>
|
|
53
|
+
</defs>
|
|
54
|
+
<rect width="460" height="200" fill="#0d1117" rx="14"/>
|
|
55
|
+
<rect x="1" y="1" width="458" height="198" fill="none" stroke="#1e2430" stroke-width="1" rx="14"/>
|
|
56
|
+
<text x="230" y="92" font-family="'Courier New', monospace" font-size="42" fill="url(#sdGrad)" text-anchor="middle" filter="url(#sdGlow)" font-weight="bold" letter-spacing="2">somnus-debug</text>
|
|
57
|
+
<text x="230" y="120" font-family="'Courier New', monospace" font-size="13" fill="#8b949e" text-anchor="middle" letter-spacing="1">Python Developer Toolkit</text>
|
|
58
|
+
<text x="230" y="144" font-family="'Courier New', monospace" font-size="11" fill="#484f58" text-anchor="middle">4 Tools | Zero-Dep Core | One CLI | pip Installable</text>
|
|
59
|
+
<line x1="130" y1="160" x2="330" y2="160" stroke="#21262d" stroke-width="1"/>
|
|
60
|
+
<text x="230" y="180" font-family="'Courier New', monospace" font-size="9" fill="#2d333b" text-anchor="middle" letter-spacing="5">SOMNUS SOVEREIGN SYSTEMS</text>
|
|
61
|
+
</svg>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
-->
|
|
65
|
+
|
|
66
|
+
<p align="center"><em>What used to be four scripts copied by hand between projects, now one package with one CLI.</em></p>
|
|
67
|
+
|
|
68
|
+
<p align="center">
|
|
69
|
+
<img src="https://img.shields.io/badge/License-MIT-6bcf7f?style=flat-square" alt="License: MIT"/>
|
|
70
|
+
<img src="https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12-667eea?style=flat-square" alt="Python 3.10-3.12"/>
|
|
71
|
+
<img src="https://img.shields.io/badge/PyPI-not%20yet%20published-febc2e?style=flat-square" alt="Not yet on PyPI"/>
|
|
72
|
+
<img src="https://img.shields.io/badge/Status-Alpha-febc2e?style=flat-square" alt="Status: Alpha"/>
|
|
73
|
+
<img src="https://img.shields.io/badge/Tests-10%2F10%20passing-28c840?style=flat-square" alt="10/10 tests passing"/>
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
<!-- ============================================================ -->
|
|
79
|
+
<!-- GLOBAL STYLES — Somnus Documentation Design System v3 -->
|
|
80
|
+
<!-- ============================================================ -->
|
|
81
|
+
|
|
82
|
+
<!--
|
|
83
|
+
ORIGINAL SOMNUS DOCUMENTATION DESIGN SYSTEM v3 CSS — preserved verbatim.
|
|
84
|
+
GitHub README sanitization does not apply arbitrary <style> blocks/classes, so the
|
|
85
|
+
rendered sections below use GitHub-native Markdown while retaining this source.
|
|
86
|
+
|
|
87
|
+
<style>
|
|
88
|
+
.t {
|
|
89
|
+
background: #141414;
|
|
90
|
+
border-radius: 10px;
|
|
91
|
+
box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px #2a2a2a;
|
|
92
|
+
margin: 22px 0;
|
|
93
|
+
font-family: 'Menlo', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
}
|
|
96
|
+
.t-hdr {
|
|
97
|
+
background: #252525;
|
|
98
|
+
padding: 11px 16px;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
border-bottom: 1px solid #1e1e1e;
|
|
102
|
+
user-select: none;
|
|
103
|
+
}
|
|
104
|
+
.t-btn { width: 13px; height: 13px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; }
|
|
105
|
+
.t-btn.r { background: #ff5f57; box-shadow: 0 0 4px #ff5f5780; }
|
|
106
|
+
.t-btn.y { background: #febc2e; box-shadow: 0 0 4px #febc2e80; }
|
|
107
|
+
.t-btn.g { background: #28c840; box-shadow: 0 0 4px #28c84080; }
|
|
108
|
+
.t-title { color: #888; font-size: 12.5px; margin-left: 10px; letter-spacing: 0.4px; }
|
|
109
|
+
.t-tag {
|
|
110
|
+
margin-left: auto;
|
|
111
|
+
background: #1e1e1e;
|
|
112
|
+
border: 1px solid #333;
|
|
113
|
+
color: #555;
|
|
114
|
+
font-size: 10px;
|
|
115
|
+
padding: 2px 8px;
|
|
116
|
+
border-radius: 3px;
|
|
117
|
+
letter-spacing: 1px;
|
|
118
|
+
text-transform: uppercase;
|
|
119
|
+
}
|
|
120
|
+
.t-body { padding: 18px 20px; font-size: 13px; line-height: 1.65; color: #d4d4d4; overflow-x: auto; }
|
|
121
|
+
.prompt { color: #28c840; }
|
|
122
|
+
.dim { color: #555; }
|
|
123
|
+
.info { color: #667eea; }
|
|
124
|
+
.ok { color: #28c840; }
|
|
125
|
+
.warn { color: #febc2e; }
|
|
126
|
+
.err { color: #ff5f57; }
|
|
127
|
+
.accent { color: #c9a0dc; }
|
|
128
|
+
.cmd { margin-bottom: 2px; }
|
|
129
|
+
.out { margin-bottom: 3px; }
|
|
130
|
+
.cur {
|
|
131
|
+
display: inline-block;
|
|
132
|
+
width: 8px; height: 14px;
|
|
133
|
+
background: #d4d4d4;
|
|
134
|
+
vertical-align: text-bottom;
|
|
135
|
+
animation: blink 1.1s step-end infinite;
|
|
136
|
+
}
|
|
137
|
+
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
|
|
138
|
+
.t-code {
|
|
139
|
+
white-space: pre;
|
|
140
|
+
font-size: 12.5px;
|
|
141
|
+
line-height: 1.6;
|
|
142
|
+
overflow-x: auto;
|
|
143
|
+
padding: 18px 20px;
|
|
144
|
+
margin: 0;
|
|
145
|
+
color: #d4d4d4;
|
|
146
|
+
font-family: 'Menlo', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
|
|
147
|
+
}
|
|
148
|
+
.cmt { color: #5c6370; }
|
|
149
|
+
.t-sep { height: 1px; background: #1e1e1e; margin: 8px 0; }
|
|
150
|
+
.mon-row {
|
|
151
|
+
display: grid;
|
|
152
|
+
grid-template-columns: 170px 1fr 96px;
|
|
153
|
+
align-items: center;
|
|
154
|
+
margin-bottom: 5px;
|
|
155
|
+
font-size: 12.5px;
|
|
156
|
+
}
|
|
157
|
+
.mon-label { color: #888; }
|
|
158
|
+
.mon-bar { background: #1e1e1e; height: 9px; border-radius: 2px; overflow: hidden; position: relative; }
|
|
159
|
+
.mon-fill { height: 100%; border-radius: 2px; }
|
|
160
|
+
.mon-val { color: #c9d1d9; text-align: right; font-size: 11px; }
|
|
161
|
+
</style>
|
|
162
|
+
-->
|
|
163
|
+
|
|
164
|
+
## What this is
|
|
165
|
+
|
|
166
|
+
Somnus's project-agnostic Python dev tooling — production-readiness
|
|
167
|
+
diagnostics, an AST class/definition indexer, bytecode-cache cleanup, and a
|
|
168
|
+
portable single-test harness scaffold — packaged as one real `pip`-installable
|
|
169
|
+
CLI instead of loose scripts.
|
|
170
|
+
|
|
171
|
+
**Zero runtime dependencies beyond `pyyaml`**, and that's only for
|
|
172
|
+
`pycache-clean` — `doctor` and `structure` are stdlib-only.
|
|
173
|
+
|
|
174
|
+
## Install
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
git clone <this repo>
|
|
178
|
+
cd somnus-debug
|
|
179
|
+
pip install -e .
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`pip install somnus-debug` isn't live yet — the package is publish-ready
|
|
183
|
+
(MIT-licensed, real PEP 621 metadata, verified build) but hasn't actually
|
|
184
|
+
been uploaded anywhere. See `docs/PUBLISHING.md` for what that takes and
|
|
185
|
+
what's still open before it happens.
|
|
186
|
+
|
|
187
|
+
## The tools
|
|
188
|
+
|
|
189
|
+
| Command | What it does |
|
|
190
|
+
|---|---|
|
|
191
|
+
| `somnus-debug doctor ...` | AST-based production-readiness diagnostics: stubs, placeholder returns, silent exception handling, dependency cycles, docstring/type-hint coverage, security-risk patterns, TODOs. |
|
|
192
|
+
| `somnus-debug structure <file.py>` | Class-by-class, definition-by-definition AST index of a single Python file, with source line spans. Never imports or executes the target. |
|
|
193
|
+
| `somnus-debug pycache-clean ...` | Configurable removal of `__pycache__` dirs and `*.pyc`/`*.pyo` files across one or more directory trees. Dry-run by default via `--dry-run`. |
|
|
194
|
+
| `somnus-debug init-test-harness [dir]` | Copies the CONTRACT.md-governed single-test harness (`run_test.py`) into a target repository. |
|
|
195
|
+
|
|
196
|
+
Every tool is also installed as its own script for muscle memory:
|
|
197
|
+
`somnus-doctor`, `somnus-structure`, `somnus-pycache-clean`.
|
|
198
|
+
|
|
199
|
+
> **somnus-debug · quickstart** · `SESSION`
|
|
200
|
+
|
|
201
|
+
```console
|
|
202
|
+
daeron@somnus:~$ pip install -e .
|
|
203
|
+
Successfully installed somnus-debug-0.1.0
|
|
204
|
+
|
|
205
|
+
daeron@somnus:~$ somnus-debug doctor init-config -o python_doctor.yaml
|
|
206
|
+
Wrote default configuration: python_doctor.yaml
|
|
207
|
+
|
|
208
|
+
daeron@somnus:~$ somnus-debug doctor scan . -o report.md
|
|
209
|
+
Scan complete: files=42, issues=118, critical=0, serious=9
|
|
210
|
+
|
|
211
|
+
daeron@somnus:~$ somnus-debug structure src/core.py -o CORE_INDEX.md
|
|
212
|
+
Class Index for `core.py` written to CORE_INDEX.md
|
|
213
|
+
|
|
214
|
+
daeron@somnus:~$ somnus-debug pycache-clean --config config.yaml --dry-run
|
|
215
|
+
Summary: deleted 6 directories, 0 files; freed 2.10 MiB # dry run — nothing actually removed
|
|
216
|
+
|
|
217
|
+
daeron@somnus:~$ █
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
<!--
|
|
221
|
+
ORIGINAL QUICKSTART TERMINAL HTML — preserved verbatim.
|
|
222
|
+
GitHub strips/ignores the CSS classes that make this terminal card work, so the
|
|
223
|
+
console block above is the GitHub-renderable equivalent.
|
|
224
|
+
|
|
225
|
+
<div class="t">
|
|
226
|
+
<div class="t-hdr">
|
|
227
|
+
<div class="t-btn r"></div><div class="t-btn y"></div><div class="t-btn g"></div>
|
|
228
|
+
<span class="t-title">somnus-debug · quickstart</span>
|
|
229
|
+
<span class="t-tag">SESSION</span>
|
|
230
|
+
</div>
|
|
231
|
+
<div class="t-body">
|
|
232
|
+
<div class="cmd"><span class="prompt">daeron@somnus:~$</span> pip install -e .</div>
|
|
233
|
+
<div class="out dim">Successfully installed somnus-debug-0.1.0</div>
|
|
234
|
+
<div class="t-sep"></div>
|
|
235
|
+
<div class="cmd"><span class="prompt">daeron@somnus:~$</span> somnus-debug doctor init-config -o python_doctor.yaml</div>
|
|
236
|
+
<div class="out dim">Wrote default configuration: python_doctor.yaml</div>
|
|
237
|
+
<div class="t-sep"></div>
|
|
238
|
+
<div class="cmd"><span class="prompt">daeron@somnus:~$</span> somnus-debug doctor scan . -o report.md</div>
|
|
239
|
+
<div class="out ok">Scan complete: files=42, issues=118, critical=0, serious=9</div>
|
|
240
|
+
<div class="t-sep"></div>
|
|
241
|
+
<div class="cmd"><span class="prompt">daeron@somnus:~$</span> somnus-debug structure src/core.py -o CORE_INDEX.md</div>
|
|
242
|
+
<div class="out dim">Class Index for `core.py` written to CORE_INDEX.md</div>
|
|
243
|
+
<div class="t-sep"></div>
|
|
244
|
+
<div class="cmd"><span class="prompt">daeron@somnus:~$</span> somnus-debug pycache-clean --config config.yaml --dry-run</div>
|
|
245
|
+
<div class="out dim">Summary: deleted 6 directories, 0 files; freed 2.10 MiB <span class="cmt"># dry run — nothing actually removed</span></div>
|
|
246
|
+
<div class="cmd" style="margin-top:8px;"><span class="prompt">daeron@somnus:~$</span> <span class="cur"></span></div>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
-->
|
|
250
|
+
|
|
251
|
+
Full flag reference and worked examples for every command:
|
|
252
|
+
**[`docs/MANUAL.md`](docs/MANUAL.md)**.
|
|
253
|
+
|
|
254
|
+
## Build status
|
|
255
|
+
|
|
256
|
+
Honest, not aspirational — this reflects what's actually been verified,
|
|
257
|
+
not what's planned.
|
|
258
|
+
|
|
259
|
+
> **somnus-debug · build status — 2026-09-01** · `STATUS`
|
|
260
|
+
|
|
261
|
+
| Component | Progress | Status |
|
|
262
|
+
|---|:---:|---|
|
|
263
|
+
| Package skeleton | `██████████ 100%` | ✅ verified |
|
|
264
|
+
| doctor / structure / pycache-clean | `██████████ 100%` | ✅ verified |
|
|
265
|
+
| init-test-harness | `██████████ 100%` | ✅ verified |
|
|
266
|
+
| Wheel build + install | `██████████ 100%` | ✅ verified |
|
|
267
|
+
| public release synchronization | `████████░░ 80%` | release candidate verified |
|
|
268
|
+
| PyPI publish | `░░░░░░░░░░ 0%` | ❌ not started |
|
|
269
|
+
| doctor / structure feature expansion | `░░░░░░░░░░ 0%` | ❌ not started |
|
|
270
|
+
|
|
271
|
+
<!--
|
|
272
|
+
ORIGINAL BUILD-STATUS TERMINAL HTML — preserved verbatim.
|
|
273
|
+
GitHub strips/ignores the CSS grid, gradients, and status classes, so the table
|
|
274
|
+
above is the GitHub-renderable equivalent.
|
|
275
|
+
|
|
276
|
+
<div class="t">
|
|
277
|
+
<div class="t-hdr">
|
|
278
|
+
<div class="t-btn r"></div><div class="t-btn y"></div><div class="t-btn g"></div>
|
|
279
|
+
<span class="t-title">somnus-debug · build status — 2026-09-01</span>
|
|
280
|
+
<span class="t-tag">STATUS</span>
|
|
281
|
+
</div>
|
|
282
|
+
<div class="t-body">
|
|
283
|
+
<div class="mon-row">
|
|
284
|
+
<span class="mon-label">Package skeleton</span>
|
|
285
|
+
<span class="mon-bar"><span class="mon-fill" style="width:100%;background:linear-gradient(90deg,#28c840,#667eea);"></span></span>
|
|
286
|
+
<span class="mon-val ok">verified</span>
|
|
287
|
+
</div>
|
|
288
|
+
<div class="mon-row">
|
|
289
|
+
<span class="mon-label">doctor / structure / pycache-clean</span>
|
|
290
|
+
<span class="mon-bar"><span class="mon-fill" style="width:100%;background:linear-gradient(90deg,#28c840,#667eea);"></span></span>
|
|
291
|
+
<span class="mon-val ok">verified</span>
|
|
292
|
+
</div>
|
|
293
|
+
<div class="mon-row">
|
|
294
|
+
<span class="mon-label">init-test-harness</span>
|
|
295
|
+
<span class="mon-bar"><span class="mon-fill" style="width:100%;background:linear-gradient(90deg,#28c840,#667eea);"></span></span>
|
|
296
|
+
<span class="mon-val ok">verified</span>
|
|
297
|
+
</div>
|
|
298
|
+
<div class="mon-row">
|
|
299
|
+
<span class="mon-label">Wheel build + install</span>
|
|
300
|
+
<span class="mon-bar"><span class="mon-fill" style="width:100%;background:linear-gradient(90deg,#28c840,#667eea);"></span></span>
|
|
301
|
+
<span class="mon-val ok">verified</span>
|
|
302
|
+
</div>
|
|
303
|
+
<div class="mon-row">
|
|
304
|
+
<span class="mon-label">git version control</span>
|
|
305
|
+
<span class="mon-bar"><span class="mon-fill" style="width:40%;background:linear-gradient(90deg,#ff5f57,#febc2e);"></span></span>
|
|
306
|
+
<span class="mon-val warn">blocked</span>
|
|
307
|
+
</div>
|
|
308
|
+
<div class="mon-row">
|
|
309
|
+
<span class="mon-label">PyPI publish</span>
|
|
310
|
+
<span class="mon-bar"><span class="mon-fill" style="width:0%;"></span></span>
|
|
311
|
+
<span class="mon-val err">not started</span>
|
|
312
|
+
</div>
|
|
313
|
+
<div class="mon-row">
|
|
314
|
+
<span class="mon-label">doctor / structure feature expansion</span>
|
|
315
|
+
<span class="mon-bar"><span class="mon-fill" style="width:0%;"></span></span>
|
|
316
|
+
<span class="mon-val err">not started</span>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
-->
|
|
321
|
+
|
|
322
|
+
> **Open items.** `pip install somnus-debug` means an actual PyPI upload,
|
|
323
|
+
> which has not happened — the required TestPyPI-first release gate is in
|
|
324
|
+
> `docs/PUBLISHING.md`. The old root-level scripts
|
|
325
|
+
> (`python_production_doctor.py`, `analyze_python_structure.py`,
|
|
326
|
+
> `pycache_cleaner.py`, `run_test.py`, `python_doctor.yaml`) are still sitting
|
|
327
|
+
> next to `src/somnus_debug/` pending cleanup — harmless, just redundant.
|
|
328
|
+
|
|
329
|
+
## Using it as a library
|
|
330
|
+
|
|
331
|
+
```python
|
|
332
|
+
from somnus_debug.structure.core import build_index
|
|
333
|
+
from somnus_debug.doctor.core import ProjectScanner, ConfigManager
|
|
334
|
+
from somnus_debug.pycache_cleaner.core import PycacheCleaner, CleanerConfig
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Each `core.py` is the original single-file implementation, moved into the
|
|
338
|
+
package rather than rewritten — anything importable from the standalone
|
|
339
|
+
script is importable from `somnus_debug.<tool>.core` too.
|
|
340
|
+
|
|
341
|
+
## Repository layout
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
pyproject.toml package metadata, deps, entry points
|
|
345
|
+
LICENSE MIT
|
|
346
|
+
README.md this file
|
|
347
|
+
src/somnus_debug/
|
|
348
|
+
cli.py `somnus-debug <command>` dispatcher
|
|
349
|
+
doctor/core.py = old python_production_doctor.py
|
|
350
|
+
doctor/default_config.yaml = old python_doctor.yaml
|
|
351
|
+
structure/core.py = old analyze_python_structure.py
|
|
352
|
+
pycache_cleaner/core.py = old pycache_cleaner.py
|
|
353
|
+
test_harness/scaffold.py + templates/{run_test.py, CONTRACT.md}
|
|
354
|
+
tests/test_cli_smoke.py 10 real subprocess CLI smoke tests
|
|
355
|
+
docs/
|
|
356
|
+
MANUAL.md full command reference (start here for usage)
|
|
357
|
+
PUBLISHING.md the real-PyPI-release checklist
|
|
358
|
+
CONTRACT.md governs run_test.py's artifact contract
|
|
359
|
+
OPSEC.md Somnus agent operational security protocol
|
|
360
|
+
Python_Doctor_QUICKSTART.md deep config-field reference for `doctor`
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## Documentation index
|
|
364
|
+
|
|
365
|
+
- **[STATE.md](STATE.md)** — what actually exists and works right now, verified not assumed.
|
|
366
|
+
- **[PLAN.md](PLAN.md)** — what's next, in dependency order.
|
|
367
|
+
- **[docs/MANUAL.md](docs/MANUAL.md)** — day-to-day command reference, every
|
|
368
|
+
flag, worked examples, troubleshooting.
|
|
369
|
+
- **[docs/AGENTS_APPENDIX.md](docs/AGENTS_APPENDIX.md)** — pasteable global or
|
|
370
|
+
repository-local agent guidance; installation and instruction hydration are
|
|
371
|
+
intentionally separate.
|
|
372
|
+
- **[docs/PUBLISHING.md](docs/PUBLISHING.md)** — the checklist for actually
|
|
373
|
+
shipping this to PyPI.
|
|
374
|
+
- **[docs/Python_Doctor_QUICKSTART.md](docs/Python_Doctor_QUICKSTART.md)** —
|
|
375
|
+
full `python_doctor.yaml` field reference.
|
|
376
|
+
- **[docs/CONTRACT.md](docs/CONTRACT.md)** — what `run_test.py` does and
|
|
377
|
+
does not own.
|
|
378
|
+
- **[docs/OPSEC.md](docs/OPSEC.md)** — SUPREME-authority agent security
|
|
379
|
+
posture for this codebase.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
<div align="center">
|
|
384
|
+
|
|
385
|
+
<img src="assets/somnus-sovereign-systems-footer.svg" width="400" alt="SOMNUS SOVEREIGN SYSTEMS" />
|
|
386
|
+
|
|
387
|
+
</div>
|
|
388
|
+
|
|
389
|
+
<!--
|
|
390
|
+
ORIGINAL INLINE FOOTER SVG — preserved verbatim.
|
|
391
|
+
GitHub sanitizes inline SVG in README rendering; the same SVG is stored at
|
|
392
|
+
assets/somnus-sovereign-systems-footer.svg and referenced above.
|
|
393
|
+
|
|
394
|
+
<div align="center">
|
|
395
|
+
|
|
396
|
+
<svg width="400" height="48" viewBox="0 0 400 48" xmlns="http://www.w3.org/2000/svg">
|
|
397
|
+
<rect width="400" height="48" fill="#0d1117" rx="6"/>
|
|
398
|
+
<line x1="60" y1="24" x2="170" y2="24" stroke="#21262d" stroke-width="1"/>
|
|
399
|
+
<line x1="230" y1="24" x2="340" y2="24" stroke="#21262d" stroke-width="1"/>
|
|
400
|
+
<text x="200" y="28" font-family="'Courier New', monospace" font-size="10" fill="#484f58" text-anchor="middle" letter-spacing="3">SOMNUS SOVEREIGN SYSTEMS</text>
|
|
401
|
+
</svg>
|
|
402
|
+
|
|
403
|
+
</div>
|
|
404
|
+
-->
|