teamsmith 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +156 -2
- package/bin/team.mjs +59 -0
- package/install.sh +94 -0
- package/package.json +37 -4
- package/skills/teamsmith/CHANGELOG.md +747 -0
- package/skills/teamsmith/SKILL.md +312 -0
- package/skills/teamsmith/extension/team-bg.ts +399 -0
- package/skills/teamsmith/extension/team-inbox-watch.ts +1412 -0
- package/skills/teamsmith/extension/team-notify.ts +524 -0
- package/skills/teamsmith/references/agent-adapters.md +643 -0
- package/skills/teamsmith/references/config.md +477 -0
- package/skills/teamsmith/references/meeting.md +124 -0
- package/skills/teamsmith/references/memory.md +133 -0
- package/skills/teamsmith/references/migration.md +227 -0
- package/skills/teamsmith/references/openspec.md +208 -0
- package/skills/teamsmith/references/philosophy.md +95 -0
- package/skills/teamsmith/references/protocol.md +712 -0
- package/skills/teamsmith/references/troubleshooting.md +1384 -0
- package/skills/teamsmith/references/workflows.md +448 -0
- package/skills/teamsmith/scripts/lib/cmd-agents.sh +1709 -0
- package/skills/teamsmith/scripts/lib/cmd-bg.sh +284 -0
- package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +311 -0
- package/skills/teamsmith/scripts/lib/cmd-config.sh +1156 -0
- package/skills/teamsmith/scripts/lib/cmd-death.sh +562 -0
- package/skills/teamsmith/scripts/lib/cmd-docs.sh +149 -0
- package/skills/teamsmith/scripts/lib/cmd-draft.sh +124 -0
- package/skills/teamsmith/scripts/lib/cmd-init.sh +212 -0
- package/skills/teamsmith/scripts/lib/cmd-meeting.sh +904 -0
- package/skills/teamsmith/scripts/lib/cmd-outbox.sh +196 -0
- package/skills/teamsmith/scripts/lib/cmd-project.sh +642 -0
- package/skills/teamsmith/scripts/lib/cmd-review.sh +1393 -0
- package/skills/teamsmith/scripts/lib/cmd-status.sh +1399 -0
- package/skills/teamsmith/scripts/lib/cmd-update.sh +191 -0
- package/skills/teamsmith/scripts/lib/cmd-watch.sh +1681 -0
- package/skills/teamsmith/scripts/lib/common.sh +4964 -0
- package/skills/teamsmith/scripts/lib/draft-entry.sh +51 -0
- package/skills/teamsmith/scripts/lib/outbox.sh +2042 -0
- package/skills/teamsmith/scripts/lib/tmux-argv.sh +165 -0
- package/skills/teamsmith/scripts/monitor.mjs +616 -0
- package/skills/teamsmith/scripts/panel/README.md +192 -0
- package/skills/teamsmith/scripts/panel/build.sh +47 -0
- package/skills/teamsmith/scripts/panel/bun.lock +109 -0
- package/skills/teamsmith/scripts/panel/draft-send.sh +68 -0
- package/skills/teamsmith/scripts/panel/package.json +24 -0
- package/skills/teamsmith/scripts/panel/panel.js +388 -0
- package/skills/teamsmith/scripts/panel/src/App.tsx +2150 -0
- package/skills/teamsmith/scripts/panel/src/clipboard.ts +154 -0
- package/skills/teamsmith/scripts/panel/src/compose.ts +691 -0
- package/skills/teamsmith/scripts/panel/src/data.ts +555 -0
- package/skills/teamsmith/scripts/panel/src/format.ts +50 -0
- package/skills/teamsmith/scripts/panel/src/layout.ts +2562 -0
- package/skills/teamsmith/scripts/panel/src/main.tsx +894 -0
- package/skills/teamsmith/scripts/panel/src/markdown.ts +340 -0
- package/skills/teamsmith/scripts/panel/src/sanitize.ts +42 -0
- package/skills/teamsmith/scripts/panel/src/settings.ts +154 -0
- package/skills/teamsmith/scripts/panel/src/strings/en.ts +416 -0
- package/skills/teamsmith/scripts/panel/src/strings/index.ts +65 -0
- package/skills/teamsmith/scripts/panel/src/strings/types.ts +9 -0
- package/skills/teamsmith/scripts/panel/src/strings/zh.ts +414 -0
- package/skills/teamsmith/scripts/panel/src/theme.ts +116 -0
- package/skills/teamsmith/scripts/panel/src/types.ts +652 -0
- package/skills/teamsmith/scripts/panel/src/width.ts +105 -0
- package/skills/teamsmith/scripts/panel/tsconfig.json +16 -0
- package/skills/teamsmith/scripts/shim/signal-gate +156 -0
- package/skills/teamsmith/scripts/shim/tmux +403 -0
- package/skills/teamsmith/scripts/team +143 -0
- package/skills/teamsmith/templates/AGENTS.section.md.tmpl +147 -0
- package/skills/teamsmith/templates/BOARD.md.tmpl +18 -0
- package/skills/teamsmith/templates/DECISIONS.md.tmpl +22 -0
- package/skills/teamsmith/templates/OWNERSHIP.md.tmpl +25 -0
- package/skills/teamsmith/templates/PROTOCOL.md.tmpl +84 -0
- package/skills/teamsmith/templates/ROADMAP.md.tmpl +29 -0
- package/skills/teamsmith/templates/config.sh.tmpl +106 -0
- package/skills/teamsmith/templates/memory-seed.md.tmpl +46 -0
- package/skills/teamsmith/templates/pm-prompt.md.tmpl +110 -0
- package/skills/teamsmith/templates/report.md.tmpl +36 -0
- package/skills/teamsmith/templates/task.md.tmpl +65 -0
- package/skills/teamsmith/templates/threads-README.md +17 -0
- package/skills/teamsmith/tests/checkout-shape-probe.sh +571 -0
- package/skills/teamsmith/tests/config-cli.sh +1562 -0
- package/skills/teamsmith/tests/container-tmux.sh +493 -0
- package/skills/teamsmith/tests/coverage-inventory.sh +173 -0
- package/skills/teamsmith/tests/death-cause.sh +564 -0
- package/skills/teamsmith/tests/delivery-truth.sh +1231 -0
- package/skills/teamsmith/tests/fake-tui.py +450 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/README.md +60 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/judge-second.py +139 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/mock-server.py +29 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/observe.ts +20 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/run-case.sh +79 -0
- package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +175 -0
- package/skills/teamsmith/tests/fixtures/p55/flip-p49.sh +229 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/README.md +22 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/dev2.seen +8 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/dev2.wake +9 -0
- package/skills/teamsmith/tests/fixtures/p71-incident/pm-nudges.wake +3 -0
- package/skills/teamsmith/tests/fixtures/signal-lint-cases.txt +40 -0
- package/skills/teamsmith/tests/flip-glue.sh +162 -0
- package/skills/teamsmith/tests/flip-m12-26c.sh +129 -0
- package/skills/teamsmith/tests/flip-m12.sh +185 -0
- package/skills/teamsmith/tests/flip-m16.sh +166 -0
- package/skills/teamsmith/tests/flip-m17.sh +204 -0
- package/skills/teamsmith/tests/flip-m33.sh +284 -0
- package/skills/teamsmith/tests/flip-m34.sh +96 -0
- package/skills/teamsmith/tests/flip-m37.sh +185 -0
- package/skills/teamsmith/tests/flip-m4.3.sh +375 -0
- package/skills/teamsmith/tests/flip-m43.sh +128 -0
- package/skills/teamsmith/tests/flip-m44.sh +262 -0
- package/skills/teamsmith/tests/flip-m45.sh +244 -0
- package/skills/teamsmith/tests/flip-m46.sh +238 -0
- package/skills/teamsmith/tests/flip-m48.sh +304 -0
- package/skills/teamsmith/tests/flip-m6.2.sh +205 -0
- package/skills/teamsmith/tests/flip-m6.3.sh +283 -0
- package/skills/teamsmith/tests/flip-m6.4.sh +267 -0
- package/skills/teamsmith/tests/flip-m6.5.sh +113 -0
- package/skills/teamsmith/tests/flip-m7.1.sh +135 -0
- package/skills/teamsmith/tests/flip-m7.2.sh +321 -0
- package/skills/teamsmith/tests/flip-p144.sh +112 -0
- package/skills/teamsmith/tests/flip-p156.sh +133 -0
- package/skills/teamsmith/tests/flip-p158.sh +301 -0
- package/skills/teamsmith/tests/flip-p160.sh +182 -0
- package/skills/teamsmith/tests/flip-p171.sh +249 -0
- package/skills/teamsmith/tests/flip-p18.1.sh +95 -0
- package/skills/teamsmith/tests/flip-p20.sh +286 -0
- package/skills/teamsmith/tests/flip-p201.sh +249 -0
- package/skills/teamsmith/tests/flip-p210.sh +239 -0
- package/skills/teamsmith/tests/flip-p211.sh +152 -0
- package/skills/teamsmith/tests/flip-p217.sh +288 -0
- package/skills/teamsmith/tests/flip-p22.sh +123 -0
- package/skills/teamsmith/tests/flip-p23.sh +239 -0
- package/skills/teamsmith/tests/flip-p25.sh +165 -0
- package/skills/teamsmith/tests/flip-p71.sh +184 -0
- package/skills/teamsmith/tests/flip-p72.sh +202 -0
- package/skills/teamsmith/tests/frames/README.md +176 -0
- package/skills/teamsmith/tests/frames/p78-conversation-rule-below-box.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-cursor-mid-draft.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-below-cursor-line.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-below-cursor.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-blank-region.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-draft-rule-only.txt +5 -0
- package/skills/teamsmith/tests/frames/p78-spinner-row-below-cursor.txt +6 -0
- package/skills/teamsmith/tests/frames/p78-wider-rule-below-cursor.txt +6 -0
- package/skills/teamsmith/tests/frames/p86-f1-mixed-width-disjoint-box.txt +8 -0
- package/skills/teamsmith/tests/frames/p86-f1-narrower-width-disjoint-box.txt +8 -0
- package/skills/teamsmith/tests/frames/p86-f1-spinner-top-disjoint-box.txt +8 -0
- package/skills/teamsmith/tests/frames/pi-0.85.1-update-banner.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-draft-half-sentence.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-empty-box.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-one-line-draft.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.87.0-project-trust-prompt.txt +30 -0
- package/skills/teamsmith/tests/frames/pi-0.99.2-empty-editor.txt +32 -0
- package/skills/teamsmith/tests/frames/pi-0.99.2-human-draft.txt +32 -0
- package/skills/teamsmith/tests/frames/pi-1.0.0-git-error-in-box.txt +32 -0
- package/skills/teamsmith/tests/gate-guard.sh +112 -0
- package/skills/teamsmith/tests/guard-matrix.sh +233 -0
- package/skills/teamsmith/tests/install-shape.sh +731 -0
- package/skills/teamsmith/tests/ledger-ban.sh +612 -0
- package/skills/teamsmith/tests/lib/box-judge.sh +68 -0
- package/skills/teamsmith/tests/lib/checkout-shape.sh +77 -0
- package/skills/teamsmith/tests/lib/loop-scan.awk +114 -0
- package/skills/teamsmith/tests/lib/pty-wait.sh +676 -0
- package/skills/teamsmith/tests/lib/section-guard.sh +855 -0
- package/skills/teamsmith/tests/lib/shell-lex.pl +261 -0
- package/skills/teamsmith/tests/lib/tmp-root.sh +528 -0
- package/skills/teamsmith/tests/lib/tmux-cap.sh +35 -0
- package/skills/teamsmith/tests/lib/tmux-iso-call-probe.sh +81 -0
- package/skills/teamsmith/tests/lib/tmux-iso-probe.sh +46 -0
- package/skills/teamsmith/tests/lib/tmux-iso.sh +381 -0
- package/skills/teamsmith/tests/load-experiment.sh +290 -0
- package/skills/teamsmith/tests/loop-inventory.tsv +84 -0
- package/skills/teamsmith/tests/panel-b2-slow-stub.sh +19 -0
- package/skills/teamsmith/tests/panel-b2.sh +1183 -0
- package/skills/teamsmith/tests/panel-b3-pty-mouse.py +240 -0
- package/skills/teamsmith/tests/panel-b3-pty-tmux-mouse.py +138 -0
- package/skills/teamsmith/tests/panel-b3-stub.sh +279 -0
- package/skills/teamsmith/tests/panel-b3.sh +1301 -0
- package/skills/teamsmith/tests/panel-choices.sh +572 -0
- package/skills/teamsmith/tests/panel-clipboard-model.ts +187 -0
- package/skills/teamsmith/tests/panel-compose-model.ts +290 -0
- package/skills/teamsmith/tests/panel-contrast.mjs +81 -0
- package/skills/teamsmith/tests/panel-cpu-premise.sh +173 -0
- package/skills/teamsmith/tests/panel-cpu.sh +391 -0
- package/skills/teamsmith/tests/panel-flip-m54.sh +207 -0
- package/skills/teamsmith/tests/panel-flip-p123.sh +278 -0
- package/skills/teamsmith/tests/panel-flip-p125.sh +318 -0
- package/skills/teamsmith/tests/panel-flip-p128.sh +259 -0
- package/skills/teamsmith/tests/panel-keyprobe-pty.py +99 -0
- package/skills/teamsmith/tests/panel-keyprobe-stub.sh +41 -0
- package/skills/teamsmith/tests/panel-keyprobe.sh +82 -0
- package/skills/teamsmith/tests/panel-keyprobe.tsx +116 -0
- package/skills/teamsmith/tests/panel-knobs.sh +83 -0
- package/skills/teamsmith/tests/panel-p21.sh +2181 -0
- package/skills/teamsmith/tests/panel-snapshots.sh +802 -0
- package/skills/teamsmith/tests/panel-strings.mjs +195 -0
- package/skills/teamsmith/tests/perf.sh +740 -0
- package/skills/teamsmith/tests/pm-box-real.sh +350 -0
- package/skills/teamsmith/tests/pulse-nudge-key.sh +563 -0
- package/skills/teamsmith/tests/routes.sh +1652 -0
- package/skills/teamsmith/tests/section-budgets.tsv +150 -0
- package/skills/teamsmith/tests/section-guard.sh +231 -0
- package/skills/teamsmith/tests/section-needs-audit.sh +94 -0
- package/skills/teamsmith/tests/section-paths.tsv +142 -0
- package/skills/teamsmith/tests/section-select.sh +648 -0
- package/skills/teamsmith/tests/signal-gate.sh +366 -0
- package/skills/teamsmith/tests/signal-lint-legacy.txt +14 -0
- package/skills/teamsmith/tests/signal-lint.pl +416 -0
- package/skills/teamsmith/tests/skill-load.mjs +65 -0
- package/skills/teamsmith/tests/smoke.sh +19599 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-120-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-120-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-120.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-160-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-160.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-59-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-59-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-59.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-99-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-dark-99.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-120-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-120-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-120.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-160-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-160.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-59-detail.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-59-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-59.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-99-p4.txt +32 -0
- package/skills/teamsmith/tests/snapshots/zh-light-99.txt +32 -0
- package/skills/teamsmith/tests/spec-ledger-refs.tsv +78 -0
- package/skills/teamsmith/tests/spec-refs.sh +826 -0
- package/skills/teamsmith/tests/task-header-model.sh +267 -0
- package/skills/teamsmith/tests/team-bg-flip.sh +239 -0
- package/skills/teamsmith/tests/team-bg-harness.mjs +392 -0
- package/skills/teamsmith/tests/team-bg-stop.sh +434 -0
- package/skills/teamsmith/tests/team-inbox-watch-flip.sh +191 -0
- package/skills/teamsmith/tests/team-inbox-watch-harness.mjs +1559 -0
- package/skills/teamsmith/tests/tmp-hygiene.sh +1190 -0
- package/skills/teamsmith/tests/tmux-lint-legacy.txt +31 -0
- package/skills/teamsmith/tests/tmux-lint.pl +604 -0
- package/skills/teamsmith-init/SKILL.md +100 -0
- package/skills/teamsmith-init/references/bootstrap.md +74 -0
- package/skills/teamsmith-init/templates/bootstrap-prompt.md.tmpl +46 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teamsmith
|
|
3
|
+
description: teamsmith gives one agent real ownership of a project — it plans, writes self-contained task briefs, dispatches worker agents into their own tmux windows and git worktrees, verifies their work on an independent checkout, merges, and keeps an auditable ledger (BOARD/reviews/threads/DECISIONS). A pulse window (the periodic patrol) wakes the owner only when there is pending work, and the owner can deliberately stand down. Works with Pi; the launch/notify seam is an internal seam (frozen) reserved for a possible future non-Pi adapter, with no compatibility promise. Use when the user wants an agent to own a project end to end, dispatch tasks to worker agents, run agents in parallel in tmux with git worktree isolation, act as a PM/orchestrator over other agents, review an agent's work independently, run the patrol (`pulse`) as a tmux window, wake the PM only when there is pending work, or resume and coordinate a multi-agent project. To start a new project, use the teamsmith-init skill.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "0.1.1"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# teamsmith · one agent that actually owns the project
|
|
10
|
+
|
|
11
|
+
teamsmith turns "one PM session + several worker agents" into a one-command setup: the PM writes task briefs and
|
|
12
|
+
dispatches them, workers implement in parallel inside their own worktrees, the PM verifies on an independent
|
|
13
|
+
checkout, then merges. **You usually are that PM**: when the user asks to "set up a team / dispatch tasks /
|
|
14
|
+
run agents in parallel", follow the PM loop below.
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
PM(this session, tmux <session>:pm) worker agents(each in .worktrees/<agent>)
|
|
18
|
+
task / dispatch ──────────────────▶ pi --session-id <s>-<a> (interactive, watchable)
|
|
19
|
+
digest / inbox ◀── auto-notify on turn end ── extension/team-notify.ts → inbox + tmux wake-up
|
|
20
|
+
long gate: team_bg_run → turn ends → woken once → team_bg_wait (extension/team-bg.ts, both sides)
|
|
21
|
+
review(independent checkout, run gates) ──▶ reports/<ID>-<a>.md + PR/MR
|
|
22
|
+
merge / close ──────────────────▶ BOARD → done
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Starting a new project: use the `teamsmith-init` skill
|
|
26
|
+
|
|
27
|
+
Initialization lives in its own skill: load the **`teamsmith-init`** skill and read its SKILL.md — install the CLI
|
|
28
|
+
(`npm install -g teamsmith`) and run `team init`, which writes the config, the `docs/team/` skeleton and both skills
|
|
29
|
+
into the project's **`.pi/skills/`** — then the ordered questions to settle with the user,
|
|
30
|
+
`bash <teamsmith>/scripts/team bootstrap`, and the handoff back here. A machine-global install (`pi install …`,
|
|
31
|
+
`~/.agents/skills` via `install.sh`, or a settings `skills` entry) is the alternative route to the same skill;
|
|
32
|
+
everything below is the daily loop, which starts once the project is up.
|
|
33
|
+
|
|
34
|
+
## Name and compatibility (former name: pi-team)
|
|
35
|
+
|
|
36
|
+
- Renamed from **`pi-team`** to **`teamsmith`** in v1.13.0 (repo name included).
|
|
37
|
+
- **Contracts unchanged**: the command is still **`team`**; project config is still **`.pi/team/config.sh`**;
|
|
38
|
+
env vars are still **`TEAM_*`**; team docs are still **`docs/team/**`**. Existing projects need no changes.
|
|
39
|
+
- The old path `skills/pi-team` **no longer exists**: the compatibility symlink was removed (M22, the alias period
|
|
40
|
+
ended early by the user's call). A project or `settings.json` that hard-codes the old absolute path must change it
|
|
41
|
+
to `skills/teamsmith` (or to the installed `~/.agents/skills/teamsmith`) — see `references/migration.md` §2.
|
|
42
|
+
- An `AGENTS.md` section marked `<!-- pi-team:begin -->` is migrated in place to the new marker by the next
|
|
43
|
+
`team init`/`bootstrap`.
|
|
44
|
+
- Hot-reload command in Pi: `/teamsmith-reload` (the old `/pi-team-reload` stays registered as an alias — the
|
|
45
|
+
alias is a **command name**, unrelated to the removed path).
|
|
46
|
+
|
|
47
|
+
## Command table
|
|
48
|
+
|
|
49
|
+
| Goal | Command |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Init / self-check | `team init [--session s] [--agents "a b"] [--vcs local\|remote] [--copy\|--no-skills]` (installs both skills into the project's `.pi/skills/`; `--copy` for an ephemeral source, `--no-skills` to skip), `team doctor` (reports that install, warns on drift) |
|
|
52
|
+
| Observe | `team roster` (windows/branch/dirty/ahead), `team status [ID]`, `team ps` (capacity + model limits + PM/pulse liveness), `team digest` (PM's pending work) |
|
|
53
|
+
| Inbox | `team inbox [agent] [--ack] [--all]` |
|
|
54
|
+
| Document contracts | `team task <ID> --title ... --agent a`, `team board add\|assign\|set\|ls`, `team change status <id> [--json]` (readiness view: tasks/evidence, declared vs touched delta files, blockers; exit 0 iff every mapped task is finished), `team thread <a> "..." --from pm --re <ID>`, `team report <ID> <a>` |
|
|
55
|
+
| Dispatch | `team add-agent <a> [--register] [--model m] [--create] [--no-install] [--print]`, `team dispatch <a> <ID> <taskfile> [--model m] [--branch <name>] [--fresh] [--allow-overflow] [--force] [--print]` (all pre-launch guards are judged in **one pass**: one refusal lists every blocker, each with a paste-able `修法:<command>` or `改行:<exact line>` and a final count line; `--force` overrides only the guards that carry an override, printed as a warning and logged after a real launch) |
|
|
56
|
+
| Collaborate | `team say <a> "<one-line message>" [--no-verify]` (verifies delivery; falls back to the inbox when the agent is not running), `team notify <a> "<one line>" [--from <sender>]` (agent → PM; the sender comes from the runtime directory — an unresolved sender is refused, never recorded as `pm`) |
|
|
57
|
+
| Draft / deferred delivery | `team draft [pm]` opens an editor window on `state/draft-pm.md` (nothing automated ever types into it; save+quit enqueues through the guarded path and prints the ack there), `team draft send [<file>] [--now]` (headless form), `team outbox [list]` (what is waiting, with `held` reasons), `team outbox flush [--now]`, `team outbox drop <n\|all>`. Every automated sender refuses to type into an input box that already holds a draft: the message is queued in `state/outbox/` and reported as `queued`; a `geometry-untrusted` read (the supported Pi layout cannot be established) or three trusted-empty drains with no progress (`queue-stalled`) hold the entry durably with its reason and **exit non-zero**, never promising an automatic delivery. `--now` is the audited override that types anyway (`state/outbox/forced.log`). See `references/troubleshooting.md` §3 |
|
|
58
|
+
| Long gate (background job) | **tool calls in the session** (not `team` subcommands): `team_bg_run` starts a detached job (id + pid at once, `state/bg/<id>.log`), `team_bg_wait <id>` harvests it (exit code + log tail inline). One merged wake-up per finished batch, silence once harvested, one `settled-with-unharvested=<n>` line per turn end in `state/bg.log`. Injected on both built-in Pi paths; a custom template opts in with `{bg_ext}`. The lane's records are readable and stoppable from the CLI: `team bg list` (one row per record, signals nothing), `team bg stop <id>` (signals only the recorded job — the `(pid, start-time)` pair is the identity, a reused pid is refused). Inside a window `pkill`/`killall` are the signal gate and refuse every name/pattern selection with exit 64. See `references/workflows.md` §E2 |
|
|
59
|
+
| Verify | `team review <ID> --dir <PM-prepared independent checkout> [--no-gates] [--strong] [--allow-unresolved-branch]` → `reviews/<ID>.md` (runs gates + writes evidence; refuses a dirty or `.gitignore`d checkout / an unresolvable `--branch` unless the matching `TEAM_REVIEW_ALLOW_*` override is used and recorded; `--strong` structurally checks flip evidence + a path to an independent package) |
|
|
60
|
+
| Wrap up | `team close <ID> [--keep-window]` (BOARD/state/window only, never git), `team teardown --agent a [--purge] [--register]` (explicit cleanup; `--register` removes the seat from the roster through the audited writer first) |
|
|
61
|
+
| Bootstrap | `team bootstrap [--agents "dev verify"] [--print]` (recommended), `team init`, `team doctor` |
|
|
62
|
+
| Patrol (pulse) | `team pulse up\|down\|restart\|status\|logs` (a `pulse` window in the same session runs the monitor + periodic patrol; single backend). Renamed from `watchdog` in v1.36.0: `team watchdog …`, `watchdog-status`, `install-watchdog`, `uninstall-watchdog` still work as aliases until v2.0.0 (they print a one-line deprecation notice first). `team watch [--once]` (foreground patrol) |
|
|
63
|
+
| Monitor | `team monitor [--once] [--activity]` (**serves the current tmux session only**: who is running / tasks / pending / capacity; `--activity` adds per-agent activity streams, off by default), `team panel` reuses it. The TUI's own preferences live in `state/panel.conf` (language, page, activity, mouse, density, theme) — runtime state, not project config, and `--print`/`--json` never read it |
|
|
64
|
+
| Project settings | `team config list [--json]` / `team config set <KEY> <VALUE> [--dry-run] [--fingerprint <sha256>] [--actor <name>] [--allow-danger]` / `team config log [N]` / `team config set-agent-model <seat> <model\|->`: the only writer of `.pi/team/config.sh` (comment/order preserving, single-quote form, value validation, danger list, sha256 CAS, one audit line per attempt in `state/config.log`). The console's project-settings view (settings overlay → `项目设置`) lists every key with its effect class (`apply`/`restart`/`refuse`) and edits through this command, seats included; see `references/config.md` §5 |
|
|
65
|
+
| PM/agent lifecycle | `team up [--agents]` (recover the PM), `team resume` (PM's tool: continue stopped agents), `team standby on\|off` (PM deliberately stands down) |
|
|
66
|
+
| Cross-project meetings | `team meeting open/say/read/list/inbox/propose/agree/close` (PM-to-PM peer exchange: interface work, advice, problem reports; **not a command channel** — consensus needs both sides) |
|
|
67
|
+
| Updates | `team mark-loaded` (record the version at session start), `team version --check` (should I reload?), `team changelog [--since X]`, `team reload` |
|
|
68
|
+
| Diagnostics | `team paths` (resolved paths/session), `team smoke` (end-to-end self-test; `TEAM_SMOKE_FAST=1 team smoke` = **fast mode**, pure-logic sections only, ~10s, skipped process sections print `SKIP (FAST mode)`; the **full** run is for delivery/review and queues on the gate lock — `TEAM_SMOKE_LOCK` / `TEAM_SMOKE_LOCK_WAIT`, holder in `<lock>.holder`, and `team review` takes the same lock before its timeout so the record's `queued`/`ran` are separate; the gate judges **correctness only** — its panel section keeps the time-independent knob check), `team version` |
|
|
69
|
+
| Performance | `team perf [--host \| --container]` (**separate from correctness**: the wall-clock/CPU red lines — interactive first frame, frame assembly, steady-state pane CPU — with the unchanged thresholds (2000 ms / 2000 ms / < 1 %), premise factors (`0.75` / `0.25`), medians, visible `SKIP` and exit codes `0`/`2`/`4`/`3`; its own lock `TEAM_PERF_LOCK`, never the gate lock; default = the pinned `ci/Containerfile` image, `--host` is labelled **not the reference**) |
|
|
70
|
+
|
|
71
|
+
The two gates answer different questions and are run at different times. **Correctness, on every change:**
|
|
72
|
+
`openspec validate --all --strict && bash skills/teamsmith/tests/smoke.sh </dev/null` (the pair `team review` runs;
|
|
73
|
+
`team smoke` is the suite's front door). **Performance, separately and before a release:**
|
|
74
|
+
`bash skills/teamsmith/tests/perf.sh` (front door `team perf`; the reference environment is the pinned
|
|
75
|
+
`ci/Containerfile` image, `team perf --host` is explicitly *not* the reference). A red performance run never
|
|
76
|
+
changes a review verdict and never blocks a merge.
|
|
77
|
+
|
|
78
|
+
## Read the creed first, then the process
|
|
79
|
+
The PM's judgement standard lives in [references/philosophy.md](references/philosophy.md) (8 principles, each with
|
|
80
|
+
its failure mode): **deliverables must be independently verifiable · status is a promise · govern less to be
|
|
81
|
+
reliable · failure is information (a false green is worse than nothing) · repeated problems must become
|
|
82
|
+
mechanisms · everything must be handover-ready · long-termism and budget awareness · authority comes from
|
|
83
|
+
evidence and authorization, not from a title**. The loop below is just how those principles are implemented;
|
|
84
|
+
when they conflict, the creed wins and the process gets fixed.
|
|
85
|
+
|
|
86
|
+
## The PM loop (what you actually do)
|
|
87
|
+
|
|
88
|
+
> On start (or after being woken): `team digest` → `team inbox --ack` → `team resume --dry-run` → `team pulse status`.
|
|
89
|
+
> If the pulse is not running and you are not on standby, bringing it up (`team pulse up`) is part of your job; on standby, leave it alone.
|
|
90
|
+
> Division of labour: **the pulse is a metronome** ("is there work?" every 15 minutes by default): it wakes you
|
|
91
|
+
> only when there is pending work, stays silent otherwise, and does not require you to keep running. Starting,
|
|
92
|
+
> stopping and resuming agents, verification and merging are all yours.
|
|
93
|
+
> If you have nothing to push or need a human decision: `team standby on --reason "…"` to stand down
|
|
94
|
+
> (you will not be woken again until someone runs `team standby off`).
|
|
95
|
+
|
|
96
|
+
1. **Model the work**: `team doctor`, `init` if needed; break the user's request into milestones in `ROADMAP.md`
|
|
97
|
+
and write each task as a **self-contained brief** (context / deliverables / boundaries / copy-pasteable
|
|
98
|
+
acceptance commands / report requirements) — the default worker model is cheap and will not fix vague requests.
|
|
99
|
+
2. **Dispatch**: `team dispatch <a> <ID> <taskfile>`. Check `team ps` (memory / model concurrency) first.
|
|
100
|
+
One long-lived worktree per agent; dispatching again to the same agent resumes its session, use `--fresh` for a
|
|
101
|
+
new one. The brief's `change:`/`specs:`/`anchor:`/`deltas:` lines are checked **before the window opens**: one
|
|
102
|
+
change id per task (no override), a change-less brief must declare a resolvable anchor, two unfinished tasks of
|
|
103
|
+
one change cannot write the same delta file, and a verifier must not be an author of the change — the last three
|
|
104
|
+
have `--force` + one audit line, the first does not. A refusal names the offending line, the sibling and the fix;
|
|
105
|
+
`team change status <id>` shows the same facts read-only.
|
|
106
|
+
3. **Wait for notifications**: when a worker's turn ends it appends to `inbox/<agent>.md` and knocks on your
|
|
107
|
+
window. Do not poll agent screens; read `team inbox --ack` and `team digest`.
|
|
108
|
+
4. **Verify (never skip)**: `team review <ID> --dir <checkout>` — run the gates on a clean, independent checkout
|
|
109
|
+
and write `reviews/<ID>.md`. **A report is a claim; your verification is the evidence.** Re-read the diff
|
|
110
|
+
yourself against the brief.
|
|
111
|
+
5. **Land the records, then merge** → `team review <ID> --pre-merge` lists every `docs/team/**` file the
|
|
112
|
+
task's worktree has **not committed** and exits non-zero while any exist: `git merge --squash` carries only
|
|
113
|
+
committed content, so an untracked report would silently stay behind and die with the reused worktree (D45 —
|
|
114
|
+
the same shape happened five times in one day). Commit them yourself with the `Agent: <agent>` trailer (the
|
|
115
|
+
tool never commits for you). Then run git/forge yourself: squash-merge (with a PR:
|
|
116
|
+
`gh pr merge --squash --delete-branch <PR>` first, then `git fetch && git merge --ff-only`) →
|
|
117
|
+
`team board set <ID> done` → `team close <ID>`.
|
|
118
|
+
**If a late delivery arrives after the merge** (the author lands commits on the branch afterwards), run
|
|
119
|
+
`team review <ID> --post-merge` before taking anything: records-only → take them with the printed
|
|
120
|
+
`git checkout <branch> -- …`; code (anything outside `docs/team/**`) → it exits non-zero: re-merge and
|
|
121
|
+
re-run the gates — the records alone are not enough.
|
|
122
|
+
**Fail** → `team thread <a> "<failure evidence + expectation>"` + `team say <a> "<one-line instruction>"` (if the target's input box holds a draft the instruction is queued instead of typed — `team outbox list` shows it, and it is delivered once the box clears).
|
|
123
|
+
6. **Wrap up / report**: update `BOARD.md`, record key decisions in `DECISIONS.md` (with rationale and impact),
|
|
124
|
+
and report to the user as "delivered + where the evidence is + next step". Users want conclusions and risk,
|
|
125
|
+
not a command log.
|
|
126
|
+
|
|
127
|
+
The only reasons to stop and ask the user: **shared-state changes** (merge/push — the skill expresses
|
|
128
|
+
authorization with `--yes`), scope changes, and decisions that need the user's call (dispatch a research task
|
|
129
|
+
first, then write `DECISIONS.md`).
|
|
130
|
+
|
|
131
|
+
## Specs (OpenSpec)
|
|
132
|
+
|
|
133
|
+
What the product **must hold** lives in `openspec/specs/<capability>/spec.md` as requirements with falsifiable
|
|
134
|
+
scenarios; teamsmith keeps the **evidence** (briefs, reports, reviews, decisions) in `docs/team/`. Do not grow a
|
|
135
|
+
second spec system: if a promise belongs to the product it goes into a spec, if it is reasoning or guidance it goes
|
|
136
|
+
into `references/`.
|
|
137
|
+
|
|
138
|
+
A change runs as **five phases, one brief each, one owner each**: `opsx-explore` (an explorer) → `opsx-propose` (the
|
|
139
|
+
same explorer, planning only) → `opsx-apply` (a dev) → `opsx-verify` (a **different** agent) → `opsx-archive` (the
|
|
140
|
+
PM). Two hard rules: **an `apply` brief starts only after the PM's proposal review is ACCEPTED**
|
|
141
|
+
(`docs/team/reviews/<change>-proposal.md`), and **the PM never archives without independent verification and the
|
|
142
|
+
user's confirmation**. **One change : N tasks** — the change is the dispatch unit and the brief's header maps the
|
|
143
|
+
task to it (`team dispatch` refuses more than one `change:` id, a change-less brief without an anchor, two
|
|
144
|
+
unfinished tasks writing one delta file, and a verifier who authored the change; `team change status <id>` reports
|
|
145
|
+
readiness and exits 0 only when every mapped task is finished). `openspec validate --all --strict` is part of
|
|
146
|
+
`TEAM_GATES`; the phase table, the gates and the PM's review checklist are in
|
|
147
|
+
[references/openspec.md](references/openspec.md), the four guards in [references/protocol.md](references/protocol.md) §5b.
|
|
148
|
+
|
|
149
|
+
## Getting skill updates (three paths)
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
bash <skill>/scripts/team mark-loaded # once per PM session: record the version this session loaded
|
|
153
|
+
bash <skill>/scripts/team version --check # anytime: disk version vs session version + how to apply
|
|
154
|
+
bash <skill>/scripts/team changelog # change history (--since v1.8.0 for recent only)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
| Content | How it takes effect |
|
|
158
|
+
|---|---|
|
|
159
|
+
| `scripts/**` (CLI) | **Nothing to do**: every call reads from disk |
|
|
160
|
+
| `SKILL.md` / `references/**` / `templates/**` | Type **`/reload`** in Pi (or `/teamsmith-reload`, or let the model call the `reload_skills` tool). **Note**: `/reload` refreshes the skill list/descriptions (system prompt) and extensions; **text already read into the conversation history does not change**, so after reloading you must `read <skill>/SKILL.md` again (the extension sends a follow-up prompt that triggers that re-read) |
|
|
161
|
+
| `extension/team-notify.ts`, `extension/team-bg.ts`, `extension/team-inbox-watch.ts` | **Restart the process** — the launch paths pass the extensions with `pi -e`, and `-e` modules are read at process start (`/reload` hot-reloads only extensions from Pi's auto-discovery locations, `~/.pi/agent/extensions/` and `.pi/extensions/`). PM: `team up`; worker: `team resume <agent>`. `team version --check` fingerprints them |
|
|
162
|
+
|
|
163
|
+
Rationale: Pi's `/reload` rediscovers skills, rebuilds the system prompt and re-imports extensions from its
|
|
164
|
+
auto-discovery locations; extensions passed with `-e` (which is how the team launch paths load them) are a
|
|
165
|
+
startup argument, so adding or changing one needs a process restart. When `team version --check` says your
|
|
166
|
+
session is stale, follow the table above.
|
|
167
|
+
|
|
168
|
+
## git and forge: the PM uses the tools; the skill does not wrap them
|
|
169
|
+
|
|
170
|
+
The skill **does not run** and **does not print recipes for** git/forge operations — that would be wrapping tools
|
|
171
|
+
that already exist. The PM uses `git` and whatever forge tooling fits:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# 1) Preparation (one long-lived worktree per agent)
|
|
175
|
+
git -C <root> worktree add -b <branch> <root>/.worktrees/<agent> <protected-branch>
|
|
176
|
+
|
|
177
|
+
# 2) Before work starts (dispatch only checks, never does it): worktree clean, not on the protected branch
|
|
178
|
+
git -C <root>/.worktrees/<agent> status --short
|
|
179
|
+
|
|
180
|
+
# 3) Verification (the PM prepares the checkout; the skill only runs gates and writes evidence)
|
|
181
|
+
git -C <root> worktree add --detach /tmp/review-<ID> <branch>
|
|
182
|
+
team review <ID> --dir /tmp/review-<ID> --strong
|
|
183
|
+
|
|
184
|
+
# 3b) Pre-merge: the branch's worktree may hold records that were never committed (`merge --squash` carries
|
|
185
|
+
# only committed content — an untracked report stays behind and dies with the reused worktree; D45)
|
|
186
|
+
team review <ID> --pre-merge # non-zero + per-file fix command while <docs>/** is uncommitted; silent when clean
|
|
187
|
+
|
|
188
|
+
# 3c) Post-merge: the author may keep committing after the merge (`merge --squash` froze the branch at that
|
|
189
|
+
# moment — P82's two record-only commits never reached main; D49)
|
|
190
|
+
team review <ID> --post-merge # records → take them (checkout fix); code → non-zero: re-merge + re-run gates
|
|
191
|
+
|
|
192
|
+
# 4) Merge (with a PR: merge the PR first, then fast-forward locally; without: squash locally)
|
|
193
|
+
gh pr merge --squash --delete-branch <PR> # or glab mr merge, or a curl/HTTP call
|
|
194
|
+
git -C <root> fetch origin <protected-branch> && git -C <root> merge --ff-only FETCH_HEAD
|
|
195
|
+
# no PR: git -C <root> merge --squash <branch> && git -C <root> commit -m "<ID>: <title>"
|
|
196
|
+
git -C <root> push origin <protected-branch>
|
|
197
|
+
|
|
198
|
+
# 5) Wrap up: mark done only after the code really landed on the protected branch
|
|
199
|
+
team board set <ID> done
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Forge-agnostic: GitHub via `gh`, GitLab via `glab`/`curl`, Gitea via `tea`, or the web UI — **the PM decides**;
|
|
203
|
+
the skill assumes nothing. Tokens stay in the project's token files (`TEAM_TOKEN_FILE` /
|
|
204
|
+
`TEAM_GITLAB_TOKEN_FILE`) and are injected only when the PM calls a tool: never echoed, never logged.
|
|
205
|
+
|
|
206
|
+
## Agent adapters (Pi; the seam is internal and frozen)
|
|
207
|
+
|
|
208
|
+
Pi is the promised worker. The four keys below are an **internal seam (frozen)**: reserved for a possible future
|
|
209
|
+
non-Pi adapter, no compatibility promise, not a public extension point (the new-project questionnaire never asks
|
|
210
|
+
about them). They stay writable so the seam can be maintained and diagnosed; to use another CLI set them in
|
|
211
|
+
`.pi/team/config.sh` (**all empty = Pi behaviour byte-for-byte unchanged**):
|
|
212
|
+
|
|
213
|
+
| Key | Purpose | When empty |
|
|
214
|
+
|---|---|---|
|
|
215
|
+
| `TEAM_AGENT_CMD` | launch template for the agent CLI | built-in Pi command |
|
|
216
|
+
| `TEAM_AGENT_NOTIFY_CMD` | how a worker tells the PM its turn ended (`{summary_file}` — the summary is data, never interpolated) | Pi notify extension (inbox + knock) |
|
|
217
|
+
| `TEAM_AGENT_LOG_GLOB` | which logs `team monitor --activity` reads (`{agent}` = agent name) | Pi session files |
|
|
218
|
+
| `TEAM_AGENT_BIN` | binary for the window-readiness wait and existence checks | first word of `TEAM_AGENT_CMD`, else `TEAM_PI_BIN` |
|
|
219
|
+
|
|
220
|
+
- Template placeholders: `{cwd}` `{session_id}` `{model}` `{provider}` `{prompt_file}` `{prompt}` `{skill_dir}` `{notify_ext}` `{bg_ext}` `{extra_args}`;
|
|
221
|
+
an unknown `{...}` **fails the dispatch** with the supported list, and `team dispatch … --print` renders the command first.
|
|
222
|
+
- team-bg: the team background lane (`team_bg_run` / `team_bg_wait` for long gates) is **not** an adapter feature —
|
|
223
|
+
the built-in Pi paths load `extension/team-bg.ts` with `-e`, and a custom Pi-shaped template opts in with
|
|
224
|
+
`{bg_ext}`; a CLI without a Pi extension API has no background lane (use a tmux window instead).
|
|
225
|
+
- `team doctor` / `team paths` print the resolved adapter (`built-in (Pi)` or `custom: …`); only a *configured*
|
|
226
|
+
adapter whose binary cannot be resolved fails.
|
|
227
|
+
- Contract, the frozen seam's placeholder tables, worked codex/opencode examples (seam documentation, not a support promise), a verification checklist and the intentionally unsupported list:
|
|
228
|
+
see [references/agent-adapters.md](references/agent-adapters.md).
|
|
229
|
+
|
|
230
|
+
## Cross-project boundary (you may talk; you may not command)
|
|
231
|
+
|
|
232
|
+
- **Allowed**: discussing interfaces, advice with evidence, problem reports with reproduction, scheduling a joint
|
|
233
|
+
test window, each side taking its own half.
|
|
234
|
+
- **Not allowed**: commanding another PM/agent, deciding on their behalf, impersonating a human, modifying their
|
|
235
|
+
repo or state.
|
|
236
|
+
- Cross-project discussion goes through `team meeting` (PM to PM, files are the source of truth, optional knock);
|
|
237
|
+
**workers do not attend** (they write `BLOCKED:` in their report and the PM takes it up). The mechanism has no
|
|
238
|
+
`command` intent, and `--as-user` only works from a human terminal.
|
|
239
|
+
- Details: [references/meeting.md](references/meeting.md).
|
|
240
|
+
|
|
241
|
+
## Non-negotiable rules (verified during review)
|
|
242
|
+
- **Never claim something passed without having run it.** Reports must include commands and output tails; the PM
|
|
243
|
+
re-runs independently.
|
|
244
|
+
- Agents only touch directories they own (`OWNERSHIP.md`); cross-directory needs → write `BLOCKED:` in the report.
|
|
245
|
+
- Agents must not push the protected branch, force-push, merge PR/MRs, or rebase/delete other people's branches.
|
|
246
|
+
- Tokens live in project token files (`TEAM_TOKEN_FILE` / `TEAM_GITLAB_TOKEN_FILE`, gitignored) and are injected by
|
|
247
|
+
the PM when calling real tools (`GH_TOKEN="$(< .gh-pat)" gh …`); **never echoed, never written, never committed**.
|
|
248
|
+
- Operations that change shared state require `--yes` (meaning the user authorized it): `team meeting open/close/agree`, etc.
|
|
249
|
+
git/forge writes do not go through the skill — the PM executes them (they are shared-state changes too, so they need authorization).
|
|
250
|
+
- One long-lived worktree per agent: **do not move it** (sessions are keyed by cwd; moving loses the agent's memory).
|
|
251
|
+
- Default `TEAM_BRANCH_MODE=task`: **one branch per task** (`task/<ID>-<slug>` cut from the protected branch); the task
|
|
252
|
+
is the unit of verification, merge and rollback. Set `agent` for one long-lived branch per agent.
|
|
253
|
+
- **The pulse is configured by the PM**: `team pulse up` runs `team monitor` in a `pulse` window **in the
|
|
254
|
+
same tmux session** and patrols every 15 minutes (configurable) for pending work. `status` / `logs` / `down` are
|
|
255
|
+
supported. There is exactly one backend (the tmux window) — no container, no systemd: fewer moving parts is more
|
|
256
|
+
reliable, and if the tmux server dies the PM is gone too, so `team up` rebuilds both.
|
|
257
|
+
The name: it was called `watchdog` until v1.36.0 — the old command names, the `watchdog` window name and the
|
|
258
|
+
`TEAM_WATCH_*` variables keep working as aliases/fallbacks until v2.0.0 (`team pulse status` names every legacy
|
|
259
|
+
variable still in effect; a still-running `watchdog` window is recognized as the backend and `team pulse restart`
|
|
260
|
+
swaps it for a `pulse` window). The `state/watchdog.*` file names stay unchanged during the alias period —
|
|
261
|
+
never run two patrols side by side.
|
|
262
|
+
- **The PM does not need to run continuously**: you are only needed when there is work. Patrols default to every
|
|
263
|
+
15 minutes (`TEAM_PULSE_INTERVAL=900`, 300–3600 recommended): pending work wakes you (if you are not running it
|
|
264
|
+
starts you with `pi -c`), otherwise it does nothing. **When there is nothing to do or a human is needed,
|
|
265
|
+
`team standby on --reason "…"` stands you down** — no further wake-ups; backlog still lands in
|
|
266
|
+
`state/watchdog.log`, and a human runs `team standby off`. Patrols **do not manage tmux layout or agents**;
|
|
267
|
+
resuming stopped agents is your call via `team resume`.
|
|
268
|
+
|
|
269
|
+
## Deeper reading (read on demand, not all at once)
|
|
270
|
+
|
|
271
|
+
| File | When |
|
|
272
|
+
|---|---|
|
|
273
|
+
| `references/philosophy.md` | **The PM creed**: judgement standards and their failure modes (read this first) |
|
|
274
|
+
| `references/protocol.md` | Why each rule exists (independent verification, wake-up loop, capacity floor, safety model) |
|
|
275
|
+
| `references/config.md` | Config keys, on-disk layout, env overrides (env beats config) |
|
|
276
|
+
| `references/memory.md` | What the PM's project memory is for, what belongs in it, what survives compaction/restart/`/reload`, and how to work without it |
|
|
277
|
+
| `references/agent-adapters.md` | The internal seam (frozen) for launch and notify: the contract, placeholder tables, worked codex/opencode examples, a verification checklist |
|
|
278
|
+
| `references/meeting.md` | Cross-project meetings: boundaries, shared area, commands, knocking, guards |
|
|
279
|
+
| `teamsmith-init` skill | New project? `skills/teamsmith-init/SKILL.md` is the entry point: the questions to settle, `team bootstrap`, then the handoff back to this skill |
|
|
280
|
+
| `references/migration.md` | The project was set up with an older version (or with the former name `pi-team`): renames, removed commands, new required dependencies, behaviour changes, the upgrade recipe and rollback |
|
|
281
|
+
| `references/workflows.md` | End-to-end runbook: bootstrap, dispatch, verify, merge, patrol/pulse, scaling, blockers |
|
|
282
|
+
| `references/openspec.md` | The OpenSpec pipeline: five phases, their owners, the gate before each next phase, and the PM's proposal-review checklist |
|
|
283
|
+
| `references/troubleshooting.md` | Notifications not arriving, lost sessions, worktree conflicts, forge 403, dishonest reports |
|
|
284
|
+
| `templates/` | Copy when you need to hand-write a brief/report/board |
|
|
285
|
+
| `scripts/team`, `scripts/lib/*.sh` | When changing behaviour (use `team <cmd> --print` to see what it generates) |
|
|
286
|
+
| `tests/smoke.sh`, `tests/perf.sh`, `tests/skill-load.mjs` | To confirm the tooling works here: `team smoke` (end-to-end in a temp repo, never touches this project). **Fast mode**: `TEAM_SMOKE_FAST=1 team smoke` runs only sections that need no real tmux stage or agent process — good for day-to-day gates before dispatch/verification; it **does not cover** dispatch actually launching an agent, the non-Pi agent end-to-end segment, window/close behaviour, the pulse waking the PM, standby/monitor, real agent resume, cross-session guards, offline `say` delivery, or knock probing (those print `SKIP (FAST mode)`); run the full suite before changing those paths or cutting a release. The full run is the machine's **one** shared gate resource: it queues on `TEAM_SMOKE_LOCK` up to `TEAM_SMOKE_LOCK_WAIT`, and `team review` takes the same lock *before* its hard timeout (so the record's `queued`/`ran` are separate and a long queue is a loud `FAIL`, never a `TIMEOUT`). The **performance** red lines live in `tests/perf.sh` (`team perf`), not in the correctness gate: correctness on every change, performance separately and before a release |
|
|
287
|
+
|
|
288
|
+
## Requirements
|
|
289
|
+
|
|
290
|
+
**Hard dependencies**: `bash` ≥ 4, `git` (≥ 2.31, uses `--path-format=absolute`), `tmux`, an agent CLI
|
|
291
|
+
(the built-in Pi needs `--session-id`/`-e`/`--skill`), **magic-context** (the PM's cross-session memory:
|
|
292
|
+
`@cortexkit/pi-magic-context`) and **OpenSpec** (the spec layer: why a change happens and what it changes).
|
|
293
|
+
`team doctor` checks all of them and fails when one is missing, `dispatch` warns in one line without blocking, and
|
|
294
|
+
`bootstrap` prints the exact fix. No jq/python/node dependency.
|
|
295
|
+
> Odd environments can downgrade the two tooling dependencies explicitly — `TEAM_REQUIRE_MAGIC_CONTEXT=0` /
|
|
296
|
+
> `TEAM_REQUIRE_OPENSPEC=0` make `doctor` warn instead of failing; the keys, the spec dir and the CLI resolution
|
|
297
|
+
> (`TEAM_OPENSPEC_BIN`, `TEAM_SPEC_DIR`) are in [references/config.md](references/config.md).
|
|
298
|
+
> When only the *workers* move to another CLI: with `TEAM_AGENT_CMD` set, workers no longer need `pi`
|
|
299
|
+
> (`team doctor` judges by the configured adapter) — but **the PM side still runs Pi** (`pi -c` restarts,
|
|
300
|
+
> the PM prompt, `extension/team-bg.ts`), and the pulse only wakes the PM. See
|
|
301
|
+
> [references/agent-adapters.md](references/agent-adapters.md).
|
|
302
|
+
|
|
303
|
+
- **No forge dependency**: the skill never probes or calls `gh`/`glab`/`tea` and never reads tokens; opening a
|
|
304
|
+
PR/MR is the PM's job via `git` plus `curl`/any CLI/web UI (`TEAM_VCS` is only a wording label).
|
|
305
|
+
- **No container dependency**: the pulse is a `pulse` window in the same tmux session (`team pulse up`).
|
|
306
|
+
- What to remember, what belongs on disk instead, and what happens when the memory dependency is missing:
|
|
307
|
+
[references/memory.md](references/memory.md).
|
|
308
|
+
- Optional helpers: `timeout` (hard timeout for gates; degrades with a warning), `lsof` (needed only where
|
|
309
|
+
`/proc` is unavailable), `/usr/bin/time` (GNU time, not bash's `time` keyword: `tests/panel-cpu.sh` wraps the
|
|
310
|
+
console with it to read the tree CPU figure — the gate image pins it, and where it is missing that fixture
|
|
311
|
+
prints why and reports a visible SKIP (its own exit status) instead of judging, as does the `panel-cpu-premise`
|
|
312
|
+
segment that drives it).
|