DSH Flash Compact Preset: Token Efficiency Preset for Flash-Level Routing

Preface

In DSH plug-in configuration, agent presets can tune the tool surface, behavior constraints, and context-compaction strategy. LarryE135/dsh-flash-presets targets flash-tier routing, aiming to reduce tokens and steps while keeping comparable, rollback-able baselines. It provides two agent presets, flash-lean-ptc-v1 and flash-lean-ptc-v2, and is installed into a profile as a DSH bundle (dsh.bundle).

What Is This

LarryE135/dsh-flash-presets is an MIT-licensed DSH plug-in, currently at version v0.2.0. It is not a runtime code plug-in but a patch-only bundle: it has no main / prepare, and adds presets to the target profile via patch bundles.

The package contains two presets:

  • flash-lean-ptc-v2: current recommendation, 12 hard behavior constraints, compaction threshold 0.25 / retain 20k.
  • flash-lean-ptc-v1: baseline and rollback, 14 hard constraints, compaction threshold 0.3 / retain 50k.

Both presets use the PTC tool surface: tools are called programmatically through run_code. flash-lean-ptc-v2 adds a step budget, “think less, try more”, verify in one merged run, ship the minimum viable artifact first, and PTC packaging guidance to its constraints.

Core Capabilities

Reduce Tokens and Steps

The presets use a card budget and additional hard constraints to prevent the model from going on a big-thinking spree, and to reduce tokens and steps. They also modify compaction logic to mitigate attention decay in long sessions.

Effects and Boundaries

  • flash-lean-ptc-v2 is the current recommendation.
  • flash-lean-ptc-v1 is for baseline comparison and rollback.
  • For very short tasks, gains are ≈0.
  • On harder problem sets, scores may drop: in the USACO 2026 Platinum two-round total, standard scores 51.5/80, 51.4M; lean·PTC scores 47.5/80, 48.0M.

Install and Enable

First ensure DSH is available and Node is on PATH. Taking the web profile as an example, the install command is:

dsh plugin --profile web add github:LarryE135/dsh-flash-presets

Here, --profile can be replaced to match the target environment; available values include web, desktop, headless, and acp.

The installer selects the write method based on the DSH version:

  • DSH ≥ 0.1.7-rc.1: uses plug-in line mode; presets are installed via profile plugin lines.
  • DSH < 0.1.7: uses directory mode.

Changes take effect immediately for the web profile; other profiles require a restart.

The patch includes disabled: !!js process.platform === 'win32'. This is a DSH loader tag; third-party YAML parsers may report an unknown tag.

Manual Install

If you do not want to use the DSH plug-in manager directly, you can clone the repository and run the scripts.

git clone https://github.com/LarryE135/dsh-flash-presets.git && cd dsh-flash-presets

Linux / macOS / WSL / Git Bash:

bash scripts/install.sh --profile headless
bash scripts/install.sh --legacy
bash scripts/install.sh --uninstall
DSH_HOME=/path/to/.dsh bash scripts/install.sh

Windows PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install.ps1
.\scripts\install.ps1 -Profile headless
.\scripts\install.ps1 -Legacy
.\scripts\install.ps1 -Uninstall
.\scripts\install.ps1 -DshHome D:\tmp\.dsh

These scripts are for install, forcing the legacy directory mode, uninstall, or specifying the DSH home directory.

Verify

After installation, you can run the repository’s verification scripts:

node scripts/verify-presets.mjs
node scripts/verify-yaml.mjs
bash scripts/selftest.sh
node scripts/check-ps1.mjs

You can also directly check whether the target preset appears in the DSH configuration:

dsh --profile web --dump-config | grep -A3 'id: preset-flash-lean-ptc-v2'

After installation, Flash lean·PTC v1 (v4.1-flash) and Flash lean·PTC v2 (v4.1-flash) will appear in the presets list.

Uninstall

If you no longer need it, remove dsh.profile.bundles and the dependency from the profile’s package.json and reinstall, or use the plug-in manager’s remove subcommand.

Use Cases and Notes

  • Suitable for tasks under flash-tier routing where you want to control tokens and steps.
  • flash-lean-ptc-v2 is for everyday use; flash-lean-ptc-v1 is for comparison and rollback.
  • For very short tasks, gains are ≈0.
  • High-difficulty tasks may score lower; evaluate against real scoring and cost.
  • This plug-in runs with the permissions of the current DSH process. Review the source, patch contents, and MIT license before installing.
  • Running the install scripts requires Node on PATH.

Closing

The value of LarryE135/dsh-flash-presets is splitting token-efficiency tuning into two comparable, rollback-able presets and installing them into profiles as DSH bundles. The known repository URL is:

https://github.com/LarryE135/dsh-flash-presets
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye