AI Action Translator: Adding a Layer of Explanation to Agent Actions

Introduction

Every time an Agent running in DeepSeek Harness (DSH) performs an action, it typically just returns the execution result. It’s hard for developers to tell what it actually did or why. This is especially unfriendly for people new to programming who can’t read command-line output, error messages, or jargon — let alone figure out whether it’s still possible to change course.

The AI Action Translator plugin solves exactly this problem: it translates the Agent’s observable actions (tool calls, file reads/writes, dependency installations, service startups, etc.) into plain language both before and after each step, while also highlighting what it would cost to change direction at that moment.

The plugin itself only does observation and prompt injection. It does not register tools, intercept anything, make network calls, read or write project files, nor does it claim to know the model’s hidden reasoning.

What It Is

This is a plugin that adds an “explanation layer” to DSH Agents. It doesn’t change the Agent’s execution logic — it simply translates its actions into beginner-friendly explanations: what was done, where a failure sits in the stack, what a given term means, and what options you still have to change direction.

The second question is one that many people never voice explicitly but is always lurking: “The Agent is already running — can I still change my mind? What would it cost?”

The plugin marks “you can interrupt me now” at every verifiable micro-step, and explains the cost of changing direction at that moment: if no files have been written yet, the cost is zero; if files have already been written, a rollback from backup is needed. The power to decide always stays with you — the plugin just lays the options out in front of you.

Who It’s For

  • Beginners who are new to programming and can’t read command-line output or error messages
  • People who want to understand how AI Agents actually work
  • Instructors working with students on projects who need an “explainable process”

What It Does

Capability Description
Action Translation Before a tool call, explains “what will be done, why, and what’s affected”; after it returns, explains “what actually happened and what it means for the next step”
Step-by-Step Breakdown stepParse (on by default): breaks actions into numbered sub-steps, each identifying the tool used, the file touched, and the project layer involved
Action Timeline timeline (on by default): arranges tool calls chronologically into a read-only list with category, duration, and success/failure marks — appears only in the panel, not injected into prompts
Glossary Cards glossary (on by default): gives a one-liner explanation the first time a domain term appears; explains once, never repeats
Failure Case Library failureBook (on by default): archives errors by layer (auth / permission / path / dependency / network / service / syntax / test); logs one entry per category and increments a counter
Mid-run Intervention After each verifiable micro-step, marks “you can interrupt me now” and explains the minimum cost of changing direction at that point
Tiered Explanations knowledgeLevel has four tiers: plain (all plain language), guided (learn as you go), balanced (plain + terms + mechanics), deep (traces down to the call stack)
Project Map Locates every action on a fixed six-layer map: Entry/Boot point → Config & Dependencies → Core Modules → Tool/Service Boundary → Output/UI → Testing & Verification
Phase Summary After completing a verifiable sub-phase, summarizes in 2–4 sentences: “what was done / which map layer / what’s still unknown / next step”
Persona Voice persona lets you customize the narrator’s style (≤ 4000 chars); affects expression only, never facts or safety boundaries
Visual Configuration A graphical panel in the DSH settings page — changes take effect next round, no manual config file editing needed
Quick Presets Three one-click presets for the full parameter set: Complete Beginner / Has Basics / Deep Diver; presets only layer on top and never overwrite your custom persona
Dry Run Generates a real prompt paragraph using the current configuration and displays it in the panel — what you see is what the model gets next round
Export / Import Saves configuration as JSON for transferring to another machine, backing up, or sharing
Run Statistics Observed tool call count, sensitive-hit count, preview count, uptime
Pre-action Gate guardMode (default off): checks before an action executes whether it has a high-risk shape (recursive delete, shutdown, permission change, credential read, destructive git, system directory write, dependency install, service stop, outbound connection). warn only alerts without blocking; deny actually blocks and provides the exact wording for a temporary override
Multi-Agent Roster When sub-agents / teams are spawned in a session, each timeline entry is labeled “who did it”; the panel shows participant count, how many are still running, and action counts per agent
Persistent Sidebar Panel A new “Action Review” tab in the right sidebar: timeline, failure cases, and glossary cards are visible at a glance — no need to navigate to settings every time
Learning Drillbook drill (default off): after accumulating drillEvery real actions, automatically generates a recall exercise that only references actually executed actions; one exercise per batch

What It Doesn’t Do

These are deliberately excluded by design, not yet-to-be-implemented:

  • ❌ Does not register any tools or take over tool execution
  • ❌ Does not intercept, veto, or rewrite any tool results (uses only the tools/result pure broadcast event for read-only observation)
  • ❌ Does not make network calls or send any content externally
  • ❌ Does not read or write your project files
  • ❌ Does not auto-execute actions
  • ❌ Does not claim to know the model’s hidden reasoning — only explains observable facts

Installation & Activation

Prerequisites: Node.js ≥ 20 (command-line installation requires npx and network access).

Method 1: One-liner (recommended)

npx -y @deepseek-ai/dsh plugin --profile desktop add dsh-ai-action-translator

It automatically creates or reuses the profile, runs pnpm add to install the package, and registers the package name in that profile’s dsh.profile.bundles — no manual JSON editing required. Takes effect after restarting DSH.

Change the value after --profile to match your own profile name (a local install may have desktop / web / headless, etc.; the desktop version is typically desktop).

Method 2: Install from source (local development)

git clone https://github.com/David-Martinez-worldexecute/dsh-ai-action-translator.git
cd dsh-ai-action-translator
npm ci            # Install dev dependencies precisely per package-lock (runtime deps are provided by DSH)

Method 3: Windows one-click sync (for code changes)

The repo ships with scripts/install-local.ps1: syncs the current workspace to ~/.dsh/plugins/dsh-ai-action-translator, backs up the old version first, then reads back to verify the version number and the three stepParse entry points, and finally runs a syntax check.

# Run from the repo root; check-only first, no writes to disk
pwsh -File scripts/install-local.ps1 -DryRun

# After confirming, do the real install (old version is backed up as ...bak-<timestamp>)
pwsh -File scripts/install-local.ps1

The script does not modify the profile’s package.json, and does not restart DSH for you — that step is your call.

Manual Installation

Reference it as a local link in the DSH profile’s package.json:

{
  "dependencies": {
    "dsh-ai-action-translator": "link:<absolute path to the repo clone>"
  }
}

Then merge the contents of cordis.patch.yml into the profile’s patch file, and restart DSH.

⚠️ Back up the official profile before making changes. When enabled: false, the plugin is not registered at all.

After restarting DSH, if “AI Action Translator” appears in the right sidebar, the installation was successful.

Typical Usage

After installation, a graphical panel appears in the DSH settings page where you can adjust explanation depth, toggle features on/off, and switch quick presets.

First install: Start with the “Has Basics” preset, then confirm “Step-by-Step Breakdown” is on. Presets only layer on top and don’t reset, so you get a working baseline first and can fine-tune individual items afterward.

Can’t follow a step: Set “Explanation Depth” to deep and watch the same action in the next round. The deep tier traces down to the call stack; no reinstall needed — changes take effect next round.

Feels too verbose: Turn off only “Step-by-Step Breakdown” — don’t disable the whole thing. The numbered breakdown is the most space-consuming layer; turning it off still keeps the before/after action translations.

Want to confirm it’s actually working: Open “Run Statistics” and check whether the observed tool call count is increasing. That’s a read-only counter, independent of the model’s self-reporting.

Want to confirm your changes took effect: Use “Dry Run → Generate a sample paragraph.” It actually generates a prompt paragraph with the current configuration. What you see is what the model gets next round — not a fake preview.

Switching machines / team standardization: Use “Export Config” to save JSON, then “Import Config” on the other machine.

Compatibility Scope

This has two layers — let’s be clear about what each layer delivers so you don’t conflate their promises.

Layer 1: DSH Native Plugin (full form)

Inside DeepSeek Harness, it takes its full form: prompt injection, settings panel, persistent sidebar panel, pre-action gate, multi-agent roster, learning drillbook, action timeline, and failure case library.

The plugin core depends on three DSH-specific things:

Dependency Purpose
systemPrompt.section() / systemPrompt.context() Inject explanation rules and dynamic sections
settings.section UI slot Mount the configuration panel into the settings page
~/.dsh/ data directory and ctx.inject(['webServer']) Store configuration, mount routes

These three are APIs, not configuration items — so the plugin core cannot be installed on other Agent tools.

Layer 2: adapters/ Multi-Host Adapter Layer (partial capabilities)

To also have “action translation + pre-action gate” on other hosts, the repo includes a separate adapters/ layer: a host-agnostic decision core + a thin shell per host (config + hook script + prompt).

Host Pre-action Intercept Notes
Claude Code ✅ Can block PreToolUse hook returns deny
CodeBuddy / WorkBuddy ✅ Can block Same hook, wrapped with an extra hookSpecificOutput layer
Qwen Code (Qianwen) ✅ Can block Official hooks docs confirm: input {tool_name, tool_input}, returns hookSpecificOutput.permissionDecision
Codex ❌ No hook available Prompt only — does not pretend to block

The “Pre-action Intercept” column is the only one worth careful scrutiny: hosts that can block return deny before the command actually executes; hosts that can’t have only a prompt, and the model can ignore it.

This layer does not include a settings panel, sidebar, roster, or drillbook — it’s a port of “action translation + gate,” not a port of the entire plugin.

Both layers share the same rule source in lib/guard.js; adapters/_core/policy.json is generated from it by script, so changing a rule only requires editing one place.

Version requirements: DSH Desktop ≥ 0.2.2-rc.3 (declared via dsh.engines.dsh in package.json); manifestVersion: 1; Node.js ≥ 20.

Use Cases & Cautions

This plugin is suited for scenarios that require an “explainable process”: learning, debugging, mentoring students, and reviewing decisions.

Before use, make sure you understand that the plugin runs with the current DSH process’s permissions. Check the source code and license (MIT) before installing.

The plugin does not change the Agent’s execution logic — it only observes and injects prompts. It won’t operate on your behalf or auto-execute actions.

Summary

AI Action Translator adds a readable translation layer to DSH Agents, turning actions into language you can understand and options you can judge. It doesn’t seize control — it just lays the options in front of you. Suited for scenarios where understanding the process and explainability matter.

Directory

https://www.skillhub.cn/plugins/David-Martinez-worldexecute/dsh-ai-action-translator

GitHub

https://github.com/David-Martinez-worldexecute/dsh-ai-action-translator

羽毛球分组比赛记分
小程序二维码

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

Xiaoye