rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:339006900/dsh-coding-discipline
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
An always-on coding-discipline layer for DeepSeek Harness. It does not add tools or call the model twice — it changes what the model is told to treat as acceptable work, on every step, and ships a longer protocol the model can load when a task deserves it.
Each rule names one failure mode that costs real time in long coding sessions:
| Rule | Failure it prevents |
|---|---|
ledger |
Constraints stated early ("don't touch the public API") get dropped 40 turns later |
proof |
"已完成 / 应该没问题" without a build or test run in that turn |
smallest-diff |
A 3-line change rewritten as a whole-file replacement, with unrelated churn |
hypothesis |
Guess-and-patch loops on linker/ABI/runtime bugs instead of a discriminating experiment |
no-invented-apis |
Plausible-looking flags, signatures and config keys that do not exist |
finish-migration |
Refactors that leave one call site on the old path |
evidence-over-agreeing |
Editing working code because the user said "this looks wrong" |
no-speculative-code |
Abstractions, parameters and defensive branches nobody asked for |
closing-shape |
Reports that celebrate instead of stating what changed, what ran, what is unverified |
Three ways, all require restarting DSH afterwards.
dsh plugin --profile desktop add dsh-coding-discipline
or from inside DSH: Settings → Plugins → Plugin Market, search
dsh-coding-discipline, install, restart.
Put this directory anywhere stable (it is linked, not copied):
C:\Users\<you>\Documents\deepseek-harness\default-workspace\dsh-coding-discipline
Add the dependency to ~/.dsh/profiles/desktop/package.json:
"dsh-coding-discipline": "link:C:/Users/<you>/Documents/deepseek-harness/default-workspace/dsh-coding-discipline"
Add it to the composition, same file, under dsh.profile.bundles:
"dsh-coding-discipline"
Install the link:
cd ~/.dsh/profiles/desktop && npx pnpm@11 install
Point the plugin manager at this directory as a local bundle; it writes the same two entries for you.
After restart, the section is part of every request. Either:
<coding_discipline> rules — it should quote them;node --test (22 tests, no DSH needed).If the app fails to start after install, remove the single "dsh-coding-discipline"
line from dsh.profile.bundles and restart — nothing else is touched.
Two ways to see whether the rules change anything, both reading the same
analysis over persisted session logs (~/.dsh/sessions/**/session.v4.jsonl.zstd):
# 1. a static page you can open from disk
node scripts/dashboard.mjs # -> ~/.dsh/plugin-data/dsh-coding-discipline/dashboard.html
# 2. the hosted route (needs the plugin loaded, i.e. after a restart)
open http://127.0.0.1:<dsh-port>/coding-discipline
What it measures:
| Metric | How it is computed |
|---|---|
| 改动-验证闭环率 | turns containing an edit/write tool call and a verification command in the same turn, over all editing turns |
| 无证据的完成声明 | turns whose closing message claims completion while no verification command ran that turn |
| 代价 | tool calls per turn, answer characters per turn |
Grouping is by turn, decided by whether that turn's system prompt contains
<coding_discipline> — not by date, so a session that started before the install
contributes its later turns to the treatment arm.
There is no randomisation and the baseline is your own history. The page says so in a banner and again in the method note; it answers "did the behaviour change", not "is the model better".
In ~/.dsh/profiles/desktop/cordis.patch.yml:
- id: coding-discipline
config:
enabled: true # false = unregister every contribution
order: 9500 # prompt order; runtime context sits at 10000+
promptSection: true # false = keep the skill only
skill: true # false = keep the prompt section only
compact: false # true = keep only proof / ledger / smallest-diff / hypothesis
extraRules: '' # deployment lines, appended in order
dropRules: [] # rule ids to omit, e.g. ['closing-shape']
dashboard: true # false = do not serve /coding-discipline
sessionsRoot: '' # '' = ~/.dsh/sessions; a path measures one workspace
Token cost: the full section is about 750 tokens per request; compact: true
cuts it to roughly 470.
src/prompt.js section text, settings normalization (pure, unit-tested)
src/skill.js bundled coding-discipline skill from SKILL.md
src/index.js cordis wiring: section + optional skill provider + route
src/sessions.js zstd-framed session log reader
src/analyze.js turn-level metrics, arm detection, daily series
src/report.js self-contained HTML for the dashboard
src/route.js page cache + HTTP handler for /coding-discipline
scripts/dashboard.mjs CLI: analyse every session, write the page
SKILL.md the long-form protocol (checklists, recipes, debugging ladder)
test/ 22 node:test cases, including a fake-context registration test
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。