playmaker-cli 0.8.0__tar.gz → 0.10.0__tar.gz

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 (49) hide show
  1. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/.gitignore +2 -0
  2. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/CHANGELOG.md +92 -0
  3. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/PKG-INFO +61 -14
  4. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/README.md +60 -13
  5. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/pyproject.toml +1 -1
  6. playmaker_cli-0.10.0/skills/playmaker-coach/SKILL.md +211 -0
  7. playmaker_cli-0.10.0/skills/playmaker-coach/references/agent-gotchas.md +73 -0
  8. playmaker_cli-0.10.0/skills/playmaker-coach/references/commands.md +42 -0
  9. playmaker_cli-0.10.0/skills/playmaker-coach/references/lanes.md +97 -0
  10. playmaker_cli-0.10.0/skills/playmaker-coach/references/prompt-templates.md +103 -0
  11. playmaker_cli-0.10.0/skills/playmaker-coach/references/quotas.md +57 -0
  12. playmaker_cli-0.10.0/skills/playmaker-coach/references/review-board.md +143 -0
  13. playmaker_cli-0.10.0/skills/playmaker-coach/scripts/review-board.sh +235 -0
  14. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/opencode.py +10 -0
  15. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/cli.py +262 -78
  16. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/quotas.py +82 -11
  17. playmaker_cli-0.10.0/src/playmaker/state.py +489 -0
  18. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/watcher.py +3 -2
  19. playmaker_cli-0.10.0/tests/test_no_changes.py +360 -0
  20. playmaker_cli-0.10.0/tests/test_quotas_claude.py +197 -0
  21. playmaker_cli-0.10.0/tests/test_quotas_codex.py +175 -0
  22. playmaker_cli-0.10.0/tests/test_quotas_freshness.py +111 -0
  23. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_skill.py +21 -0
  24. playmaker_cli-0.8.0/skills/playmaker-coach/SKILL.md +0 -293
  25. playmaker_cli-0.8.0/src/playmaker/state.py +0 -217
  26. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/LICENSE +0 -0
  27. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/__init__.py +0 -0
  28. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/__main__.py +0 -0
  29. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/__init__.py +0 -0
  30. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/agy.py +0 -0
  31. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/base.py +0 -0
  32. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/claude.py +0 -0
  33. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/codex.py +0 -0
  34. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/agents/gemini.py +0 -0
  35. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/config.py +0 -0
  36. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/notify.py +0 -0
  37. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/src/playmaker/registry.py +0 -0
  38. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/__init__.py +0 -0
  39. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_agy.py +0 -0
  40. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_batch.py +0 -0
  41. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_binary.py +0 -0
  42. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_claude.py +0 -0
  43. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_codex.py +0 -0
  44. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_opencode.py +0 -0
  45. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_permissions.py +0 -0
  46. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_quotas_antigravity.py +0 -0
  47. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_quotas_zai.py +0 -0
  48. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_registry.py +0 -0
  49. {playmaker_cli-0.8.0 → playmaker_cli-0.10.0}/tests/test_state.py +0 -0
@@ -10,3 +10,5 @@ dist/
10
10
  build/
11
11
  .claude/
12
12
  .smoke/
13
+ # review-board.sh writes its patches, prompts and verdicts here
14
+ .playmaker/
@@ -5,6 +5,98 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.10.0] - 2026-09-04
9
+
10
+ ### Added
11
+
12
+ - **`playmaker quotas` shows the two buckets that actually run out first.**
13
+ Codex's `additional_rate_limits[]` carries a separate GPT-5.3-Codex-Spark
14
+ pool with its own 5h and weekly windows, and Anthropic's `limits[]` carries
15
+ a model-scoped weekly next to the all-models one. Both were in the raw
16
+ responses and dropped by the probe, so a coach could route a junior WP to
17
+ Spark while its weekly sat at 4%, or budget a session on the all-models bar
18
+ while its own model-scoped bucket was the one about to end it. Codex now
19
+ renders a `Codex — Spark` sub-block and Claude a `Weekly · <model>` row;
20
+ probes return an additive `blocks` key that `_render_provider` draws for any
21
+ provider.
22
+
23
+ ### Changed
24
+
25
+ - **The coach no longer tiers Antigravity's Claude models by name.**
26
+ `lanes.md` called `agy`'s Claude-Opus "top-tier Claude judgment on Google's
27
+ pool" and offered it as the reviewer to reach for when the Anthropic bucket
28
+ is precious. That roster trails Anthropic's releases by a generation, and
29
+ the name kept pulling real work onto it. The reference now says to tier by
30
+ the version `agy models` shows, and points the second-strong-reviewer row
31
+ at Gemini Pro.
32
+
33
+ ## [0.9.0] - 2026-08-24
34
+
35
+ ### Added
36
+
37
+ - **`playmaker quotas` keeps itself fresh.** The snapshot in `quotas.json` is
38
+ re-probed automatically once it is older than `[quotas] max_age` (default
39
+ 5m), and the header now prints how old the numbers are. A stale table was
40
+ worse than no table: the coach quotes it when it decides where to send work,
41
+ and nothing warned that "62% left" was four days old. `--refresh` still
42
+ probes on demand and `--cached` prints the stored snapshot without probing.
43
+
44
+ - **`skill install` copies the whole skill directory.** The bundled skill has
45
+ outgrown a single file — `references/` the coach reads on demand, `scripts/`
46
+ it runs — and install only ever copied `SKILL.md`, so none of that reached
47
+ `~/.claude/skills`. It now walks the bundle, keeps the executable bit on
48
+ scripts, and deletes nothing the bundle does not own, so `--force` is an
49
+ upgrade rather than a reset of whatever you keep alongside it.
50
+
51
+ - **The coach skill is a protocol plus references, and it ships a review board.**
52
+ `SKILL.md` was a 315-line monolith that cost 35 KB of context to activate,
53
+ which is its own argument against activating it. It is now a ~200-line
54
+ protocol, with the lanes, quota rules, per-agent traps, prompt templates and
55
+ command surface moved into `references/` and read on demand.
56
+
57
+ - **`scripts/review-board.sh` — automatic multi-agent review of a work package.**
58
+ It snapshots the WP's diff, builds one refute-the-implementation prompt per
59
+ reviewer (distinct lens each: correctness, contracts, risk, conventions),
60
+ dispatches them `--read-only` under a single `--batch`, and collects their
61
+ verdicts as JSON with `--collect`. The roster comes from
62
+ `.playmaker/reviewers.conf` (repo) or `~/.playmaker/reviewers.conf` (global),
63
+ keyed by risk class, so which lanes review what is configuration rather than
64
+ something the coach improvises each round. The implementing lane is excluded
65
+ with `--impl-agent`.
66
+
67
+ - **Policy overlay.** The coach reads `./.playmaker/policy.md` then
68
+ `~/.playmaker/policy.md` before planning, and lets them override the skill's
69
+ defaults — which quotas to spare, which lanes are contended, what juniors may
70
+ never touch in this repo, which commands are the acceptance gates. Personal
71
+ routing rules used to survive only as local edits to the installed
72
+ `SKILL.md`, which made upgrading the bundled skill destructive.
73
+
74
+ - **Write-task no-change detection.** Every dispatch and continuation now takes
75
+ a before/after working-tree snapshot: git directories compare porcelain
76
+ state plus `HEAD`, while ordinary directories use a bounded mtime walk. A
77
+ successful write task that changed zero paths is stored as `no_changes`,
78
+ with the count and snapshot hashes available from `get`/`summary` and JSON.
79
+ `--expect-changes` forces the check; `--read-only` suppresses it for recon
80
+ and answer-only work.
81
+
82
+ ### Changed
83
+
84
+ - **The skill's activation threshold is much lower.** It used to require 3+
85
+ independent work-streams and a >2x parallel speedup, which read as "not this
86
+ task" for most real requests; it now activates on any code change spanning
87
+ more than one file, anything that deserves an independent review pass, or any
88
+ request with two parallelizable parts — a single reviewed work package is an
89
+ expected shape, not overhead.
90
+
91
+ - **`no_changes` is terminal but not success.** It appears as a warning in
92
+ watch and list filtering, pings immediately with the failure sound even in
93
+ a batch, and makes the batch report its agent as `⚠ no_changes` rather than
94
+ counting it among the completed workers.
95
+
96
+ - **`summary --json` now wraps turns in `summary`.** Snapshot diagnostics share
97
+ the object with the former bare turn list, so JSON consumers should read
98
+ `summary` for the messages.
99
+
8
100
  ## [0.8.0] - 2026-08-18
9
101
 
10
102
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: playmaker-cli
3
- Version: 0.8.0
3
+ Version: 0.10.0
4
4
  Summary: Playing-coach CLI for orchestrating Claude Code, Codex, Antigravity and opencode sub-agents in parallel.
5
5
  Project-URL: Homepage, https://github.com/vladsafedev/playmaker
6
6
  Project-URL: Repository, https://github.com/vladsafedev/playmaker
@@ -196,12 +196,45 @@ reviewing it is cheap — lives in
196
196
  that ships with the package:
197
197
 
198
198
  ```bash
199
- playmaker skill install # ~/.claude/skills/playmaker-coach/SKILL.md
199
+ playmaker skill install # ~/.claude/skills/playmaker-coach/
200
200
  ```
201
201
 
202
- Then give any Claude Code session a multi-component task and it activates:
203
- proposes a split with per-model quota rationale, waits for your approval, fans
204
- out, and reviews what comes back.
202
+ Then give any Claude Code session a task that changes code and it activates:
203
+ proposes a split into work packages with per-model quota rationale, waits for
204
+ your approval, fans out, and this is the second half of the loop — puts every
205
+ resulting diff through a **review board** before it lands.
206
+
207
+ The skill installs as a directory: `SKILL.md` is the protocol, `references/`
208
+ holds the parts the coach loads on demand, and `scripts/review-board.sh` is the
209
+ review fan-out.
210
+
211
+ ### The review board
212
+
213
+ Reviewing a diff carefully is the most expensive thing a coach can do with its
214
+ own context, and it has an objective output — findings with evidence. So it is
215
+ delegated too. One command snapshots the work package's diff, hands it to
216
+ independent reviewer agents on different lanes (each with a distinct lens:
217
+ correctness, contracts, risk, conventions), and asks each to *refute* the
218
+ implementation against its acceptance criteria:
219
+
220
+ ```bash
221
+ review-board.sh <wp> <base-ref> --risk normal --gate "npm run typecheck" --impl-agent codex
222
+ review-board.sh --collect <wp>
223
+ ```
224
+
225
+ Reviewers run `--read-only` and return a fixed JSON verdict — severity, file,
226
+ line, and a concrete failure scenario per finding. The coach reads verdicts
227
+ rather than code, arbitrates, and sends a numbered fix list back into the
228
+ implementer's live session with `playmaker continue`. Which lanes review which
229
+ risk class is configuration, in `.playmaker/reviewers.conf`.
230
+
231
+ ### Policy lives outside the skill
232
+
233
+ Before planning, the coach reads `./.playmaker/policy.md` (repo) and
234
+ `~/.playmaker/policy.md` (personal) and lets them override the skill's defaults
235
+ — which quotas to spare, which lanes are contended, what juniors may never
236
+ touch in this repo, which commands are the acceptance gates. Keep your own
237
+ rules there and `playmaker skill install --force` stays a safe upgrade.
205
238
 
206
239
  ## Commands
207
240
 
@@ -213,13 +246,14 @@ playmaker dispatch <agent> --prompt "..." # detached by default
213
246
  [--model NAME] # forwarded to the agent's own CLI
214
247
  [--cwd DIR]
215
248
  [--files PATH...]
249
+ [--expect-changes|--read-only]
216
250
  [--sync] # block and print the final answer
217
251
  [--parent ID] # link lineage to an earlier session
218
252
  [--batch LABEL] # group a fan-out; one summary ping
219
253
  playmaker continue <id> --prompt "..." # follow-up inside the live session
220
- [--model NAME] [--files PATH...] [--sync]
254
+ [--model NAME] [--files PATH...] [--expect-changes|--read-only] [--sync]
221
255
 
222
- playmaker list [--status running|done|failed] [--agent NAME] [--limit N]
256
+ playmaker list [--status running|done|failed|no_changes] [--agent NAME] [--limit N]
223
257
  playmaker get <id> [--wait] [--poll SECONDS]
224
258
  playmaker summary <id> # last 2 assistant messages
225
259
  playmaker thread <id> [--last N] [--all] [--role assistant|user|tool]
@@ -233,6 +267,10 @@ playmaker skill install [--dir PATH] [--force]
233
267
  `dispatch`, `continue`, `list`, `get`, `thread` and `quotas` all take `--json`
234
268
  for scripting.
235
269
 
270
+ Write-shaped prompts are checked for file changes at completion. A zero-change
271
+ write task becomes `no_changes`; use `--read-only` for recon or answer-only
272
+ work, or `--expect-changes` to force the check for an otherwise ambiguous prompt.
273
+
236
274
  **`continue` vs a fresh `dispatch`.** `continue` sends a follow-up into the
237
275
  agent's existing session, so its reasoning, tool history and file context are
238
276
  still live — that's the cheap path for "almost right, fix Y". Start fresh with
@@ -353,14 +391,19 @@ stores, no scraping and no browser.
353
391
  ```console
354
392
  $ playmaker quotas --refresh
355
393
  Claude Max 20x
356
- Session ████████████████░░░░ 80% left resets in 3h 12m
357
- Weekly ███████████░░░░░░░░░ 55% left resets in 4d 6h
358
- Sonnet ███████████████████░ 95% left resets in 4d 6h
394
+ Session ████████████████░░░░ 80% left resets in 3h 12m
395
+ Weekly ███████████░░░░░░░░░ 55% left resets in 4d 6h
396
+ Weekly · Fable ██████░░░░░░░░░░░░░░ 28% left resets in 4d 6h
397
+ Sonnet ███████████████████░ 95% left resets in 4d 6h
359
398
 
360
399
  Codex Plus
361
400
  Session ██████████████████░░ 90% left resets in 1h 40m
362
401
  Weekly █████████████░░░░░░░ 65% left resets in 2d 9h
363
402
 
403
+ Codex — Spark
404
+ Session ████████████████████ 100% left resets in 4h 59m
405
+ Weekly ██░░░░░░░░░░░░░░░░░░ 8% left resets in 5d 22h
406
+
364
407
  Antigravity (agy)
365
408
  Gemini 5h ████████████████████ 100% left
366
409
  Gemini weekly ███████████████████░ 95% left
@@ -373,12 +416,16 @@ Z.ai (GLM, via opencode) Max
373
416
  MCP tools ███████████████████░ 99% left resets in 25d 11h
374
417
  ```
375
418
 
376
- The `Weekly` and `Sonnet` rows above are the point: they are **separate
377
- buckets**. So is every agy row, and so is the whole Z.ai block. Routing a
378
- subtask is choosing which of them to spend.
419
+ The `Weekly`, `Weekly · Fable` and `Sonnet` rows above are the point: they are
420
+ **separate buckets**. So is the `Codex — Spark` block, every agy row, and the
421
+ whole Z.ai block. Routing a subtask is choosing which of them to spend.
379
422
 
380
423
  - **Claude** — OAuth usage API; token from the Claude Code Keychain entry.
381
- - **Codex** ChatGPT `wham/usage` API; token from `~/.codex/auth.json`.
424
+ Model-scoped weekly buckets come from the usage API's `limits[]` array and
425
+ print as `Weekly · <model>`.
426
+ - **Codex** — ChatGPT `wham/usage` API; token from `~/.codex/auth.json`. The
427
+ Spark model's own 5-hour and weekly windows come from
428
+ `additional_rate_limits[]` and print as their own `Codex — Spark` block.
382
429
  - **Antigravity** — prefers agy's **local daemon**
383
430
  (`RetrieveUserQuotaSummary` over its embedded gRPC-web endpoint), which is
384
431
  the only source for the full categorized breakdown above. Works whenever any
@@ -169,12 +169,45 @@ reviewing it is cheap — lives in
169
169
  that ships with the package:
170
170
 
171
171
  ```bash
172
- playmaker skill install # ~/.claude/skills/playmaker-coach/SKILL.md
172
+ playmaker skill install # ~/.claude/skills/playmaker-coach/
173
173
  ```
174
174
 
175
- Then give any Claude Code session a multi-component task and it activates:
176
- proposes a split with per-model quota rationale, waits for your approval, fans
177
- out, and reviews what comes back.
175
+ Then give any Claude Code session a task that changes code and it activates:
176
+ proposes a split into work packages with per-model quota rationale, waits for
177
+ your approval, fans out, and this is the second half of the loop — puts every
178
+ resulting diff through a **review board** before it lands.
179
+
180
+ The skill installs as a directory: `SKILL.md` is the protocol, `references/`
181
+ holds the parts the coach loads on demand, and `scripts/review-board.sh` is the
182
+ review fan-out.
183
+
184
+ ### The review board
185
+
186
+ Reviewing a diff carefully is the most expensive thing a coach can do with its
187
+ own context, and it has an objective output — findings with evidence. So it is
188
+ delegated too. One command snapshots the work package's diff, hands it to
189
+ independent reviewer agents on different lanes (each with a distinct lens:
190
+ correctness, contracts, risk, conventions), and asks each to *refute* the
191
+ implementation against its acceptance criteria:
192
+
193
+ ```bash
194
+ review-board.sh <wp> <base-ref> --risk normal --gate "npm run typecheck" --impl-agent codex
195
+ review-board.sh --collect <wp>
196
+ ```
197
+
198
+ Reviewers run `--read-only` and return a fixed JSON verdict — severity, file,
199
+ line, and a concrete failure scenario per finding. The coach reads verdicts
200
+ rather than code, arbitrates, and sends a numbered fix list back into the
201
+ implementer's live session with `playmaker continue`. Which lanes review which
202
+ risk class is configuration, in `.playmaker/reviewers.conf`.
203
+
204
+ ### Policy lives outside the skill
205
+
206
+ Before planning, the coach reads `./.playmaker/policy.md` (repo) and
207
+ `~/.playmaker/policy.md` (personal) and lets them override the skill's defaults
208
+ — which quotas to spare, which lanes are contended, what juniors may never
209
+ touch in this repo, which commands are the acceptance gates. Keep your own
210
+ rules there and `playmaker skill install --force` stays a safe upgrade.
178
211
 
179
212
  ## Commands
180
213
 
@@ -186,13 +219,14 @@ playmaker dispatch <agent> --prompt "..." # detached by default
186
219
  [--model NAME] # forwarded to the agent's own CLI
187
220
  [--cwd DIR]
188
221
  [--files PATH...]
222
+ [--expect-changes|--read-only]
189
223
  [--sync] # block and print the final answer
190
224
  [--parent ID] # link lineage to an earlier session
191
225
  [--batch LABEL] # group a fan-out; one summary ping
192
226
  playmaker continue <id> --prompt "..." # follow-up inside the live session
193
- [--model NAME] [--files PATH...] [--sync]
227
+ [--model NAME] [--files PATH...] [--expect-changes|--read-only] [--sync]
194
228
 
195
- playmaker list [--status running|done|failed] [--agent NAME] [--limit N]
229
+ playmaker list [--status running|done|failed|no_changes] [--agent NAME] [--limit N]
196
230
  playmaker get <id> [--wait] [--poll SECONDS]
197
231
  playmaker summary <id> # last 2 assistant messages
198
232
  playmaker thread <id> [--last N] [--all] [--role assistant|user|tool]
@@ -206,6 +240,10 @@ playmaker skill install [--dir PATH] [--force]
206
240
  `dispatch`, `continue`, `list`, `get`, `thread` and `quotas` all take `--json`
207
241
  for scripting.
208
242
 
243
+ Write-shaped prompts are checked for file changes at completion. A zero-change
244
+ write task becomes `no_changes`; use `--read-only` for recon or answer-only
245
+ work, or `--expect-changes` to force the check for an otherwise ambiguous prompt.
246
+
209
247
  **`continue` vs a fresh `dispatch`.** `continue` sends a follow-up into the
210
248
  agent's existing session, so its reasoning, tool history and file context are
211
249
  still live — that's the cheap path for "almost right, fix Y". Start fresh with
@@ -326,14 +364,19 @@ stores, no scraping and no browser.
326
364
  ```console
327
365
  $ playmaker quotas --refresh
328
366
  Claude Max 20x
329
- Session ████████████████░░░░ 80% left resets in 3h 12m
330
- Weekly ███████████░░░░░░░░░ 55% left resets in 4d 6h
331
- Sonnet ███████████████████░ 95% left resets in 4d 6h
367
+ Session ████████████████░░░░ 80% left resets in 3h 12m
368
+ Weekly ███████████░░░░░░░░░ 55% left resets in 4d 6h
369
+ Weekly · Fable ██████░░░░░░░░░░░░░░ 28% left resets in 4d 6h
370
+ Sonnet ███████████████████░ 95% left resets in 4d 6h
332
371
 
333
372
  Codex Plus
334
373
  Session ██████████████████░░ 90% left resets in 1h 40m
335
374
  Weekly █████████████░░░░░░░ 65% left resets in 2d 9h
336
375
 
376
+ Codex — Spark
377
+ Session ████████████████████ 100% left resets in 4h 59m
378
+ Weekly ██░░░░░░░░░░░░░░░░░░ 8% left resets in 5d 22h
379
+
337
380
  Antigravity (agy)
338
381
  Gemini 5h ████████████████████ 100% left
339
382
  Gemini weekly ███████████████████░ 95% left
@@ -346,12 +389,16 @@ Z.ai (GLM, via opencode) Max
346
389
  MCP tools ███████████████████░ 99% left resets in 25d 11h
347
390
  ```
348
391
 
349
- The `Weekly` and `Sonnet` rows above are the point: they are **separate
350
- buckets**. So is every agy row, and so is the whole Z.ai block. Routing a
351
- subtask is choosing which of them to spend.
392
+ The `Weekly`, `Weekly · Fable` and `Sonnet` rows above are the point: they are
393
+ **separate buckets**. So is the `Codex — Spark` block, every agy row, and the
394
+ whole Z.ai block. Routing a subtask is choosing which of them to spend.
352
395
 
353
396
  - **Claude** — OAuth usage API; token from the Claude Code Keychain entry.
354
- - **Codex** ChatGPT `wham/usage` API; token from `~/.codex/auth.json`.
397
+ Model-scoped weekly buckets come from the usage API's `limits[]` array and
398
+ print as `Weekly · <model>`.
399
+ - **Codex** — ChatGPT `wham/usage` API; token from `~/.codex/auth.json`. The
400
+ Spark model's own 5-hour and weekly windows come from
401
+ `additional_rate_limits[]` and print as their own `Codex — Spark` block.
355
402
  - **Antigravity** — prefers agy's **local daemon**
356
403
  (`RetrieveUserQuotaSummary` over its embedded gRPC-web endpoint), which is
357
404
  the only source for the full categorized breakdown above. Works whenever any
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "playmaker-cli"
3
- version = "0.8.0"
3
+ version = "0.10.0"
4
4
  description = "Playing-coach CLI for orchestrating Claude Code, Codex, Antigravity and opencode sub-agents in parallel."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: playmaker-coach
3
+ description: Team-lead mode for coding work. Decompose the task into work packages, dispatch them to Claude/Codex/Antigravity(agy)/opencode workers through the `playmaker` CLI, then run an automatic multi-agent review board over every diff before it lands, and drive the fix cycles. Use for ANY request that will change code in more than one place, needs an independent review pass, or has two or more parts that can run at once — "implement", "add", "fix", "refactor", "wire up", "сделай", "почини", "добавь", "реализуй", "собери". NOT for answering a question, reading or explaining code, a single-line edit, or a git/ops command.
4
+ ---
5
+
6
+ # playmaker-coach — you are the tech lead, not the typist
7
+
8
+ `playmaker` dispatches sub-tasks to Codex / Antigravity (`agy`) / opencode / a sibling Claude,
9
+ tracks them, and returns their threads. This skill is the judgment on top: what to split,
10
+ who gets which slice, how to size it so verifying is cheap, and **how the review board runs**.
11
+
12
+ **The coach produces plans, prompts, verdicts and integration — not feature diffs.** Your context
13
+ window is the most expensive resource on the table. Every file you read yourself and every line you
14
+ type yourself is one a cheaper worker could have produced. Push out implementation, recon,
15
+ summarization, and even the drafting of worker prompts when the task is big enough.
16
+
17
+ Two loops run under your hand, always both:
18
+
19
+ ```
20
+ decompose → dispatch → prove on disk → REVIEW BOARD → adjudicate → continue → land
21
+ ↑______________________|
22
+ max 2 cycles
23
+ ```
24
+
25
+ ## 1. Activation gate
26
+
27
+ Run this gate on every request that touches code. It has three questions:
28
+
29
+ 1. **Will this change code in more than one file, or in one file in a way that deserves a second pair of eyes?**
30
+ 2. **Are there ≥2 slices that could run at the same time** (backend + frontend, code + tests, two modules)?
31
+ 3. **Is there a durable artefact** (a diff someone will have to live with), as opposed to an answer?
32
+
33
+ **Any "yes" → activate.** The default is delegation; doing it yourself is the exception you justify.
34
+
35
+ **Skip the skill** only for: a question, an explanation, reading/searching code, a one-line or
36
+ one-symbol edit, a git/ops command, or a task the user explicitly asked you to do by hand
37
+ ("сам", "solo", "не делегируй", "just do it yourself").
38
+
39
+ Borderline single-WP tasks still activate — with **one** worker and the review board. The board is
40
+ the point: a single reviewed WP is a legitimate, common shape, not overhead.
41
+
42
+ ## 2. Load policy before planning
43
+
44
+ Defaults in this file are the *mechanism*. The *policy* — which quota to spare, which lanes are
45
+ contended, what this repo forbids juniors to touch, which commands are the objective gates — lives
46
+ outside the skill so it survives `playmaker skill install --force`. Read, in this order, and let
47
+ later files override earlier ones:
48
+
49
+ ```bash
50
+ cat ./.playmaker/policy.md 2>/dev/null # repo policy (gates, protected paths, conventions)
51
+ cat ~/.playmaker/policy.md 2>/dev/null # personal policy (quota economics, lane defaults)
52
+ ls ./.playmaker/agents/*.md 2>/dev/null || ls ~/.playmaker/agents/*.md 2>/dev/null
53
+ ```
54
+
55
+ Agent profiles describe each lane's strengths, ceiling, and quota position — trust a profile over
56
+ the generic defaults here. If no policy file exists, say so once in the plan and use these defaults.
57
+
58
+ ## 3. Protocol
59
+
60
+ ### 3.1 Recon — delegate it
61
+
62
+ Codebase exploration is the highest-leverage thing to delegate: raw reading is exactly what the
63
+ cheapest model does as well as you do. Before your own `grep`/`Read` sweep, dispatch a read-only
64
+ recon with an explicit deliverable and `--sync`, and read a 200-word report instead of ten files:
65
+
66
+ ```bash
67
+ playmaker dispatch agy --model <cheap-tier> --cwd "$(pwd)" --sync --read-only \
68
+ --prompt "Recon only — change nothing. Locate (a) …, (b) …, (c) …. Report under 200 words as a numbered list with file paths and line ranges."
69
+ ```
70
+
71
+ Skip it for one-file, one-symbol lookups — just `Grep`.
72
+
73
+ ### 3.2 Quotas
74
+
75
+ ```bash
76
+ playmaker quotas # capacity per MODEL, not per agent; re-probes itself when stale
77
+ ```
78
+
79
+ Read at model granularity: separate buckets inside one provider are separate capacity. The aim is
80
+ **level-loading** — finish the week with every pool drawn down evenly, except the one reserved for
81
+ the coach — not hoarding the pools other people also use. Details and per-provider quirks:
82
+ `references/quotas.md`.
83
+
84
+ ### 3.3 Decompose into work packages
85
+
86
+ 2–5 WPs on the first pass. A WP is dispatchable only when all five hold — this is what makes review
87
+ cheap and re-prompting rare:
88
+
89
+ 1. **Hard file boundary.** "Edit only `x.ts` and its spec" — never "do the backend part".
90
+ 2. **A gate the worker runs itself** — `tsc --noEmit`, a named spec file, a lint pass. It must exit 0
91
+ before the worker reports done, and its output goes in the final answer.
92
+ 3. **A one-sentence done-condition** you can confirm in seconds. Can't write it? The WP isn't sized
93
+ yet — split or specify first.
94
+ 4. **The context it lacks** pasted in: the spec excerpt, the neighbouring file to mirror, exact paths
95
+ of any notes worth reading.
96
+ 5. **Match to the lane's ceiling.** Pattern-following inside a tight scope → juniors. Architectural
97
+ judgment, cross-module integration, spec interpretation → senior lane or you.
98
+
99
+ Smell test before dispatching: *"if this comes back done, do I verify it by running one command and
100
+ reading one paragraph — or by reading the whole diff and thinking hard?"* If the latter, re-scope.
101
+
102
+ Lane and tier selection: `references/lanes.md`. Risk classes and what juniors may never touch: repo
103
+ policy first, then `references/lanes.md`.
104
+
105
+ ### 3.4 Propose, then wait
106
+
107
+ Post the plan as: WP → lane+model → why → gate → done-condition, plus the reviewer pair per WP and
108
+ the current per-model capacity. **Dispatch nothing until the user approves.** Approval may be
109
+ partial ("go but reroute tests"); restate the modified plan in one line, then dispatch.
110
+
111
+ ### 3.5 Dispatch
112
+
113
+ ```bash
114
+ B=<short-batch-label>
115
+ playmaker dispatch <agent> --model <name> --batch "$B" --cwd "$(pwd)" --prompt "<WP prompt>"
116
+ ```
117
+
118
+ Detached by default — that is the point; never `--sync` a whole fan-out. Always pass `--cwd`,
119
+ `--batch` (one summary ping for the batch), and `--model` unless the profile says otherwise.
120
+ Prompt shape: `references/prompt-templates.md`. Per-agent traps (agy scratch dir, opencode relative
121
+ paths, codex model roster): `references/agent-gotchas.md`.
122
+
123
+ Parallel WPs that touch the same files go in **git worktrees**, one per WP, or they will collide.
124
+
125
+ ### 3.6 Prove it on disk before you believe it
126
+
127
+ `done` means "the process exited cleanly with text", not "code changed". playmaker ≥0.9 marks a
128
+ zero-change write task `no_changes` — treat it exactly as a failure. On older builds, check yourself:
129
+
130
+ ```bash
131
+ git -C "<cwd>" status --short # empty tree on a write WP = NOT done
132
+ ```
133
+
134
+ Then run the WP's own gate yourself, once, cheaply. A WP that fails its gate never reaches the
135
+ review board — it goes straight back to the worker.
136
+
137
+ ### 3.7 Review board — the mandatory second loop
138
+
139
+ **Every WP that changes code gets reviewed by agents, not by you reading the diff.** You read
140
+ verdicts, not code. Composition, prompts, the verdict contract and the cycle rules are in
141
+ `references/review-board.md`; the fan-out itself is one command:
142
+
143
+ ```bash
144
+ pm-review <wp-label> <base-ref> [--risk routine|normal|high] --gate "<cmd>" --impl-agent <lane>
145
+ pm-review --collect <wp-label> # once the review batch drains
146
+ ```
147
+
148
+ (`pm-review` is `scripts/review-board.sh` from this skill; without the shortcut on `PATH`, call
149
+ `~/.claude/skills/playmaker-coach/scripts/review-board.sh` directly.)
150
+
151
+ Non-negotiables:
152
+
153
+ - **The implementer never reviews its own WP**, and reviewers do not see each other's verdicts.
154
+ - Reviewers are **`--read-only`** and prompted to **refute** the WP against its acceptance criteria,
155
+ not to summarize it.
156
+ - Every finding carries `file:line` + a concrete failure scenario. **No evidence → dropped.** You
157
+ arbitrate, and a reviewer's confidence is an input, not a verdict.
158
+ - Fixes go back via `playmaker continue <impl-id>` as a numbered list — the worker still has its
159
+ context. Re-review runs on the **delta only**.
160
+ - **Two cycles maximum.** Still blocking after two → stop and escalate to the user with both
161
+ verdicts. A third round at the same lane is the most expensive way to use a cheap model.
162
+ - Land only at **zero blocking findings**.
163
+
164
+ ### 3.8 Keep a board file
165
+
166
+ Long fan-outs outlive your context. Maintain `./.playmaker/board.md` — one row per WP:
167
+
168
+ ```
169
+ | WP | lane/model | impl id | gate | reviewers (ids) | verdict | cycle | state |
170
+ ```
171
+
172
+ Update it at dispatch, at gate, after each review round. On resume, read the board before anything
173
+ else. It is also what you paste back to the user as the status report.
174
+
175
+ ### 3.9 Failures
176
+
177
+ Surface them; never silently retry. A failed dispatch (missing binary, bad auth, rejected model)
178
+ gets a re-routed plan proposed to the user, not a second attempt at the same string. Diagnosis per
179
+ agent: `references/agent-gotchas.md`.
180
+
181
+ ## 4. What the coach may still type by hand
182
+
183
+ Allowed: integration glue between WPs, conflict resolution, config/one-liners smaller than the
184
+ prompt that would describe them, and the final commit. Everything else — including "it's faster if
185
+ I just do it" — is the anti-pattern this skill exists to kill. If you catch yourself opening an
186
+ editor on product code, ask whether that is a WP you failed to write.
187
+
188
+ ## 5. Reference index
189
+
190
+ | File | Read it when |
191
+ |---|---|
192
+ | `references/lanes.md` | choosing an agent/model, junior-vs-senior routing, escalation |
193
+ | `references/review-board.md` | any review round — composition, prompts, verdict contract, cycles |
194
+ | `references/prompt-templates.md` | writing a WP, reviewer, or follow-up prompt |
195
+ | `references/quotas.md` | reading `playmaker quotas`, per-provider bucket structure |
196
+ | `references/agent-gotchas.md` | a dispatch behaved strangely, or before a first dispatch to a lane |
197
+ | `references/commands.md` | exact CLI surface and flags |
198
+
199
+ ## 6. Anti-patterns
200
+
201
+ - **Doing the work "because it's faster".** It isn't, once review is counted — and it burns the
202
+ scarcest bucket in the room.
203
+ - **Skipping the review board on a small WP.** Small WPs are where unreviewed bugs hide; the board
204
+ costs one command.
205
+ - **Reading diffs instead of verdicts.** Reviewers exist to keep the diff out of your context.
206
+ - **Reviewing with the implementer's own lane**, or letting reviewers see each other's output.
207
+ - **Trusting `done`** without a disk check and a gate.
208
+ - **A third fix cycle.** Escalate instead.
209
+ - **Dispatching a WP you cannot verify in one command and one paragraph.**
210
+ - **Omitting `--model`** and letting a CLI default drain a top-tier bucket.
211
+ - **Reading whole agent threads** when `summary` answers the question.
@@ -0,0 +1,73 @@
1
+ # Per-agent traps
2
+
3
+ Read the entry for a lane before your first dispatch to it in a session, and whenever a dispatch
4
+ behaves strangely.
5
+
6
+ ## Universal: proof on disk, not status
7
+
8
+ `playmaker` marks a session `done` when the process exits cleanly with text output. On builds with
9
+ the no-change check, a write task that touched nothing lands as **`no_changes`** — terminal, but not
10
+ success: it pings immediately even inside a batch and is excluded from the batch's completed count.
11
+ On older builds, check it yourself after every write task:
12
+
13
+ ```bash
14
+ git -C "<cwd>" status --short # empty tree on a write WP = NOT done
15
+ ```
16
+
17
+ Batch summaries (`N/N done`) are transport truth, not result truth. Treat an empty tree exactly like
18
+ a failure: read `summary`, then decide `continue` versus a re-dispatch to another lane.
19
+
20
+ ## Bad `--model` is the classic silent failure
21
+
22
+ playmaker catches both known shapes — a codex model/auth failure raises `codex turn failed: …`, and
23
+ an unknown agy model raises with the valid roster *before* dispatch. So a dispatch that comes back
24
+ failed with a model message means: fix the string, do not retry it. For agy and opencode, copy the
25
+ line from `agy models` / `opencode models` rather than typing it.
26
+
27
+ ## claude (sibling)
28
+
29
+ - Runs with `--permission-mode acceptEdits`: it edits and runs commands freely **inside `--cwd`** and
30
+ is refused outside it. A WP that legitimately needs a sibling repo or a dotfile in `$HOME` comes
31
+ back refused — the fix is a different `--cwd`, not a re-prompt.
32
+ - Zero changes usually means one of: it tried to write outside `--cwd`, or the run needed a
33
+ permission the configured mode does not grant (an "I need your permission" answer, not a crash).
34
+ - Default `--model sonnet`; omitting `--model` can put mid-tier work on the scarce top bucket.
35
+
36
+ ## agy (Antigravity)
37
+
38
+ - The agent's shell lives in a **private scratch directory**, not the workspace. playmaker prepends a
39
+ workspace preamble, but reinforce it: phrase file instructions as workspace-relative or absolute
40
+ paths, **never "the current directory"**.
41
+ - A `done` with no file changes usually means the files landed in agy's scratch dir
42
+ (`~/.gemini/antigravity-cli/scratch/`). Re-dispatch with explicit paths.
43
+ - Its own default model is top tier, so **always pass `--model`** on a dispatch meant to be cheap.
44
+ - Its **5-hour** windows are what a fan-out drains first; the Gemini family and the Claude/GPT family
45
+ have separate ones.
46
+
47
+ ## codex
48
+
49
+ - The model roster depends on the account plan, and an unavailable name fails the whole dispatch.
50
+ **Omitting `--model` is the safe default here** — it uses whatever the account actually has.
51
+
52
+ ## opencode
53
+
54
+ - Models are `provider/model` and the default is invisible: without `--model` it falls through to
55
+ opencode's own last interactive pick, which is not written to its config file. Pin
56
+ `[agents.opencode] model` in `~/.playmaker/config.toml`, or pass `--model` every time.
57
+ - **GLM drops the leading `/` of absolute paths.** `/tmp/x/hello.txt` becomes `tmp/x/hello.txt` and
58
+ lands under `<cwd>/tmp/x/…`, while the agent reports "Wrote file successfully". So: never put an
59
+ absolute path in an opencode prompt, open with *"Working directory is the repo root; use paths
60
+ RELATIVE to it for every file operation, never absolute"*, still pass `--cwd`, and after `done`
61
+ check for a directory named after the cwd's own path components (`<cwd>/Users/…`, `<cwd>/private/…`)
62
+ — that is where the writes went.
63
+ - Second failure mode: on a large task it may produce ten minutes of good analysis and exit `done`
64
+ with zero writes. Size opencode write tasks to roughly 100 lines of output or split them.
65
+ - Neither trap applies to **review** dispatches, which write nothing — which makes opencode a
66
+ perfectly good reviewer even where it is a shaky implementer.
67
+
68
+ ## Worktrees
69
+
70
+ Parallel WPs that touch the same files collide. Give each its own git worktree and dispatch with
71
+ `--cwd <worktree>`. In JS monorepos remember the worktree needs its `node_modules` (symlink the
72
+ store and repoint workspace packages) or the WP's gate silently cannot run — and a gate that cannot
73
+ run is a WP that was never verified.