Documentation

DeepClause docs

DeepClause turns specs and SOPs into executable DML harnesses. The logic that must hold is code; the model drafts and explains. Every change, run, and artifact is reviewable.

Two main functions

DeepClause has two main functions: sop2harness, the CLI that turns SOPs into a versioned harness, and the pi extension, which authors and runs DML inside a pi session. Both share one DML runtime and one harness format.

sop2harness · CLI

Turn SOPs into a versioned harness

s2h scaffolds a project, authors one validated DML Skill per procedure through a pi session, versions the harness, and exports it as a self-hosted API, web chat, and MCP server.

  • s2h create authors Skills from SOPs
  • s2h commit validates, versions, and tags
  • s2h export produces API + chat + MCP + Docker
Read the sop2harness guide →
pi extension · in-session

Author and run DML in pi

The pi extension turns a coding session into a DML authoring and execution environment. It ships two workflows, both producing DML for the same runtime.

Read the pi extension guide →

Both share one DML runtime: one model, one audit trail. See the DML language reference and the DML SDK/CLI.

Not using pi or sop2harness? Run and embed DML directly with the DML SDK & CLI guide. For calibrated semantic decisions, see decision models.

Get started

One CLI from SOP to a versioned harness — then embed the runtime anywhere.

sop2harness CLI recommended

npm install -g deepclause-sop2harness

s2h init
s2h create "Turn this SOP into a harness"
s2h commit -m "add triage workflow"
s2h export --out ./export

Scaffold, author through a pi session, version, and export a self-hosted API, web chat, and MCP server.

sop2harness guide →

pi extension

pi install \
  git:github.com/deepclause/deepclause-pi

Author and run DML in your session with SDD (SpecKit) and the Handbook → DML skill. Uses pi's model and credentials.

pi extension guide →

TypeScript SDK

import { createDeepClause } from "deepclause-sdk";

const dc = await createDeepClause({
  model: "host-active-model",
  llmBackend, // your model
});

Embed the DML runtime in your own service with a host-provided model backend; no provider keys required.

DML SDK & CLI guide →

Other agents and hosts: use the exported MCP server, the s2h CLI, or the SDK's injectable model backend. The runtime tool whitelist stays explicit.

Reference

DML language reference The language: task/prompt, exec, tools, memory, control flow.
DML language examples Validated example skills and generated plans.
DML SDK/CLI Embed the runtime in TypeScript or run it headless.
API reference Constructor, methods, options, tools, and events.
Sop2Harness CLI init, create, commit, export, and helpers.