deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
A disk-persisted execution-planning plugin: it stores the plan, execution state, field notes, and debrief of multi-step tasks entirely in the workspace .trail/ directory. Interrupted sessions, context compression, or restarting in a new session won't lose your bearings — just read the state and continue after resuming.
todo → in progress → done (cancellable/revivable); steps whose dependencies are unmet are automatically marked "blocked"; milestones and plan status derive from steps, no manual bookkeeping.start is gated by dependencies; circular dependencies are detected and blocked.check verifies all steps are closed and the structure is sound, preventing "thought it was done".trailmap_*), a standalone CLI (trail), and a skill (SKILL.md), all sharing one core.node bin/trail.js init "Add regression tests to the toolchain" --kind blank
node bin/trail.js status
node bin/trail.js start m1-1
# …do the work…
node bin/trail.js finish m1-1
node bin/trail.js check # completion gate (passes once the step is closed)
node bin/trail.js debrief --close # debrief + archive
(--kind blank keeps a single step so the whole loop runs end to end; --kind build
generates the full milestone skeleton — see the command reference and docs/format.md.)
(Or npm link and use the trail command directly; the TRAILMAP_DIR environment variable selects the workspace, defaulting to the current directory.)
dsh plugin --profile demo add github:JohnXu22786/file-planning
dsh plugin --profile demo add ./file-planning
dsh --profile demo --dump-config # should show the dsh-plugin-trailmap patch layer
dsh --profile demo
The harness inserts the plugin line via cordis.patch.yml; Cordis injects ctx.tools and registers all tools; the model can then call trailmap_* to create plans, advance, and debrief end to end. The skill lives in skill/trailmap/. See docs/integration.md.
<workspace>/.trail/
├── map.json # single source of truth (plan + state + audit events)
├── map.md # rendered view: status lines / next steps / checklists
├── fieldnotes.md # field notes
├── journal.md # trip log
├── debrief.md # debrief notes
├── .active # active plan pointer (multi-plan)
└── plans/<alias>/ # parallel plans
.trail/ is excluded from version control by default. File format and state machine are documented in docs/format.md.
| Command | Purpose |
|---|---|
trail init <goal> [--kind …] [--name alias] |
Create a trail (template skeleton + dependency wiring) |
trail status [--history] [--json] |
Status overview |
trail start/finish/drop/reopen <stepId> |
Step state machine (drop requires --reason) |
trail amend … |
Amend the plan structure mid-flight |
trail note <text> [--section name] |
Field notes |
trail journal <text> |
Trip log |
trail check [--json] |
Completion gate (exit code 1 on failure; --json mode always exits 0, rely on the ok field) |
trail debrief [--close] / trail close |
Debrief (+archive) |
trail render |
Regenerate the view after hand-editing map.json |
trail plans / switch <alias> / switch root |
Multi-plan management |
node --test # all unit tests (Node's built-in test runner, zero dependencies)
lib/machine.js: pure state machine (transitions/derivation/validation/cycle detection)lib/ops.js: operation layer (shared by the CLI and the dsh adapter)adapter/index.js: dsh tool plugin entryscripts/adapter-smoke.mjs: smoke test against the real @deepseek-ai/dsh-tools.
To run: create a temp directory, npm init -y && npm pkg set type=module,
npm i @deepseek-ai/dsh-tools @deepseek-ai/cordis, copy this script to the temp directory root,
also copy the lib/ and adapter/ directories over, then run node adapter-smoke.mjsfile-planning/
├── adapter/ # dsh plugin entry (Cordis plugin)
├── lib/ # core library (zero deps): machine/store/render/templates/ops/cli
├── bin/trail.js # CLI entry
├── skill/trailmap/ # skill (SKILL.md)
├── scripts/ # smoke test scripts
├── test/ # unit tests (node --test)
├── docs/ # integration docs / file format conventions
├── examples/ # example workspaces (fully executed trails)
├── cordis.patch.yml # bundle patch layer
└── package.json # bundle manifest (dsh.bundle)
MIT, see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。