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.
- package/README.md +13 -7
- package/package.json +1 -1
- package/skills/teamsmith/CHANGELOG.md +67 -0
- package/skills/teamsmith/SKILL.md +26 -8
- package/skills/teamsmith/extension/team-notify.ts +37 -6
- package/skills/teamsmith/extension/team.ts +438 -0
- package/skills/teamsmith/references/agent-adapters.md +7 -7
- package/skills/teamsmith/references/config.md +65 -18
- package/skills/teamsmith/references/migration.md +220 -34
- package/skills/teamsmith/references/protocol.md +250 -25
- package/skills/teamsmith/references/troubleshooting.md +124 -7
- package/skills/teamsmith/references/workflows.md +66 -20
- package/skills/teamsmith/scripts/lib/cmd-agents.sh +525 -90
- package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +71 -10
- package/skills/teamsmith/scripts/lib/cmd-config.sh +562 -128
- package/skills/teamsmith/scripts/lib/cmd-death.sh +2 -15
- package/skills/teamsmith/scripts/lib/cmd-docs.sh +6 -3
- package/skills/teamsmith/scripts/lib/cmd-draft.sh +4 -4
- package/skills/teamsmith/scripts/lib/cmd-help.sh +677 -0
- package/skills/teamsmith/scripts/lib/cmd-init.sh +157 -5
- package/skills/teamsmith/scripts/lib/cmd-interrupt.sh +461 -0
- package/skills/teamsmith/scripts/lib/cmd-meeting.sh +2 -25
- package/skills/teamsmith/scripts/lib/cmd-project.sh +149 -105
- package/skills/teamsmith/scripts/lib/cmd-reap.sh +277 -0
- package/skills/teamsmith/scripts/lib/cmd-reply.sh +96 -0
- package/skills/teamsmith/scripts/lib/cmd-review.sh +188 -40
- package/skills/teamsmith/scripts/lib/cmd-status.sh +268 -30
- package/skills/teamsmith/scripts/lib/cmd-update.sh +36 -7
- package/skills/teamsmith/scripts/lib/cmd-watch.sh +634 -54
- package/skills/teamsmith/scripts/lib/common.sh +1560 -109
- package/skills/teamsmith/scripts/lib/gate-lock.sh +544 -0
- package/skills/teamsmith/scripts/monitor.mjs +34 -3
- package/skills/teamsmith/scripts/panel/README.md +22 -11
- package/skills/teamsmith/scripts/panel/draft-send.sh +11 -1
- package/skills/teamsmith/scripts/panel/panel.js +226 -224
- package/skills/teamsmith/scripts/panel/src/App.tsx +478 -184
- package/skills/teamsmith/scripts/panel/src/clipboard.ts +11 -5
- package/skills/teamsmith/scripts/panel/src/compose.ts +6 -3
- package/skills/teamsmith/scripts/panel/src/data.ts +95 -7
- package/skills/teamsmith/scripts/panel/src/layout.ts +703 -152
- package/skills/teamsmith/scripts/panel/src/main.tsx +129 -19
- package/skills/teamsmith/scripts/panel/src/settings.ts +1 -1
- package/skills/teamsmith/scripts/panel/src/strings/en.ts +76 -31
- package/skills/teamsmith/scripts/panel/src/strings/zh.ts +78 -33
- package/skills/teamsmith/scripts/panel/src/types.ts +204 -17
- package/skills/teamsmith/scripts/replies.mjs +896 -0
- package/skills/teamsmith/scripts/shim/tmux +18 -0
- package/skills/teamsmith/scripts/strings/commands.tsv +86 -0
- package/skills/teamsmith/scripts/strings/help.en.tsv +503 -0
- package/skills/teamsmith/scripts/strings/help.zh.tsv +489 -0
- package/skills/teamsmith/scripts/team +20 -6
- package/skills/teamsmith/templates/AGENTS.section.md.tmpl +23 -3
- package/skills/teamsmith/templates/BOARD.md.tmpl +2 -2
- package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +7 -3
- package/skills/teamsmith/templates/PROTOCOL.md.tmpl +17 -0
- package/skills/teamsmith/templates/config.sh.tmpl +29 -5
- package/skills/teamsmith/templates/memory-seed.md.tmpl +3 -0
- package/skills/teamsmith/templates/pm-prompt.md.tmpl +41 -1
- package/skills/teamsmith/templates/report.md.tmpl +12 -0
- package/skills/teamsmith/templates/task.md.tmpl +4 -0
- package/skills/teamsmith/tests/bg-ledger-harness.mjs +464 -40
- package/skills/teamsmith/tests/bg-ledger.sh +168 -10
- package/skills/teamsmith/tests/checkout-shape-probe.sh +3 -1
- package/skills/teamsmith/tests/config-cli.sh +320 -300
- package/skills/teamsmith/tests/death-cause.sh +5 -2
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +7 -1
- package/skills/teamsmith/tests/fixtures/p287/lint-good.sh.in +3 -0
- package/skills/teamsmith/tests/fixtures/p287/lint-hardcoded.sh.in +3 -0
- package/skills/teamsmith/tests/fixtures/p287/lint-no-ns.sh.in +3 -0
- package/skills/teamsmith/tests/fixtures/p55/flip-p49.sh +18 -6
- package/skills/teamsmith/tests/flip-m33.sh +5 -3
- package/skills/teamsmith/tests/flip-m37.sh +4 -1
- package/skills/teamsmith/tests/flip-m4.3.sh +4 -1
- package/skills/teamsmith/tests/flip-m6.3.sh +4 -1
- package/skills/teamsmith/tests/flip-m6.5.sh +4 -1
- package/skills/teamsmith/tests/flip-m7.2.sh +4 -1
- package/skills/teamsmith/tests/flip-p158.sh +2 -1
- package/skills/teamsmith/tests/flip-p210.sh +4 -1
- package/skills/teamsmith/tests/flip-p217.sh +4 -1
- package/skills/teamsmith/tests/flip-p287-lock.sh +342 -0
- package/skills/teamsmith/tests/flip-p287-name.sh +279 -0
- package/skills/teamsmith/tests/flip-p304-read-side.sh +98 -0
- package/skills/teamsmith/tests/flip-p308-skip-not-pass.sh +151 -0
- package/skills/teamsmith/tests/flip-p309-p162-deep.sh +122 -0
- package/skills/teamsmith/tests/flip-p310-lock.sh +216 -0
- package/skills/teamsmith/tests/flip-p310-socket.sh +125 -0
- package/skills/teamsmith/tests/help-surface.sh +1664 -0
- package/skills/teamsmith/tests/install-shape.sh +283 -22
- package/skills/teamsmith/tests/key-replies-pty.sh +374 -0
- package/skills/teamsmith/tests/key-replies-ui.sh +325 -0
- package/skills/teamsmith/tests/key-replies.sh +1314 -0
- package/skills/teamsmith/tests/ledger-ban.sh +9 -8
- package/skills/teamsmith/tests/ledger-claim.sh +248 -0
- package/skills/teamsmith/tests/lib/bounded-spin.sh +90 -0
- package/skills/teamsmith/tests/lib/model-policy.sh +30 -0
- package/skills/teamsmith/tests/lib/model-routing-boundary.sh +420 -0
- package/skills/teamsmith/tests/lib/model-routing-expansion.sh +155 -0
- package/skills/teamsmith/tests/lib/model-routing-flips.py +187 -0
- package/skills/teamsmith/tests/lib/model-routing-roles.sh +250 -0
- package/skills/teamsmith/tests/lib/proc-io.sh +103 -0
- package/skills/teamsmith/tests/lib/reply-fixture.sh +367 -0
- package/skills/teamsmith/tests/lib/section-guard.sh +258 -13
- package/skills/teamsmith/tests/lib/tmp-root.sh +139 -27
- package/skills/teamsmith/tests/lib/tmux-cap.sh +10 -1
- package/skills/teamsmith/tests/lib/tmux-iso.sh +39 -13
- package/skills/teamsmith/tests/loop-inventory.tsv +59 -47
- package/skills/teamsmith/tests/panel-b2.sh +107 -4
- package/skills/teamsmith/tests/panel-b3-stub.sh +139 -4
- package/skills/teamsmith/tests/panel-b3.sh +189 -29
- package/skills/teamsmith/tests/panel-choices.sh +81 -63
- package/skills/teamsmith/tests/panel-cpu.sh +3 -2
- package/skills/teamsmith/tests/panel-knobs.sh +7 -1
- package/skills/teamsmith/tests/panel-p21.sh +445 -241
- package/skills/teamsmith/tests/panel-snapshots.sh +41 -225
- package/skills/teamsmith/tests/panel-strings.mjs +33 -18
- package/skills/teamsmith/tests/perf.sh +122 -31
- package/skills/teamsmith/tests/pm-box-real.sh +1 -1
- package/skills/teamsmith/tests/pulse-nudge-key.sh +1 -1
- package/skills/teamsmith/tests/routes.sh +364 -109
- package/skills/teamsmith/tests/seat-interrupt.sh +1002 -0
- package/skills/teamsmith/tests/seat-visibility.sh +675 -0
- package/skills/teamsmith/tests/section-budgets.tsv +26 -12
- package/skills/teamsmith/tests/section-guard.sh +6 -1
- package/skills/teamsmith/tests/section-needs-audit.sh +24 -7
- package/skills/teamsmith/tests/section-paths.tsv +42 -26
- package/skills/teamsmith/tests/section-select.sh +90 -7
- package/skills/teamsmith/tests/slash-team-e2e.sh +323 -0
- package/skills/teamsmith/tests/slash-team.sh +617 -0
- package/skills/teamsmith/tests/smoke.sh +3762 -628
- package/skills/teamsmith/tests/snapshots/zh-dark-120-detail.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-120-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-120.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-dark-160-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-160.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-dark-59-detail.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-dark-59-p4.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-dark-59.txt +5 -5
- package/skills/teamsmith/tests/snapshots/zh-dark-99-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-dark-99.txt +5 -5
- package/skills/teamsmith/tests/snapshots/zh-light-120-detail.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-120-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-120.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-light-160-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-160.txt +9 -9
- package/skills/teamsmith/tests/snapshots/zh-light-59-detail.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-light-59-p4.txt +1 -1
- package/skills/teamsmith/tests/snapshots/zh-light-59.txt +5 -5
- package/skills/teamsmith/tests/snapshots/zh-light-99-p4.txt +2 -2
- package/skills/teamsmith/tests/snapshots/zh-light-99.txt +5 -5
- package/skills/teamsmith/tests/task-header-model.sh +2 -1
- package/skills/teamsmith/tests/task-model-routing.sh +1511 -0
- package/skills/teamsmith/tests/tmp-hygiene.sh +782 -45
- package/skills/teamsmith/tests/tmux-identity-leak.sh +773 -0
- package/skills/teamsmith/tests/tmux-lint-legacy.txt +12 -18
- package/skills/teamsmith/tests/upgrade-recipe.sh +537 -0
- package/skills/teamsmith-init/SKILL.md +43 -43
- package/skills/teamsmith-init/references/bootstrap.md +8 -6
- package/skills/teamsmith-init/templates/bootstrap-prompt.md.tmpl +9 -5
|
@@ -14,7 +14,7 @@ each** — the reasoning, owners and gates are in [openspec.md](openspec.md):
|
|
|
14
14
|
| # | Phase | Owner | Gate before the next phase |
|
|
15
15
|
|---|---|---|---|
|
|
16
16
|
| 1 | `opsx-explore` | an explorer worker (never the eventual implementer) | the PM accepts the approach, records it in `DECISIONS.md`, writes the propose brief |
|
|
17
|
-
| 2 | `opsx-propose` | the explorer, same agent (planning only — no code) | the PM's **proposal review is ACCEPTED** in `reviews/<change>-proposal.md`: `openspec validate --all --strict` green + the
|
|
17
|
+
| 2 | `opsx-propose` | the explorer, same agent (planning only — no code) | the PM's **proposal review is ACCEPTED** in `reviews/<change>-proposal.md`: `openspec validate --all --strict` green + the ten-point checklist |
|
|
18
18
|
| 3 | `opsx-apply` | a dev worker | independent verification is dispatched to a different agent |
|
|
19
19
|
| 4 | `opsx-verify` | an **independent** verify agent | the PM re-runs the gate on the merged tree and sets `done` |
|
|
20
20
|
| 5 | `opsx-archive` | the PM | the user confirms (the PM may act as the user's proxy only when it says so and records why) |
|
|
@@ -34,9 +34,11 @@ verified one by one, archived only after the last one landed.
|
|
|
34
34
|
## A. Assembling a team in a new project
|
|
35
35
|
|
|
36
36
|
New-project setup lives in the **`teamsmith-init`** skill: it carries the ordered question checklist (dependencies,
|
|
37
|
-
session/roster
|
|
38
|
-
`team bootstrap` command
|
|
39
|
-
|
|
37
|
+
session/roster and the task-category map + independent PM model, gates, VCS mode, install command, the project's
|
|
38
|
+
ROADMAP/OWNERSHIP/AGENTS.md red lines), the `team bootstrap` command (fresh projects must pass
|
|
39
|
+
`--task-models` and `--pm-model`; a legacy config is refused and migrates on the next `team up` (the startup
|
|
40
|
+
transaction) or through the explicit `team config upgrade-models`) and
|
|
41
|
+
the handoff back here. Read `skills/teamsmith-init/SKILL.md` before running anything; the command's own behaviour is in
|
|
40
42
|
[../../teamsmith-init/references/bootstrap.md](../../teamsmith-init/references/bootstrap.md).
|
|
41
43
|
|
|
42
44
|
## B. Dispatching the first task
|
|
@@ -56,18 +58,22 @@ bash <skill>/scripts/team dispatch dev T1.1 docs/team/tasks/T1.1-*.md
|
|
|
56
58
|
bash <skill>/scripts/team dispatch dev T1.1 docs/team/tasks/T1.1-*.md --print # just want to see the prompt
|
|
57
59
|
```
|
|
58
60
|
|
|
59
|
-
Dispatch does this: guards (memory, model concurrency, **session size vs the model window**) →
|
|
60
|
-
(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
success
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
Dispatch does this: guards (memory, model concurrency, **session size vs the model window**) → resolves the launch
|
|
62
|
+
identity (a **new** task takes the brief's `category:` model from `TEAM_TASK_MODELS`, or `--model` as a one-launch
|
|
63
|
+
override, and gets a fresh SID; a complete same-task recovery keeps the recorded model/SID/category even after the
|
|
64
|
+
category leaves the map) → builds the prompt (scope, red lines, delivery process) → starts an interactive pi in
|
|
65
|
+
`<session>:dev` (`--session-id <session>-dev`, `-e` loading the notify extension, `--skill` loading this skill) →
|
|
66
|
+
**waits for launch proof**: the pane harness writes a per-attempt nonce right before it execs the agent, and only
|
|
67
|
+
that proof is reported as success (the line says the launch was verified). The complete assignment is published
|
|
68
|
+
atomically only after the proof; previews and refusals never write one. No proof → the window is killed, the old
|
|
69
|
+
record stays, and the command reports a clear failure ("the dispatch was sent but the launch could not be
|
|
70
|
+
confirmed") with what to check. A dispatch never claims success for a command that never ran.
|
|
71
|
+
|
|
72
|
+
Resuming: dispatch the same agent for the same task and the recorded session is reused; `--fresh` starts a new one
|
|
73
|
+
(keeping the recorded model/category, only the SID changes) and is required when the model would change (thinking
|
|
74
|
+
suffix included). Use `--fresh` when the task is new and the session carries a long history from an earlier task,
|
|
75
|
+
when you switch model family/provider, or when the session is wedged (the `Context full` / connection-error loop —
|
|
76
|
+
troubleshooting §4a).
|
|
71
77
|
|
|
72
78
|
**One agent, one unfinished task.** Before launching, dispatch also reads what that agent is already carrying: the
|
|
73
79
|
recorded task (`state/<agent>.env`), its board row and the worktree's checked-out branch. If another task is still
|
|
@@ -159,6 +165,12 @@ on Pi (§E2); `team doctor` reports the harness and the plugins this project car
|
|
|
159
165
|
`已装插件 packages` — information, never a recommendation); the background-tmux-window fallback plus the four delivery
|
|
160
166
|
rules are in [references/troubleshooting.md](troubleshooting.md) §17.
|
|
161
167
|
|
|
168
|
+
**Read for what each finding changes.** While you read the report and the review record, check that every finding
|
|
169
|
+
states what it changed — the implementation, the next step, the conclusion, or nothing. A caution that names no
|
|
170
|
+
fact, counterexample, reasoning gap or unobserved boundary is a finding to delete, not evidence of thoroughness,
|
|
171
|
+
and a longer or more defensive report is not stronger evidence. This is a reading rule, not a gate: no section
|
|
172
|
+
checks the wording (see [references/protocol.md](protocol.md) §11b).
|
|
173
|
+
|
|
162
174
|
### E2. The PM's background gate (the team's own lane, no extra window)
|
|
163
175
|
|
|
164
176
|
On the built-in Pi paths (both the PM and the workers) the session already has two tools for this:
|
|
@@ -179,10 +191,17 @@ team_bg_wait review-T1.1
|
|
|
179
191
|
|
|
180
192
|
The four rules that make it safe (they are the extension's code, not a convention):
|
|
181
193
|
|
|
182
|
-
1. **
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
194
|
+
1. **End the turn after starting; the completion wake-up is the normal harvest point.** The tool returns at once,
|
|
195
|
+
so the turn is free: end it, and when the job finishes and you are idle you are woken once (several jobs
|
|
196
|
+
finishing together arrive as one message) to run `team_bg_wait <id>`; a harvested job stays silent (its result
|
|
197
|
+
came back inline). In-turn waiting is the bounded exception: use it only when all three hold -- the job is
|
|
198
|
+
expected to finish within the inline-wait budget (about 2 minutes), its result blocks your immediate next step,
|
|
199
|
+
and no other task work can advance meanwhile. A turn that ends with this session's jobs still running is
|
|
200
|
+
**suspended on background jobs** -- a third legal ending beside **delivered** and **hard-blocked**, not a
|
|
201
|
+
delivery and not a blockage, and its last line names every awaited job id.
|
|
202
|
+
2. **The ledger is on disk**: `team_bg_run` appends `<ISO timestamp> start id=<id> pid=<pid>` before it returns the
|
|
203
|
+
id, and every `team_bg_wait` appends `<ISO timestamp> wait id=<id> outcome=<harvested|running|interrupted>
|
|
204
|
+
waited_s=<s>` (the seconds that call itself waited). Every turn end appends
|
|
186
205
|
`<ISO timestamp> settled-with-unharvested=<n> jobs=<id>:<running|exit<code>>,…` to
|
|
187
206
|
`<root>/.pi/team/state/bg.log` — a review or a digest can read “this turn ended with unharvested work”
|
|
188
207
|
afterwards. Deliveries append `wake count=<n> ids=…`.
|
|
@@ -446,3 +465,30 @@ bash <skill>/scripts/team teardown --all # close every window
|
|
|
446
465
|
- Archive periodically: finished reports and verification records can move to `docs/team/archive/`; threads stay
|
|
447
466
|
(append-only).
|
|
448
467
|
- Worktrees left around eat disk: check with `git worktree list` and clean unused ones with `teardown --purge`.
|
|
468
|
+
|
|
469
|
+
## K. Reading the help surface
|
|
470
|
+
|
|
471
|
+
The CLI's help is three levels deep, and it never dumps every command at once:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
bash <skill>/scripts/team # level 0: what teamsmith is, the groups, a beginner set
|
|
475
|
+
bash <skill>/scripts/team help seats # level 1: the commands of one group
|
|
476
|
+
bash <skill>/scripts/team help dispatch # level 2: one command's own page
|
|
477
|
+
bash <skill>/scripts/team dispatch --help # the same page (byte-identical to `help dispatch`)
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
A command page answers the questions a reader who does not know teamsmith would ask: what it does, when to use it,
|
|
481
|
+
what it reads and writes, which side effects it has, whether it needs `--yes`, and how it can be undone. The pages
|
|
482
|
+
are rendered from one command manifest (`scripts/strings/commands.tsv`) and two parallel prose tables
|
|
483
|
+
(`scripts/strings/help.en.tsv`, `help.zh.tsv`); `tests/help-surface.sh` checks the surface's own promises (menu
|
|
484
|
+
size, coverage, layout, language, the declared effects and their probes) and `tests/routes.sh` probes every printed
|
|
485
|
+
flag against the real parser.
|
|
486
|
+
|
|
487
|
+
Two environment knobs, read from the environment only (the help paths never load the project contract, so they work
|
|
488
|
+
in a directory that is not a project yet):
|
|
489
|
+
|
|
490
|
+
- `TEAM_LANG=en|zh` — the prose language. Unset or empty means English; another value prints one warning and keeps
|
|
491
|
+
English. It selects prose only: command paths, flags and usage lines are byte-identical in both languages, and no
|
|
492
|
+
`--json`/`--print` output changes.
|
|
493
|
+
- `TEAM_HELP_WIDTH=<positive integer>` — the width the surface wraps to, in display cells (a CJK-wide character
|
|
494
|
+
counts two). The default is 100; an invalid value prints one warning and falls back to 100.
|