diff --git a/harness/README.md b/harness/README.md index 214e810..a36884d 100644 --- a/harness/README.md +++ b/harness/README.md @@ -88,8 +88,10 @@ Written ahead of both implementations as LLeMbas CLI 02c7282; both carry it in t limit, else "This model serves one request at a time: name another model, on another server, for subagents." — and nothing else is picked. A member is refused for these too, and still only waits for a full model. -- **The offer**: the `agents {min, max}` setting is shown as **Subagents** (*fewest*, *most*; - `loop.json` `subagents.setting`), and with it the team tools, when subagents are enabled and at +- **The offer**: the `agents {min, max}` setting is shown as **Subagents** (**Min**, **Max**; + `loop.json` `subagents.setting`) — one range from 1 to the cap with two handles, and a hint that + the numbers count the session's own agent: 1 is the agent alone, Max 4 the agent and up to three + subagents — and with it the team tools, when subagents are enabled and at least one model could serve: the session's, with the capacity, or any usable model off its one-model server. `context.note.team_own` tells the model, and `subagents.setting.own` the person, when the session's model cannot serve subagents itself. diff --git a/harness/conformance/team.json b/harness/conformance/team.json index dbd42ca..b791b63 100644 --- a/harness/conformance/team.json +++ b/harness/conformance/team.json @@ -810,6 +810,59 @@ } ] }, + { + "about": "The count includes the lead: max 2 is the lead and one subagent. A second task while the first runs is refused; once it is done there is room again.", + "start": { + "min": 1, + "max": 2, + "capacity": {} + }, + "steps": [ + { + "op": "call", + "by": "lead", + "tool": "task", + "args": { + "prompt": "Find the grammar." + } + }, + { + "op": "call", + "by": "lead", + "tool": "task", + "args": { + "prompt": "x" + } + }, + { + "op": "task_done", + "by": "lead" + }, + { + "op": "call", + "by": "lead", + "tool": "task", + "args": { + "prompt": "x" + } + } + ], + "expect": [ + { + "result": null, + "delivered": {} + }, + { + "result": "The team is full: it has as many agents as the person allows (2). Give the work to a member already on it (team_send), or stop one (team_stop) first.", + "delivered": {} + }, + null, + { + "result": null, + "delivered": {} + } + ] + }, { "about": "Lowering max stops nobody: the members stay, and nothing is added until the size is under it. The lead keeps its team tools while it has members.", "start": { diff --git a/harness/loop.json b/harness/loop.json index 0acd674..6d22c3f 100644 --- a/harness/loop.json +++ b/harness/loop.json @@ -74,10 +74,12 @@ "after": "[\\p{L}\\p{N}_\\-/]|[.:][\\p{L}\\p{N}]" }, "setting": { - "about": "How the agents {min, max} setting (team.md §2) is shown to a person: label, the names of min and max, and `own` beside it when the session's model cannot serve subagents itself (subagents.md §4).", + "about": "How the agents {min, max} setting (team.md §2) is shown to a person: one range from 1 to the cap with two handles, `min` and `max` naming them; `label` beside it, `hint` (or `short` where one line has no room) saying what the numbers count — the session's own agent included, so 1 is that agent alone and Max 4 is it and up to 3 subagents; and `own` beside it when the session's model cannot serve subagents itself (subagents.md §4).", "label": "Subagents", - "min": "fewest", - "max": "most", + "min": "Min", + "max": "Max", + "hint": "The count includes this agent: 1 is this agent alone, with no subagents; Max 4 is this agent and up to 3 subagents.", + "short": "1 is this agent alone", "own": "This model serves one request at a time: subagents need another model, on another server, named in the chat." } }, diff --git a/harness/subagents.md b/harness/subagents.md index de00d80..c206dbf 100644 --- a/harness/subagents.md +++ b/harness/subagents.md @@ -69,8 +69,11 @@ and `task` keeps its rule for a model that is already full (`loop.json` `capacit ## 4. When subagents are offered The size setting `agents {min, max}` (`team.md` §2) is shown as **Subagents** — `subagents.setting`: -the label, and *fewest* and *most* for `min` and `max` (defaults 1 and 4, at most `cap` 32, kept -with the chat). It, the team tools and `blocks/team_lead.md` are **offered** when both hold: +the label, and **Min** and **Max** for `min` and `max` (defaults 1 and 4, at most `cap` 32, kept +with the chat). **The numbers count the session's own agent**: Min 1 / Max 1 is the agent alone, +with no subagents; Max 4 is the agent and up to three subagents (`subagents.setting.hint`). A UI +shows the setting as **one range from 1 to `cap` with two handles, Min and Max** (Min never past +Max): a slider in a graphical UI, two numbers on one line in a terminal, each moved on its own. It, the team tools and `blocks/team_lead.md` are **offered** when both hold: 1. Subagents are enabled for the session (`team.md` §2, rule 1). 2. **At least one model could serve as a subagent**: S itself, when it serves two or more requests diff --git a/harness/team.md b/harness/team.md index bf313f1..7b612d3 100644 --- a/harness/team.md +++ b/harness/team.md @@ -29,6 +29,8 @@ and numbers `loop.json` `team` (and the size notes in `context.note`); the promp ## 2. The size setting, and when a team is offered A chat has the setting **`agents: {min, max}`** — the agents the team may have, the lead included. +**The numbers count the chat's own agent**: `1` is that agent alone, with no subagents; `max` 4 is +that agent and up to three subagents. Nothing that shows or reads the setting counts subagents only. - `1 ≤ min ≤ max ≤ cap`. `cap` is the instance's (LLeMbas) or the global configuration's (the CLI), default `loop.json` `team.agents.cap` (32); a project's configuration never raises it. A value @@ -51,7 +53,11 @@ system prompt — when both hold, and only then: `parallel` nor `single_session` is set — a hosted API; `models/schema.json`); or any other model the person may use that is not on the chat's model's one-model server (`capacity.group`). -The setting is shown as **Subagents**, *fewest* to *most* (`loop.json` `subagents.setting`). +The setting is shown as **Subagents**, with **Min** and **Max** (`loop.json` `subagents.setting`): +**one range from 1 to `cap` with two handles**, Min and Max, where Min never passes Max — a slider in +a graphical UI; in a terminal, the two numbers on one line, each moved on its own. Beside it, its +hint (`subagents.setting.hint`, or `short` where a line has no room): the count includes the agent, +and 1 is the agent alone. Never *fewest* / *most*, and never a count of subagents alone. Both are fixed for as long as the system prompt is (`context.md` §10, rule 4: a model switch makes a new prompt and a new list). Otherwise the setting is not shown and none of the four tools is diff --git a/harness/tools/team_add.json b/harness/tools/team_add.json index cd73524..33cc1b4 100644 --- a/harness/tools/team_add.json +++ b/harness/tools/team_add.json @@ -14,7 +14,7 @@ "cli": [], "llembas": [] }, - "description": "Add a member to your team and start it at once, in the background, on its part of the work. You lead: members do the work while you plan, coordinate and review — once you have a member, tools that change things are refused to you.\n\n- `name` is how everyone addresses it: lowercase letters, digits and hyphens, after what it owns (`parser`, `api-tests`), unique in the team.\n- `role` is one line: what it owns. `task` is its brief and must stand on its own — it sees nothing of this conversation: what to do, when it is done, and what to report.\n- `goal` is the team's goal in a line; your first member needs it, and every member is told it.\n- `lead: true` lets it add members of its own and lead an area; it then manages as you do.\n- The person sets how many agents the team may have; past that this is refused. When the model is already serving as many requests as it can at once, the member waits for a slot and starts when one frees.\n- Its final reply comes to you as its report. Meanwhile team_send messages it, team_read shows the team and the room, team_stop stops it.\n- Agents: {{agents}}", + "description": "Add a member to your team and start it at once, in the background, on its part of the work. You lead: members do the work while you plan, coordinate and review — once you have a member, tools that change things are refused to you.\n\n- `name` is how everyone addresses it: lowercase letters, digits and hyphens, after what it owns (`parser`, `api-tests`), unique in the team.\n- `role` is one line: what it owns. `task` is its brief and must stand on its own — it sees nothing of this conversation: what to do, when it is done, and what to report.\n- `goal` is the team's goal in a line; your first member needs it, and every member is told it.\n- `lead: true` lets it add members of its own and lead an area; it then manages as you do.\n- The person sets how many agents the team may have, you included; past that this is refused. When the model is already serving as many requests as it can at once, the member waits for a slot and starts when one frees.\n- Its final reply comes to you as its report. Meanwhile team_send messages it, team_read shows the team and the room, team_stop stops it.\n- Agents: {{agents}}", "parameters": { "type": "object", "properties": {