@duckmind/dm-windows-x64 0.61.5 → 0.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dm.exe +0 -0
- package/extensions/.dm-extensions.json +215 -71
- package/extensions/dm-cua/bin/browser-cua.mjs +6 -1
- package/extensions/dm-cua/index.js +3 -2
- package/extensions/dm-cua/src/browser-cua-lib.mjs +69 -13
- package/extensions/dm-subagents/agents/claude-code-writer.md +15 -0
- package/extensions/dm-subagents/agents/claude-code.md +15 -0
- package/extensions/dm-subagents/agents/codex-exec-writer.md +15 -0
- package/extensions/dm-subagents/agents/codex-exec.md +15 -0
- package/extensions/dm-subagents/agents/cursor-agent-writer.md +14 -0
- package/extensions/dm-subagents/agents/cursor-agent.md +14 -0
- package/extensions/dm-subagents/agents/delegate.md +3 -2
- package/extensions/dm-subagents/agents/oracle.md +10 -5
- package/extensions/dm-subagents/agents/researcher.md +2 -2
- package/extensions/dm-subagents/agents/reviewer.md +17 -7
- package/extensions/dm-subagents/agents/scout.md +5 -5
- package/extensions/dm-subagents/agents/worker.md +6 -2
- package/extensions/dm-subagents/async-retention-discovery-worker.mjs +167 -0
- package/extensions/dm-subagents/index.js +4 -0
- package/extensions/dm-subagents/inspector-runner.mjs +10 -0
- package/extensions/dm-subagents/install.mjs +3 -2
- package/extensions/dm-subagents/package.json +2 -2
- package/extensions/dm-subagents/prompts/council.md +60 -0
- package/extensions/dm-subagents/prompts/parallel-review.md +5 -1
- package/extensions/dm-subagents/prompts/review-loop.md +13 -7
- package/extensions/dm-subagents/skills/council-mode/SKILL.md +59 -0
- package/extensions/dm-subagents/skills/council-mode/references/pass-contracts.md +150 -0
- package/extensions/dm-subagents/skills/dm-subagents/SKILL.md +96 -911
- package/extensions/dm-subagents/skills/dm-subagents/references/constraints-and-recipes.md +70 -0
- package/extensions/dm-subagents/skills/dm-subagents/references/execution-controls.md +539 -0
- package/extensions/dm-subagents/skills/dm-subagents/references/management-authoring-rpc.md +161 -0
- package/extensions/dm-subagents/skills/dm-subagents/references/multi-lane-orchestration.md +51 -0
- package/extensions/dm-subagents/skills/dm-subagents/references/prompting-and-roles.md +295 -0
- package/extensions/dm-subagents/skills/dm-subagents/references/review-and-validation.md +73 -0
- package/extensions/dm-subagents/src/agents/agent-management.js +716 -484
- package/extensions/dm-subagents/src/agents/agent-refinements.js +563 -0
- package/extensions/dm-subagents/src/agents/agent-serializer.js +70 -5
- package/extensions/dm-subagents/src/agents/agents.js +1447 -299
- package/extensions/dm-subagents/src/agents/builtin-names.js +15 -0
- package/extensions/dm-subagents/src/agents/chain-serializer.js +12 -7
- package/extensions/dm-subagents/src/agents/frontmatter.js +64 -14
- package/extensions/dm-subagents/src/agents/identity.js +1 -1
- package/extensions/dm-subagents/src/agents/proactive-skills.js +14 -11
- package/extensions/dm-subagents/src/agents/runtime-agent-events.js +49 -0
- package/extensions/dm-subagents/src/agents/runtime-agent-registry.js +412 -0
- package/extensions/dm-subagents/src/agents/skills.js +52 -35
- package/extensions/dm-subagents/src/api/agents.js +6 -0
- package/extensions/dm-subagents/src/api/background-work.js +151 -0
- package/extensions/dm-subagents/src/api/capability-ceiling.js +12 -0
- package/extensions/dm-subagents/src/api/control-channel.js +3 -0
- package/extensions/dm-subagents/src/api/delegation.js +5 -0
- package/extensions/dm-subagents/src/api/dm-args.js +3 -0
- package/extensions/dm-subagents/src/api/external-job-provider.js +137 -0
- package/extensions/dm-subagents/src/api/external-runs.js +233 -0
- package/extensions/dm-subagents/src/api/intercom-bridge.js +3 -0
- package/extensions/dm-subagents/src/api/preflight.js +322 -0
- package/extensions/dm-subagents/src/api/project-panes.js +11 -0
- package/extensions/dm-subagents/src/api/shared-types.js +4 -0
- package/extensions/dm-subagents/src/extension/config.js +175 -0
- package/extensions/dm-subagents/src/extension/control-notices.js +4 -43
- package/extensions/dm-subagents/src/extension/doctor.js +71 -17
- package/extensions/dm-subagents/src/extension/fanout-child.js +49 -32
- package/extensions/dm-subagents/src/extension/index.js +711 -265
- package/extensions/dm-subagents/src/extension/public-execution.js +114 -0
- package/extensions/dm-subagents/src/extension/rpc.js +427 -22
- package/extensions/dm-subagents/src/extension/schemas.js +158 -65
- package/extensions/dm-subagents/src/extension/steering-notices.js +23 -0
- package/extensions/dm-subagents/src/extension/subagent-guide.js +31 -0
- package/extensions/dm-subagents/src/extension/tool-description.js +92 -74
- package/extensions/dm-subagents/src/extension/tool-result.js +7 -0
- package/extensions/dm-subagents/src/inspectors/herdr/actions.js +218 -0
- package/extensions/dm-subagents/src/inspectors/herdr/client.js +123 -0
- package/extensions/dm-subagents/src/inspectors/herdr/focus.js +47 -0
- package/extensions/dm-subagents/src/inspectors/herdr/inspector-runner.js +160 -0
- package/extensions/dm-subagents/src/inspectors/herdr/project-panes.js +618 -0
- package/extensions/dm-subagents/src/inspectors/herdr/session-roots-codec.js +21 -0
- package/extensions/dm-subagents/src/inspectors/herdr/shell-command.js +15 -0
- package/extensions/dm-subagents/src/integrations/herdr-status.js +377 -0
- package/extensions/dm-subagents/src/intercom/intercom-bridge.js +17 -13
- package/extensions/dm-subagents/src/intercom/native-supervisor-channel.js +371 -79
- package/extensions/dm-subagents/src/intercom/result-intercom.js +47 -7
- package/extensions/dm-subagents/src/missions/actions.js +394 -0
- package/extensions/dm-subagents/src/missions/goal-driver.js +149 -0
- package/extensions/dm-subagents/src/missions/lifecycle.js +331 -0
- package/extensions/dm-subagents/src/missions/store.js +548 -0
- package/extensions/dm-subagents/src/missions/types.js +9 -0
- package/extensions/dm-subagents/src/missions/workflow-state.js +245 -0
- package/extensions/dm-subagents/src/policy/authority.js +37 -0
- package/extensions/dm-subagents/src/profiles/profiles.js +36 -18
- package/extensions/dm-subagents/src/runs/background/active-async-capacity.js +427 -0
- package/extensions/dm-subagents/src/runs/background/active-run-index.js +122 -0
- package/extensions/dm-subagents/src/runs/background/async-execution.js +925 -137
- package/extensions/dm-subagents/src/runs/background/async-job-tracker.js +515 -148
- package/extensions/dm-subagents/src/runs/background/async-resume.js +378 -51
- package/extensions/dm-subagents/src/runs/background/async-retention.js +828 -0
- package/extensions/dm-subagents/src/runs/background/async-status-snapshot.js +31 -0
- package/extensions/dm-subagents/src/runs/background/async-status.js +259 -22
- package/extensions/dm-subagents/src/runs/background/auto-drain.js +46 -0
- package/extensions/dm-subagents/src/runs/background/chain-append.js +50 -15
- package/extensions/dm-subagents/src/runs/background/chain-root-attachment.js +67 -12
- package/extensions/dm-subagents/src/runs/background/completion-batcher.js +5 -1
- package/extensions/dm-subagents/src/runs/background/completion-dedupe.js +3 -11
- package/extensions/dm-subagents/src/runs/background/completion-replay.js +245 -0
- package/extensions/dm-subagents/src/runs/background/control-channel.js +423 -36
- package/extensions/dm-subagents/src/runs/background/fleet-view.js +132 -59
- package/extensions/dm-subagents/src/runs/background/index-segment.js +38 -0
- package/extensions/dm-subagents/src/runs/background/inspect-rpc.js +373 -0
- package/extensions/dm-subagents/src/runs/background/notify.js +357 -57
- package/extensions/dm-subagents/src/runs/background/owned-process-tree.js +86 -0
- package/extensions/dm-subagents/src/runs/background/process-terminal.js +269 -0
- package/extensions/dm-subagents/src/runs/background/result-delivery-ownership.js +34 -0
- package/extensions/dm-subagents/src/runs/background/result-files.js +469 -0
- package/extensions/dm-subagents/src/runs/background/result-watcher.js +540 -75
- package/extensions/dm-subagents/src/runs/background/resume-guidance.js +44 -0
- package/extensions/dm-subagents/src/runs/background/retained-children.js +119 -0
- package/extensions/dm-subagents/src/runs/background/run-id-query.js +5 -0
- package/extensions/dm-subagents/src/runs/background/run-id-resolver.js +93 -9
- package/extensions/dm-subagents/src/runs/background/run-status.js +303 -32
- package/extensions/dm-subagents/src/runs/background/scheduled-runs.js +784 -376
- package/extensions/dm-subagents/src/runs/background/stale-run-reconciler.js +75 -34
- package/extensions/dm-subagents/src/runs/background/steering.js +221 -0
- package/extensions/dm-subagents/src/runs/background/subagent-runner.js +3106 -844
- package/extensions/dm-subagents/src/runs/background/subagent-wait.js +529 -0
- package/extensions/dm-subagents/src/runs/background/terminal-run-index.js +106 -0
- package/extensions/dm-subagents/src/runs/background/top-level-async.js +1 -1
- package/extensions/dm-subagents/src/runs/background/wait-completions.js +155 -0
- package/extensions/dm-subagents/src/runs/background/wait-config.js +46 -0
- package/extensions/dm-subagents/src/runs/background/wait-subscriptions.js +278 -0
- package/extensions/dm-subagents/src/runs/background/wait-tool.js +47 -0
- package/extensions/dm-subagents/src/runs/foreground/async-dismiss-action.js +81 -0
- package/extensions/dm-subagents/src/runs/foreground/async-steering-action.js +245 -0
- package/extensions/dm-subagents/src/runs/foreground/async-stop-action.js +74 -0
- package/extensions/dm-subagents/src/runs/foreground/execution.js +1401 -342
- package/extensions/dm-subagents/src/runs/foreground/foreground-control.js +133 -0
- package/extensions/dm-subagents/src/runs/foreground/foreground-history.js +148 -0
- package/extensions/dm-subagents/src/runs/foreground/prompt-audit.js +139 -0
- package/extensions/dm-subagents/src/runs/foreground/subagent-executor.js +4278 -1441
- package/extensions/dm-subagents/src/runs/foreground/workflow-detach-reconcile.js +278 -0
- package/extensions/dm-subagents/src/runs/foreground/workflow-foreground-steering.js +155 -0
- package/extensions/dm-subagents/src/runs/shared/abort-recovery.js +97 -0
- package/extensions/dm-subagents/src/runs/shared/acceptance.js +597 -148
- package/extensions/dm-subagents/src/runs/shared/agent-contract.js +35 -0
- package/extensions/dm-subagents/src/runs/shared/async-status-projection.js +472 -0
- package/extensions/dm-subagents/src/runs/shared/background-process-options.js +6 -0
- package/extensions/dm-subagents/src/runs/shared/capability-ceiling.js +175 -0
- package/extensions/dm-subagents/src/runs/shared/child-identity.js +32 -0
- package/extensions/dm-subagents/src/runs/shared/child-launch-plan.js +65 -0
- package/extensions/dm-subagents/src/runs/shared/child-protocol.js +447 -0
- package/extensions/dm-subagents/src/runs/shared/claude-code-adapter.js +120 -0
- package/extensions/dm-subagents/src/runs/shared/codex-exec-adapter.js +129 -0
- package/extensions/dm-subagents/src/runs/shared/completion-evidence.js +40 -0
- package/extensions/dm-subagents/src/runs/shared/completion-guard.js +140 -83
- package/extensions/dm-subagents/src/runs/shared/context-mode.js +38 -0
- package/extensions/dm-subagents/src/runs/shared/cursor-agent-adapter.js +101 -0
- package/extensions/dm-subagents/src/runs/shared/dm-args.js +445 -72
- package/extensions/dm-subagents/src/runs/shared/dm-spawn.js +27 -16
- package/extensions/dm-subagents/src/runs/shared/dynamic-fanout.js +19 -6
- package/extensions/dm-subagents/src/runs/shared/extension-bindings.js +81 -0
- package/extensions/dm-subagents/src/runs/shared/external-cli-contract.js +134 -0
- package/extensions/dm-subagents/src/runs/shared/external-cli-preflight.js +98 -0
- package/extensions/dm-subagents/src/runs/shared/external-cli-runner.js +419 -0
- package/extensions/dm-subagents/src/runs/shared/external-job-bridge.js +404 -0
- package/extensions/dm-subagents/src/runs/shared/external-job-runner.js +334 -0
- package/extensions/dm-subagents/src/runs/shared/fast-mode-extension.js +8 -0
- package/extensions/dm-subagents/src/runs/shared/host-step-status.js +228 -0
- package/extensions/dm-subagents/src/runs/shared/lane-metadata.js +104 -0
- package/extensions/dm-subagents/src/runs/shared/launch-cwd.js +17 -0
- package/extensions/dm-subagents/src/runs/shared/llm-intent-arbiter.js +190 -0
- package/extensions/dm-subagents/src/runs/shared/long-running-guard.js +48 -3
- package/extensions/dm-subagents/src/runs/shared/mcp-config-sources.js +387 -0
- package/extensions/dm-subagents/src/runs/shared/mcp-direct-tool-allowlist.js +212 -137
- package/extensions/dm-subagents/src/runs/shared/mcp-direct-tool-grant.js +131 -0
- package/extensions/dm-subagents/src/runs/shared/model-exclusions.js +207 -0
- package/extensions/dm-subagents/src/runs/shared/model-fallback.js +225 -55
- package/extensions/dm-subagents/src/runs/shared/model-scope.js +85 -28
- package/extensions/dm-subagents/src/runs/shared/mutation-evidence.js +182 -0
- package/extensions/dm-subagents/src/runs/shared/nested-events.js +264 -102
- package/extensions/dm-subagents/src/runs/shared/nested-render.js +15 -5
- package/extensions/dm-subagents/src/runs/shared/orca-progress-tabs.js +505 -0
- package/extensions/dm-subagents/src/runs/shared/parallel-handoff.js +653 -0
- package/extensions/dm-subagents/src/runs/shared/parallel-utils.js +29 -12
- package/extensions/dm-subagents/src/runs/shared/permissions.js +108 -0
- package/extensions/dm-subagents/src/runs/shared/process-signal.js +13 -0
- package/extensions/dm-subagents/src/runs/shared/run-fanout-budget.js +257 -0
- package/extensions/dm-subagents/src/runs/shared/run-history.js +133 -13
- package/extensions/dm-subagents/src/runs/shared/runtime-acknowledged-extensions.js +62 -0
- package/extensions/dm-subagents/src/runs/shared/session-lease.js +225 -0
- package/extensions/dm-subagents/src/runs/shared/single-output.js +129 -27
- package/extensions/dm-subagents/src/runs/shared/spawn-budget.js +95 -0
- package/extensions/dm-subagents/src/runs/shared/structured-output.js +129 -10
- package/extensions/dm-subagents/src/runs/shared/subagent-control.js +66 -11
- package/extensions/dm-subagents/src/runs/shared/subagent-prompt-runtime.js +548 -70
- package/extensions/dm-subagents/src/runs/shared/subagent-startup-retry.js +50 -0
- package/extensions/dm-subagents/src/runs/shared/task-intent.js +130 -0
- package/extensions/dm-subagents/src/runs/shared/tool-availability.js +59 -0
- package/extensions/dm-subagents/src/runs/shared/tool-budget.js +7 -5
- package/extensions/dm-subagents/src/runs/shared/tool-timeout.js +64 -0
- package/extensions/dm-subagents/src/runs/shared/usage-budget.js +74 -0
- package/extensions/dm-subagents/src/runs/shared/workflow-graph.js +22 -0
- package/extensions/dm-subagents/src/runs/shared/worktree-cleanup-plan.js +721 -0
- package/extensions/dm-subagents/src/runs/shared/worktree.js +168 -19
- package/extensions/dm-subagents/src/shared/accessible-dir.js +35 -0
- package/extensions/dm-subagents/src/shared/agent-stream-options.js +3 -0
- package/extensions/dm-subagents/src/shared/artifacts.js +170 -11
- package/extensions/dm-subagents/src/shared/atomic-json.js +36 -38
- package/extensions/dm-subagents/src/shared/capacity-resilient-json.js +77 -0
- package/extensions/dm-subagents/src/shared/child-session-name.js +15 -0
- package/extensions/dm-subagents/src/shared/child-transcript.js +57 -2
- package/extensions/dm-subagents/src/shared/completion-owner.js +7 -0
- package/extensions/dm-subagents/src/shared/display-text.js +142 -0
- package/extensions/dm-subagents/src/shared/extension-context.js +17 -0
- package/extensions/dm-subagents/src/shared/file-coalescer.js +9 -0
- package/extensions/dm-subagents/src/shared/file-system-retry.js +56 -0
- package/extensions/dm-subagents/src/shared/fork-context.js +96 -33
- package/extensions/dm-subagents/src/shared/formatters.js +21 -7
- package/extensions/dm-subagents/src/shared/launch-contract.js +94 -0
- package/extensions/dm-subagents/src/shared/model-info.js +10 -5
- package/extensions/dm-subagents/src/shared/node-executable.js +19 -0
- package/extensions/dm-subagents/src/shared/prompt-resources.js +10 -0
- package/extensions/dm-subagents/src/shared/pruned-fork.js +427 -0
- package/extensions/dm-subagents/src/shared/session-file-trust.js +19 -0
- package/extensions/dm-subagents/src/shared/session-tokens.js +14 -3
- package/extensions/dm-subagents/src/shared/settings.js +39 -47
- package/extensions/dm-subagents/src/shared/shortcuts.js +16 -0
- package/extensions/dm-subagents/src/shared/status-format.js +9 -2
- package/extensions/dm-subagents/src/shared/thinking-ceiling.js +41 -0
- package/extensions/dm-subagents/src/shared/types.js +47 -7
- package/extensions/dm-subagents/src/shared/utf8.js +12 -0
- package/extensions/dm-subagents/src/shared/utils.js +151 -131
- package/extensions/dm-subagents/src/shared/watch-strategy.js +3 -0
- package/extensions/dm-subagents/src/shared/workflow-child-permit.js +84 -0
- package/extensions/dm-subagents/src/slash/delegation-adapters.js +274 -0
- package/extensions/dm-subagents/src/slash/delegation-json.js +113 -0
- package/extensions/dm-subagents/src/slash/delegation-request.js +152 -0
- package/extensions/dm-subagents/src/slash/prompt-template-bridge.js +294 -243
- package/extensions/dm-subagents/src/slash/prompt-workflows.js +35 -73
- package/extensions/dm-subagents/src/slash/selector.js +101 -0
- package/extensions/dm-subagents/src/slash/slash-bridge.js +17 -1
- package/extensions/dm-subagents/src/slash/slash-commands.js +722 -732
- package/extensions/dm-subagents/src/slash/slash-live-state.js +37 -19
- package/extensions/dm-subagents/src/slash/subagents-admin.js +410 -0
- package/extensions/dm-subagents/src/tui/fleet-status.js +824 -0
- package/extensions/dm-subagents/src/tui/fleet-transcript.js +479 -0
- package/extensions/dm-subagents/src/tui/fleet.js +1326 -0
- package/extensions/dm-subagents/src/tui/render-helpers.js +22 -0
- package/extensions/dm-subagents/src/tui/render.js +1511 -261
- package/extensions/dm-subagents/src/watchdog/change-signature.js +220 -0
- package/extensions/dm-subagents/src/watchdog/child-status.js +151 -0
- package/extensions/dm-subagents/src/watchdog/emission-guard.js +90 -0
- package/extensions/dm-subagents/src/watchdog/lsp-diagnostics.js +484 -0
- package/extensions/dm-subagents/src/watchdog/model-selection.js +154 -0
- package/extensions/dm-subagents/src/watchdog/permission-arbiter.js +138 -0
- package/extensions/dm-subagents/src/watchdog/register-child.js +112 -0
- package/extensions/dm-subagents/src/watchdog/register-main.js +419 -0
- package/extensions/dm-subagents/src/watchdog/render.js +54 -0
- package/extensions/dm-subagents/src/watchdog/review.js +251 -0
- package/extensions/dm-subagents/src/watchdog/runtime.js +803 -0
- package/extensions/dm-subagents/src/watchdog/scope.js +56 -0
- package/extensions/dm-subagents/src/watchdog/settings.js +515 -0
- package/extensions/dm-subagents/src/watchdog/tool-actions.js +151 -0
- package/extensions/dm-subagents/src/watchdog/turn-delta.js +169 -0
- package/extensions/dm-subagents/src/watchdog/types.js +29 -0
- package/extensions/dm-subagents/src/watchdog/warning-format.js +58 -0
- package/extensions/dm-subagents/src/workflows/chat-progress.js +116 -0
- package/extensions/dm-subagents/src/workflows/host-command.js +227 -0
- package/extensions/dm-subagents/src/workflows/scripted-workflow.js +2011 -0
- package/extensions/dm-subagents/src/workflows/workflow-child-summary.js +116 -0
- package/extensions/dm-subagents/src/workflows/workflow-preflight.js +243 -0
- package/extensions/dm-subagents/src/workflows/workflow-receipt.js +387 -0
- package/extensions/dm-subagents/src/workflows/workflow-settlement.js +189 -0
- package/extensions/greedysearch-dm/bin/cdp.mjs +28 -3
- package/extensions/greedysearch-dm/bin/launch.mjs +2 -3
- package/extensions/greedysearch-dm/src/search/constants.mjs +5 -2
- package/package.json +4 -3
- package/extensions/dm-fff/package.json +0 -21
- package/extensions/dm-fff/src/index.js +0 -691
- package/extensions/dm-fff/src/query.js +0 -60
- package/extensions/dm-subagents/agents/context-builder.md +0 -46
- package/extensions/dm-subagents/agents/planner.md +0 -55
- package/extensions/dm-subagents/prompts/parallel-context-build.md +0 -55
- package/extensions/dm-subagents/prompts/parallel-handoff-plan.md +0 -61
- package/extensions/dm-subagents/src/runs/background/wait.js +0 -206
- package/extensions/dm-subagents/src/runs/foreground/chain-clarify.js +0 -1013
- package/extensions/dm-subagents/src/runs/foreground/chain-execution.js +0 -981
- package/extensions/dm-subagents/src/runs/shared/turn-budget.js +0 -50
|
@@ -1,918 +1,103 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dm-subagents
|
|
3
3
|
description: |
|
|
4
|
-
Delegate
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
planning, or execution.
|
|
4
|
+
Delegate to builtin or custom subagents for single-agent handoffs, parallel
|
|
5
|
+
review, scripted chaining, async work, forked context, and coordinated
|
|
6
|
+
workflows. Use when one parent agent should stay in control while children
|
|
7
|
+
supply focused context, planning, review, or execution.
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# DM Subagents
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}],
|
|
106
|
-
context: "fresh"
|
|
107
|
-
})
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Parallel handoff-plan technique
|
|
111
|
-
|
|
112
|
-
Use this when the user needs a solution brief or implementation-ready handoff from an external reference plus local code context, such as “study this library behavior, inspect our codebase, then produce a worker prompt.” Run a chain with a first parallel group and a second synthesis `context-builder` step. The first group usually includes `researcher` for external projects/docs/prompt guidance and `context-builder` for local code context; add a second `context-builder` for implementation strategy only when the scope is large enough to benefit. Use distinct output paths under `handoff/`, then have the synthesis `context-builder` read those outputs and write `handoff/final-handoff-plan.md` with the recommended approach, likely files, constraints, non-goals, validation, risks, unresolved questions, and final compact implementation-ready meta-prompt.
|
|
113
|
-
|
|
114
|
-
Example shape:
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
subagent({
|
|
118
|
-
chain: [
|
|
119
|
-
{ parallel: [
|
|
120
|
-
{ agent: "researcher", task: "Research the external reference and transferable implementation ideas for: ...", output: "handoff/external-reference.md" },
|
|
121
|
-
{ agent: "context-builder", task: "Build local codebase context for: ...", output: "handoff/local-context.md" },
|
|
122
|
-
{ agent: "context-builder", task: "Compare evidence and propose implementation strategy for: ...", output: "handoff/implementation-strategy.md" }
|
|
123
|
-
] },
|
|
124
|
-
{ agent: "context-builder", task: "Read {previous} and synthesize the final handoff plan and implementation-ready meta-prompt.", output: "handoff/final-handoff-plan.md" }
|
|
125
|
-
],
|
|
126
|
-
context: "fresh"
|
|
127
|
-
})
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Gather-context-and-clarify technique
|
|
131
|
-
|
|
132
|
-
Use this at the start of non-trivial work. Launch `scout` for local context and `researcher` only when external docs, recent sources, ecosystem context, or primary evidence would materially improve understanding. Ask children for concise findings plus remaining clarification questions. Then synthesize what is known and use `interview` to ask the unresolved questions needed for shared understanding before planning or implementing.
|
|
133
|
-
|
|
134
|
-
### Parallel cleanup technique
|
|
135
|
-
|
|
136
|
-
Use this after implementation when the user wants cleanup review or when a final pass would reduce AI-slop. Launch two fresh-context `reviewer` tasks with `output: false` and `progress: false`: one deslop pass and one verbosity pass. If the `deslop` or `verbosity-cleaner` skills are available, pass the relevant skill to that reviewer; otherwise inline the criteria. Both reviewers are review-only and should flag concrete issues with severity, file/line references, and smallest safe fixes. Phrase the constraint as “Do not modify project/source files; returning findings through the configured output artifact is allowed” when you use `output` or `outputMode: "file-only"`. The parent decides what to apply and asks before making changes unless cleanup was already authorized.
|
|
137
|
-
|
|
138
|
-
### Staged fix orchestration technique
|
|
139
|
-
|
|
140
|
-
Use this when a broad diff has known reviewer findings across several items and the user wants the parent to “orchestrate subagents like a boss.” Keep the active worktree safe with a three-stage chain:
|
|
141
|
-
|
|
142
|
-
1. A parallel read-only planning fanout, one planner/reviewer per issue cluster. Each child inspects the real diff and returns exact files, line refs, proposed fixes, and focused validation. They must not edit.
|
|
143
|
-
2. One writer worker. It receives the planner summaries through `{previous}`, the parent’s accepted scope, stop rules, and verification contract. It is the only child allowed to edit the active worktree.
|
|
144
|
-
3. A parallel read-only validation fanout. Validators inspect the worker diff from fresh context with distinct angles, report pass/fail, remaining blockers, and missing verification.
|
|
145
|
-
|
|
146
|
-
Prefer `async: true`, `context: "fresh"` for planners/validators, `outputMode: "file-only"` for large summaries, and per-stage output names that will not collide. Add `phase` and `label` to make async status readable, and use `as` plus `{outputs.name}` when a later step needs a specific earlier result instead of the whole `{previous}` blob. Use this pattern instead of launching several writer workers into a dirty worktree. Include non-blocking suggestions in the writer prompt only when they are small, safe, and do not expand product scope; otherwise record them as deferred.
|
|
147
|
-
|
|
148
|
-
When the first step can return a structured target list, prefer dynamic fanout instead of hand-authoring a static parallel group. Use `outputSchema` and `as` on the producer, then an `expand` step with `from: { output, path }`, an explicit `maxItems`, one `parallel` child template, and `collect.as`. Item templates may use `{item}` or a named item such as `{target.path}`. Do not use dynamic fanout for prose outputs, nested fanout, dynamic agent selection, reducers, `when` conditions, or arbitrary expressions; `.chain.md` does not support this syntax, so use direct JSON or a saved `.chain.json`.
|
|
149
|
-
|
|
150
|
-
Example shape:
|
|
151
|
-
|
|
152
|
-
```typescript
|
|
153
|
-
subagent({
|
|
154
|
-
async: true,
|
|
155
|
-
context: "fresh",
|
|
156
|
-
chain: [
|
|
157
|
-
{ parallel: [
|
|
158
|
-
{ agent: "reviewer", phase: "Planning", label: "Deploy docs", as: "deployPlan", task: "Plan fixes for deploy docs/workflow. Inspect the current diff. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "plans/deploy.md", outputMode: "file-only" },
|
|
159
|
-
{ agent: "reviewer", phase: "Planning", label: "Scheduler contract", as: "schedulerPlan", task: "Plan fixes for scheduler contract. Inspect the current diff. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "plans/scheduler.md", outputMode: "file-only" },
|
|
160
|
-
{ agent: "reviewer", phase: "Planning", label: "Sandbox/security", as: "sandboxPlan", task: "Plan fixes for sandbox/security. Inspect the current diff. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "plans/sandbox.md", outputMode: "file-only" }
|
|
161
|
-
], concurrency: 3 },
|
|
162
|
-
{ agent: "worker", phase: "Implementation", label: "Apply accepted fixes", as: "workerResult", task: "Apply only the accepted fixes from these planning summaries. You are the sole writer for the active worktree. Run focused validation and report changed files, commands, failures, and remaining issues.\n\nDeploy plan:\n{outputs.deployPlan}\n\nScheduler plan:\n{outputs.schedulerPlan}\n\nSandbox plan:\n{outputs.sandboxPlan}", output: "worker/fixes.md", outputMode: "file-only", progress: true },
|
|
163
|
-
{ parallel: [
|
|
164
|
-
{ agent: "reviewer", phase: "Validation", label: "Deploy/scheduler validation", task: "Validate the post-worker diff for deploy and scheduler fixes. Start from the worker result: {outputs.workerResult}. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "validation/deploy-scheduler.md", outputMode: "file-only" },
|
|
165
|
-
{ agent: "reviewer", phase: "Validation", label: "Sandbox validation", task: "Validate the post-worker diff for sandbox/security fixes. Start from the worker result: {outputs.workerResult}. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "validation/sandbox.md", outputMode: "file-only" }
|
|
166
|
-
], concurrency: 2 }
|
|
167
|
-
]
|
|
168
|
-
})
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Builtin Agents
|
|
172
|
-
|
|
173
|
-
Builtin agents load at the lowest priority. Project agents override user agents,
|
|
174
|
-
and user/project agents override builtins with the same name.
|
|
175
|
-
|
|
176
|
-
| Agent | Purpose | Model | Typical output / role |
|
|
177
|
-
|-------|---------|-------|------------------------|
|
|
178
|
-
| `scout` | Fast codebase recon | inherits default | Writes `context.md` handoff material |
|
|
179
|
-
| `planner` | Creates implementation plans | inherits default | Writes `plan.md` |
|
|
180
|
-
| `worker` | Implementation and approved oracle handoffs | inherits default | Single-writer implementation with decision escalation |
|
|
181
|
-
| `reviewer` | Review-and-fix specialist | inherits default | Can edit/fix reviewed code |
|
|
182
|
-
| `context-builder` | Requirements/codebase handoff builder | inherits default | Writes structured context files |
|
|
183
|
-
| `researcher` | Web research brief generator | inherits default | Writes `research.md` |
|
|
184
|
-
| `delegate` | Lightweight generic delegate | inherits default | No fixed output; generic delegated work |
|
|
185
|
-
| `oracle` | Decision-consistency advisory review | inherits default | Advisory review, intercom coordination |
|
|
186
|
-
|
|
187
|
-
Builtin agents inherit the current DM default model unless a run, user setting, or project setting overrides `model`. Override builtin defaults before copying full agent files when a small tweak is enough.
|
|
188
|
-
|
|
189
|
-
For one run, use inline config:
|
|
190
|
-
|
|
191
|
-
```text
|
|
192
|
-
/run reviewer[model=anthropic/claude-sonnet-4] "Review this diff"
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
For persistent tweaks, edit `subagents.agentOverrides` in user or project settings. User overrides apply everywhere. Project overrides apply only in that repo and win over user overrides.
|
|
196
|
-
|
|
197
|
-
Model ids do not have to be exact. Separator variations (`claude-haiku-4.5` vs `claude-haiku-4-5`), case (`Claude-Sonnet-4`), and optional trailing date stamps (`claude-haiku-4-5-20251001`) all resolve to the same registry model. Exact `provider/id` wins; a qualified `provider/model` never switches providers. To constrain subagents to a budget or compliance profile, set `subagents.modelScope: { enforce: true, allow: ["anthropic/*", "openai/gpt-5-*"] }` in user or project settings. Out-of-scope models you pass explicitly error and abort; models inherited from frontmatter, `defaultModel`, or the parent session only warn.
|
|
198
|
-
|
|
199
|
-
## Prompting role subagents
|
|
200
|
-
|
|
201
|
-
Builtin role agents inherit the current DM default model unless you override them. When launching them, write the task prompt as a compact contract, not a long procedural script. Define the destination and let the role choose the efficient path.
|
|
202
|
-
|
|
203
|
-
A strong subagent prompt usually includes:
|
|
204
|
-
- **Goal**: the concrete outcome the child should produce.
|
|
205
|
-
- **Context/evidence**: relevant plan paths, files, diffs, decisions, or user constraints already approved.
|
|
206
|
-
- **Success criteria**: what must be true before the child can finish.
|
|
207
|
-
- **Hard constraints**: true invariants only, such as no edits for review-only tasks, one writer thread, child must not run subagents unless it is an explicitly assigned `tools: subagent` fanout child, or escalation for unapproved decisions.
|
|
208
|
-
- **Validation**: targeted checks to run, or the next-best check when validation is impossible.
|
|
209
|
-
- **Output**: the expected summary shape, artifact path, or finding format.
|
|
210
|
-
- **Stop rules**: when to ask via `intercom`, when to stop after enough evidence, and when not to keep searching.
|
|
211
|
-
|
|
212
|
-
Avoid carrying over old prompt habits that over-specify every step. Use `must`, `always`, and `never` for real invariants; for judgment calls, give decision rules. For example, tell a reviewer to inspect the staged diff directly and report only evidence-backed findings, rather than prescribing every file or command. Tell a researcher the retrieval budget: start with broad targeted searches, fetch only the strongest sources, search again only when a required fact is missing, then stop.
|
|
213
|
-
|
|
214
|
-
For implementation handoffs, name the approved scope and success criteria more clearly than the process. Good prompts say what to change, what not to change, where the evidence lives, how to validate, and when to escalate. They should not ask the child to create another subagent plan or continue the parent conversation.
|
|
215
|
-
|
|
216
|
-
Settings locations:
|
|
217
|
-
- User scope: `~/.dm/agent/settings.json`
|
|
218
|
-
- Project scope: `.dm/settings.json`
|
|
219
|
-
|
|
220
|
-
Direct settings example:
|
|
221
|
-
|
|
222
|
-
```json
|
|
223
|
-
{
|
|
224
|
-
"subagents": {
|
|
225
|
-
"agentOverrides": {
|
|
226
|
-
"reviewer": {
|
|
227
|
-
"model": "anthropic/claude-sonnet-4",
|
|
228
|
-
"thinking": "high",
|
|
229
|
-
"fallbackModels": ["openai/gpt-5-mini"]
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
Useful override fields: `model`, `fallbackModels`, `thinking`,
|
|
237
|
-
`systemPromptMode`, `inheritProjectContext`, `inheritSkills`, `defaultContext`,
|
|
238
|
-
`disabled`, `skills`, `tools`, and `systemPrompt`. Create a user or project
|
|
239
|
-
agent with the same name only when you want a substantially different agent.
|
|
240
|
-
|
|
241
|
-
If a provider rejects model IDs with thinking suffixes, use
|
|
242
|
-
`subagents.disableThinking: true` in user or project settings to clear bundled
|
|
243
|
-
builtin thinking defaults globally. A higher-precedence per-agent `thinking`
|
|
244
|
-
override can opt one builtin back in.
|
|
245
|
-
|
|
246
|
-
Tool description modes live in `~/.dm/agent/extensions/subagent/config.json`, not `subagents` settings. Set `toolDescriptionMode` to `compact` to reduce tool-description prompt cost while keeping the execution, async/wait, child-safety, one-writer, management/action, and artifact/status guardrails. Set it to `custom` to read `subagent-tool-description.md` from the project config dir or agent dir; invalid custom files fall back to full mode and the safety guidance is still appended.
|
|
247
|
-
|
|
248
|
-
## Discovery and Scope Rules
|
|
249
|
-
|
|
250
|
-
Agent files can live in:
|
|
251
|
-
- `~/.dm/agent/agents/**/*.md` — user scope
|
|
252
|
-
- `.dm/agents/**/*.md` — canonical project scope
|
|
253
|
-
- legacy `.agents/**/*.md` — still read for compatibility, but `.dm/agents/` wins on conflicts
|
|
254
|
-
|
|
255
|
-
Chains live in:
|
|
256
|
-
- `~/.dm/agent/chains/**/*.chain.md` and `~/.dm/agent/chains/**/*.chain.json` — user scope
|
|
257
|
-
- `.dm/chains/**/*.chain.md` and `.dm/chains/**/*.chain.json` — project scope
|
|
258
|
-
|
|
259
|
-
Discovery is recursive. `.chain.md` files do not define agents. Use `.chain.md` for simple saved chains and `.chain.json` for dynamic fanout or inline schema objects. Agents and chains can set optional frontmatter/package metadata; `name: scout` plus `package: code-analysis` registers as runtime name `code-analysis.scout` while serialization keeps `name` and `package` separate.
|
|
260
|
-
|
|
261
|
-
Precedence is by parsed runtime name:
|
|
262
|
-
1. project scope
|
|
263
|
-
2. user scope
|
|
264
|
-
3. builtin agents
|
|
265
|
-
|
|
266
|
-
## Running Subagents
|
|
267
|
-
|
|
268
|
-
### Single agent
|
|
269
|
-
|
|
270
|
-
```typescript
|
|
271
|
-
subagent({
|
|
272
|
-
agent: "oracle",
|
|
273
|
-
task: "Review my current direction and challenge assumptions."
|
|
274
|
-
})
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Forked context
|
|
278
|
-
|
|
279
|
-
```typescript
|
|
280
|
-
subagent({
|
|
281
|
-
agent: "oracle",
|
|
282
|
-
task: "Review my current direction and challenge assumptions."
|
|
283
|
-
})
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
`context: "fork"` creates a branched child session from the current persisted
|
|
287
|
-
parent session. It does **not** create a fresh minimal review context or filter
|
|
288
|
-
history down to only the relevant parts. Use it when you want a separate review
|
|
289
|
-
or execution thread that can still reference the parent session history.
|
|
290
|
-
|
|
291
|
-
### Parallel execution
|
|
292
|
-
|
|
293
|
-
```typescript
|
|
294
|
-
subagent({
|
|
295
|
-
tasks: [
|
|
296
|
-
{ agent: "scout", task: "Explore the auth module" },
|
|
297
|
-
{ agent: "reviewer", task: "Review the API client" }
|
|
298
|
-
]
|
|
299
|
-
})
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Top-level parallel tasks can override per-task behavior:
|
|
303
|
-
|
|
304
|
-
```typescript
|
|
305
|
-
subagent({
|
|
306
|
-
tasks: [
|
|
307
|
-
{ agent: "scout", task: "Map auth", output: "auth-context.md", progress: true },
|
|
308
|
-
{ agent: "researcher", task: "Research OAuth best practices", output: "oauth-research.md" },
|
|
309
|
-
{ agent: "reviewer", task: "Review auth tests", model: "anthropic/claude-sonnet-4" }
|
|
310
|
-
],
|
|
311
|
-
concurrency: 3
|
|
312
|
-
})
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
Avoid duplicate output paths in parallel tasks. Concurrent children should not write to the same file. For large saved outputs, set `outputMode: "file-only"` together with an `output` path. The parent result then contains only a compact reference like `Output saved to: /abs/report.md (48.2 KB, 2847 lines). Read this file if needed.` instead of the full saved content. Do not use `output: false` for this; `output: false` means no file output. When a task is review-only, say “do not modify project/source files” rather than “do not write files” if you also configured `output`; otherwise the child may treat the output artifact as forbidden. Failed runs and save errors still return inline details for debugging.
|
|
316
|
-
|
|
317
|
-
### Chain execution
|
|
318
|
-
|
|
319
|
-
```typescript
|
|
320
|
-
subagent({
|
|
321
|
-
chain: [
|
|
322
|
-
{ agent: "scout", task: "Map the auth flow and summarize key files" },
|
|
323
|
-
{ agent: "planner", task: "Create an implementation plan from {previous}" },
|
|
324
|
-
{ agent: "worker", task: "Implement the approved plan based on {previous}" }
|
|
325
|
-
]
|
|
326
|
-
})
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
Chain steps can use templated variables such as `{task}`, `{previous}`,
|
|
330
|
-
`{chain_dir}`, and `{outputs.name}`. Use `as: "name"` on a successful step or
|
|
331
|
-
parallel task to make that output available to later steps. Prefer named outputs
|
|
332
|
-
when a later step needs one specific result; keep `{previous}` for simple linear
|
|
333
|
-
handoffs or full fan-in summaries. Use `phase` and `label` for status readability.
|
|
334
|
-
Use `outputSchema` when later steps need reliable structured data; the child must
|
|
335
|
-
call `structured_output` with schema-valid JSON, or the step fails.
|
|
336
|
-
|
|
337
|
-
### Async/background
|
|
338
|
-
|
|
339
|
-
Prefer async mode for every subagent launch. Set `async: true` no matter the task unless there is a specific reason to opt into a foreground/blocking run. This applies to scouts, researchers, workers, reviewers, validators, oracle checks, one-off delegates, chains, and parallel groups. Keep the write path single-threaded even when the run is async.
|
|
340
|
-
|
|
341
|
-
Async does not mean parallel writes. Do not edit the same active worktree while an async worker is changing it. Parent-side overlap should be reading, validation prep, synthesis, command planning, or review of unaffected context unless the writer is isolated in a separate worktree.
|
|
342
|
-
|
|
343
|
-
Do not end your turn immediately after launching an async child if you promised to keep working. Continue the local inspection, synthesis, or validation prep, then check the async run when its result is needed.
|
|
344
|
-
|
|
345
|
-
When there is no independent work left and you just need the next async result, **call `wait()`** rather than `sleep`/status-polling loops. `wait()` returns when the next active run finishes or needs attention and keeps the turn alive for normal notification delivery. Use `wait({ all: true })` to drain every active run, `wait({ id: "..." })` to block on one run, and `wait({ timeoutMs })` to cap how long you block.
|
|
346
|
-
|
|
347
|
-
Prefer `wait()` over ending the turn whenever you must keep going to finish the job — inside a skill that has to run to completion, or in any non-interactive run (`dm --print ...`) where the whole task is a single turn. In those cases ending the turn abandons the still-running children, because there is no next turn to receive their completion. Only end the turn to wait when you are in an interactive session and are certain the user will prompt you again; then DM will wake you when the run finishes.
|
|
348
|
-
|
|
349
|
-
```typescript
|
|
350
|
-
subagent({
|
|
351
|
-
agent: "worker",
|
|
352
|
-
task: "Run the full test suite",
|
|
353
|
-
async: true
|
|
354
|
-
})
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
File-only output mode also works for async single runs, top-level parallel task items, sequential chain steps, and chain parallel task items. In chains, `{previous}` receives the compact saved-file reference when the prior step used file-only mode.
|
|
358
|
-
|
|
359
|
-
For review fanout where the parent continues a local audit:
|
|
360
|
-
|
|
361
|
-
```typescript
|
|
362
|
-
const run = subagent({
|
|
363
|
-
agent: "reviewer",
|
|
364
|
-
task: "Review the current diff for correctness issues. Do not edit files.",
|
|
365
|
-
async: true,
|
|
366
|
-
context: "fresh"
|
|
367
|
-
})
|
|
368
|
-
// Continue local inspection, then later call status with the returned id.
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
Inspect async runs with `subagent({ action: "status", id: "..." })` or `subagent({ action: "status" })` for active runs. Use `subagent({ action: "status", view: "fleet" })` when supervising several active foreground/background runs and `subagent({ action: "status", id: "...", view: "transcript", index: 0 })` when you need the latest child output without digging through artifacts. If a delegated fanout child launches nested runs, the parent status view shows them as a tree and you can target a nested run directly with its nested id.
|
|
372
|
-
|
|
373
|
-
Use `resume` for follow-up work after a delegated run:
|
|
374
|
-
|
|
375
|
-
```typescript
|
|
376
|
-
subagent({ action: "resume", id: "run-id", message: "Follow up on this point." })
|
|
377
|
-
subagent({ action: "resume", id: "run-id", index: 1, message: "Continue reviewer 2." })
|
|
378
|
-
subagent({ action: "resume", id: "nested-run-id", message: "Continue this nested reviewer." })
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
Resume behavior:
|
|
382
|
-
- If an async child is still running and reachable, `resume` sends the follow-up to that live child over intercom.
|
|
383
|
-
- If an async child has completed, `resume` revives it by starting a new async child from the persisted child session file.
|
|
384
|
-
- Multi-child async runs require `index` unless only one running child is selectable.
|
|
385
|
-
- Completed foreground single, parallel, and chain runs can also be revived by `index` while their run metadata remains in extension state.
|
|
386
|
-
- Nested runs can be resumed by nested id when a live route or persisted nested session metadata is available.
|
|
387
|
-
- Revive starts a new child process from the old session context; it does not restart the same OS process.
|
|
388
|
-
- If the chosen child has no persisted `.jsonl` session file, resume fails and reports that directly.
|
|
389
|
-
|
|
390
|
-
Use diagnostics when setup or child startup looks wrong:
|
|
391
|
-
|
|
392
|
-
```typescript
|
|
393
|
-
subagent({ action: "doctor" })
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
### Scheduled subagent runs
|
|
397
|
-
|
|
398
|
-
Scheduled runs defer a subagent launch until a future time. They are opt-in and require `{ "scheduledRuns": { "enabled": true } }` in `~/.dm/agent/extensions/subagent/config.json`. Only schedule explicit delayed runs the user asked for; do not schedule runs speculatively.
|
|
399
|
-
|
|
400
|
-
```typescript
|
|
401
|
-
// Launch a reviewer in 30 minutes
|
|
402
|
-
subagent({ action: "schedule", agent: "reviewer", task: "Review the diff for correctness issues.", schedule: "+30m", scheduleName: "evening review" })
|
|
403
|
-
|
|
404
|
-
// Schedule a parallel fanout
|
|
405
|
-
subagent({ action: "schedule", tasks: [{ agent: "scout", task: "Map the auth module" }, { agent: "scout", task: "Map the billing module" }], schedule: "+1h" })
|
|
406
|
-
|
|
407
|
-
// Inspect, list, and cancel
|
|
408
|
-
subagent({ action: "schedule-list" })
|
|
409
|
-
subagent({ action: "schedule-status", id: "ab12" })
|
|
410
|
-
subagent({ action: "schedule-cancel", id: "ab12" })
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
`schedule` accepts the same execution fields as a normal async run (`agent`/`tasks`/`chain`, `cwd`, `model`, `output`, `reads`, `progress`, `acceptance`, `timeoutMs`) plus `schedule` (a relative delay like `+10m`/`+2h`/`+1d` or a future ISO timestamp with a timezone such as `2030-01-01T09:00:00Z`) and an optional `scheduleName`. Scheduled runs always launch async with fresh context; `context: "fork"`, `async: false`, and `clarify: true` are rejected. Once the timer fires, the run becomes a normal tracked async run: it appears in the async widget, is inspectable with `subagent({ action: "status" })`, can be awaited with `wait()`, and delivers the normal completion notification.
|
|
414
|
-
|
|
415
|
-
Schedules are persisted per session and restored after a DM restart. A job whose scheduled time passed by more than `scheduledRuns.maxLatenessMs` (default 5 minutes) while DM was unavailable is marked `missed` instead of firing late. `scheduledRuns.maxPending` (default 20) caps pending or running scheduled jobs per session.
|
|
416
|
-
|
|
417
|
-
Humans can use `/subagents-doctor` for the same read-only report. It checks runtime paths, discovery counts, async support, current session context, and intercom bridge state.
|
|
418
|
-
|
|
419
|
-
### Subagent control
|
|
420
|
-
|
|
421
|
-
Subagent control is the runtime visibility and intervention layer for delegated runs. It is separate from lifecycle status. Lifecycle status says whether a child is `queued`, `running`, `paused`, `complete`, or `failed`. Activity reporting is factual: it tracks the last observed activity time and the current tool when known. It does not pretend to know that a child is truly stuck.
|
|
422
|
-
|
|
423
|
-
Default behavior is intentionally conservative. When no activity has been observed past the configured threshold, the run emits a `needs_attention` control event. Foreground runs can push this as a `subagent:control-event` event, and async runs persist it to `events.jsonl` so the parent tracker can surface it without constant manual polling. Notification-worthy control events are also inserted into the visible transcript so both the user and the parent agent can see them, with a proactive hint plus concrete `nudge`, `status`, and `interrupt` options. Visible notifications fire once per child run and attention state.
|
|
424
|
-
|
|
425
|
-
Use soft interrupt when a child is clearly blocked or drifting and the parent needs to regain control:
|
|
426
|
-
|
|
427
|
-
```typescript
|
|
428
|
-
subagent({ action: "interrupt" })
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
Pass `id` when targeting a specific controllable run, including a nested run shown in the parent status tree:
|
|
432
|
-
|
|
433
|
-
```typescript
|
|
434
|
-
subagent({ action: "interrupt", id: "abc123" })
|
|
435
|
-
subagent({ action: "interrupt", id: "nested-run-id" })
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
A soft interrupt cancels the current child turn and leaves the run paused. It does not mean the delegated task succeeded or failed. Bare `interrupt` does not target hidden nested descendants; use the explicit nested id. After an interrupt, decide the next explicit action: resume with clearer instructions, replace the task, ask the user, or stop the workflow.
|
|
439
|
-
|
|
440
|
-
Per-run control thresholds can be overridden when a task legitimately runs without observable output for longer than usual:
|
|
441
|
-
|
|
442
|
-
```typescript
|
|
443
|
-
subagent({
|
|
444
|
-
agent: "worker",
|
|
445
|
-
task: "Run the slow migration test suite",
|
|
446
|
-
control: {
|
|
447
|
-
needsAttentionAfterMs: 300000,
|
|
448
|
-
notifyOn: ["needs_attention"]
|
|
449
|
-
}
|
|
450
|
-
})
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
If the run already has an active intercom bridge target, needs-attention notifications can also prepare a compact intercom ping for the orchestrator. When a child route is available, the ping tells the orchestrator which agent needs attention and includes the exact `intercom({ action: "send", to: "..." })` target for a nudge. Do not invent a target or ask the child to self-report when no bridge exists.
|
|
454
|
-
|
|
455
|
-
## Clarify TUI
|
|
456
|
-
|
|
457
|
-
Single and parallel runs support a clarification TUI when you want to preview or
|
|
458
|
-
edit parameters before launch:
|
|
459
|
-
|
|
460
|
-
```typescript
|
|
461
|
-
subagent({
|
|
462
|
-
agent: "worker",
|
|
463
|
-
task: "Implement feature X",
|
|
464
|
-
clarify: true
|
|
465
|
-
})
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
Tool calls launch directly by default. Set `clarify: true` on single, parallel, or chain runs when you want the clarify UI. Clarify edits affect only the next run; use management actions, settings, or markdown files for persistent changes.
|
|
469
|
-
For programmatic background launches, use `async: true`. `clarify: true` keeps the run foreground for the clarify UI.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
## Worktree Isolation
|
|
473
|
-
|
|
474
|
-
When multiple agents might write concurrently, use worktrees instead of letting
|
|
475
|
-
them share one filesystem view.
|
|
476
|
-
|
|
477
|
-
```typescript
|
|
478
|
-
subagent({
|
|
479
|
-
tasks: [
|
|
480
|
-
{ agent: "worker", task: "Implement feature A" },
|
|
481
|
-
{ agent: "worker", task: "Implement feature B" }
|
|
482
|
-
],
|
|
483
|
-
worktree: true
|
|
484
|
-
})
|
|
485
|
-
```
|
|
486
|
-
|
|
487
|
-
`worktree: true` gives each parallel task its own git worktree branched from
|
|
488
|
-
HEAD. This requires a clean git state and is mainly for intentionally parallel
|
|
489
|
-
write workflows. If you want one writer thread and several advisory agents,
|
|
490
|
-
prefer a single-writer pattern instead.
|
|
491
|
-
|
|
492
|
-
## The Oracle Workflow
|
|
493
|
-
|
|
494
|
-
The intended oracle loop is:
|
|
495
|
-
1. the main agent forks to `oracle`
|
|
496
|
-
2. `oracle` reviews direction, drift, assumptions, and risks
|
|
497
|
-
3. `oracle` can coordinate back through `contact_supervisor` when the bridge injects it
|
|
498
|
-
4. the main agent decides what direction to approve
|
|
499
|
-
5. only then should `worker` implement
|
|
500
|
-
|
|
501
|
-
```typescript
|
|
502
|
-
// Advisory review in a branched thread. Oracle defaults to forked context.
|
|
503
|
-
subagent({
|
|
504
|
-
agent: "oracle",
|
|
505
|
-
task: "Review my current direction, challenge assumptions, and propose the best next move."
|
|
506
|
-
})
|
|
507
|
-
|
|
508
|
-
// Implementation only after explicit approval. Worker defaults to forked context.
|
|
509
|
-
subagent({
|
|
510
|
-
agent: "worker",
|
|
511
|
-
task: "Implement the approved approach: ..."
|
|
512
|
-
})
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
`oracle` is not a fresh-context reviewer in the Cognition article sense. It is
|
|
516
|
-
a forked advisory thread that inherits the parent session history and uses that
|
|
517
|
-
history as a baseline contract.
|
|
518
|
-
|
|
519
|
-
Use `oracle` as a smart-friend escalation when the parent needs help with trajectory rather than diff inspection: architectural boundaries, model capability routing, merge conflicts, reviewer disagreement, context drift after long work, a worker about to invent a pattern, or fixes that require product/scope tradeoffs. Ask broad questions when the right concern is unclear, and let `oracle` point out missing context or files the parent should inspect before asking again. Keep `oracle` advisory unless it has been explicitly assigned the single writer role.
|
|
520
|
-
|
|
521
|
-
## Subagent + Intercom Coordination
|
|
522
|
-
|
|
523
|
-
`dm-subagents` includes native supervisor coordination. Child agents can use `contact_supervisor` to ask the exact parent session that spawned them; messages are scoped by parent session id and should not appear in other DM sessions.
|
|
524
|
-
|
|
525
|
-
Most agents should not call generic `intercom` directly unless bridge instructions provide a target and `contact_supervisor` is unavailable. Do not invent a target. Prefer the tool from the injected bridge instructions.
|
|
526
|
-
|
|
527
|
-
Use `contact_supervisor` with `reason: "need_decision"` when:
|
|
528
|
-
- a subagent is blocked on a decision
|
|
529
|
-
- a child needs clarification instead of guessing
|
|
530
|
-
- an approval, product, API, or scope choice is required before continuing safely
|
|
531
|
-
|
|
532
|
-
Do not use `contact_supervisor` just to resolve review-only/no-project-edit versus progress-writing or output-artifact instructions. The child must not modify project/source files, but returning findings through its normal response or configured output artifact is allowed unless the parent explicitly set `output: false`.
|
|
533
|
-
|
|
534
|
-
Use `contact_supervisor` with `reason: "progress_update"` when:
|
|
535
|
-
- a child is explicitly asked for progress
|
|
536
|
-
- a meaningful discovery changes the plan
|
|
537
|
-
- a long-running child needs to report a blocked/progress checkpoint without waiting for normal tool return flow
|
|
538
|
-
|
|
539
|
-
Message conventions:
|
|
540
|
-
- `reason: "need_decision"` waits for the parent reply and returns it to the child.
|
|
541
|
-
- `reason: "progress_update"` is non-blocking and should stay concise.
|
|
542
|
-
- Child-side routine completion handoffs are not expected. Native supervisor messages are for decisions, structured input, and meaningful progress updates while a child is still running.
|
|
543
|
-
|
|
544
|
-
If bridge instructions provide the child-facing tool, a child can ask:
|
|
545
|
-
|
|
546
|
-
```typescript
|
|
547
|
-
contact_supervisor({
|
|
548
|
-
reason: "need_decision",
|
|
549
|
-
message: "Should I optimize for readability or performance here?"
|
|
550
|
-
})
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
The parent replies with the native supervisor tool:
|
|
554
|
-
|
|
555
|
-
```typescript
|
|
556
|
-
subagent_supervisor({ action: "reply", message: "Optimize for readability." })
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
Or inspects unresolved asks first:
|
|
560
|
-
|
|
561
|
-
```typescript
|
|
562
|
-
subagent_supervisor({ action: "pending" })
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
If no external `pi-intercom` tool owns the `intercom` name, native supervisor coordination may also expose `intercom` as a compatibility fallback. Prefer `subagent_supervisor` for parent replies because it never overrides installed `pi-intercom`.
|
|
566
|
-
|
|
567
|
-
If intercom messages do not show up, run `subagent({ action: "doctor" })` or `/subagents-doctor`.
|
|
568
|
-
|
|
569
|
-
## Management Mode
|
|
570
|
-
|
|
571
|
-
The `subagent(...)` tool also supports management actions.
|
|
572
|
-
|
|
573
|
-
### List available agents and chains
|
|
574
|
-
|
|
575
|
-
```typescript
|
|
576
|
-
subagent({ action: "list" })
|
|
577
|
-
```
|
|
578
|
-
|
|
579
|
-
### Create an agent
|
|
580
|
-
|
|
581
|
-
```typescript
|
|
582
|
-
subagent({
|
|
583
|
-
action: "create",
|
|
584
|
-
config: {
|
|
585
|
-
name: "my-agent",
|
|
586
|
-
package: "code-analysis",
|
|
587
|
-
description: "Project-specific implementation helper",
|
|
588
|
-
systemPrompt: "Your system prompt here.",
|
|
589
|
-
systemPromptMode: "replace",
|
|
590
|
-
model: "openai-codex/gpt-5.4",
|
|
591
|
-
tools: "read,grep,find,ls,bash"
|
|
592
|
-
}
|
|
593
|
-
})
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
### Update an agent
|
|
597
|
-
|
|
598
|
-
```typescript
|
|
599
|
-
subagent({
|
|
600
|
-
action: "update",
|
|
601
|
-
agent: "code-analysis.my-agent",
|
|
602
|
-
config: {
|
|
603
|
-
thinking: "high"
|
|
604
|
-
}
|
|
605
|
-
})
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
### Delete an agent
|
|
609
|
-
|
|
610
|
-
```typescript
|
|
611
|
-
subagent({ action: "delete", agent: "code-analysis.my-agent" })
|
|
612
|
-
```
|
|
613
|
-
|
|
614
|
-
### Eject, disable, enable, and reset
|
|
615
|
-
|
|
616
|
-
```typescript
|
|
617
|
-
// Copy a bundled builtin/package agent to user scope as an editable custom file.
|
|
618
|
-
subagent({ action: "eject", agent: "reviewer" })
|
|
619
|
-
subagent({ action: "eject", agent: "reviewer", agentScope: "project" })
|
|
620
|
-
|
|
621
|
-
// Hide an agent from runtime discovery without deleting it (reversible).
|
|
622
|
-
subagent({ action: "disable", agent: "reviewer" })
|
|
623
|
-
subagent({ action: "enable", agent: "reviewer", agentScope: "project" })
|
|
624
|
-
|
|
625
|
-
// Delete the scope's custom agent file and/or settings override, restoring the bundled default.
|
|
626
|
-
subagent({ action: "reset", agent: "reviewer" })
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
`eject` copies a builtin or package agent verbatim into the user (default) or project agent dir so it can be customized without hunting package files; the copy shadows the original by runtime name. `disable` writes a reversible `agentOverrides.<name>.disabled: true` entry to the user or project settings file. `enable` removes that `disabled` field while keeping any other override fields. `reset` removes the scope's custom file and settings override to restore the bundled default, and refuses if no bundled default exists (use `delete` for purely custom agents). All four take optional `agentScope: "user" | "project"`; project overrides win over user ones, so target the project scope to undo a project-scope disable.
|
|
630
|
-
|
|
631
|
-
Use management actions when the system needs to create or edit subagents on
|
|
632
|
-
demand without dropping into raw file editing.
|
|
633
|
-
|
|
634
|
-
Management actions create or update user/project agent files. `config.name` is the local frontmatter name; optional `config.package` registers and looks up the runtime name as `{package}.{name}`. Use the dotted runtime name for `get`, `update`, `delete`, slash commands, and chain steps. For small builtin changes such as a model swap, prefer `subagents.agentOverrides` in settings.
|
|
635
|
-
|
|
636
|
-
## Creating and Editing Agents by File
|
|
637
|
-
|
|
638
|
-
A minimal agent file looks like this:
|
|
639
|
-
|
|
640
|
-
```markdown
|
|
641
|
-
---
|
|
642
|
-
name: my-agent
|
|
643
|
-
package: code-analysis
|
|
644
|
-
description: What this agent does
|
|
645
|
-
model: openai-codex/gpt-5.4
|
|
646
|
-
thinking: high
|
|
647
|
-
tools: read, grep, find, ls, bash
|
|
648
|
-
systemPromptMode: replace
|
|
649
|
-
inheritProjectContext: true
|
|
650
|
-
inheritSkills: false
|
|
651
|
-
---
|
|
652
|
-
|
|
653
|
-
Your system prompt here.
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
That is only a starting point. Omit `package` for the traditional unqualified runtime name. Common optional fields include:
|
|
657
|
-
- `defaultProgress`
|
|
658
|
-
- `defaultReads`
|
|
659
|
-
- `output`
|
|
660
|
-
- `fallbackModels`
|
|
661
|
-
- `maxSubagentDepth`
|
|
662
|
-
|
|
663
|
-
For many customizations, builtin overrides in settings are lower-friction than
|
|
664
|
-
copying a full builtin file.
|
|
665
|
-
|
|
666
|
-
## Prompt Template Integration
|
|
667
|
-
|
|
668
|
-
The package includes prompt shortcuts for common workflows: `/parallel-review`,
|
|
669
|
-
`/review-loop`, `/parallel-research`, `/parallel-context-build`,
|
|
670
|
-
`/parallel-handoff-plan`, `/gather-context-and-clarify`, and
|
|
671
|
-
`/parallel-cleanup`. Use them when the user wants repeatable review,
|
|
672
|
-
review/fix loops, research, context handoff, implementation handoff,
|
|
673
|
-
clarification, or cleanup-review patterns. `/parallel-review autofix` and
|
|
674
|
-
`/parallel-cleanup autofix` synthesize reviewer feedback and then apply only the
|
|
675
|
-
fixes worth doing now. Parent agents can also apply the same recipes directly
|
|
676
|
-
with `subagent(...)` when the user describes the workflow in natural language
|
|
677
|
-
instead of invoking a slash command.
|
|
678
|
-
|
|
679
|
-
Additional user prompt templates can delegate into `dm-subagents` through the native `/prompt-workflow` and `/chain-prompts` commands. This is useful when a slash command should always run through a particular agent or with forked context. Prompt frontmatter can set `subagent`, `model`, `skill`, `cwd`, `worktree`, `fresh`, `fork`, or `inheritContext` for the native adapter.
|
|
680
|
-
|
|
681
|
-
## Extension RPC
|
|
682
|
-
|
|
683
|
-
Other DM extensions can call `dm-subagents` through the in-process event bus. The stable v1 channels are `subagents:rpc:v1:ready`, `subagents:rpc:v1:request`, and per-request replies at `subagents:rpc:v1:reply:<requestId>`. Envelopes use `{ version: 1, requestId, method, params }`, and replies use `{ version: 1, requestId, success, data | error }`.
|
|
684
|
-
|
|
685
|
-
Methods: `ping`, `status`, `spawn`, `interrupt`, and `stop`. `spawn` is async-only and rejects management actions, `async: false`, or `clarify: true`; it reuses the normal executor, so discovery, validation, session attribution, spawn limits, child-safety depth, artifacts, and async status are shared with the `subagent` tool. `status` and `interrupt` map to the normal control actions. `stop` targets running async runs through the existing timeout control channel. `pi.events` is process-local, so separate DM processes and child subagents need lifecycle artifact files or `pi-intercom` instead.
|
|
686
|
-
|
|
687
|
-
## Important Constraints
|
|
688
|
-
|
|
689
|
-
- **Forking requires a persisted parent session.** If the current session does not
|
|
690
|
-
have a persisted session file, forked runs fail. Packaged `planner`, `worker`,
|
|
691
|
-
and `oracle` default to forked context, so use `context: "fresh"` explicitly
|
|
692
|
-
when that is not available or not wanted.
|
|
693
|
-
- **Forked runs inherit parent history.** They are branched threads, not fresh
|
|
694
|
-
filtered contexts. Use fresh context for adversarial reviewers unless the user explicitly asks for forked context.
|
|
695
|
-
- **Default subagent nesting depth is 2.** Deeper recursive delegation is blocked
|
|
696
|
-
unless configured otherwise.
|
|
697
|
-
- **Attention signals are not lifecycle state.** `needs_attention` means no activity has been observed past the configured threshold. `paused` means the child turn was intentionally interrupted or is awaiting direction; it is not the same as `failed`.
|
|
698
|
-
- **Intercom asks are blocking.** A session can only maintain one pending outbound
|
|
699
|
-
ask wait state at a time.
|
|
700
|
-
- **Keep conversational authority clear.** Advisory subagents should not silently
|
|
701
|
-
become second decision-makers.
|
|
702
|
-
|
|
703
|
-
## Best Practices
|
|
704
|
-
|
|
705
|
-
### Prefer async orchestration
|
|
706
|
-
|
|
707
|
-
Launch every subagent asynchronously by default. Use `async: true` for scouts, researchers, workers, reviewers, validators, oracle checks, one-off delegates, chains, and parallel groups unless you intentionally need a foreground/blocking run. The parent should keep moving: inspect code while scouts run, prepare validation while a worker implements, do a local diff pass while reviewers review, and synthesize or verify while a fix worker applies accepted feedback. Async is the default orchestration posture; foreground runs are the explicit opt-out.
|
|
708
|
-
|
|
709
|
-
### Use wait() to block until async runs finish
|
|
710
|
-
|
|
711
|
-
When you have launched async runs and have no independent work left but must keep going to finish the task, call `wait()`. It blocks the current turn until the next run completes or needs attention, keeps the turn alive for normal notification delivery, then returns.
|
|
712
|
-
|
|
713
|
-
- `wait()` — return when the next active async run in this session finishes or needs attention.
|
|
714
|
-
- `wait({ all: true })` — block until every active async run in this session finishes or one needs attention.
|
|
715
|
-
- `wait({ id: "..." })` — block on one run (id or prefix).
|
|
716
|
-
- `wait({ timeoutMs })` — cap the block; the runs keep going if it elapses.
|
|
717
|
-
|
|
718
|
-
`wait()` is the correct way to keep N workers in flight: launch N, call `wait()`, react to the result, launch a replacement if needed, then call `wait()` again. Use `wait({ all: true })` only when you intentionally want to drain the fleet to zero. Reserve ending-the-turn-to-wait for interactive sessions where the user will prompt you again; in a skill that must complete or a non-interactive `dm --print` run there is no next turn, so `wait()` is required to avoid abandoning live children.
|
|
719
|
-
|
|
720
|
-
### Keep writes single-threaded by default
|
|
721
|
-
|
|
722
|
-
A strong pattern is one main decision-maker plus advisory/research/review/validation subagents around it. Use `oracle` for advice and `worker` for the actual write path. Parallelize reading, review, validation, and synthesis support, not normal writes, unless you deliberately isolate writers with worktrees. A child that writes should report what changed, what was left undone, commands run with exit codes, validation evidence, surprises, and any decisions that need parent approval.
|
|
723
|
-
|
|
724
|
-
### Use fork for branched advisory or execution threads
|
|
725
|
-
|
|
726
|
-
Forked runs are useful when the child should reason in a separate thread while
|
|
727
|
-
still inheriting the parent’s accumulated context. They are especially useful for
|
|
728
|
-
`oracle`, which audits inherited decisions and drift. For adversarial code review,
|
|
729
|
-
prefer fresh-context reviewers that inspect the repo and diff directly unless the
|
|
730
|
-
user explicitly requests forked context.
|
|
731
|
-
|
|
732
|
-
### Prefer narrow tasks
|
|
733
|
-
|
|
734
|
-
Give subagents specific tasks rather than vague mandates.
|
|
735
|
-
`Review auth.ts for null-check gaps` works better than `Review everything`.
|
|
736
|
-
|
|
737
|
-
### Escalate decisions upward
|
|
738
|
-
|
|
739
|
-
If a subagent encounters an unapproved product, architecture, or scope choice,
|
|
740
|
-
it should coordinate back via `intercom` instead of deciding alone.
|
|
741
|
-
|
|
742
|
-
### Intervene only on clear control signals
|
|
743
|
-
|
|
744
|
-
Use subagent control proactively when a delegated run emits `needs_attention`, or when a human asks you to regain control. Do not interrupt just because a child has briefly produced no output. Silence can be normal during long tool calls, test runs, or model reasoning.
|
|
745
|
-
|
|
746
|
-
### Name sessions meaningfully
|
|
747
|
-
|
|
748
|
-
Use `/name` so intercom targeting stays stable.
|
|
749
|
-
|
|
750
|
-
## Common Workflows
|
|
751
|
-
|
|
752
|
-
### Recon → Plan → Implement
|
|
753
|
-
|
|
754
|
-
```typescript
|
|
755
|
-
subagent({
|
|
756
|
-
chain: [
|
|
757
|
-
{ agent: "scout", task: "Map the auth flow and summarize relevant files" },
|
|
758
|
-
{ agent: "planner", task: "Plan the migration from {previous}" },
|
|
759
|
-
{ agent: "worker", task: "Implement the approved plan from {previous}" }
|
|
760
|
-
]
|
|
761
|
-
})
|
|
762
|
-
```
|
|
763
|
-
|
|
764
|
-
### Clarify → Plan → Implement → Review (self-orchestrated workflow)
|
|
765
|
-
|
|
766
|
-
When you are the orchestrating agent for a new feature or non-trivial change, factor in the packaged prompt workflows without literally invoking slash commands. Use the same patterns through tools and subagents.
|
|
767
|
-
|
|
768
|
-
Keep builtin agent defaults unless the user explicitly asks for a different model, thinking level, skills, output behavior, context mode, or other override. Do not add overrides just because you are orchestrating; the defaults encode the intended role behavior. In particular, packaged `planner`, `worker`, and `oracle` default to forked context.
|
|
769
|
-
|
|
770
|
-
When the user approves launching a subagent to carry out a plan or workflow, treat that as approval to generate a proper role-specific meta prompt for that subagent. Include the approved plan path or summary, clarified requirements, non-goals, relevant context, role boundaries, files or areas to inspect, acceptance criteria, expected output, and validation expectations. Do not pass vague instructions like “implement the plan fully” or “review this” by themselves.
|
|
771
|
-
|
|
772
|
-
- `/gather-context-and-clarify` maps to: launch `scout` and, when needed, `researcher`; synthesize findings; then use `interview` to ask every clarification question needed for shared understanding.
|
|
773
|
-
- `/parallel-review` maps to: launch fresh-context `reviewer` agents with distinct review angles; synthesize the feedback before applying anything.
|
|
774
|
-
- `/review-loop` maps to: keep the parent in charge of worker → fresh reviewers → synthesized fix worker cycles until no fixes worth doing now remain, an unapproved decision appears, or the review-round cap is reached.
|
|
775
|
-
- `/parallel-research` maps to: combine local `scout` context with external `researcher` evidence when current docs, ecosystem behavior, or API details matter.
|
|
776
|
-
- `/parallel-context-build` maps to: run a chain-mode parallel group of `context-builder` agents with distinct temp output paths, then synthesize their context and meta-prompt sections.
|
|
777
|
-
- `/parallel-handoff-plan` maps to: run external `researcher` plus local/strategy `context-builder` passes, then a synthesis `context-builder` that writes an implementation handoff plan and implementation-ready meta-prompt.
|
|
778
|
-
- `/parallel-cleanup` maps to: use review-only cleanup passes after implementation, especially for simplicity, verbosity, and redundant tests.
|
|
779
|
-
|
|
780
|
-
For feature work, use this sequence as scaffolding for parent-agent behavior:
|
|
781
|
-
|
|
782
|
-
```text
|
|
783
|
-
clarify → validation contract → planner → async worker → parallel async fresh-context reviewers/validators → async fix worker → follow-up review when warranted → parent review
|
|
784
|
-
```
|
|
785
|
-
|
|
786
|
-
The validation contract defines acceptance before code is written: expected behavior, acceptance checks, commands or user flows to exercise, and evidence the worker should return. Keep it lightweight for small tasks, but make it explicit enough that reviewers and validators are checking the intended outcome rather than the worker’s own assumptions.
|
|
787
|
-
|
|
788
|
-
Use the structured `acceptance` field when the run should carry an explicit acceptance contract. If omitted, subagents infer an effective acceptance policy from role, mode, and risk. Use `level: "checked"` for ordinary writer evidence gates, `level: "verified"` when the runtime should run explicit validation commands, and `level: "reviewed"` only when an independent reviewer result is expected. Do not call a run reviewed just because the worker says it is done; reviewed means a reviewer gate returned a result. Child-reported command success is evidence, not runtime verification.
|
|
789
|
-
|
|
790
|
-
The first `worker` implements the approved plan. The parent continues with independent inspection or validation prep while it runs, not parallel edits to the same worktree. When the async worker completes, treat its handoff as the transition into review, not as final completion, unless the user explicitly asked for worker-only work, review-only output, or to stop after implementation. Parallel reviewers inspect the resulting diff from fresh context. Validators check behavior with the best available evidence: commands, tests, browser/CLI interaction, screenshots, logs, or manual reproduction notes. The final `worker` applies synthesized review fixes in forked context, then the parent looks over the final diff before completing. The parent may launch these steps as an initial async chain when the workflow is already clear, or as follow-up subagent runs after each async completion. Initial chains should pass `async: true` so the main chat is unblocked; avoid `clarify: true` unless the user asked for foreground clarification. Do not stop after parallel review unless the user explicitly asked for review-only output or the review surfaced a decision that needs approval first.
|
|
791
|
-
|
|
792
|
-
For complex work, risky changes, broad refactors, or many changed lines, increase review and validation fanout rather than trusting one reviewer. Use distinct angles such as correctness/regressions, tests/validation, simplicity/maintainability, security/privacy, performance, docs/API contracts, and user-flow behavior. When reviewers find non-trivial issues or the fix worker touches many lines, run another focused review round before final validation.
|
|
793
|
-
|
|
794
|
-
When review has already produced concrete findings across several independent areas, use staged fix orchestration: parallel read-only planners for each issue cluster, one sole writer worker for the active worktree, then parallel fresh-context validators. This is the safest way to handle a dirty worktree with many prior changes because it parallelizes judgment without parallelizing writes. Non-blocking suggestions may go into the writer prompt only if they are small, safe, and inside the approved scope; otherwise defer them explicitly.
|
|
795
|
-
|
|
796
|
-
For very large work, split into serial milestones instead of launching a swarm of writers. Each milestone gets one writer, a validation contract, fresh-context review/validation, a fix pass, and parent acceptance before the next milestone starts. Use parallel subagents inside a milestone for read-only context, research, review, and validation only.
|
|
797
|
-
|
|
798
|
-
Keep orchestration authority in the parent session. Child subagents should not launch more subagents, read this skill, or run their own orchestration loops unless the parent intentionally selected a fanout agent whose builtin `tools` includes `subagent`. Spawned subagents do not receive the `dm-subagents` skill, parent-only status/control/slash messages, or prior parent `subagent` tool-call/tool-result artifacts. Ordinary children also do not receive the `subagent` extension tool. Child context filtering strips old hidden orchestration-instruction messages when they appear in inherited history. Every child receives a boundary instruction: ordinary children are told the parent owns orchestration and they must not propose or run subagents; explicit fanout children are told to use `subagent` only for the assigned fanout work, with `maxSubagentDepth` still enforced. Implementation children must call real edit/write tools instead of printing pseudo tool calls. Pass children concrete role-specific work instead.
|
|
799
|
-
|
|
800
|
-
1. Clarify first. This is mandatory. Gather code context with `scout` or `context-builder`, add `researcher` only when external evidence matters, then ask the user clarifying questions with `interview` until scope, acceptance criteria, constraints, and non-goals are clear.
|
|
801
|
-
2. Define the validation contract. State acceptance before implementation: expected behavior, checks to run, user flows to exercise, and evidence required in the worker handoff. For UI, CLI, integration, or workflow changes, include at least one validator angle that uses the product the way a user would rather than only reading code.
|
|
802
|
-
3. Plan when useful. For complex work, call `planner` or write a plan doc yourself and get approval before implementation. For simple work, confirm shared understanding and explicitly note why planning is skipped.
|
|
803
|
-
4. Implement with one writer. After approval, launch `worker` asynchronously with a proper meta prompt that includes clarified requirements, relevant context, plan path or summary, the validation contract, and output expectations. Packaged `worker` defaults to forked context; pass `context: "fresh"` only when you intentionally want a fresh child. While it runs, prepare validation or inspect adjacent code instead of editing the same worktree.
|
|
804
|
-
5. Require a useful worker handoff. Ask the worker to report changed files, what was implemented, what was left undone, commands run with exit codes, validation evidence, surprises or new risks, decisions made inside approved scope, and decisions needing parent approval.
|
|
805
|
-
6. Review after implementation. After the worker completes, launch parallel async fresh-context `reviewer` agents for correctness/regressions, tests/validation, and simplicity/maintainability. Add security, performance, docs/API, domain-specific, or user-flow validators for complex work, risky changes, broad refactors, or many changed lines. Use `output: false` unless review artifacts are explicitly needed.
|
|
806
|
-
7. Synthesize, then run the fix worker. Separate blockers, fixes worth doing now, optional improvements, and feedback to ignore/defer, then launch an async forked `worker` to apply fixes worth doing now when the workflow is implementation-authorized. If reviewers found scope/product/architecture choices that were not approved, ask the user first instead of applying them.
|
|
807
|
-
8. Review again when warranted. If the fix worker made substantial changes or addressed non-trivial findings, run another focused parallel review round before final validation.
|
|
808
|
-
9. Validate and complete. After the fix worker and any follow-up review return, inspect the final diff yourself, run or confirm focused validation, update docs/changelog when relevant, and summarize what changed and why.
|
|
809
|
-
|
|
810
|
-
Example implementation handoff after clarification and optional planning:
|
|
811
|
-
|
|
812
|
-
```typescript
|
|
813
|
-
subagent({
|
|
814
|
-
agent: "worker",
|
|
815
|
-
task: "Implement the approved feature.\n\nClarified requirements:\n- ...\n\nPlan: see ~/Documents/docs/...-plan.md\n\nValidation contract:\n- ...\n\nReturn a handoff with changed files, what was implemented, what was left undone, commands run with exit codes, validation evidence, surprises/new risks, and decisions needing parent approval.",
|
|
816
|
-
acceptance: {
|
|
817
|
-
level: "checked",
|
|
818
|
-
evidence: ["changed-files", "tests-added", "commands-run", "residual-risks", "no-staged-files"]
|
|
819
|
-
},
|
|
820
|
-
async: true
|
|
821
|
-
})
|
|
822
|
-
```
|
|
823
|
-
|
|
824
|
-
Example review pass after implementation:
|
|
825
|
-
|
|
826
|
-
```typescript
|
|
827
|
-
subagent({
|
|
828
|
-
tasks: [
|
|
829
|
-
{ agent: "reviewer", task: "Review the current diff for correctness and regressions. Inspect changed files directly; do not rely on the worker's reasoning.", output: false },
|
|
830
|
-
{ agent: "reviewer", task: "Review the current diff for tests and validation quality against the validation contract. Inspect changed files directly.", output: false },
|
|
831
|
-
{ agent: "reviewer", task: "Review the current diff for simplicity and maintainability. Inspect changed files directly.", output: false }
|
|
832
|
-
],
|
|
833
|
-
concurrency: 3,
|
|
834
|
-
context: "fresh",
|
|
835
|
-
async: true
|
|
836
|
-
})
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
Example fix worker after parallel reviews:
|
|
840
|
-
|
|
841
|
-
```typescript
|
|
842
|
-
subagent({
|
|
843
|
-
agent: "worker",
|
|
844
|
-
task: "Apply the synthesized reviewer feedback below. Only apply fixes worth doing now; preserve user-approved scope; ask before unapproved product or architecture changes. Run focused validation and summarize what changed.\n\nReviewer synthesis:\n...",
|
|
845
|
-
async: true
|
|
846
|
-
})
|
|
847
|
-
```
|
|
848
|
-
|
|
849
|
-
### Review loop
|
|
850
|
-
|
|
851
|
-
Do not treat review as the final step for implementation work. Run reviewers and validators, synthesize their findings against user scope and the validation contract, then launch one `worker` for accepted fixes when implementation is authorized.
|
|
852
|
-
|
|
853
|
-
When an async implementation worker completes, treat the worker handoff as an intermediate state. The next parent action is review fanout, then synthesis, then a fix worker if reviewers found fixes worth doing now. This can be planned as an initial async chain when the whole workflow is known, or continued as follow-up subagent runs when the parent only launched the first worker initially. Initial chains should pass `async: true` so the main chat is unblocked; `clarify: true` is the explicit foreground opt-in.
|
|
854
|
-
|
|
855
|
-
For explicit review-loop requests, repeat worker → fresh-reviewer → synthesized-fix-worker cycles until reviewers find no blockers or fixes worth doing now, remaining feedback is optional or intentionally deferred, an unapproved product/scope/architecture decision needs the user, or the max review-round cap is reached. Default to 3 review rounds unless the user sets a different cap. For complex work, many changed lines, or any fix pass that materially changes the diff, run another focused review round before the parent’s final look; otherwise stop instead of chasing optional polish.
|
|
856
|
-
|
|
857
|
-
### Parallel non-conflicting analysis
|
|
858
|
-
|
|
859
|
-
```typescript
|
|
860
|
-
subagent({
|
|
861
|
-
tasks: [
|
|
862
|
-
{ agent: "scout", task: "Audit frontend auth flow" },
|
|
863
|
-
{ agent: "researcher", task: "Research current retry/backoff best practices" }
|
|
864
|
-
]
|
|
865
|
-
})
|
|
866
|
-
```
|
|
867
|
-
|
|
868
|
-
### Saved chain
|
|
869
|
-
|
|
870
|
-
```text
|
|
871
|
-
/run-chain review-chain -- review this branch
|
|
872
|
-
```
|
|
873
|
-
|
|
874
|
-
Use saved `.chain.md` or `.chain.json` workflows when the user wants a repeatable multi-agent flow without rewriting the chain each time. Prefer `.chain.json` for dynamic fanout or inline `outputSchema` objects; `.chain.md` remains the simple sequential/static authoring format.
|
|
875
|
-
|
|
876
|
-
## Error Handling
|
|
877
|
-
|
|
878
|
-
**"Unknown agent"**
|
|
879
|
-
```typescript
|
|
880
|
-
subagent({ action: "list" })
|
|
881
|
-
// Check available agents and chains, then confirm scope/precedence.
|
|
882
|
-
```
|
|
883
|
-
|
|
884
|
-
**Setup, discovery, or intercom confusion**
|
|
885
|
-
```typescript
|
|
886
|
-
subagent({ action: "doctor" })
|
|
887
|
-
// Check runtime paths, async support, discovery counts, current session, and intercom bridge state.
|
|
888
|
-
```
|
|
889
|
-
|
|
890
|
-
**"Max subagent depth exceeded"**
|
|
891
|
-
```typescript
|
|
892
|
-
// Flatten the workflow or raise maxSubagentDepth in config.
|
|
893
|
-
```
|
|
894
|
-
|
|
895
|
-
**"Session manager did not return a session file"**
|
|
896
|
-
```typescript
|
|
897
|
-
// Persist the current session before using context: "fork".
|
|
898
|
-
```
|
|
899
|
-
|
|
900
|
-
**Intercom "Already waiting for a reply"**
|
|
901
|
-
```typescript
|
|
902
|
-
// Resolve the current outbound ask before starting another one.
|
|
903
|
-
```
|
|
904
|
-
|
|
905
|
-
**Parallel output-path conflict**
|
|
906
|
-
```typescript
|
|
907
|
-
// Give each parallel task a distinct output path, or disable output for tasks that do not need it.
|
|
908
|
-
```
|
|
909
|
-
|
|
910
|
-
**Worktree launch fails**
|
|
911
|
-
```typescript
|
|
912
|
-
// Ensure the git working tree is clean and task cwd overrides match the shared cwd.
|
|
913
|
-
```
|
|
914
|
-
|
|
915
|
-
**Child fails before starting**
|
|
916
|
-
```typescript
|
|
917
|
-
// Inspect `subagent({ action: "status", id: "..." })`, artifact metadata/output logs, and run doctor. Extension loader errors usually appear in child output logs.
|
|
918
|
-
```
|
|
12
|
+
Choose a mode:
|
|
13
|
+
|
|
14
|
+
- **Direct mode:** For tiny or focused work, the parent handles the task
|
|
15
|
+
directly; a single bounded child handoff is fine. Skip workflow ceremony.
|
|
16
|
+
- **Orchestrator mode:** For substantial or delegated work, the parent is the
|
|
17
|
+
supervisor, arbiter, and authority holder—not the routine primary doer.
|
|
18
|
+
Subagents may own planning/design, scouting, implementation,
|
|
19
|
+
simplification/challenge, validation, and review as useful. The parent keeps
|
|
20
|
+
user intent, constraints, authority, routing, arbitration, final acceptance,
|
|
21
|
+
and publication.
|
|
22
|
+
- A useful loop for substantial work is **writer → challenge/simplify → review**;
|
|
23
|
+
the parent arbitrates between steps, and tiny tasks can skip it.
|
|
24
|
+
- Direct parent edits during orchestrator mode should be intentional, small
|
|
25
|
+
interventions with a brief reason.
|
|
26
|
+
|
|
27
|
+
Children do not spawn subagents unless the parent explicitly delegated fanout
|
|
28
|
+
and their resolved `tools` allow `subagent`.
|
|
29
|
+
|
|
30
|
+
## Launch shape
|
|
31
|
+
|
|
32
|
+
| Need | Use |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| One bounded task for one child | direct `{ agent, task }` |
|
|
35
|
+
| JavaScript control flow or data-dependent branching; sequence, fanout, retry, rolling fanout, or aggregation | `workflowScript` with `runs.run(...)` / `runs.all(...)` |
|
|
36
|
+
| A broad plan split into visible narrow stages per lane | `workflowScript` with `runs.lanes([{ key, stages: [...] }])` |
|
|
37
|
+
| Independent worktree or repository lanes | `references/multi-lane-orchestration.md` |
|
|
38
|
+
| Council of advisors | `../council-mode/SKILL.md` |
|
|
39
|
+
| Management, status, steering, authoring, or inspection | `action` |
|
|
40
|
+
|
|
41
|
+
`workflowScript` is code-driven: `runs.run(...)` for keyed steps,
|
|
42
|
+
`runs.all([...])` for fanout, plain JavaScript for branching and aggregation.
|
|
43
|
+
Keep scripts portable: use top-level `await`, plain helpers, or explicit Promise
|
|
44
|
+
chains, not nested async helpers. Legacy top-level `chain` / `tasks` inputs and
|
|
45
|
+
durable `.chain.md` execution are inspection or migration material only.
|
|
46
|
+
|
|
47
|
+
Use `runs.lanes(...)` only inside a `workflowScript`, not as a top-level mode,
|
|
48
|
+
when a broad, predeclared plan benefits from visible per-lane stages; otherwise
|
|
49
|
+
use ordinary `runs.run(...)` / `runs.all(...)`. See the [canonical staged-lane
|
|
50
|
+
example](../../docs/workflows.md#parallel-sequential-lanes). Keep assignments
|
|
51
|
+
bounded, but do not add stages or ceremony just to satisfy this skill.
|
|
52
|
+
|
|
53
|
+
Use async/background by default. Set `async:false` only when the parent must
|
|
54
|
+
block. Final reviews, validation gates, oracle checks, and publication checks
|
|
55
|
+
stay async.
|
|
56
|
+
|
|
57
|
+
In an ordinary interactive session, yield after launching or triaging useful
|
|
58
|
+
async lanes and let DM wake the parent on completion; ordinary async subagents
|
|
59
|
+
already have native completion notifications, so do not call `bg_wait()` merely
|
|
60
|
+
because a child is active. Use blocking `bg_wait()` only for provider,
|
|
61
|
+
detached, or other background work without a native notification when a
|
|
62
|
+
headless/run-to-completion contract or a required same-turn artifact makes the
|
|
63
|
+
result necessary before this turn ends. For
|
|
64
|
+
“continue/orchestrate/work until done,” keep the lane board moving while a safe
|
|
65
|
+
immediate action remains; if only async lanes are running, record the revisit
|
|
66
|
+
trigger and yield.
|
|
67
|
+
|
|
68
|
+
Package agents appear in `subagent({ action: "list" })`. External CLI/job agents
|
|
69
|
+
use their own runner contract. Do not pass native DM child options to them unless
|
|
70
|
+
that runner explicitly supports the option.
|
|
71
|
+
|
|
72
|
+
## Read the reference for the branch
|
|
73
|
+
|
|
74
|
+
| Branch | Read |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| Delegate or choose roles, prompts, models, or slash commands | `references/prompting-and-roles.md` |
|
|
77
|
+
| Execute single, scripted, async, scheduled, mission, forked, watchdog, oracle, or intercom workflows | `references/execution-controls.md` |
|
|
78
|
+
| Review, validate, triage gate failures, or prepare delivery | `references/review-and-validation.md` |
|
|
79
|
+
| Coordinate lanes, worktrees, repositories, or writer waves | `references/multi-lane-orchestration.md` |
|
|
80
|
+
| List, create, edit, disable, eject, or expose agents/RPC | `references/management-authoring-rpc.md` |
|
|
81
|
+
| Check safety constraints, recipes, or error handling | `references/constraints-and-recipes.md` |
|
|
82
|
+
|
|
83
|
+
For complex work, read `prompting-and-roles.md` and `execution-controls.md`, then
|
|
84
|
+
load `review-and-validation.md` and `constraints-and-recipes.md` before launch or
|
|
85
|
+
review.
|
|
86
|
+
|
|
87
|
+
## Operating rules
|
|
88
|
+
|
|
89
|
+
- Avoid duplicate scouts, overlapping writers, and vague prompts without a concrete deliverable.
|
|
90
|
+
- Keep the parent on the ordinary strong default model. Route workers/scouts to a fast capable tier, serious reviews to a strong tier, and top reasoning to bounded read-only critique.
|
|
91
|
+
- Exact model names are deployment policy. Put them in user/project settings or profiles, not package guidance.
|
|
92
|
+
- Give every child a compact meta-prompt checklist: objective; repo/cwd/ref; authority/edit boundary; relevant files/contracts and constraints; success/acceptance criteria; validation; expected output/report; and stop/ask conditions. See `references/prompting-and-roles.md`.
|
|
93
|
+
- For mutation work, use an isolated lane/worktree when isolation, overlap, or concurrent juggling matters; keep one writer per cwd/worktree. See `references/multi-lane-orchestration.md` for lane mechanics.
|
|
94
|
+
- Keep long/high-output validation out of chat: prefer `interactive_shell` dispatch/background monitors, bounded logs, or subagent-owned reports; return a concise summary plus report path unless same-turn output is required. See `references/execution-controls.md`.
|
|
95
|
+
- For cross-codebase work, record the repo, explicit `cwd`, authority boundary, and expected output before launch.
|
|
96
|
+
- Make parallel prompts distinct by source seam, evidence, and decision. Do not clone prompts with only item numbers swapped.
|
|
97
|
+
- Prefer fresh-context review/validation fanout, then synthesize and apply fixes in the parent.
|
|
98
|
+
- For DM extension repos under `~/.dm/agent/extensions`, put lane worktrees outside extension auto-discovery, such as `~/.dm/agent/worktrees`.
|
|
99
|
+
- Preserve capability ceilings, including child tool limits and allowed-agent restrictions.
|
|
100
|
+
- Preserve parent authority and escalate unresolved choices.
|
|
101
|
+
- Treat receipts, CI, review bots, and external-run records as evidence, not authority.
|
|
102
|
+
- For backlog maintenance, releases, merge queues, or other public-repo mutation policy, load the matching user/project skill. This package defines delegation primitives, not private policy.
|
|
103
|
+
- As a conservative orchestration policy, do not pass a hard `toolBudget` or tight `usageBudget` to mutation-capable workers. The default tool budget blocks read/search tools rather than mutation tools. If interrupted after a tool call starts, checkpoint after the current tool returns with changed files, build/test state, and commit or PR state.
|