Introduction¶
DeepSeek Harness (DSH) supports functional extensions through a plugin-based architecture. In the context of autonomous coding agents, distinguishing between “who specifies the work” and “who executes the work” is central to risk control. This plugin enforces this separation through technical means, preventing planners from directly writing code, and leaves immutable audit records in the Git repository.
What It Is¶
dsh-plugin-coding-delegate is a DSH plugin maintained by jjmlovesgit. It decouples the workflow into two roles: an Architect (responsible for design, task decomposition, and writing contracts) and an Executor (responsible for running code in a local sandbox and returning verification results). The plugin intercepts operations before code is written via tool-call hooks and provides repository-native attestation based on Ed25519 dual signing.
Core Features¶
- Execution Boundary Isolation: The Architect (metered model) has no write tools or Shell permissions and cannot modify host machine code; the Executor only runs within a controlled sandbox.
- Anti-Self-Approval Mechanism: Requires the use of two different keys (dual principals) and rejects self-approval using the same key.
- Repository-Native Attestation: Uses Git Notes (
refs/notes/delegations) to store Ed25519 dual-signing records, which include execution receipts and human review approvals. - Hash-Bound Promotion: The Executor runs in a local sandbox and gains promotion privileges through a hash-binding mechanism.
Installation and Activation¶
The plugin is included in the plugin/dist directory of the repository. Because the gate and signing tools are intentionally placed in the checkout directory rather than the npm package, the relevant scripts must be run directly from the code repository.
Typical Usage¶
Running Audits and Tests¶
Execute the following commands in the root directory of the cloned repository:
npm run gate # Run all seven commands (eight tools), offline verification
node scripts/verify-delegation-ledger.cjs # Audit the ledger only
node scripts/redteam-probe.cjs # Test ten attack classes and verify boundary effectiveness
Contract Workflow Example¶
The plugin provides two-phase commands to handle the workflow:
- Preparation Phase: Run the contract and stage a draft.
--prepare <target> <contract>
- Approval Phase: Add a reviewer block and finalize confirmation.
--approve <target> --reviewer-identity "<name>"
Applicable Scenarios and Precautions¶
- Key Requirements: The two key fingerprints must be different; otherwise, approval is rejected.
- Separation of Operations: Approval is a separate, human-driven, two-phase behavior; the plugin path cannot sign human declarations.
- Audit Blind Spots: Git notes can be edited, re-attached, or deleted, and even refs can be force-pushed. Audits cannot detect records that have already been deleted.
- Permission Restrictions: The metered model has no write tools or Shell permissions.
Summary¶
By introducing dual signing and execution boundaries into DSH, this plugin provides auditable governance controls for autonomous coding agents. It is suitable for scenarios that require enforcing approval workflows and code change auditing at the Git level.
GitHub: https://github.com/jjmlovesgit/dsh-plugin-coding-delegate