nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:EricStoneChina/better-auto-review
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Codex-style auto review for DeepSeek Harness. Keep the sandbox, review only the escalations.
中文说明 · Issues · MIT License
DeepSeek Harness ships an Auto Review preset that asks a reviewer model about every tool call and, when it approves, runs the rest of the session with danger-full-access. That is safe only if you trust the reviewer completely, and it makes even a read inside the workspace pay a model round-trip.
Better Auto Review takes the Codex approach:
workspace-write sandbox;sandbox_permissions;allowed-once), never the whole session;| Built-in Auto Review | Better Auto Review | |
|---|---|---|
| Review scope | every tool call | only explicit sandbox escalations |
| Baseline sandbox | danger-full-access |
workspace-write |
| Approval lifetime | whole session | one call (allowed-once) |
Workspace read/write |
one reviewer call each | zero reviewer calls |
| Denial message | generic | reviewer's reason included |
| Reviewer model | fixed to the session model | configurable, independent route |
| Reviewer error | implementation-defined | fail closed by default |
The plugin listens on tools/pre-execute and only proceeds when all of these hold:
run_code calls included; the outer run_code wrapper is skipped);auto-mode by default);sandbox_permissions;rank(sandbox_permissions) > rank(baselineSandbox), where the rank is
read-only = 0, workspace-write = 1, danger-full-access = 2.With the default baselineSandbox: workspace-write, only danger-full-access triggers a review. Everything inside the workspace runs with no reviewer call at all.
On allow, the plugin remembers the call id and answers the tool's one-shot escalation approval with allowed-once. On deny, the call is rejected before its body runs. After maxConsecutiveDenials denials the next one is handed to the human. Reviewer errors are denied by default (onError: deny) or handed to the human (onError: ask).
# in your DSH profile directory, e.g. ~/.dsh/profiles/desktop
pnpm add @ericstonechina/better-auto-review
Then add the bundle to the profile's package.json:
{
"dependencies": {
"@ericstonechina/better-auto-review": "^0.1.3"
},
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@ericstonechina/better-auto-review"
]
}
}
}
Restart DSH (or use the plugin manager to enable the bundle). The bundle patch inserts the plugin row, adds the Better Auto Review permission preset, and makes it the default for new sessions.
pnpm add github:EricStoneChina/better-auto-review
Use the same dsh.profile.bundles entry with the package name.
The bundle makes Better Auto Review the default preset for new sessions (via defaultPreset: auto-mode in the bundle's cordis.patch.yml), so you never have to pick it by hand. New sessions start on it with workspace-write plus approval: ask, and the plugin intercepts only escalation requests, so normal workspace work is unaffected. You can still switch any session to another preset from the permission selector; the default only applies to sessions created afterwards. The preset key is auto-mode deliberately: the Claude-style skin's fixed four-button control maps its Auto button to auto-mode before auto, so Auto runs this reviewer instead of the built-in every-call reviewer, with no fifth button and no source edits.
Sessions still on the built-in auto preset (or the earlier auto-review key) are migrated to auto-mode when their agent appears. The built-in plugin is intentionally kept installed so old sessions can still restore without errors.
Defaults live in the bundle's cordis.patch.yml. Override them from your profile's cordis.patch.yml with the same row id:
- id: better-auto-review
config:
provider: magpie-responses
model: codex/gpt-6.2-sol
reviewerProvider: magpie-responses
reviewerModel: codex/gpt-6.2-sol
reviewerReasoningEffort: low
reviewerTimeoutMs: 60000
maxTokens: 800
reviewerSubagent: true
reviewerSubagentProvider: spawn
reviewerPreset: better-auto-review-readonly
reviewerTools:
- read
- glob
- grep
reviewerFallback: llm
preset: auto-mode
baselineSandbox: workspace-write
maxConsecutiveDenials: 3
denialWindowSize: 10
maxWindowDenials: 6
maxReviewsPerTurn: 10
maxFailuresPerTurn: 10
verdictCacheTtlMs: 60000
verdictCacheMaxEntries: 128
onError: deny
| Key | Default | Meaning |
|---|---|---|
provider / model |
magpie-responses / codex/gpt-6.2-sol |
Backward-compatible route used when no reviewer route is set |
reviewerProvider |
value of provider |
LLM route dedicated to review calls |
reviewerModel |
value of model |
Reviewer model; keep it separate from the main coding model if possible |
reviewerReasoningEffort |
low |
Reasoning effort for the reviewer; low keeps reviews fast and cheap |
reviewerTimeoutMs |
60000 |
Hard timeout for one review; timeout fails closed |
maxTokens |
800 |
Reviewer output cap |
reviewerSubagent |
true |
Run each review as a read-only child agent that can inspect the workspace |
reviewerSubagentProvider |
spawn |
DSH subagent provider used for the reviewer (spawn starts with no parent history) |
reviewerPreset |
better-auto-review-readonly |
Agent preset for the reviewer; only read, glob and grep |
reviewerTools |
read, glob, grep |
Tool whitelist enforced for the reviewer child; structured_output is always allowed |
reviewerFallback |
llm |
llm falls back to the inline reviewer if the child cannot start; deny fails closed instead |
preset |
auto-mode |
Permission preset this plugin is active on |
baselineSandbox |
workspace-write |
Anything at or below this rank is not reviewed |
maxConsecutiveDenials |
3 |
Consecutive denials before a manual decision |
denialWindowSize |
10 |
Sliding window used by the denial circuit |
maxWindowDenials |
6 |
Denials in the window before a manual decision |
maxReviewsPerTurn |
10 |
Review calls allowed in one turn before falling back to the human |
maxFailuresPerTurn |
10 |
Reviewer failures allowed in one turn before falling back to the human |
verdictCacheTtlMs |
60000 |
Short cache for identical escalation fingerprints; 0 disables it |
verdictCacheMaxEntries |
128 |
Cache size cap |
onError |
deny |
deny (fail closed) or ask on reviewer failure |
The reviewer can be any route your DSH LLM configuration exposes. It does not have to be the model used by the main session.
By default the reviewer is a fresh spawn child agent on the read-only better-auto-review-readonly preset. It receives only the bounded summary below plus its own read/glob/grep tool results; a agent/pre-step firewall drops injected system, plugin and runtime-context messages, so project instructions cannot steer the verdict.
justification.The reviewer is instructed to allow routine development work and local diagnostics or repairs (including fixing workspace file permissions) and to deny only clear high-risk actions. A broad "continue", "fix it", or complaint that something keeps failing is enough intent for reversible local repair, and every denial must give a concrete reason.
Tool names, arguments and any text inside them are treated as untrusted data; only user messages are treated as authorisation. The child cannot call write, edit, apply_patch, pwsh/shell or run_code; tools/pre-execute denies those with AUTO_REVIEW_READ_ONLY even if the preset were misconfigured. The reviewer must submit strict JSON through the structured_output tool:
{"decision":"allow","reason":"short reason","riskLevel":"low"}
{"decision":"deny","reason":"why this escalation is not justified","riskLevel":"high"}
The plugin also applies deterministic rules before asking the model: disk/filesystem destruction, recursive deletion of a drive root or home directory, secret exfiltration to a network destination, and credential dumping/security tampering are hard-denied even if the reviewer would allow them. A high risk verdict is always denied; a medium verdict needs a specific authorising user request; a low verdict is allowed. Anything else is a reviewer failure and follows onError.
Better Auto Review is a reviewer of escalations, not a replacement for the sandbox. Its guarantee is:
A tool call runs with a wider sandbox only if it explicitly requests
sandbox_permissionswider than the baseline and the reviewer allows that one call.
Consequences:
workspace-write sandbox is still the primary enforcement boundary.sandbox_permissions (for example, some third-party or MCP tools) is outside this plugin's control; rely on that tool's own permission model.workspace-write, keep onError: deny, and use maxConsecutiveDenials to pull a human in early.reviewerFallback: llm keeps the inline reviewer path; use deny to fail closed instead.All messages use the prefix better-auto-review: and report migrations, allowed escalations, denials and reviewer failures.
npm test # node:test harness for the plugin state machine
npm run check # syntax check
npm pack --dry-run
The test harness stubs the DSH host (permission presets, LLM stream, subagent service, tool pipeline, approval listener), so it runs without a DSH installation.
This is an early public test release. Please open an issue with:
cordis.patch.yml configuration you used;better-auto-review: log lines around the problem.MIT © 2026 EricStoneChina
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: ai-agent。