Define Logic Diagram · DSH Plugin

Introduction

In the DeepSeek Harness (DSH) agent development workflow, when you need to output structured logic diagrams, architecture diagrams, or solution pages to end users, there are typically two approaches: either manually assembling shapes in PowerPoint, or using ready-made templates and cropping page by page. The former is inefficient and inconsistent in style; the latter is rigid to change and often requires tedious copy-pasting of shapes.

The tonymingyang-prog/definition-logic plugin breaks down consulting-grade static logic diagrams into parametric graphic atoms, and uses a single JSON scene to generate both editable PPTX and web SVG simultaneously—reducing repetitive work and taking logic diagrams from “manual assembly” to “parametric generation.”

Plugin Overview

This is a DSH plugin that provides a parametric PPT logic diagram system: 44 graphic atoms, 15 diagram page types, 8 full-page presets, and an 80-page template mapping. It supports generating editable PPTX and SVG from the same JSON. The plugin is categorized under “Workflow” and currently has 0 stars.

Core Features

1. Graphic Atoms & Diagram Page Types

  • 44 graphic atoms: cards & labels / containers & slots / flows & paths / structures & systems / text blocks / decorative elements
  • 15 diagram page types: cover / table of contents / section / swim lanes / metrics / layered / matrix / tiered / radial / ecosystem / timeline / V-shape / comparison / checklist / closing
  • 8 full-page presets: Platform Architecture, Capability Matrix, Process Roadmap, Ecosystem Support, Center Radiation, Ring System, Bilateral Solution (v2 layout with built-in bottom conclusion bar)

2. Parametric Design & Monochromatic Tonal Ladder

  • Parametric: the number of layers, items, rows, and columns is determined by content—no hardcoded coordinates
  • Monochromatic tonal ladder: hierarchy is expressed through a lightness ladder (t1–t6) of a single primary hue plus whitespace; only one high-saturation emphasis is allowed per diagram

3. Draw Once, Output Twice

  • The scene is the single source of truth; SVG and PPTX are merely two serialization backends
  • Output channels: PPTX (natively editable), SVG (vector), HTML (presentation page)

4. Color Palettes & Template Mapping

  • 6 preset palettes (orange / red / blue / green / cyan / purple); any #RRGGBB hex value can also be passed in, and 6 light tints + 2 dark shades are derived using the same algorithm
  • 80-page template mapping: page-by-page alignment of “template motif → atom → page type”; 59 pages can be mapped directly (see the template mapping matrix)

Installation & Activation

Run the following in the DSH plugin manager:

install_bundle target = link:<absolute path to this directory>

Or install manually: add "dsh-guizang-elements": "link:<absolute path>" to the profile’s dependencies, add dsh-guizang-elements to dsh.profile.bundles, then run pnpm install. After installation, restart the client and the plugin will be available under the “Definition Logic” entry in the sidebar.

Four Tools

Tool Purpose Key Parameters
gze_catalog Browse elements (by category / keyword) category, query
gze_render Single element or full-page preset → file id / preset, palette, formats (svg, html, pptx), content (JSON)
gze_figure Free-composite multiple blocks into one full page blocks (JSON array), palette, w/h, formats
gze_deck Generate a full 10–30 page PPT from a blueprint spec (JSON string), outDir, name, formats (pptx, svgs)

gze_deck Blueprint Example

{
  "title": "Enterprise AI Platform 2026",
  "palette": "blue",
  "pages": [
    { "type": "cover", "kicker": "AI PLATFORM ARCHITECTURE 2026", "title": "From scattered pilots\nto an agent platform foundation", "subtitle": "…", "metrics": [{ "value": "23 → 4", "label": "Redundant builds" }] },
    { "type": "section", "no": "01", "title": "Current State & Challenges", "points": ["Redundant builds", "Data silos"] },
    { "type": "lanes", "kicker": "CURRENT STATE", "title": "Four tracks piloting independently", "lanes": [{ "title": "Scenario Layer", "items": ["Customer support Q&A", "Marketing copy"] }], "conclusion": "Unify capability supply first, then talk about scenario replication" },
    { "type": "matrix", "title": "Application Architecture", "cols": [], "rows": [], "cells": [[]], "callout": { "title": "Advancement Principle", "desc": "Move only one domain at a time" }, "caption": "Reading guide: one row asks about current state, one row asks about target" }
  ]
}

A complete example is available in examples/ai-platform/spec.mjs (20 pages, self-check: 0 issues).

Dependencies & Constraints

  • The PPTX backend requires Python + python-pptx (bundled in the DSH runtime). The interpreter is probed in this order: GZE_PYTHON → .dsh-fresh runtime → python.
  • The default font is “Microsoft YaHei”; it can be overridden via the font parameter. The original template font is Source Han Sans CN, which is not installed on most machines, so it is not the default.
  • SVG is generated with pure string operations and does not require a browser; PPTX rendering verification requires a LibreOffice engine.
  • The soft gradients on decorative elements degrade to solid fills in PPTX; all other geometry remains consistent.

Ecosystem & Extensibility

  • The plugin is released under the MIT license; source code and license are available locally (LICENSE).
  • The DSH philosophy is “everything is a plugin.” The community directory is independent and has no official affiliation with DeepSeek or High-Flyer.
  • To add new elements, implement the draw interface in lib/elements.js and register them in data/catalog.json, then refresh the panel. Both PPTX and SVG channels are automatically supported (new elements only use rect/ellipse/poly/line/text).

Use Cases & Cautions

  • Ideal for DSH agent developers who frequently need to produce structured logic diagrams, architecture diagrams, and solution pages.
  • Be sure to review the source code and license before installation to ensure compliance with your usage policies.

In Closing

This plugin decomposes consulting-grade static logic diagrams into parametric atoms, generating both editable PPTX and web SVG from a single JSON scene—eliminating repetitive manual work and evolving logic diagrams from hand-assembled puzzles to parametric generation.

  • Plugin directory: https://www.skillhub.cn/plugins/tonymingyang-prog/definition-logic
  • GitHub: https://github.com/tonymingyang-prog/definition-logic
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye