dsh-ci-diet
DiscoveredFind wasted GitHub Actions runner time and propose small, reviewable YAML patches.
CI Diet
Find wasted GitHub Actions runner time and propose small, reviewable patches.
Status: alpha, not published. The contracts, specification, analysis engine, patch engine, CLI, DSH plugin tools, and a self-contained HTML report are implemented and tested. The DSH Web client screens and the npm release are still open.
What it will do
CI Diet reads two things and compares them:
- Workflow YAML from the current working tree.
- Optionally, execution history fetched with read-only
gh apicalls.
From that it reports where runner minutes are spent and which findings are
safe to turn into a small YAML edit. Every finding carries an evidence level
(observed, inferred, static) and a coverage state per rule.
| Rule | Finds | Plan in v0.1 |
|---|---|---|
| CD001 | PR runs superseded by a newer commit | patch: concurrency |
| CD002 | Overlapping triggers | explanation only |
| CD003 | Heavy checks on docs-only changes | explanation only |
| CD004 | Oversized matrices | explanation only |
| CD005 | Jobs without timeout-minutes | patch: timeout-minutes |
| CD008 | Long artifact retention | patch: retention-days |
The rule set is deliberately small. A rule ships only after it passes a quality gate measured on real repositories, because a noisy rule is worse than a missing one. CD003 and CD005 are implemented but disabled by default until that gate passes (see ADR-13).
What it will never do
- No commits, pushes, pull requests, or merges.
- No workflow runs, no cancelling running jobs, no deleting artifacts or caches.
- No branch protection changes.
- No write permission on GitHub. History access is read-only; a repository with no network access still gets the static scan.
- No LLM judging whether a job is wasteful.
- Patches are byte-range edits of the YAML you already have. You review the diff, approve it explicitly, and apply it to your working tree.
Honest numbers
Cost output keeps four separate values and never mixes them:
| Field | Meaning |
|---|---|
observedRunnerSeconds | What the run records actually say |
modeledRoundedMinutes | Per-job minutes, rounded up the way billing does |
listPriceUsd | Converted at the snapshot list price |
actualBilledUsd | Always null until we can prove otherwise |
Every report embeds the pricing snapshot it used (with a content hash), so a number can be reproduced later. If the snapshot cannot be verified, the report is not shipped.
Install
npm install --global dsh-ci-diet
dsh plugin --profile web add dsh-ci-diet
The plugin adds one disabled loader entry; enable networkEnabled only if you
want history sync. Until the first npm release, install from a packed tarball:
bun pm pack then dsh plugin --profile web add ./dsh-ci-diet-0.1.0.tgz.
Read a report
ci-diet report # text summary of the latest stored report
ci-diet report --format html --out report.html
ci-diet prune # drop expired reports, plans, and cache entries
The HTML file is self-contained: inline CSS, no scripts, no external requests. It is read-only, so approvals stay in the CLI where the digest and nonce checks live.
Requirements
- Node
^22.19.0 || >=24.0.0 ghCLI, optional, only for execution history- DSH
>=0.2.1-rc.2 <0.3.0, optional, only for the plugin tools
Development
bun install
node --test "tests/unit/*.test.ts"
node scripts/gen-types.mjs --check
node scripts/sync-contracts.mjs --check
bun run typecheck
bun run lint
bun run test:docs
Run the tests with Node so the published entry points stay Node-compatible; Bun is used for dependency management only.
Layout
src/core workflow parsing, rules, savings, patch engine
src/adapters github, git, storage
src/dsh host and client plugin code
src/cli command line entry
src/shared i18n and small shared helpers
contracts JSON Schemas, imported from the frozen design pack
examples sample records and evaluation vectors
docs/spec normative product specification
scripts contract and documentation checks
tests/unit fast checks that need no network
Languages
English is the default and the source of truth for message keys. Korean is fully translated. Simplified Chinese is a translation slot that falls back to English until someone maintains it. Public documentation is English, with a Korean README mirror.
Documentation
- Specification: docs/spec/README.md
- Rules: docs/spec/rules.md
- Cost model: docs/spec/cost-model.md
- Patch model: docs/spec/patch-model.md
- Storage and errors: docs/spec/storage.md
- Decisions: docs/spec/decisions.md
- Measurement: docs/spikes/a0a-rules.md
- Plugin and CLI guide: docs/guide/plugin.md
- Contract provenance: contracts/UPSTREAM.md
- Korean: README.ko.md
License
MIT
Comments
Loading…
Similar plugins
by 283Gawin
DSH Web GUI activity heatmap plugin: GitHub-style commit/token/spend heatmap in the sidebar with per-model cost estimation
★ 6
MIT
TypeScript
Aug 14, 2026
dsh plugin --profile web add @linxin666/dsh-client-ui-activity-heatmapby pauloapoloni
DSH plugin: status and progress of GitHub Actions checks for open PRs, in the sidebar footer.
★ 0
MIT
JavaScript
Aug 26, 2026
dsh plugin --profile web add dsh-pr-checksby Angel-GP
GitHub panel for DeepSeek Harness: Actions runs, Commits & Releases side by side, right in your DSH session
★ 0
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add @angel-gp/dsh-client-ui-gitpeekby awesome-dsh-plugin
Find DSH plugins inside the agent — live GitHub dsh-plugin topic search, star-ranked / 会话内搜索发现 DSH 插件
★ 200
MIT
TypeScript
Sep 25, 2026
dsh plugin --profile agent add dsh-find-pluginby PerryLink
Official-grade GitHub CI for DeepSeek Harness: composite action.yml, PR review bot with idempotent inline comments and a status-check gate, plus PR/issues tools with every write gated by human approva
★ 24
↓ 298/wk
Apache-2.0
TypeScript
Oct 20, 2026
dsh plugin --profile web add @perrylink/dsh-githubby Olympianz
A DSH deploy-assistant plugin: GitHub publish + Linear sync + npm publish + community announcement.
★ 0
MIT
TypeScript
Aug 30, 2026
dsh plugin --profile web add dsh-deploy-master