dsh-logicprobe 1.4.0 → 1.4.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-logicprobe",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Verifies claims about designs and code. Facts go against the source. Behaviour goes through an executable model: state machines, protocols, composition, data models, migrations. Structure diagrams are read as dependency graphs, at one level or several. Two reports can be compared for regression. Exports UPPAAL, TLA+, PRISM and SPIN input. Ships a native DeepSeek Harness bundle that injects the verification gate into the first model step.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -40,7 +40,7 @@
40
40
  ]
41
41
  },
42
42
  "compatibility": {
43
- "dsh": "^0.1.0-rc.7 || ^0.1.1-rc.1 || ^0.1.2-alpha.2 || ^0.1.2-alpha.3 || ^0.1.2-alpha.4 || ^0.1.2-alpha.5 || ^0.1.2-rc.1 || ^0.1.3-alpha.1 || ^0.1.3-alpha.2 || ^0.1.5-alpha.1 || ^0.1.5-rc.1 || ^0.1.5-alpha.2 || ^0.1.5-rc.2 || ^0.1.5-rc.3 || ^0.1.6-alpha.1 || ^0.1.6-alpha.2 || ^0.1.7-alpha.1 || ^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
43
+ "dsh": "^0.1.0-rc.7 || ^0.1.1-rc.1 || ^0.1.2-alpha.2 || ^0.1.2-alpha.3 || ^0.1.2-alpha.4 || ^0.1.2-alpha.5 || ^0.1.2-rc.1 || ^0.1.3-alpha.1 || ^0.1.3-alpha.2 || ^0.1.5-alpha.1 || ^0.1.5-rc.1 || ^0.1.5-alpha.2 || ^0.1.5-rc.2 || ^0.1.5-rc.3 || ^0.1.6-alpha.1 || ^0.1.6-alpha.2 || ^0.1.7-alpha.1 || ^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
44
44
  "dshReleases": {
45
45
  "0.1.0-rc.7": "compatible",
46
46
  "0.1.0-rc.8": "compatible",
@@ -67,7 +67,10 @@
67
67
  "0.2.0-rc.1": "compatible",
68
68
  "0.2.0-rc.2": "compatible",
69
69
  "0.2.1-alpha.1": "compatible",
70
- "0.2.1-alpha.2": "compatible"
70
+ "0.2.1-alpha.2": "compatible",
71
+ "0.2.1-rc.1": "compatible",
72
+ "0.2.1-rc.2": "compatible",
73
+ "0.2.1-rc.3": "compatible"
71
74
  },
72
75
  "profiles": [
73
76
  "headless",
@@ -85,11 +88,11 @@
85
88
  },
86
89
  "peerDependencies": {
87
90
  "@deepseek-ai/cordis": "^4.0.4",
88
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
89
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
90
- "@deepseek-ai/dsh-session": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
91
- "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.8 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
92
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
91
+ "@deepseek-ai/dsh-agent": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
92
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
93
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
94
+ "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.8 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
95
+ "@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2 || ^0.2.1-rc.1 || ^0.2.1-rc.2 || ^0.2.1-rc.3",
93
96
  "@deepseek-ai/schemastery": "^3.18.4"
94
97
  },
95
98
  "devDependencies": {
@@ -110,7 +113,7 @@
110
113
  "@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
111
114
  "@deepseek-ai/dsh-user-approval": "^0.2.0-rc.2",
112
115
  "@deepseek-ai/schemastery": "^3.18.4",
113
- "@types/node": "^26.6.4",
116
+ "@types/node": "^26.6.5",
114
117
  "typescript": "^7.0.2"
115
118
  },
116
119
  "author": {
@@ -119,6 +122,10 @@
119
122
  },
120
123
  "license": "MIT",
121
124
  "repository": "https://github.com/AmethystLuna/logicprobe",
125
+ "funding": {
126
+ "type": "custom",
127
+ "url": "https://afdian.com/a/amethystluna"
128
+ },
122
129
  "keywords": [
123
130
  "verification",
124
131
  "fact-check",
@@ -5,6 +5,15 @@ description: "Use when you want to verify something about code: a design doc, sp
5
5
 
6
6
  # Logic Probe
7
7
 
8
+ > **Successor: [`dsh-model-everything`](https://github.com/AmethystLuna/dsh-model-everything).**
9
+ > This plugin continues as `dsh-model-everything`: the same domains, a superset of the
10
+ > tooling, and a skill for each of them. If both are installed, load the
11
+ > `model-everything` skill for new work — it routes to `model-everything-uml`,
12
+ > `model-everything-structure`, `model-everything-datamodel` and
13
+ > `model-everything-interleaving` — and keep this plugin's skills as the reference for its
14
+ > own tool names (`logicprobe_*`). The two do not share a registry: a claim verified through
15
+ > one is not verified in the other.
16
+
8
17
  For an unverified design, failure is only a matter of time. Complex code becomes clear once you model it and run it. Check every claim before you act on it.
9
18
 
10
19
  ## When This Skill Applies
@@ -446,6 +455,20 @@ This skill owns behavioural claims. Three neighbouring domains have their own sk
446
455
  | Concurrency claims — "thread-safe", "lock-free", "no data race", "ISR-safe" — mined and routed to TSan/Helgrind/CBMC/TLA+, never proven here | `logicprobe-concurrency` |
447
456
  | Entities, fields, relationships, data invariants, schema migrations (DS1-DS4, DA1-DA12, DD1-DD4) | `logicprobe-datamodel` |
448
457
 
458
+ ### The Same Domains in the Successor
459
+
460
+ [dsh-model-everything](https://github.com/AmethystLuna/dsh-model-everything) covers each domain above with one skill, and adds two this plugin does not have. Use the mapping when both plugins are installed — the successor's skill is the one to load for new work, because its tools are the ones its own guidance names:
461
+
462
+ | This plugin | `dsh-model-everything` | What the successor adds |
463
+ |---|---|---|
464
+ | `logicprobe` | `model-everything` | the same doctrine over `model_verify`, `model_compose_verify` and `model_export` |
465
+ | `logicprobe-uml` | `model-everything-uml` | more diagram families (timing, profile, composite, communication, interaction overview) |
466
+ | `logicprobe-structure` | `model-everything-structure` | multi-level refinement between drawings |
467
+ | `logicprobe-datamodel` | `model-everything-datamodel` | the same DS/DA/DD families over `model_datamodel_verify` |
468
+ | `logicprobe-concurrency` | `model-everything-interleaving` | async vocabulary, a family per claim, and a lost update decided rather than routed |
469
+ | — | `model-everything-design` | layering, substitutability, interface width (no counterpart here) |
470
+ | — | `model-everything-report-reading` | how to read a report (no counterpart here) |
471
+
449
472
  ---
450
473
 
451
474
  ## Red Flags
@@ -5,6 +5,8 @@ description: "Use when a design or plan claims concurrency safety (thread-safe,
5
5
 
6
6
  # Logic Probe — Concurrency Claims
7
7
 
8
+ > **Successor: `dsh-model-everything`.** Its counterpart skill is `model-everything-interleaving`, which covers the same claims plus async and hands a shared location to `model_compose_verify` instead of routing it. Load that one when both plugins are installed; this skill stays accurate for `logicprobe_concurrency_scan`.
9
+
8
10
  This skill does **not** prove concurrency safety, and no report from it should ever be read as a proof. It mines a document, plan or code review for concurrency claims, marks them `UNVERIFIED`, and routes each one to the tool that can actually decide it.
9
11
 
10
12
  The claim-verification doctrine it inherits — enumerate verifiable claims, cite `file:line`, read `verdict` and never `ok` — lives in the `logicprobe` skill. Load that one when the task is behavioural verification of a state machine rather than a judgement about concurrency claims.
@@ -5,6 +5,8 @@ description: "Use when reviewing design docs, specs, plans or migrations claimin
5
5
 
6
6
  # Logic Probe Data
7
7
 
8
+ > **Successor: `dsh-model-everything`.** Its counterpart skill is `model-everything-datamodel`, over `model_datamodel_verify`. Load that one when both plugins are installed; this skill stays accurate for `logicprobe_datamodel_verify`.
9
+
8
10
  An unverified data model fails later. Model the schema and the migration, run them, and it becomes clear. Check every data claim before you act on it.
9
11
 
10
12
  ## Methodology
@@ -5,6 +5,8 @@ description: "Use when reviewing architecture, module structure or a dependency
5
5
 
6
6
  # Logic Probe — Structure and Dependency Review
7
7
 
8
+ > **Successor: `dsh-model-everything`.** Its counterpart skill is `model-everything-structure`, over `uml_structure_verify`, which also checks several drawings against each other. Load that one when both plugins are installed; this skill stays accurate for `logicprobe_structure_verify`.
9
+
8
10
  A component diagram is a model of an architecture, and a model can be wrong. This skill audits the graph the diagram actually draws — nodes and dependency arrows — against a declared dependency matrix, and says plainly what that does and does not prove.
9
11
 
10
12
  The claim-verification doctrine it inherits — cite evidence, read `verdict` and never `ok` — lives in the `logicprobe` skill. Load that one for behavioural claims (state machines, protocols, timing); load this one when the question is *where the dependencies point*.
@@ -5,6 +5,8 @@ description: "Use when drawing a code flow as UML or auditing a diagram someone
5
5
 
6
6
  # Logic Probe — UML Modelling
7
7
 
8
+ > **Successor: `dsh-model-everything`.** Its counterpart skill is `model-everything-uml`, which draws and reads more diagram families. Load that one when both plugins are installed; this skill stays accurate for `logicprobe_uml`.
9
+
8
10
  A diagram is a model, and a model can be wrong. A tidy flow chart is not evidence about the code, and a diagram that disagrees with its own model is worse than no diagram, because a reader will believe it.
9
11
 
10
12
  This skill covers the diagram half of the Logic Probe toolbox. The claim-verification doctrine it inherits — enumerate verifiable claims, cite `file:line`, read `verdict` and never `ok` — lives in the `logicprobe` skill; load that one when the task is to verify behaviour rather than to draw or audit a diagram.
package/src/uml.ts CHANGED
@@ -697,7 +697,7 @@ interface DiagramLine {
697
697
  * comes out would be presented as if it described the file.
698
698
  */
699
699
  const MERMAID_OTHER_FAMILIES: readonly string[] = [
700
- 'classDiagram', 'erDiagram', 'gantt', 'pie', 'journey', 'mindmap', 'gitGraph',
700
+ 'classDiagram', 'erDiagram', 'gantt', 'pie', 'journey', 'mindmap', 'gitGraph', 'usecase-beta',
701
701
  'C4Context', 'C4Container', 'C4Component', 'C4Dynamic', 'C4Deployment',
702
702
  'requirementDiagram', 'timeline', 'quadrantChart', 'sankey-beta', 'block-beta',
703
703
  'packet-beta', 'architecture-beta', 'radar-beta', 'treemap-beta', 'xychart-beta',
@@ -720,6 +720,13 @@ function detectNotation(text: string): UmlNotation {
720
720
  throw new UmlError('cannot tell whether this is Mermaid or PlantUML text: expected `stateDiagram-v2` / `flowchart` / `sequenceDiagram`, or `@startuml`')
721
721
  }
722
722
 
723
+ /**
724
+ * PlantUML use case syntax that carries no keyword: a colon actor, or a parenthesised
725
+ * use case, with an optional alias and an optional relation on the same line.
726
+ * `:User: --> (Login)` and `(Login) as (L)` are the whole header of such a file.
727
+ */
728
+ const USECASE_SYNTAX = /^[ \t]*(?::[^:\n]+:(?:[ \t]+as[ \t]+[A-Za-z_][A-Za-z0-9_]*)?|\([^()\n]+\)(?:[ \t]+as[ \t]+\(?[^()\n]+\)?)?)[ \t]*(?:$|-->|->|\.\.>|\.>|--\|>|<\|--|--)/m
729
+
723
730
  function detectDiagram(text: string): 'state' | 'activity' | 'sequence' {
724
731
  if (/^\s*stateDiagram/m.test(text)) return 'state'
725
732
  if (/^\s*(flowchart|graph)\b/m.test(text)) return 'activity'
@@ -732,6 +739,13 @@ function detectDiagram(text: string): 'state' | 'activity' | 'sequence' {
732
739
  // PlantUML declares the diagram kind by its body; the state keyword is the only
733
740
  // structural one logicprobe emits, everything else in that family is a state diagram too.
734
741
  if (/^\s*participant\b/m.test(text) || /->>\s*/.test(text)) return 'sequence'
742
+ // A use case diagram has no keyword header at all. The state parser below would read
743
+ // its arrows as transitions and return a plausible machine with no finding, so the
744
+ // family is refused by name. Its own model, and the tool that reads it, live in the
745
+ // dsh-model-everything plugin.
746
+ if (USECASE_SYNTAX.test(text)) {
747
+ throw new UmlError('this text is a use case diagram (`:Actor: --> (UseCase)`, `(UseCase) as (U)`), which this plugin does not model: it models state machines and flows, and reading it as one returns a machine the diagram never drew. The dsh-model-everything plugin renders, reads and reviews use case diagrams; keep this diagram as its own view.', 'UML_NOT_A_STATE_DIAGRAM')
748
+ }
735
749
  return 'state'
736
750
  }
737
751
  throw new UmlError('cannot tell which diagram kind this text declares')