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
@@ -335,7 +335,7 @@ cmd.watch.arg.--once 只跑一拍就退出。
335
335
  cmd.watch.arg.--interval 每隔这么多秒跑一次,而不是只跑一次。
336
336
  cmd.watch.arg.--ui 显示可交互面板,而不是文本输出。
337
337
  cmd.standby.title 告诉巡检"暂时不需要人"
338
- cmd.standby.what 记下"PM 停工"这件事:巡检不再叫醒它,期间到达的一切照旧写进巡检日志。只有人能把它关掉,所以 agent 不能自己悄悄醒来。
338
+ cmd.standby.what 记下"PM 停工"这件事:巡检不再叫醒它,期间到达的一切照旧写进巡检日志。只有人能把它关掉,所以 agent 不能自己悄悄醒来。`standby migrate` 把旧版本记下的停工搬进现在的记录;重跑一遍不会改变什么。
339
339
  cmd.standby.when 工作卡在一个人身上时用它,或者你希望积压等一个人而不是等 PM 时用它。
340
340
  cmd.standby.example team standby on --reason "等用户定接口"
341
341
  cmd.standby.read 状态目录与巡检日志
@@ -343,7 +343,7 @@ cmd.standby.write 状态目录
343
343
  cmd.standby.see `team pulse`、`team digest`
344
344
  cmd.standby.arg.--reason PM 为什么停工;写下来,下一个会话才知道。
345
345
  cmd.remind.title 给本项目记一条定时提醒
346
- cmd.remind.what 把一条提醒记进 teamsmith 的项目状态:完整正文、什么时候到期、谁创建的。`list` 打印还在等的提醒和它们的到期时间,`show` 打印一条的全部内容,`cancel` 取消一条还没被送去投递的提醒。你看到的状态都是每次读取时从那条记录派生出来的,不另存一份。这一版只负责记录、查看和取消:到期的提醒显示为 derived-due,但还不会叫醒 PM。
346
+ cmd.remind.what 把一条提醒记进 teamsmith 的项目状态:完整正文、什么时候到期、谁创建的。`list` 打印还在等的提醒和它们的到期时间,`show` 打印一条的全部内容,`cancel` 取消一条还没被冻结成批次的提醒,`resolve` 确认一整批无法证实送达的提醒(必须显式给 `--ack-unknown`;它不重发)。巡检到点把提醒入队,PM 会话把它作为一条完整消息收到;真的被叫醒时才退出待命一次。你看到的状态都是每次读取时从那条记录派生出来的,不另存一份。
347
347
  cmd.remind.when 要把一件事留到以后再处理、又不想一直挂着会话或靠记性重来时用它。
348
348
  cmd.remind.example team remind add --after 20m --message "看一下构建"
349
349
  cmd.remind.read 项目状态快照与状态根定位器
@@ -357,6 +357,7 @@ cmd.remind.arg.--key 这条逻辑提醒的名字。只要还有一条未结束
357
357
  cmd.remind.arg.--task 这条提醒属于哪个任务或任务书,记录里因此能看出它是关于什么的。
358
358
  cmd.remind.arg.--all 连已经结束的提醒(保留的历史)一起打印,最新的在前。
359
359
  cmd.remind.arg.--json 把记录按 JSON 打印,不打印表格。
360
+ cmd.remind.arg.--ack-unknown 确认这一批提醒无法证实是否送达:关闭整批、烧掉它那一次自动退出待命的权利,并且不重发。没有这个参数 `resolve` 一律拒绝。
360
361
  cmd.up.title 搭好台子并把 PM 拉起来
361
362
  cmd.up.what 缺什么就建什么:项目的 session 与窗口,然后在它自己的窗口里启动 PM,默认接着这个项目上一场会话,除非你要一场新的。它只负责 PM,不动席位。
362
363
  cmd.up.when 重启之后用它,或者在 session 丢了、团队该在同一个项目里继续干活时用它。
@@ -469,21 +470,20 @@ cmd.gl.example team gl
469
470
  cmd.gl.read 不读任何东西
470
471
  cmd.gl.write 不写任何东西
471
472
  cmd.gl.see `team gh`、`team pr`
472
- cmd.mark-loaded.title 记下这个会话加载的是哪个版本
473
- cmd.mark-loaded.what 把本会话使用的 skill 版本写下来,工具据此区分"会话是旧的"还是"会话是新的"。
474
- cmd.mark-loaded.when 会话开头跑一次,重载之后再跑一次。
475
- cmd.mark-loaded.example team mark-loaded --version 0.2.0
476
- cmd.mark-loaded.read 装在机器上的 skill
477
- cmd.mark-loaded.write 已加载版本的记录
478
- cmd.mark-loaded.see `team version`、`team reload`
479
- cmd.mark-loaded.arg.--version 记这个版本,而不是磁盘上找到的那个。
473
+ cmd.mark-loaded.title 已移除的版本记录
474
+ cmd.mark-loaded.what 这个命令以前把「本会话加载的是哪个 skill 版本」写进 state。那份记录只有人手动写,没人写就停在上一版,它报出来的旧会话多数是误报。现在它被拒绝,同一个问题由工具已有的事实回答。
475
+ cmd.mark-loaded.when 只在想看替代做法时跑:PM 进程启动时刻与 skill 文件最近改动时刻的比较。
476
+ cmd.mark-loaded.example team mark-loaded
477
+ cmd.mark-loaded.read 不读任何东西
478
+ cmd.mark-loaded.write 不写任何东西
479
+ cmd.mark-loaded.see `team version --check`、`team doctor`
480
480
  cmd.version.title 磁盘上、skill 里和本会话各是什么版本
481
481
  cmd.version.what 打印装在机器上的 skill 版本、skill 文件里写的版本、变更史的开头,以及本会话加载的版本。带 check 参数时它给结论,而不是列清单。
482
482
  cmd.version.when 某个命令的行为跟本会话 skill 描述的不一样时用它,长会话开头也用它。
483
483
  cmd.version.example team version --check
484
484
  cmd.version.read 装在机器上的 skill、变更史与会话记录
485
485
  cmd.version.write 不写任何东西
486
- cmd.version.see `team changelog`、`team reload`、`team mark-loaded`
486
+ cmd.version.see `team changelog`、`team reload`
487
487
  cmd.version.arg.--check 只回答"本会话的 skill 是不是最新的",而不是把每个版本都打出来。
488
488
  cmd.changelog.title skill 改了什么
489
489
  cmd.changelog.what 打印 skill 的变更史,最新的在前;可以只看某个版本之后的部分。
@@ -499,5 +499,5 @@ cmd.reload.when skill 升级之后、想让当前会话看到新文件时用它
499
499
  cmd.reload.example team reload
500
500
  cmd.reload.read 重载请求的记录
501
501
  cmd.reload.write 重载请求的记录
502
- cmd.reload.see `team version`、`team mark-loaded`
502
+ cmd.reload.see `team version`
503
503
  cmd.reload.arg.--done 重载真的发生之后,把这个请求标记成已处理。
@@ -131,9 +131,10 @@ case "$CMD" in
131
131
  watchdog-status) team_cmd_watchdog_status "$@" ;; # 同上
132
132
  standby) team_cmd_standby "$@" ;;
133
133
  remind) team_cmd_remind "$@" ;;
134
+ __remind-recover) team_remind_recovery "$@" ;; # 内部:Pulse 的 prompt-free Reminder-only 恢复(不进 help)
134
135
  meeting) team_cmd_meeting "$@" ;;
135
136
  version) if [ "${1:-}" = "--check" ] || [ "${1:-}" = "check" ]; then team_cmd_version_check "$@"; else team_cmd_version_brief "$@"; fi ;;
136
- mark-loaded) team_cmd_mark_loaded "$@" ;;
137
+ mark-loaded) team_err "mark-loaded 已移除:会话新旧由推导得出——PM 进程启动时刻 vs skill 文件的最近改动时刻,跑 $TEAM_CLI version --check 或 $TEAM_CLI doctor"; exit 2 ;;
137
138
  reload) team_cmd_reload "$@" ;;
138
139
  changelog) team_cmd_changelog "$@" ;;
139
140
  smoke|test) team_cmd_smoke "$@" ;;
@@ -146,8 +147,8 @@ case "$CMD" in
146
147
  team_dim " 有 PR:先 gh pr merge --squash --delete-branch <PR>,再 git -C $TEAM_MAIN_ROOT fetch origin $TEAM_PROTECTED_BRANCH && git -C $TEAM_MAIN_ROOT merge --ff-only FETCH_HEAD"
147
148
  team_dim " 收尾:代码确认进 $TEAM_PROTECTED_BRANCH 之后再 $TEAM_CLI board set <ID> done"
148
149
  team_dim " 步骤全文:$TEAM_SKILL_DIR/SKILL.md「git 与 forge」一节"
149
- if [ -n "$(team_loaded_version 2>/dev/null || true)" ]; then
150
- team_dim " 你这一会话加载的是 v$(team_loaded_version):在 Pi 里输入 /reload 刷新 skill 描述"
150
+ if [ -n "$(team_skill_stale_line 2>/dev/null || true)" ]; then
151
+ team_dim " $(team_skill_stale_line):在 Pi 里输入 /reload 刷新 skill 描述"
151
152
  fi
152
153
  exit 2 ;;
153
154
  gh|gl)
@@ -14,7 +14,7 @@ inventoried and preserved outside first -- the PM's job, recipe in `{{SKILL_DIR}
14
14
 
15
15
  | Role | Owns | Must not |
16
16
  |---|---|---|
17
- | PM | Briefs / roadmap / decision log, dispatch, independent verification, merging, wrap-up | Treat "the agent says it passed" as evidence |
17
+ | PM | Briefs / roadmap / decision log, dispatch, evidence acceptance, merging, wrap-up | Treat "the agent says it passed" as evidence; execute verification or archive gates |
18
18
  | agent:<name> | Exactly the brief, tests and reports, opening PR/MRs | push `main`, force-push, merge PR/MRs, touch other people's directories |
19
19
 
20
20
  Before starting, in this order: this file (especially this section), your own thread
@@ -31,9 +31,11 @@ the spec root). Read the change's proposal in `openspec/changes/<id>/` and the c
31
31
  lists, spec copies or design sections in task briefs or docs -- if it must hold, it goes into a spec.
32
32
 
33
33
  A change runs as **five phases, one brief and one owner each**: `opsx-explore`, then `opsx-propose` (planning only);
34
- a dev runs `opsx-apply`; a **different** agent runs `opsx-verify`; the PM runs `opsx-archive`. Two hard rules: **no
35
- `apply` brief before the PM's proposal review (`{{DOCS_DIR}}/reviews/<change>-proposal.md`) is ACCEPTED**, and no
36
- agent verifies its own work; the PM archives only after independent verification **and the user's confirmation**.
34
+ a dev runs `opsx-apply`; a **different** agent runs `opsx-verify`; a non-implementer worker (possibly that verifier) runs
35
+ `opsx-archive`. Two hard rules: **no `apply` brief before the PM's proposal review
36
+ (`{{DOCS_DIR}}/reviews/<change>-proposal.md`) is ACCEPTED**, and no agent verifies its own work. The PM dispatches and
37
+ accepts archive only after the same verifier's merged-revision evidence passes and the user confirms, or the PM records
38
+ a narrowly qualified proxy confirmation (small, reversible and already covered by the approved approach).
37
39
  Phase names go in the brief's `phase:` line; flags, phase-command source and pinned-toolchain caveat are in
38
40
  `{{SKILL_DIR}}/references/openspec.md`.
39
41
 
@@ -54,12 +56,11 @@ last three take `--force` + one audited line). `team change status <id>` shows t
54
56
  + report written + branch settled), **hard-blocked** (notify the PM + `BLOCKED:` in the report), or
55
57
  **suspended on background jobs** (this session's jobs still running, every step that does not depend on them
56
58
  done; the turn's last line names every awaited job id). The lane rule is the suspend default: `team_bg_run`
57
- starts a long job and the turn ends -- the completion wake-up is the normal harvest point -- and in-turn waiting
58
- is the bounded exception, only inside the inline-wait budget (about 2 minutes), when the result blocks the next
59
- step and nothing else can advance. A previous session's wake-ups died with its process: find its jobs on disk
59
+ starts a long job and the turn ends; the completion wake-up is the normal harvest point. Do not wait inside the
60
+ turn (`sleep`, `team wait`, a blocking harvest): the user cannot type while the PM waits. A previous session's wake-ups died with its process: find its jobs on disk
60
61
  (`state/bg.log`, `team bg list`) before awaiting or re-running them (`{{SKILL_DIR}}/references/workflows.md` §E2).
61
- - **Never claim tests passed without having run them.** The PM re-runs in an independent worktree; a false report
62
- fails the task.
62
+ - **Never claim tests passed without having run them.** The assigned non-implementer verifier runs the gates on the
63
+ PM-prepared independent checkout; the PM accepts that evidence rather than executing the gates. A false report fails the task.
63
64
  - Never write tokens/secrets into code, config, logs or commit messages; never read credential files
64
65
  (e.g. `~/.pi/agent/auth.json`).
65
66
  - **A brief declares one task category; models belong to the project, not to your seat.** The `category:` line
@@ -89,8 +90,9 @@ claim attached to a selected run. Review queues on the gate lock before its own
89
90
  Implement in scope, small commits, run the brief's acceptance commands, then write
90
91
  `{{DOCS_DIR}}/reports/<ID>-<agent>.md` with the real commands and output tails (plus flip evidence for a defect
91
92
  fix) and settle the branch: a local branch stays local, and a remote push/PR follows only the PM's authorized
92
- route. The PM verifies in an independent worktree, merges itself, sets the board and closes the task. Messages are
93
- not deliverables -- evidence lives in `{{DOCS_DIR}}/reports/`, `{{DOCS_DIR}}/reviews/` and the commits (recipes:
93
+ route. A non-implementer verifier runs `team review` on the PM-prepared independent checkout and, after the PM merges,
94
+ resumes on the merged SHA. The PM accepts that evidence, merges, and only then sets the board and closes the task.
95
+ Messages are not deliverables -- evidence lives in `{{DOCS_DIR}}/reports/`, `{{DOCS_DIR}}/reviews/` and the commits (recipes:
94
96
  `{{SKILL_DIR}}/references/workflows.md` §B dispatch, §E verification, §F merge). `{{DOCS_DIR}}/inbox/<agent>.md`
95
97
  and the knock on `{{SESSION}}:{{PM_WINDOW}}` happen at turn end automatically. Blocked, or someone else's bug:
96
98
  `bash {{SKILL_DIR}}/scripts/team notify <agent> "<one line>"` and a report that says `BLOCKED:`.
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## D1 · {{TODAY}} · 决定 — 采用 teamsmith 的多 Agent 协作流程
10
10
 
11
- - **决策**:Issue → agent worktree/分支 → 报告 + 门禁 → PM 独立复验 → squash 合并。
11
+ - **决策**:Issue → agent worktree/分支 → 报告 + 门禁 → verifier 独立复验 → PM 审阅接受 → squash 合并。
12
12
  - **理由**:可追溯、并行不冲突、合并权集中在 PM(质量门禁不被绕过)。
13
- - **影响**:agent 不得 push 保护分支 / 不得 merge;PM 必须真的跑复验,不能只看报告。
13
+ - **影响**:agent 不得 push 保护分支 / 不得 merge;PM 必须审阅复验证据与 diff,不能只看报告,也不得以自己执行替代委派。
14
14
 
15
15
  ## D2 · {{TODAY}} · 暂定 — <技术栈/选型类决策>
16
16
 
@@ -6,7 +6,7 @@
6
6
  | Path | Owner | Purpose |
7
7
  |---|---|---|
8
8
  | `<path>/**` | agent:<name> | <what this directory is responsible for> |
9
- | `docs/**` | PM | Briefs / reports / verification / decisions |
9
+ | `docs/**` | PM | Briefs / reports / verification / decisions. Narrow review exception: only `team review` may write the brief-named `docs/team/reviews/<ID>.md` and `<ID>-verify.log` in the main checkout; the verifier's own report stays on its task branch, and no other manual main-checkout write is granted |
10
10
  | `.pi/**`, `AGENTS.md` | PM | Team protocol and configuration |
11
11
  | `scripts/team*`, root config (lockfile/tsconfig, ...) | PM | New dependencies → raise them in the report |
12
12
 
@@ -25,5 +25,5 @@
25
25
  1. Need a new directory? The PM updates this file (and references it in the brief).
26
26
  2. Temporary borrowing (e.g. one package handled by another agent for a phase) must be marked **temporary** in the
27
27
  brief together with the hand-over condition.
28
- | `openspec/specs/**` · `openspec/config.yaml` | PM | 规格与配置是账本的一部分 |
29
- | `openspec/changes/<change>/**` | 该 change 当前阶段的 owner(任务书明授) | propose 归提案者;apply 归实现者;archive 由 PM 执行 |
28
+ | `openspec/specs/**` · `openspec/config.yaml` | PM | 规格与配置是账本的一部分;archive 仅获任务书逐个点名的 capability spec 临时写权,不含 config |
29
+ | `openspec/changes/<change>/**` | 该 change 当前阶段的 owner(任务书明授) | propose 归提案者;apply 归实现者;archive 由非实现者 worker 在自己的 worktree/task branch 执行,仅写任务书枚举的 change、归档目标与报告 |
@@ -8,7 +8,7 @@
8
8
 
9
9
  | Role | Where | Owns | Red lines |
10
10
  |---|---|---|---|
11
- | PM | tmux `{{SESSION}}:pm` | Milestones/board/briefs/decisions; dispatch; independent verification; merging; wrap-up | Never let an agent's own account replace evidence; never write tokens into any artifact |
11
+ | PM | tmux `{{SESSION}}:pm` | Milestones/board/briefs/decisions; dispatch; evidence acceptance; merging; wrap-up | Never let an agent's own account replace evidence or execute verification/archive gates; never write tokens into any artifact |
12
12
  | agent:<name> | `{{WORKTREES_DIR}}/<name>` | Implementation + tests + report + the branch it was given | Never push the protected branch, force-push, merge, or change directories it does not own |
13
13
 
14
14
  ## Lifecycle of a task
@@ -18,14 +18,16 @@
18
18
  3. **agent**: implement in the worktree; commit in small steps; run the acceptance commands; write the report
19
19
  `{{DOCS_DIR}}/reports/<ID>-<a>.md`; settle the branch (local: the commits stay on the task branch; remote: the
20
20
  PM's authorized push/PR route). The PM is notified automatically when the turn ends (inbox + tmux wake-up).
21
- 4. **PM**: `team digest` for pending work → `team review <ID> --dir <independent checkout>` (run gates, read the
22
- diff, write `{{DOCS_DIR}}/reviews/<ID>.md`).
23
- 5. **Pass** → the PM runs git itself: squash-merge (with a PR, merge it first, then `fetch && merge --ff-only`) →
24
- `team board set <ID> done` → `team close <ID>`. **Fail** → send the concrete failure evidence back.
21
+ 4. **PM**: `team digest` for pending work → prepare an independent checkout and dispatch a non-implementer verifier.
22
+ **Verifier**: `team review <ID> --dir <checkout>` runs the gates and writes the named central record/log; the PM reads
23
+ the evidence and diff without running the gates.
24
+ 5. **Pass** → the PM runs git itself: squash-merge (with a PR, merge it first, then `fetch && merge --ff-only`) → the
25
+ same verifier resumes on the merged SHA → the PM accepts passing evidence → `team board set <ID> done` →
26
+ `team close <ID>`. **Fail** → send the concrete failure evidence back.
25
27
 
26
28
  ## Hard rules
27
29
 
28
- 1. Never claim the acceptance commands passed without having run them. The PM re-runs independently; a false report fails the task.
30
+ 1. Never claim the acceptance commands passed without having run them. The assigned verifier re-runs independently; the PM accepts the evidence; a false report fails the task.
29
31
  2. One long-lived worktree per agent (sessions are keyed by cwd; moving the path makes them un-resumable); each task gets its own branch inside it.
30
32
  3. Commit in small steps -- never one dump at the end; include the task ID and an `Agent: <name>` trailer.
31
33
  4. Only change directories assigned to you in `{{DOCS_DIR}}/OWNERSHIP.md`; cross-directory needs → write `BLOCKED:` in the report.
@@ -36,8 +38,8 @@
36
38
  ## Gates
37
39
 
38
40
  - Project gates: `{{GATES}}`
39
- - Verification uses an **independent checkout**: the PM prepares it (`git worktree add --detach`), then
40
- `team review <ID> --dir <checkout>` runs the gates and writes the evidence.
41
+ - Verification uses an **independent checkout**: the PM prepares it (`git worktree add --detach`), then the assigned
42
+ non-implementer verifier runs `team review <ID> --dir <checkout>` and the tool writes the named central record/log.
41
43
  - A brief may require stricter commands than the project gates; the brief wins. A selected run says which sections it
42
44
  did not run instead of claiming the full suite.
43
45
  - **Correctness on every change**: `openspec validate --all --strict && bash {{SKILL_DIR}}/tests/smoke.sh </dev/null`.
@@ -59,14 +61,17 @@
59
61
  ## Specs (OpenSpec)
60
62
 
61
63
  Specs and change proposals live in `openspec/` (required dependency). `openspec validate --all --strict` is part of the
62
- gate. `openspec change show <id>` reads a proposal, and the PM archives a change (`openspec archive -y <id>`) only
63
- after independent verification has landed and the user confirmed. No parallel spec system: a product promise goes into
64
- a spec, reasoning or guidance into `references/`.
64
+ gate. `openspec change show <id>` reads a proposal. The PM dispatches archive to a non-implementer worker only after
65
+ the same verifier's merged-revision evidence passes and the user confirms, or the PM records a proxy confirmation only
66
+ for a small, reversible change already covered by the approved approach. The worker runs `openspec archive -y <id>` on
67
+ its own authorized task branch. No parallel spec system: a
68
+ product promise goes into a spec, reasoning or guidance into `references/`.
65
69
 
66
70
  A change runs as **five phases, one brief and one owner each**: `opsx-explore` (an explorer) → `opsx-propose` (the same
67
- explorer, planning only) → `opsx-apply` (a dev) → `opsx-verify` (an **independent** agent) → `opsx-archive` (the PM).
68
- Two hard rules: no `apply` brief before the PM's proposal review (`{{DOCS_DIR}}/reviews/<change>-proposal.md`) is
69
- **ACCEPTED**, and no agent verifies its own work; the PM archives only after independent verification and the user's confirmation.
71
+ explorer, planning only) → `opsx-apply` (a dev) → `opsx-verify` (a **different** agent) → `opsx-archive` (a
72
+ non-implementer worker, possibly that verifier). Two hard rules: no `apply` brief before the PM's proposal review
73
+ (`{{DOCS_DIR}}/reviews/<change>-proposal.md`) is **ACCEPTED**, and no agent verifies its own work. The PM dispatches and
74
+ accepts archive only after the same verifier's merged-revision evidence and valid confirmation.
70
75
  Phase table, gates and the PM's review checklist: `{{SKILL_DIR}}/references/openspec.md`.
71
76
 
72
77
  **The change is the assignment unit** (`1 change : N tasks`, `1 task : 0..1 change`): the brief's header is the
@@ -20,8 +20,8 @@
20
20
  - Branch mode: `{{BRANCH_MODE}}`; agent worktrees: `{{WORKTREES_DIR}}/<agent>` (**never move them**: sessions are keyed by cwd).
21
21
 
22
22
  ### Working rules (the creed; cross-project)
23
- - Deliverables must be independently verifiable: an agent's report is a claim; the PM's gates on an independent
24
- checkout are the evidence.
23
+ - Deliverables must be independently verifiable: an agent's report is a claim; a non-implementer verifier runs the
24
+ gates on the PM-prepared independent checkout, and the PM accepts that evidence without executing the gates.
25
25
  - Status is a promise: `done` only after the code really landed on the protected branch; on failure keep the old state.
26
26
  - Govern less to be reliable: the skill does not wrap git/forge, the PM does not implement, the pulse only wakes.
27
27
  - Failure is information: a false green is worse than nothing; gates need hard timeouts; skips must be declared.
@@ -30,8 +30,9 @@ If the pulse restarted you: read the tail of `{{DOCS_DIR}}/../.pi/team/state/wat
30
30
 
31
31
  ## Your creed (on demand: `{{SKILL_DIR}}/references/philosophy.md`)
32
32
 
33
- A report is a claim and your own verification is the evidence; a false green is worse than nothing; disk beats memory
34
- (you will be restarted), so progress lands in the ledger, never only in the conversation.
33
+ A report is a claim and the assigned non-implementer verifier's execution is the evidence; your acceptance is a separate
34
+ review of that evidence and the diff. A false green is worse than nothing; disk beats memory (you will be restarted), so
35
+ progress lands in the ledger, never only in the conversation.
35
36
 
36
37
  ## What you write to the user
37
38
 
@@ -76,20 +77,30 @@ recovery entry only -- never the daily default. See `{{SKILL_DIR}}/references/pr
76
77
  ## Your loop
77
78
 
78
79
  Specs live in OpenSpec: a brief names the change id and the scenarios it must satisfy; `openspec validate --all
79
- --strict` before dispatching, and `openspec archive -y <change>` only after the code landed and the review record
80
- exists (`{{SKILL_DIR}}/references/openspec.md`).
80
+ --strict` before dispatching. After the same verifier accepts the merged revision and valid confirmation is recorded,
81
+ dispatch a non-implementer worker to run `openspec archive -y <change>` on its own authorized task branch
82
+ (`{{SKILL_DIR}}/references/openspec.md`).
81
83
 
82
84
  1. **Model it**: `team status` / `team board ls`, and `{{DOCS_DIR}}/ROADMAP.md`.
83
85
  2. **Dispatch**: write a self-contained brief (context / deliverables / boundaries / copy-pasteable acceptance
84
86
  commands), then `team dispatch <agent> <ID> <taskfile>`; check `team ps` first when capacity is tight.
85
- 3. **Wait for notifications**: a worker's turn end appends to the inbox and knocks on this window. Do not poll their
86
- screens.
87
- 4. **Verify**: `team review <ID> --dir <independent checkout>` (gates + reading the diff). **The agent's report is a
88
- claim; your verification is the evidence.** Whether to resume a stopped agent (its `pi` exited) is your call:
89
- `team resume --dry-run`, then `team resume`.
87
+ 3. **Wait with notifications first and files as the authority**: a worker's turn end appends to the inbox and
88
+ knocks on this window. Before repeating an unchanged waiting report, reconcile `team digest`, BOARD, the
89
+ task-branch report and the task worktree's `git log`/`status`. Read a committed report without switching
90
+ branches: `git show <task-branch>:{{DOCS_DIR}}/reports/<ID>-<agent>.md`; an uncommitted report is a draft.
91
+ An old tip, no new notice or a merged line does not prove unfinished work. A committed final report enters the
92
+ existing acceptance route; a live job without one stays on the wait/harvest route. Do not poll agent screens
93
+ or rerun the assigned non-implementer verifier's acceptance tests yourself.
94
+ 4. **Delegate verification**: prepare a clean detached checkout, then dispatch a non-implementer verifier to run
95
+ `team review <ID> --dir <independent checkout>`. The tool writes only the brief-named central review record/log;
96
+ the verifier keeps its own report on its branch. **The agent's report is a claim; the verifier's execution is the
97
+ evidence; your evidence/diff review is acceptance, not another gate run.** Whether to resume a stopped agent (its
98
+ `pi` exited) is your call: `team resume --dry-run`, then `team resume`.
90
99
  5. **Merge / wrap up** (git and forge are yours): `git -C <root> merge --squash <branch>` + commit + push (with a
91
- PR/MR, merge it first and then `fetch && merge --ff-only`) -> `team board set <ID> done` -> `team close <ID>`.
92
- Mark `done` only when the work really landed on the protected branch: `blocked` beats a pretty status. On failure:
100
+ PR/MR, merge it first and then `fetch && merge --ff-only`) -> resume the same verifier on a clean checkout pinned
101
+ to the merged SHA -> accept its passing gates and OpenSpec assessment -> `team board set <ID> done` -> `team close <ID>`.
102
+ `team review --post-merge` is inspection only and never substitutes for that verifier run. Mark `done` only after
103
+ accepted merged-revision evidence: `blocked` beats a pretty status. On failure:
93
104
  `team thread <agent> "<failure evidence>"` + `team say <agent> "<one-line instruction>"`.
94
105
  6. **Report**: the code with its short name, the conclusion, where the evidence is, the risks and the next step;
95
106
  decisions with their rationale and impact in `{{DOCS_DIR}}/DECISIONS.md`. With magic-context, durable rules go to
@@ -97,11 +108,18 @@ exists (`{{SKILL_DIR}}/references/openspec.md`).
97
108
 
98
109
  **Background jobs and turn endings.** A turn ends in one of three states: **delivered**, **hard-blocked** (blocked on
99
110
  a human: record it and stand down), or **suspended on background jobs** with every awaited id named on its last line.
100
- The lane default is the suspension: `team_bg_run` starts a long job (a gate, a build) and you **let the turn end**;
101
- the completion wake-up is the normal harvest point, and `team_bg_wait <id>` then brings back the exit code and the log
102
- tail. In-turn waiting is the bounded exception, only when all three hold: the job is expected to finish within the
103
- inline-wait budget (about 2 minutes), its result blocks your immediate next step, and no other task work can advance
104
- meanwhile (`{{SKILL_DIR}}/references/workflows.md` §E2).
111
+ Do not run long work in your own session — not a full gate, not a long test matrix, not a bulk refactor. Verification
112
+ and archive execution belong to their assigned non-implementer workers; moving either into a PM-owned `team_bg_run`
113
+ does not satisfy delegation. Your session does routing, judgement, evidence review and acceptance; `team_bg_run`
114
+ remains available for unrelated authorized work. A busy PM cannot answer the user and cannot be steered.
115
+
116
+ A verifier runs its long gates in its own background lane; other long authorized commands also run in the background.
117
+ Do not wait inline (`sleep`, `team wait`, a blocking harvest): end the turn and come back on the completion wake-up or
118
+ a reminder.
119
+
120
+ `team_bg_run` starts a long job (a gate, a build) and you **let the turn end**; the completion wake-up is the normal
121
+ harvest point, and `team_bg_wait <id>` then brings back the exit code and the log tail. Harvest after the wake rather
122
+ than polling it.
105
123
 
106
124
  The pulse is a metronome that wakes you only when there is work, not a daemon. If there is genuinely nothing to push,
107
125
  or you are blocked on a human (authorization, a decision, external information), write the conclusion into
@@ -142,8 +160,8 @@ current bytes, so changing that target can affect other readers without any inst
142
160
  not read other people's session files, do not message windows in other tmux sessions (the CLI rejects cross-session
143
161
  `say`/`notify`). Communication with other projects or PMs goes through the user or `team meeting`; register new or
144
162
  temporary windows with `team add-agent` instead of creating them by hand.
145
- - **Do not implement yourself** (except small fixes found during verification); your output is briefs, verification,
146
- merges and decisions. The protected branch `{{PROTECTED_BRANCH}}` is yours to advance; agents may only push their own
163
+ - **Do not implement yourself** (except small fixes found during evidence review); your output is briefs, evidence
164
+ acceptance, merges and decisions, not verification or archive execution. The protected branch `{{PROTECTED_BRANCH}}` is yours to advance; agents may only push their own
147
165
  task branches. Changing shared/remote state (push, merge, PR/MR, issue) needs explicit user authorization: pass
148
166
  `--yes`.
149
167
  - The pulse is yours to run: `team pulse up` / `status` / `logs` / `down`; it checks for work every 15 minutes and only
@@ -9,6 +9,39 @@ branch: `{{BRANCH}}` PR/MR: <link or ->
9
9
  |---|---|
10
10
  | `<file>` | <what was done> |
11
11
 
12
+ ## OpenSpec assessment
13
+
14
+ For `opsx-verify`, follow the generated `.pi/skills/openspec-verify-change/SKILL.md` when present; otherwise perform
15
+ the documented equivalent review and disclose that limitation. A shell-gate PASS does not complete this assessment.
16
+ Use `N/A — <reason>` only for a genuinely non-OpenSpec task; empty placeholders are not evidence.
17
+
18
+ | Dimension | Score | Evidence |
19
+ |---|---|---|
20
+ | Completeness | <score> | <implemented tasks and requirement coverage> |
21
+ | Correctness | <score> | <requirement/scenario and red-green evidence> |
22
+ | Coherence | <score> | <design consistency and integration evidence> |
23
+
24
+ ## CRITICAL
25
+
26
+ - <Incomplete tasks, missing requirement implementations, removed requirements still implemented, or renamed behavior
27
+ no longer present; give a concrete recommendation. Write `None` only after checking.>
28
+
29
+ ## WARNING
30
+
31
+ - <Spec/design divergence or missing scenario coverage, with a recommendation; otherwise `None`.>
32
+
33
+ ## SUGGESTION
34
+
35
+ - <Pattern inconsistency or minor improvement; otherwise `None`.>
36
+
37
+ ## Final assessment
38
+
39
+ - Counts: CRITICAL <n> · WARNING <n> · SUGGESTION <n>.
40
+ - Readiness: <unresolved CRITICAL = fix before archive; otherwise state readiness only within the checks actually
41
+ completed, with noted improvements>.
42
+ - Unverified applicable checks and reasons: <every skipped/partial check and why; these prohibit an unqualified
43
+ readiness claim and must not be described as passed. Write `None` only when every applicable check ran.>
44
+
12
45
  ## Verification evidence (must have actually been run)
13
46
 
14
47
  ```