rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:hanwang-ai/dsh-uml-drawio
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Generate professional UML sequence diagrams as uncompressed .drawio XML from a structured JSON spec, render them with the draw.io desktop CLI, and verify the PNG with Pillow.
Built for DeepSeek Harness. Replaces the prototype gen_seq.py with a spec -> lint -> generate -> render pipeline that is deterministic (same spec => same bytes) and refuses to overwrite manual edits.
plugin_manager install_bundle target=E:\Harness\common\dsh-uml-drawio
The profile entry id is dsh-uml-drawio; configuration stays in the plugin's settings card (or the profile patch).
pythonPath C:\Program Files\Python314\python.exe interpreter with Pillow 12.x drawioPath D:\drawio\draw.io\draw.io.exe draw.io desktop executable fontCjk C:\Windows\Fonts\msyh.ttc CJK font (index=0) fontLatin C:\Windows\Fonts\arial.ttf Latin font
Python/Pillow are probed once per mount. A missing interpreter or Pillow makes every tool return E_PYTHON_ENV - there is no silent fallback.
uml_lint({spec or specPath}) validate + lay out, no files written
uml_generate({spec or specPath, out, force?}) write .drawio +
spec and specPath are mutually exclusive. Prefer specPath for a long spec: the file stays the source of truth and a fix does not re-send the whole object.
Error codes are stable and carry a JSON pointer where it applies: E_SCHEMA_VALIDATION, E_SPEC_UNREADABLE (specPath missing, outside the workspace, or not JSON), E_ARG_INVALID (both or neither of spec/specPath, bad scale or crop), E_OUT_PATH, E_PARTICIPANT_UNKNOWN, E_FRAGMENT_BRANCH, E_UNSUPPORTED_KIND, E_DEPTH_EXCEEDED, E_PAGE_OVERFLOW, E_CONFLICT, E_SIDECAR_CORRUPT, E_RENDER_FAILED.
After uml_render the skill requires a human-perspective review of the PNG before reporting: readability, arrow directions (replies must point back to the caller), guard attachment, clipped labels, unused or missing participants, and method names against the class diagram. Report one line ("人工视角复核:...") or state "仅通过 lint,未经视觉验证" when images cannot be read.
crop uses page-logical coordinates; on a 2x PNG, measure pixels and divide by 2 before passing.
The output is meant to read as an OMG UML 2.5.1 sequence diagram (formal/17-12-05, 2017-12, Clause 17 Interactions, https://www.omg.org/spec/UML/2.5.1/PDF), not merely a diagram that resembles one:
--size page gives px = logical scale with origin (0, 0); PNG size is pageWidthscale + 2 by pageHeight*scale + 2 (2px right/bottom margin). -b 0 is the default. Verified by test/test_calibration.py at scale 1 and 2.
python -m unittest discover -s test -p "test_*.py" Python layout/XML/render tests node --test test/test_sidecar.mjs test/test_paths.mjs test/test_render_error.mjs test/test_spec_source.mjs test/test_skill_body.mjs sidecar/path/drawio/spec-source tests
Fixtures: fixtures/prototype.json (7 participants / 50 messages / 5 fragments), fixtures/cjk-long-label.json (5 participants / width 900 / 65-char CJK label), fixtures/minimal.json (3 participants / 6 messages).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。