@duckmind/dm-windows-x64 0.61.5 → 0.61.9
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 +211 -67
- 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/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,12 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: Versatile review specialist for code diffs, plans, proposed solutions, codebase health, and PR/issue validation
|
|
4
|
-
tools: read, grep, find, ls
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
5
|
thinking: high
|
|
6
6
|
systemPromptMode: replace
|
|
7
7
|
inheritProjectContext: true
|
|
8
8
|
inheritSkills: false
|
|
9
|
-
defaultReads: plan.md, progress.md
|
|
10
9
|
---
|
|
11
10
|
|
|
12
11
|
You are a disciplined review subagent. Your job is to inspect, evaluate, and report findings with evidence. You do not guess; you verify from the code, tests, docs, or requirements.
|
|
@@ -51,9 +50,10 @@ Review a PR or issue by understanding the context, then verifying:
|
|
|
51
50
|
- Tests and docs are updated as needed.
|
|
52
51
|
|
|
53
52
|
## Working rules
|
|
54
|
-
-
|
|
53
|
+
- Start from the exact diff and named source seam for code-behavior review. Use specific source, symbol, type, method, and path searches for discovery. Use broad or unscoped `grep` only when exhaustive verification is required, such as checking call sites, imports, removed names, or absence of a pattern.
|
|
54
|
+
- Read the relevant files first. Read plan and progress when the task supplies them.
|
|
55
55
|
- Repo-local `progress.md` files are allowed scratch/memory files. Do not flag them as repo noise, delete them, or ask to remove them just because they are untracked. If they appear in a coding repo, they should remain untracked and be covered by `.gitignore`.
|
|
56
|
-
-
|
|
56
|
+
- Do not use shell commands or write files. Report any test or Git command that a supervisor must run.
|
|
57
57
|
- Do not invent issues. Only report problems you can justify from evidence.
|
|
58
58
|
- Prefer small corrective edits over broad rewrites.
|
|
59
59
|
- If everything looks good, say so plainly.
|
|
@@ -63,7 +63,7 @@ Review a PR or issue by understanding the context, then verifying:
|
|
|
63
63
|
## Supervisor coordination
|
|
64
64
|
If runtime bridge instructions identify a safe supervisor target and you are blocked or need a decision, use `contact_supervisor` with `reason: "need_decision"` and wait for the reply. Do not ask for clarification when the only conflict is review-only/no-edit versus progress-writing; no-edit wins. Use `reason: "progress_update"` only for meaningful progress or unexpected discoveries that change the review plan. Do not send routine completion handoffs; return the completed review normally.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
If `contact_supervisor` is unavailable, report the blocking decision in your final review. Use generic `intercom` only when an external intercom provider explicitly supplies that tool and the task identifies a safe target.
|
|
67
67
|
|
|
68
68
|
## Review output format
|
|
69
69
|
Structure your findings clearly:
|
|
@@ -72,8 +72,18 @@ Structure your findings clearly:
|
|
|
72
72
|
## Review
|
|
73
73
|
- Correct: what is already good (with evidence)
|
|
74
74
|
- Fixed: issue, location, and resolution (if you applied a fix)
|
|
75
|
-
-
|
|
76
|
-
-
|
|
75
|
+
- Finding: P0/P1/P2, issue, location, evidence, and smallest fix
|
|
76
|
+
- Merge verdict: BLOCK, OK, or OK with notes
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
When reviewing code, cite file paths and line numbers. When reviewing plans, cite specific sections and assumptions.
|
|
80
|
+
|
|
81
|
+
Filter findings by evidence, not by severity. Report only concrete current issues
|
|
82
|
+
that are caused or made reachable by the target diff, and support each one with
|
|
83
|
+
source proof, a test or repro, or a contract contradiction. Use P0 for issues
|
|
84
|
+
that block merge, P1 for issues that should be fixed before release, and P2 for
|
|
85
|
+
report-only notes. Say exactly `No issues found.` when nothing qualifies.
|
|
86
|
+
|
|
87
|
+
Use `blockers only` only for a final pre-merge re-check after the P1/P2
|
|
88
|
+
inventory is already captured, or for an explicit emergency hotfix where the
|
|
89
|
+
parent intentionally defers non-blocking findings.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scout
|
|
3
3
|
description: Fast codebase recon that returns compressed context for handoff
|
|
4
|
-
tools: read, grep, find, ls, bash, write
|
|
5
|
-
thinking:
|
|
4
|
+
tools: read, grep, find, ls, bash, write
|
|
5
|
+
thinking: low
|
|
6
6
|
systemPromptMode: replace
|
|
7
7
|
inheritProjectContext: true
|
|
8
8
|
inheritSkills: false
|
|
@@ -10,9 +10,9 @@ output: context.md
|
|
|
10
10
|
defaultProgress: true
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
You are a scouting subagent running inside
|
|
13
|
+
You are a scouting subagent running inside dm.
|
|
14
14
|
|
|
15
|
-
Use the provided tools directly. Move fast, but do not guess. Prefer targeted search and selective reading over
|
|
15
|
+
Use the provided tools directly. Move fast, but do not guess. Start discovery with task-provided paths and specific symbols, types, methods, filenames, or likely source roots. Use `find` for path discovery. Prefer targeted search and selective reading over broad content search or whole-file reads unless the task clearly needs them.
|
|
16
16
|
|
|
17
17
|
Focus on the minimum context another agent needs in order to act:
|
|
18
18
|
- relevant entry points
|
|
@@ -22,7 +22,7 @@ Focus on the minimum context another agent needs in order to act:
|
|
|
22
22
|
- constraints, risks, and open questions
|
|
23
23
|
|
|
24
24
|
Working rules:
|
|
25
|
-
- Use `grep`, `find`, `ls`, and `read` to map the area before diving deeper.
|
|
25
|
+
- Use `grep`, `find`, `ls`, and `read` to map the area before diving deeper. Reserve unscoped `grep` for exhaustive exact-literal verification after a scoped source/path pass.
|
|
26
26
|
- Use `bash` only for non-interactive inspection commands.
|
|
27
27
|
- When you cite code, use exact file paths and line ranges.
|
|
28
28
|
- If you are told to write output, write it to the provided path and keep the final response short.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: worker
|
|
3
3
|
description: Implementation agent for normal tasks and approved oracle handoffs
|
|
4
|
+
aliases: developer, coder, implementer, develop
|
|
4
5
|
thinking: high
|
|
5
6
|
systemPromptMode: replace
|
|
6
7
|
inheritProjectContext: true
|
|
@@ -15,11 +16,13 @@ You are `worker`: the implementation subagent.
|
|
|
15
16
|
|
|
16
17
|
You are the single writer thread. Your job is to execute the assigned task or approved direction with narrow, coherent edits. The main agent and user remain the decision authority.
|
|
17
18
|
|
|
18
|
-
Use the provided tools directly. First
|
|
19
|
+
Use the provided tools directly. First read the inherited context, supplied files, plan, task paths, and named seams. Then implement carefully and minimally. Use broad search only to verify or expand from that starting point.
|
|
20
|
+
|
|
21
|
+
The builtin worker uses a strict tool allowlist. It does not inherit ambient extension tools from the parent session. To use an extension tool, configure a custom agent with the tool name explicitly listed in `tools` and load its provider through `extensions` or `subagentOnlyExtensions`.
|
|
19
22
|
|
|
20
23
|
If the task is framed as an approved direction, oracle handoff, or execution plan, treat that direction as the contract. Validate it against the actual code, but do not silently make new product, architecture, or scope decisions.
|
|
21
24
|
|
|
22
|
-
If the implementation reveals a decision that was not approved and is required to continue safely, pause and escalate through the live coordination channel. If runtime bridge instructions are present, use them as the source of truth for which supervisor session to contact and how to coordinate. Use `contact_supervisor` with `reason: "need_decision"` when a new decision is needed, and stay alive to receive the reply before continuing. Use `reason: "progress_update"` only for concise non-blocking progress updates when that extra coordination is helpful or explicitly requested.
|
|
25
|
+
If the implementation reveals a decision that was not approved and is required to continue safely, pause and escalate through the live coordination channel. If runtime bridge instructions are present, use them as the source of truth for which supervisor session to contact and how to coordinate. Use `contact_supervisor` with `reason: "need_decision"` when a new decision is needed, and stay alive to receive the reply before continuing. Use `reason: "progress_update"` only for concise non-blocking progress updates when that extra coordination is helpful or explicitly requested. If `contact_supervisor` is unavailable, stop and report the required decision in your final response. Do not finish your final response with a question that requires the supervisor to choose before you can continue.
|
|
23
26
|
|
|
24
27
|
Default responsibilities:
|
|
25
28
|
- validate the task or approved direction against the actual code
|
|
@@ -31,6 +34,7 @@ Default responsibilities:
|
|
|
31
34
|
|
|
32
35
|
Working rules:
|
|
33
36
|
- Prefer narrow, correct changes over broad rewrites.
|
|
37
|
+
- Preserve source discoverability: use specific names, clear types, one spelling per concept, source-named tests, and definition comments only when they explain a needed constraint.
|
|
34
38
|
- Do not add speculative scaffolding or future-proofing unless explicitly required.
|
|
35
39
|
- Do not leave placeholder code, TODOs, or silent scope changes.
|
|
36
40
|
- Use `bash` for inspection, validation, and relevant tests.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { parentPort } from "node:worker_threads";
|
|
4
|
+
const ACTIVE_RUN_INDEX_DIR = ".active-runs";
|
|
5
|
+
const RESULT_TOMBSTONE_PREFIX = ".deleting-result-";
|
|
6
|
+
function compareRelative(left, right) {
|
|
7
|
+
if (left < right)
|
|
8
|
+
return -1;
|
|
9
|
+
if (left > right)
|
|
10
|
+
return 1;
|
|
11
|
+
return 0;
|
|
12
|
+
}
|
|
13
|
+
function insertSmallest(entries, candidate, limit) {
|
|
14
|
+
if (limit <= 0)
|
|
15
|
+
return;
|
|
16
|
+
const index = entries.findIndex((entry) => compareRelative(candidate.relative, entry.relative) < 0);
|
|
17
|
+
if (index === -1)
|
|
18
|
+
entries.push(candidate);
|
|
19
|
+
else
|
|
20
|
+
entries.splice(index, 0, candidate);
|
|
21
|
+
if (entries.length > limit)
|
|
22
|
+
entries.pop();
|
|
23
|
+
}
|
|
24
|
+
function streamDirWindow(dir, limit, after, relativePath, usable) {
|
|
25
|
+
if (limit <= 0)
|
|
26
|
+
return { entries: [], rawReads: 0, exhausted: true, cursorCleared: false };
|
|
27
|
+
let handle;
|
|
28
|
+
try {
|
|
29
|
+
handle = fs.opendirSync(dir);
|
|
30
|
+
const next = [];
|
|
31
|
+
const wrapped = [];
|
|
32
|
+
let rawReads = 0;
|
|
33
|
+
while (true) {
|
|
34
|
+
const entry = handle.readSync();
|
|
35
|
+
if (!entry)
|
|
36
|
+
break;
|
|
37
|
+
rawReads += 1;
|
|
38
|
+
const relative = relativePath(entry);
|
|
39
|
+
if (!usable(entry, relative))
|
|
40
|
+
continue;
|
|
41
|
+
const candidate = { relative, name: entry.name };
|
|
42
|
+
insertSmallest(wrapped, candidate, limit);
|
|
43
|
+
if (after === undefined || compareRelative(relative, after) > 0)
|
|
44
|
+
insertSmallest(next, candidate, limit);
|
|
45
|
+
}
|
|
46
|
+
const cursorCleared = after !== undefined && next.length === 0;
|
|
47
|
+
return { entries: cursorCleared ? wrapped : next, rawReads, exhausted: true, cursorCleared };
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (error?.code === "ENOENT")
|
|
50
|
+
return { entries: [], rawReads: 0, exhausted: true, cursorCleared: false };
|
|
51
|
+
throw error;
|
|
52
|
+
} finally {
|
|
53
|
+
handle?.closeSync();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function discover(request) {
|
|
57
|
+
const startedAt = Date.now();
|
|
58
|
+
const cursor = structuredClone(request.cursor);
|
|
59
|
+
const raw = { reads: 0, exhausted: {} };
|
|
60
|
+
const record = (source, scan) => {
|
|
61
|
+
raw.reads += scan.rawReads;
|
|
62
|
+
raw.exhausted[source] = scan.exhausted;
|
|
63
|
+
};
|
|
64
|
+
const runScan = streamDirWindow(request.asyncDirRoot, request.runBudget, cursor.runAfter, (entry) => entry.name, (entry) => entry.isDirectory() && entry.name !== ACTIVE_RUN_INDEX_DIR);
|
|
65
|
+
record("runs", runScan);
|
|
66
|
+
if (runScan.cursorCleared)
|
|
67
|
+
delete cursor.runAfter;
|
|
68
|
+
const runCandidates = runScan.entries.slice(0, request.runBudget);
|
|
69
|
+
for (const candidate of runCandidates)
|
|
70
|
+
cursor.runAfter = candidate.relative;
|
|
71
|
+
const resultCandidates = [];
|
|
72
|
+
const sourceLimit = Math.max(1, Math.ceil(request.resultBudget / 4));
|
|
73
|
+
const addFiles = (dir, kind, cursorTarget, source, budget = sourceLimit) => {
|
|
74
|
+
const remaining = Math.min(budget, request.resultBudget - resultCandidates.length);
|
|
75
|
+
if (remaining <= 0)
|
|
76
|
+
return 0;
|
|
77
|
+
const before = resultCandidates.length;
|
|
78
|
+
const after = cursorTarget.type === "pending" ? cursor.resultPendingAfterBySession?.[cursorTarget.session] : cursor[cursorTarget.key];
|
|
79
|
+
const scan = streamDirWindow(dir, remaining, after, (entry) => path.relative(request.resultsDir, path.join(dir, entry.name)), (entry) => entry.isFile() && (entry.name.startsWith(RESULT_TOMBSTONE_PREFIX) || entry.name.endsWith(".json")));
|
|
80
|
+
record(source, scan);
|
|
81
|
+
if (scan.cursorCleared) {
|
|
82
|
+
if (cursorTarget.type === "pending")
|
|
83
|
+
delete cursor.resultPendingAfterBySession?.[cursorTarget.session];
|
|
84
|
+
else
|
|
85
|
+
delete cursor[cursorTarget.key];
|
|
86
|
+
}
|
|
87
|
+
for (const candidate of scan.entries.slice(0, remaining)) {
|
|
88
|
+
const tombstone = candidate.name.startsWith(RESULT_TOMBSTONE_PREFIX);
|
|
89
|
+
resultCandidates.push({
|
|
90
|
+
name: candidate.name,
|
|
91
|
+
relative: candidate.relative,
|
|
92
|
+
kind: tombstone ? "tombstone" : kind,
|
|
93
|
+
cursor: cursorTarget
|
|
94
|
+
});
|
|
95
|
+
if (cursorTarget.type === "pending") {
|
|
96
|
+
cursor.resultPendingAfterBySession ??= {};
|
|
97
|
+
cursor.resultPendingAfterBySession[cursorTarget.session] = candidate.relative;
|
|
98
|
+
} else
|
|
99
|
+
cursor[cursorTarget.key] = candidate.relative;
|
|
100
|
+
}
|
|
101
|
+
return resultCandidates.length - before;
|
|
102
|
+
};
|
|
103
|
+
addFiles(request.resultsDir, "public", { type: "result", key: "resultPublicAfter" }, "results.public");
|
|
104
|
+
const pendingRoot = path.join(request.resultsDir, "result-pending");
|
|
105
|
+
const pendingRemaining = Math.min(request.resultBudget, sourceLimit, request.resultBudget - resultCandidates.length);
|
|
106
|
+
const pendingScan = streamDirWindow(pendingRoot, pendingRemaining, cursor.pendingSessionAfter, (entry) => entry.name, (entry) => entry.isDirectory());
|
|
107
|
+
record("results.pendingSessions", pendingScan);
|
|
108
|
+
const livePendingSessions = new Set(pendingScan.entries.map((entry) => entry.relative));
|
|
109
|
+
if (cursor.resultPendingAfterBySession) {
|
|
110
|
+
let pruned = 0;
|
|
111
|
+
for (const session of Object.keys(cursor.resultPendingAfterBySession).sort()) {
|
|
112
|
+
if (pruned >= request.resultBudget)
|
|
113
|
+
break;
|
|
114
|
+
if (!livePendingSessions.has(session) && !fs.existsSync(path.join(pendingRoot, session))) {
|
|
115
|
+
delete cursor.resultPendingAfterBySession[session];
|
|
116
|
+
pruned += 1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (Object.keys(cursor.resultPendingAfterBySession).length === 0)
|
|
120
|
+
delete cursor.resultPendingAfterBySession;
|
|
121
|
+
}
|
|
122
|
+
if (pendingScan.cursorCleared)
|
|
123
|
+
delete cursor.pendingSessionAfter;
|
|
124
|
+
const pendingSessions = pendingScan.entries.slice(0, pendingRemaining);
|
|
125
|
+
let pendingFileBudget = Math.min(sourceLimit, request.resultBudget - resultCandidates.length);
|
|
126
|
+
for (const session of pendingSessions) {
|
|
127
|
+
if (pendingFileBudget <= 0)
|
|
128
|
+
break;
|
|
129
|
+
cursor.pendingSessionAfter = session.relative;
|
|
130
|
+
pendingFileBudget -= addFiles(path.join(pendingRoot, session.name), "pending", { type: "pending", session: session.relative }, `results.pending.${session.name}`, pendingFileBudget);
|
|
131
|
+
}
|
|
132
|
+
addFiles(path.join(request.resultsDir, "completion-replay"), "replay", { type: "result", key: "resultReplayAfter" }, "results.replay");
|
|
133
|
+
addFiles(path.join(request.resultsDir, "output-archives"), "archive", { type: "result", key: "resultArchiveAfter" }, "results.archive");
|
|
134
|
+
const cursorOps = [];
|
|
135
|
+
for (const key of ["runAfter", "resultPublicAfter", "resultReplayAfter", "resultArchiveAfter", "pendingSessionAfter"]) {
|
|
136
|
+
if (cursor[key] === request.cursor[key])
|
|
137
|
+
continue;
|
|
138
|
+
cursorOps.push(cursor[key] === undefined ? { type: "delete", key } : { type: "set", key, value: cursor[key] });
|
|
139
|
+
}
|
|
140
|
+
const oldPending = request.cursor.resultPendingAfterBySession ?? {};
|
|
141
|
+
const nextPending = cursor.resultPendingAfterBySession ?? {};
|
|
142
|
+
for (const session of new Set([...Object.keys(oldPending), ...Object.keys(nextPending)])) {
|
|
143
|
+
if (oldPending[session] === nextPending[session])
|
|
144
|
+
continue;
|
|
145
|
+
cursorOps.push(nextPending[session] === undefined ? { type: "delete-pending", session } : { type: "set-pending", session, value: nextPending[session] });
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
type: "result",
|
|
149
|
+
passId: request.passId,
|
|
150
|
+
discoveryDurationMs: Math.max(0, Date.now() - startedAt),
|
|
151
|
+
rawReads: raw.reads,
|
|
152
|
+
sourceExhausted: raw.exhausted,
|
|
153
|
+
runCandidates,
|
|
154
|
+
resultCandidates,
|
|
155
|
+
cursorOps
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
if (!parentPort)
|
|
159
|
+
throw new Error("Async retention discovery requires a worker parent port.");
|
|
160
|
+
parentPort.on("message", (request) => {
|
|
161
|
+
const passId = request?.passId;
|
|
162
|
+
try {
|
|
163
|
+
parentPort.postMessage(discover(request));
|
|
164
|
+
} catch (error) {
|
|
165
|
+
parentPort.postMessage({ type: "error", passId, error: error instanceof Error ? error.message : String(error) });
|
|
166
|
+
}
|
|
167
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createJiti } from "jiti";
|
|
2
|
+
const jiti = createJiti(import.meta.url);
|
|
3
|
+
const { runInspector } = await jiti.import("./src/inspectors/herdr/inspector-runner.js");
|
|
4
|
+
try {
|
|
5
|
+
runInspector();
|
|
6
|
+
} catch (cause) {
|
|
7
|
+
process.stderr.write(`Herdr inspector failed: ${cause instanceof Error ? cause.message : String(cause)}
|
|
8
|
+
`);
|
|
9
|
+
process.exitCode = 1;
|
|
10
|
+
}
|
|
@@ -66,9 +66,10 @@ dm-subagents installed`);
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
console.log(`
|
|
69
|
-
The extension is now available in
|
|
69
|
+
The extension is now available in dm. Tools added:
|
|
70
70
|
• subagent - Delegate tasks to agents and inspect run status
|
|
71
|
-
•
|
|
71
|
+
• bg_wait - Wait for background/provider/detached work without native completion notifications
|
|
72
|
+
(subagent_wait remains a deprecated compatibility alias)
|
|
72
73
|
|
|
73
74
|
Documentation: ${EXTENSION_DIR}/README.md
|
|
74
75
|
`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dm-subagents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "DM extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification",
|
|
5
5
|
"author": "Nico Bailon",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dm": {
|
|
17
17
|
"extensions": [
|
|
18
|
-
"./
|
|
18
|
+
"./index.js"
|
|
19
19
|
],
|
|
20
20
|
"skills": [
|
|
21
21
|
"./skills"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run a bounded supervisor-mediated council of advisors and write a decision memo
|
|
3
|
+
argument-hint: "<question> [--advisors name,name] [--max-passes 2|3] [--scope ...] [--non-goals ...]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run a bounded, supervisor-mediated council on this question. You, the parent
|
|
7
|
+
session, are the supervisor. You select the roster, curate cross-advisor packets,
|
|
8
|
+
decide which feedback is valid, and write the final memo. Advisors do not talk
|
|
9
|
+
directly or see peer transcripts by default. This is not free-form agent chat.
|
|
10
|
+
|
|
11
|
+
Before you orchestrate, read `skills/council-mode/SKILL.md` and
|
|
12
|
+
`skills/dm-subagents/references/execution-controls.md`.
|
|
13
|
+
|
|
14
|
+
Parse the invocation yourself. The flags below are conventions, not runtime
|
|
15
|
+
options. Record a brief with the question, scope, non-goals, evidence targets,
|
|
16
|
+
roster, known advisor context modes, and pass cap. Default `--max-passes` to 2.
|
|
17
|
+
Clamp it to 2 or 3. If the question is trivial or settled, answer directly instead
|
|
18
|
+
of convening a council.
|
|
19
|
+
|
|
20
|
+
## Roster
|
|
21
|
+
|
|
22
|
+
- If `--advisors` is given, use exactly those agent names. Fail clearly on an
|
|
23
|
+
unknown agent. Do not require or invent per-advisor role labels.
|
|
24
|
+
- Otherwise list agents with `subagent({ action: "list" })`, then prefer 2–3
|
|
25
|
+
executable names that start with `council-`.
|
|
26
|
+
- If fewer than two profiles are available, fill the roster with `oracle`, then
|
|
27
|
+
`reviewer`, until it has two advisors. Launch fallback `oracle` with
|
|
28
|
+
`context: "fork"` so global defaults cannot remove its parent-chat context.
|
|
29
|
+
Let `reviewer` use its normal profile context. Note the fallback and known
|
|
30
|
+
context modes in the memo.
|
|
31
|
+
- Use the normal single-oracle loop only when a requested roster or unavailable
|
|
32
|
+
builtins leaves fewer than two advisors. Label the memo as degraded mode.
|
|
33
|
+
|
|
34
|
+
Profiles provide the model, tools, context, and advisor stance. The council
|
|
35
|
+
question and scope provide the decision frame. If the user wants a specific lens,
|
|
36
|
+
they should put it in the question, scope, or profile definition. Keep the roster
|
|
37
|
+
at 2–3 and never exceed 4.
|
|
38
|
+
|
|
39
|
+
Package advisors such as Surf's `gpt-pro` are valid only when the package DM
|
|
40
|
+
extension is installed and its external-job provider is registered. For Surf,
|
|
41
|
+
that means the `surf-cli` DM extension has loaded and `surf-oracle` appears in
|
|
42
|
+
`subagent({ action: "list" })` or the advisor is explicitly requested in
|
|
43
|
+
`--advisors` after that install. Treat them as external-runner advisors: omit
|
|
44
|
+
child `async` for normal attached council results, do not pass `outputSchema`,
|
|
45
|
+
include any needed evidence in the prompt, and use the fresh fallback cross-exam
|
|
46
|
+
path if the run is not resumable.
|
|
47
|
+
|
|
48
|
+
## Run the protocol
|
|
49
|
+
|
|
50
|
+
Use the canonical workflow, structured advisor contracts, aggregate pass receipts,
|
|
51
|
+
and memo requirements in `skills/council-mode/SKILL.md`. Keep the parent as the
|
|
52
|
+
only synthesizer and decision maker. Do not introduce a chair advisor, peer chat,
|
|
53
|
+
or transcript sharing.
|
|
54
|
+
|
|
55
|
+
Use its required boundary checkpoints, yield for each async workflow without
|
|
56
|
+
polling, and write its required final memo.
|
|
57
|
+
|
|
58
|
+
Question and options from the slash command invocation:
|
|
59
|
+
|
|
60
|
+
$@
|
|
@@ -28,7 +28,11 @@ Choose or adapt angles when the work calls for it:
|
|
|
28
28
|
|
|
29
29
|
Prefer three strong reviewers over many vague reviewers.
|
|
30
30
|
|
|
31
|
-
Give every reviewer a specific task prompt naming its angle. Ask reviewers to return concise, evidence-backed findings with file/line references and suggested fixes. The response should be review feedback, not a context summary. Reviewers must not edit files unless I explicitly ask for a writer pass.
|
|
31
|
+
Give every reviewer a specific task prompt naming its angle. Ask reviewers to return concise, evidence-backed findings with file/line references and suggested fixes. Filter on evidence, not severity: a finding must be concrete, current, caused or made reachable by the target diff, and supported by source proof, a test or repro, or a contract contradiction. Label findings P0/P1/P2. P0 blocks merge. P1 should be fixed before release. P2 is report-only. End each review with `Merge verdict: BLOCK`, `Merge verdict: OK`, or `Merge verdict: OK with notes`. If nothing qualifies, ask the reviewer to say exactly `No issues found.` The response should be review feedback, not a context summary. Reviewers must not edit files unless I explicitly ask for a writer pass.
|
|
32
|
+
|
|
33
|
+
Do not default first-pass reviews to `blockers only`. That phrase is valid only for final pre-merge re-checks after P1/P2 findings are already inventoried, or for explicit emergency hotfix lanes where non-blocking findings are intentionally deferred.
|
|
34
|
+
|
|
35
|
+
For a targeted follow-up review, ask only whether the named finding was resolved, whether the fix introduced a new defect in the fix blast radius, and whether prior P1/P2 notes still stand. For bot or PR-comment triage, classify each comment as VALID, STALE, INVALID, or OUT-OF-POLICY against current HEAD, then assign P0/P1/P2 only to VALID comments.
|
|
32
36
|
|
|
33
37
|
While reviewers run, do your own narrow inspection if useful. After they return, synthesize the feedback into:
|
|
34
38
|
- fixes worth doing now
|
|
@@ -6,30 +6,36 @@ Run a parent-orchestrated review loop for the requested work.
|
|
|
6
6
|
|
|
7
7
|
Use the `subagent` tool. Keep the parent session as the loop controller and final decision-maker. Child subagents must receive concrete role-specific tasks; they must not run subagents or manage the loop themselves unless the parent intentionally selected an explicit fanout agent whose builtin `tools` includes `subagent` for that assigned fanout.
|
|
8
8
|
|
|
9
|
-
Default to a maximum of 3 review rounds unless I specify a different cap. Count a review round each time fresh-context reviewers inspect the current diff after a worker pass. Stop early when reviewers find no
|
|
9
|
+
Default to a maximum of 3 review rounds unless I specify a different cap. Count a review round each time fresh-context reviewers inspect the current diff after a worker pass. Stop early when reviewers find no P0 findings, no P1 fixes worth doing now, and no approved P2 notes that should be handled in this loop.
|
|
10
10
|
|
|
11
|
-
If the invocation includes an implementation request, first launch one async `worker` to implement the approved scope. If the current diff is already the target, start with review. The sequence can be launched up front
|
|
11
|
+
If the invocation includes an implementation request, first launch one async `worker` to implement the approved scope. If the current diff is already the target, start with review. The sequence can be launched up front with `workflowScript` when it is already clear, or continued as follow-up single-agent runs after each async completion. For an initial workflowScript, pass `async: true` so the main chat is unblocked; do not set `clarify: true` unless I explicitly want the foreground clarify UI. Use only one writer against the active worktree at a time unless I explicitly ask for isolated worktrees.
|
|
12
|
+
|
|
13
|
+
As a conservative orchestration policy, do not set a hard `toolBudget` or tight `usageBudget` on implementation or fix workers. A default tool budget blocks read/search tools rather than mutation tools, and reported usage has no reservation model, so count or usage limits still do not measure delivery safety. Give each writer a narrow delivery slice and an outer elapsed deadline with enough margin. Before that deadline, request a checkpoint after the current tool returns with changed files, build/test state, remaining work, and commit or PR state. An elapsed timeout is not a mutation-safe boundary and must not be the checkpoint trigger.
|
|
12
14
|
|
|
13
15
|
For each review round, launch fresh-context `reviewer` agents in parallel. Reviewers must inspect the repository, relevant instructions, and current diff directly from files and commands. They must not rely on the main conversation history and must not edit files.
|
|
14
16
|
|
|
17
|
+
Tell reviewers to filter on evidence, not severity. They should report only concrete current issues caused or made reachable by the target diff, with source proof, a test or repro, or a contract contradiction. Ask them to label findings P0/P1/P2 and end with `Merge verdict: BLOCK`, `Merge verdict: OK`, or `Merge verdict: OK with notes`. P0 blocks merge. P1 should be fixed before release. P2 is report-only. Use `blockers only` only for final pre-merge re-checks after P1/P2 findings are already captured, or for explicit emergency hotfix lanes.
|
|
18
|
+
|
|
15
19
|
Choose review angles from the actual change. Common angles are correctness/regressions, tests/validation, and simplicity/maintainability. Add security, performance, docs/API contracts, or user-flow validation when the work calls for it. Prefer three strong reviewers over many vague reviewers.
|
|
16
20
|
|
|
17
21
|
After reviewers return, synthesize their feedback into:
|
|
18
|
-
- blockers or scope/product/architecture decisions that need user approval;
|
|
19
|
-
- fixes worth doing now;
|
|
20
|
-
- optional improvements;
|
|
22
|
+
- P0 blockers or scope/product/architecture decisions that need user approval;
|
|
23
|
+
- P1 fixes worth doing now;
|
|
24
|
+
- P2 report-only notes or optional improvements;
|
|
21
25
|
- feedback to ignore or defer, with a short reason.
|
|
22
26
|
|
|
23
27
|
Do not blindly apply every reviewer suggestion. If reviewers surface an unapproved product, scope, or architecture decision, pause and ask me before launching a fix worker.
|
|
24
28
|
|
|
25
29
|
When an async implementation worker completes, treat its handoff as the transition into review, not as final completion, unless I explicitly asked for worker-only work, review-only output, or to stop after implementation.
|
|
26
30
|
|
|
27
|
-
When there are fixes worth doing now and the workflow is implementation-authorized, launch one async forked `worker` to apply only those synthesized fixes. Ask it to preserve the approved scope, run focused validation, and report changed files, commands run with exit codes, validation evidence, surprises, and anything left undone.
|
|
31
|
+
When there are fixes worth doing now and the workflow is implementation-authorized, launch one async forked `worker` without hard tool-call caps to apply only those synthesized fixes. Ask it to preserve the approved scope, run focused validation, and report changed files, commands run with exit codes, validation evidence, surprises, and anything left undone.
|
|
28
32
|
|
|
29
33
|
After a fix worker returns, run another review round only when it made material changes or addressed non-trivial findings. Do not keep looping for optional polish, speculative improvements, or findings already deferred by the parent.
|
|
30
34
|
|
|
35
|
+
For a targeted follow-up review, ask only three questions: whether the named finding was resolved, whether the fix introduced a new concrete defect in the fix blast radius, and whether prior P1/P2 notes still stand. End with a fix verdict and the merge verdict.
|
|
36
|
+
|
|
31
37
|
Stop and summarize when one of these is true:
|
|
32
|
-
- reviewers find no blockers or fixes worth doing now;
|
|
38
|
+
- reviewers find no P0 blockers or P1 fixes worth doing now;
|
|
33
39
|
- remaining feedback is optional, speculative, or intentionally deferred;
|
|
34
40
|
- reviewers surface an unapproved decision that needs me;
|
|
35
41
|
- the max review-round cap is reached.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: council-mode
|
|
3
|
+
description: Run a bounded supervisor-mediated advisor council. Use when the user asks for council mode, asks to convene advisors, debate a decision, cross-examine recommendations, or run /council.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Council Mode
|
|
7
|
+
|
|
8
|
+
Council mode is parent-supervised advice for a material decision with real tradeoffs. It is not free-form agent chat, implementation work, a transcript dump, mutation authority, or a council UI.
|
|
9
|
+
|
|
10
|
+
The parent selects the roster, relays only curated claims, decides validity, and writes the memo. Advisors stay read-only and do not see peer transcripts by default.
|
|
11
|
+
|
|
12
|
+
Before launch, read:
|
|
13
|
+
|
|
14
|
+
- `skills/dm-subagents/references/execution-controls.md`
|
|
15
|
+
- `skills/council-mode/references/pass-contracts.md`
|
|
16
|
+
|
|
17
|
+
## Roster
|
|
18
|
+
|
|
19
|
+
Run `subagent({ action: "list" })`, then choose 2-3 executable advisor names that start with `council-`. The prefix is convention only. Never use more than four advisors.
|
|
20
|
+
|
|
21
|
+
If fewer than two council profiles are available, fill with `oracle`, then `reviewer`. Launch fallback `oracle` with `context: "fork"`; let fallback `reviewer` use its normal profile context. Note fallbacks and known context modes in the memo. If fewer than two advisors remain, use the normal one-oracle consultation loop and label it degraded mode.
|
|
22
|
+
|
|
23
|
+
`council-*` profiles live in user or project agent directories, not this package. A profile defines model, tools, context, output defaults, and persistent stance. Keep advisors read-only, disable inherited skills unless needed, and put stance in the profile body instead of inventing per-run role labels.
|
|
24
|
+
|
|
25
|
+
External-job/package advisors may join only when their provider is registered. Treat them as ordinary advisor names in `runs.all`, but honor their runner limits: they may lack repo tools, structured output, or resumability. Include evidence they cannot read, request JSON text instead of `outputSchema`, and use a fresh-context fallback when they cannot resume for cross-exam.
|
|
26
|
+
|
|
27
|
+
## Passes
|
|
28
|
+
|
|
29
|
+
Pass 1 is independent reports. Pass 2 is one cross-exam. Run Pass 3 only when `--max-passes 3` was requested and a material dispute can still be settled by evidence. Never run an unbounded loop.
|
|
30
|
+
|
|
31
|
+
## Protocol
|
|
32
|
+
|
|
33
|
+
1. Write the council brief: question, scope, non-goals, evidence targets, roster, known advisor context modes, and pass cap.
|
|
34
|
+
2. Tell the user the roster, context modes, and pass cap.
|
|
35
|
+
3. Launch one async `workflowScript` with `runs.all` for Pass 1. Use stable keys, `phase: "Council pass 1"`, concise labels, and `output: false` unless separate artifacts are useful. Set `context` only when the profile context is known or a fallback rule requires it.
|
|
36
|
+
4. Return one aggregate Pass 1 receipt. On completion, tell the user completion count, agreement count, dispute count, and whether Pass 2 is needed.
|
|
37
|
+
5. Synthesize the claim matrix in the parent: agreements, disputed claims, missing proof, owner decisions, and at most five material relay claims per advisor.
|
|
38
|
+
6. For Pass 2, tell the user which claims are relayed and why they matter. Resume each advisor with a curated challenge packet. A resume needs a retained run id and task; it excludes `agent` and rejects `gate`. Record each new run id; Pass 3 resumes those latest ids with new stable keys.
|
|
39
|
+
7. Stop at convergence, pass cap, failed fallback, or user interruption. The parent writes the final memo.
|
|
40
|
+
|
|
41
|
+
If an advisor is not resumable, run the same profile fresh with its Pass 1 report and challenge packet. Label it a fresh-context fallback, not true cross-exam.
|
|
42
|
+
|
|
43
|
+
Do not set `clarify`, `worktree`, `gate`, tool budgets, or tight usage budgets on advisors. Bound work through the roster, pass cap, and report length.
|
|
44
|
+
|
|
45
|
+
## Memo
|
|
46
|
+
|
|
47
|
+
Converged means no disputed claim remains that both affects the recommendation and can plausibly be settled by advisor evidence. Put unresolved disputes in owner decisions. Do not add a round for polish or symmetry.
|
|
48
|
+
|
|
49
|
+
The memo states:
|
|
50
|
+
|
|
51
|
+
- question and scope
|
|
52
|
+
- recommendation and rationale
|
|
53
|
+
- accepted and rejected feedback with reasons
|
|
54
|
+
- owner decisions
|
|
55
|
+
- evidence and run ids
|
|
56
|
+
- confidence and what would change the decision
|
|
57
|
+
- roster, passes, fallbacks, and known advisor context modes
|
|
58
|
+
|
|
59
|
+
Identify advisors by profile name. State when fallback `oracle` was forked and context-aware. Escalate to a writer only after the memo and only when the user requests it.
|