dsh-ai-armor: Armor for Five Categories of Production Issues After AI Code Generation

Introduction

When having agents modify code in DSH, the common bottleneck isn’t whether they “can generate a diff” — it’s the verification afterward: pasting a stack trace but still needing frame-by-frame read_file, piecing together git bisect for regressions, YAML failing to parse because of a single tab, incorrect shell quoting on Windows, or MyBatis Plus N+1 queries silently dragging down the database. These steps often consume multiple tool slots and require separate plugins and separate review passes.

Below is a community plugin: dsh-ai-armor (maintainer AAAlenwow). It packages five categories of “may-blow-up-right-after-writing” capabilities into one bundle with 8 tool slots, callable from the agent side after a single installation. Directory page: skillhub.cn/plugins/AAAlenwow/dsh-ai-armor; source code and documentation: github.com/AAAlenwow/dsh-ai-armor.

What Is This

dsh-ai-armor is a plugin package for DeepSeek Harness (package.json version 0.1.0, license MIT). It aggregates five sub-plugins focused on local assistance at the moment “right after AI writes code”: it does not execute business code, does not initiate network requests, and does not automatically modify the repository — it only returns findings and suggestions, leaving fixes to humans or agents.

The DSH ecosystem is “everything is a plugin”; SkillHub serves as a community directory with no official affiliation to DeepSeek or 幻方. Before installing, review the repository source code and license yourself; plugins run with the current dsh process permissions (they may read files and call child_process to run git and other local commands).

Compatibility (from package.json): dsh >=0.1.7-alpha.1, profile web.

Core Features: Five Sub-plugins, Eight Tools

Sub-plugin Tools Problem Addressed
dsh-when-broke when_broke_find_introducer, when_broke_recent_changes, when_broke_bisect_with_repro, when_broke_blame_age Which commit the code came from, who recently modified a file, which commit introduced a bug, whether a line is newly written
dsh-stackdecoder decode_stack Parses stack trace text into per-frame file:line and context snippets at once
dsh-config-guard validate_config After modifying application.yml / .env / .properties, checks for duplicate keys, tab indentation, key name errors, missing required fields
dsh-cmd-shield build_shell_invocation Generates escaped shell invocations according to POSIX / PowerShell / cmd rules, mitigating issues with quoting, $, CJK characters, and paths with spaces
dsh-mp-auditor audit_mp_code Scans MyBatis Plus projects for N+1 queries, missing @Transactional, LIKE '%xxx%', SELECT *, UPDATE/DELETE without WHERE, etc.

In implementation, each tool is purely local: it uses only Node.js built-in fs / path / child_process / crypto, and the README states no third-party npm dependencies. Typical latencies from the README are provided for reference (e.g., decode_stack is about <1ms per frame, when_broke_bisect_with_repro is about 1–60s depending on the repro).

Out of scope (per the README): it does not replace IDE static analysis; it does not automatically fix things for you; the bundle and standalone sub-repos of the same name should not be installed simultaneously (tool IDs will conflict).

Installation and Activation

Install the full bundle (official command):

dsh plugin add AAAlenwow/dsh-ai-armor

If you only need one category of capability, you can install the corresponding sub-plugin individually (each with 1 or 4 tools):

dsh plugin add AAAlenwow/dsh-when-broke
dsh plugin add AAAlenwow/dsh-stackdecoder
dsh plugin add AAAlenwow/dsh-config-guard
dsh plugin add AAAlenwow/dsh-cmd-shield
dsh plugin add AAAlenwow/dsh-mp-auditor

The README also mentions local linking via git clone followed by pnpm link --global (or npm link); this is mutually exclusive with dsh plugin add — choose based on your release workflow.

After installation, the agent calls the tool names listed in the table above according to the scenario within DSH conversations; no additional configuration fields are required (the documentation does not list any standalone configuration file).

Typical Usage (by Scenario)

The documentation does not provide complete conversation examples; usage corresponds to the problem–tool mapping in the README and can be mounted in agent workflows in the following order:

  1. Runtime exception / test failure: first use decode_stack to resolve the stack trace into local line numbers; then use when_broke_recent_changes or when_broke_find_introducer to trace the source of changes; when regression isolation is needed, use when_broke_bisect_with_repro (requires reproducible steps); when_broke_blame_age can be used to check whether a single line is old or new.
  2. Startup failure after config changes: call validate_config for a YAML/ENV/properties self-check before committing or restarting.
  3. Agent needs to run shell commands: use build_shell_invocation to generate a platform-safe invocation string before actually executing.
  4. Java + MyBatis Plus changes: run audit_mp_code once to scan SQL/transaction risks before merging.

To verify that the bundle loads successfully, run the smoke test from the README in the repository root directory:

cd tests && node run.mjs

Expected output: ✅ All 8 expected tools registered. Bundle is loadable.

Each sub-plugin also has a test harness at cd plugins/<name>/tests && node run.mjs.

Use Cases and Caveats

Suitable for: teams or individuals developing agents under the DSH web profile who want to reduce review rounds while covering git / stack trace / config / shell / MP audit needs at the “right after writing code” stage. It is also worth considering for intranet environments — the tools have no external network dependencies.

Notes:

  • Permissions and trust: plugins read project files; when_broke_* and bisect involve git operations with permissions equivalent to the user running dsh.
  • Installation scope: do not install the bundle and standalone plugins with the same name redundantly.
  • Capability boundaries: it only reports problems and suggestions, not automatic fixes; deep static analysis should still rely primarily on IDE and CI.

Conclusion

dsh-ai-armor consolidates five types of high-frequency “last mile after AI modification” concerns into a single MIT-licensed plugin package, and a single official dsh plugin add AAAlenwow/dsh-ai-armor command registers 8 tools. For details on each item, open the README of each subdirectory or the standalone repository.

  • Directory page: https://www.skillhub.cn/plugins/AAAlenwow/dsh-ai-armor
  • GitHub: https://github.com/AAAlenwow/dsh-ai-armor
羽毛球分组比赛记分
小程序二维码

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

Xiaoye