Guide · pi extension

The pi extension

Author and run DeepClause DML inside a pi session. The extension supplies the authoring guide, the /dc-* commands, session context, and an optional model-callable dc_run tool — while pi supplies the model, credentials, UI, and cancellation.

What it is

The DeepClause pi extension turns a normal coding session into a DML authoring and execution environment. Programs live under .pi/deepclause/skills/; pi creates and edits them with its normal coding abilities, and users run them through slash commands.

  • No compiler. Generated content must already be valid DML.
  • pi owns the session. No separate DeepClause sessions; forks and compaction are respected.
  • User-triggered execution. Runs happen through /dc-run, or through dc_run only after explicit enablement.

Two workflows

The extension ships two authoring skills, both producing DML for the same runtime.

SDD · SpecKit

Spec-driven changes

Markdown specs are the source of truth; a change is a reviewed proposal with delta specs and an executable task plan.

Read the SpecKit guide →
Handbook → DML

Turn SOPs into DML policies

A long handbook becomes one auditable DML policy per workflow: deterministic rules, scoped LLM steps, and verified post-conditions.

Read the handbook guide →

Commands

CommandEffect
/dcShow help, active model, paths, and runtime status
/dc-listList DML files under skills/ and plans/
/dc-plan <request>Create a validated executable DML plan through a normal pi planning turn
/dc-run <skill|path>Execute a named skill or a DML file inside .pi/deepclause/
/dc-tool enable|disable|statusControl the optional model-callable dc_run tool
/dc-cancelCancel the current execution
/dc-check <skill>Parse and statically validate DML without executing it

Runtime and model

Every DML LLM operation uses pi's active model, existing credentials, cancellation signal, streaming facilities, and usage accounting. The extension never requests API keys, infers providers, or mutates provider environment variables.

  • Context modes. turn (default), branch, and isolated.
  • Scoped tools. Runtime tools are registered explicitly; pi's full tool registry is never handed to DML.
  • Path isolation. DML paths cannot escape the active workspace.
  • Opt-in dc_run. The model-callable tool is disabled by default and can only execute existing DML under .pi/deepclause/.

Install

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

Then run /dc in a workspace to initialize .pi/deepclause/. Existing files are preserved; bundled docs are only upgraded through explicit, non-destructive versioning.