rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Hubert-hwk/dsh-loop-doctor
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
中文 | English
A self-diagnosing plugin family for DeepSeek Harness (dsh): deterministic detour detection over the harness's own SessionEvent log, human-reviewable optimization suggestions with replay verification, and accepted-fix sediment that grows over time — the harness reading its own log to tell the operator where it wasted work.
Observation before advice, advice before writes, writes behind human review.
| Package | Plane | What it does |
|---|---|---|
@hubert-hwk/dsh-loop-doctor-detector |
Observation | Folds the session/event firehose into DetourSignals (retry storms, tool misuse, context thrash, prompt bloat, effect churn) — pure deterministic rules, no LLM. |
@hubert-hwk/dsh-loop-doctor-advisor |
Advice | Maps a signal to a Suggestion via a fix-pattern table and replay-verifies it against the exact log (replay-verified vs simulated, never conflated). |
@hubert-hwk/dsh-loop-doctor-apply |
Write | The only durable decisions: a human-review ledger, a narrow auto-apply gate (off by default), and accepted-fix sediment growth with live reload. |
@hubert-hwk/dsh-loop-doctor-tool |
Model surface | The loop_doctor_diagnose tool: an agent diagnosing its own session on demand. |
session log ──▶ detector ──▶ signal ──▶ advisor ──▶ suggestion + replay
│ │
│ ▼
│ apply: ledger (human)
│ │
▼ ▼
tool: loop_doctor_diagnose accepted-fix sediment
│
advisor reload ◀──────────┘
(next match injects the validated fix)
replay-verified; policy-cap arithmetic carries simulated and never drives auto-apply.pnpm install
pnpm run typecheck # tsc over the whole family
pnpm test # vitest — 140 tests across the four packages
The end-to-end keyless proof lives at examples/headless-agent/loop-doctor.cordis.snapshot.yml (three real detours, self-diagnosis twice, auto-apply + reload observed in-snapshot). It runs inside a full deepseek-harness checkout with the branch applied; see the Agent Note for the replay-fixture constraints.
pnpm add @hubert-hwk/dsh-loop-doctor-detector \
@hubert-hwk/dsh-loop-doctor-advisor \
@hubert-hwk/dsh-loop-doctor-apply \
@hubert-hwk/dsh-loop-doctor-tool
The four packages are designed to be mounted as plugins of a dsh host: wire the installed packages into your dsh plugin configuration. To run them from a source checkout of the harness instead, copy packages/loop-doctor/ into the harness workspace and rename the packages back to the upstream @hubert-hwk/dsh-loop-doctor-* names (or use the upstream feat/loop-doctor branch directly).
This family was authored as an upstream contribution to deepseek-ai/deepseek-harness (branch feat/loop-doctor, based on the official master). The upstream project currently does not accept external pull requests (see their CONTRIBUTING.md), so this repository exists as the public, community-visible home of the work:
@hubert-hwk/ because the @deepseek-ai/ npm scope is reserved for the official organization; inside the harness they carry the upstream names @hubert-hwk/dsh-loop-doctor-*..agents/notes/implemented/feature/2026-08-19-loop-doctor-self-diagnosis.md.dsh-plugin topic so the harness community can discover it.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: llm、deepseek-harness。