dsh-submodel 0.2.0 → 0.3.0
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/README.en.md +60 -5
- package/README.md +49 -4
- package/lib/index.js +44 -1
- package/lib/team-fit.js +23 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
It does **not** ship its own provider system — it reads the channels and models already configured in your
|
|
16
16
|
profile, writes a delegation policy into the system prompt, and adds one unified entry point
|
|
17
17
|
(`delegate_task`) on top of the official `subagent`. Since 0.2.0 the mode is decided by **route** (no model
|
|
18
|
-
naming convention required), and there is a first-run setup wizard plus `economyRoutes`.
|
|
19
|
-
|
|
18
|
+
naming convention required), and there is a first-run setup wizard plus `economyRoutes`. Since 0.3.0 you can
|
|
19
|
+
optionally enable the **team formation self-check**: with Agent Teams enabled, the top-level main model declares
|
|
20
|
+
whether to parallelise, how many teammates to start, and which model each one uses before the first real task
|
|
21
|
+
(off by default). Requires DSH `0.2.2-rc.1` (`0.2.1` and older are not compatible).
|
|
20
22
|
|
|
21
23
|
## Install
|
|
22
24
|
|
|
@@ -102,6 +104,7 @@ Full field reference:
|
|
|
102
104
|
| `enabled` | `true` | Master switch; when `false`, only an empty prompt section is registered and no tools/guards are installed |
|
|
103
105
|
| `autoConfigure` | `true` | Whether to register the `configure_submodel` wizard for first-run setup (visible only for a top-level agent whose `executor` is not configured); turn it off to configure everything manually |
|
|
104
106
|
| `preset` | `standard` | Only applies to that composition |
|
|
107
|
+
| `teamFit.enabled` | `false` | Team formation self-check section (0.3.0+): needs the master `enabled` switch to be `true` as well, plus the official Agent Teams plugin; visible only to the top-level main model of the target preset — see below. Off by default, which is the rollback state |
|
|
105
108
|
| `executor.provider` / `executor.model` | empty | Execution route: the default delegation target in boss mode; **leaving it empty logs an `error`** (see Troubleshooting). Switching the main model to this route also means Flash mode |
|
|
106
109
|
| `executor.reasoningEffort` | `max` | Default effort only when the caller did not specify one |
|
|
107
110
|
| `economyRoutes` | `[]` | Extra "cheap routes", each `{provider?, model}`: the current request matching any of them counts as Flash (`economize`) mode. Omit `provider` to match on `model` alone; **when non-empty, the legacy flash-suffix rule no longer applies** |
|
|
@@ -151,6 +154,52 @@ Two typical calls:
|
|
|
151
154
|
{ "description": "review the state machine", "prompt": "<complete task>", "provider": "your-provider", "model": "your-model" }
|
|
152
155
|
```
|
|
153
156
|
|
|
157
|
+
## Team formation self-check (optional, 0.3.0+)
|
|
158
|
+
|
|
159
|
+
This is an extra prompt section for users who have **Agent Teams enabled**; it is off by default. When
|
|
160
|
+
enabled, the top-level main model first decides "can this be parallelised, how many teammates, which model
|
|
161
|
+
for each" before every real task and reports the conclusion in three fixed leading lines:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
可并行性:
|
|
165
|
+
串行点:
|
|
166
|
+
决定:
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
- Greetings do not trigger it; follow-up questions, progress queries and retries reuse the earlier decision,
|
|
170
|
+
and it re-evaluates only when the task scope or the set of editable files changes.
|
|
171
|
+
- **Serial**: the third line is exactly "决定:本次串行,不用任务板" — zero task-board entries and zero
|
|
172
|
+
teammates, and the main model does the work itself.
|
|
173
|
+
- **Parallel**: the third line is "决定:并行 N 个队友", followed on the same line by each block's work,
|
|
174
|
+
owner, write scope (read-only also stated), concrete model, acceptance method and dependencies; only 2–4
|
|
175
|
+
mutually non-conflicting, independently verifiable blocks qualify.
|
|
176
|
+
- In parallel mode the task board records each block's `write_scopes` and `blocked_by`; shared files,
|
|
177
|
+
integration, commits and final verification stay with the main model.
|
|
178
|
+
- Model assignment reuses this package's routing (see the previous section): execution blocks go through
|
|
179
|
+
`delegate_task`; independent reviews use a fresh context; escalation still follows "problem complexity /
|
|
180
|
+
execution bottleneck" and never a review or risk label alone.
|
|
181
|
+
|
|
182
|
+
Requirements: (1) the official Agent Teams plugin is enabled; (2) this package's `enabled: true` (default);
|
|
183
|
+
(3) `teamFit.enabled: true` (default `false`). It only applies to the **top-level main model** of the target
|
|
184
|
+
`preset` (default `standard`); subagents and other compositions do not show it, while a normal user fork
|
|
185
|
+
(which merely carries `parentSession`) still counts as the main model.
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
# Append this one field; a profile patch replaces the whole config block,
|
|
189
|
+
# so keep any existing fields in the same block.
|
|
190
|
+
- id: submodel
|
|
191
|
+
config:
|
|
192
|
+
teamFit:
|
|
193
|
+
enabled: true
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
> The snippet only shows the new field. If your config already has `executor` / `experts`, keep them in the
|
|
197
|
+
> same `config` block — a profile patch **replaces the whole block** and does not merge field by field.
|
|
198
|
+
|
|
199
|
+
**Rollback**: set `teamFit.enabled` to `false` and restart the profile — no plugin removal needed; the master
|
|
200
|
+
`enabled: false` also works. When Agent Teams is off or a service query fails, the section hides itself and
|
|
201
|
+
does not affect other prompt sections.
|
|
202
|
+
|
|
154
203
|
## Relationship to the official plugins
|
|
155
204
|
|
|
156
205
|
| Capability | Provided by |
|
|
@@ -193,6 +242,7 @@ Fail-fast: startup warnings are logged only and never thrown; errors only surfac
|
|
|
193
242
|
- Model metadata has no price field, so which routes count as "cheap" is up to your configuration (the wizard
|
|
194
243
|
only pre-fills candidates; it does not decide for you).
|
|
195
244
|
- Non-GUI clients have no question card, so use Option B (manual YAML).
|
|
245
|
+
- The team formation self-check is a **prompt-level constraint**: whether to parallelise and how many teammates to start is still the main model's decision, not enforced; it does not enable Agent Teams for you.
|
|
196
246
|
|
|
197
247
|
## Rollback
|
|
198
248
|
|
|
@@ -203,6 +253,9 @@ dsh plugin --profile <your-profile> remove dsh-submodel
|
|
|
203
253
|
Removing the plugin leaves the host authorization row in the profile patch; to revert that too, delete the
|
|
204
254
|
`subagent-model-selection-settings` entry manually.
|
|
205
255
|
|
|
256
|
+
To turn off only the team formation self-check while keeping everything else, set `teamFit.enabled` to `false`
|
|
257
|
+
and restart the profile (no plugin removal needed).
|
|
258
|
+
|
|
206
259
|
## Development and verification
|
|
207
260
|
|
|
208
261
|
```bash
|
|
@@ -218,13 +271,15 @@ Current verification counts (CI runs the same commands on every push / PR, see `
|
|
|
218
271
|
|
|
219
272
|
| Check | Result |
|
|
220
273
|
|---|---|
|
|
221
|
-
| fixture | **
|
|
274
|
+
| fixture | **126** assertions, `failed: 0` |
|
|
222
275
|
| Python driver | **7** test cases, `OK` |
|
|
223
|
-
| Public-profile smoke | **
|
|
276
|
+
| Public-profile smoke | **8** assertions, `failed: 0` |
|
|
224
277
|
|
|
225
278
|
GUI end-to-end (the `configure_submodel` card and both writes, `delegate_task` delegation, and switching the
|
|
226
279
|
main model to the execution route to enter economize mode) must be accepted by the user in a restarted real
|
|
227
|
-
GUI session and is **not verified yet**.
|
|
280
|
+
GUI session and is **not verified yet**. For the team formation self-check, the deterministic parts (the three
|
|
281
|
+
leading lines, identity/preset/team-state gating, off-by-default rollback) are covered by the fixture; the
|
|
282
|
+
actual first-turn reply and teammate count in a real GUI conversation still need acceptance in a new session.
|
|
228
283
|
|
|
229
284
|
## Contributing
|
|
230
285
|
|
package/README.md
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
它**不新建 provider 体系**——只读你 profile 里已有的渠道与模型配置,把委派策略写进系统提示词,
|
|
16
16
|
并给官方 `subagent` 补一个统一的委派入口 `delegate_task`。0.2.0 起模式按**路由**判定(不再依赖
|
|
17
|
-
模型命名约定),并提供首次配置向导与 `economyRoutes
|
|
17
|
+
模型命名约定),并提供首次配置向导与 `economyRoutes`;0.3.0 起可**可选**开启「团队队形自检」:
|
|
18
|
+
同时启用官方 Agent Teams 后,顶层主代理在首轮实际任务前先声明是否并行、开几个队友、每个用什么模型
|
|
19
|
+
(默认关闭)。要求 DSH `0.2.2-rc.1`(`0.2.1` 及更早不兼容)。
|
|
18
20
|
|
|
19
21
|
## 安装
|
|
20
22
|
|
|
@@ -94,6 +96,7 @@ YAML,并且**不会写任何配置**。
|
|
|
94
96
|
| `enabled` | `true` | 总开关;`false` 时只注册一个空段,不装任何工具/guard |
|
|
95
97
|
| `autoConfigure` | `true` | 是否在首次配置时注册 `configure_submodel` 向导(顶层主代理且 `executor` 未配置才可见);关掉后完全手动配置 |
|
|
96
98
|
| `preset` | `standard` | 只对这个 composition 生效 |
|
|
99
|
+
| `teamFit.enabled` | `false` | 团队队形自检段开关(0.3.0+):需总开关 `enabled` 同时为 `true`、并启用官方 Agent Teams;只对目标 preset 的顶层主代理显示,详见下文。默认关闭 = 回滚态 |
|
|
97
100
|
| `executor.provider` / `executor.model` | 空 | 执行路由:强主脑的默认派工目标;**留空会记 error 日志**(见故障排查)。主模型切到这条路由本身也等于进入 Flash 模式 |
|
|
98
101
|
| `executor.reasoningEffort` | `max` | 只在调用方没显式指定档位时作缺省 |
|
|
99
102
|
| `economyRoutes` | `[]` | 额外声明「便宜路由」,每项 `{provider?, model}`:本次请求命中任一项即算 Flash(economize)模式。`provider` 省略时只按 `model` 匹配;**非空时旧的 flash 后缀规则不再生效** |
|
|
@@ -138,6 +141,43 @@ YAML,并且**不会写任何配置**。
|
|
|
138
141
|
{ "description": "复核状态机", "prompt": "<完整任务说明>", "provider": "your-provider", "model": "your-model" }
|
|
139
142
|
```
|
|
140
143
|
|
|
144
|
+
## 团队队形自检(可选,0.3.0+)
|
|
145
|
+
|
|
146
|
+
这是给**启用了 Agent Teams 的用户**的附加提示词段,默认关闭。打开后,顶层主代理在每轮实际任务
|
|
147
|
+
开始前先判断「能不能并行、开几个队友、每个用什么模型」,并把结论用下面三个行首连续报给你:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
可并行性:
|
|
151
|
+
串行点:
|
|
152
|
+
决定:
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
- **问候不触发**;普通追问、进度查询和重试沿用已经给出的决定,只有任务范围或可改动文件范围变化才重判。
|
|
156
|
+
- **串行**时第三行固定为「决定:本次串行,不用任务板」:任务板新增 0 项、启动队友 0 个,主代理自己做完。
|
|
157
|
+
- **并行**时写「决定:并行 N 个队友」,并在同一行写清每块工作、负责人、写域(只读也注明)、具体模型、
|
|
158
|
+
验收方法和依赖;只有能拆成 2–4 个互不争写、可独立验收的块时才并行。
|
|
159
|
+
- 并行时任务板记录每块的 `write_scopes` 与 `blocked_by`;共享文件、集成、提交和最终验证由主代理独占。
|
|
160
|
+
- 模型分配沿用本包已有的模型路由(见上一节):普通执行块走 `delegate_task`;独立审查使用全新上下文;
|
|
161
|
+
升级专家仍按「问题复杂度 / 执行瓶颈」判据,不因审查或风险标签直接跳档。
|
|
162
|
+
|
|
163
|
+
**前提与开关**:需要同时满足 ① 官方 Agent Teams 已启用;② 本包 `enabled: true`(默认);
|
|
164
|
+
③ `teamFit.enabled: true`(默认 `false`)。只对目标 `preset`(默认 `standard`)的**顶层主代理**生效;
|
|
165
|
+
子代理与其他 composition 不显示;普通用户 fork 出来的会话(只带 `parentSession`)仍按主脑处理。
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
# 只追加这一项;profile 补丁会整段替换 config,已有字段必须一起保留。
|
|
169
|
+
- id: submodel
|
|
170
|
+
config:
|
|
171
|
+
teamFit:
|
|
172
|
+
enabled: true
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
> 上面只示范新增字段。若你已有 `executor` / `experts` 等配置,请在同一 `config` 块里一并保留——
|
|
176
|
+
> profile 补丁是**整段替换**,不会逐字段合并。
|
|
177
|
+
|
|
178
|
+
**回滚**:把 `teamFit.enabled` 设为 `false` 并重启 profile 即可完全关闭(不必卸载插件);
|
|
179
|
+
总开关 `enabled: false` 同样有效。团队关闭或服务查询失败时,这段正文自动隐藏,不影响其他提示词。
|
|
180
|
+
|
|
141
181
|
## 与官方插件的边界
|
|
142
182
|
|
|
143
183
|
| 能力 | 提供方 |
|
|
@@ -177,6 +217,7 @@ fail-fast:启动期的告警只记日志、绝不抛;只有你主动调用
|
|
|
177
217
|
不创建渠道/密钥,也不改其他插件。
|
|
178
218
|
- 模型元数据里没有价格字段,哪些路由算"便宜"由你的配置决定(向导只做候选预填,不替你拍板)。
|
|
179
219
|
- 非 GUI 客户端没有提问卡可用,只能用「方式 B」手动 YAML。
|
|
220
|
+
- 团队队形自检只做**提示词约束**:是否并行、开几个队友仍由主代理判断,不强制;它也不会替你开启 Agent Teams。
|
|
180
221
|
|
|
181
222
|
## 回滚
|
|
182
223
|
|
|
@@ -186,6 +227,8 @@ dsh plugin --profile <你的 profile> remove dsh-submodel
|
|
|
186
227
|
|
|
187
228
|
插件移除后,宿主授权行仍在 profile 补丁里;如需一并撤销,手动删除 `subagent-model-selection-settings` 条目即可。
|
|
188
229
|
|
|
230
|
+
只关团队队形自检、保留其他功能:把 `teamFit.enabled` 设为 `false` 并重启 profile(不必卸载插件)。
|
|
231
|
+
|
|
189
232
|
## 开发与验证
|
|
190
233
|
|
|
191
234
|
```bash
|
|
@@ -201,12 +244,14 @@ node tests/unit/public-profile-smoke.mjs # 干净用户配置的确定性
|
|
|
201
244
|
|
|
202
245
|
| 检查 | 结果 |
|
|
203
246
|
|---|---|
|
|
204
|
-
| fixture | **
|
|
247
|
+
| fixture | **126** 条断言,`failed: 0` |
|
|
205
248
|
| Python 驱动 | **7** 个用例 `OK` |
|
|
206
|
-
| 公共 profile 冒烟 | **
|
|
249
|
+
| 公共 profile 冒烟 | **8** 条断言,`failed: 0` |
|
|
207
250
|
|
|
208
251
|
GUI 端到端(`configure_submodel` 弹卡与两处写入、`delegate_task` 派工、主模型切到执行路由后进入
|
|
209
|
-
economize 模式)需要在重启后的真实 GUI
|
|
252
|
+
economize 模式)需要在重启后的真实 GUI 会话里由用户验收,**尚未验证**。团队队形自检的确定性部分
|
|
253
|
+
(三行正文、身份/预设/团队状态门控、默认关闭与回滚)已由 fixture 覆盖;真实 GUI 首轮对话里的
|
|
254
|
+
实际回复与队友数同样需要在新会话里验收。
|
|
210
255
|
|
|
211
256
|
## 参与贡献
|
|
212
257
|
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dsh-submodel / index.js —— 插件入口(v0.1.0)。
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 职责:全局注册策略提示词段及可选的团队队形自检段;`enabled` 时再对每个合格的 standard agent 安装
|
|
5
5
|
* scoped 能力(提示词段正文替换、角色 guard、统一委派入口 `delegate_task`),并在
|
|
6
6
|
* Agent 释放 / 组合变化 / 配置重载时**准确卸载自己装的东西**。
|
|
7
7
|
*
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
routeFromAssembly,
|
|
50
50
|
routingTextFor,
|
|
51
51
|
} from './policy.js';
|
|
52
|
+
import { TEAM_FIT_SECTION, teamFitTextFor } from './team-fit.js';
|
|
52
53
|
import { createDelegateTool, findNativeSubagent } from './delegation.js';
|
|
53
54
|
import { createSetupTool } from './setup.js';
|
|
54
55
|
|
|
@@ -62,6 +63,8 @@ export const Config = z.object({
|
|
|
62
63
|
enabled: z.boolean().default(true),
|
|
63
64
|
/** 只对这一个 composition 生效;其他 preset 不安装任何东西。 */
|
|
64
65
|
preset: z.string().default('standard'),
|
|
66
|
+
/** 团队队形自检单独启用,且服从自动策略总开关。 */
|
|
67
|
+
teamFit: z.object({ enabled: z.boolean().default(false) }).default({ enabled: false }),
|
|
65
68
|
/** 能力门控工具名:该 scope 不可见时策略段不渲染(工具仍按注册门控安装)。 */
|
|
66
69
|
toolName: z.string().default('list_subagent_models'),
|
|
67
70
|
/** 段顺序;默认紧接 TOOL_SUBAGENT(2800)。 */
|
|
@@ -125,6 +128,17 @@ function belongsToComposition(agent, presetId, presetService) {
|
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
|
|
131
|
+
/** 团队服务是首选。回退时只看本步获准的工具,注册表在团队关闭时也有同名工具。 */
|
|
132
|
+
function teamEnabledFor(ctx, agent, toolSet) {
|
|
133
|
+
try {
|
|
134
|
+
const teams = ctx.get('agentTeams');
|
|
135
|
+
if (teams != null) return teams.isEnabled(agent) === true;
|
|
136
|
+
} catch {
|
|
137
|
+
// 服务不可用时仍可从这次 assembly 的工具集合取得正向证据。
|
|
138
|
+
}
|
|
139
|
+
return toolSet != null && ctx.tools.get('team_task_create', agent, toolSet) !== undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
128
142
|
export function apply(ctx, config) {
|
|
129
143
|
const enabled = config.enabled === true;
|
|
130
144
|
const presetId = config.preset ?? 'standard';
|
|
@@ -178,6 +192,35 @@ export function apply(ctx, config) {
|
|
|
178
192
|
return;
|
|
179
193
|
}
|
|
180
194
|
|
|
195
|
+
// ── 可选的团队队形自检段(总开关与 teamFit.enabled 同时为 true 才注册一次) ──────
|
|
196
|
+
// 每次组装现判「主脑 / 目标预设 / 团队是否开启」,条件不满足或查询异常返回空串,
|
|
197
|
+
// 宿主会省略整段;提示词组装与重试都没有写入副作用。
|
|
198
|
+
if (config.teamFit?.enabled === true) {
|
|
199
|
+
ctx.systemPrompt.section({
|
|
200
|
+
name: TEAM_FIT_SECTION,
|
|
201
|
+
// 紧跟官方团队段:SECTION_ORDERS.TEAM_POLICY = 600,+1 让自检段排在它后面。
|
|
202
|
+
order: ctx.systemPrompt.getSectionOrder('TEAM_POLICY') + 1,
|
|
203
|
+
text: (context) => {
|
|
204
|
+
try {
|
|
205
|
+
const { agent, scope, toolSet } = context;
|
|
206
|
+
if (!agent?.ctx || scope !== agent) return '';
|
|
207
|
+
// session.header 在首轮前已验证;requestHeader() 要等第一次模型请求才有值。
|
|
208
|
+
const header = agent.session?.header;
|
|
209
|
+
if (typeof header?.id !== 'string' || header.id !== agent.session.id) return '';
|
|
210
|
+
// 本仓库的 roleOf(agent) 读的就是这份 durable header 与 options,
|
|
211
|
+
// 等价于参考实现的 roleOf(header, agent.options)。
|
|
212
|
+
const role = roleOf(agent);
|
|
213
|
+
if (role !== 'root') return '';
|
|
214
|
+
const preset = ctx.get('agentPresets')?.composedPreset(agent.ctx);
|
|
215
|
+
if (preset !== presetId) return '';
|
|
216
|
+
return teamFitTextFor({ role, preset, presetId, teamEnabled: teamEnabledFor(ctx, agent, toolSet) });
|
|
217
|
+
} catch {
|
|
218
|
+
return '';
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
181
224
|
// ── fail-fast(只记日志、绝不抛) ──────────────────────────────────────────
|
|
182
225
|
if (executorIncomplete) {
|
|
183
226
|
ctx.logger.error(
|
package/lib/team-fit.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** 只给启用团队的目标预设主脑看的提示词段。 */
|
|
2
|
+
export const TEAM_FIT_SECTION = 'tool:team-fit';
|
|
3
|
+
|
|
4
|
+
const TEAM_FIT_TEXT = `## 团队队形自检(本会话已开启 Agent Teams)
|
|
5
|
+
|
|
6
|
+
第一次收到实际任务时,由你决定是否并行、开几个队友、每个用什么模型。问候不触发。动手或调工具前,先用下面三个行首向用户报告,每行一个结论,不加标题、编号或空行,然后执行:
|
|
7
|
+
可并行性:能否拆出 2–4 个写域互斥、可各自验证的块?给出依据。
|
|
8
|
+
串行点:指出共用文件、契约、数据库、迁移号、CI、提交权或需用户裁决的环节,没有就写“无”。
|
|
9
|
+
决定:串行时原样写“本次串行,不用任务板”。并行时写“并行 N 个队友”,在同一行逐块写清工作、负责人、写域(只读也注明)、具体模型、验收方法和依赖。
|
|
10
|
+
沿用已给出的决定,只有任务范围或写域改变才重判。普通跟进、进度查询和重试不重复这三行。
|
|
11
|
+
|
|
12
|
+
同一文件或契约上的连续修改、只能做一次的全量验证或真实跑批、写域切不开、须先裁决预算或线上操作、协调成本不低于收益时,选串行。串行由主脑自己做,不建任务、不开子代理。至少两个块可以独立取证或修改不同文件,并能各自验证时才并行。在共享任务板写明每块的验收条件、负责人和 write_scopes,有先后关系填 blocked_by。只启动已就绪的队友,按工具返回的名字认领或分配。
|
|
13
|
+
|
|
14
|
+
模型分配沿用本会话的“模型路由”,主脑保持当前模型。实施、取证、测试、文档等执行块用 delegate_task,不传 provider/model(Flash 继承当前路由,强主脑走配置的执行档)。独立审查使用全新上下文,不用 subagent_fork,只给计划指针、相关差异和验收标准。审查默认同样走执行档。遇到无法自证的复杂判断或执行遇到瓶颈,才按现有阶梯成对指定 provider/model 并说明理由,不因审查或风险标签直接跳到最高档。
|
|
15
|
+
|
|
16
|
+
派工时把边界写进队友任务:只在分配的写域内工作并交回定向测试或原始证据,不得 git commit/push,不改共享契约、迁移号、状态页、索引或 CI。共享文件、集成、提交和最终验证由主脑独占。`;
|
|
17
|
+
|
|
18
|
+
/** 身份、预设或团队状态未确定时,空正文由宿主渲染器丢弃。 */
|
|
19
|
+
export function teamFitTextFor({ role, preset, presetId, teamEnabled } = {}) {
|
|
20
|
+
if (role !== 'root' || teamEnabled !== true) return '';
|
|
21
|
+
if (typeof presetId !== 'string' || presetId.trim() === '' || preset !== presetId) return '';
|
|
22
|
+
return TEAM_FIT_TEXT;
|
|
23
|
+
}
|