teamsmith 0.1.1 → 0.2.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.md +16 -8
- package/package.json +1 -1
- package/skills/teamsmith/CHANGELOG.md +55 -0
- package/skills/teamsmith/SKILL.md +18 -7
- package/skills/teamsmith/extension/team-bg.ts +47 -11
- package/skills/teamsmith/extension/team-notify.ts +143 -4
- package/skills/teamsmith/references/agent-adapters.md +7 -7
- package/skills/teamsmith/references/config.md +29 -15
- package/skills/teamsmith/references/migration.md +38 -2
- package/skills/teamsmith/references/openspec.md +23 -9
- package/skills/teamsmith/references/protocol.md +81 -13
- package/skills/teamsmith/references/workflows.md +31 -19
- package/skills/teamsmith/scripts/lib/cmd-agents.sh +210 -70
- package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +70 -9
- package/skills/teamsmith/scripts/lib/cmd-config.sh +222 -70
- package/skills/teamsmith/scripts/lib/cmd-death.sh +2 -15
- package/skills/teamsmith/scripts/lib/cmd-docs.sh +6 -3
- package/skills/teamsmith/scripts/lib/cmd-project.sh +134 -17
- package/skills/teamsmith/scripts/lib/cmd-reply.sh +96 -0
- package/skills/teamsmith/scripts/lib/cmd-review.sh +13 -10
- package/skills/teamsmith/scripts/lib/cmd-status.sh +42 -13
- package/skills/teamsmith/scripts/lib/cmd-watch.sh +75 -13
- package/skills/teamsmith/scripts/lib/common.sh +797 -71
- package/skills/teamsmith/scripts/monitor.mjs +34 -3
- package/skills/teamsmith/scripts/panel/README.md +22 -11
- package/skills/teamsmith/scripts/panel/panel.js +217 -215
- package/skills/teamsmith/scripts/panel/src/App.tsx +421 -164
- package/skills/teamsmith/scripts/panel/src/data.ts +84 -4
- package/skills/teamsmith/scripts/panel/src/layout.ts +502 -91
- package/skills/teamsmith/scripts/panel/src/main.tsx +97 -12
- package/skills/teamsmith/scripts/panel/src/settings.ts +1 -1
- package/skills/teamsmith/scripts/panel/src/strings/en.ts +56 -21
- package/skills/teamsmith/scripts/panel/src/strings/zh.ts +56 -21
- package/skills/teamsmith/scripts/panel/src/types.ts +178 -16
- package/skills/teamsmith/scripts/replies.mjs +893 -0
- package/skills/teamsmith/scripts/team +1 -0
- package/skills/teamsmith/templates/AGENTS.section.md.tmpl +15 -2
- package/skills/teamsmith/templates/BOARD.md.tmpl +2 -2
- package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +7 -3
- package/skills/teamsmith/templates/PROTOCOL.md.tmpl +17 -0
- package/skills/teamsmith/templates/config.sh.tmpl +10 -5
- package/skills/teamsmith/templates/memory-seed.md.tmpl +3 -0
- package/skills/teamsmith/templates/pm-prompt.md.tmpl +20 -1
- package/skills/teamsmith/templates/report.md.tmpl +12 -0
- package/skills/teamsmith/templates/task.md.tmpl +4 -0
- package/skills/teamsmith/tests/bg-ledger-harness.mjs +682 -0
- package/skills/teamsmith/tests/bg-ledger.sh +307 -0
- package/skills/teamsmith/tests/checkout-shape-probe.sh +287 -58
- package/skills/teamsmith/tests/config-cli.sh +162 -288
- package/skills/teamsmith/tests/death-cause.sh +5 -2
- package/skills/teamsmith/tests/install-shape.sh +4 -2
- package/skills/teamsmith/tests/key-replies-pty.sh +375 -0
- package/skills/teamsmith/tests/key-replies-ui.sh +332 -0
- package/skills/teamsmith/tests/key-replies.sh +1075 -0
- package/skills/teamsmith/tests/ledger-ban.sh +5 -5
- package/skills/teamsmith/tests/ledger-claim.sh +247 -0
- package/skills/teamsmith/tests/lib/checkout-shape.sh +66 -14
- package/skills/teamsmith/tests/lib/model-policy.sh +26 -0
- package/skills/teamsmith/tests/lib/model-routing-boundary.sh +420 -0
- package/skills/teamsmith/tests/lib/model-routing-expansion.sh +155 -0
- package/skills/teamsmith/tests/lib/model-routing-flips.py +136 -0
- package/skills/teamsmith/tests/lib/model-routing-roles.sh +250 -0
- package/skills/teamsmith/tests/lib/proc-io.sh +103 -0
- package/skills/teamsmith/tests/lib/reply-fixture.sh +372 -0
- package/skills/teamsmith/tests/lib/tmux-iso.sh +8 -0
- package/skills/teamsmith/tests/panel-b2.sh +1 -1
- package/skills/teamsmith/tests/panel-b3-stub.sh +27 -0
- package/skills/teamsmith/tests/panel-b3.sh +14 -10
- package/skills/teamsmith/tests/panel-choices.sh +74 -61
- package/skills/teamsmith/tests/panel-cpu.sh +1 -1
- package/skills/teamsmith/tests/panel-p21.sh +311 -190
- package/skills/teamsmith/tests/perf.sh +1 -1
- package/skills/teamsmith/tests/pm-box-real.sh +1 -1
- package/skills/teamsmith/tests/pulse-nudge-key.sh +1 -1
- package/skills/teamsmith/tests/routes.sh +43 -22
- package/skills/teamsmith/tests/section-budgets.tsv +9 -5
- package/skills/teamsmith/tests/section-paths.tsv +26 -16
- package/skills/teamsmith/tests/section-select.sh +99 -16
- package/skills/teamsmith/tests/smoke.sh +930 -216
- package/skills/teamsmith/tests/snapshots/zh-dark-120-detail.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-120-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-120.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-dark-160-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-160.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-dark-59-detail.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-dark-59-p4.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-dark-59.txt +5 -5
- package/skills/teamsmith/tests/snapshots/zh-dark-99-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-99.txt +5 -5
- package/skills/teamsmith/tests/snapshots/zh-light-120-detail.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-120-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-120.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-light-160-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-160.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-light-59-detail.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-light-59-p4.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-light-59.txt +5 -5
- package/skills/teamsmith/tests/snapshots/zh-light-99-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-99.txt +5 -5
- package/skills/teamsmith/tests/task-header-model.sh +2 -1
- package/skills/teamsmith/tests/task-model-routing.sh +1014 -0
- package/skills/teamsmith-init/SKILL.md +38 -38
- package/skills/teamsmith-init/references/bootstrap.md +6 -4
- package/skills/teamsmith-init/templates/bootstrap-prompt.md.tmpl +9 -5
|
@@ -65,7 +65,7 @@ new_proj() {
|
|
|
65
65
|
&& printf '{"name":"%s","scripts":{"verify":"true"}}\n' "$name" > package.json \
|
|
66
66
|
&& git add -A && git commit -qm init ) >/dev/null 2>&1
|
|
67
67
|
if ! ( cd "$p" && bash "$team" init --session "pc-$name" --agents "$agents" --vcs local \
|
|
68
|
-
--gates "true" --docs docs/team ) >"$tmp/$name-init.log" 2>&1; then
|
|
68
|
+
--gates "true" --docs docs/team --task-models 'routine=deepseek/deepseek-flash analysis=xai/grok-4.6 verify=kimi-coding/k3-256k' --pm-model 'deepseek/deepseek-flash' ) >"$tmp/$name-init.log" 2>&1; then
|
|
69
69
|
printf 'panel-choices: 夹具 %s 的 team init 失败\n' "$name" >&2
|
|
70
70
|
tail -5 "$tmp/$name-init.log" >&2
|
|
71
71
|
return 1
|
|
@@ -129,8 +129,10 @@ if want read; then
|
|
|
129
129
|
'[k for k in d["keys"] if k["name"]=="TEAM_PI_BIN"][0]["choices"]["empty"] is False'
|
|
130
130
|
json_check "$json" "TEAM_GATES(cmd)→ source none、values 空(「打开自由输入并写明原因」的那类)" \
|
|
131
131
|
'[k for k in d["keys"] if k["name"]=="TEAM_GATES"][0]["choices"]=={"source":"none","values":[],"min":"","max":"","empty":True,"note":""}'
|
|
132
|
-
json_check "$json" "
|
|
133
|
-
'[k for k in d["keys"] if k["name"]=="
|
|
132
|
+
json_check "$json" "TEAM_PM_MODEL(model)→ source known,值 = models.known" \
|
|
133
|
+
'[k for k in d["keys"] if k["name"]=="TEAM_PM_MODEL"][0]["choices"]["source"]=="known" and [k for k in d["keys"] if k["name"]=="TEAM_PM_MODEL"][0]["choices"]["values"]==d["models"]["known"]'
|
|
134
|
+
json_check "$json" "TEAM_TASK_MODELS(task-model-map)→ source known、值 = models.known、不接受空值" \
|
|
135
|
+
'[k for k in d["keys"] if k["name"]=="TEAM_TASK_MODELS"][0]["choices"]=={"source":"known","values":d["models"]["known"],"min":"","max":"","empty":False,"note":""}'
|
|
134
136
|
json_check "$json" "schema 不认识的键也有 choices(source none、known false)" \
|
|
135
137
|
'[k for k in d["keys"] if k["name"]=="TEAM_HAND_ADDED"][0]["known"] is False and [k for k in d["keys"] if k["name"]=="TEAM_HAND_ADDED"][0]["choices"]["source"]=="none"'
|
|
136
138
|
json_check "$json" "每个记录都带 choices,且旧字段一个不少(只增不改;未知键本来就没有 route)" \
|
|
@@ -153,45 +155,46 @@ fi
|
|
|
153
155
|
|
|
154
156
|
# ---------------------------------------------------------------- known
|
|
155
157
|
if want known; then
|
|
156
|
-
section "known · 模型词汇表是本项目的数据(R2
|
|
158
|
+
section "known · 模型词汇表是本项目的数据(R2:类别策略 + 独立 PM + 已提交记录,绝不读机器目录)"
|
|
157
159
|
p="$(new_proj known)" || exit 3
|
|
158
160
|
cfg="$p/.pi/team/config.sh"
|
|
159
161
|
state="$p/.pi/team/state"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
s = s.replace('TEAM_AGENT_MODELS=""', 'TEAM_AGENT_MODELS="dev=deepseek/deepseek-flash verify=openrouter/stealth/union-alpha"')
|
|
165
|
-
s = re.sub(r'^TEAM_PM_MODEL=.*$', 'TEAM_PM_MODEL="kimi-coding/k3-256k"', s, count=1, flags=re.M)
|
|
166
|
-
open(p, 'w', encoding='utf-8').write(s)
|
|
167
|
-
PY
|
|
162
|
+
# P232:新的合法契约由真实事务入口写入(退休键必须真的不在),夹具不再手改退休键。
|
|
163
|
+
run_in "$p" config upgrade-models \
|
|
164
|
+
--task-models 'routine=deepseek/deepseek-flash analysis=openrouter/stealth/union-alpha' \
|
|
165
|
+
--pm-model 'kimi-coding/k3-256k' --yes >/dev/null || exit 3
|
|
168
166
|
mkdir -p "$state"
|
|
169
|
-
|
|
167
|
+
# 一份**完整**的已提交记录:它的模型不在任何类别映射里(旧席位时代的三段 id 也要逐字活着)。
|
|
168
|
+
. "$here/lib/model-policy.sh"
|
|
169
|
+
routing_fixture_record "$state" dev T232 "$p" "$p/docs/team/tasks/T232-x.md" 'openai-codex/gpt-5.6-terra:xhigh' sid-dev-232 policy 2026-10-09T00:00:00Z routine
|
|
170
170
|
json="$(run_in "$p" config list --json)"
|
|
171
|
-
json_check "$json" "known =
|
|
172
|
-
'sorted(d["models"]["known"])==["deepseek/deepseek-flash","kimi-coding/k3-256k","openai-codex/gpt-5.6-terra:xhigh","openrouter/stealth/union-alpha"]'
|
|
173
|
-
json_check "$json" "
|
|
174
|
-
'
|
|
175
|
-
json_check "$json" "
|
|
176
|
-
'
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
json_check "$json" "
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
s = re.sub(r'^TEAM_PM_MODEL=.*$', 'TEAM_PM_MODEL=""', s, count=1, flags=re.M)
|
|
190
|
-
open(p, 'w', encoding='utf-8').write(s)
|
|
191
|
-
PY
|
|
171
|
+
json_check "$json" "known = 类别策略的模型 + 独立 PM 模型 + 已提交记录的模型(各一次)" \
|
|
172
|
+
'sorted(d["models"]["known"])==["deepseek/deepseek-flash","kimi-coding/k3-256k","openai-codex/gpt-5.6-terra:xhigh","openrouter/stealth/union-alpha"] and d["models"]["known"].count("openai-codex/gpt-5.6-terra:xhigh")==1'
|
|
173
|
+
json_check "$json" "policy.categories 按映射原序(category/model 逐字)" \
|
|
174
|
+
'd["models"]["policy"]["categories"]==[{"category":"routine","model":"deepseek/deepseek-flash"},{"category":"analysis","model":"openrouter/stealth/union-alpha"}]'
|
|
175
|
+
json_check "$json" "policy.pm = TEAM_PM_MODEL(独立 PM,不再是席位行)" \
|
|
176
|
+
'd["models"]["policy"]["pm"]=="kimi-coding/k3-256k" and "seats" not in d["models"] and "default" not in d["models"]'
|
|
177
|
+
json_check "$json" "known 里没有退休键的残留行(schema 不认识 → refuse 行,不是模型来源)" \
|
|
178
|
+
'all(k["known"] is False for k in d["keys"] if k["name"] in ("TEAM_DEFAULT_MODEL","TEAM_AGENT_MODELS"))'
|
|
179
|
+
json_check "$json" "三段 id 逐字进 known 与 model/task-model-map 的 choices.values" \
|
|
180
|
+
'"openrouter/stealth/union-alpha" in d["models"]["known"] and "openrouter/stealth/union-alpha" in [k for k in d["keys"] if k["name"]=="TEAM_PM_MODEL"][0]["choices"]["values"] and "openrouter/stealth/union-alpha" in [k for k in d["keys"] if k["name"]=="TEAM_TASK_MODELS"][0]["choices"]["values"]'
|
|
181
|
+
json_check "$json" "已提交记录逐字:dev 行 assigned/model/category/origin/SID" \
|
|
182
|
+
'[a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["assigned"] is True and [a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["model"]=="openai-codex/gpt-5.6-terra:xhigh" and [a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["category"]=="routine" and [a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["sid"]=="sid-dev-232" and [a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["selected_via"]=="policy" and [a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["launch_via"]=="assignment"'
|
|
183
|
+
json_check "$json" "没有记录的席位不借策略模型:model 空 + diagnostic 非空" \
|
|
184
|
+
'[a for a in d["models"]["assignments"] if a["agent"]=="verify"][0]["assigned"] is False and [a for a in d["models"]["assignments"] if a["agent"]=="verify"][0]["model"]=="" and bool([a for a in d["models"]["assignments"] if a["agent"]=="verify"][0]["diagnostic"])'
|
|
185
|
+
out="$(run_in "$p" config set-task-model routine openai-codex/gpt-5.6-terra:xhigh --dry-run)"; rc=$?
|
|
186
|
+
assert_eq "三段 id 被 set-task-model 的 --dry-run 接受(rc=0)" "$rc" "0"
|
|
187
|
+
# 合法配置删掉一个未来类别:已提交记录的模型/SID 仍在 known/assignments(恢复不看映射成员)。
|
|
188
|
+
run_in "$p" config set TEAM_TASK_MODELS 'analysis=openrouter/stealth/union-alpha' --yes >/dev/null || exit 3
|
|
192
189
|
json="$(run_in "$p" config list --json)"
|
|
193
|
-
json_check "$json" "
|
|
194
|
-
'[
|
|
190
|
+
json_check "$json" "删除未来类别 routine 后:记录仍在、模型仍在 known、策略只剩 analysis" \
|
|
191
|
+
'[a for a in d["models"]["assignments"] if a["agent"]=="dev"][0]["model"]=="openai-codex/gpt-5.6-terra:xhigh" and "openai-codex/gpt-5.6-terra:xhigh" in d["models"]["known"] and [c["category"] for c in d["models"]["policy"]["categories"]]==["analysis"]'
|
|
192
|
+
# PM 启动记录(state/pm-launch.env)在 models.pm_launch 里,字段就是 starter 发布的那份。
|
|
193
|
+
printf 'metadata_version=1\nproject=%s\nwindow=pm\nmodel=kimi-coding/k3-256k\nnonce=fixture-nonce-232\ntime=2026-10-09T00:00:00Z\nmode=fresh\nidentity_via=provider,model,session_id\nresume_key=default\n' "$p" > "$state/pm-launch.env"
|
|
194
|
+
json="$(run_in "$p" config list --json)"
|
|
195
|
+
json_check "$json" "pm_launch 逐字:project/window/model/mode(只读面)" \
|
|
196
|
+
'{k:v for k,v in d["models"]["pm_launch"].items() if k!="project"}=={"window":"pm","model":"kimi-coding/k3-256k","nonce":"fixture-nonce-232","time":"2026-10-09T00:00:00Z","mode":"fresh","resume_key":"default"} and d["models"]["pm_launch"]["project"].endswith("/known")'
|
|
197
|
+
json_check "$json" "pm_launch 的模型不重复计进 known(去重)" 'd["models"]["known"].count("kimi-coding/k3-256k")==1'
|
|
195
198
|
fi
|
|
196
199
|
|
|
197
200
|
# ---------------------------------------------------------------- walk(门禁)
|
|
@@ -203,9 +206,11 @@ walk_section() { # <tree> <label>
|
|
|
203
206
|
local wt="$1" label="$2"
|
|
204
207
|
local wp json out rc
|
|
205
208
|
wp="$(new_proj "walk-$label")" || exit 3
|
|
206
|
-
# model-id-shape R1:走查的 known 里必须带一个三段 id —— 它进 model/
|
|
209
|
+
# model-id-shape R1:走查的 known 里必须带一个三段 id —— 它进 model/task-model-map 的 choices.values,
|
|
207
210
|
# 走查作业逐条拿它去 `team config set … --dry-run`(旧校验器会在这里红,这是闸门要抓回归的方向)。
|
|
208
|
-
run_in "$wp" config
|
|
211
|
+
run_in "$wp" config upgrade-models \
|
|
212
|
+
--task-models 'routine=openrouter/amazon/nova-lite-v1 analysis=xai/grok-4.6' \
|
|
213
|
+
--pm-model 'openrouter/amazon/nova-lite-v1' --yes >/dev/null || exit 3
|
|
209
214
|
json="$(run_in "$wp" config list --json)"
|
|
210
215
|
printf '%s' "$json" > "$tmp/walk-list.json"
|
|
211
216
|
local sha_before; sha_before="$(sha_of "$wp/.pi/team/config.sh")"
|
|
@@ -223,7 +228,6 @@ for line in m.group(1).splitlines():
|
|
|
223
228
|
f = line.split('|')
|
|
224
229
|
rows[f[0]] = f
|
|
225
230
|
d = json.load(open(tmp + "/walk-list.json", encoding="utf-8"))
|
|
226
|
-
seats = [s["agent"] for s in d["models"]["seats"]]
|
|
227
231
|
jobs, empties, problems = [], [], []
|
|
228
232
|
seen_keys = 0
|
|
229
233
|
for k in d["keys"]:
|
|
@@ -258,7 +262,7 @@ for k in d["keys"]:
|
|
|
258
262
|
elif kind == "bool":
|
|
259
263
|
if ch["values"] != ["1", "0"]:
|
|
260
264
|
problems.append("%s 的 values ≠ [1,0]" % name)
|
|
261
|
-
elif kind in ("model", "
|
|
265
|
+
elif kind in ("model", "task-model-map", "winlist", "pattern"):
|
|
262
266
|
if ch["values"] != d["models"]["known"]:
|
|
263
267
|
problems.append("%s 的 values ≠ models.known" % name)
|
|
264
268
|
if cls == "refuse":
|
|
@@ -266,11 +270,9 @@ for k in d["keys"]:
|
|
|
266
270
|
continue
|
|
267
271
|
empties.append("%s\t%s" % (name, "true" if ch["empty"] else "false"))
|
|
268
272
|
for v in ch["values"]:
|
|
269
|
-
if kind == "
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
continue
|
|
273
|
-
whole = "%s=%s" % (seats[0], v)
|
|
273
|
+
if kind == "task-model-map":
|
|
274
|
+
# 整映射行:读给出的值是该项目的模型词表,写入形状是 category=provider/model(面板绝不组合它)。
|
|
275
|
+
whole = "routine=%s" % v
|
|
274
276
|
elif kind in ("winlist", "pattern"):
|
|
275
277
|
whole = "%s=1" % v
|
|
276
278
|
else:
|
|
@@ -484,6 +486,10 @@ fi
|
|
|
484
486
|
if want catalogue; then
|
|
485
487
|
section "catalogue · 机器目录不是选项来源(R2:sub2api 那个已下线 provider 不许出现)"
|
|
486
488
|
p="$(new_proj catalogue)" || exit 3
|
|
489
|
+
# 一份合法的类别策略(= 一个项目自己的模型词汇表);机器目录里的 provider 绝不进来。
|
|
490
|
+
run_in "$p" config upgrade-models \
|
|
491
|
+
--task-models 'routine=deepseek/deepseek-flash analysis=kimi-coding/k3-256k' \
|
|
492
|
+
--pm-model 'deepseek/deepseek-flash' --yes >/dev/null || exit 3
|
|
487
493
|
home="$tmp/catalogue-home"
|
|
488
494
|
mkdir -p "$home/.pi/agent"
|
|
489
495
|
cat > "$home/.pi/agent/models-store.json" <<'JSON'
|
|
@@ -495,37 +501,44 @@ JSON
|
|
|
495
501
|
json="$(cd "$p" && HOME="$home" bash "$team" config list --json 2>&1)"
|
|
496
502
|
case "$json" in *sub2api*) bad "机器目录里的 sub2api 泄漏进了读(choices/known)" ;; *) ok "读里没有机器目录的 sub2api" ;; esac
|
|
497
503
|
case "$json" in *openrouter*) bad "机器目录里的 openrouter 泄漏进了读" ;; *) ok "读里没有机器目录的 openrouter" ;; esac
|
|
498
|
-
json_check "$json" "known
|
|
499
|
-
'd["models"]["known"]==["deepseek/deepseek-flash"]'
|
|
500
|
-
json_check "$json" "model/
|
|
501
|
-
'all(all(not v.startswith("sub2api/") and not v.startswith("openrouter/") for v in k["choices"]["values"]) for k in d["keys"] if k["kind"] in ("model","
|
|
504
|
+
json_check "$json" "known 只有本项目策略/记录的模型(夹具的类别 + PM)" \
|
|
505
|
+
'sorted(d["models"]["known"])==["deepseek/deepseek-flash","kimi-coding/k3-256k"]'
|
|
506
|
+
json_check "$json" "model/task-model-map/winlist/pattern 四类的 values 都不含目录里的 provider" \
|
|
507
|
+
'all(all(not v.startswith("sub2api/") and not v.startswith("openrouter/") for v in k["choices"]["values"]) for k in d["keys"] if k["kind"] in ("model","task-model-map","winlist","pattern"))'
|
|
502
508
|
fi
|
|
503
509
|
|
|
504
510
|
# ---------------------------------------------------------------- flip-drop-pm(F-A)
|
|
505
511
|
if want flip-drop-pm; then
|
|
506
|
-
section "flip F-A · 从 known
|
|
512
|
+
section "flip F-A · 从 known 里去掉独立 PM 模型 → known 断言必须红且点名 pm;恢复 → 绿"
|
|
507
513
|
ft="$tmp/flip-drop-pm"
|
|
508
514
|
mkdir -p "$ft/skills/teamsmith"
|
|
509
515
|
cp -a "$skill/scripts" "$ft/skills/teamsmith/scripts"
|
|
510
516
|
cp -a "$skill/templates" "$skill/references" "$ft/skills/teamsmith/"
|
|
511
|
-
python3 - "$ft/skills/teamsmith/scripts/lib/cmd-config.sh" <<'
|
|
517
|
+
python3 - "$ft/skills/teamsmith/scripts/lib/cmd-config.sh" <<'PYPATCH'
|
|
512
518
|
import sys
|
|
513
519
|
p = sys.argv[1]
|
|
514
|
-
|
|
515
|
-
#
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
520
|
+
# P232:读侧把独立 PM 的模型从 known 里漏掉(策略行还在,词汇表缺了)——「PM 的模型也在 known 里」必须红。
|
|
521
|
+
# 按行改:那一行的尾部是 $'\n' 的赋值,只删中间片段会留下一个跑不起来的空命令,把整段读打断。
|
|
522
|
+
lines = open(p, encoding="utf-8").read().split(chr(10))
|
|
523
|
+
out = []
|
|
524
|
+
hits = 0
|
|
525
|
+
for line in lines:
|
|
526
|
+
if 'known_models="$known_models$policy_pm"' in line:
|
|
527
|
+
hits += 1
|
|
528
|
+
out.append(' policy_pm="$TEAM_PM_MODEL"')
|
|
529
|
+
else:
|
|
530
|
+
out.append(line)
|
|
531
|
+
assert hits == 1, "找不到 PM 模型进 known 的那一行(hits=%d)" % hits
|
|
532
|
+
open(p, "w", encoding="utf-8").write(chr(10).join(out))
|
|
533
|
+
PYPATCH
|
|
521
534
|
TEAM_CHOICES_TREE="$ft" bash "$here/panel-choices.sh" known > "$tmp/flip-drop-pm-red.log" 2>&1
|
|
522
535
|
rc_red=$?
|
|
523
536
|
TEAM_CHOICES_TREE="$tree" bash "$here/panel-choices.sh" known > "$tmp/flip-drop-pm-green.log" 2>&1
|
|
524
537
|
rc_green=$?
|
|
525
|
-
if [ "$rc_red" -ne 0 ] && grep -a '✗' "$tmp/flip-drop-pm-red.log" | grep -
|
|
526
|
-
ok "F-A:去掉
|
|
538
|
+
if [ "$rc_red" -ne 0 ] && grep -a '✗' "$tmp/flip-drop-pm-red.log" | grep -qi 'pm'; then
|
|
539
|
+
ok "F-A:去掉 PM 的 known 解析后断言红且点名 pm(rc=$rc_red)"
|
|
527
540
|
else
|
|
528
|
-
bad "F-A:去掉
|
|
541
|
+
bad "F-A:去掉 PM 的 known 解析后断言没红/没点名 pm(rc=$rc_red)"
|
|
529
542
|
fi
|
|
530
543
|
[ "$rc_green" -eq 0 ] && ok "F-A:恢复真树后 known 断言绿" || bad "F-A:真树也红了(rc=$rc_green)"
|
|
531
544
|
printf ' --- 红侧尾部 ---\n'
|
|
@@ -151,7 +151,7 @@ pc_init_clean=(env -u TEAM_ROOT -u TEAM_MAIN_ROOT -u TEAM_ROOT_SOURCE -u TEAM_RO
|
|
|
151
151
|
( cd "$neut_root" && git init -q -b main && git config user.email panel-cpu@teamsmith && git config user.name panel-cpu ) \
|
|
152
152
|
>/dev/null 2>&1
|
|
153
153
|
( cd "$neut_root" && "${pc_init_clean[@]}" bash "$tree/skills/teamsmith/scripts/team" init \
|
|
154
|
-
--session "$sess" --agents "dev verify" --vcs local --gates "true" --docs docs/team ) \
|
|
154
|
+
--session "$sess" --agents "dev verify" --vcs local --gates "true" --docs docs/team --task-models 'routine=deepseek/deepseek-flash analysis=xai/grok-4.6 verify=kimi-coding/k3-256k' --pm-model 'deepseek/deepseek-flash' ) \
|
|
155
155
|
>"$neut_root/init.log" 2>&1 \
|
|
156
156
|
|| { printf 'panel-cpu: 中性测量目标的 team init 失败(见 %s/init.log)\n' "$neut_root" >&2; tail -3 "$neut_root/init.log" >&2; exit 3; }
|
|
157
157
|
printf '== measured project root: %s (neutral fixture project — not the caller worktree) ==\n' "$neut_root"
|