nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Dclef/dsh-agent-foreman
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English · 简体中文
The parent only splits work and signs off; execution runs in isolated child sessions that cannot see the parent context — what you save is the expensive parent model's execution tokens. No preset roles, no scripted phases: you decide who works, and with which model.
Version compatibility (0.5.1): includes the DSH 0.2.2-rc.2 compatibility fix, retaining the existing 0.2.2-rc.1 / 0.2.1-rc.5 paths. The host is still an RC; no real-model end-to-end verification has been performed. Declared engines.dsh: >=0.2.1-rc.2 <0.3.0-0 || >=0.2.2-0 <0.3.0-0; Node.js ^22.19.0 || >=24.0.0. Older UI/install notes apply only to the package they shipped with.
Positioning change (important): DSH now ships a native multi-agent team (durable named teammates, peer messages, shared task board, Web panel). Foreman no longer claims to fill a "missing team" gap — it is a thin orchestration layer on top of native capabilities: model-based dispatch + per-order independent review + rework loop. The two coexist and complement each other. Native teams handle "how a crew collaborates"; Foreman handles "which model runs each order, and who signs each one off". If you only need named teammates, use the native team directly.
Core idea (0.5.1): the parent model is usually the expensive one. Letting it read files, run commands and chase errors pulls the whole execution transcript into its context. Foreman isolates execution into child sessions that cannot see the parent context: the files it reads, commands it runs, stack traces and tool transcripts stay in the child session and never enter the parent context. Each returns only a short self-written delivery summary (the prompt asks for ≤2000 chars and no pasted code/logs); over 2000 chars triggers one automatic redo, and a second overflow fails the order — no truncation, no overlong text in the parent board, full text only on disk on demand. The parent spends its tokens on splitting work, reading summaries, signing off each order against a checklist, and writing rework feedback. The saving is the execution context that never enters the expensive parent context — it does not depend on which model the contractor uses (leaving provider empty follows the parent model and still saves). Per-contractor model routing is optional capability, not the precondition for saving.
Install: GitHub / npm · prompt for an AI assistant.
DSH 0.2.2-rc.2 supports choosing a model when creating a native named subagent. Foreman saves provider, model, reasoning effort and prompt in a contractor roster, distributes orders by live load, reviews each delivery, and sends rework to the same member.
dsh-agent-foreman turns the current session into a foreman. You keep a roster of contractors in the settings page, each with its own provider / model / reasoning effort and its own prompt. Type /foreman, describe the work, and the foreman splits it into orders, dispatches them to isolated child sessions, and reviews each result — passing or sending it back with feedback. Four coordination tools and one shared board are all it needs; no separate workflow engine, no standing system prompt.

| Capability | What it changes |
|---|---|
| Per-contractor model | Save provider, model and reasoning effort in the roster, pass them at creation (agentOptions), and verify the actual route at delivery. |
| Model whitelist, one source | Enabled contractors with an explicit route are synced into the host's subagent-model whitelist automatically. The roster is the only list you maintain. |
| Load-aware dispatch | Omit contractor and the engine picks the least-loaded contractor with spare capacity, cross-session, with a persisted rotation cursor breaking ties. |
| Self-contained orders + checklist | Each order carries task, acceptance criteria and a checklist; the child cannot see the parent's context. The board puts the checklist in front of the parent for per-item sign-off. |
| Write-scope hints (new) | Orders may declare writeScopes (workspace-relative prefixes, same shape as native task board). Overlaps between parallel orders raise a soft board warning; this is a hint only — no file isolation, no write permission, no blocking. |
| Independent review (new) | foreman_review passes/fails each order; the maker never signs off its own work, every pass/fail records reviewedBy=foreman. A fail requires concrete feedback or is rejected. |
| Real route echo | The board shows both the declared model (roster) and the actual model read back from the child session, and flags the row when they differ. |
| Rework loop | A fail re-dispatches to the same session with feedback, up to maxRework. |
| Failure blocks downstream | A failed / timed-out / cancelled order marks its dependents skipped; a skipped dependency blocks the rest of its chain. |
| Settings + live board | Responsive roster editor, policy panel, run history, and a live board (Settings → 包工头 → 实时工地) polling /api/live. |
The settings page and runtime skill follow the host's official locale service: English / Simplified Chinese switch live without a page reload.
Foreman reads the heavier plugins in the same ecosystem and takes only the few pieces that fit a thin orchestration layer.
suifei/dsh-ai-team) — (1) qaChecklist / qaChecks-style item-by-item sign-off and a QA hard gate: a review may require an objective checklist and per-item conclusions (qaRequired + verdicts[].checks); a pass without them is rejected with the error code QA_CHECKS_REQUIRED. (2) Append-only ledger integrity via a SHA-256 hash chain: lib/store.js links every ledger entry with chainHash, verifyLedger walks the chain segment by segment, and LEDGER_GENESIS anchors the head. Trimming old runs legitimately produces an anchor break, which is expected behaviour, not a tamper alarm.luodaoyi/dsh-cabinet-mode) — (3) Prompt-level budget and stop conditions: orders[].budget carries maxToolCalls / maxRetries / stopCondition. It is a prompt-level (提示级) convention handed to the contractor in its prompt, not a runtime counter — nothing blocks execution when it is exceeded. (4) Member / order usage snapshot: usage reports per-member and per-order readings, and a missing value renders as —. It is a host projection reading, not a billing total (非计费总量).test/optimization.test.mjs: scope normalization, overlap detection, checklist injection, feedback-required fails, independent sign-off marker, board output.0.2.2-rc.2 path uses public named-subagent APIs; older hosts retain the guarded per-call internal adapter. Arbitrary future host versions are not guaranteed compatible.test/checks.test.mjs (qaRequired, per-item checks gate, budget and usage projections), test/ledger-chain.test.mjs (chainHash / verifyLedger / anchor breaks) and the Node 22/24 matrix in .github/workflows/ci.yml. No real model was called, and the accuracy of host-projected usage numbers was not verified.Version 0.5.1 includes the DSH 0.2.2-rc.2 compatibility path; the host is still an RC. Fully restart DSH after installing.
| Use case | DeepSeek Harness | Foreman |
|---|---|---|
| Current release compatibility | 0.2.2-rc.2 |
0.5.1 |
| Existing supported range | 0.2.1-rc.2 |
0.5.1 |
| Re-verified preview host | 0.2.2-rc.1 |
0.5.1 |
| Older verified bridge host | 0.2.1-rc.5 |
0.5.1 |
| Minimum installable host | >=0.2.1-rc.2 <0.3.0-0 |
0.5.1 |
The declared engines.dsh range also covers the 0.2.2 prerelease line; CI verifies the specific hosts above, the installer accepts other hosts at or above the minimum.
dsh plugin add Dclef/dsh-agent-foreman
Install it, then fully restart DSH — a browser refresh alone does not reload the host plugin.
In the active DSH profile directory:
npm install --save-exact dsh-agent-foreman@0.5.1
# or, if the profile uses pnpm:
pnpm add --save-exact dsh-agent-foreman@0.5.1
A first manual install also needs "dsh-agent-foreman" in dsh.profile.bundles of the profile's package.json (merge it, do not overwrite other plugins). GitHub Release also ships a matching .tgz plus SHA256SUMS.txt. See docs/INSTALL.md for the offline tarball, file: dev install, and the pnpm hard-link re-link caveat.
lib/index.js and the settings plugin are assembled only at startup.Install the DeepSeek Harness plugin dsh-agent-foreman@0.5.1 for me:
1. Confirm my DSH version is >=0.2.1-rc.2 <0.3.0-0 and identify the target profile.
2. Prefer dsh plugin add Dclef/dsh-agent-foreman, or in that profile run
npm install --save-exact dsh-agent-foreman@0.5.1 (pnpm: pnpm add).
On a first manual install merge "dsh-agent-foreman" into dsh.profile.bundles,
without overwriting other plugins.
3. Verify the installed version is 0.5.1; do not claim success unless you read the version.
4. Remind me to fully quit and restart DSH and open a new session; a browser refresh
alone does not reload the host plugin.
5. Do not modify the host ASAR, switch global models, or invent CLI commands.
On failure, report the raw error.
Type /foreman (native command when available, otherwise ctx.skills.register) followed by the work:
/foreman extract GraphBlocked into shared logic; add regression tests
Semicolons or newlines split orders. The skill body walks the parent through roster → split (background / files / acceptance / writeScopes / checklist) → one dispatch → per-order review; it is injected once, not kept as a standing system prompt. You can also just ask in natural language.
| Tool | Purpose |
|---|---|
foreman_roster |
List contractors with route, prompt length, concurrency cap, busy/idle state and the current policy |
foreman_dispatch |
Dispatch a batch of orders, wait for all of them, return the shared board |
foreman_review |
Pass / fail each order; a failed one is re-dispatched with feedback |
foreman_status |
Re-read a board; omit runId for the latest one in this session |
Members also report through foreman_report, the self-report recovery tool.
A contractor is a name, an optional role (a lightweight trade label for routing, not a fixed persona), an optional prompt, a provider, a model, an effort level and a concurrency cap. Leave the provider on "follow the current session" and the child simply runs on whatever model the parent session is using. The minimal setup is a single 力工 (laborer); add more instances for specialties, and optionally a 安全员 (safety officer) to review and reject. The foreman (parent agent) is never in the roster.
orders[].task must be self-contained — the child cannot see the parent's context.orders[].writeScopes (new) workspace-relative prefixes, hint only; parallel overlaps raise a soft board warning, never isolation or blocking.orders[].checklist (new) acceptance items; the parent checks each one, the maker never signs off its own work.orders[].contractor accepts a name / id / role; omit it by default for load-aware pick. Writing contractor: "力工" on every order bypasses load balancing and serializes work — do that only with a single enabled contractor.orders[].dependsOn references orders in the same batch only. Failure, timeout or cancellation blocks downstream work as skipped; waitSeconds caps the whole batch and unfinished orders are aborted rather than reported done./foreman activates the skill. The parent reads foreman_roster and splits the goal into self-contained orders with acceptance criteria, write scopes and a checklist.foreman_dispatch call sends the batch. The engine assigns contractors by live load, resolves dependencies, and starts each order in an isolated child session on that contractor's locked model route.foreman_report with run/attempt tokens; the parent gets one shared board with checklist items and scope-overlap warnings.foreman_review passes or fails each order; the parent signs off independently against the checklist, a fail re-dispatches with concrete feedback up to maxRework, reusing the same session.runs/. After a restart they can be queried and reviewed, but interrupted work is never auto-resumed or silently re-dispatched.| Field | Default | Meaning |
|---|---|---|
concurrency |
4 | Contractors working at once (1–8); the per-instance cap lives in the roster |
timeoutSeconds |
900 | Wall-clock cap per order |
maxRework |
1 | How many times an order may be sent back |
maxDepth |
1 | Whether a child may dispatch further children |
provider |
spawn |
Which subagents provider to use |
teamMode |
on for new policies | Create real Agent Teams members; saved policies are preserved. The host session toggle must also be on |
teamFallback |
off | Explicitly fall back to ordinary child sessions when the team service is missing or the host session toggle is off; member dispatch failures remain strict |
Whitelist sync: every enabled contractor with an explicit provider+model is collected into the host whitelist at startup, after saving the roster, and on demand via POST /api/whitelist/sync. When no contractor declares an explicit route the host configuration is left untouched. It applies to new sessions only. A failed sync only logs, never blocks dispatch.
waitSeconds.%LOCALAPPDATA%/dsh-agent-foreman/ (Windows) or <baseDir>/data/dsh-agent-foreman/ elsewhere. roster.json stores contractors and policy; snapshots live in runs/, full delivery text in artifacts/. A corrupt roster is treated as empty and logged, never blocking startup.0.2.2-rc.2 ASAR contract, never modifies the host ASAR or global model, and fails visibly on incompatible hosts. Arbitrary future host versions are not guaranteed compatible.| Native multi-agent team | Cabinet Mode | 文渊阁 dsh-ai-team | Foreman | |
|---|---|---|---|---|
| Positioning | Host built-in: durable teammates / messages / task board | persona preset + right-panel UI + prompt-level budget | standalone 3-pane workbench + append-only SHA-256 hash-chain ledger | thin model dispatch + per-order review layer over teams (qaRequired / budget / usage / verifyLedger) |
| Per-member model | no (spawn_teammate has no model) |
yes (official model picker) | yes (member model dropdown) | yes — agentOptions locked at creation |
| Independent review | no | 大理寺卿 / 左都御史 (persona) | yes — maker never accepts + QA hard gate (qaChecks item-by-item sign-off) |
yes — parent signs off against checklist; qaRequired + verdicts[].checks hard gate (QA_CHECKS_REQUIRED) |
| Write-scope hints | yes writeScopes (hint only) |
— | — | yes — same shape, soft warning (hint only) |
| Prompt-level budget | — | prompt-level convention, not a runtime counter | — | yes — orders[].budget (maxToolCalls / maxRetries / stopCondition), hint only |
| Usage snapshot | no | member usage snapshot (host projection) | ledger totals | yes — usage, missing value shows —, not a billing total |
| Ledger integrity | no | — | SHA-256 hash chain (chainHash) |
verifyLedger + LEDGER_GENESIS; trimmed anchors reported as expected breaks |
| Rework loop | no | — | request changes | yes — auto re-dispatch with feedback |
| Real route echo | no | — | — | yes — declared vs actual model |
| Tool count | 9 Team tools | standard-mode tools | own command set | 4 + self-report |
Key difference: native teams solve "how a crew collaborates"; Foreman adds only the two things they do not — model-based dispatch and per-order independent review + rework. Cabinet Mode leans on persona and visualization, 文渊阁 on a full persistent task system; both are heavier than Foreman. Pick by project size, do not stack them on the same work.
provider empty to follow the parent model still saves.qaRequired + verdicts[].checks; a pass must sign off every checklist item or is rejected with QA_CHECKS_REQUIRED (INVALID_CHECKS for malformed entries). Old single-verdict passes are unchanged.orders[].budget (maxToolCalls / maxRetries / stopCondition), explicitly not a runtime counter.usage (input/output/total tokens) on the board, live board, member cards and ledger; missing values render as — and are labelled host projection readings, not billing totals.runs.jsonl line carries prevHash / hash (SHA-256); exports chainHash, verifyLedger, LEDGER_GENESIS. Trimming old runs produces an expected anchor: break; rewrites are atomic.lib/team.js previously truncated base to 40 chars and appended a 16-char fingerprint, producing 36–39 char names that the host's 1–32 rule rejected at spawn time. Now an exported pure function teammateDisplayName() sizes the base to the remaining budget; generations 1..100 are all legal. The 16-char fingerprint is kept so existing members remain reusable across rounds..github/workflows/ci.yml runs npm test on Node 22 and 24 for pushes, PRs and manual dispatch, with least privileges and no secrets.SUMMARY_LIMIT=2000 + checkDelivery(). Over 2000 chars triggers one automatic redo that rewrites only the summary (no re-running the task); a second overflow fails the order, with full text on disk only. deliveryRedo is recorded in the ledger and board. Team mode does not spawn a second activation and is honestly labelled as not auto-redone.test/checks.test.mjs, test/ledger-chain.test.mjs, test/team-name.test.mjs, test/delivery-limit.test.mjs. No real model was called; host-projected usage accuracy and real-browser rendering were not verified.writeScopes (same shape as the native task board), normalization, parallel-overlap detection, soft board warning; explicitly no file isolation, no write permission.checklist, reviewedBy=foreman sign-off marker, feedback-required fails; the board lays the checklist and overlap warnings in front of the parent. Inspired by 文渊阁's "maker never accepts", but kept as a hint layer, not a QA hard role.teamFallback; it falls back to ordinary child sessions only when the team service is missing or the host session toggle is off, while member dispatch failures remain strict.engines.dsh.foreman_roster, rework reuses the session.foreman_report, real route echo, whitelist sync, dependency-ready scheduling, snapshot recovery.npm install --ignore-scripts
npm test
test/harness.test.mjs runs the real host half against a fake host, so no DSH instance is needed. Set DSH_HOST_ASAR for installed-host contract tests and DSH_BROWSER_EXE for Chrome responsive roster/save tests.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent。