@excitedjs/dreamux 0.27.0-beta.273 → 0.27.0-beta.274

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.
@@ -70,19 +70,17 @@ const AGENT_RUNTIME_CAPABILITY_SCHEMA = objectSchema({
70
70
  ]);
71
71
  function teammateToolRecords(scope) {
72
72
  const callerKind = scope.kind;
73
- // The pointer to the hand-down skill opens the description of the tool the
74
- // model is about to call, which is where the intent to hand work down forms.
75
- // Which skill depends on who is calling: a TeamLeader hands work only to a
76
- // TeamMate, a Dispatcher to a TeamMate or a Team.
73
+ // Dispatcher handoffs discover their guide at the tool. The TeamLeader's
74
+ // launch prompt already routes missing collaboration guidance to teamwork.
77
75
  const handOffSkillPointer = callerKind === 'dispatcher'
78
- ? 'The bundled `dispatcher-workflow` skill covers how to brief a TeamMate or a Team.'
79
- : 'The bundled `teamwork` skill covers how to brief a TeamMate.';
76
+ ? 'The bundled `dispatcher-workflow` skill covers how to brief a TeamMate or a Team. '
77
+ : '';
80
78
  const spawnProperties = {
81
79
  name_prefix: {
82
80
  type: 'string',
83
81
  minLength: 1,
84
82
  maxLength: 64,
85
- description: 'Requested label; the concrete name comes back in the result.',
83
+ description: 'Requested label; use the concrete, never-reused name returned in the result for later calls.',
86
84
  },
87
85
  prompt: {
88
86
  type: 'string',
@@ -105,8 +103,8 @@ function teammateToolRecords(scope) {
105
103
  type: 'string',
106
104
  minLength: 1,
107
105
  maxLength: 4000,
108
- description: "Standing role and boundaries appended to the TeamMate's system " +
109
- 'prompt for every turn.',
106
+ description: 'Standing instructions for every turn, retained after reopening ' +
107
+ 'and not editable through send.',
110
108
  },
111
109
  };
112
110
  if (callerKind === 'dispatcher') {
@@ -116,9 +114,11 @@ function teammateToolRecords(scope) {
116
114
  };
117
115
  }
118
116
  const spawnDescription = callerKind === 'dispatcher'
119
- ? `${handOffSkillPointer} Start a resumable TeamMate agent managed by this dispatcher and submit its first turn. name_prefix is the requested label; spawn RETURNS the concrete, never-reused name that all later send/status/last/close MUST use. Use get_capabilities.agent_runtimes[].id as agent_runtime. intent is required: it is the durable recovery subject. repo is optional: omit it to let Dreamux allocate the work directory by the dispatcher's workspace policy (a fresh per-TeamMate directory, or the dispatcher's own directory when workspace isolation is disabled), or pass { mode: reuse-cwd | managed, path?, base_ref?, branch?, cleanup? } to choose an existing path or create a managed git worktree. Returns a receipt at once; the completion is pushed later as a new message.`
120
- : `${handOffSkillPointer} Start a resumable TeamMate agent in this Team's shared workspace and submit its first turn. name_prefix is the requested label; spawn RETURNS the concrete, never-reused name that all later send/status/last/close MUST use. Use get_capabilities.agent_runtimes[].id as agent_runtime. intent is required: it is the durable recovery subject. Coordinate edits so only one TeamMate writes the shared workspace unless the work is read-only, the edits are independent, or the user asked for parallel edits. This tool does not accept a repo parameter. Returns a receipt at once; the completion is pushed later as a new message.`;
121
- const sendDescription = `${handOffSkillPointer} Send a turn to a TeamMate agent; reopens a closed one from the runtime-native session recorded on it (interpreted by its agent_runtime) first. Pass intent to update the recorded recovery subject before the turn. Returns a receipt at once; the completion is pushed later as a new message.`;
117
+ ? `${handOffSkillPointer}Start a resumable TeamMate agent managed by this dispatcher and submit its first turn. name_prefix is the requested label; spawn RETURNS the concrete, never-reused name that all later send/status/last/close MUST use. Use get_capabilities.agent_runtimes[].id as agent_runtime. intent is required: it is the durable recovery subject. repo is optional: omit it to let Dreamux allocate the work directory by the dispatcher's workspace policy (a fresh per-TeamMate directory, or the dispatcher's own directory when workspace isolation is disabled), or pass { mode: reuse-cwd | managed, path?, base_ref?, branch?, cleanup? } to choose an existing path or create a managed git worktree. Returns a receipt at once; the completion is pushed later as a new message.`
118
+ : "Start a resumable TeamMate in this Team's shared workspace and submit its first turn; returns its concrete name for later calls. Returns a receipt at once; the completion is pushed later as a new message.";
119
+ const sendDescription = callerKind === 'dispatcher'
120
+ ? `${handOffSkillPointer}Send a turn to a TeamMate agent; reopens a closed one from the runtime-native session recorded on it (interpreted by its agent_runtime) first. Pass intent to update the recorded recovery subject before the turn. Returns a receipt at once; the completion is pushed later as a new message.`
121
+ : 'Send a turn to a TeamMate; a closed member reopens with its recorded runtime session and standing identity. Returns a receipt at once; the completion is pushed later as a new message.';
122
122
  return [
123
123
  {
124
124
  descriptor: tool('spawn', spawnDescription, spawnProperties, ['name_prefix', 'prompt', 'intent'], {
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../../src/service/agent/mcp.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAuB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,IAAI,GAEL,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,YAAY,GACb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAGvB,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAyCnD,MAAM,UAAU,yBAAyB,CACvC,KAAuB;IAEvB,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzD,OAAO;QACL,IAAI,EAAE,wBAAwB;QAC9B,QAAQ;YACN,OAAO,EAAE,KAAK,EAAE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OAAO,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,KAAuB;IACjD,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC;AAC1E,CAAC"}
@@ -68,6 +68,7 @@ function teamLeaderSystemPrompt(teamId, workspace, identityPrompt, pluginInstruc
68
68
  `You are the TeamLeader of Dreamux Team ${JSON.stringify(teamId)}.`,
69
69
  "Your Dreamux MCP servers: `teammate` (this Team's members, who share the Team workspace, and scripted workflows), `team` (dissolve this Team), `cron` (scheduled prompts that wake this TeamLeader), and one `channel-<provider>` server per configured channel that provides tools, for example `channel-feishu` (that channel's own tools).",
70
70
  teamWorkspaceSentence(workspace),
71
+ 'Use TeamMates proactively when delegation can save time or improve quality, and consult the `teamwork` skill when you need collaboration guidance that is not already in your current context.',
71
72
  ...pluginInstructions,
72
73
  ];
73
74
  if (identityPrompt !== null)
@@ -1 +1 @@
1
- {"version":3,"file":"leader.js","sourceRoot":"","sources":["../../../src/service/team/leader.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAK5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAQ9D;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD;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BAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;QAClE,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,iBAAiB,CACxB,QAA6B,EAC7B,MAAkB;IAElB,OAAO,CACL,QAAQ,CAAC,aAAa,KAAK,MAAM,CAAC,aAAa;QAC/C,QAAQ,CAAC,OAAO,KAAK,MAAM,CAAC,OAAO;QACnC,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,WAAW,CACrC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@excitedjs/dreamux",
3
- "version": "0.27.0-beta.273",
3
+ "version": "0.27.0-beta.274",
4
4
  "description": "Dreamux core host for multi-dispatcher agent orchestration through provider interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,10 +26,10 @@
26
26
  "CHANGELOG.json"
27
27
  ],
28
28
  "dependencies": {
29
- "@excitedjs/agent-runtime-claude-code": "0.8.1-beta.273",
30
- "@excitedjs/agent-runtime-codex": "0.7.1-beta.273",
31
- "@excitedjs/dreamux-utils": "0.7.0-beta.273",
32
- "@excitedjs/feishu-channel": "6.3.1-beta.273",
29
+ "@excitedjs/agent-runtime-claude-code": "0.8.1-beta.274",
30
+ "@excitedjs/agent-runtime-codex": "0.7.1-beta.274",
31
+ "@excitedjs/dreamux-utils": "0.7.0-beta.274",
32
+ "@excitedjs/feishu-channel": "6.3.1-beta.274",
33
33
  "@modelcontextprotocol/server": "2.0.0",
34
34
  "acorn": "^8.16.0",
35
35
  "croner": "^10.0.1",
@@ -1,171 +1,115 @@
1
1
  ---
2
2
  name: teamwork
3
- description: "How a TeamLeader hands work to a TeamMate and works with it afterwards. Load when about to spawn or send to a TeamMate; not needed for any other tool."
3
+ description: "Guide TeamMate delegation and follow-up work. Consult when needed collaboration guidance is missing from the current context."
4
4
  ---
5
5
 
6
6
  # Teamwork
7
7
 
8
- How a TeamLeader hands work down to this Team's members and works with them
9
- afterwards. Methodology, not tool operation.
10
-
11
- ## Yourself, a Subagent, or a TeamMate
12
-
13
- Three ways to get a piece of work done:
14
-
15
- - **Yourself.** The work fits this turn and needs the context you already hold.
16
- You are also the one who answers for the Team, so the decisions and the
17
- reporting stay with you either way.
18
- - **An engine-native subagent.** Delegation inside your own turn and your own
19
- engine. Your engine describes its delegation feature — what it can see, how
20
- long it lives, what it returns — and that description is the one to read.
21
- - **A TeamMate.** A member of this Team that continues independently: its own
22
- runtime and context, its own history, a conversation you can continue across
23
- turns, visible to the user — and a judgment of its own, the one thing a
24
- subagent does not have.
25
-
26
- Choose by asking about the work, not about the size of the request:
27
-
28
- - Does it outlive your turn?
29
- - Does it need a context of its own, one that would crowd out yours if you read
30
- it all here?
31
- - May the user want to inspect it or continue it?
32
- - Does it need a standing role — someone who writes, someone who reviews — held
33
- across several turns?
34
- - Does it need a judgment that is not yours — a reading of the problem that can
35
- contradict your framing, not only complete it?
36
-
37
- Any yes points past a subagent to a TeamMate. A member is a seat, not a single
38
- errand: spawn one for a role you will keep sending work to. A member briefed
39
- like a subagent — your answer, its confirmation — costs what a member costs and
40
- returns what a subagent returns.
41
-
42
- The members of this Team need not all run the same engine. `get_capabilities`
43
- lists the runtimes this Team can spawn; read it before you choose, and staff the
44
- Team so that the strengths of heterogeneous models are actually used. A Team
45
- whose members are all the same model shares one set of blind spots.
46
-
47
- ## The Hand-Down: Context, Not Control
48
-
49
- A TeamMate is a whole agent with its own harness, not a step you already worked
50
- out. What it needs from you is the context you hold and it cannot see; what it
51
- does not need is your plan for its edits. A brief that fixes which files to
52
- change and how leaves the member nowhere to put the discovery that the plan does
53
- not survive contact with the code — so it writes a large amount of code trying
54
- to satisfy an impossible instruction, and the work comes back to be redone.
55
-
56
- Carry into the brief:
57
-
58
- - **The user's goal, and why they want it.** The outcome, and the reason behind
59
- it that lets a member recognize a better route to the same end.
60
- - **The requirement context from your conversation with the user.** Where that
61
- conversation is already recorded, name the path — the member reads the
62
- artifact for itself and gets the detail your retelling would drop. Where it is
63
- recorded nowhere, it exists only in your context: write it into the brief or
64
- into the shared workspace first, or it is lost to everyone but you.
65
- - **The user's own constraints, verbatim.** Their words, not your paraphrase. A
66
- paraphrased constraint is a constraint you have already started deciding.
67
- - **Your guesses, marked as guesses.** Say which parts you inferred, so a member
68
- that finds the inference wrong knows it is allowed to say so. Your design is
69
- a guess too: the owner you chose and the mechanism you prefer.
70
- - **The question the work turns on, before your answer to it.** Which fact is
71
- being decided and who could own it, then your current answer as one
72
- candidate. A design handed down as settled makes every later member a
73
- subagent of it: reviewers find ever more precise holes inside your premise,
74
- and none of them is asked whether the premise holds.
75
- - **What "done" means, and what you need to read back.** The evidence that would
76
- show it, and the shape of the report you will carry outward: what changed, the
77
- evidence for it, and the questions left open.
78
- - **The known unknowns.** What you have not checked, and what you already ruled
79
- out and why.
80
- - **When several members write in parallel, which paths each one owns, and
81
- why.** The assignment, with its reason, so a member that needs to touch
82
- someone else's path comes back to you instead of guessing.
83
- - **Keep the roles disjoint.** A developer and a reviewer are two seats, not the
84
- same seat twice — a reviewer that wrote the code reviews its own reasoning.
85
- The role and its boundaries hold for every turn of that member's life; the
86
- task belongs to the turn you are sending.
87
-
88
- Leave out the edit plan — which files to change and in what way — and any
89
- prohibition you cannot give a reason for. An unreasoned prohibition survives
90
- contact with reality no better than an edit plan does, and the member cannot
91
- tell which of your rules is load-bearing.
92
-
93
- Say what the member is free to do: explore, read whatever it needs, and choose
94
- the route. Say what happens when reality disagrees with the brief — stopping to
95
- report a conflict with the code, or a blocker, is the correct result of the
96
- turn, not a failure to deliver.
97
-
98
- `identity` holds what stands for every turn of the member's life: its role, its
99
- boundaries, the posture of stopping to report rather than pushing through, and
100
- its standing to contradict your framing — what you hand down is evidence, not a
101
- verdict.
102
- `prompt` holds this turn's task. `send` carries the next turn's task the same
103
- way; the standing role is already in place and does not need restating.
104
-
105
- ## When a TeamMate Reports It Cannot
106
-
107
- A member that reports it cannot do the work has usually found something: the
108
- design contradicts the code, two artifacts disagree, the requirement assumes
109
- something that is not there. The finding is the value of that turn.
110
-
111
- - **Read what it found.** In its own words, and against the files it names,
112
- before you decide anything about the task.
113
- - **Convene the other members for options.** A finding that opens a choice is
114
- worth putting to members who did not write the brief; several readings of the
115
- same obstacle beat one.
116
- - **Take a decision that is the user's to the user**, through the channel's
117
- question tool. Rewriting the requirement on their behalf replaces their
118
- decision with your guess, and they find out only when the work is finished.
119
- - **Do not re-send the same task with firmer wording.** Nothing about the
120
- obstacle changes; the member either repeats the finding or writes code around
121
- it, which is the rework you were trying to avoid.
122
-
123
- ## When a TeamMate Does Something You Did Not Expect
124
-
125
- Unexpected is not the same as wrong. A member has read files you have not and
126
- has been working in the shared workspace while you were elsewhere.
127
-
128
- - **Ask why before overriding.** Get its reasoning first, in its own words.
129
- - **Read the answer as a second perspective, not a defence.** It may have seen
130
- something that changes the task: a constraint in the code, a contradiction
131
- between two artifacts, a cheaper route. The goal is two perspectives that
132
- complete each other, not one perspective corrected into the other.
133
- - **Discuss until you converge.** Say what you expected and why, and let it say
134
- the same. Most surprises come from a brief that was thinner than you thought,
135
- and the fix belongs in the next brief as much as in this member's next turn.
136
- - **Then act on what you agreed.** Restate the boundary if the member was wrong;
137
- change your own plan if it was right; and take the disagreement to the user
138
- when what it exposed is a decision that was never yours to make.
139
-
140
- An unexplained override teaches nothing and repeats itself on the next task.
141
-
142
- ## When Every Round Finds Another Hole
143
-
144
- A second review round that still adds state, special cases, or call sites to
145
- the same area is not a design getting robust; it is a design failing slowly.
146
- Each finding is real, each patch is correct, and the sum is a mechanism nobody
147
- asked for.
148
-
149
- - **Stop sending patches.** The model is wrong, not the details. Write the
150
- one-sentence premise the rounds have been refining — which owner, which fact
151
- — and make that sentence the next question.
152
- - **Put it to members that have not seen the current design.** Give them the
153
- user's story and the baseline code, not the draft; a member that starts from
154
- the draft inherits its owner. Agreement among members that share your brief
155
- proves they share your premise, not that it holds.
156
-
157
- ## Keeping the Thread
158
-
159
- A conversation with one member accumulates context that a new one does not have,
160
- and every member you keep open is another writer in the shared workspace.
161
-
162
- - Continue with the same member for follow-ups on the same work rather than
163
- starting another.
164
- - Start a fresh member when the work itself is fresh: a different area, a
165
- different role, a perspective that should not inherit the first one's
166
- conclusions.
167
- - Independence is worth paying for when you want a real check. Two members that
168
- share a brief also share its blind spots; give the reviewer the question, not
169
- the developer's answer, nor yours.
170
- - Close a member when its role is finished, so the members still open are the
171
- ones actually working and the writer of any given path stays unambiguous.
8
+ TeamMates are a more capable, durable subagent system: independent agents with
9
+ their own runtimes and context, resumable conversations, and standing identities.
10
+ Members of this Team work in the same shared workspace.
11
+
12
+ Use TeamMates proactively whenever delegation can save time or improve quality.
13
+ For example, a member can investigate one cause while you trace another, or
14
+ review a change while you check its integration. Keep tightly coupled work with
15
+ yourself when handoff costs more than it gains. Reuse this guidance while it
16
+ remains in context; a new turn or handoff does not require rereading the skill.
17
+
18
+ ## Delegate a Question or Outcome: Context, Not Control
19
+
20
+ Choose a runtime using `get_capabilities` and what the work needs: a particular
21
+ model's strengths, another perspective, or continuity with earlier work. Native
22
+ subagents also have independent judgment; use their engine's context and
23
+ lifetime controls when that delegation mechanism fits the task.
24
+
25
+ A TeamMate receives its brief and shared artifacts, not your conversation.
26
+ Supply the missing context: the user's goal, their constraints verbatim,
27
+ relevant artifact paths, known evidence, and what result would count as done.
28
+ Label your assumptions and proposed solution so the member can challenge them.
29
+ Carry through confirmed user implementation choices; leave unsettled choices
30
+ for the member to investigate. For independent review, give the requirement and
31
+ evidence without presenting the developer's conclusion as the expected answer.
32
+
33
+ Give the member room to explore, challenge your framing, and choose its approach.
34
+ Put constraints needed for the current task in `prompt`, with their reasons;
35
+ keep them focused on actual requirements and coordination needs. Avoid an edit
36
+ plan or extra prohibitions that prevent the member from following the evidence.
37
+
38
+ Shared files make parallel reading straightforward. For parallel edits, assign
39
+ paths to each writer and identify other active writers. A member that needs to
40
+ edit someone else's paths should raise the overlap before writing. Sequence
41
+ handoffs when edits depend on one another. These assignments belong in the
42
+ turn's task prompt.
43
+
44
+ ## Choose Identity for the Member's Whole Life
45
+
46
+ Use `identity` primarily to strengthen lasting judgment and behavior. For
47
+ example: "Actively challenge the overall design and its assumptions; seek
48
+ counterexamples and explain your concerns with evidence." This gives the
49
+ member a useful perspective across tasks while leaving it free to investigate.
50
+
51
+ `spawn.identity` is optional. Dreamux stores it and appends it to the member's
52
+ standing runtime instructions on every turn, including after `close` and
53
+ reopening through `send`. `send` has no identity-update parameter. A task
54
+ prompt cannot override a conflicting standing instruction; reopening preserves
55
+ that instruction too. This is instruction precedence, not filesystem isolation.
56
+ Be cautious about adding restrictions here: they persist beyond the task that
57
+ motivated them and can block useful follow-up work.
58
+
59
+ An identity saying "Only modify files under directory a" binds that member to
60
+ directory a throughout its life. A later prompt asking it to edit directory b
61
+ does not lift the restriction. If its standing role must change, start a new
62
+ member with the appropriate identity and relevant context, respecting any user
63
+ or repository constraints that continue to apply.
64
+
65
+ Keep the current task, temporary behavior constraints, path ownership,
66
+ assumptions, and acceptance evidence in `prompt`; later `send` turns can revise
67
+ those assignments within the standing boundaries. For example, an independent
68
+ review's brief can ask for findings without implementation edits and explain
69
+ why that separation matters. Omit identity when no additional lasting guidance
70
+ is needed.
71
+
72
+ ## TeamMate Tools
73
+
74
+ The `teammate` MCP server manages this Team's members; `spawn` inherits the
75
+ shared workspace rather than selecting a repository. Tool schemas describe
76
+ accepted parameters and result fields.
77
+
78
+ | Tool | Use |
79
+ | --- | --- |
80
+ | `get_capabilities` | Choose an available `agent_runtime` from its declared capabilities. |
81
+ | `spawn` | Create a member with its first `prompt`, a requested `name_prefix`, a recovery subject `intent`, and optional standing `identity`. |
82
+ | `send` | Continue an existing member; a closed member reopens with its recorded session and identity. Optional `intent` updates its recovery subject. |
83
+ | `list` | See members and their status and intent summaries. |
84
+ | `history` | Find members for recovery, including closed ones. |
85
+ | `status` | Check one member's identity and live runtime status. |
86
+ | `last` | Inspect recent messages and tool activity, including an in-progress turn, without starting or resuming the member. |
87
+ | `close` | Close a member with an explanatory `note`, retaining its history for recovery. |
88
+
89
+ Use the concrete, never-reused name returned by `spawn` for later calls.
90
+ `spawn` and `send` return submission receipts; completion is pushed later as a
91
+ new message. Continue independent work, or end your turn when none remains.
92
+ Inspection tools answer specific questions; wait for completion through the
93
+ pushed message. For scripted `workflow_*` operations, consult `dynamic-workflow`
94
+ when writing or running the script.
95
+
96
+ ## Continue and Integrate
97
+
98
+ Continue with the same member for related follow-ups, preserving its context.
99
+ Use another member when the work calls for a different standing role or an
100
+ independent perspective; keep implementation and independent review separate.
101
+ Close a member when its role is finished.
102
+
103
+ When a report is surprising or blocked, read its evidence and ask what led to
104
+ it before redirecting the work. A contradiction in the brief may require a
105
+ new decision rather than firmer wording. Take changes to the user's requirement
106
+ back to the user; resolve implementation disagreements against source evidence.
107
+
108
+ If successive review rounds keep adding state or special cases, revisit the
109
+ premise they share. An independent reading of the requirement and baseline can
110
+ help test that premise without inheriting the current design as settled.
111
+
112
+ Read decisive source, diffs, or observed results before adopting a member's
113
+ conclusion. Check that the contributions work together and satisfy the whole
114
+ request; the TeamLeader remains responsible for the final answer and its
115
+ validation limits.