agy-crew 0.0.0-stage → 0.9.2

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 (66) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +315 -2
  3. package/README.zh-CN.md +314 -0
  4. package/companion/accounts.mjs +300 -0
  5. package/companion/agy-companion.mjs +2136 -0
  6. package/companion/identity.mjs +25 -0
  7. package/companion/install.mjs +443 -0
  8. package/companion/observation.mjs +147 -0
  9. package/companion/pool/env.mjs +14 -0
  10. package/companion/pool/lease.mjs +89 -0
  11. package/companion/pool/loans.mjs +46 -0
  12. package/companion/pool/quota.mjs +142 -0
  13. package/companion/pool/results.mjs +41 -0
  14. package/companion/pool/select.mjs +115 -0
  15. package/companion/pool/state.mjs +104 -0
  16. package/companion/pool/token.mjs +25 -0
  17. package/companion/state-lock.mjs +103 -0
  18. package/companion/stream-worker.mjs +361 -0
  19. package/docs/INSTALL_FOR_AGENTS.md +213 -0
  20. package/docs/REFERENCE.md +509 -0
  21. package/docs/REFERENCE.zh-CN.md +619 -0
  22. package/opencode-skills/agy-crew-accounts/SKILL.md +85 -0
  23. package/opencode-skills/agy-crew-ask/SKILL.md +46 -0
  24. package/opencode-skills/agy-crew-implementer/SKILL.md +56 -0
  25. package/opencode-skills/agy-crew-jobs/SKILL.md +99 -0
  26. package/opencode-skills/agy-crew-jobs/references/setup.md +41 -0
  27. package/opencode-skills/agy-crew-jobs/references/troubleshooting.md +35 -0
  28. package/opencode-skills/agy-crew-lead/SKILL.md +39 -0
  29. package/opencode-skills/agy-crew-researcher/SKILL.md +52 -0
  30. package/opencode-skills/agy-crew-reviewer/SKILL.md +62 -0
  31. package/opencode-skills/agy-crew-reviewer/references/code-review.md +46 -0
  32. package/opencode-skills/agy-crew-reviewer/references/general-review.md +22 -0
  33. package/opencode-skills/agy-crew-staffer/SKILL.md +54 -0
  34. package/opencode.mjs +14 -0
  35. package/package.json +53 -4
  36. package/pi-skills/agy-crew-accounts/SKILL.md +85 -0
  37. package/pi-skills/agy-crew-ask/SKILL.md +46 -0
  38. package/pi-skills/agy-crew-implementer/SKILL.md +56 -0
  39. package/pi-skills/agy-crew-jobs/SKILL.md +99 -0
  40. package/pi-skills/agy-crew-jobs/references/setup.md +41 -0
  41. package/pi-skills/agy-crew-jobs/references/troubleshooting.md +35 -0
  42. package/pi-skills/agy-crew-lead/SKILL.md +39 -0
  43. package/pi-skills/agy-crew-researcher/SKILL.md +52 -0
  44. package/pi-skills/agy-crew-reviewer/SKILL.md +62 -0
  45. package/pi-skills/agy-crew-reviewer/references/code-review.md +46 -0
  46. package/pi-skills/agy-crew-reviewer/references/general-review.md +22 -0
  47. package/pi-skills/agy-crew-staffer/SKILL.md +54 -0
  48. package/scripts/generate-skills.mjs +138 -0
  49. package/skills/accounts/SKILL.md +78 -0
  50. package/skills/ask/SKILL.md +40 -0
  51. package/skills/implementer/SKILL.md +50 -0
  52. package/skills/jobs/SKILL.md +93 -0
  53. package/skills/jobs/references/setup.md +39 -0
  54. package/skills/jobs/references/troubleshooting.md +33 -0
  55. package/skills/lead/SKILL.md +32 -0
  56. package/skills/researcher/SKILL.md +46 -0
  57. package/skills/reviewer/SKILL.md +56 -0
  58. package/skills/reviewer/references/code-review.md +44 -0
  59. package/skills/reviewer/references/general-review.md +20 -0
  60. package/skills/staffer/SKILL.md +48 -0
  61. package/templates/ask.md +5 -0
  62. package/templates/harness-compatibility.md +5 -0
  63. package/templates/implement.md +39 -0
  64. package/templates/research.md +37 -0
  65. package/templates/review.md +27 -0
  66. package/templates/staffer.md +19 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Keli (pkuwkl)
4
+ Copyright (c) 2026 pStrikeZ
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,316 @@
1
- # Temporary Holding Version
1
+ <p align="center"><img src="assets/logo/gemini-agy.svg" width="440" alt="AGY-CREW"></p>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center"><a href="README.md">English</a> | <a href="README.zh-CN.md">Simplified Chinese</a></p>
4
+
5
+ <p align="center"><a href="https://antigravity.google/product/antigravity-cli"><img src="assets/badges/powered-by-antigravity.svg" height="20" alt="powered by: Antigravity"></a> <img src="assets/badges/model-gemini-3-8-flash.svg" height="20" alt="model: Gemini 3.8 Flash"></p>
6
+
7
+ <p align="center"><a href="https://claude.com/claude-code"><img src="assets/badges/claude-code-plugin.svg" height="20" alt="Claude Code plugin"></a> <a href="https://developers.openai.com/codex/"><img src="assets/badges/codex-plugin.svg" height="20" alt="Codex plugin"></a> <a href="LICENSE"><img src="assets/badges/license-mit.svg" height="20" alt="license: MIT"></a></p>
8
+
9
+ # agy-crew
10
+
11
+ Hire Google's Antigravity CLI (`agy`) as a staffer for **Claude Code**, **OpenAI Codex**, **Pi**, **OpenCode** and more. agy-crew is a fork of [agy-staff](https://github.com/keli-wen/agy-staff) by Keli Wen (MIT); see [Relationship to agy-staff](#relationship-to-agy-staff).
12
+
13
+ ![design diagram](assets/design.png)
14
+
15
+ **[Install](#install) · [Examples](#cujs) · [Account pool](#account-pool) · [Core design](#core-design) · [Build your own](#build-one-for-another-cli) · [Update and uninstall](#update-and-uninstall) · [Relationship to agy-staff](#relationship-to-agy-staff)**
16
+
17
+ ## What & Why
18
+
19
+ agy-crew lets your senior agents delegate to `agy`, which ships fast Gemini 3.8 Flash. Five personas: staffer (general-purpose), researcher, reviewer (code **and** plans/decisions), implementer, and ask — plus a model-facing jobs skill. After `agy-crew install` every harness invokes them as `/agy-crew-<persona>`; the harness plugin routes use `/agy-crew:<persona>` (Claude Code) and `$agy-crew:<persona>` (Codex).
20
+
21
+ If you use Codex you know the feeling: GPT-5.6-Sol is slow even with fast mode on. Claude Code is quicker but still not fast, and Fable quota is scarce enough that you want it orchestrating subagents, not grinding through every survey and review itself. An agy worker gives you a fast lane — second opinions in seconds, research and reviews at Flash speed, scoped implementation handled off to the side while you keep moving. And where speed isn't the point, a second model family looking at the same code buys coverage and robustness your main agent can't give itself.
22
+
23
+ ![two overloaded senior agents hand the baton to one fast agy worker](assets/why.png)
24
+
25
+ ### Why a fork
26
+
27
+ agy-crew keeps agy-staff's personas, background jobs and portable bash-plus-skills design, and adds:
28
+
29
+ 1. a terminal command `agy-crew` and an `install` command that puts the skills into every detected harness from one shared bundle, replacing per-harness plugin caches;
30
+ 2. strict mutual exclusion with upstream agy-staff (the installer refuses to run beside it);
31
+ 3. an **account pool** for running concurrent jobs on different agy accounts with per-account, per-model-family quota awareness (see [Account pool](#account-pool)).
32
+
33
+ The `-crew` suffix pairs with the author's `codex-staff`: `-staff` is single-account delegation, `-crew` is pooled.
34
+
35
+ ## How
36
+
37
+ ### Invoke a persona
38
+
39
+ Type `/agy-crew-` in your harness (Codex: `$agy-crew-`) and the five personas are listed. Through the Claude Code plugin route the form is `/agy-crew:staffer`.
40
+
41
+ ### Install
42
+
43
+ Step 1 — install the Antigravity CLI ([official docs](https://antigravity.google/docs/cli/install)), then verify with `agy --version`. Node.js 20+ is also required:
44
+
45
+ ```bash
46
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
47
+ ```
48
+
49
+ Step 2 — install agy-crew. **agy-crew and agy-staff must not be installed on the same machine** (see [Relationship to agy-staff](#relationship-to-agy-staff)); the installer refuses to run beside it.
50
+
51
+ Pick one route.
52
+
53
+ | Route | Needs | You get | Pick it when |
54
+ |---|---|---|---|
55
+ | A: npm (recommended) | Node.js 20+, npm | the `agy-crew` command on PATH | you want the one-command install |
56
+ | A′: git clone + node | Node.js 20+, git (no npm) | skills only; commands are `node <clone>/companion/agy-companion.mjs …` | npm is unavailable or unwanted |
57
+ | B: plugin managers | the harness's own CLI | skills inside the harness; no terminal command | you prefer the harness to manage the plugin |
58
+
59
+ #### Route A (recommended): npm, one command
60
+
61
+ ```bash
62
+ npm install -g agy-crew
63
+ agy-crew install
64
+ ```
65
+
66
+ To try unreleased changes from `master`, use `npm install -g github:pStrikeZ/agy-crew` instead (needs git). For development, from a checkout: `git clone https://github.com/pStrikeZ/agy-crew && cd agy-crew && npm link`, then `agy-crew install`. The skills then run straight from the checkout, so a `git pull` is live immediately; re-run `agy-crew install` after pulling so the bundle is refreshed.
67
+
68
+ #### Route A′: no npm, git clone + node
69
+
70
+ ```bash
71
+ git clone https://github.com/pStrikeZ/agy-crew
72
+ node agy-crew/companion/agy-companion.mjs install
73
+ ```
74
+
75
+ The skills work exactly the same: the bundle stores the absolute path of the companion inside the clone. There is no `agy-crew` command on PATH, so every command in this README that starts with `agy-crew` is written `node <clone>/companion/agy-companion.mjs <command>` instead, for example `node <clone>/companion/agy-companion.mjs accounts login work1`. Keep the clone where it is (moving or deleting it breaks the skills), and re-run the install command after each `git pull`. If you type these often, add a shell alias, for example `alias agy-crew='node ~/agy-crew/companion/agy-companion.mjs'`.
76
+
77
+ #### What `install` does (Routes A and A′)
78
+
79
+ `agy-crew install` auto-detects the harnesses present by their config directories. Flags: `--hosts claude,codex,omp,opencode,dsh` (explicit list), `--all`, `--dry-run` (print the plan, write nothing), `--status` (show per-host link state and bundles), `--json`. `agy-crew uninstall [--hosts …|--all]` removes only links it created.
80
+
81
+ | Host | Skills directory |
82
+ |---|---|
83
+ | Claude Code (`claude`) | `~/.claude/skills` |
84
+ | Codex (`codex`) | `~/.agents/skills` |
85
+ | Oh My Pi (`omp`) | `~/.omp/agent/skills` |
86
+ | OpenCode (`opencode`) | `~/.config/opencode/skills` |
87
+ | DeepSeek Harness (`dsh`) | `~/.dsh/skills` |
88
+
89
+ The skills are rendered once into `~/.agy-crew/bundles/<version>-<digest>/` with absolute companion paths, and each harness gets a directory link (`agy-crew-<persona>`; a junction on Windows, no elevation needed) pointing into that bundle. Anything in a skills directory that the installer did not create is user content and is never overwritten; any conflict aborts the whole run before writing and prints the paths plus a remedy. Pi is not covered by `install`; use the Pi package route below.
90
+
91
+ Restart the harness or open a new session afterwards, then follow [First run](#first-run).
92
+
93
+ #### Route B: harness plugin managers
94
+
95
+ Plugin managers need no terminal command, but the account pool commands are awkward here: the companion lives inside the plugin cache, so you would have to call it by its cache path (use `/agy-crew-accounts` from the agent instead, or pick Route A or A′ if you want the pool).
96
+
97
+ <details>
98
+ <summary>Claude Code</summary>
99
+
100
+ ```bash
101
+ claude plugin marketplace add pStrikeZ/agy-crew
102
+ claude plugin install agy-crew@agy-crew
103
+ ```
104
+
105
+ Restart Claude Code, then run `/agy-crew:ask reply with OK`.
106
+
107
+ </details>
108
+
109
+ <details>
110
+ <summary>Codex</summary>
111
+
112
+ ```bash
113
+ codex plugin marketplace add https://github.com/pStrikeZ/agy-crew
114
+ codex plugin add agy-crew@agy-crew
115
+ ```
116
+
117
+ Restart Codex, then run `$agy-crew:ask reply with OK`. Codex's command sandbox cannot run agy; companion commands must run unsandboxed (see [INSTALL_FOR_AGENTS.md](docs/INSTALL_FOR_AGENTS.md)).
118
+
119
+ </details>
120
+
121
+ <details>
122
+ <summary>Pi</summary>
123
+
124
+ Install: `pi install git:github.com/pStrikeZ/agy-crew`.
125
+ Skills are prefixed as `/skill:agy-crew-<persona>` (e.g. `/skill:agy-crew-ask reply with OK`), with `/skill:agy-crew-jobs` for job management.
126
+ Update with `pi update --extension git:github.com/pStrikeZ/agy-crew`, then run `/reload`.
127
+
128
+ </details>
129
+
130
+ <details>
131
+ <summary>OpenCode</summary>
132
+
133
+ With OpenCode V1 (≥1.18.34 <2), install the package through its native plugin manager:
134
+
135
+ ```bash
136
+ opencode plugin 'agy-crew@git+https://github.com/pStrikeZ/agy-crew.git' --global
137
+ ```
138
+
139
+ Restart OpenCode, then run `/agy-crew-ask reply with OK`. The plugin automatically registers all eight `agy-crew-*` skills and their native slash commands, including `/agy-crew-lead`, `/agy-crew-jobs` and `/agy-crew-accounts`. No separate skills path or command wrappers are needed. Node.js and an authenticated `agy` are required, as above.
140
+
141
+ OpenCode caches the complete package spec. Restarting does not refresh an unchanged Git spec. To upgrade, choose a newer Git tag or commit and run `opencode plugin 'agy-crew@git+https://github.com/pStrikeZ/agy-crew.git#<tag-or-commit>' --global --force`, then restart. See [the reference](docs/REFERENCE.md#opencode) for config and local development. OpenCode V2 is not covered by this adapter.
142
+
143
+ </details>
144
+
145
+ #### First run
146
+
147
+ Follow these top to bottom after installing.
148
+
149
+ 1. **Smoke test.** Restart the harness (or open a new session), then run `/agy-crew-ask reply with OK` (Codex: `$agy-crew-ask reply with OK`; plugin routes use the names in Route B). You should get a short answer back. Ask is tool-free and needs no permission setup. If it fails, run `agy --version` and start `agy` once interactively to log in.
150
+ 2. **Optional: account pool.** Without pool accounts everything runs on your own agy login, so skip this step if one account is enough. To add accounts, run in your own terminal (it opens a browser sign-in, so an agent cannot do it for you):
151
+
152
+ ```bash
153
+ agy-crew accounts login work1 # sign in with the browser; pick any name
154
+ agy-crew accounts login work2 # repeat for each further account (a different Google account each)
155
+ agy-crew accounts list # each should show ready
156
+ agy-crew accounts quota --refresh # current quota per account
157
+ ```
158
+
159
+ On Route A′ replace `agy-crew` with `node <clone>/companion/agy-companion.mjs`. More in [Account pool](#account-pool).
160
+ 3. **Everyday use.** Invoke a persona: `/agy-crew-researcher`, `/agy-crew-reviewer`, `/agy-crew-implementer`, `/agy-crew-staffer` or `/agy-crew-lead` (Codex: `$agy-crew-…`). Background jobs are collected for you: your agent picks up the result through the jobs skill, so you do not run `wait` yourself. `/agy-crew-accounts` shows the pool (accounts, quota, cooldowns). See [CUJs](#cujs) for examples.
161
+
162
+ > [!IMPORTANT]
163
+ > **There is no mandatory setup step.** `staffer`, `researcher`, `reviewer` and `implementer` run **unrestricted** by default: agy can inspect the repo, run commands, and edit files. agy-crew keeps that practical with prompts that adapt to the current repo state. For example, when `implementer` starts in a dirty workspace, the companion tells agy which files already had changes and reminds it not to overwrite or deliver unrelated user work. If the task asks for a commit, push, or PR, agy can do that delivery; otherwise it leaves a working-tree diff for review. These prompt instructions do not provide permission isolation.
164
+ > `setup` + `--restricted` is **optional hardening** for untrusted input — per run (`--restricted`) or as a per-repo default (`setup --restrict review,research`). `setup` dry-runs and asks before writing anything ("set up agy" triggers it); read the [permission notes](docs/REFERENCE.md#optional-hardening-setup) first — the allowlist is prefix-matched, applies machine-wide (it edits the global `~/.gemini/antigravity-cli/settings.json`), and a restricted run can return less than an unrestricted one. The per-repo policy file is `.agy-crew/config.json`.
165
+
166
+ #### For agents
167
+
168
+ Paste this into any coding agent:
169
+
170
+ ```
171
+ Read the raw text of https://raw.githubusercontent.com/pStrikeZ/agy-crew/master/docs/INSTALL_FOR_AGENTS.md (curl it — do not
172
+ work from a summary) and follow it to install and verify the agy-crew plugin for the harness you are running in.
173
+ Respond in the user's language.
174
+ ```
175
+
176
+ #### Update and uninstall
177
+
178
+ Route A (npm):
179
+
180
+ ```bash
181
+ # update
182
+ npm install -g agy-crew@latest && agy-crew install # then restart the harness
183
+ # uninstall
184
+ agy-crew uninstall --all && npm uninstall -g agy-crew
185
+ ```
186
+
187
+ For a `npm link` checkout, `git pull` then `agy-crew install` refreshes the bundle.
188
+
189
+ Route A′ (git clone):
190
+
191
+ ```bash
192
+ # update
193
+ git -C <clone> pull && node <clone>/companion/agy-companion.mjs install # then restart the harness
194
+ # uninstall, then delete the clone
195
+ node <clone>/companion/agy-companion.mjs uninstall --all
196
+ ```
197
+
198
+ `~/.agy-crew` holds your pool accounts and old bundles; neither uninstall removes it. Delete it by hand only when you want the accounts gone.
199
+
200
+ Route B: Claude Code and Codex install a *copy*, so a new version only reaches you when you pull it in yourself:
201
+
202
+ ```bash
203
+ claude plugin marketplace update agy-crew && claude plugin update agy-crew@agy-crew
204
+ ```
205
+
206
+ ```bash
207
+ codex plugin marketplace upgrade && codex plugin add agy-crew@agy-crew # then restart Codex
208
+ ```
209
+
210
+ Claude Code and Codex cache per version directory, so an upgrade lands only if the plugin version changed; restart the harness afterwards. If a fix does not show up, see [upgrading](docs/REFERENCE.md#upgrading) — it has the force-refresh command. Pi and OpenCode upgrades are described in their sections above. To uninstall a Route B install, use the harness's own plugin manager (Claude Code: `claude plugin uninstall agy-crew@agy-crew`).
211
+
212
+ ### CUJs
213
+
214
+ Examples below use the user-level form `/agy-crew-…` (Codex shows it as `$agy-crew-…`). Through the plugin routes use `/agy-crew:…` on Claude Code and `$agy-crew:…` on Codex; on Pi use `/skill:agy-crew-…`.
215
+
216
+ | Use case | Invocation |
217
+ |---|---|
218
+ | Lead an ongoing task | `/agy-crew-lead investigate the options, draft a proposal, and revise it with my feedback` |
219
+ | Quick second opinion | `/agy-crew-ask what's your backend model` |
220
+ | A general task | `/agy-crew-staffer summarize the open TODOs in this repo` |
221
+ | Generate an image | `/agy-crew-staffer generate a pixel-art robot mascot, save it as assets/mascot.png` |
222
+ | Review the working tree | `/agy-crew-reviewer Review the current working tree` |
223
+ | Review a PR | `/agy-crew-reviewer Review PR #730` |
224
+ | Review a plan or decision | `/agy-crew-reviewer Challenge the migration plan in docs/plan.md` |
225
+ | Survey a topic | `/agy-crew-researcher how does auth work in this repo` |
226
+ | Implement a scoped fix | `/agy-crew-implementer fix the flaky retry test` |
227
+ | Job ops (wait/status/cancel/continue) | natural language: "is the agy job done?", "continue: also check the error path" |
228
+
229
+ `reviewer` is fully prompt-based: you describe the subject and agy gathers the evidence itself (`gh pr view`, `git diff`, reading the file) — there is no flag for handing it a diff. It has two flavors, routed by subject: code review (severity-ranked findings) and general review (a multi-angle challenge of a plan, design, or decision).
230
+
231
+ `staffer` also covers agy's native tools without a dedicated specialist persona, including **image generation** (`generate_image`). A trial on agy v1.1.15 produced a 1024×1024 PNG in about 30 seconds; actual time depends on the task and environment.
232
+
233
+ ## Account pool
234
+
235
+ One agy login has one quota, so concurrent jobs on it queue behind each other and a hot model runs dry. The account pool lets background jobs run on several agy accounts at once, tracking quota per account and per model family.
236
+
237
+ Quick start:
238
+
239
+ ```bash
240
+ agy-crew install # as above
241
+ agy-crew accounts login work1 # opens a browser sign-in; run it yourself, in your terminal
242
+ agy-crew accounts list # shows work1 as ready
243
+ ```
244
+
245
+ From then on, runs pick an account automatically (`--account auto` is the default): an idle account first, then the one with the most known quota left. Repeat `login` with another name for more accounts. Your own agy login (**live**) is never pooled: `auto` never uses it and it never lends credentials. It is used only with `--account live`, or when the pool has no enabled account, so an empty pool changes nothing.
246
+
247
+ When an account hits a quota limit, the companion records a cooldown for that account and model family (until the reset time agy reports, or 60 minutes if none). A run that had not started a conversation fails over to another account. A run in the middle of a conversation stays bound to its account, because the history lives there; if that account is cooling, an idle account lends its credential for the rest of the run and the token files are restored afterwards, including after a crash. If nothing can continue, the job ends with `quota_exhausted` and a `retry_at`, and you decide when to `continue`. `agy-crew accounts quota --refresh` asks Google's Cloud Code service for current quota; that is the only command that uses the network.
248
+
249
+ Already have accounts? `agy-crew accounts import work2 --home <dir>` copies the token from an existing HOME-shaped directory, such as an agy-cli-manager account directory (`~/.agy-cli-manager/accounts/<name>`). agy-cli-manager is not needed otherwise; import is just a file copy plus the usual email and duplicate checks. Other subcommands: `enable`, `disable`, `cooldown clear`, `remove --yes`. Full details in the [reference](docs/REFERENCE.md#accounts).
250
+
251
+ Parallel jobs now make sense up to roughly the number of ready accounts. With an empty pool everything runs on your live login.
252
+
253
+ ## Core design
254
+
255
+ `lead` adds task orchestration guidance for your current agent. Within lead, orient enough to frame the assignment, delegate substantive work to `staffer` by default, wait for the result, then assess it and integrate or follow up. Specialists provide dedicated guidance when useful, while `ask` is reserved for testing. The host owns cross-task decisions, acceptance, integration, and delivery, using the existing jobs workflow. Invoke `/agy-crew-lead` (or `/agy-crew:lead` on the Claude Code plugin route, `$agy-crew:lead` on the Codex plugin route, `/skill:agy-crew-lead` on Pi).
256
+
257
+ `ask` answers in the same call. The other personas return a job id and a collection command, such as `wait <id> --timeout 10m`. Your agent waits using the host's available capabilities, with one independent background wait per job where supported.
258
+
259
+ The main agent waits for the final result by default. If you explicitly ask about progress, it can use `observe` to read a snapshot of recent tool activity and response text; it does not query progress for routine updates. Once the task finishes, `wait` or `result` delivers the full report. Expiring a wait leaves the worker running.
260
+
261
+ The timeline below follows a background task from delegation to completion. The host agent waits for the final result by default (or advances already-identified independent work), checks progress when asked, and collects the report.
262
+
263
+ [![A background task over time: the host delegates, waits or observes, while the worker continuously saves AGY output and eventually delivers the full report](assets/integration.png)](assets/integration.svg)
264
+
265
+ Jobs have a separate execution deadline: default 60 minutes, configurable at launch with `--timeout` up to 120 minutes. Use `cancel` to stop execution, or explicitly request `continue` or `restart` after inspecting the existing work. The host harness controls when your agent receives a background result.
266
+
267
+ **Full reference →** [docs/REFERENCE.md](docs/REFERENCE.md) (flags, permission model, jobs/state, troubleshooting, upgrading). **Release notes →** [docs/releases/](docs/releases/).
268
+
269
+ ## Build one for another CLI
270
+
271
+ agy-crew's design, inherited from agy-staff, is portable: bash plus skills, with no hard dependency on a host, a worker CLI or a runtime library. [docs/DESIGN.md](docs/DESIGN.md) writes it down as best practice. To build the same kind of tool for another agent CLI, give your coding agent this prompt:
272
+
273
+ ```
274
+ Read the raw text of https://raw.githubusercontent.com/pStrikeZ/agy-crew/master/docs/DESIGN.md
275
+ (curl it — do not work from a summary). Then design an integration that lets this host agent delegate
276
+ work to <CLI> the same way. First read `<CLI> --help`, map what the CLI supports to the section
277
+ "What depends on the worker CLI", and list the principles it cannot support before writing any code.
278
+ Ask me before any call that spends model quota. Respond in the user's language.
279
+ ```
280
+
281
+ Before writing any code, the agent lists the principles your CLI cannot support, so you know up front where the tool will degrade.
282
+
283
+ ## Relationship to agy-staff
284
+
285
+ agy-crew is a fork of [agy-staff](https://github.com/keli-wen/agy-staff) v0.7.4 by Keli Wen, published under the same MIT license. Version numbering continues the agy-staff history (this fork starts at 0.8.0).
286
+
287
+ What changed: the product was renamed throughout (plugin id `agy-crew@agy-crew`, per-repository state in `.agy-crew/`, `[agy-crew]` telemetry, `agy-crew error:` prefix), a terminal command and cross-harness `install` were added (0.8.0), and an account pool (0.9.0). Upstream changes continue to be merged where they apply.
288
+
289
+ agy-crew and agy-staff cannot coexist: both would show their skills to the agent and write the same per-repository state, so `agy-crew install` refuses to run when it finds agy-staff and prints how to remove it. There is no in-place upgrade; uninstall agy-staff, then install agy-crew. State in `.agy-staff/` is not migrated. To go back to upstream, run `agy-crew uninstall --all` first. See [LICENSE](LICENSE) and [NOTICE](NOTICE), and the [0.8.0](docs/releases/v0.8.0.md) and [0.9.0](docs/releases/v0.9.0.md) release notes.
290
+
291
+ ## Contributing
292
+
293
+ Contributions are welcome — issues, bug reports and pull requests all help.
294
+
295
+ A few things worth knowing before you open a PR:
296
+
297
+ - **Run the tests**: `npm test`. The standard suite uses temporary repos and HOME directories with fake `agy`, plus focused module tests. Keep regression tests offline and independent of personal settings. Real AGY validation is a separate opt-in suite described in [tests/README.md](tests/README.md).
298
+ - **Docs come in pairs**: `README.md` / `README.zh-CN.md` and `docs/REFERENCE.md` / `docs/REFERENCE.zh-CN.md` are kept in sync. Change one, change its counterpart.
299
+ - **Runtime code lives in `companion/`**: the entrypoint handles modes and job commands; separate modules handle streaming execution, observations and state locking, product identity (`identity.mjs`), the cross-harness installer (`install.mjs`) and the account pool (`accounts.mjs`, `pool/`). Skills call the companion, and `templates/` holds the shared prompts.
300
+ - **Canonical skills are the source of truth**: edit personas in `skills/`, never in `pi-skills/` or `opencode-skills/`. Run `npm run generate:skills` to generate both host entrypoints, and `npm run check:skills` to verify consistency. The existing `generate:pi` and `check:pi` commands remain available. Use `npm run pack:checked` to check freshness before packing; publishing also runs the check.
301
+
302
+ Adding a mode or a flag changes the public surface, so please open an issue first and we can agree on the shape.
303
+
304
+ ### Releasing
305
+
306
+ Releases are published by [the Release workflow](.github/workflows/release.yml) through npm trusted publishing: GitHub's OIDC identity proves the build, so no npm token is stored anywhere, and every version carries a provenance statement.
307
+
308
+ 1. Bump the version in `package.json`, `.claude-plugin/plugin.json` and `.codex-plugin/plugin.json`, and add `docs/releases/vX.Y.Z.md`.
309
+ 2. Commit, then tag and push: `git tag vX.Y.Z && git push origin master vX.Y.Z`.
310
+ 3. The workflow checks that the tag matches every version field and that the release notes exist, runs `check:skills` and the test suite, publishes to npm (a version with a `-` suffix goes to the `next` dist-tag), and creates the GitHub Release from the notes file. A version already on npm is skipped, so re-running is safe; `workflow_dispatch` re-runs an existing tag.
311
+
312
+ One-time setup for a fork or a new maintainer: enable Actions on the repository, publish the first version manually (`npm publish`; npm only lets you configure a trusted publisher on a package that exists; npm may stage that upload behind a `0.0.0-stage` placeholder until you approve it on npmjs.com), then on npmjs.com open the package settings, add a trusted publisher of type GitHub Actions with this repository and the workflow file `release.yml`, and under publishing access choose to require two-factor authentication and disallow tokens.
313
+
314
+ ## License
315
+
316
+ MIT — see [LICENSE](LICENSE) and [NOTICE](NOTICE). Original copyright Keli (pkuwkl); fork changes by pStrikeZ.