dsh-project-scaffold
September 12, 2026 · View on GitHub
DeepSeek Harness plugin: offline project scaffolding. Templates live in the plugin as
plain strings, so listing, planning, and previewing never touch the disk, the network,
or a subprocess. Writing to disk is opt-in and only happens when the caller passes an
explicit root.
Package: @qingshanjiluo/dsh-project-scaffold · Plugin name: dsh-project-scaffold · inject: ['tools']
Install
npx -y @deepseek-ai/dsh plugin --profile web add @qingshanjiluo/dsh-project-scaffold
Tools
| Tool | Arguments | Returns | Touches disk |
|---|---|---|---|
scaffold_list | query? — substring filter over names, descriptions, tags | count, templates[{name, description, tags, fileCount, requiredVars}], hint | no |
scaffold_plan | template, vars (JSON object, name required) | ok, template, project, fileCount, files[{path, content}], errors | no |
scaffold_preview | template, vars | ok, template, tree (indented, sized), fileCount, errors | no |
scaffold_write | template, vars, root?, overwrite? | ok, root, written[], skipped[], errors[] | only when root is provided |
Typical flow: scaffold_list → scaffold_plan (review or edit the returned bodies) →
scaffold_preview (structural check) → scaffold_write with a root to create the tree.
Without root, scaffold_write returns guidance instead of writing; existing files are
skipped unless overwrite is true.
Templates
node-lib, node-api, react-app, python-cli, go-cli, rust-cli, dsh-plugin.
Each accepts name (required) plus optional description and author; placeholders are
substituted in both file paths and bodies, and any placeholder left unsubstituted fails
the plan rather than shipping {{...}} into a file.
Configuration
| Field | Type | Default | Meaning |
|---|---|---|---|
maxFiles | number | 200 | Upper bound on files one plan/write may emit |
allowedWriteRoot | string | "" | When non-empty, scaffold_write refuses roots outside this directory; empty leaves the choice to the caller |
cordis.patch.yml installs the plugin with those defaults.
Development
npm install --no-audit --no-fund
npx tsc --noEmit
npm run build # lib/index.js + lib/index.d.ts
npx vitest run # 24 behavior tests, no disk, no network
node scripts/load-smoke.mjs
Unit tests drive the tools directly and swap the filesystem through the exported
useFileWriter() seam, so scaffold_write is covered without creating files.
License
MIT