dsh-model-everything: Building Executable Models from Design and Code Assertions

Introduction

When conducting design reviews or refactoring in DSH, a common practice is to read through the diff and have the model “reason through” whether the behavior is preserved. However, such conclusions often lack reproducible sources, and it is difficult to align reviews across different sessions. The DeepSeek Harness community plugin dsh-model-everything (maintained by AmethystLuna) takes a different approach: it extracts assertions about behavior from designs or code into models, lets the engine run them, and generates reports with hashes and references for easy comparison and auditing. The plugin is categorized under workflows and currently has 0 stars on GitHub; it is a native DSH plugin that mounts tools and skills in the form of a cordis bundle.

What is This

In one sentence: Modeling and Automated Review—verifying checkable assertions, running state machines and protocols, reviewing UML, auditing dependency graphs and data migrations, mining concurrency declarations and routing them to external checkers, and finally using report_diff for report baseline comparison.

The license is MIT (see repository badge), and Node.js >= 20 is required to run. The version in package.json is 0.2.0, the declared DSH engine range is ^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1, and compatible profiles include headless and web.

Core Features

The following summarizes the capabilities based on the README’s capability table; the plugin compares the models and graphs you provide against the source code fidelity (the extraction step handles fidelity). The tools themselves do not replace reading diffs, modify code, or run your test suites.

Domain Function
Fact Verification Lists checkable assertions, verifies them against the code item by item, and provides file:line sources
Behavior Verification State machines and protocols: structural checks, adversarial probing, budgets and deadlines, before/after regression; multi-machine combination checks for deadlocks and impossible rendezvous
Graph Rendering, parsing, and modeling review for UML 2.5 diagram families (including render↔parse round-trips), supporting Mermaid and PlantUML
Structure Dependency auditing for components/packages/classes/deployment diagrams: orphan nodes, cycles, layering violations, missing required edges, etc.
Data Data models and migrations: coverage, copy consistency, rollback symmetry, before/after data regression
Concurrency model_interleaving_scan mines declarations for threads/locks/async etc. and routes them to TSan, Helgrind, CBMC, TLA+, etc.; once shared and accesses are declared, model_compose_verify can determine C3–C5 class composition issues
Export model_export generates UPPAAL / TLA+ / PRISM / SPIN inputs
Report Body rendering, report_diff baseline comparison, hash conventions

Main tools include: uml_render, uml_parse, uml_review, uml_explain_labels, uml_structure_verify, model_verify, model_compose_verify, model_datamodel_verify, model_interleaving_scan, model_export, model_design_review, model_edit, report_diff. When reading reports, use verdict (pass / pass_with_findings / fail) as the standard; do not rely solely on ok for judgment. ok: false indicates the tool did not run, with the reason found in errorCode.

The repository also contains two components: the main line dsh-model-everything (enabled by default) provides all tools and skills; dsh-model-everything-gate (enabled by default) injects a routing prompt of approximately 3.2k characters at the first model step of the session, which can be disabled via configuration.

Installation and Activation

The plugin is declared in dsh.bundle and cordis.patch.yml in the root package.json of the repository. The official installation methods are as follows (replace <profile> with your profile name):

# Install from source directory (under development)
dsh plugin --profile <profile> add "file:$PWD"
# Install from npm (release version)
dsh plugin --profile <profile> add dsh-model-everything
# If dsh is not installed globally
npx -p @deepseek-ai/dsh dsh plugin --profile <profile> add dsh-model-everything

After installation, restart the profile and use dsh --profile <profile> --dump-config to confirm that the plugin entry appears. Uninstallation is done by removing it from the target profile via the plugin manager.

To disable the prompt injection component, you can override it by row id in the profile’s cordis.patch.yml (replace the entire section, do not write name):

- id: dsh-model-everything-gate
  config:
    enabled: false

enabled is a live field, so the plugin page toggle takes effect immediately for the running host; for descriptions of gateContent and extraGuidance, see the “Configuration” section of the README.

Typical Usage

Behavioral Consistency Before and After Refactoring

Refactoring may change the implementation, but leave the preservation of behavior to the engine rather than reading through the entire diff:

  1. Before refactoring: Use uml_parse or write the BEFORE model according to the schema.
  2. Complete the refactoring.
  3. After refactoring: Extract the AFTER model.
  4. Call model_verify, passing beforeModel and stateMapping for behavioral regression; for the data side, use model_datamodel_verify’s beforeModel, fieldMapping, and migrationMappings.
  5. Use report_diff to compare against the baseline report; new error level findings can serve as grounds to reject the refactoring.

State Machine and Flowchart Review

  1. Submit stateDiagram-v2, PlantUML state diagrams, or LogicModelV1 to uml_parse.
  2. Use model_verify to check for unreachable states, absorbing loops, ignored events, budgets and deadlines, etc.; write “always/never” into invariants to search for counterexamples.
  3. Use uml_review to review structural defects (unreachable, dead ends, incomplete branching, etc.).
  4. Trace back to the source code to verify each error in the report—a correct diagram does not mean the code is correct.

Dependency Graphs and Design Self-Consistency

  • Component/Package diagrams: Submit to uml_structure_verify, optionally with a dependency matrix containing layers and rules; you can also pass repoPath to let the tool scan TypeScript/JavaScript relative imports to build the graph.
  • Layering and boundaries in design documents: model_design_review only determines whether the design contradicts its own declared contracts; it does not score against external standards.

For more complete scenarios (two-machine rendezvous, migrating two schemas, concurrency declaration scanning, etc.), see the GitHub README.

Use Cases and Caveats

Suitable for teams or individuals who need to turn “claims in designs/specs” into runnable models within DSH sessions and leave comparable reports: refactoring gates, state machine reviews, migration verification, dependency violation scanning, export to formal tools, etc.

Please note before use:

  • The plugin runs with the current dsh process permissions; tools will process the paths and models you pass. Please review the source code and MIT license yourself before installation.
  • The README states: At runtime, it only reads skills/ within the package to register skills; it does not read credentials or connect to the internet. When exporting to external checkers, it only writes to the files you specify.
  • Most of the concurrency safety work still relies on you running TSan, TLA+, etc. according to the routing; this plugin does not replace those analyses.
  • The DSH plugin directory SkillHub is a community site and has no official affiliation with DeepSeek / High-Flyer. In terms of ecosystem, DSH advocates “everything is a plugin,” and this plugin is a supplement to one of its workflow streams.

Conclusion

dsh-model-everything turns “thinking clearly” into “running it through” as much as possible: conclusions come from engine runs with hashes and sources, and report_diff can be used to align baselines for refactoring and iteration. To view the introduction and classification, you can open the directory page SkillHub · dsh-model-everything; for installation, tool tables, and report reading skills, see the GitHub Repository.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye