teamsmith 0.4.5 → 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 (81) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
  3. package/skills/teamsmith/CHANGELOG.md +37 -1
  4. package/skills/teamsmith/SKILL.md +32 -23
  5. package/skills/teamsmith/extension/team-bg.ts +12 -11
  6. package/skills/teamsmith/extension/team-inbox-watch.ts +149 -5
  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 +28 -18
  13. package/skills/teamsmith/references/reminders.md +133 -98
  14. package/skills/teamsmith/references/troubleshooting.md +12 -7
  15. package/skills/teamsmith/references/workflows.md +85 -34
  16. package/skills/teamsmith/scripts/lib/cmd-agents.sh +28 -5
  17. package/skills/teamsmith/scripts/lib/cmd-project.sh +100 -15
  18. package/skills/teamsmith/scripts/lib/cmd-remind.sh +135 -10
  19. package/skills/teamsmith/scripts/lib/cmd-review.sh +42 -4
  20. package/skills/teamsmith/scripts/lib/cmd-update.sh +90 -88
  21. package/skills/teamsmith/scripts/lib/cmd-watch.sh +322 -159
  22. package/skills/teamsmith/scripts/lib/common.sh +156 -26
  23. package/skills/teamsmith/scripts/panel/panel.js +182 -182
  24. package/skills/teamsmith/scripts/panel/src/data.ts +113 -6
  25. package/skills/teamsmith/scripts/panel/src/layout.ts +26 -4
  26. package/skills/teamsmith/scripts/panel/src/main.tsx +103 -14
  27. package/skills/teamsmith/scripts/remind-capability.mjs +261 -0
  28. package/skills/teamsmith/scripts/remind-store.mjs +404 -17
  29. package/skills/teamsmith/scripts/remind-tick.mjs +105 -0
  30. package/skills/teamsmith/scripts/reminder-delivery.mjs +76 -0
  31. package/skills/teamsmith/scripts/reply-capture.mjs +8 -9
  32. package/skills/teamsmith/scripts/state-authority.mjs +334 -20
  33. package/skills/teamsmith/scripts/strings/commands.tsv +3 -3
  34. package/skills/teamsmith/scripts/strings/help.en.tsv +12 -12
  35. package/skills/teamsmith/scripts/strings/help.zh.tsv +12 -12
  36. package/skills/teamsmith/scripts/team +4 -3
  37. package/skills/teamsmith/templates/AGENTS.section.md.tmpl +13 -11
  38. package/skills/teamsmith/templates/DECISIONS.md.tmpl +2 -2
  39. package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +3 -3
  40. package/skills/teamsmith/templates/PROTOCOL.md.tmpl +19 -14
  41. package/skills/teamsmith/templates/memory-seed.md.tmpl +2 -2
  42. package/skills/teamsmith/templates/pm-prompt.md.tmpl +36 -18
  43. package/skills/teamsmith/templates/report.md.tmpl +33 -0
  44. package/skills/teamsmith/tests/bg-ledger-harness.mjs +217 -33
  45. package/skills/teamsmith/tests/bg-ledger.sh +24 -10
  46. package/skills/teamsmith/tests/checkout-shape-probe.sh +7 -6
  47. package/skills/teamsmith/tests/death-cause.sh +5 -0
  48. package/skills/teamsmith/tests/fixtures/remind-adversarial-delay.ts +27 -0
  49. package/skills/teamsmith/tests/fixtures/remind-tool-provider.ts +65 -0
  50. package/skills/teamsmith/tests/help-surface.sh +14 -151
  51. package/skills/teamsmith/tests/isolation-ledger.sh +89 -0
  52. package/skills/teamsmith/tests/key-replies-ui.sh +53 -0
  53. package/skills/teamsmith/tests/key-replies.sh +307 -106
  54. package/skills/teamsmith/tests/lib/main-team-fingerprint.sh +17 -1
  55. package/skills/teamsmith/tests/lib/routes-pages.sh +243 -0
  56. package/skills/teamsmith/tests/live-capture-probe.sh +12 -2
  57. package/skills/teamsmith/tests/loop-inventory.tsv +1 -0
  58. package/skills/teamsmith/tests/panel-b3-stub.sh +9 -2
  59. package/skills/teamsmith/tests/pulse-nudge-key.sh +5 -0
  60. package/skills/teamsmith/tests/remind-adversarial-faults.mjs +163 -0
  61. package/skills/teamsmith/tests/remind-adversarial-faults.sh +26 -0
  62. package/skills/teamsmith/tests/remind-adversarial-real.sh +27 -0
  63. package/skills/teamsmith/tests/remind-cli.sh +108 -3
  64. package/skills/teamsmith/tests/remind-delivery-node.mjs +189 -0
  65. package/skills/teamsmith/tests/remind-delivery.sh +699 -0
  66. package/skills/teamsmith/tests/remind-lifecycle.sh +197 -0
  67. package/skills/teamsmith/tests/remind-pulse.sh +199 -0
  68. package/skills/teamsmith/tests/remind-recovery-real.sh +5 -0
  69. package/skills/teamsmith/tests/remind-recovery-unit.sh +118 -0
  70. package/skills/teamsmith/tests/remind-tool-node.mjs +159 -0
  71. package/skills/teamsmith/tests/remind-tool-real.mjs +754 -0
  72. package/skills/teamsmith/tests/remind-tool-real.sh +5 -0
  73. package/skills/teamsmith/tests/reply-capture-real.mjs +93 -2
  74. package/skills/teamsmith/tests/routes.sh +213 -293
  75. package/skills/teamsmith/tests/section-paths.tsv +14 -12
  76. package/skills/teamsmith/tests/smoke.sh +876 -130
  77. package/skills/teamsmith/tests/state-authority.sh +392 -28
  78. package/skills/teamsmith/tests/team-inbox-watch-harness.mjs +58 -8
  79. package/skills/teamsmith/tests/tmux-identity-leak.sh +12 -16
  80. package/skills/teamsmith-init/SKILL.md +5 -5
  81. package/skills/teamsmith/tests/fixtures/delivery-truth-real/__pycache__/judge-second.cpython-313.pyc +0 -0
@@ -69,6 +69,7 @@ SKILL_DIR="$(cd -P "$SELF_DIR/.." && pwd)"
69
69
  REPO_ROOT="$(cd -P "$SKILL_DIR/../.." && pwd)"
70
70
  # shellcheck source=lib/tmp-root.sh
71
71
  . "$SELF_DIR/lib/tmp-root.sh"
72
+ . "$SELF_DIR/lib/main-team-fingerprint.sh"
72
73
 
73
74
  SELECT=""; BREAK=""; KEEP=0
74
75
  while [ $# -gt 0 ]; do
@@ -150,19 +151,14 @@ seg_ran() { TMUX_RAN=$((TMUX_RAN + 1)); }
150
151
  # ── 反向守卫(只看夹具 cwd):真项目 state 里不许出现带本夹具根的日志行 ─────────────────────────
151
152
  REAL_LOG="$REPO_ROOT/.pi/team/state/tmux-calls.log"
152
153
 
153
- # ── 隔离断言(任务书 3.1):真实仓库的账本面(inbox / state)跑前跑后逐文件 sha256 对比 ──────
154
- # 位置在这一行之前:任何夹具动作都不许在这些面上留痕;泄漏(新建/修改/删除)必红。
155
- # (夹具只在自己的检出里跑 —— 活团队的主检出里 PM/pulse 自己就在写这些文件,那是另一条车道;
156
- # 本 worktree 连 .pi/team/ 都没有时,这条退化成「仍然不存在」,报告里如实写明。)
154
+ # ── 隔离断言:本检出的 inbox / state;活团队的具名运行日志允许变化(P426)──────────────────
155
+ # 复用主项目指纹的路径规则,不自建排除表;inbox 与未登记的 state 子目录仍逐文件判变。
156
+ # 本 worktree 没有 state 时,真实现场只证明它仍未出现;非空运行中的对照由 isolation-ledger.sh 覆盖。
157
157
  REAL_INBOX="$REPO_ROOT/docs/team/inbox"; REAL_STATE="$REPO_ROOT/.pi/team/state"
158
- ledger_manifest() { # <目录…> → 每行 "<相对路径>\t<sha256>";目录不存在 → 无输出
159
- local d f
160
- for d in "$@"; do
161
- [ -d "$d" ] || continue
162
- while IFS= read -r -d '' f; do
163
- printf '%s\t%s\n' "${f#"$REPO_ROOT"/}" "$(sha256sum "$f" 2>/dev/null | awk '{print $1}')"
164
- done < <(find "$d" -type f -print0 2>/dev/null | LC_ALL=C sort -z)
165
- done
158
+ ledger_manifest() { # <inbox 目录> <state 目录> → 共用指纹所用的 ./inbox、./state 路径空间
159
+ { main_team_snapshot "$1" | awk '{sub(/^\.\//, "./inbox/"); print}'
160
+ main_team_snapshot "$2" | awk '{sub(/^\.\//, "./state/"); print}'
161
+ } | sort -t "$(printf '\t')" -k1,1
166
162
  }
167
163
  LEDGER_BEFORE="$(ledger_manifest "$REAL_INBOX" "$REAL_STATE")"
168
164
  LEDGER_N=$(printf '%s' "$LEDGER_BEFORE" | grep -c . || true)
@@ -743,11 +739,11 @@ tmp_root_reap_all 2>/dev/null || true
743
739
 
744
740
  # ── 隔离断言(任务书 3.1):真实仓库账本面 hash + 本轮临时根 ─────────────────────────────────
745
741
  LEDGER_AFTER="$(ledger_manifest "$REAL_INBOX" "$REAL_STATE")"
746
- if [ "$LEDGER_BEFORE" = "$LEDGER_AFTER" ]; then
747
- ok "隔离:真实仓库账本面未被改动(docs/team/inbox + .pi/team/state,$LEDGER_N 个文件逐一 sha256 相同)"
742
+ LEDGER_CHANGES="$(main_team_violations <(printf '%s\n' "$LEDGER_BEFORE") <(printf '%s\n' "$LEDGER_AFTER"))"
743
+ if [ -z "$LEDGER_CHANGES" ]; then
744
+ ok "隔离:真实仓库 inbox 与非遥测 state 未被改动(快照 $LEDGER_N 个文件;显式排除共用白名单中的运行日志)"
748
745
  else
749
- bad "隔离:真实仓库账本面被改动(夹具漏钉了目标?)—— 差异:"
750
- diff <(printf '%s\n' "$LEDGER_BEFORE") <(printf '%s\n' "$LEDGER_AFTER") 2>/dev/null | sed 's/^/ /' || true
746
+ bad "隔离:真实仓库 inbox 或非遥测 state 被改动:$(printf '%s' "$LEDGER_CHANGES" | tr '\n' ' ')"
751
747
  fi
752
748
  ROOTS_AFTER="$(ls -d "$(tmp_root_base)"/teamsmith-tmux-identity-leak-* 2>/dev/null | wc -l | tr -d ' ')"
753
749
  if [ "${TEAM_TMP_KEEP:-0}" = "1" ]; then
@@ -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.5"
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).