/dr-plugin
Manage opt-in plugins: list, enable, disable, sync, doctor
Overview
/dr-plugin is the Datarim plugin-system CLI introduced in v1.23.0 (<TASK-ID>). It manages an opt-in set of skills, agents, commands, and templates beyond the built-in datarim-core shipping set. Plugins are opt-in by design: nothing is loaded unless the operator explicitly enables it, keeping the AI context lean and the dependency graph deterministic.
Plugins are local directories (or git URLs in a future phase) shaped as {plugin-id}/{plugin.yaml, skills/, agents/, commands/, templates/}. The CLI symlinks discovered files into the project runtime, .datarim-runtime/local/{category}/{plugin-id}/ namespaces (nothing is written under your home directory), with optional root-position installation via the overrides: field. The active set lives in datarim/enabled-plugins.md — the single source of truth.
Usage
# Show active + bootstrap on first run
/dr-plugin list
# Enable a local plugin source (absolute path)
/dr-plugin enable /path/to/my-plugin
# Disable an active plugin (removes symlinks + manifest entry)
/dr-plugin disable my-plugin
# Opt out of / restore a core-owned default-on policy (tombstone only)
/dr-plugin disable tdd-enforcement
/dr-plugin enable tdd-enforcement
# Reconcile runtime ↔ manifest (idempotent)
/dr-plugin sync
# Run 10 health checks; --fix auto-repairs sync-fixable issues
/dr-plugin doctor
/dr-plugin doctor --fix
Plugin Source Contract
A plugin source directory must contain plugin.yaml with at minimum:
schema_version: 1
id: my-plugin # kebab-case, [a-z][a-z0-9-]{0,31}
title: My Plugin
version: 0.1.0
author: ...
license: MIT
description: ...
categories:
- skills
- commands
overrides: # optional — root-position install
- my-shadow-skill.md
depends_on: # optional — other plugin ids
- some-other-plugin
Doctor Health Checks (10)
- manifest-syntax — required scalar fields, valid IDs (error)
- inventory-consistency — declared symlinks present (error, --fix → sync)
- broken-symlinks — declared symlink target missing (error, --fix → sync)
- orphan-files — runtime files not in any inventory (warning, --fix → sync)
- override-integrity — overrides must be in plugin's file_inventory (error, --fix → sync)
- dependency-graph — cycle/dangling detection via DFS (error)
- git-state — uncommitted manifest in git workspace (warning)
- snapshot-cleanup — snapshots older than 30 days (warning, --fix → purge)
- skill-registry — skill frontmatter
name:matches basename (warning) — closes the Skill-tool resolution gap when frontmatter is malformed - disabled-defaults — the
## Disabled Defaultstombstone section for core-owned default-on policies (such astdd-enforcement) is absent or well-formed (warning; malformed state already fails safe to the stricter policy)
Exit Codes
0— clean1— warnings only2— errors found3— concurrent invocation (lock held by another process)64— usage error
Safety
Every enable takes a tarball snapshot of runtime/ + manifest.md before applying any change. On mid-apply failure, restore_from_snapshot reverts atomically. FIFO cap DR_PLUGIN_SNAPSHOT_MAX=50; age-based purge after DR_PLUGIN_SNAPSHOT_AGE_DAYS=30. Path traversal, embedded credentials in URLs, and CRLF in YAML are rejected at the validation gate. Critical-core overrides (evolution, datarim-system, pre-archive-check) emit a warning to stderr but allow — the operator decides.
Bundled Plugins
The framework repo ships these plugins under plugins/. None of them is counted among the 28 core commands.
dr-orchestrate— terminal-pane runner behind/dr-orchestrate: tmux driver, semantic resolver, bot transport and audit backends.dr-jev-control— optional project-local Jev routing for Claude Code, Codex and Cursor, with the destructive-command floor and a kill switch.tdd-enforcement— metadata-only, default-on workspace toggle for strict test-first sequencing.dr-fleet-evolution— Bash-native loop that improves the fleet starter skills from execution signals behind fail-closed gates.controller-continuation(v3.1.0+) — worker entry/dr-continue-checkpointfor projects that run their own external controller. It resumes exactly the recorded stage from controller-owned, read-only resources with production HOLD kept. Serve it from a read-only framework mount rather than enabling it inside an untrusted workspace. Linux only; other platforms are refused withcontinuation_unsupported_platform.
When to Use Plugins vs local/ Overlay
- Personal additions for a single project checkout →
.datarim-runtime/local/{skills,agents,commands,templates}/(gitignored overlay; loader policy: local wins on name conflict). - Shareable extensions versioned as a unit, distributed as a directory or repo →
/dr-plugin enable.
Reporting the result
Apply Human Outcome Reporting before a human-facing update or result. Explain the user-visible outcome, the original conditions, checks and evidence, and open limitations. A stage result does not mean the entire task is complete. Keep exact protocols and technical records intact. To explain again without continuing work, use /dr-explain.