Skip to content

CLI Reference

The dz CLI manages skill installation, preset switching, project configuration, learning, benchmarking, and publishing. It ships as @dzhechkov/harness-cli on npm.

Terminal window
npm i -g @dzhechkov/harness-cli
Command Description
dz recommend "<task>" Analyze a task description and recommend skills, presets, and npx toolkits
dz scout Scout 9 sources (GitHub, npm, HN, MCP Registry, Glama, OSSInsight, Smithery, Semantic Scholar, arXiv) for new skill packages
dz registry [search <query>] Browse and search the local skill registry; filter with --category
dz downloads Show npm download stats for the skill packages
dz stats Quick metrics: packages, skills, targets, presets
dz architecture Top-level product architecture map — attention-ranked modules and their relations
dz mcp-scan Scan configured MCP (Model Context Protocol) servers and report their tools
dz parity Honest feature × target map, computed from the capability model — full / manual / absent per target (--target, --json)
Terminal window
# Get recommendations for a task
dz recommend "set up CI/CD with security scanning"
# Scout for new skills from 9 sources
dz scout --since 2026-05-01
# Scout with deep SKILL.md analysis
dz scout --deep
# Search the registry for kubernetes-related skills
dz registry search kubernetes
# Show current metrics
dz stats
Command Description
dz init Install a preset (or selected skills) for a target. --preset <name>, --select id,..., --enrich
dz integrations-verify Repeat a target-owned live MCP/hooks registration probe; inconclusive or unsupported evidence is a named refusal
dz setup Bootstrap a project — config, hooks, learning memory. Supports --memory agentdb
dz install <npm-pkg> Install a skill package from npm into the current project
dz update Re-sync installed skills from the canonical source (alias of dz sync)
dz upgrade Detect installed skills with newer canonical versions available
dz import-ecc Import curated skills from the ECC project (github.com/affaan-m/ECC)
dz feature-adr-setup Guided feature-adr onboarding for a target project; --guards scaffolds a zero-dependency deterministic guard runner (check.mjs)
dz project-skills Read-only view of role-default skills wired into the feature-adr pipeline
dz codex-recall-observe Experimental owned App Server stdio proxy; separate recorded input-accounting status with explicit observer selection
dz statusline Claude Code status line: live 🚦 gates, learning and pipeline state
Terminal window
# Initialize a target with a preset
dz init --target claude-code --preset devops
# Bootstrap with agentdb memory backend
dz setup --target claude-code --preset meta --memory agentdb
# Install a single npm skill pack
dz install @dzhechkov/skills-devops
# Import ECC skills (first 20, no force-overwrite)
dz import-ecc --limit 20
# Check for upgrades
dz upgrade
Command Description
dz verify Verify installed skill structure against the agentskills.io schema
dz doctor Check installation health — verifies skills, presets, targets
dz diff <skill-dir> Show line-level differences between an installed skill and its canonical version
dz migrate Migrate an existing project layout to the current harness conventions
dz roam Roam across project sessions and memory states
Terminal window
# Verify skill structure
dz verify
# Health check
dz doctor
# See what changed vs canonical
dz diff .claude/skills/pr-review
# Roam session history
dz roam
Command Description
dz create-skill --name <id> Scaffold a new skill with the agentskills.io directory structure (--bto for eval templates)
dz compose <preset1+preset2+...> Compose multiple presets into one install (deduplicates overlapping skills)
dz teach "<pattern>" Teach the harness a new pattern (--reward <0-1>, --domain <name>)
dz plugin Generate a Claude Plugin manifest (.claude-plugin/) from the registry
dz workflow <sub> Author loop-plan/1 Workflow loops: init scaffold, validate (INV checks, CI-runnable), render (plan → region-delimited script, USER regions preserved), blobs (subsystem-blob registry) — the ADR-005 templates are retired
dz workflow-lint <script.js> 17-rule deterministic gate over a loop script (--plan, --require-plan/--legacy); exit 0/1/3 — inconclusive is never a pass
dz workflow-trace <runDir> Timeline + SEQ invariant runner over a run’s own trace.jsonl (--invariants, --html, --json)
dz recall "<query>" Recall learned patterns — lexical + semantic (vector) ranking; --forget <dzId> removes with a snapshot
dz store-guard Monotonic high-water mark over the learned store: refuses a cold start over an existing store (--reset to re-arm deliberately)
dz consolidate Consolidate session lessons into the learned store; --prune-noise (dry-run by default)
dz vector <sub> Vector tier over the learned store: index, search, reindex, import
dz brain <sub> Cross-project knowledge brain: book knowledge units, grounding, rerank
dz retro Retrospective over recent work — surfaces lessons worth teaching
dz mr-rakes Analyze merge requests for the project’s recurring rakes (learn from mistakes)
dz challenge Adversarial challenge-panel over a plan (break-it questions + cross-validation)
dz bto-optimize Optimize a skill with hold-out evaluation and no-regress winner selection
Terminal window
# Scaffold a new skill
dz create-skill --name my-custom-skill
# Scaffold with BTO eval templates (L0/L1/L2)
dz create-skill --name my-skill --bto
# Compose a workflow from existing presets
dz compose devops+mcp+web3
# Teach a pattern
dz teach "always run linting before commit" --reward 1.0
# Generate Claude Plugin manifest
dz plugin
# Run a dynamic workflow
dz workflow init --name my-loop --pattern pipeline --o my-loop.plan.json
dz workflow render my-loop.plan.json --o my-loop.js
dz workflow-lint my-loop.js --plan my-loop.plan.json --require-plan
Command Description
dz benchmark <skill-dir> Benchmark a skill against 19 Layer-0 deterministic checks (Grade A–F)
dz pretrain Pre-train the harness on your codebase (tech-stack detectors)
dz sync Re-sync installed skills from the canonical source
dz sync-upstream Check skills against their origin repos via sources.json
dz auto-canonicalize Scan a GitHub repo for SKILL.md files and generate create-skill commands
dz dashboard Visual panel: all packages, adapters, presets, and health at a glance
dz chain Verify EVERY hash-chained journal in one command. Coverage is DERIVED from the CHAINED_JOURNALS registry, never typed, so a journal cannot be given a chain and then checked by nobody. An ABSENT journal is NAMED absent rather than omitted — omission and cleanliness read alike in a report. Statuses ok / healed / unchained / absent / broken / unreadable; exit 1 on broken or unreadable (--project, --json)
dz claim-check Integrity gate: flag untagged accuracy/count claims in docs and READMEs
dz discrimination-check §42 gate: prove a property test goes RED at pre-feature base (not vacuous)
dz amendment-check Every AM-N amendment row must resolve to a test found INSIDE the file it names; --all is a census that never blocks
dz journal add --kind decision|verdict|run|error|block "<text>" [--ref <trace>] [--at <ISO>] [--quote <file>] [--commit-quote]; show [--day|--week] [--at <date>] [--kind <kind>] [--json]. Existing UTC day files, witnessed append; quotes remain local by default.
dz feature-adr-record Witnessed writer for the run-cost ledger and training pairs — refused before any write, verified by re-reading
dz round Focused work outside feature-adr: open recalls up to five lessons into the brief; close requires a stored teach:<id> or --no-new-knowledge, writes through feature-adr-record, and removes state only after read-back; status reports old live or abandoned rounds
dz experiment Ablation-C: assign --experiment <name> --task <taskId> --stratum <s> computes a pre-registered, block-randomized direct/reference arm (idempotent — a repeat --task returns the same arm, refuses one already started per the run-cost ledger); status --experiment <name> reports an intention-to-treat table by arm
dz runs Read the run registry: live, stalled, orphaned, inconclusive, or finished; show parent and heartbeat age ; --settle records confirmed death, --stall-minutes controls the display-only stalled state
dz runs-record Append started, heartbeat, or finished; Workflow uses the host PID and a distinct run ID
dz runs-clean Plan cleanup of old clean merged worktrees and dead/finished run histories; --apply removes and confirms, --retention-days defaults to 2
dz mutation-gate The mutation gate: delete each NAMED protection (declarative {find, replace} registry) in a scratch copy of the package, run its suite, REQUIRE red — and require the red to be ATTRIBUTABLE: a mutation that no longer parses is MUTATION_UNPARSEABLE, a failing count far above the entry’s bound is OVER_FAILING, and a restored tree that does not reproduce green makes the entry INCONCLUSIVE (flaky). A does-not-apply mutation, a green suite, or an inconclusive run is a FAILURE, never a skip (--package, --registry, --only, --rebaseline per-entry|final, --json; exit 0 proven / 1 failed / 2 setup)
dz delivery-check --slug <slug> Portable Step-10 Delivery Gate: 4-plane review brief + artifact probes; --findings → fail-closed ready/blocked hand-off + 10_delivery_review.md (--strict, --json)
dz skills-verify Does .claude/skills/ actually REGISTER? --static = instant CI-safe layout scan (flags dirs that can never register); default reads the authoritative system/init listing from a real session. exit 0 pass / 1 fail / 2 inconclusive — never a false pass (--dir, --expect, --strict, --json)
dz compounding Does the learning loop pay? Pool write-only ratio, guard trajectory by rate, replay readiness, apply-leg staleness — INSUFFICIENT_DATA is a finding, never a verdict (--project, --json)
dz deadwood Advisory zero-usage report for commands and guard-rule firings over --weeks <n>. Safety-net exclusions carry written reasons; skills without an invocation signal never become candidates; shallow history reports INSUFFICIENT_DATA. Human deprecation review only — never deletes or modifies harness surface (--json)
dz lint Advisory EN/RU prose-style lint for the lexical layer claim-check and voice review don’t cover — dense marker clusters (leverage/comprehensive/robust/seamless/synergy/…), bullet walls, triple-adjective stacks. PARAGRAPH-LOCAL policy, not single-occurrence: the two-distinct-marker floor owns paragraphs through 50 words under defaults, then density rejects diffuse clusters; a legitimate robust parser stays clean ([paths...], --json, --config, --registry, --project)
dz contract-check Per-item verdict (met/unmet/not-testable) against a feature’s numbered, testable acceptance criteria and ADR Confirmation — complements the single load-bearing ADR Confirmation property with completeness: an unmet item can’t hide inside a holistic A/B grade (--slug, --json)
dz epoch-replay RUNS the cold-vs-warm replay dz compounding reports readiness for. PAIRED test — one binomial over DECISIVE pairs (ties excluded, reported): p̂ = warm/(warm+cold), 95% Wilson, on the lift scale 2p̂−1. SUPPORTED only when the lift interval lies entirely above zero; FALSIFIED only on harm or a passed non-superiority test (lift upper bound below the PRE-REGISTERED margin, default 0.05, at 10+ decisive pairs) so a tie — even 500/500 — is INCONCLUSIVE, not “refuted”; no verdict below 5 decisive pairs. Orchestrates + scores, never calls a model: --emit (work order + pre-registered margin + sha256 integrity digest, an accident check and NOT a cryptographic commitment) → --judge (the file carries {id, prompt} ONLY) → --score --work-order (verifies digest + seed-derived assignment; refuses forged orders, a --margin flag, and duplicate judgement ids); --mock runs the same math on seeded synthetic outcomes at $0
dz score Process scorecard for one feature-adr run: ADR confirmation, discrimination, cross-model QE grade, live verification, README-first, learning loop — descriptive-only, never a gate (--slug, --json). --by-family (ADR-001 cross-family-control-branch) aggregates the WHOLE ledger per (coder,reviewer) family pair — grades, shippedShare, fixRounds, foreign-unique findings folded in from dz control-review rows, refutedShare, costPerConfirmed, draftToShipped; prints “control rows: 0” honestly when none exist yet
dz recap What was done over a day, a week or a month, from records only: deliveries with the grade an independent review STATED (a report naming two grades is reported ambiguous, never guessed), registry publishes from a cache, gate verdicts, knowledge reuse. --quarter/--half-year/--year are recognised and REFUSED with the real span in days; contaminated measures (commit count, lines, tokens, inventory counts) are not computed and the report says so (--day/--week/--month, --at <ISO>, --refresh-publishes, --json)
dz cadence The RHYTHM sibling of dz recap: graded shipments bucketed by ISO week, npm-publish cadence off the recap cache, guard repeat decay on the FIXED rule set (newborn rules excluded and listed), recall reuse. A window deeper than 2× the record is REFUSED with the measured depth and the largest honest window named (--window day|week|month|quarter|halfyear|year, --json)
dz qe-rounds How many Step-8 review rounds has this feature ALREADY had? Reads what dz qe-bridge already wrote and records nothing itself, so it answers for runs already past. A round is a runId, not a file; an attempt with no verdict is counted separately; ONE directory, never a union across checkouts. FAILS CLOSED — an uncountable record makes the answer NOT ESTABLISHED rather than a smaller number presented as the answer (--slug|--feature-dir, --ceiling, --json; exit 0 under / 1 at-or-over, the owner decides / 2 not established)
dz restart-advisor Manual, read-only advice over one feature’s QE-grade history. Defaults to threshold D for 2 adjacent trailing rounds; checkpoint and training-pair evidence must normalize identically when both are usable and is never unioned. A RESTART_CODE_STAGE result is operator data with autoAction:false, not a pipeline dispatch (--slug, --threshold C|D, --rounds, --json; exit 0 established / 2 invalid or not established / 1 unexpected runtime failure)
dz provenance-check Nothing goes out citing a source that may not leave this machine: every claim names its source, repo paths are classified by git’s own ignore rules over the RESOLVED path (a symlink into an ignored directory is refused), store records must be named in a git-tracked public list, and an undeclared kind is refused rather than guessed. exit 0/1/3 — an empty manifest or a failed oracle is never a pass (--manifest, --json)
dz name-check Is a name free before a line of code? Checks a command name, a module basename and exported identifiers against workspace SOURCE — never dist, since a stale build answers ‘free’ confidently — and names the declaring file. exit 0/1/2; an empty sweep is never a clean bill (--command, --module, --export, --json)
dz brief-check Does a swarm brief say WHERE its agent writes? Parses OUTPUT_DIR, UNITS and ASSEMBLY_UNIT as DATA and refuses by name. LIMIT, printed with every green answer: it verifies the brief DECLARED the contract, not that the agent will follow it. Measurement behind it: docs/incidents/33-background-agent-server-error-death.md — five of seven background agents died on one API error; only the one writing a file per finding kept its work.
dz tg-post Sender for an approved channel post, per the channel’s accepted ADRs: HTML only, preview off, the MSK quiet window, dry-run by default, the provenance gate in-process — and a real send needs --send --yes, stating the manual-publishing decision out loud (--draft, --manifest, --channel, --night, --json)
dz feature-adr-checkpoint Record a feature-adr pipeline stage, but only after MEASURING the artifacts it declared on disk. Refuses a null result (a dead stage is never recorded as done), an absent or partially-present artifact set, and a stage that declares nothing to witness. The workflow calls it after every expensive stage so a crashed run resumes instead of restarting; it exists as a command — rather than a line of shell — because handing a subagent a finished JSON line to append made the write indistinguishable from fabricated state, and a safety classifier blocked nine such writes in one run, silently killing resume.
dz reqe The re-QE debt ledger: a usage-switched feature-adr run whose Step-8 QE ran on the coder’s OWN family (cross-model guard suspended under limit pressure) records a debt; list debts (also surfaced by dz usage), print the cross-family review brief, settle FAIL-CLOSED against an existing graded report — the run’s own 08_qe_report.md can never settle its own debt (--slug, --done --report <f>, --json)
dz qe-bridge The REVERSE QE bridge: run an INDEPENDENT Claude reviewer over a feature’s Step-8 artifacts from ANY host — a Codex session included, plain shell, no Claude agent plane needed — and land a PARSED signoff. Probes the model before trusting it; sends SCOPED extracts under a loud 200 000-char ceiling (never silent truncation); the grade must AGREE across three LAST-anchored channels (terminal marker line, fenced qe-bridge-signoff JSON, the report’s own GRADE line), so quoted repo content can never mint a verdict and an empty or gradeless answer is a NAMED failure with a forensic record, never a clean review. Writes features/<slug>/08b_reqe_report.md, which dz reqe --done settles unchanged (--family claude, --slug, --coder-family, --model, --files, --out, --timeout, --allow-same-family, --json; exit 0 signoff parsed — ANY grade / 1 named failure / 2 usage). The reviewer runs ISOLATED — an empty temp cwd plus --safe-mode --strict-mcp-config --tools '' --no-session-persistence — and its verdict is read from the --output-format json result envelope, so text a customization printed onto the same stdout can never become a signoff
dz control-review ADR-001 cross-family-control-branch: two INDEPENDENT scoped reviews over the SAME tree — a Claude qe-bridge half, then a Codex round exec half — diffed for foreign-unique findings per severity. Automatic overlap is a LOWER BOUND (title-Jaccard>=0.5, or same file with |line delta|<=3); --adjudicate <file> overrides named pairs and marks confirmed non-matches. A git rev-parse HEAD + sha256 tree snapshot is taken before and after EACH half; any drift, or a half with no accepted findings table, refuses with NO ledger row written; a written row is trusted only after being reread from the ledger (--slug, --files, --brief, --coder-family, --codex-model, --effort, --claude-model, --timeout-min, --adjudicate, --json; exit 0 written+verified / 1 refused / 2 usage / 3 written-but-not-reread)
dz backlog Brain-backed idea inbox: add → semantic dedup + goal alignment; roulette picks the next idea; enrich stages an idea2prd hand-off; jira via a configurable MCP adapter seam
dz guard check --op <op> Declarative HARD/SOFT constraints before self-mutating ops; auto pre-flight in dz publish
dz guard promote Lesson → guard-rule promotion: ranks lessons by firings × cost, reduces each to a fixed rule template (pairing/absence/format — rule code is never synthesised from lesson text), SHADOW-replays it over real commits, and proposes only after TWO consecutive wins and two window-lengths of REAL elapsed time since first observation (zero firings resets the counter; a thin window is skipped, never a loss; commit dates are author-supplied, so elapsed time is gated by the local clock in .dz/promotion-state.json). Proposes by default (--dry-run writes nothing — and so never starts that clock; --apply installs it SOFT, a promoted rule can never block, and a same-id/different-body clash exits 1 as a CONFLICT); promotions and refusals both recorded as mini-ADRs
dz drift-check Byte-drift sweep between canonical skills and their installed copies
dz agents-sync Projects the repository’s bearing rules — the ones marked <!-- dz:policy id=… --> in CLAUDE.md and .claude/rules/*.md — into a dz:policies fence in the root AGENTS.md, so a runtime that reads only AGENTS.md (Codex and friends) starts with them instead of guessing. Each section is emitted VERBATIM with a 12-hex source hash; --check RECOMPUTES that hash from the source, so editing a rule without re-syncing goes red in CI. Byte-budgeted against the MEASURED 32 768 B Codex project-doc cap (over budget fails loudly, never truncates). Exit 0 in sync/written · 1 drift or over budget · 3 inconclusive — unreadable sources are never a pass (--project, --check, --json)
dz hooks-sync Installs the dz veto + auto-recall hooks into the user-global $CODEX_HOME/hooks.json and arms them: Codex hooks are trust-gated, so a written entry is silently never run until trust is recorded per entry in config.toml — dz reads codex’s own hooks/list for the key and hash rather than computing them. Foreign entries are preserved byte-for-byte; a backup is taken before each modifying write (newest 3 kept); the write is atomic. The PreToolUse veto ships ONE rule (ssh-explicit-auth-weakening) that warns by default and never blocks — enforcement is per-project opt-in via .dz/config.json → {"hooks":{"shellVeto":"block"}}. An install-time liveness self-probe through $SHELL -lc refuses to grade an entry that exits 127 (which the runtime reads as ALLOW) as installed. --remove deletes only manifest-attributed entries. Exit 0 armed and trusted · 1 not armed / drift / refusal · 3 inconclusive, including no codex binary — where dz writes nothing (--target codex, --check, --remove, --json)
dz sync-canonical <skill> Push a canonical skill edit out to all derived copies
dz routing Learned cost-optimal model routing stats for pipeline stages
dz usage Session/weekly token usage estimates against configured limits
dz usage --by-stage Per-stage cost ledger for ONE feature-adr run — an itemized receipt instead of one number — plus the reconciliation invariant (accounted + unaccounted = run total, mismatches are NAMED defects). Verdicts: BALANCED / DEFECT / INSUFFICIENT_DATA. Totals are LOCAL transcript ESTIMATES, so it catches attribution errors, not pricing errors. Реестр расходов по стадиям: детализированный счёт вместо одного числа + инвариант сверки
Terminal window
# Benchmark a skill (19 L0 checks, Grade A-F)
dz benchmark .claude/skills/pr-review
# Benchmark all skills in a directory
dz benchmark --all
# A/B compare two skill versions
dz benchmark .claude/skills/pr-review --compare ./pr-review-v2
# Pre-train on current codebase
dz pretrain
# Re-sync from canonical
dz sync
# Check upstream drift
dz sync-upstream --all
# Launch dashboard
dz dashboard
Command Description
dz publish Automated bump + build + npm publish (--dry-run, --filter, --bump-only)
dz bundle Emit minimal self-contained skill bundles (SKILL.md + references/scripts/assets, no dz-internal schemas/evals) for a generic consumer — e.g. a LangGraph app. --preset/--select, --out <dir>
dz list List all installed skills
dz info <skill-id> Show details for a single installed skill
dz release Verified release: 4 HARD gates (tests, prod audit, dist syntax, bin smoke-boot) in front of dz publish
dz sign Ed25519-sign a pack (.dz-manifest.json + CycloneDX sbom.json); --init generates a keypair outside the repo
dz profile Who is being talked to: a per-user register (pro / pro-lite / plain) plus deep domains (full pro, no scaffolding) and weak domains (one plain sentence every time, mandatory there). Stored at ~/.dz/profile.json (0600, never in a project), delivered as a marked block in ~/.claude/CLAUDE.md so it loads in every project on the machine. Three rules the register can never override travel with it: an explanation is self-contained, it governs dialogue but never ADRs/commits/QE reports, and it changes form, never facts
dz sbom Emit a standalone CycloneDX Software Bill of Materials for a pack
dz verify-pack Signature check of a pack — fail-closed; the trust root comes from the repo, never from the pack being verified
Terminal window
# List installed skills
dz list
# Inspect one skill
dz info pr-review
# Publish (dry-run preview)
dz publish --dry-run
# Publish a specific package
dz publish --filter @dzhechkov/skills-devops

Different commands accept different flags — there are no truly global options. Frequently used ones include:

  • --target <name> — target an agent platform (claude-code, codex, opencode, hermes, openclaude); used by init, setup, verify, compose, upgrade, install
  • --preset <name> — choose a preset bundle; used by init and setup
  • --dry-run — preview without applying; used by sync, publish, workflow
  • --force — overwrite existing files; used by init, setup, sync, import-ecc

dz help is a built-in, not a command: it prints the same USAGE and is handled before the dispatch switch, so dz --help lists 96 names while the canonical inventory above holds 95 (ADR-001 of feature command-count-triad).