DeepSeek Harness (DSH) is designed around a core philosophy: plugin-based extensibility. In practice, making an AI remember specific rules, historical lessons, or knowledge base content is often a pain point, because regular session memory can easily be lost or become ineffective. The dsh-cognitio plugin aims to solve this problem. It provides a SQLite-based hierarchical memory system, allowing the AI to remember your rules, automatically remind you at critical moments, and require your approval for all automatically accumulated content.
Positioning and Core Mechanism¶
cognitio (Cognitive Tension Network) is a DeepSeek Harness plugin that transforms “AI memory and self-discipline” from voluntary behavior into a mechanical process. Its core logic includes:
- Memory Hierarchy: Memory is divided into facts, rules, patterns, cases, and propositions, with support for querying older versions through version chains.
- Mechanical Reminders: Relevant rules are automatically retrieved and injected at turn start, tool invocation, error occurrence, or turn end, without relying on the model’s own memory.
- Error Correction and Evolution: An error-correction pipeline automatically archives errors and turn content, then refines them into new rules after daily maintenance.
- User Arbitration: All automatically generated items only enter a draft box and must be approved by the user before taking effect.
Core Capabilities¶
This plugin provides the following functional modules:
- Memory Well: SQLite-based hierarchical storage, including version chains and soft deletion mechanisms.
- Relationships and Efficacy: Records relationships between entries (dependencies, contradictions, etc.) and calculates rule efficacy based on enforcement counts.
- Sentinel Triggers: Supports triggering reminders at four time points (turn start, before actions, on errors, and turn end), with bidirectional matching of trigger terms.
- Error-Correction Pipeline: Automatically filters environment-related errors and archives them, enabling unattended maintenance.
- Document Knowledge: Provides a read-only full-text literature library and requires consultation when handling specialized issues.
- Settings Panel: Integrates a “cognitio system” panel in DSH settings, offering views for memory, rules, and approvals.
- Audit and Observability: Records all injection, approval, and modification operations, and supports monitoring via six-dimensional metrics.
Installation and Enabling¶
To install this plugin, use the DSH command-line tool.
- Run the installation command:
dsh plugin --profile web add github:ljlj7149-cloud/dsh-cognitio
- After installation, restart DSH. The plugin will load its manifest at startup.
Configuration and Usage¶
After installation and restart, open the DSH settings interface and configure “cognitio system”.
Environment Variable Configuration (Optional)¶
You can specify the data directory and literature library path through environment variables:
MEMORY_DIR: Specifies the memory data directory, defaulting to~/.dsh/cognitio.VAULT_DIR: Specifies the literature library directory, defaulting to~/.dsh/cognitio/vault.VAULT_INDEX_DB: Specifies the literature index file, defaulting to<vault>/vault-index.sqlite.
Typical Usage¶
- Open “cognitio system” in settings, and view hierarchical memory and pending approval entries on the “Memory Library” page.
- View active rules and rules awaiting your approval on the “Rules” page.
- Repeat a specific sentence in any DSH session.
- The sentinel will retrieve and inject relevant rules as needed.
Data and Privacy¶
This plugin follows data privacy principles, and all data remains local.
- Local Storage: The data directory (such as
~/.dsh/cognitio) is not included in the repository; only the mechanism code is retained. - Incremental Updates: The system is additive and persistent, and does not become invalid due to model or preset changes.
- Approval Mechanism: All automatically generated items only enter drafts and must be approved to become official.
- License: MIT License.
Conclusion¶
dsh-cognitio is suitable for users who want to strictly constrain AI behavior, build long-term knowledge bases, or audit AI decision-making processes. It maintains rules through mechanisms rather than relying on the model’s self-awareness, making it a memory and governance plugin suited for in-depth use.
Repository URL: https://github.com/ljlj7149-cloud/dsh-cognitio