Introduction¶
DeepSeek Harness (DSH) provides low-level capabilities such as model routing, sandboxes, and sub-agent registries. When building complex workflows in practice, common problems include chaotic state management, difficulty auditing, and uncontrollable execution. dsh-humanize is an agent preset that natively ports the discipline of “building around flows” into DSH’s agent environment.
The plugin is maintained by Guard42 and aims to implement the validation principle “Lean accepts it, or it does not” through stage graphs, locking mechanisms, review gates, and event replay.
Core Mechanisms¶
Below are the core capabilities provided by dsh-humanize:
-
Multi-stage objectives and judge commands
Converts multi-stage objectives into an explicit flow—a stage graph. Each stage has judge commands attached, and the stage is considered valid only when the judge command’s exit code is 0. -
Flow locks and tamper prevention
Generates immutable locks using semantic normalization + SHA-256, in the formatflk_<digest>. The system revalidates the lock’s hash value at load time to prevent file tampering. -
HMAC review gate
Binds HMAC signatures to front-load the review process.approved,rejected, andbypassedare immutable terminal states. If rejected, the reason returns to the draft for the agent to resubmit. -
Event replay recovery
events.l(append-only) is the single source of truth. After interruption, useflow_resumeto continue from replay, and completed stages are never rerun. -
Execution traces
Every run leaves a trace, supporting export of a Markdown timeline or Chrome-JSON importable intoui.perfetto.dev. -
Hash-anchored editing
Before performing a literal replacement, verifies the SHA-256 anchor of the entire file. This eliminates the risk of “editing the wrong file based on memory.”
Installation¶
Use the official command to install with one click:
dsh plugin --profile web add github:Guard42/dsh-humanize
After installation, restart DSH and select 「Humanize Mode」 in the preset selector.
Note: This repository declares the dsh.bundle manifest and includes an installer bridge. Directly running dsh plugin add against a repository that contains only preset files will not activate it.
Typical Usage¶
Assume you need to migrate a test suite from Jest to Vitest. The process is as follows:
- Agent drafting:
flow_draftgenerates three stages: migrate configuration → full replacement → all tests passing gate. - Structural validation:
flow_checkchecks the structure to ensure zero errors. - Generate lock:
flow_lockgenerates a normalized + SHA-256 lock and obtainsflk_xxxxxxxx. - Generate review:
flow_review_preparegeneratesreview.mdfor your review. - Decision and execution: You issue
approve, the agent executesflow_run, sub-agents in each stage perform the work, and judge commands guard the gate. - Recovery: If the run is interrupted, run
flow_resumeto continue from the replay inevents.l.
15 Model Tools¶
The plugin provides 15 model tools, including:
flow_draft: Write a complete FlowDraftflow_check: Structural validation, producing diagnosticsflow_lock: Generate an immutable lockflow_list: List all flows in the workspaceflow_show: Render a flow as a readable graphflow_review_prepare: Generate review bindings and review.mdflow_review_decide: The only decision tool (approved/rejected/bypassed)flow_run: Schedule ready nodesflow_status: Replay the status of a single runflow_resume: Recover after interruptionflow_stop: Cancel a runtrace_export: Export trace (md / chrome-json / jsonl)edit_anchored: Hash-anchored editinghash_file: Calculate file SHA-256model_catalog: List available provider routing and models
Notes and Design Red Lines¶
- Zero npm dependencies: The implementation relies only on
node:built-in modules. - No official relationship: This is an independent community open-source project and has no affiliation, collaboration, authorization, or endorsement relationship with DeepSeek or the humanfia team.
- Permission issues: If installation or synchronization fails with
ACCESS_DENIED, the target directory is likely covered by antivirus/HIPS file protection. - Customization: Supports adding new domain-variant tools to
humanizemode via requests and saving them as independent presets.
Conclusion¶
dsh-humanize provides rigorous execution discipline for DeepSeek Harness agents through flow locks, review gates, and event replay mechanisms. If you need to build highly reliable, auditable workflows, this plugin is a tool worth trying.