teamsmith 0.4.6 → 0.4.7

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 (70) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
  3. package/skills/teamsmith/CHANGELOG.md +24 -0
  4. package/skills/teamsmith/SKILL.md +32 -23
  5. package/skills/teamsmith/extension/team-bg.ts +5 -3
  6. package/skills/teamsmith/extension/team-inbox-watch.ts +14 -3
  7. package/skills/teamsmith/extension/team-notify.ts +20 -13
  8. package/skills/teamsmith/extension/team-remind.ts +189 -0
  9. package/skills/teamsmith/extension/team-reply.ts +4 -7
  10. package/skills/teamsmith/references/migration.md +101 -0
  11. package/skills/teamsmith/references/openspec.md +43 -27
  12. package/skills/teamsmith/references/protocol.md +26 -15
  13. package/skills/teamsmith/references/reminders.md +153 -161
  14. package/skills/teamsmith/references/troubleshooting.md +12 -7
  15. package/skills/teamsmith/references/workflows.md +84 -31
  16. package/skills/teamsmith/scripts/lib/cmd-agents.sh +10 -4
  17. package/skills/teamsmith/scripts/lib/cmd-project.sh +88 -6
  18. package/skills/teamsmith/scripts/lib/cmd-remind.sh +88 -2
  19. package/skills/teamsmith/scripts/lib/cmd-review.sh +42 -4
  20. package/skills/teamsmith/scripts/lib/cmd-watch.sh +48 -11
  21. package/skills/teamsmith/scripts/lib/common.sh +83 -13
  22. package/skills/teamsmith/scripts/panel/panel.js +179 -179
  23. package/skills/teamsmith/scripts/panel/src/data.ts +71 -15
  24. package/skills/teamsmith/scripts/panel/src/layout.ts +20 -8
  25. package/skills/teamsmith/scripts/panel/src/main.tsx +83 -21
  26. package/skills/teamsmith/scripts/remind-capability.mjs +261 -0
  27. package/skills/teamsmith/scripts/remind-store.mjs +55 -24
  28. package/skills/teamsmith/scripts/remind-tick.mjs +5 -2
  29. package/skills/teamsmith/scripts/reply-capture.mjs +8 -9
  30. package/skills/teamsmith/scripts/state-authority.mjs +72 -6
  31. package/skills/teamsmith/scripts/team +1 -0
  32. package/skills/teamsmith/templates/AGENTS.section.md.tmpl +11 -8
  33. package/skills/teamsmith/templates/DECISIONS.md.tmpl +2 -2
  34. package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +3 -3
  35. package/skills/teamsmith/templates/PROTOCOL.md.tmpl +19 -14
  36. package/skills/teamsmith/templates/memory-seed.md.tmpl +2 -2
  37. package/skills/teamsmith/templates/pm-prompt.md.tmpl +31 -19
  38. package/skills/teamsmith/templates/report.md.tmpl +33 -0
  39. package/skills/teamsmith/tests/bg-ledger-harness.mjs +217 -33
  40. package/skills/teamsmith/tests/bg-ledger.sh +24 -10
  41. package/skills/teamsmith/tests/checkout-shape-probe.sh +7 -6
  42. package/skills/teamsmith/tests/fixtures/remind-adversarial-delay.ts +27 -0
  43. package/skills/teamsmith/tests/fixtures/remind-tool-provider.ts +65 -0
  44. package/skills/teamsmith/tests/help-surface.sh +3 -5
  45. package/skills/teamsmith/tests/isolation-ledger.sh +6 -2
  46. package/skills/teamsmith/tests/key-replies-ui.sh +53 -0
  47. package/skills/teamsmith/tests/key-replies.sh +307 -106
  48. package/skills/teamsmith/tests/lib/routes-pages.sh +243 -0
  49. package/skills/teamsmith/tests/loop-inventory.tsv +1 -0
  50. package/skills/teamsmith/tests/panel-b3-stub.sh +9 -2
  51. package/skills/teamsmith/tests/remind-adversarial-faults.mjs +163 -0
  52. package/skills/teamsmith/tests/remind-adversarial-faults.sh +26 -0
  53. package/skills/teamsmith/tests/remind-adversarial-real.sh +27 -0
  54. package/skills/teamsmith/tests/remind-cli.sh +108 -3
  55. package/skills/teamsmith/tests/remind-delivery-node.mjs +13 -0
  56. package/skills/teamsmith/tests/remind-delivery.sh +123 -35
  57. package/skills/teamsmith/tests/remind-lifecycle.sh +197 -0
  58. package/skills/teamsmith/tests/remind-pulse.sh +199 -0
  59. package/skills/teamsmith/tests/remind-recovery-real.sh +5 -0
  60. package/skills/teamsmith/tests/remind-recovery-unit.sh +118 -0
  61. package/skills/teamsmith/tests/remind-tool-node.mjs +159 -0
  62. package/skills/teamsmith/tests/remind-tool-real.mjs +754 -0
  63. package/skills/teamsmith/tests/remind-tool-real.sh +5 -0
  64. package/skills/teamsmith/tests/reply-capture-real.mjs +93 -2
  65. package/skills/teamsmith/tests/routes.sh +213 -293
  66. package/skills/teamsmith/tests/section-paths.tsv +10 -8
  67. package/skills/teamsmith/tests/smoke.sh +484 -28
  68. package/skills/teamsmith/tests/state-authority.sh +152 -8
  69. package/skills/teamsmith-init/SKILL.md +5 -5
  70. package/skills/teamsmith/tests/fixtures/delivery-truth-real/__pycache__/judge-second.cpython-313.pyc +0 -0
@@ -18,30 +18,31 @@
18
18
  # --flip=standby-ignore 迁移不读旧标记 → “迁移保留原因/时间”必须红
19
19
  # --flip=standby-file 读路径退回旧标记文件 → “迁移后旧标记不再是真相”必须红
20
20
  # --flip=standby-write 写待命退回 state/standby → “写入后统一状态记下 on”必须红
21
- # 不带 --flip 时七条臂全跑;带一条时只跑那一条,其余臂跳过(跳过即不计入,不是通过)。
22
- # 用法:bash tests/state-authority.sh [--flip=unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write]
21
+ # --flip=flock-resolution 解析不再检查执行权限 → “不可执行 flock 必须被拒”必须红
22
+ # 不带 --flip 时八条臂全跑;带一条时只跑那一条,其余臂跳过(跳过即不计入,不是通过)。
23
+ # 用法:bash tests/state-authority.sh [--flip=unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write|flock-resolution]
23
24
  # 退出码:0 全绿 / 1 有失败 / 2 参数不认识 / 3 前提缺失(JS 运行时或 flock;可见跳过,不算通过)
24
25
  set -uo pipefail
25
26
 
26
27
  HERE="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
27
28
  SKILL="$(cd -P "$HERE/.." && pwd)"
28
29
 
29
- # 参数面:只有这四个 --flip 值;认不出来就拒绝(静默照跑等于把一条臂当成了四条)。
30
+ # 参数面:只接受下列 --flip 值;认不出来就拒绝(静默照跑会把单臂证据当成全套证据)。
30
31
  FLIP=""
31
32
  flip_err() { printf 'state-authority: %s\n' "$1" >&2; }
32
33
  for arg in "$@"; do
33
34
  case "$arg" in
34
- --flip=unlocked|--flip=version|--flip=foreign|--flip=manifest|--flip=standby-ignore|--flip=standby-file|--flip=standby-write)
35
+ --flip=unlocked|--flip=version|--flip=foreign|--flip=manifest|--flip=standby-ignore|--flip=standby-file|--flip=standby-write|--flip=flock-resolution)
35
36
  if [ -n "$FLIP" ] && [ "$FLIP" != "${arg#--flip=}" ]; then
36
37
  flip_err "互相冲突的 --flip($FLIP / ${arg#--flip=}):一次只跑一条臂"; exit 2
37
38
  fi
38
39
  FLIP="${arg#--flip=}" ;;
39
40
  --flip=*)
40
- flip_err "不认识的 --flip 值 [${arg#--flip=}];只接受 unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write"; exit 2 ;;
41
+ flip_err "不认识的 --flip 值 [${arg#--flip=}];只接受 unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write|flock-resolution"; exit 2 ;;
41
42
  -h|--help)
42
- printf 'usage: bash tests/state-authority.sh [--flip=unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write]\n'; exit 0 ;;
43
+ printf 'usage: bash tests/state-authority.sh [--flip=unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write|flock-resolution]\n'; exit 0 ;;
43
44
  *)
44
- flip_err "不认识的参数 [$arg](只接受 --flip=<unlocked|version|foreign|manifest>)"; exit 2 ;;
45
+ flip_err "不认识的参数 [$arg](只接受 --flip=<unlocked|version|foreign|manifest|standby-ignore|standby-file|standby-write|flock-resolution>)"; exit 2 ;;
45
46
  esac
46
47
  done
47
48
  arm_selected() { [ -z "$FLIP" ] || [ "$FLIP" = "$1" ]; }
@@ -315,6 +316,7 @@ rm -f "$orphan"
315
316
 
316
317
  # ---------------------------------------------------------------- 6. 有界锁失败 + 持锁者被杀
317
318
  LOCK="$A_STATE/reminders/authority.lock"
319
+ LOCK_FAIL_BEFORE="$(sha256sum "$A_STATE/reminders/state.json" | cut -d' ' -f1)"
318
320
  bash -c 'exec 9>"$1"; flock -x 9; sleep 30' _ "$LOCK" &
319
321
  HOLDER=$!
320
322
  sleep 0.4
@@ -331,6 +333,7 @@ if [ "$elapsed_ms" -ge 4500 ] && [ "$elapsed_ms" -le 12000 ]; then
331
333
  else
332
334
  bad "锁等待不是有界的 5s(实测 ${elapsed_ms}ms)"
333
335
  fi
336
+ assert_eq_local "真实锁竞争失败后快照一字未改" "$(sha256sum "$A_STATE/reminders/state.json" | cut -d' ' -f1)" "$LOCK_FAIL_BEFORE"
334
337
  kill -9 "$HOLDER" 2>/dev/null
335
338
  wait "$HOLDER" 2>/dev/null
336
339
  start_ns="$(date +%s%N)"
@@ -517,7 +520,7 @@ assert_eq_local "⑤f 清残留不加代次" "$(jget "$(cat "$I_SNAP")" standby.
517
520
 
518
521
  # ⑥ 代次语义:每次 on 都是新的一代,off 不动代次、重复 off 不写盘
519
522
  J="$(make_repo J)" || { bad "夹具建不出仓库 J"; result; exit 1; }
520
- J_SNAP="$J/.pi/team/state/reminders/state.json"
523
+ J_STATE="$J/.pi/team/state"; J_SNAP="$J_STATE/reminders/state.json"
521
524
  sb "$J" 'team_standby_on "first"' >/dev/null
522
525
  assert_eq_local "⑥a 第一次 on:代次 1" "$(jget "$(cat "$J_SNAP")" standby.generation)" "1"
523
526
  sb "$J" 'team_standby_on "second"' >/dev/null
@@ -572,6 +575,128 @@ else
572
575
  note "跳过 ⑦(这台机器上造不出没有 flock 的 PATH)"
573
576
  fi
574
577
 
578
+ # ---------------------------------------------------------------- 7b. 不可执行 / 实际 flock 失败(P451 · 1.3.2)
579
+ BADFLOCK="$ROOT/flip/badflock-bin"
580
+ cp -a "$NOFLOCK" "$BADFLOCK"
581
+ printf 'not executable\n' >"$BADFLOCK/flock"
582
+ chmod 0644 "$BADFLOCK/flock"
583
+ M="$(make_repo M)" || { bad "夹具建不出仓库 M"; result; exit 1; }
584
+ M_STATE="$M/.pi/team/state"; mkdir -p "$M_STATE"
585
+ printf '2026-11-12T00:00:00Z bad flock\n' >"$M_STATE/standby"
586
+ out="$(runchild "$M" TEAM_JS_BIN="$RUNNER" BADFLOCK="$BADFLOCK" -- "$PREP; PATH=\"\$BADFLOCK\" team_standby_on x 2>&1; printf ' rc=%s' \"\$?\"" 2>&1)"
587
+ if case "$out" in *"is not an executable regular file"*"rc=1"*) true ;; *) false ;; esac; then
588
+ ok "⑦g 不可执行 flock:点名实际路径与权限问题,写入非零退出"
589
+ else
590
+ bad "⑦g 不可执行 flock 没有明确失败(输出:$(printf '%s' "$out" | tr '\n' '|'))"
591
+ fi
592
+ [ ! -e "$M/.pi/team/reminder-locator.json" ] && [ ! -e "$M_STATE/reminders" ] \
593
+ && ok "⑦h 不可执行 flock 没有留下定位器或快照" || bad "⑦h 不可执行 flock 留下了半个权威"
594
+ resolution="$(env PATH="$BADFLOCK" "$RUNNER" "$NODE_HELPER" --flock-check)"
595
+ assert_eq_local "⑦i 共享解析器区分不可执行(不是 missing)" "$(printf '%s' "$resolution" | cut -f1-2)" "unusable $BADFLOCK/flock"
596
+
597
+ ENOLCK="$ROOT/flip/enolck-bin"
598
+ cp -a "$NOFLOCK" "$ENOLCK"
599
+ cat >"$ENOLCK/flock" <<'EOF'
600
+ #!/usr/bin/env bash
601
+ if [ "${1:-}" = "--version" ]; then printf 'flock from util-linux fixture\n'; exit 0; fi
602
+ printf '%s\n' "$*" >>"$FLOCK_TEST_LOG"
603
+ printf 'flock: %s: No locks available\n' "${6:-unknown}" >&2
604
+ exit 1
605
+ EOF
606
+ chmod +x "$ENOLCK/flock"
607
+ : >"$ROOT/enolck.calls"
608
+ shown="$(runchild "$J" TEAM_JS_BIN="$RUNNER" ENOLCK="$ENOLCK" -- "$PREP; PATH=\"\$ENOLCK\" team_flock_runner")"
609
+ assert_eq_local "⑦j paths 使用与事务相同的 flock 解析结果" "$shown" "$ENOLCK/flock"
610
+ J_H1="$(sha256sum "$J_SNAP" | cut -d' ' -f1)"
611
+ out="$(runchild "$J" TEAM_JS_BIN="$RUNNER" ENOLCK="$ENOLCK" FLOCK_TEST_LOG="$ROOT/enolck.calls" -- "$PREP; PATH=\"\$ENOLCK\" FLOCK_TEST_LOG=\"\$FLOCK_TEST_LOG\" team_standby_on must-not-write 2>&1; printf ' rc=%s' \"\$?\"" 2>&1)"
612
+ if case "$out" in *"exclusive flock failed at $J_STATE/reminders/authority.lock"*"No locks available"*"no state was written"*"rc=1"*) true ;; *) false ;; esac; then
613
+ ok "⑦k flock 返回 ENOLCK:错误点名真实 authority.lock、文件系统与未写状态"
614
+ else
615
+ bad "⑦k ENOLCK 没有按锁/文件系统失败报告(输出:$(printf '%s' "$out" | tr '\n' '|'))"
616
+ fi
617
+ assert_eq_local "⑦l ENOLCK 后快照一字未改" "$(sha256sum "$J_SNAP" | cut -d' ' -f1)" "$J_H1"
618
+ if grep -q -- "-x -w 5 -E 75 $J_STATE/reminders/authority.lock" "$ROOT/enolck.calls"; then
619
+ ok "⑦m 失败来自实际执行的 flock(参数与真实锁路径已记录),不是伪造成交"
620
+ else
621
+ bad "⑦m 没有执行到真实 flock 调用(日志:$(cat "$ROOT/enolck.calls"))"
622
+ fi
623
+ out="$(runchild "$J" TEAM_JS_BIN="$RUNNER" ENOLCK="$ENOLCK" FLOCK_TEST_LOG="$ROOT/enolck.calls" -- "PATH=\"\$ENOLCK\" FLOCK_TEST_LOG=\"\$FLOCK_TEST_LOG\" bash \"$SKILL/scripts/team\" --root \"$J\" doctor" 2>&1)"; rc=$?
624
+ if [ "$rc" -ne 0 ] && case "$out" in *"真实 authority.lock 加锁失败"*"No locks available"*"不会无锁降级"*) true ;; *) false ;; esac; then
625
+ ok "⑦m2 doctor 对真实 authority.lock 的锁失败给出文件系统修复方式"
626
+ else
627
+ bad "⑦m2 doctor 没诊断真实锁失败(rc=$rc,输出:$(printf '%s' "$out" | grep -A2 -B1 '状态锁 flock' | tr '\n' '|'))"
628
+ fi
629
+ assert_eq_local "⑦m3 doctor 锁探针不改快照" "$(sha256sum "$J_SNAP" | cut -d' ' -f1)" "$J_H1"
630
+ out="$(runchild "$J" -- "bash \"$SKILL/scripts/team\" --root \"$J\" doctor" 2>&1)"
631
+ if case "$out" in *"真实 authority.lock 排他锁可用"*) true ;; *) false ;; esac; then
632
+ ok "⑦m4 恢复真实 flock 后 doctor 探针转绿(同一项目、同一锁文件)"
633
+ else
634
+ bad "⑦m4 恢复后 doctor 锁探针仍不绿(输出:$(printf '%s' "$out" | grep -A2 -B1 '状态锁 flock' | tr '\n' '|'))"
635
+ fi
636
+
637
+ # ---------------------------------------------------------------- 7c. 静止迁移失败与回滚导出(P451 · 1.3.2)
638
+ R="$(make_repo R)" || { bad "夹具建不出仓库 R"; result; exit 1; }
639
+ R_STATE="$R/.pi/team/state"; R_SNAP="$R_STATE/reminders/state.json"
640
+ sb "$R" 'team_authority_init' >/dev/null
641
+ # 合法的旧快照没有 migrated 键;这里只回到那个升级前形状,随后让旧标记无法导入。
642
+ sed -i 's/"migrated":true/"migrated":false/' "$R_SNAP"
643
+ mkdir "$R_STATE/standby"
644
+ R_H1="$(sha256sum "$R_SNAP" | cut -d' ' -f1)"
645
+ out="$(sb "$R" 'team_standby_migrate' 2>&1)"; rc=$?
646
+ if [ "$rc" -ne 0 ] && case "$out" in *"legacy Standby marker is not a regular file"*) true ;; *) false ;; esac; then
647
+ ok "⑦n 静止迁移遇到坏旧标记:显式失败并点名原因"
648
+ else
649
+ bad "⑦n 坏旧标记没有让迁移失败(rc=$rc,输出:$(printf '%s' "$out" | tr '\n' '|'))"
650
+ fi
651
+ assert_eq_local "⑦o 迁移失败后快照保持原状态" "$(sha256sum "$R_SNAP" | cut -d' ' -f1)" "$R_H1"
652
+ [ -d "$R_STATE/standby" ] && [ ! -e "$R_STATE/standby.migrated" ] \
653
+ && ok "⑦p 迁移失败后旧标记未退役、未伪造迁移完成" || bad "⑦p 迁移失败后旧标记状态变了"
654
+
655
+ U="$(make_repo U)" || { bad "夹具建不出仓库 U"; result; exit 1; }
656
+ U_STATE="$U/.pi/team/state"; U_SNAP="$U_STATE/reminders/state.json"
657
+ sb "$U" 'team_standby_on "rollback export reason"' >/dev/null
658
+ EXPORT="$ROOT/rollback-export"; OLD_CODE="$ROOT/old-code-state"
659
+ mkdir -p "$EXPORT" "$OLD_CODE"
660
+ cp "$U_SNAP" "$EXPORT/state.json"
661
+ # 与 references/migration.md 相同的实际操作:从导出快照重建旧版唯一读取的待命标记。
662
+ "$RUNNER" -e '
663
+ const fs = require("fs");
664
+ const [snapshotFile, markerFile] = process.argv.slice(1);
665
+ const s = JSON.parse(fs.readFileSync(snapshotFile, "utf8"));
666
+ if (!s.standby.migrated) throw new Error("snapshot has not completed Standby migration");
667
+ if (s.standby.on) fs.writeFileSync(markerFile, `${s.standby.since} ${s.standby.reason}\n`);
668
+ ' "$EXPORT/state.json" "$OLD_CODE/standby"
669
+ expected_marker="$(jget "$(cat "$EXPORT/state.json")" standby.since) $(jget "$(cat "$EXPORT/state.json")" standby.reason)"
670
+ assert_eq_local "⑦q 回滚导出可重建旧版待命标记" "$(cat "$OLD_CODE/standby")" "$expected_marker"
671
+ mv "$OLD_CODE/standby" "$EXPORT/standby.before-restore-check"
672
+ "$RUNNER" -e '
673
+ const fs = require("fs");
674
+ const [snapshotFile, markerFile] = process.argv.slice(1);
675
+ const s = JSON.parse(fs.readFileSync(snapshotFile, "utf8"));
676
+ if (!s.standby.migrated) throw new Error("snapshot has not completed Standby migration");
677
+ if (s.standby.on) fs.writeFileSync(markerFile, `${s.standby.since} ${s.standby.reason}\n`);
678
+ ' "$EXPORT/state.json" "$OLD_CODE/standby"
679
+ if cmp -s "$EXPORT/standby.before-restore-check" "$OLD_CODE/standby"; then
680
+ ok "⑦q2 移走旧标记后可从导出快照逐字节恢复它"
681
+ else
682
+ bad "⑦q2 导出快照不能恢复旧标记"
683
+ fi
684
+ cp "$EXPORT/state.json" "$EXPORT/state.restore-check.json"
685
+ printf 'corrupt restore\n' >>"$EXPORT/state.restore-check.json"
686
+ if cmp -s "$EXPORT/state.json" "$EXPORT/state.restore-check.json"; then
687
+ bad "⑦r 反向改坏:损坏的恢复副本竟与导出原件相同"
688
+ else
689
+ ok "⑦r 反向改坏:恢复副本损坏会被逐字节比较发现"
690
+ fi
691
+ cp "$EXPORT/state.json" "$EXPORT/state.restore-check.json"
692
+ if cmp -s "$EXPORT/state.json" "$EXPORT/state.restore-check.json" \
693
+ && [ "$(jget "$(cat "$EXPORT/state.restore-check.json")" standby.reason)" = "rollback export reason" ]; then
694
+ ok "⑦s 从导出原件恢复后字节与待命原因都复原"
695
+ else
696
+ bad "⑦s 导出原件无法恢复"
697
+ fi
698
+ [ ! -e "$OLD_CODE/reminders/state.json" ] && ok "⑦t 回滚快照留在旧代码状态路径之外" || bad "⑦t 回滚快照落进了旧代码路径"
699
+
575
700
  # ---------------------------------------------------------------- 10. 红侧:同一个判据,改坏实现必须红
576
701
  flip_copy() { # <名字> <sed 表达式> —— 变异必须真的改到(否则红侧就是橡皮章)
577
702
  authority_helper_copy "$ROOT/flip/$1.mjs"
@@ -584,6 +709,25 @@ flip_helper() { # <helper> <repo> <state> <op> [args…] → 打印输出
584
709
  ( cd "$repo" && env -u TEAM_ROOT -u TEAM_MAIN_ROOT -u TEAM_PROJECT -u TEAM_SESSION HOME="$ROOT/home" \
585
710
  "$RUNNER" "$helper" --cli "$repo" "$state" "$@" 2>&1 )
586
711
  }
712
+ # 10a0. flock 解析退化成「文件存在就算可用」:不可执行诊断必须翻错(P451)
713
+ if arm_selected flock-resolution; then
714
+ FLIPS_RUN="${FLIPS_RUN:+$FLIPS_RUN,}flock-resolution"
715
+ if flip_copy flock-resolution '/fs\.accessSync(file, fs\.constants\.X_OK);/d'; then
716
+ ok "flip 变异已落地:flock 解析不再检查执行权限"
717
+ else
718
+ bad "flip 变异没落地(共享 flock 解析器形状变了)"
719
+ fi
720
+ orig_res="$(env PATH="$BADFLOCK" "$RUNNER" "$NODE_HELPER" --flock-check)"
721
+ mut_res="$(env PATH="$BADFLOCK" "$RUNNER" "$ROOT/flip/flock-resolution.mjs" --flock-check)"
722
+ if [ "$(printf '%s' "$orig_res" | cut -f1)" = "unusable" ] && [ "$(printf '%s' "$mut_res" | cut -f1)" = "ok" ]; then
723
+ ok "flip(不查执行权限):原实现报 unusable,变异体报 ok —— ⑦i 与 paths/doctor 判据会红"
724
+ else
725
+ bad "flip(不查执行权限)没被咬住(原 [$orig_res],变异 [$mut_res])"
726
+ fi
727
+ else
728
+ note "跳过红侧臂 flock-resolution(本次 --flip=${FLIP})"
729
+ fi
730
+
587
731
  # 10a. 不持锁的直写:只把生产代码里那条 flock 调用换成直接事务(一行之差,不放大任何窗口)
588
732
  if arm_selected unlocked; then
589
733
  FLIPS_RUN="${FLIPS_RUN:+$FLIPS_RUN,}unlocked"
@@ -3,13 +3,12 @@ name: teamsmith-init
3
3
  description: teamsmith-init is the new-project entry point of the teamsmith toolkit — organize multiple agents into a team, set up an agent collaboration protocol, and bootstrap this skill into a new project. It walks the questions to settle with the user first (dependencies, session and roster, the task-category mapping and the independent PM model, gates, VCS mode, install command, and the project's ROADMAP/OWNERSHIP/AGENTS.md red lines), then runs the one command that writes `.pi/team/config.sh` + the `docs/team/` skeleton + the `AGENTS.md` protocol section and starts the pulse, and finally hands day-to-day operation to the `teamsmith` skill. Use when the user wants to bootstrap teamsmith into a new repository, set up a brand-new team, organize multiple agents into a team, or set up an agent collaboration protocol where none exists yet.
4
4
  license: MIT
5
5
  metadata:
6
- version: "0.4.6"
6
+ version: "0.4.7"
7
7
  ---
8
8
 
9
9
  # teamsmith-init · bring a new project to "ready to dispatch"
10
10
 
11
- You are the first session in a repository that has no team yet. **Install first**, then settle the questions below
12
- with the user, run one command, then hand day-to-day operation to the **`teamsmith`** skill.
11
+ You are the first session in a repository that has no team yet. **Install first**, then settle the questions below with the user, run one command, then hand day-to-day operation to the **`teamsmith`** skill.
13
12
  ## 0. Install the CLI and the project's skills
14
13
 
15
14
  ```bash
@@ -82,8 +81,9 @@ Alternatives to npm: `pi install …` at a released tag, `./install.sh` from a c
82
81
 
83
82
  ## 2. Handoff
84
83
 
85
- Day-to-day operation lives in the **`teamsmith`** skill: the PM loop, dispatch, independent verification, merging,
86
- the pulse, updates and troubleshooting are all there — read `skills/teamsmith/SKILL.md` and follow it. The three
84
+ Day-to-day operation lives in the **`teamsmith`** skill: the PM dispatches and accepts evidence while non-implementer
85
+ workers execute independent verification and archive; merging, the pulse, updates and troubleshooting are all there —
86
+ read `skills/teamsmith/SKILL.md` and follow it. The three
87
87
  commands that answer "what now?": `team digest` (pending work), `team pulse status` (patrol and PM liveness),
88
88
  `team doctor` (environment). The handover is three steps, and the middle one is the one people skip:
89
89
  1. **Bootstrap** — already done in step 6 above (a rerun is idempotent; `--print` shows the plan).