deepthinking-mcp 7.5.2 → 8.3.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/README.md CHANGED
@@ -6,15 +6,17 @@
6
6
 
7
7
  A comprehensive Model Context Protocol (MCP) server featuring **33 reasoning modes** (29 with dedicated thought types, 4 advanced runtime modes) including meta-reasoning for strategic oversight, with intelligent mode recommendation, taxonomy-based classification, enterprise security, and production-ready features for complex problem-solving, analysis, and decision-making.
8
8
 
9
- > 📋 **Latest Release**: v7.5.0 - See [CHANGELOG](CHANGELOG.md) for updates and improvements.
9
+ > 📋 **Latest Release**: v8.3.1 - See [CHANGELOG](CHANGELOG.md) for updates and improvements.
10
10
  >
11
- > 🎉 **New in v7.5.0**: Phase 14 Accessible Reasoning Modes! All 29 modes with dedicated thought types are now accessible via MCP tools. 2 new tools: `deepthinking_engineering` and `deepthinking_academic`. Total: 12 focused tools.
11
+ > 🎉 **New in v8.3.x**: Multi-instance support with file locking, dependency graph tool with unused code detection, codebase cleanup.
12
12
  >
13
- > ✨ **v7.4.0**: Phase 13 Academic Research Modes for PhD students! Synthesis (literature review), Argumentation (Toulmin model), Critique (peer review), and Analysis (qualitative methods) modes.
13
+ > ✨ **v8.2.x**: Phase 10 ModeHandler Architecture! 7 specialized handlers with advanced validation and enhancements - Systems Archetypes detection, Socratic question framework, automatic Bayesian posterior calculation, Nash equilibria computation.
14
14
  >
15
- > ✨ **v7.3.0**: Phase 12 Algorithmic Reasoning Mode with comprehensive CLRS coverage! 100+ named algorithms, complexity analysis, design patterns.
15
+ > ✨ **v8.0.0**: ModeHandler infrastructure with Strategy pattern for mode-specific processing.
16
16
  >
17
- > ✨ **v7.2.0**: Phase 11 Historical Computing Extensions! Computability mode (Turing machines), Cryptanalytic mode (deciban evidence system), extended Game Theory (von Neumann).
17
+ > ✨ **v7.5.0**: All 29 modes with dedicated thought types accessible via 12 focused MCP tools.
18
+ >
19
+ > ✨ **v7.4.0**: Academic Research Modes - Synthesis (literature review), Argumentation (Toulmin model), Critique (peer review), Analysis (qualitative methods).
18
20
 
19
21
  ## Table of Contents
20
22
 
@@ -32,8 +34,10 @@ A comprehensive Model Context Protocol (MCP) server featuring **33 reasoning mod
32
34
  ## Features
33
35
 
34
36
  - **33 Specialized Reasoning Modes** - From sequential thinking to game theory, formal logic, and meta-reasoning (29 with full thought types, 4 advanced runtime modes)
35
- - **Academic Research Modes (NEW!)** - Synthesis (literature review), Argumentation (Toulmin), Critique (peer review), Analysis (qualitative methods)
36
- - **Algorithmic Reasoning (v7.3.0)** - Comprehensive CLRS coverage with 100+ named algorithms, complexity analysis, design patterns
37
+ - **ModeHandler Architecture (v8.x)** - Strategy pattern with 7 specialized handlers providing advanced validation and enhancements
38
+ - **Specialized Handler Enhancements** - Systems Archetypes (8 patterns), Socratic Questions (6 categories), auto Bayesian posteriors, Nash equilibria
39
+ - **Academic Research Modes** - Synthesis (literature review), Argumentation (Toulmin), Critique (peer review), Analysis (qualitative methods)
40
+ - **Algorithmic Reasoning** - Comprehensive CLRS coverage with 100+ named algorithms, complexity analysis, design patterns
37
41
  - **Historical Computing Extensions** - Computability (Turing machines), Cryptanalytic (decibans), extended Game Theory (von Neumann)
38
42
  - **Proof Decomposition** - Break proofs into atomic statements, detect gaps, track assumption chains
39
43
  - **Native SVG Export** - Direct SVG generation without external tools for proof visualizations
@@ -466,6 +470,44 @@ mode: 'analysis'
466
470
  // Features: Multiple qualitative analysis frameworks, coding support
467
471
  ```
468
472
 
473
+ ### Specialized Mode Handlers (v8.x)
474
+
475
+ Phase 10 introduced 7 specialized handlers with advanced validation and enhancements:
476
+
477
+ | Handler | Mode | Key Enhancements |
478
+ |---------|------|------------------|
479
+ | **CausalHandler** | causal | Validates graph structure, detects cycles, propagates interventions |
480
+ | **BayesianHandler** | bayesian | Auto-calculates posteriors from prior × likelihood, validates probability sums |
481
+ | **GameTheoryHandler** | gametheory | Validates payoff matrix dimensions, computes Nash equilibria |
482
+ | **CounterfactualHandler** | counterfactual | Tracks world states, validates divergence points, compares outcomes |
483
+ | **SynthesisHandler** | synthesis | Tracks source coverage, validates theme extraction, detects contradictions |
484
+ | **SystemsThinkingHandler** | systemsthinking | Detects 8 Systems Archetypes, adds warning signs and interventions |
485
+ | **CritiqueHandler** | critique | 6 Socratic question categories for rigorous critical analysis |
486
+
487
+ #### Systems Archetypes Detection
488
+
489
+ SystemsThinkingHandler automatically detects Peter Senge's 8 archetypes:
490
+
491
+ - **Fixes that Fail** - Short-term fixes with unintended consequences
492
+ - **Shifting the Burden** - Symptomatic vs fundamental solutions
493
+ - **Limits to Growth** - Growth hitting constraints
494
+ - **Success to the Successful** - Winner-take-all dynamics
495
+ - **Tragedy of the Commons** - Shared resource depletion
496
+ - **Escalation** - Competitive escalation spirals
497
+ - **Accidental Adversaries** - Alliance deterioration
498
+ - **Growth and Underinvestment** - Capacity constraints
499
+
500
+ #### Socratic Question Framework
501
+
502
+ CritiqueHandler uses Richard Paul's 6 categories:
503
+
504
+ - **Clarification** - "What do you mean by...?"
505
+ - **Assumptions** - "What are you assuming?"
506
+ - **Evidence** - "What evidence supports this?"
507
+ - **Perspectives** - "Are there alternative viewpoints?"
508
+ - **Implications** - "What are the consequences?"
509
+ - **Meta** - "Why is this question important?"
510
+
469
511
  ## Proof Decomposition
470
512
 
471
513
  **New in v7.0.0!** The proof decomposition system provides advanced mathematical reasoning capabilities:
@@ -742,17 +784,18 @@ For architecture details, see [docs/architecture/](docs/architecture/).
742
784
 
743
785
  | Metric | Value |
744
786
  |--------|-------|
745
- | TypeScript Files | 183 |
746
- | Lines of Code | ~62,000 |
747
- | Test Files | 40 |
748
- | Passing Tests | 792+ |
787
+ | TypeScript Files | 197 |
788
+ | Lines of Code | ~80,336 |
789
+ | Test Files | 39 |
790
+ | Passing Tests | 1046+ |
749
791
  | Thinking Modes | 33 (29 with thought types) |
750
- | MCP Tools | 10 focused + 1 legacy |
751
- | Export Formats | 11 (including native SVG) |
752
- | Visual Formats | 11 (mermaid, dot, ascii, svg, etc.) |
792
+ | Specialized Handlers | 7 |
793
+ | MCP Tools | 12 focused + 1 legacy |
794
+ | Export Formats | 8 (including native SVG) |
795
+ | Visual Exporters | 35+ mode-specific files |
753
796
  | Reasoning Types | 69 (110 planned) |
754
797
  | Modules | 16 |
755
- | Total Exports | 970 |
798
+ | Total Exports | 1033 (448 re-exports) |
756
799
 
757
800
  ## Architecture
758
801
 
@@ -765,13 +808,22 @@ src/
765
808
  ├── index.ts # MCP server entry point (tool handlers)
766
809
  ├── types/ # Type definitions including 33 mode types
767
810
  │ ├── core.ts # ThinkingMode enum, Thought union type
768
- │ └── modes/ # One file per reasoning mode (23 files)
811
+ │ └── modes/ # One file per reasoning mode (26 files)
769
812
  ├── services/ # Business logic layer
770
- │ ├── ThoughtFactory.ts # Thought creation and validation
813
+ │ ├── ThoughtFactory.ts # Thought creation with handler integration
771
814
  │ ├── ExportService.ts # Multi-format export handling
772
815
  │ └── ModeRouter.ts # Mode switching and recommendations
773
816
  ├── session/ # SessionManager, persistence, storage
774
- ├── modes/ # Advanced reasoning implementations (7 files)
817
+ ├── modes/ # ModeHandler architecture (v8.x)
818
+ │ ├── handlers/ # 7 specialized handlers
819
+ │ │ ├── CausalHandler.ts
820
+ │ │ ├── BayesianHandler.ts
821
+ │ │ ├── GameTheoryHandler.ts
822
+ │ │ ├── CounterfactualHandler.ts
823
+ │ │ ├── SynthesisHandler.ts
824
+ │ │ ├── SystemsThinkingHandler.ts
825
+ │ │ └── CritiqueHandler.ts
826
+ │ └── base/ # ModeHandler interface, registry
775
827
  ├── proof/ # Proof decomposition system (v7.0.0)
776
828
  │ ├── decomposer.ts # ProofDecomposer class
777
829
  │ ├── gap-analyzer.ts # GapAnalyzer class
@@ -781,6 +833,30 @@ src/
781
833
  └── tools/ # MCP tool definitions and schemas
782
834
  ```
783
835
 
836
+ ### ModeHandler Architecture (v8.x)
837
+
838
+ Phase 10 introduced the ModeHandler pattern (Strategy pattern) for mode-specific processing:
839
+
840
+ ```typescript
841
+ // Handler interface
842
+ interface ModeHandler {
843
+ mode: ThinkingMode;
844
+ validate(input: ThinkingToolInput): ValidationResult;
845
+ enhance(thought: Thought, context: SessionContext): Thought;
846
+ getSuggestions(thought: Thought): string[];
847
+ }
848
+
849
+ // Registry manages all handlers
850
+ const registry = ModeHandlerRegistry.getInstance();
851
+ registry.hasSpecializedHandler('causal'); // true for 7 modes
852
+ ```
853
+
854
+ **Benefits:**
855
+ - Specialized validation logic per mode
856
+ - Automatic enhancements (posteriors, equilibria, archetypes)
857
+ - Mode-specific suggestions and warnings
858
+ - Clean separation from ThoughtFactory switch statement
859
+
784
860
  ### Feature Modules
785
861
 
786
862
  ```
@@ -799,7 +875,7 @@ src/
799
875
  ├── backup/ # Backup manager with provider abstraction
800
876
  ├── cache/ # LRU/LFU/FIFO caching strategies
801
877
  ├── rate-limit/ # Sliding window rate limiter
802
- ├── validation/ # Zod schemas (25+ mode validators)
878
+ ├── validation/ # Zod schemas (31+ mode validators)
803
879
  ├── comparison/ # Session comparison & diff generation
804
880
  ├── templates/ # Session templates with usage tracking
805
881
  ├── analytics/ # Analytics engine and dashboard