bill084153-cell/dsh-knowledge-forge

Plugin ⭐ 0 MIT automationmemory

DeepSeek Harness (DSH) plugin for local-first automatic Wiki memory and native Skill generation.

Install

## How it works

<p align="center">
  <img src="./assets/architecture.svg" alt="DSH Knowledge Forge architecture and Wiki-to-Skill lifecycle" width="100%" />
</p>

### 1. Capture completed top-level turns

The plugin listens to DSH's top-level turn lifecycle. It extracts user-visible messages, bounded assistant output, reduced tool evidence, and relevant paths. Reasoning traces and full tool output are not copied.

Before persistence, candidate text is:

- redacted for credential-like content;
- truncated to configured limits;
- isolated by Git workspace and source Session;
- assigned an idempotent event identifier.

### 2. Schedule each Session independently

A source Session becomes due when either condition is met:

- it has **5 pending turns**; or
- its oldest pending turn has waited **60 minutes**.

Due Sessions are evaluated separately. Turns from different Sessions are never combined into one model request.

### 3. Run a one-shot background curator

Knowledge Forge starts a DSH subagent with these constraints:

- exactly one non-interactive response;
- no tools;
- strict JSON output schema;
- every input event must receive one result;
- all candidate and knowledge text is treated as untrusted data.

The Host validates event coverage, Case membership, safe identifiers, promotion evidence, and credential-like output before writing any artifact.

### 4. Distill Wiki first, Skill when repetition proves reuse

The knowledge policy is deliberately progressive:

1. **Discard** lookups, casual questions, transient chatter, and unchanged reuse of an existing Skill.
2. **Reuse an existing Skill** when it already covers the task.
3. **Write or update a Wiki** for a durable task Case: objective, user feedback, evidence, decisions, outcome, blockers, and continuation points.
4. **Promote to a Skill** only when a new independent Case repeats the same stable, executable workflow with clear inputs, steps, and verification.
5. **Replace the Wiki body with lightweight Meta** that points to the generated Skill.

This design keeps memory useful without treating every conversation as knowledge or every repeated phrase as automation.

## Quick start

### Requirements

- Node.js `^22.19.0 || >=24.0.0`
- DeepSeek Harness `0.1.0-rc.6`

Knowledge Forge uses Node's built-in `node:sqlite`; no separate SQLite installation is required.

### Install from this repository

Clone and build a prebuilt tarball:

Add bill084153-cell/dsh-knowledge-forge to your DSH config (web profile) to enable.

README

Expand full README Collapse

README is empty.