Introduction¶
In DeepSeek Harness (DSH) use cases, long-running tasks continuously generate logs, code, and intermediate files. These files accumulate on disk. Although they do not directly consume tokens, they expand the search space, leading to more tool calls, contextual noise, and reasoning costs, ultimately reducing reasoning performance. How to automatically manage these intermediate artifacts and keep the workspace clear is a current problem to solve.
dsh-workspace-hygiene addresses these three questions: what files to keep, how to name them, and how to organize them, with a preliminary solution.
Plugin Positioning¶
dsh-workspace-hygiene is a DeepSeek Harness plugin for agent workspace hygiene: artifact value assessment, metadata indexing, and auditable cleanup.
Maintainer: taoshi1999
Category: Workflow
License: MIT
Core value: Assess file value, provide directory structure and naming suggestions, reduce redundancy, and improve subsequent retrieval efficiency.
Core Features¶
The plugin primarily addresses lifecycle management of workspace files:
- Artifact value assessment: Determine whether a file is core task material, a final deliverable, a reusable intermediate result, a temporary debugging record, or discardable redundant output.
- Category management: Classify files into five categories: Protected / Valuable / Intermediate / Discardable / Uncertain.
- Two organization modes:
- Manual mode (default): A background process monitors file changes. Click Organize Workspace to generate a plan. The plan is executed after user confirmation.
- Automatic mode: Refresh the assessment after each main Agent turn. When the scan score falls below
cleanlinessThreshold(default: 80), submit suggestions to the hygiene-Agent on the right. The user can generate a detailed plan or reject the suggestions. Unchanged suggestions are suppressed.
- Visualization and interaction:
- In
dsh web, a new Workspace tab is added. The left side displays the directory tree and file categories, while the right side provides a dedicated hygiene-Agent conversation. - A CLI tool,
dsh-workspace-hygiene, is provided to assess file value and generate an organization plan.
- In
- Auditability: Separate assessment from action, preserve rollback capability, and prevent accidental deletion.
Usage Examples¶
View and Operate in DSH Web¶
- Open the DSH Web interface. Find the newly added Workspace tab after the Trajectory tab.
- The left side displays the directory structure of the current session workspace, file categories (Protected / Valuable / Intermediate / Discardable / Uncertain), and the cleanliness score.
- The right side provides a dedicated hygiene-Agent conversation. You can view the organization plan, review file actions, or request modifications here.
- Switch between Manual and Automatic organization modes at the top of the page. The selection is saved in the current session.
- Click Organize Workspace. The system generates an organization plan. After confirmation, it executes move or delete operations.
Use the Command-Line Tool¶
- Ensure the environment meets the dependency requirements.
- Run the
dsh-workspace-hygienecommand. - The tool scans the current session workspace, assesses file value, and outputs an organization plan.
Environment and Dependencies¶
The following conditions must be met to use this plugin:
- Node.js version:
^22.19.0or>=24.0.0is required. - DSH dependency:
@deepseek-ai/dsh-toolsis required. The version must satisfy>=0.1.1-rc.2or>=0.1.2-alpha.3. - Transport protocol: Depends on DSH’s Connection RPC transport.
- Session configuration: A session ID is required to determine the workspace root directory. The configuration can use
workspaceRootto anchor the deployment boundary.
Summary¶
dsh-workspace-hygiene helps developers maintain a clean and readable workspace through systematic assessment and organization processes, reduces unnecessary contextual noise, and improves agent reasoning efficiency in long-running tasks.