DeepSeek Harness plugin

dsh-ci-doctor

CI doctor plugin for DeepSeek Harness: watch GitHub Actions failures, diagnose logs into structured findings, and drive the fix loop

Jump to install

Source facts

Repository
jkrandom-sudo/dsh-ci-doctor
Latest update
Aug 14, 2026
Category
Tools & Capabilities
GitHub stars
3
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/jkrandom-sudo/dsh-ci-doctor
Plugin: dsh-ci-doctor
Author: jkrandom-sudo

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-ci-doctor

中文 · npm · DeepSeek Harness

CI failure, diagnosed before you even open the logs. dsh-ci-doctor watches GitHub Actions for new failures, turns raw job logs into structured findings — normalized error signatures, failure categories, suspect files, trimmed log excerpts — and remembers every signature it has ever seen, so repeat failures are called out on sight. All through two agent tools and the gh CLI you already have authenticated.

Usage

Just ask your agent in plain language — it picks the right tool:

  • _"Watch CI on this repo and tell me when something fails"_ → starts a ci_watch background job.
  • _"Why did the nightly build fail?"_ → runs ci_diagnose on the latest failed run and hands you the diagnosis card.
  • _"Diagnose run 31782742089 on cli/cli"_ → targeted diagnosis of one specific run.

You get a markdown diagnosis card straight in the chat:

## CI diagnosis: cli/cli run #31782742089

**Conclusion:** failure · [run](https://github.com/cli/cli/actions/runs/31782742089)

### Job: Issue Triage (skills-driven)

**Failed steps:** triage
**Signatures:**

- `81a0edf32878` (timeout, first time seen) — server:http_server Session timeout configured…
  **Suspect files:** `script/triage.ts`

<details><summary>Log excerpt</summary>
…
</details>

What it does

1. Watch — the ci_watch tool. Starts a background job that polls for _new_ failed runs (the first poll sets a baseline, so historical red runs never fire the alarm):

{ "repo": "owner/name", "branch": "main", "intervalSeconds": 30, "timeoutMinutes": 60 }
  • Streams status lines you can read any time; cancel any time.
  • Backs off exponentially on transient errors, gives up after 5 consecutive failures, fails immediately on auth errors.
  • On detection it settles with a ready-made next step: call ci_diagnose with repo="…" runId=….
  • Watch a repo explicitly, or omit repo to watch the current working directory's repository.

2. Diagnose — the ci_diagnose tool. Point it at a run (or the latest failed run) and it returns the card shown above:

{ "repo": "owner/name", "runId": 31782742089 }
  • Error signatures are normalized (timestamps, hex ids, and numbers masked) so the _same_ failure gets the _same_ id across runs.
  • Each signature is classified: test / build / lint / typecheck / dependency / network / permission / timeout / infra.
  • Suspect files are mined from the log, vendor paths dropped.
  • Log excerpts are trimmed to a budget with honest … (skipped N lines) … markers — content is never invented.

3. The failure-signature ledger. Every diagnosed signature is remembered — how many times seen, first/last sighting, last repo and run URL. Repeat failures surface as seen 3× in the report instead of pretending to be new. The ledger persists as a ci_doctor storage unit in the DSH storage directory when the profile provides a storage domain; it is in-memory otherwise.

Read-only by contract

Both tools only ever _read_ GitHub state (via gh api). They never push, merge, cancel, rerun, or write anything to your repositories. Every result carries a repositoryWrites: false marker, and the package ships an optional invariant companion (dsh-ci-doctor/invariant) that fails loudly if a result ever loses that marker on hosts with an invariants service.

Install

dsh plugin --profile web add dsh-ci-doctor

Prerequisites: the GitHub CLI authenticated (gh auth login) — the plugin reuses that session, there is nothing else to configure.

Configuration

OptionDefaultMeaning
pollIntervalSeconds30Seconds between watch polls (min 5).
watchTimeoutMinutes60Wall-clock lifetime of one watch (min 1).
maxLogLines200Per-job log excerpt budget (min 20).
ghBinghGitHub CLI executable.
ledgerEnabledtrueRecord signatures into the ledger.

How it works

The plugin speaks to the host only through documented Cordis seams and imports no @deepseek-ai/* package:

  • tools — registers ci_watch / ci_diagnose on the real tool runtime.
  • jobsci_watch runs as a first-class streaming background job, owned by the calling agent.
  • shell — every gh call goes through the host's guarded, sandboxed execution pipeline.
  • storageDomain — the signature ledger persists as the ci_doctor storage unit.

Development

pnpm install
pnpm typecheck && pnpm test && pnpm build   # types, unit tests, bundle
pnpm format:check                           # Prettier

License

MIT