teamsmith 0.1.2 → 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.
Files changed (158) hide show
  1. package/README.md +13 -7
  2. package/package.json +1 -1
  3. package/skills/teamsmith/CHANGELOG.md +67 -0
  4. package/skills/teamsmith/SKILL.md +26 -8
  5. package/skills/teamsmith/extension/team-notify.ts +37 -6
  6. package/skills/teamsmith/extension/team.ts +438 -0
  7. package/skills/teamsmith/references/agent-adapters.md +7 -7
  8. package/skills/teamsmith/references/config.md +65 -18
  9. package/skills/teamsmith/references/migration.md +220 -34
  10. package/skills/teamsmith/references/protocol.md +250 -25
  11. package/skills/teamsmith/references/troubleshooting.md +124 -7
  12. package/skills/teamsmith/references/workflows.md +66 -20
  13. package/skills/teamsmith/scripts/lib/cmd-agents.sh +525 -90
  14. package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +71 -10
  15. package/skills/teamsmith/scripts/lib/cmd-config.sh +562 -128
  16. package/skills/teamsmith/scripts/lib/cmd-death.sh +2 -15
  17. package/skills/teamsmith/scripts/lib/cmd-docs.sh +6 -3
  18. package/skills/teamsmith/scripts/lib/cmd-draft.sh +4 -4
  19. package/skills/teamsmith/scripts/lib/cmd-help.sh +677 -0
  20. package/skills/teamsmith/scripts/lib/cmd-init.sh +157 -5
  21. package/skills/teamsmith/scripts/lib/cmd-interrupt.sh +461 -0
  22. package/skills/teamsmith/scripts/lib/cmd-meeting.sh +2 -25
  23. package/skills/teamsmith/scripts/lib/cmd-project.sh +149 -105
  24. package/skills/teamsmith/scripts/lib/cmd-reap.sh +277 -0
  25. package/skills/teamsmith/scripts/lib/cmd-reply.sh +96 -0
  26. package/skills/teamsmith/scripts/lib/cmd-review.sh +188 -40
  27. package/skills/teamsmith/scripts/lib/cmd-status.sh +268 -30
  28. package/skills/teamsmith/scripts/lib/cmd-update.sh +36 -7
  29. package/skills/teamsmith/scripts/lib/cmd-watch.sh +634 -54
  30. package/skills/teamsmith/scripts/lib/common.sh +1560 -109
  31. package/skills/teamsmith/scripts/lib/gate-lock.sh +544 -0
  32. package/skills/teamsmith/scripts/monitor.mjs +34 -3
  33. package/skills/teamsmith/scripts/panel/README.md +22 -11
  34. package/skills/teamsmith/scripts/panel/draft-send.sh +11 -1
  35. package/skills/teamsmith/scripts/panel/panel.js +226 -224
  36. package/skills/teamsmith/scripts/panel/src/App.tsx +478 -184
  37. package/skills/teamsmith/scripts/panel/src/clipboard.ts +11 -5
  38. package/skills/teamsmith/scripts/panel/src/compose.ts +6 -3
  39. package/skills/teamsmith/scripts/panel/src/data.ts +95 -7
  40. package/skills/teamsmith/scripts/panel/src/layout.ts +703 -152
  41. package/skills/teamsmith/scripts/panel/src/main.tsx +129 -19
  42. package/skills/teamsmith/scripts/panel/src/settings.ts +1 -1
  43. package/skills/teamsmith/scripts/panel/src/strings/en.ts +76 -31
  44. package/skills/teamsmith/scripts/panel/src/strings/zh.ts +78 -33
  45. package/skills/teamsmith/scripts/panel/src/types.ts +204 -17
  46. package/skills/teamsmith/scripts/replies.mjs +896 -0
  47. package/skills/teamsmith/scripts/shim/tmux +18 -0
  48. package/skills/teamsmith/scripts/strings/commands.tsv +86 -0
  49. package/skills/teamsmith/scripts/strings/help.en.tsv +503 -0
  50. package/skills/teamsmith/scripts/strings/help.zh.tsv +489 -0
  51. package/skills/teamsmith/scripts/team +20 -6
  52. package/skills/teamsmith/templates/AGENTS.section.md.tmpl +23 -3
  53. package/skills/teamsmith/templates/BOARD.md.tmpl +2 -2
  54. package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +7 -3
  55. package/skills/teamsmith/templates/PROTOCOL.md.tmpl +17 -0
  56. package/skills/teamsmith/templates/config.sh.tmpl +29 -5
  57. package/skills/teamsmith/templates/memory-seed.md.tmpl +3 -0
  58. package/skills/teamsmith/templates/pm-prompt.md.tmpl +41 -1
  59. package/skills/teamsmith/templates/report.md.tmpl +12 -0
  60. package/skills/teamsmith/templates/task.md.tmpl +4 -0
  61. package/skills/teamsmith/tests/bg-ledger-harness.mjs +464 -40
  62. package/skills/teamsmith/tests/bg-ledger.sh +168 -10
  63. package/skills/teamsmith/tests/checkout-shape-probe.sh +3 -1
  64. package/skills/teamsmith/tests/config-cli.sh +320 -300
  65. package/skills/teamsmith/tests/death-cause.sh +5 -2
  66. package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +7 -1
  67. package/skills/teamsmith/tests/fixtures/p287/lint-good.sh.in +3 -0
  68. package/skills/teamsmith/tests/fixtures/p287/lint-hardcoded.sh.in +3 -0
  69. package/skills/teamsmith/tests/fixtures/p287/lint-no-ns.sh.in +3 -0
  70. package/skills/teamsmith/tests/fixtures/p55/flip-p49.sh +18 -6
  71. package/skills/teamsmith/tests/flip-m33.sh +5 -3
  72. package/skills/teamsmith/tests/flip-m37.sh +4 -1
  73. package/skills/teamsmith/tests/flip-m4.3.sh +4 -1
  74. package/skills/teamsmith/tests/flip-m6.3.sh +4 -1
  75. package/skills/teamsmith/tests/flip-m6.5.sh +4 -1
  76. package/skills/teamsmith/tests/flip-m7.2.sh +4 -1
  77. package/skills/teamsmith/tests/flip-p158.sh +2 -1
  78. package/skills/teamsmith/tests/flip-p210.sh +4 -1
  79. package/skills/teamsmith/tests/flip-p217.sh +4 -1
  80. package/skills/teamsmith/tests/flip-p287-lock.sh +342 -0
  81. package/skills/teamsmith/tests/flip-p287-name.sh +279 -0
  82. package/skills/teamsmith/tests/flip-p304-read-side.sh +98 -0
  83. package/skills/teamsmith/tests/flip-p308-skip-not-pass.sh +151 -0
  84. package/skills/teamsmith/tests/flip-p309-p162-deep.sh +122 -0
  85. package/skills/teamsmith/tests/flip-p310-lock.sh +216 -0
  86. package/skills/teamsmith/tests/flip-p310-socket.sh +125 -0
  87. package/skills/teamsmith/tests/help-surface.sh +1664 -0
  88. package/skills/teamsmith/tests/install-shape.sh +283 -22
  89. package/skills/teamsmith/tests/key-replies-pty.sh +374 -0
  90. package/skills/teamsmith/tests/key-replies-ui.sh +325 -0
  91. package/skills/teamsmith/tests/key-replies.sh +1314 -0
  92. package/skills/teamsmith/tests/ledger-ban.sh +9 -8
  93. package/skills/teamsmith/tests/ledger-claim.sh +248 -0
  94. package/skills/teamsmith/tests/lib/bounded-spin.sh +90 -0
  95. package/skills/teamsmith/tests/lib/model-policy.sh +30 -0
  96. package/skills/teamsmith/tests/lib/model-routing-boundary.sh +420 -0
  97. package/skills/teamsmith/tests/lib/model-routing-expansion.sh +155 -0
  98. package/skills/teamsmith/tests/lib/model-routing-flips.py +187 -0
  99. package/skills/teamsmith/tests/lib/model-routing-roles.sh +250 -0
  100. package/skills/teamsmith/tests/lib/proc-io.sh +103 -0
  101. package/skills/teamsmith/tests/lib/reply-fixture.sh +367 -0
  102. package/skills/teamsmith/tests/lib/section-guard.sh +258 -13
  103. package/skills/teamsmith/tests/lib/tmp-root.sh +139 -27
  104. package/skills/teamsmith/tests/lib/tmux-cap.sh +10 -1
  105. package/skills/teamsmith/tests/lib/tmux-iso.sh +39 -13
  106. package/skills/teamsmith/tests/loop-inventory.tsv +59 -47
  107. package/skills/teamsmith/tests/panel-b2.sh +107 -4
  108. package/skills/teamsmith/tests/panel-b3-stub.sh +139 -4
  109. package/skills/teamsmith/tests/panel-b3.sh +189 -29
  110. package/skills/teamsmith/tests/panel-choices.sh +81 -63
  111. package/skills/teamsmith/tests/panel-cpu.sh +3 -2
  112. package/skills/teamsmith/tests/panel-knobs.sh +7 -1
  113. package/skills/teamsmith/tests/panel-p21.sh +445 -241
  114. package/skills/teamsmith/tests/panel-snapshots.sh +41 -225
  115. package/skills/teamsmith/tests/panel-strings.mjs +33 -18
  116. package/skills/teamsmith/tests/perf.sh +122 -31
  117. package/skills/teamsmith/tests/pm-box-real.sh +1 -1
  118. package/skills/teamsmith/tests/pulse-nudge-key.sh +1 -1
  119. package/skills/teamsmith/tests/routes.sh +364 -109
  120. package/skills/teamsmith/tests/seat-interrupt.sh +1002 -0
  121. package/skills/teamsmith/tests/seat-visibility.sh +675 -0
  122. package/skills/teamsmith/tests/section-budgets.tsv +26 -12
  123. package/skills/teamsmith/tests/section-guard.sh +6 -1
  124. package/skills/teamsmith/tests/section-needs-audit.sh +24 -7
  125. package/skills/teamsmith/tests/section-paths.tsv +42 -26
  126. package/skills/teamsmith/tests/section-select.sh +90 -7
  127. package/skills/teamsmith/tests/slash-team-e2e.sh +323 -0
  128. package/skills/teamsmith/tests/slash-team.sh +617 -0
  129. package/skills/teamsmith/tests/smoke.sh +3762 -628
  130. package/skills/teamsmith/tests/snapshots/zh-dark-120-detail.txt +2 -2
  131. package/skills/teamsmith/tests/snapshots/zh-dark-120-p4.txt +2 -2
  132. package/skills/teamsmith/tests/snapshots/zh-dark-120.txt +9 -9
  133. package/skills/teamsmith/tests/snapshots/zh-dark-160-p4.txt +2 -2
  134. package/skills/teamsmith/tests/snapshots/zh-dark-160.txt +9 -9
  135. package/skills/teamsmith/tests/snapshots/zh-dark-59-detail.txt +1 -1
  136. package/skills/teamsmith/tests/snapshots/zh-dark-59-p4.txt +1 -1
  137. package/skills/teamsmith/tests/snapshots/zh-dark-59.txt +5 -5
  138. package/skills/teamsmith/tests/snapshots/zh-dark-99-p4.txt +2 -2
  139. package/skills/teamsmith/tests/snapshots/zh-dark-99.txt +5 -5
  140. package/skills/teamsmith/tests/snapshots/zh-light-120-detail.txt +2 -2
  141. package/skills/teamsmith/tests/snapshots/zh-light-120-p4.txt +2 -2
  142. package/skills/teamsmith/tests/snapshots/zh-light-120.txt +9 -9
  143. package/skills/teamsmith/tests/snapshots/zh-light-160-p4.txt +2 -2
  144. package/skills/teamsmith/tests/snapshots/zh-light-160.txt +9 -9
  145. package/skills/teamsmith/tests/snapshots/zh-light-59-detail.txt +1 -1
  146. package/skills/teamsmith/tests/snapshots/zh-light-59-p4.txt +1 -1
  147. package/skills/teamsmith/tests/snapshots/zh-light-59.txt +5 -5
  148. package/skills/teamsmith/tests/snapshots/zh-light-99-p4.txt +2 -2
  149. package/skills/teamsmith/tests/snapshots/zh-light-99.txt +5 -5
  150. package/skills/teamsmith/tests/task-header-model.sh +2 -1
  151. package/skills/teamsmith/tests/task-model-routing.sh +1511 -0
  152. package/skills/teamsmith/tests/tmp-hygiene.sh +782 -45
  153. package/skills/teamsmith/tests/tmux-identity-leak.sh +773 -0
  154. package/skills/teamsmith/tests/tmux-lint-legacy.txt +12 -18
  155. package/skills/teamsmith/tests/upgrade-recipe.sh +537 -0
  156. package/skills/teamsmith-init/SKILL.md +43 -43
  157. package/skills/teamsmith-init/references/bootstrap.md +8 -6
  158. package/skills/teamsmith-init/templates/bootstrap-prompt.md.tmpl +9 -5
@@ -6,7 +6,7 @@
6
6
  # TEAM_INSTALL_KEEP=1 bash ... # keep the fixture directory
7
7
  # TEAM_INSTALL_TREE=<tree> bash ... # run against another checkout (the flip section builds scratch trees)
8
8
  #
9
- # Sections: surfaces install conflict shell pack doctor flip
9
+ # Sections: surfaces install conflict shell pack doctor extension flip
10
10
  # Exit: 0 every selected section green, 1 at least one assertion failed, 3 setup failure.
11
11
  #
12
12
  # Nothing here touches the caller's project: every fixture is a fresh git repo under $TMPDIR, the caller's
@@ -62,7 +62,7 @@ assert_link_to() { [ -L "$1" ] && [ "$(readlink -f "$1" 2>/dev/null)" = "$2" ] &
62
62
  || bad "$3($1 → $(readlink -f "$1" 2>/dev/null || echo '不是软链'),期望 $2)"; }
63
63
 
64
64
  SECTIONS=("$@")
65
- [ "${#SECTIONS[@]}" -gt 0 ] || SECTIONS=(surfaces install conflict shell pack doctor flip)
65
+ [ "${#SECTIONS[@]}" -gt 0 ] || SECTIONS=(surfaces install conflict shell pack doctor extension flip)
66
66
  want() { local s; for s in "${SECTIONS[@]}"; do [ "$s" = "$1" ] && return 0; done; return 1; }
67
67
 
68
68
  # ---------------------------------------------------------------- helpers
@@ -79,7 +79,9 @@ run_tree() { # <tree> <repo> <team args...>:在夹具仓库里跑那棵树的
79
79
 
80
80
  init_proj() { # <tree> <repo> [extra init args...]
81
81
  local t="$1" p="$2"; shift 2
82
- run_tree "$t" "$p" init --session "$(basename "$p")" --agents "dev verify" --vcs local --gates true "$@"
82
+ run_tree "$t" "$p" init --session "$(basename "$p")" --agents "dev verify" --vcs local --gates true \
83
+ --task-models 'routine=deepseek/deepseek-flash analysis=xai/grok-4.6 verify=kimi-coding/k3-256k' \
84
+ --pm-model 'deepseek/deepseek-flash' "$@"
83
85
  }
84
86
 
85
87
  paths_of() { local t="$1" d="$2"; ( cd "$d" && bash "$t/skills/teamsmith/scripts/team" paths 2>&1 ); }
@@ -278,24 +280,124 @@ chk_bootstrap_installs() { # <tree> <已初始化但删掉 .pi/skills 的仓库>
278
280
  if [ "$(readlink -f "$p/.pi/skills/teamsmith")" != "$t/skills/teamsmith" ]; then printf '软链目标不对\n'; return 1; fi
279
281
  h2="$(file_hash "$p/.pi/team/config.sh")"
280
282
  if [ "$h1" != "$h2" ]; then printf 'config.sh 被改了\n'; return 1; fi
281
- if ! printf '%s\n' "$out" | grep -qF -- 'pi --approve'; then
282
- printf 'bootstrap 升级路径没打信任提示行\n'; return 1
283
+ if ! chk_trust_hint "$out" >/dev/null; then
284
+ printf 'bootstrap 升级路径的信任提示行不达标:[%s]\n' "$(printf '%s\n' "$out" | grep -F -- 'pi --approve' | head -1)"
285
+ return 1
283
286
  fi
284
- printf '已存在配置也装了 skill,config.sh 未动,信任提示行也在\n'
287
+ printf '已存在配置也装了 skill,config.sh 未动,信任提示行也在(同一行契约)\n'
288
+ return 0
289
+ }
290
+
291
+ # ---------------------------------------------------------------- P270 · `/team` 扩展安装面(同一张冲突表,单文件形状)
292
+ chk_ext_installed_link() { # <tree> <repo>:装成指向运行树的软链
293
+ local t="$1" p="$2"
294
+ local dest="$p/.pi/extensions/team.ts"
295
+ [ -L "$dest" ] || { printf '没有把 /team 扩展装成软链(%s)\n' "$dest"; return 1; }
296
+ [ "$(readlink -f "$dest")" = "$t/skills/teamsmith/extension/team.ts" ] \
297
+ || { printf '软链目标不对:%s\n' "$(readlink -f "$dest")"; return 1; }
298
+ printf '扩展软链指向运行树\n'
299
+ return 0
300
+ }
301
+ chk_ext_unmarked_survives() { # <tree> <repo(.pi/extensions/team.ts 是不带标记的普通文件)>
302
+ local t="$1" p="$2"
303
+ local dest="$p/.pi/extensions/team.ts" before after out rc
304
+ before="$(file_hash "$dest")"
305
+ out="$(init_proj "$t" "$p")"; rc=$?
306
+ [ "$rc" -ne 0 ] || { printf '未标记的扩展文件居然 rc=0\n'; return 1; }
307
+ case "$out" in *红线*|*不认识的条目*) ;; *) printf '没说明红线:[%s]\n' "$(printf '%s' "$out" | tail -2 | tr '\n' ' ')"; return 1 ;; esac
308
+ after="$(file_hash "$dest")"
309
+ [ "$before" = "$after" ] || { printf '拒绝时把字节改了\n'; return 1; }
310
+ out="$(init_proj "$t" "$p" --force)"; rc=$?
311
+ [ "$rc" -ne 0 ] || { printf '--force 下未标记的扩展文件居然 rc=0\n'; return 1; }
312
+ after="$(file_hash "$dest")"
313
+ [ "$before" = "$after" ] || { printf '--force 把未标记的扩展文件动了\n'; return 1; }
314
+ printf '拒绝且连 --force 都不删(rc=%s)\n' "$rc"
315
+ return 0
316
+ }
317
+ chk_ext_marked_copy_force() { # <tree> <repo(扩展是带标记、改坏了一行的副本)>
318
+ local t="$1" p="$2"
319
+ local dest="$p/.pi/extensions/team.ts" before out rc
320
+ before="$(file_hash "$dest")"
321
+ out="$(init_proj "$t" "$p")"; rc=$?
322
+ [ "$rc" -ne 0 ] || { printf '带标记的漂移副本居然 rc=0\n'; return 1; }
323
+ [ "$(file_hash "$dest")" = "$before" ] || { printf '拒绝时把漂移副本改了\n'; return 1; }
324
+ init_proj "$t" "$p" --force >/dev/null 2>&1; rc=$?
325
+ [ "$rc" -eq 0 ] || { printf '--force 退出 %s\n' "$rc"; return 1; }
326
+ cmp -s "$t/skills/teamsmith/extension/team.ts" "$dest" || { printf '--force 后字节与源不同\n'; return 1; }
327
+ printf '带标记的漂移副本:默认拒绝、--force 换成源\n'
328
+ return 0
329
+ }
330
+ chk_ext_foreign_link_force() { # <tree> <repo(扩展软链指向 $tmp/foreign-ext.ts)>
331
+ local t="$1" p="$2"
332
+ local dest="$p/.pi/extensions/team.ts" out rc
333
+ out="$(init_proj "$t" "$p")"; rc=$?
334
+ [ "$rc" -ne 0 ] || { printf '别源软链居然 rc=0\n'; return 1; }
335
+ [ "$(readlink "$dest")" = "$tmp/foreign-ext.ts" ] || { printf '拒绝时被重指了\n'; return 1; }
336
+ init_proj "$t" "$p" --force >/dev/null 2>&1; rc=$?
337
+ [ "$rc" -eq 0 ] || { printf '--force 退出 %s\n' "$rc"; return 1; }
338
+ [ "$(readlink -f "$dest")" = "$t/skills/teamsmith/extension/team.ts" ] || { printf '--force 没重指到运行树\n'; return 1; }
339
+ printf '别源软链:默认拒绝、--force 重指\n'
340
+ return 0
341
+ }
342
+ chk_bootstrap_installs_ext() { # <tree> <已初始化但删掉 .pi/extensions 的仓库>
343
+ local t="$1" p="$2" h1 h2 out rc dest
344
+ dest="$p/.pi/extensions/team.ts"
345
+ h1="$(file_hash "$p/.pi/team/config.sh")"
346
+ out="$(run_tree "$t" "$p" bootstrap --no-pulse --agents dev)"; rc=$?
347
+ [ "$rc" -eq 0 ] || { printf 'bootstrap rc=%s:[%s]\n' "$rc" "$(printf '%s' "$out" | tail -2 | tr '\n' ' ')"; return 1; }
348
+ [ -L "$dest" ] || { printf 'bootstrap 没装回扩展\n'; return 1; }
349
+ [ "$(readlink -f "$dest")" = "$t/skills/teamsmith/extension/team.ts" ] || { printf '软链目标不对\n'; return 1; }
350
+ h2="$(file_hash "$p/.pi/team/config.sh")"
351
+ [ "$h1" = "$h2" ] || { printf 'config.sh 被改了\n'; return 1; }
352
+ printf '已存在配置也装了扩展,config.sh 未动\n'
353
+ return 0
354
+ }
355
+ ext_doctor_row() { # <captured 输出> → `/team 扩展安装` 行(没有则空)
356
+ printf '%s\n' "$1" | grep -F '/team 扩展安装' | head -1
357
+ }
358
+ chk_ext_doctor_missing() { # <tree> <repo(扩展被删掉)>
359
+ local out rc row
360
+ out="$(run_doctor "$1" "$2")"; rc=$?
361
+ [ "$rc" -eq 0 ] || { printf 'doctor 因 install 行以外的东西非 0(rc=%s)\n' "$rc"; return 1; }
362
+ row="$(ext_doctor_row "$out")"
363
+ case "$row" in *'!'*'.pi/extensions/team.ts'*'team init'*) ;; *) printf '缺失行的形状不对:[%s]\n' "$row"; return 1 ;; esac
364
+ case "$row" in *'--force'*) printf '缺失不该给 --force:[%s]\n' "$row"; return 1 ;; esac
365
+ printf '缺失:warn 点名路径与修法 team init\n'
366
+ return 0
367
+ }
368
+ chk_ext_doctor_drift() { # <tree> <repo(扩展副本改坏一行)>
369
+ local out rc row
370
+ out="$(run_doctor "$1" "$2")"; rc=$?
371
+ [ "$rc" -eq 0 ] || { printf 'doctor 因 install 行以外的东西非 0(rc=%s)\n' "$rc"; return 1; }
372
+ row="$(ext_doctor_row "$out")"
373
+ case "$row" in *'!'*'.pi/extensions/team.ts'*'team init --force'*) ;; *) printf '漂移行的形状不对:[%s]\n' "$row"; return 1 ;; esac
374
+ printf '漂移:warn 点名路径与修法 team init --force\n'
375
+ return 0
376
+ }
377
+ chk_ext_no_install_silent() { # <tree> <没有项目本地安装的仓库>
378
+ local out rc
379
+ out="$(run_doctor "$1" "$2")"; rc=$?
380
+ [ "$rc" -eq 0 ] || { printf 'doctor 因 install 行以外的东西非 0(rc=%s)\n' "$rc"; return 1; }
381
+ if printf '%s\n' "$out" | grep -qF '/team 扩展安装'; then printf '没有项目本地安装却刷了 /team 行\n'; return 1; fi
382
+ printf '没有项目本地安装:一行都不打\n'
285
383
  return 0
286
384
  }
287
385
 
288
- # P59:安装步的信任提示行 —— 同一行必须点名触发资源(.pi/skills/)与三条出路
289
- # (pi --approve / /trust / team init --no-skills),而且只能出现一次。
386
+ # P59 + P299:安装步的信任提示行 —— 同一行必须点名**两处**触发资源(.pi/skills/ 与 .pi/extensions/)
387
+ # 与三条出路(pi --approve / /trust / team init --no-skills),而且只能出现一次。
290
388
  chk_trust_hint() { # <init 捕获输出>
291
- local line n
389
+ local line n t miss=""
292
390
  line="$(printf '%s\n' "$1" | grep -F -- 'pi --approve' | head -1)"
293
391
  if [ -z "$line" ]; then
294
- printf '输出里没有信任提示行(要一行点名 .pi/skills/ + pi --approve + /trust + team init --no-skills)\n'
392
+ printf '输出里没有信任提示行(要一行点名 .pi/skills/ + .pi/extensions/ + pi --approve + /trust + team init --no-skills)\n'
295
393
  return 1
296
394
  fi
297
- case "$line" in *'.pi/skills/'*'pi --approve'*'/trust'*'team init --no-skills'*) ;; *)
298
- printf '提示行缺要点:[%s]\n' "$line"; return 1 ;; esac
395
+ for t in '.pi/skills/' '.pi/extensions/' 'pi --approve' '/trust' 'team init --no-skills'; do
396
+ case "$line" in *"$t"*) ;; *) miss="$miss [$t]" ;; esac
397
+ done
398
+ if [ -n "$miss" ]; then
399
+ printf '提示行缺要点:%s —— 行原文:[%s]\n' "$miss" "$line"; return 1
400
+ fi
299
401
  n="$(printf '%s' "$1" | grep -cF -- 'pi --approve' || true)"
300
402
  if [ "$n" != "1" ]; then printf '提示行不是恰好一行(%s 行)\n' "$n"; return 1; fi
301
403
  printf '信任提示行打了一次:[%s]\n' "$(printf '%s' "$line" | LC_ALL=C sed 's/^[[:space:]]*//' | cut -c1-56)"
@@ -316,6 +418,20 @@ chk_no_skills_silent() { # <tree> <repo>:--no-skills 下不许出现这一行
316
418
  return 0
317
419
  }
318
420
 
421
+ # P299(init-skill 场景 3 的红侧面):两处 init 文档必须**同页**点名「触发资源 + 三条答案」——
422
+ # 判据用稳定 token(不是整句),删掉任一个 token 必红。五个 token = 两处触发资源 + 三条出路。
423
+ chk_init_docs_fact() { # <tree>
424
+ local d t miss=""
425
+ for d in skills/teamsmith-init/SKILL.md skills/teamsmith-init/references/bootstrap.md; do
426
+ for t in '.pi/skills/' '.pi/extensions/' 'pi --approve' '/trust' 'team init --no-skills'; do
427
+ grep -qF -- "$t" "$1/$d" || miss="$miss $d[$t]"
428
+ done
429
+ done
430
+ if [ -n "$miss" ]; then printf 'init 文档没同页点名触发资源/答案:%s\n' "$miss"; return 1; fi
431
+ printf '两处 init 文档都同页点名 .pi/skills/ + .pi/extensions/ + pi --approve + /trust + team init --no-skills\n'
432
+ return 0
433
+ }
434
+
319
435
  chk_pack_manifest() { # <tree>:声明面 —— 恰好一个 bin 键,files 带着 bin/
320
436
  python3 - "$1/package.json" <<'PYMANI'
321
437
  import json, sys
@@ -414,17 +530,19 @@ if want surfaces; then
414
530
  bad "init SKILL 行序不对:npm=[$n_npm] init=[$n_init] bootstrap=[$n_boot]"
415
531
  fi
416
532
  grep -qF '.pi/skills/' "$init_skill" && ok "init SKILL 点名项目目标 .pi/skills/" || bad "init SKILL 没点名 .pi/skills/"
533
+ # P299:两处 init 文档都要同页带「触发资源 + 三条答案」的稳定 token(红侧在 flip ⑨)
534
+ check_holds "P299 两处 init 文档同页点名触发资源与答案" chk_init_docs_fact "$tree"
417
535
  grep -qF 'pi install' "$init_skill" && grep -qF 'install.sh' "$init_skill" \
418
536
  && ok "init SKILL 同时保留两条替代路线(pi install / install.sh)" \
419
537
  || bad "init SKILL 少了替代路线"
420
- help_out="$(bash "$team_cli" help 2>&1)"
421
- help_init="$(printf '%s\n' "$help_out" | grep -A2 '^ init ')"
422
- case "$help_init" in *'.pi/skills'*'--copy'*'--no-skills'*)
423
- ok "team help 的 init 行点名 .pi/skills / --copy / --no-skills" ;;
424
- *) bad "team help 的 init 行没说全($(printf '%s' "$help_init" | tr '\n' ' '))" ;;
538
+ # P260 起帮助面分三级:init / bootstrap 的用法行与说明在各自的命令页上(读整页,不再截三行窗口)
539
+ help_out="$(bash "$team_cli" help init 2>&1)"
540
+ case "$help_out" in *'.pi/skills'*'--copy'*'--no-skills'*)
541
+ ok "team help init 页点名 .pi/skills / --copy / --no-skills" ;;
542
+ *) bad "team help init 页没说全($(printf '%s' "$help_out" | tr '\n' ' ' | cut -c1-200))" ;;
425
543
  esac
426
- printf '%s\n' "$help_out" | grep -A2 '^ bootstrap ' | grep -qF '.pi/skills' \
427
- && ok "team help 的 bootstrap 行点名装 skill 一步" || bad "team help 的 bootstrap 行没点名装 skill"
544
+ printf '%s\n' "$(bash "$team_cli" help bootstrap 2>&1)" | grep -qF '.pi/skills' \
545
+ && ok "team help bootstrap 页点名装 skill 一步" || bad "team help bootstrap 页没点名装 skill"
428
546
  grep -F '| Init / self-check |' "$daily_skill" | grep -qF '.pi/skills/' \
429
547
  && ok "日常 skill 的命令表 init 行点名项目 skill 安装" || bad "日常 skill 的命令表 init 行没点名安装"
430
548
  n_r_npm="$(grep -nF 'npm install -g teamsmith' "$tree/README.md" | head -1 | cut -d: -f1)"
@@ -435,7 +553,7 @@ if want surfaces; then
435
553
  else
436
554
  bad "README §Install 行序不对:npm=[$n_r_npm] pi install=[$n_r_pi] install.sh=[$n_r_sh]"
437
555
  fi
438
- local floor_r; floor_r="$(bash_floor_of "$tree")"
556
+ floor_r="$(bash_floor_of "$tree")"
439
557
  grep -F 'bash' "$tree/README.md" | grep -F "≥ $floor_r" | grep -qiF 'checks' \
440
558
  && ok "README 的 bash 行写明入口会检查它(≥ $floor_r)" || bad "README 的 bash 行没写检查(要求 ≥ $floor_r 且有 checks;真源 BASH_MIN_MAJOR=$floor_r)"
441
559
  fi
@@ -474,7 +592,9 @@ if want install; then
474
592
  case "$out" in *'--no-skills'*) ok "--no-skills 明说跳过了这一步" ;; *) bad "--no-skills 没有说明" ;; esac
475
593
  check_holds "P59 --no-skills 不打信任提示行" chk_no_skills_silent "$tree" "$p"
476
594
  assert_not_file "$p/.pi/skills" "--no-skills 没建 .pi/skills/"
595
+ assert_not_file "$p/.pi/extensions" "--no-skills 也没建 .pi/extensions/"
477
596
  assert_eq ".gitignore 没被塞进 .pi/skills/" "$(grep -cxF '.pi/skills/' "$p/.gitignore" || true)" "0"
597
+ assert_eq ".gitignore 没被塞进 .pi/extensions/" "$(grep -cxF '.pi/extensions/' "$p/.gitignore" || true)" "0"
478
598
 
479
599
  # ③ --copy:真目录、字节相等、不带 node_modules/.git
480
600
  p="$tmp/p-copy"; git_new "$p"; assert_isolated "$tree" "$p"
@@ -496,6 +616,7 @@ if want install; then
496
616
  assert_eq "worktree 里 init 退出码 0" "$rc" "0"
497
617
  assert_link_to "$p/.pi/skills/teamsmith" "$tree/skills/teamsmith" "安装落在主工作树的 .pi/skills/"
498
618
  assert_not_file "$p/.worktrees/wt/.pi/skills" "worktree 侧没有安装条目"
619
+ assert_not_file "$p/.worktrees/wt/.pi/extensions" "worktree 侧也没有 /team 扩展(席位不需要斜杠命令)"
499
620
 
500
621
  # ⑤ bootstrap 升级路径(配置已存在、.pi/skills 缺席)
501
622
  p="$tmp/p-boot"; git_new "$p"; assert_isolated "$tree" "$p"
@@ -509,6 +630,7 @@ if want install; then
509
630
  out="$(run_tree "$tree" "$p" bootstrap --no-pulse --print)"; rc=$?
510
631
  assert_eq "bootstrap --print 退出码 0" "$rc" "0"
511
632
  case "$out" in *'.pi/skills/'*) ok "--print 的计划点名装 skill 一步" ;; *) bad "--print 没点名装 skill 一步" ;; esac
633
+ case "$out" in *'.pi/extensions/'*) ok "--print 的计划同时点名 /team 扩展一步" ;; *) bad "--print 没点名 /team 扩展一步" ;; esac
512
634
  assert_not_file "$p/.pi/skills" "--print 没写 .pi/skills/"
513
635
  assert_not_file "$p/.pi/team/config.sh" "--print 没写配置"
514
636
  assert_eq "--print 没动仓库(.git 指纹不变)" "$(files_hash "$p/.git")" "$before"
@@ -608,6 +730,80 @@ if want doctor; then
608
730
  assert_eq "别源软链:warn 不改退出码(doctor 0)" "$DOC_RC" "0"
609
731
  init_proj "$tree" "$p" --force >/dev/null 2>&1
610
732
  assert_link_to "$p/.pi/skills/teamsmith" "$tree/skills/teamsmith" "别源软链:--force 修复到运行树"
733
+ # ⑤ P270:扩展 link → pass 行点名路径与源;不 warn
734
+ p="$tmp/d-ext-link"; git_new "$p"; init_proj "$tree" "$p" >/dev/null 2>&1
735
+ doctor_capture "$tree" "$p"; row="$(ext_doctor_row "$DOC_OUT")"
736
+ case "$row" in *'✓'*"$p/.pi/extensions/team.ts"*"$tree/skills/teamsmith/extension/team.ts"*)
737
+ ok "/team 扩展 link:pass 行点名入口与源" ;; *) bad "/team 扩展 link:行不对($row)" ;; esac
738
+ case "$row" in *'!'*) bad "/team 扩展 link:居然 warn" ;; *) ok "/team 扩展 link:不 warn" ;; esac
739
+ assert_eq "/team 扩展 link:doctor 退出 0" "$DOC_RC" "0"
740
+ # ⑥ 扩展缺失 → warn 点名路径与修法 team init;修复后回到 pass
741
+ p="$tmp/d-ext-missing"; git_new "$p"; init_proj "$tree" "$p" >/dev/null 2>&1; rm -f "$p/.pi/extensions/team.ts"
742
+ check_holds "扩展缺失:warn 点名路径与修法 team init" chk_ext_doctor_missing "$tree" "$p"
743
+ init_proj "$tree" "$p" >/dev/null 2>&1
744
+ doctor_capture "$tree" "$p"; row="$(ext_doctor_row "$DOC_OUT")"
745
+ case "$row" in *'✓'*) ok "扩展缺失修复:team init 后回到 pass" ;; *) bad "扩展缺失修复后行不对($row)" ;; esac
746
+ # ⑦ 副本漂移 → warn 点名路径与修法 team init --force;--force 之后回到 pass
747
+ p="$tmp/d-ext-drift"; git_new "$p"; init_proj "$tree" "$p" --copy >/dev/null 2>&1
748
+ printf '\n// drift\n' >> "$p/.pi/extensions/team.ts"
749
+ check_holds "扩展漂移:warn 点名路径与修法 team init --force" chk_ext_doctor_drift "$tree" "$p"
750
+ init_proj "$tree" "$p" --force >/dev/null 2>&1
751
+ doctor_capture "$tree" "$p"; row="$(ext_doctor_row "$DOC_OUT")"
752
+ case "$row" in *'✓'*"$tree/skills/teamsmith/extension/team.ts"*) ok "扩展漂移修复:--force 后回到 pass" ;; *) bad "扩展漂移修复后行不对($row)" ;; esac
753
+ # ⑧ 没有项目本地安装 → 一行都不打
754
+ p="$tmp/d-ext-absent"; git_new "$p"; init_proj "$tree" "$p" --no-skills >/dev/null 2>&1
755
+ check_holds "没有项目本地安装:/team 行一行都不打" chk_ext_no_install_silent "$tree" "$p"
756
+ fi
757
+
758
+ # ---------------------------------------------------------------- extension · P270
759
+ if want extension; then
760
+ section "extension · /team 扩展安装面(link/copy/冲突表/--no-skills/bootstrap)"
761
+ # ① 默认 link:逐条一行 + .gitignore + 目标指向运行树
762
+ p="$tmp/x-link"; git_new "$p"; assert_isolated "$tree" "$p"
763
+ out="$(init_proj "$tree" "$p")"; rc=$?
764
+ assert_eq "init 退出码 0" "$rc" "0"
765
+ case "$out" in *"link $p/.pi/extensions/team.ts → $tree/skills/teamsmith/extension/team.ts"*)
766
+ ok "输出逐条一行:扩展 link 行(含目标与源)" ;;
767
+ *) bad "扩展 link 行形状不对:$(printf '%s' "$out" | grep extensions | tr '\n' ' ')" ;; esac
768
+ check_holds "扩展装成指向运行树的软链" chk_ext_installed_link "$tree" "$p"
769
+ assert_eq ".gitignore 有 .pi/extensions/ 且只一条" "$(grep -cxF '.pi/extensions/' "$p/.gitignore" || true)" "1"
770
+ # ② 幂等:第二次 init 报 skip;--copy 对着已有软链也 skip,目标不变
771
+ x1="$(readlink -f "$p/.pi/extensions/team.ts")"
772
+ out2="$(init_proj "$tree" "$p")"; rc2=$?
773
+ assert_eq "第二次 init 退出码 0" "$rc2" "0"
774
+ case "$out2" in *"skip $p/.pi/extensions/team.ts("*) ok "第二次 init 报扩展 skip" ;; *) bad "第二次 init 没有扩展 skip 行" ;; esac
775
+ assert_eq "第二次 init 后扩展目标不变" "$(readlink -f "$p/.pi/extensions/team.ts")" "$x1"
776
+ out3="$(init_proj "$tree" "$p" --copy)"; rc3=$?
777
+ assert_eq "--copy 对着已有扩展软链退出 0(skip,不覆盖)" "$rc3" "0"
778
+ assert_eq "--copy 后仍是同一软链目标" "$(readlink -f "$p/.pi/extensions/team.ts")" "$x1"
779
+ # ③ --copy:真文件、字节相等
780
+ p="$tmp/x-copy"; git_new "$p"; init_proj "$tree" "$p" --copy >/dev/null 2>&1
781
+ [ -f "$p/.pi/extensions/team.ts" ] && [ ! -L "$p/.pi/extensions/team.ts" ] \
782
+ && ok "--copy 装的是真文件(不是软链)" || bad "--copy 装的扩展不是文件"
783
+ assert_eq "--copy 的扩展与源逐字节相等" \
784
+ "$(cmp -s "$tree/skills/teamsmith/extension/team.ts" "$p/.pi/extensions/team.ts" && echo same || echo differ)" "same"
785
+ # ④ --no-skills:两个目录都不建
786
+ p="$tmp/x-noskills"; git_new "$p"; init_proj "$tree" "$p" --no-skills >/dev/null 2>&1
787
+ assert_not_file "$p/.pi/skills" "--no-skills 没建 .pi/skills/"
788
+ assert_not_file "$p/.pi/extensions" "--no-skills 也没建 .pi/extensions/"
789
+ assert_eq ".gitignore 没被塞进 .pi/extensions/" "$(grep -cxF '.pi/extensions/' "$p/.gitignore" || true)" "0"
790
+ # ⑤ 冲突表:不带标记的普通文件 —— 拒绝且连 --force 都不删(红线)
791
+ p="$tmp/x-unmarked"; git_new "$p"; init_proj "$tree" "$p" --no-skills >/dev/null 2>&1
792
+ mkdir -p "$p/.pi/extensions"; printf 'not the extension\n' > "$p/.pi/extensions/team.ts"
793
+ check_holds "未标记的普通文件:拒绝且连 --force 都不删" chk_ext_unmarked_survives "$tree" "$p"
794
+ # ⑥ 带标记的漂移副本:默认拒绝、--force 换源
795
+ p="$tmp/x-marked"; git_new "$p"; init_proj "$tree" "$p" --copy >/dev/null 2>&1
796
+ printf '\n// drift\n' >> "$p/.pi/extensions/team.ts"
797
+ check_holds "带标记的漂移副本:默认拒绝、--force 换源" chk_ext_marked_copy_force "$tree" "$p"
798
+ # ⑦ 别源软链:默认拒绝、--force 重指
799
+ p="$tmp/x-foreign"; git_new "$p"; init_proj "$tree" "$p" --no-skills >/dev/null 2>&1
800
+ mkdir -p "$p/.pi/extensions"
801
+ printf '// teamsmith /team extension\n' > "$tmp/foreign-ext.ts"
802
+ ln -s "$tmp/foreign-ext.ts" "$p/.pi/extensions/team.ts"
803
+ check_holds "别源软链:默认拒绝、--force 重指" chk_ext_foreign_link_force "$tree" "$p"
804
+ # ⑧ bootstrap 升级路径(配置已存在、扩展缺席)
805
+ p="$tmp/x-boot"; git_new "$p"; init_proj "$tree" "$p" >/dev/null 2>&1; rm -rf "$p/.pi/extensions"
806
+ check_holds "bootstrap 对已存在的项目装回扩展" chk_bootstrap_installs_ext "$tree" "$p"
611
807
  fi
612
808
 
613
809
  # ---------------------------------------------------------------- flip
@@ -709,16 +905,81 @@ PYTRUST
709
905
  import sys
710
906
  p = sys.argv[1]
711
907
  s = open(p, encoding='utf-8').read()
712
- old = " printf ' skip %s(--no-skills:只做配置/文档,没装项目本地 skill)\\n' \"$target\"\n return 0"
908
+ old = " printf ' skip %s 与 %s(--no-skills:只做配置/文档,没装项目本地 skill/扩展)\\n' \\\n \"$target\" \"$(team_project_extension_target)\"\n return 0"
713
909
  if old not in s:
714
910
  print("没找到 --no-skills 分支"); sys.exit(1)
715
- new = old.replace(' return 0', ' team_dim " 提示:.pi/skills/ pi --approve /trust team init --no-skills"\n return 0')
911
+ new = old.replace(' return 0', ' team_dim " 提示:.pi/skills/ 与 .pi/extensions/ pi --approve /trust team init --no-skills"\n return 0')
716
912
  open(p, "w", encoding="utf-8").write(s.replace(old, new, 1))
717
913
  PYTRUST2
718
914
  pg2="$tmp/f-trust-noskills-green"; git_new "$pg2"
719
915
  pf2="$tmp/f-trust-noskills-red"; git_new "$pf2"
720
916
  check_holds "⑦b 对照:真实树 --no-skills 安静" chk_no_skills_silent "$tree" "$pg2"
721
917
  check_breaks "⑦b 翻转:提示行也打进 --no-skills 分支" chk_no_skills_silent "$ft2" "$pf2"
918
+ # ⑦c P299:只删输出行里的 `.pi/extensions/`(其余原样)→ 判据必须红并点名那一行
919
+ ft="$tmp/f-trust-extline"; scratch_tree "$ft"
920
+ python3 - "$ft/skills/teamsmith/scripts/lib/cmd-init.sh" <<'PYTRUSTEXT'
921
+ import sys
922
+ p = sys.argv[1]
923
+ s = open(p, encoding='utf-8').read()
924
+ old = ' team_dim " 提示:.pi/skills/ 与 .pi/extensions/'
925
+ new = ' team_dim " 提示:.pi/skills/ 与 '
926
+ if old not in s:
927
+ print("没找到信任提示行"); sys.exit(1)
928
+ open(p, "w", encoding="utf-8").write(s.replace(old, new, 1))
929
+ PYTRUSTEXT
930
+ pg3="$tmp/f-trust-extline-green"; git_new "$pg3"
931
+ pf3="$tmp/f-trust-extline-red"; git_new "$pf3"
932
+ check_holds "⑦c 对照:真实树信任行点名两处资源" chk_trust_hint_case "$tree" "$pg3"
933
+ check_breaks "⑦c 翻转:信任行删掉 .pi/extensions/" chk_trust_hint_case "$ft" "$pf3"
934
+ # ⑨ P299:两处 init 文档的稳定 token(场景 3 的红侧:删掉 token → 同一判据红)
935
+ ft="$tmp/f-docs-skill"; scratch_tree "$ft"
936
+ python3 - "$ft/skills/teamsmith-init/SKILL.md" <<'PYDOCSKILL'
937
+ import sys
938
+ p = sys.argv[1]
939
+ s = open(p, encoding='utf-8').read()
940
+ if '.pi/extensions/' not in s:
941
+ print("SKILL.md 里找不到 .pi/extensions/"); sys.exit(1)
942
+ open(p, "w", encoding="utf-8").write(s.replace('.pi/extensions/', '', 1))
943
+ PYDOCSKILL
944
+ check_holds "⑨a 对照:两处 init 文档的 token 都在" chk_init_docs_fact "$tree"
945
+ check_breaks "⑨a 翻转:SKILL.md 删掉 .pi/extensions/ token" chk_init_docs_fact "$ft"
946
+ ft2="$tmp/f-docs-boot"; scratch_tree "$ft2"
947
+ python3 - "$ft2/skills/teamsmith-init/references/bootstrap.md" <<'PYDOCBOOT'
948
+ import sys
949
+ p = sys.argv[1]
950
+ s = open(p, encoding='utf-8').read()
951
+ if '/trust' not in s:
952
+ print("bootstrap.md 里找不到 /trust"); sys.exit(1)
953
+ open(p, "w", encoding="utf-8").write(s.replace('/trust', '', 1))
954
+ PYDOCBOOT
955
+ check_breaks "⑨b 翻转:bootstrap.md 删掉 /trust token" chk_init_docs_fact "$ft2"
956
+ # ⑧ P270:扩展红线(不带标记的普通文件连 --force 都不删)与 /team 的 doctor 行
957
+ ft="$tmp/f-ext-refuse"; scratch_tree "$ft"
958
+ python3 - "$ft/skills/teamsmith/scripts/lib/cmd-init.sh" <<'PYEXT'
959
+ import sys
960
+ p = sys.argv[1]
961
+ s = open(p, encoding='utf-8').read()
962
+ old = ('team_extension_install_refuse_unknown() { # <dest>:普通文件/目录但没有源的标记行 —— 红线:--force 也不删\n'
963
+ ' local dest="$1"\n')
964
+ new = ('team_extension_install_refuse_unknown() { # <dest>:普通文件/目录但没有源的标记行 —— 红线:--force 也不删\n'
965
+ ' local dest="$1"\n rm -f "$dest"\n')
966
+ if old not in s:
967
+ print("没找到扩展红线函数"); sys.exit(1)
968
+ open(p, "w", encoding="utf-8").write(s.replace(old, new, 1))
969
+ PYEXT
970
+ pg="$tmp/f-ext-refuse-green"; git_new "$pg"; init_proj "$tree" "$pg" --no-skills >/dev/null 2>&1
971
+ mkdir -p "$pg/.pi/extensions"; printf 'not the extension\n' > "$pg/.pi/extensions/team.ts"
972
+ pf="$tmp/f-ext-refuse-red"; git_new "$pf"; init_proj "$ft" "$pf" --no-skills >/dev/null 2>&1
973
+ mkdir -p "$pf/.pi/extensions"; printf 'not the extension\n' > "$pf/.pi/extensions/team.ts"
974
+ check_holds "⑧a 对照:真实树拒绝未标记的扩展文件" chk_ext_unmarked_survives "$tree" "$pg"
975
+ check_breaks "⑧a 翻转:红线函数改成 rm -f(未标记的文件被删)" chk_ext_unmarked_survives "$ft" "$pf"
976
+ ft="$tmp/f-ext-doctor"; scratch_tree "$ft"
977
+ printf '\n# FLIP:把 /team 扩展的 doctor 行静默掉\nteam_project_extension_install_row() { return 0; }\n' \
978
+ >> "$ft/skills/teamsmith/scripts/lib/cmd-init.sh"
979
+ pg="$tmp/f-ext-doctor-green"; git_new "$pg"; init_proj "$tree" "$pg" >/dev/null 2>&1; rm -f "$pg/.pi/extensions/team.ts"
980
+ pf="$tmp/f-ext-doctor-red"; git_new "$pf"; init_proj "$ft" "$pf" >/dev/null 2>&1; rm -f "$pf/.pi/extensions/team.ts"
981
+ check_holds "⑧b 对照:真实树报扩展缺失" chk_ext_doctor_missing "$tree" "$pg"
982
+ check_breaks "⑧b 翻转:/team 的 doctor 行被静默" chk_ext_doctor_missing "$ft" "$pf"
722
983
  # ⑥ 真实树没被夹具动过:git status 指纹前后一致
723
984
  porcelain_after="$(cd "$tree" && git status --porcelain | sha256sum)"
724
985
  assert_eq "⑥ 夹具没碰真实树(git status 指纹不变)" "$porcelain_after" "$porcelain_before"