teamsmith 0.3.3 → 0.4.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 +8 -8
- package/package.json +2 -6
- package/skills/teamsmith/CHANGELOG.md +77 -0
- package/skills/teamsmith/SKILL.md +83 -163
- package/skills/teamsmith/extension/team-inbox-watch.ts +30 -1
- package/skills/teamsmith/extension/team-notify.ts +162 -21
- package/skills/teamsmith/extension/team-reply.ts +105 -0
- package/skills/teamsmith/references/agent-adapters.md +4 -2
- package/skills/teamsmith/references/config.md +21 -12
- package/skills/teamsmith/references/migration.md +47 -3
- package/skills/teamsmith/references/protocol.md +85 -31
- package/skills/teamsmith/references/reminders.md +131 -0
- package/skills/teamsmith/references/troubleshooting.md +26 -8
- package/skills/teamsmith/references/workflows.md +18 -16
- package/skills/teamsmith/scripts/lib/cmd-agents.sh +290 -68
- package/skills/teamsmith/scripts/lib/cmd-config.sh +1 -1
- package/skills/teamsmith/scripts/lib/cmd-project.sh +193 -21
- package/skills/teamsmith/scripts/lib/cmd-remind.sh +103 -0
- package/skills/teamsmith/scripts/lib/cmd-status.sh +177 -21
- package/skills/teamsmith/scripts/lib/cmd-update.sh +7 -4
- package/skills/teamsmith/scripts/lib/cmd-watch.sh +11 -1
- package/skills/teamsmith/scripts/lib/common.sh +50 -6
- package/skills/teamsmith/scripts/lib/outbox.sh +103 -21
- package/skills/teamsmith/scripts/panel/panel.js +1 -1
- package/skills/teamsmith/scripts/panel/src/strings/en.ts +1 -1
- package/skills/teamsmith/scripts/panel/src/strings/zh.ts +1 -1
- package/skills/teamsmith/scripts/remind-store.mjs +529 -0
- package/skills/teamsmith/scripts/replies.mjs +9 -3
- package/skills/teamsmith/scripts/reply-capture.mjs +596 -0
- package/skills/teamsmith/scripts/state-authority.mjs +500 -0
- package/skills/teamsmith/scripts/strings/commands.tsv +2 -1
- package/skills/teamsmith/scripts/strings/help.en.tsv +16 -2
- package/skills/teamsmith/scripts/strings/help.zh.tsv +16 -2
- package/skills/teamsmith/scripts/team +2 -0
- package/skills/teamsmith/templates/AGENTS.section.md.tmpl +68 -123
- package/skills/teamsmith/templates/PROTOCOL.md.tmpl +48 -55
- package/skills/teamsmith/templates/config.sh.tmpl +2 -1
- package/skills/teamsmith/templates/pm-prompt.md.tmpl +126 -119
- package/skills/teamsmith/tests/bg-ledger-harness.mjs +17 -6
- package/skills/teamsmith/tests/bg-ledger.sh +16 -5
- package/skills/teamsmith/tests/checkout-shape-probe.sh +6 -5
- package/skills/teamsmith/tests/delivery-truth.sh +82 -47
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/README.md +71 -23
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/__pycache__/judge-second.cpython-313.pyc +0 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/judge-dirty-ab.py +143 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/judge-second.py +26 -9
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/run-case.sh +92 -20
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +47 -3
- package/skills/teamsmith/tests/fixtures/reply-capture-provider.ts +76 -0
- package/skills/teamsmith/tests/flip-p410-order2.sh +205 -0
- package/skills/teamsmith/tests/frames/README.md +3 -1
- package/skills/teamsmith/tests/gate-guard.sh +20 -4
- package/skills/teamsmith/tests/help-surface.sh +61 -3
- package/skills/teamsmith/tests/install-shape.sh +400 -38
- package/skills/teamsmith/tests/key-replies-pty.sh +197 -21
- package/skills/teamsmith/tests/key-replies.sh +187 -68
- package/skills/teamsmith/tests/ledger-claim.sh +8 -6
- package/skills/teamsmith/tests/lib/box-judge.sh +2 -1
- package/skills/teamsmith/tests/lib/main-team-fingerprint.sh +104 -0
- package/skills/teamsmith/tests/lib/pm-window.sh +127 -0
- package/skills/teamsmith/tests/lib/reply-fixture.sh +7 -19
- package/skills/teamsmith/tests/lib/reply-guard.sh +188 -0
- package/skills/teamsmith/tests/lib/section-calls.pl +171 -0
- package/skills/teamsmith/tests/loop-inventory.tsv +7 -5
- package/skills/teamsmith/tests/meta-suite.sh +215 -0
- package/skills/teamsmith/tests/panel-b3-pty-mouse.py +154 -17
- package/skills/teamsmith/tests/panel-b3.sh +33 -4
- package/skills/teamsmith/tests/panel-choices.sh +11 -7
- package/skills/teamsmith/tests/remind-cli.sh +574 -0
- package/skills/teamsmith/tests/reply-capture-real.mjs +360 -0
- package/skills/teamsmith/tests/reply-capture-real.sh +5 -0
- package/skills/teamsmith/tests/reply-capture.mjs +622 -0
- package/skills/teamsmith/tests/section-paths.tsv +41 -10
- package/skills/teamsmith/tests/section-select.sh +180 -26
- package/skills/teamsmith/tests/smoke.sh +1829 -249
- package/skills/teamsmith/tests/state-authority-node.mjs +42 -0
- package/skills/teamsmith/tests/state-authority.sh +629 -0
- package/skills/teamsmith/tests/task-model-routing.sh +10 -1
- package/skills/teamsmith/tests/team-inbox-watch-harness.mjs +33 -0
- package/skills/teamsmith/tests/team-notify-knock-marker.mjs +91 -0
- package/skills/teamsmith/tests/workflow-entry.sh +123 -3
- package/skills/teamsmith-init/SKILL.md +1 -1
|
@@ -53,14 +53,30 @@ else
|
|
|
53
53
|
bad "门禁面里出现了这一种墙钟阈值比较(时间成了判决):$DUR_HITS"
|
|
54
54
|
fi
|
|
55
55
|
|
|
56
|
-
# ②
|
|
56
|
+
# ② 门禁**不调用**测量夹具(它们只在参考读数路径里被调用)。
|
|
57
|
+
# P410:这里原先按「文件里出现即红」判,而 P404 的声明面走查(§19 的 `os_need …`)必须把
|
|
58
|
+
# `tests/<fixture>.sh` 作为**字面期望文本**写进 smoke.sh 才能核对 SKILL.md / protocol.md 的那句话 ——
|
|
59
|
+
# 于是 main 上这一条自 P404 合并起就是红的(2026-11-04 实测:main 的 smoke.sh 11405/11413 行,
|
|
60
|
+
# `bash gate-guard.sh` rc=1),§0e 的「干净副本绿」跟着红。
|
|
61
|
+
# 判据改成行为面,只保留一种合法写法:**单引号里的字面量**(= 拿来跟文档正文比对的期望词);
|
|
62
|
+
# 单引号之外出现这个文件名(`"$SKILL_DIR/tests/…"`、裸 `tests/…`、`x=tests/…`)= 指向/调用 → 红。
|
|
63
|
+
# 边界照实说:它仍然只是「这一种写法」的机械证明 —— 单引号包住的执行形态它看不见(路径也写不对,
|
|
64
|
+
# 真要调用的人不会那么写);两种非字面形态各有一条具名翻转在 §0e。
|
|
57
65
|
FIX_RE='panel-cpu\.sh|panel-cpu-premise\.sh|perf\.sh|load-experiment\.sh'
|
|
58
66
|
if [ -f "$smoke" ]; then
|
|
59
|
-
fixes="
|
|
67
|
+
fixes=""
|
|
68
|
+
while IFS= read -r ln; do
|
|
69
|
+
[ -n "$ln" ] || continue
|
|
70
|
+
# 剥掉单引号字面量(`'tests/perf.sh'`)后再判:剩下的部分里还有就说明它不在文档期望的位置上。
|
|
71
|
+
rest="$(printf '%s' "${ln#*:}" | sed -E "s/'[^']*'//g")"
|
|
72
|
+
printf '%s' "$rest" | grep -qE -- "$FIX_RE" && fixes="$fixes$ln; "
|
|
73
|
+
done <<FIXEOF
|
|
74
|
+
$(grep -nE -- "$FIX_RE" "$smoke" || true)
|
|
75
|
+
FIXEOF
|
|
60
76
|
if [ -z "$fixes" ]; then
|
|
61
|
-
ok "smoke.sh
|
|
77
|
+
ok "smoke.sh 不调用测量/参考夹具(只把它们的文件名当单引号字面期望)"
|
|
62
78
|
else
|
|
63
|
-
bad "smoke.sh
|
|
79
|
+
bad "smoke.sh 调用/指向了测量夹具(单引号之外出现文件名 = 不是文档期望文本):$(printf '%s' "$fixes" | head -3 | tr '\n' ';')"
|
|
64
80
|
fi
|
|
65
81
|
else
|
|
66
82
|
bad "缺 $smoke"
|
|
@@ -506,7 +506,7 @@ probe_recipe() {
|
|
|
506
506
|
report) printf 'task|report T1 dev\n' ;;
|
|
507
507
|
add-agent) printf 'proj|add-agent dev --create\n' ;;
|
|
508
508
|
dispatch) printf 'wt|dispatch dev T1 docs/team/tasks/T1-first-task.md --branch task/T1-first-task\n' ;;
|
|
509
|
-
say) printf 'wt|say dev "one line"
|
|
509
|
+
say) printf 'wt|say dev "one line"\n' ;;
|
|
510
510
|
notify) printf 'proj|notify pm "one line"\n' ;;
|
|
511
511
|
draft) printf 'proj|draft send DRAFT --now\n' ;;
|
|
512
512
|
outbox) printf 'proj|outbox list\n' ;;
|
|
@@ -515,6 +515,7 @@ probe_recipe() {
|
|
|
515
515
|
monitor) printf 'proj|monitor --print --no-activity --once\n' ;;
|
|
516
516
|
watch) printf 'proj|watch --once\n' ;;
|
|
517
517
|
standby) printf 'proj|standby on --reason "probe"\n' ;;
|
|
518
|
+
remind) printf 'proj|remind add --after 20m --message probe\n' ;;
|
|
518
519
|
meeting) printf 'proj|meeting open probe --with other:other --topic topic --yes\n' ;;
|
|
519
520
|
up) printf 'proj|up --fresh-pm\n' ;;
|
|
520
521
|
resume) printf 'live|resume --agent dev\n' ;;
|
|
@@ -812,7 +813,7 @@ check_coverage() {
|
|
|
812
813
|
[ "$aw" = "0" ] && ok "每个别名都打印主命令的页并点名该别名"
|
|
813
814
|
|
|
814
815
|
# O2 · the dispatcher's internal entries are a closed set, declared in one place (here)
|
|
815
|
-
local internal="__inbox-write __panel-data"
|
|
816
|
+
local internal="__inbox-write __notify-settle __panel-data"
|
|
816
817
|
local found want nm extra="" miss="" n
|
|
817
818
|
found="$(team_internal_labels)"
|
|
818
819
|
want="$(printf '%s\n' $internal | sort -u)"
|
|
@@ -1262,11 +1263,69 @@ check_claims() {
|
|
|
1262
1263
|
local c
|
|
1263
1264
|
if [ -n "${TEAM_HELP_SURFACE_ONLY:-}" ]; then
|
|
1264
1265
|
for c in ${TEAM_HELP_SURFACE_ONLY}; do run_probe "$c"; done
|
|
1266
|
+
case " ${TEAM_HELP_SURFACE_ONLY} " in *" say "*) check_say_flag_retired ;; esac
|
|
1265
1267
|
return 0
|
|
1266
1268
|
fi
|
|
1267
1269
|
for c in "${MG_ORDER[@]}"; do
|
|
1268
1270
|
run_probe "$c"
|
|
1269
1271
|
done
|
|
1272
|
+
check_say_flag_retired
|
|
1273
|
+
return 0
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
# ---------------------------------------------------------------- P393 退休的 say --now
|
|
1277
|
+
# 两个位置都必须走**既有** unknown-flag 路径(exit 2),且投递副作用为零。指纹分开取 keys(记录型
|
|
1278
|
+
# tmux 的 send-keys)、收件箱、wake spool、forced 审计与活动/held 队列 —— 只有逐面比较才说得清
|
|
1279
|
+
# 哪个面动了;另跑一次不带旗标的普通 say 作对照,证明指纹看得见写入(不是瞎的)。
|
|
1280
|
+
say_flag_fp() { # <dir> → 每个面一行
|
|
1281
|
+
local d="$1"
|
|
1282
|
+
printf 'keys=%s\n' "$(grep -c 'send-keys' "$tmp/tmux-calls.log" 2>/dev/null || true)"
|
|
1283
|
+
printf 'inbox=%s\n' "$(fp_dir "$d/docs/team/inbox")"
|
|
1284
|
+
printf 'spool=%s\n' "$(fp_dir "$d/.pi/team/state/inbox-watch")"
|
|
1285
|
+
printf 'forced=%s\n' "$( [ -f "$d/.pi/team/state/outbox/forced.log" ] && sha256sum "$d/.pi/team/state/outbox/forced.log" | cut -d' ' -f1 || printf none)"
|
|
1286
|
+
printf 'queue=%s\n' "$( { find "$d/.pi/team/state/outbox" -maxdepth 1 -name '*.msg' -printf '%f %s\n' 2>/dev/null
|
|
1287
|
+
find "$d/.pi/team/state/outbox/held" -maxdepth 1 -name '*.msg' -printf 'held/%f %s\n' 2>/dev/null
|
|
1288
|
+
} | sort | sha256sum | cut -d' ' -f1)"
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
check_say_flag_retired() {
|
|
1292
|
+
section "say · 退休的 --now 在两个位置都无副作用"
|
|
1293
|
+
local d before a1 a2 rc1 rc2 out1 out2 after_control
|
|
1294
|
+
d="$(new_repo p-say-flag)"
|
|
1295
|
+
if ! setup_fixture wt "$d" p-say-flag >"$tmp/logs/p-say-flag.setup" 2>&1; then
|
|
1296
|
+
finding "say 退休旗标:夹具搭不起来($(tail -1 "$tmp/logs/p-say-flag.setup"))"
|
|
1297
|
+
return 1
|
|
1298
|
+
fi
|
|
1299
|
+
HS_ENV=""; HS_STDIN=/dev/null
|
|
1300
|
+
before="$(say_flag_fp "$d")"
|
|
1301
|
+
env_run "$d" say --now dev "retired flag before the recipient" >/dev/null 2>&1
|
|
1302
|
+
rc1="$HS_RC"; out1="$HS_OUT"
|
|
1303
|
+
a1="$(say_flag_fp "$d")"
|
|
1304
|
+
env_run "$d" say dev "retired flag after the message" --now >/dev/null 2>&1
|
|
1305
|
+
rc2="$HS_RC"; out2="$HS_OUT"
|
|
1306
|
+
a2="$(say_flag_fp "$d")"
|
|
1307
|
+
if [ "$rc1" = "2" ] && printf '%s' "$out1" | grep -q -- '--now' && printf '%s' "$out1" | grep -q '未知参数'; then
|
|
1308
|
+
ok "say --now(收件人之前)→ exit 2 并点名 --now"
|
|
1309
|
+
else
|
|
1310
|
+
finding "say --now 前置位置:rc=$rc1 out=$(printf '%s' "$out1" | head -1 | cut -c1-80)"
|
|
1311
|
+
fi
|
|
1312
|
+
if [ "$rc2" = "2" ] && printf '%s' "$out2" | grep -q -- '--now' && printf '%s' "$out2" | grep -q '未知参数'; then
|
|
1313
|
+
ok "say dev … --now(消息之后)→ exit 2 并点名 --now"
|
|
1314
|
+
else
|
|
1315
|
+
finding "say --now 后置位置:rc=$rc2 out=$(printf '%s' "$out2" | head -1 | cut -c1-80)"
|
|
1316
|
+
fi
|
|
1317
|
+
if [ "$before" = "$a1" ] && [ "$before" = "$a2" ]; then
|
|
1318
|
+
ok "两次拒绝后 keys/inbox/spool/forced/queue 指纹逐字节不变"
|
|
1319
|
+
else
|
|
1320
|
+
finding "拒绝臂动了投递面:$(diff <(printf '%s\n' "$before") <(printf '%s\n' "$a2") | grep '^[<>]' | paste -sd ' ' -)"
|
|
1321
|
+
fi
|
|
1322
|
+
env_run "$d" say dev "control send proves the fingerprint sees writes" >/dev/null 2>&1
|
|
1323
|
+
after_control="$(say_flag_fp "$d")"
|
|
1324
|
+
if [ "$after_control" != "$before" ]; then
|
|
1325
|
+
ok "对照:一次普通 say 改变了指纹(所以「拒绝臂不变」不是瞎的)"
|
|
1326
|
+
else
|
|
1327
|
+
finding "对照:普通 say 也没让指纹变化(指纹是瞎的,拒绝臂的绿不成立)"
|
|
1328
|
+
fi
|
|
1270
1329
|
return 0
|
|
1271
1330
|
}
|
|
1272
1331
|
|
|
@@ -1291,7 +1350,6 @@ reply --from --stdin --title
|
|
|
1291
1350
|
report --force
|
|
1292
1351
|
resume --agent --all --dry-run
|
|
1293
1352
|
review --allow-unresolved-branch --dir --no-gates --strong
|
|
1294
|
-
say --now
|
|
1295
1353
|
standby --reason
|
|
1296
1354
|
task --agent --category --deps --issue --title
|
|
1297
1355
|
teardown --agent --all --force --purge --register
|