@team-ai/teamai-cli 0.40.4 → 0.40.5
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/CHANGELOG.md +17 -1
- package/README.ja.md +15 -13
- package/README.ko.md +15 -13
- package/README.md +15 -13
- package/README.th.md +15 -13
- package/README.zh-CN.md +15 -13
- package/dist/cli.js +111939 -106102
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +3 -2
- package/skill-data/core/references/commands.md +21 -15
- package/skill-data/core/references/contribute-member.md +3 -3
- package/skill-data/core/references/troubleshooting.md +13 -1
- package/skill-data/setup/references/join-member.md +2 -2
- package/skill-data/setup/references/manage-admin.md +6 -5
- package/skill-data/setup/references/setup-admin.md +6 -3
- package/skill-data/setup/references/uninstall.md +2 -1
- package/skill-data/share/SKILL.md +19 -2
- package/skill-data/share/references/doc-template.md +1 -0
- package/skill-data/wiki/references/phases/phase0-init.md +1 -1
- package/skill-data/workflow/SKILL.md +6 -4
- package/skill-data/workflow/references/hosts.md +1 -1
- package/skill-data/workflow/references/judging.md +11 -0
- package/skill-data/workflow-local/SKILL.md +3 -3
- package/skill-data/workflow-local/references/ci.md +13 -0
package/package.json
CHANGED
package/skill-data/core/SKILL.md
CHANGED
|
@@ -16,8 +16,9 @@ do not skip, reorder, or invent commands.
|
|
|
16
16
|
Look at what the user typed after `/teamai`.
|
|
17
17
|
|
|
18
18
|
**If they gave NO scenario right after a TeamAI friction reminder** (the
|
|
19
|
-
`[teamai]` line that
|
|
20
|
-
|
|
19
|
+
`[teamai]` line that offers the `session-close` workflow, or suggests
|
|
20
|
+
`/teamai share what this session taught me`), that reminder is the scenario:
|
|
21
|
+
do what it says.
|
|
21
22
|
|
|
22
23
|
**If they gave NO scenario otherwise** (bare `/teamai`, or only greetings/no task):
|
|
23
24
|
print the menu below **exactly**, then **STOP and wait**. Take no other action —
|
|
@@ -22,14 +22,14 @@ Generated: do not edit by hand. Regenerate with
|
|
|
22
22
|
- `--http <url>` — Git-free HTTP team repo (read-only consumer; only needs an API key)
|
|
23
23
|
- `--provider <name>` — Git provider for the team repo on this machine: tgit, github, cnb, gitlab, gitcode, or git. Skips auto-detection. `git` uses your existing Git auth and needs no platform token, but opens no PR/MR.
|
|
24
24
|
- `--self` — Single-repo mode: the current git repo is the team repo (equivalent to `teamai init .`). Knowledge lives on main under .teamai/; reports go to the teamai-reports orphan branch.
|
|
25
|
-
- `--token <key>` — API key for HTTP team repo / status reporting (stored 0600, never committed). Also reads TEAMAI_API_TOKEN. With --http and a single --agent, an agent access token (sk-) is kept for that agent only, next to the other agents' tokens (--force keeps them too); while that agent's current token still works it is kept and the new one is not used.
|
|
25
|
+
- `--token <key>` — API key for HTTP team repo / status reporting (stored 0600, never committed). Also reads TEAMAI_API_TOKEN. With --http and a single --agent, an agent access token (sk-) is kept for that agent only, next to the other agents' tokens (--force keeps them too); while that agent's current token still works it is kept and the new one is not used. Without --agent on a machine where one agent already holds a token, that agent takes it, or — keeping its working one — the new token serves the tools without a token of their own.
|
|
26
26
|
- `--scope <scope>` — Install scope: workspace (default, <cwd>/.teamai + <cwd>/.claude) or user (~/.teamai + ~/.claude); project is the older name for workspace
|
|
27
27
|
- `--inherit-user-scope` — In workspace scope, also sync safe user-scope resources, load its env variables (not its secrets) in the workspace, and search its knowledge
|
|
28
28
|
- `--no-inherit-user-scope` — Disable user-scope inheritance for this workspace
|
|
29
29
|
- `--role <id>` — Primary role ID (e.g. hai_dev) for non-interactive setup
|
|
30
30
|
- `--project <ids>` — Active logical project(s) from manifest/projects.yaml (comma-separated); scopes which project resources and learnings this directory syncs. Pass "all" to activate every project the manifest declares (a snapshot taken now)
|
|
31
31
|
- `--agent <name>` — AI tools to set up (e.g. claude, codex, cursor, codebuddy, workbuddy, dsh). Repeatable or comma-separated. In single-repo mode, selects which tool dirs to create; a custom agent defined only in teamai.yaml's toolPaths also gets its root created here (git-backed init only — an HTTP init has no local teamai.yaml to read custom paths from). Omit for an interactive picker. Additive on repeated runs.
|
|
32
|
-
- `--force` —
|
|
32
|
+
- `--force` — Rewrite the existing config without confirmation, keeping the settings init does not set
|
|
33
33
|
|
|
34
34
|
## push
|
|
35
35
|
|
|
@@ -56,7 +56,7 @@ Generated: do not edit by hand. Regenerate with
|
|
|
56
56
|
|
|
57
57
|
## list
|
|
58
58
|
|
|
59
|
-
- `teamai list [type]` — List resources (skills|rules|docs|env|agents|hooks|mcp). For skills, --source local/all also scans installed AI agent skill directories.
|
|
59
|
+
- `teamai list [type]` — List resources (skills|rules|docs|env|agents|hooks|mcp|workflows). For skills, --source local/all also scans installed AI agent skill directories. Workflows show their source: team, teamai's default, or not runnable.
|
|
60
60
|
- `--source <src>` — Where to look for skills: repo | local | all
|
|
61
61
|
- `--agent <name>` — Filter local agents by id (only applies to skills)
|
|
62
62
|
- `--reveal` — Show env values in plaintext (default: masked)
|
|
@@ -225,14 +225,14 @@ Generated: do not edit by hand. Regenerate with
|
|
|
225
225
|
## workflow
|
|
226
226
|
|
|
227
227
|
- `teamai workflow` — Run a validated workflow from workflows/<name>.yaml. Writable steps may set deliver: pr to open review requests; TeamAI never merges them.
|
|
228
|
-
- `teamai workflow start <name>` — Create a run. With --driver skill, the current coding session drives it; with --driver local, this process runs it headless.
|
|
228
|
+
- `teamai workflow start <name>` — Create a run. With --driver skill, the current coding session drives it; with --driver local, this process runs it headless, and in unattended mode (TEAMAI_MODE=unattended or CI) runs teamai score --drain once the run settles, before it exits, unless sessions.publish and session scoring are both off for unattended.
|
|
229
229
|
- `--describe` — Show workflow metadata and required input schemas without creating a run. With --driver skill, also say how to start it: the start command, a question for the person, or the local driver.
|
|
230
230
|
- `--driver <kind>` — Select skill for the current coding session, which then runs the commands each reply prints, or local for headless execution in this process.
|
|
231
231
|
- `--parallel <n>` — With --driver skill: the most steps that run at once, as the describe reply offered
|
|
232
232
|
- `--confirmed` — The person agreed to start this run, as the describe reply asked. From an agent session, an invoke: ask workflow starts only with it, with any driver; teamai takes the agent's word for it. In an unattended run (TEAMAI_MODE=unattended or CI) an agent cannot start an invoke: ask workflow, with or without it
|
|
233
|
-
- `--hitl <mode>` — With --driver skill: who answers optional approvals and choices, as the describe reply offered: person (the agent asks the person) or recommend (the agent answers). A required approval always goes to the person
|
|
233
|
+
- `--hitl <mode>` — With --driver skill: who answers optional approvals and choices, as the describe reply offered: person (the agent asks the person; refused in an unattended run) or recommend (the agent answers). A required approval always goes to the person
|
|
234
234
|
- `--no-judge` — With --driver skill: leave the scored steps unjudged on this machine, as the describe reply offered
|
|
235
|
-
- `--tools <list>` — Override local prompt tools for this run, as comma-separated name=tool pairs
|
|
235
|
+
- `--tools <list>` — Override local prompt tools for this run, as comma-separated name=tool pairs. With --driver skill: only default=<tool>, the tool this coding session works in, which judges its scored steps and which its steps' models resolve for when teamai installs agents for it. Pass it when the describe reply says the session names no tool
|
|
236
236
|
- `--auto-approve` — Answer optional approve HITL requests yes and choose requests with their default: with --driver local in this process, with --driver skill for this run. A required approval still goes to the person
|
|
237
237
|
- `--inputs <json>` — Values for the inputs the workflow declares, as a JSON object, for example {"issue":42}. Every declared input is required.
|
|
238
238
|
- `teamai workflow next <run>` — Get a lease, hitl, wait, or done JSON envelope. Show hitl.message and hitl.respond to a person, who replaces <option> with a choice.
|
|
@@ -257,23 +257,24 @@ Generated: do not edit by hand. Regenerate with
|
|
|
257
257
|
- `--note <text>` — Keep a note with the answer, readable as steps.<id>.note
|
|
258
258
|
- `--pass <n>` — Answer only this positive pass number; rejects an answered or replaced HITL request
|
|
259
259
|
- `teamai workflow retry <run> <step>` — Retry a leased or stopped step, or a HITL request to answer it again, with a new pass and revision. A failed pull request delivery is retried in the same pass, without running the step again. Reopen its dependent steps and a settled run; keep earlier passes. After reopening, run resume or let your driver poll next. Prints one JSON envelope.
|
|
260
|
-
- `teamai workflow resume
|
|
260
|
+
- `teamai workflow resume [run]` — Continue a run with the local driver after retry, respond, or a stopped driver (Ctrl-C or closed terminal). Uses this machine's open local lease workspace, then the latest local driver's workspace on this machine, then cwd. Another live local driver returns driver_running. A settled run returns done. A run this machine does not have is taken from teamai-reports, where workflow publish put it; a published run continues only while this install owns it, else not_owner names the owner. With --driver skill, the current coding session continues the run instead, as after a skill start, and the reply is its first turn. In unattended mode, the local driver runs teamai score --drain once the run settles, as start does. Without a run id, fetches teamai-reports as pull does and lists the runs this checkout can resume: the runs teamai-reports offers for its business repository (origin), each with what holds it back, and this machine's running runs, each with the command to resume it.
|
|
261
|
+
- `--next` — Instead of a run id: take the oldest run teamai-reports offers for this checkout's business repository (origin) that nothing refuses this caller, claim it, and drive it as resume <run> does; a workflow publish offers a running run until someone claims it. When nobody here would answer (an unattended run, TEAMAI_MODE=unattended or CI, or the local driver with no terminal) it skips a run whose steps left need a person: a required approval, an interactive step, or a choice with no default. It skips a run whose steps left require env with no value here and, with the local driver, one whose prompt steps left have no tool to run on here: none configured, or not on PATH; resume without --next lists each as cannot run here, with what gives it, and --next says on stderr why it left each run. With --driver skill it also skips a run that needs the local driver. Prints {"data":{"idle":{"offered":N}}} when it takes none, N being the offered runs it left
|
|
261
262
|
- `--driver <kind>` — local, the default, to drive the run in this process, or skill for the current coding session, which then runs the commands each reply prints. An agent runs it only when the person agrees
|
|
262
263
|
- `--parallel <n>` — With --driver skill: the most steps that run at once; 1 when left out
|
|
263
|
-
- `--hitl <mode>` — With --driver skill: who answers optional approvals and choices: person (the agent asks the person; the default) or recommend (the agent answers). A required approval always goes to the person
|
|
264
|
+
- `--hitl <mode>` — With --driver skill: who answers optional approvals and choices: person (the agent asks the person; the default, refused in an unattended run) or recommend (the agent answers). A required approval always goes to the person
|
|
264
265
|
- `--no-judge` — With --driver skill: leave the scored steps unjudged on this machine
|
|
265
|
-
- `--tools <list>` — Override local prompt tools for this run, as comma-separated name=tool pairs
|
|
266
|
+
- `--tools <list>` — Override local prompt tools for this run, as comma-separated name=tool pairs. With --driver skill: only default=<tool>, the tool this coding session works in, which judges its scored steps and which its steps' models resolve for when teamai installs agents for it. Pass it when the describe reply says the session names no tool
|
|
266
267
|
- `--auto-approve` — Answer optional approve HITL requests yes and choose requests with their default: with --driver local in this process, with --driver skill for this run. A required approval still goes to the person
|
|
267
268
|
- `--claim` — Take the published run over from the install that owns it, replacing this machine's copy and releasing its leases
|
|
268
269
|
- `--confirmed` — The person agreed to continue this run, as the confirm_needed answer asked. From an agent session, a run of an invoke: ask workflow continues only with it, with any driver; teamai takes the agent's word for it. In an unattended run (TEAMAI_MODE=unattended or CI) an agent cannot continue a run of an invoke: ask workflow, with or without it
|
|
269
|
-
- `teamai workflow publish <run>` — Publish a run's state to teamai-reports so another member or a runner can continue it with workflow resume. The first publish makes this install the run's owner; publishing an unchanged run writes nothing. Refuses a run with records not yet on teamai-reports, or with a value that looks like a secret. Prints one JSON envelope listing the leases still in flight.
|
|
270
|
+
- `teamai workflow publish <run>` — Publish a run's state to teamai-reports so another member or a runner can continue it with workflow resume. A running run published from a checkout of its business repository (origin) is also offered: the first workflow resume --next in a checkout of that repository claims it, and any claim, or the owner's own workflow resume, takes the offer away, so two runners never take one run. Publish once you stop driving the run. The first publish makes this install the run's owner; publishing an unchanged run writes nothing. Refuses a run with records not yet on teamai-reports, or with a value that looks like a secret. Prints one JSON envelope with offered, and listing the leases still in flight.
|
|
270
271
|
- `--sessions` — Also put the agent sessions that the run's unsettled steps continue (session: continue or session.from) in the team session archive, scrubbed, so whoever continues the run resumes them; listed in the envelope as sessions. Without it, those steps start new sessions on another machine
|
|
271
272
|
- `teamai workflow cancel <run> [step]` — Cancel a whole run, or a pending, waiting, leased, running, or delivering step and its open descendants. Invalidates leases; drivers stop tools listed in next.cancelled. Prints one JSON envelope.
|
|
272
273
|
|
|
273
274
|
## score
|
|
274
275
|
|
|
275
|
-
- `teamai score` — Judge workflow passes with team scorers (scorers/<name>.md). Any driver takes judge work with --next, runs its own judge on the lease prompt with the lease evidence directory as its only readable root and settles it with --lease <ref> --submit, or judges it here with --lease <ref>. --run <id> --step <path> --scorer <name> judges a pass on demand. --scorer <name> [--session <id>] judges a finished agent session here: the one --session names, or, inside a session, the one its agent session variable names; it never guesses. workflow next never hands out judge work, and a driver never lists a judge ref in workflow next running. Prints one JSON envelope.
|
|
276
|
-
- `--next` — Take judge work: workflow passes first, then finished sessions
|
|
276
|
+
- `teamai score` — Judge workflow passes with team scorers (scorers/<name>.md). Any driver takes judge work with --next, runs its own judge on the lease prompt with the lease evidence directory as its only readable root and settles it with --lease <ref> --submit, or judges it here with --lease <ref>. --run <id> --step <path> --scorer <name> judges a pass on demand. --scorer <name> [--session <id>] judges a finished agent session here: the one --session names, or, inside a session, the one its agent session variable names; it never guesses. --team-session <name> judges a session a member pushed instead. --label <value> labels the session by hand instead of judging it. With --json, it leases that session to the driver's own judge instead. workflow next never hands out judge work, and a driver never lists a judge ref in workflow next running. Prints one JSON envelope; --drain prints lines.
|
|
277
|
+
- `--next` — Take judge work: workflow passes first, then finished sessions of each run mode whose scoring.sessions policy is auto (config.yaml, else scorers/scoring.yaml; by default off attended, auto unattended). An attended session is finished 6 hours after its last activity, an unattended one once a score --drain reached it. A lease has ref, source (workflow or session), scorer, subject, evidence, prompt, answer.schema, expiresAt, the cwd to submit from and a submit command line; else idle with counts. A batch lease, for scorers of one pass that share a judge call, has scorers and batched: true instead of scorer. --json {"driver":{"kind":"t3","machine":"host","workspace":"/work","can":{"judge":{"isolation":"verified","access":"read","tools":["claude"]}}},"running":["<ref>"]}. isolation is verified or best-effort; access is what your judge can do, answer (no tools), read (reads the evidence) or full (any tool), default full, and its labels record it; tools in your order of preference. running lists the judge refs you still run, which renews them; a live workflow lease of yours left out is handed back, and a session lease left out lapses: a session is judged once. A lease lapses 30 minutes after it was taken or renewed. Optional: run, a run id, to take only that run's workflow passes and never a session, from any directory, since the run's scope is found by its id; canTakeLease, false to renew running and take nothing, not even a lease handed back.
|
|
277
278
|
- `--lease <ref>` — The judge lease, as --next printed it (s<13 hex>/a<8 hex>). Without --submit, judge it here with the tool the lease names, in a confined profile, and settle it through the submit path: --json {"driver":{…same as --next…}}.
|
|
278
279
|
- `--submit` — Settle --lease <ref> with the payload {"driver":{…same as --next…},"outcome":"success","answer":{"label":"<one of answer.schema>","reasoning":"…"},"judge":{"tool":"claude","model":"…","usage":{"inputTokens":0,"outputTokens":0}}}. For a batch lease, answer is {"<scorer>":{"label":"…","reasoning":"…"},…} with one entry per scorer. outcome is success, failed, or released. A label a scorer does not list is refused, the whole answer with it, and the lease stays open; teamai computes score and passed.
|
|
279
280
|
- `--json <payload>` — The payload as a JSON string
|
|
@@ -281,12 +282,16 @@ Generated: do not edit by hand. Regenerate with
|
|
|
281
282
|
- `--run <id>` — Judge a pass of this run on demand, whatever sampling says, with --step and --scorer; this also reopens judge work that failed or expired. Without --queue, judges it here with the local judge and prints the label.
|
|
282
283
|
- `--step <path>` — With --run: the step path, such as review or check.review
|
|
283
284
|
- `--pass <n>` — With --run: the pass to judge; default the step's latest succeeded pass
|
|
284
|
-
- `--session <id>` — Judge this finished session of an agent tool on this machine, whatever sampling says, with --scorer. Prints the session's first prompt and directory first, then the label; the session and the judge's reasoning are never published.
|
|
285
|
+
- `--session <id>` — Judge this finished session of an agent tool on this machine, whatever sampling says, with --scorer. Prints the session's first prompt and directory first, then the label; the session and the judge's reasoning are never published. With --json {"driver":{…same as --next…}}, prints a lease for your own judge, as --next does, instead of judging here; several --scorer need --batch. The lease is taken whatever sampling, the six idle hours, scoring.sessions, the scorer's sessions, an earlier label or daily_limit say, and counts toward the day's daily_limit. Nothing is taken when a scorer asks for more isolation than can.judge offers (isolation_unmet), when none of its tools runs a scorer's model (judge_model_unavailable), or while a live lease holds the work (busy).
|
|
285
286
|
- `--source <platform>` — With --session: the tool that holds it, as session migrate --source names it (claude-code, codex, opencode, …); needed unless the agent session variable names that session, or the captures its session-start hook wrote here name one platform for it
|
|
287
|
+
- `--team-session <name>` — Judge a session a member pushed with session push instead of one on this machine, by the name session list prints for this directory's repository: read from teamai-reports, else from the archive the team kept on its default branch before, and redacted before a judge reads it. Run session pull first for the newest. Its label is about the session where it ran, so it pairs with that session's labels from the machine that ran it, and records no agent. Not with --session, --source or --json
|
|
288
|
+
- `--author <name>` — With --team-session: who pushed it, when two members pushed a session with that name
|
|
289
|
+
- `--label <value>` — Label the session by hand with this value of the one --scorer: no judge runs, score and passed come from the scorer, and no reasoning is kept. A value the scorer does not list fails and lists the ones it does. A hand label and a model label of a session are kept side by side, so rescoring with the model never replaces yours; the dashboard Scorers page shows how often the model judge agrees with hand labels. Not with a scorer file, --batch or --json
|
|
286
290
|
- `--scorer <name>` — With --run: a scorer the run pinned or one teamai pull cached. With --session, or alone inside a session: a scorer teamai pull cached, or a scorer file to try before pushing it: a path with / or ending in .md. A file's label is never stored, so it takes no --push; the output adds the labels stored for its scorer (stored) and its verdict on the session's first prompt alone (control). Repeatable.
|
|
287
291
|
- `--queue` — With --run: leave the work to any driver's score --next instead of judging it here
|
|
288
292
|
- `--batch` — With --run or --session: the scorers share one judge call when they resolve to the same tool and model
|
|
289
293
|
- `--push` — Publish every pending label of this machine to scores/<member>/<YYYY-MM>.jsonl on teamai-reports, alone or after --session. Labels only: never the session, the prompt or the judge's reasoning. With usage reporting off, or when the push fails, they stay pending for the next --push.
|
|
294
|
+
- `--drain` — What every unattended job runs before it ends, alone, in every scope this directory reaches: in unattended mode, finish each session captured unattended here; judge each pass and session a judge tool here can take, a failed judgment final and never retried; publish pending labels; where sessions.publish is auto for this run mode, archive, scrubbed, its finished sessions and the step sessions of its ended runs on teamai-reports; report usage to stats/<member>.yaml. Prints a line per kind of work and what it left for other drivers; exits 1 only when a judgment or a publish failed, and what stayed pending goes on the next --drain.
|
|
290
295
|
|
|
291
296
|
## hooks
|
|
292
297
|
|
|
@@ -369,9 +374,10 @@ Generated: do not edit by hand. Regenerate with
|
|
|
369
374
|
- `--json` — Print one {data}|{error} JSON envelope on stdout; never prompts (needs a session id, -s and -t)
|
|
370
375
|
- `teamai session push` — Push local sessions to the team repo
|
|
371
376
|
- `--source <platform>` — Source platform to read sessions from
|
|
377
|
+
- `--session <id>` — Push only this session of --source, from any workspace, redacted, without prompting, to teamai-reports of the teamai install for this directory (not with --all or --repo-root)
|
|
372
378
|
- `--repo-root <path>` — Team repo clone that holds the session archive (default: the teamai install for this directory, else your user install)
|
|
373
379
|
- `--cwd <path>` — Working directory (defaults to current directory)
|
|
374
|
-
- `--limit <n>` — Max sessions to push (default: 5; ignored with --all)
|
|
380
|
+
- `--limit <n>` — Max sessions to push (default: 5; ignored with --all or --session)
|
|
375
381
|
- `--all` — Push every session of the platform across all workspace directories (ignores --limit)
|
|
376
382
|
- `-y, --yes` — Skip confirmation prompts, including archiving unredacted transcripts (--all)
|
|
377
383
|
- `--scrub` — Redact secrets before archiving (archived sessions are team-readable)
|
|
@@ -419,7 +425,7 @@ Generated: do not edit by hand. Regenerate with
|
|
|
419
425
|
- `--file <path>` — Path to the contribution document
|
|
420
426
|
- `--title <title>` — Title for the contribution document
|
|
421
427
|
- `--namespace <ns>` — Write to an active learnings namespace, or to the shared root with "" (default: the only active namespace, or the shared root when none or several are active)
|
|
422
|
-
- `--session-id <id>` — Session
|
|
428
|
+
- `--session-id <id>` — Session the learning came from (default: the agent's session, e.g. $CLAUDE_CODE_SESSION_ID). Recorded as `session` in the learning and counted as that session's outcome. Inside a workflow attempt, the learning is also recorded on the step
|
|
423
429
|
- `--scope <scope>` — Target scope: user or workspace
|
|
424
430
|
|
|
425
431
|
## recall
|
|
@@ -16,9 +16,9 @@ thing now.
|
|
|
16
16
|
## Which kind of contribution?
|
|
17
17
|
|
|
18
18
|
- **A learning** (a lesson, a gotcha, how you solved something) → this is
|
|
19
|
-
**automatic** once recall is on (off by default) and the teamai config loads: TeamAI prompts at the end of a session worth sharing and
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
**automatic** once recall is on (off by default) and the teamai config loads: TeamAI prompts at the end of a session worth sharing and
|
|
20
|
+
offers the `session-close` workflow, whose learning step runs the `share` skill
|
|
21
|
+
(`teamai skill get share`) to summarize the session before `teamai contribute`. The user does not come through this flow
|
|
22
22
|
for it. (Step A below is only a manual fallback for while recall is off.)
|
|
23
23
|
- **A reusable skill** (a `SKILL.md` others invoke) → author the skill, then
|
|
24
24
|
`teamai push` (Step B — the main purpose of this reference).
|
|
@@ -260,6 +260,11 @@ teamai doctor # flags tools whose hooks are missing
|
|
|
260
260
|
teamai hooks list # per-tool status + the settings file it checked
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
+
Under each team hook, `hooks list` prints `runs in:` and `not in:`. A tool in
|
|
264
|
+
`not in:` has no hook on that event (Cursor has no `PreToolUse`; OpenCode, Oh My
|
|
265
|
+
Pi, Pi, OpenClaw, Kiro and Hermes run only `SessionStart`, `UserPromptSubmit`,
|
|
266
|
+
`PreToolUse`, `PostToolUse` and `Stop`), so the hook does not run there.
|
|
267
|
+
|
|
263
268
|
What you will typically see, and why (this is expected CLI behaviour, **not** a
|
|
264
269
|
broken machine):
|
|
265
270
|
|
|
@@ -399,6 +404,10 @@ built-in and enterprise plugins support both OpenCode 1.18.23 (`server`) and V2
|
|
|
399
404
|
|
|
400
405
|
- Re-run the failing command with `-v` / `--verbose` for detail.
|
|
401
406
|
- `teamai status` shows exactly how local differs from the team repo.
|
|
407
|
+
- If status shows `auto-report: pending since <time>`, report data is still
|
|
408
|
+
local after an unconfirmed push. Run `teamai pull --verbose` to retry and
|
|
409
|
+
see the cause. A successful report, or a pull after reporting is disabled,
|
|
410
|
+
clears the notice. Disabling reporting keeps the local data.
|
|
402
411
|
- Report unexpected behavior at https://github.com/Tencent/teamai-cli/issues
|
|
403
412
|
with the agent name, platform, and the step that failed.
|
|
404
413
|
|
|
@@ -425,7 +434,10 @@ An HTTP prompt sync that cannot clean retired blocks reports a failed ACK and
|
|
|
425
434
|
keeps its previous cache and manifest for the server's retry.
|
|
426
435
|
OpenClaw HTTP prompts require an existing resolved user workspace, but not an
|
|
427
436
|
existing `AGENTS.md`: the prompt sync creates that file and preserves personal
|
|
428
|
-
text already in it.
|
|
437
|
+
text already in it. When the server sends no workspace and `openclaw.json` is
|
|
438
|
+
not plain JSON, OpenClaw is skipped and the ACK names that reason; the ACK
|
|
439
|
+
fails only when no tool received the prompt. Make the file plain JSON, then
|
|
440
|
+
retry.
|
|
429
441
|
|
|
430
442
|
OpenCode registration saves ownership before activating a new config entry.
|
|
431
443
|
If the state write fails, repair the state directory's permissions and retry
|
|
@@ -179,8 +179,8 @@ Summarize the outcome **in the user's own language** (global rule 1). Cover:
|
|
|
179
179
|
tool keeps their team skills up to date; no commands needed.
|
|
180
180
|
2. **Sharing a session learning is automatic — no command to remember.** When a
|
|
181
181
|
session produced something worth sharing, TeamAI **prompts them on its own** (at
|
|
182
|
-
the end of the session) and the `
|
|
183
|
-
summarize and contribute it. They do **not** invoke `/teamai` for this. (This
|
|
182
|
+
the end of the session) and offers the `session-close` workflow, whose learning step
|
|
183
|
+
runs the `share` skill (`teamai skill get share`) with them to summarize and contribute it. They do **not** invoke `/teamai` for this. (This
|
|
184
184
|
prompt only appears when recall is on — it is off by default; the admin turns it
|
|
185
185
|
on in `teamai.yaml` (`sharing.recall.enabled`), a member with `teamai recall enable` — and the admin has not switched the
|
|
186
186
|
reminder off in `teamai.yaml`. It also stays silent while their teamai config
|
|
@@ -214,7 +214,7 @@ same filter.
|
|
|
214
214
|
Wiki codebase slugs follow the same rule under `resources.wiki`: once any role
|
|
215
215
|
or project lists a `teamwiki/evidence/code/<slug>/` slug there, `recall` only
|
|
216
216
|
surfaces it for members with that namespace active; an undeclared slug stays
|
|
217
|
-
shared. The slug is
|
|
217
|
+
shared. The slug is the `project:` value that `teamai import` prints, not
|
|
218
218
|
necessarily the project's manifest id.
|
|
219
219
|
|
|
220
220
|
## Keep delivered files out of git
|
|
@@ -241,7 +241,7 @@ teamai dashboard # start the AI coding session dashboard (default po
|
|
|
241
241
|
teamai dashboard --port 8080 # custom port
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
Opens a local web UI for team coding-session activity and knowledge-base health.
|
|
244
|
+
Opens a local web UI for team coding-session activity, workflow runs, scorer pass rates, and knowledge-base health.
|
|
245
245
|
|
|
246
246
|
## Team packages (npm + Claude plugins)
|
|
247
247
|
|
|
@@ -329,9 +329,10 @@ has no session-start hook, they run `teamai pull` manually.
|
|
|
329
329
|
Turning a tricky fix into team knowledge is **automatic** once recall is on for
|
|
330
330
|
the team (`sharing.recall.enabled: true` in `teamai.yaml`, then `teamai push`; it is
|
|
331
331
|
off by default, and `teamai recall enable` turns it on for one machine only): at the end of a session
|
|
332
|
-
worth sharing, TeamAI prompts the member and the
|
|
333
|
-
`share`
|
|
334
|
-
|
|
332
|
+
worth sharing, TeamAI prompts the member and offers the `session-close` workflow:
|
|
333
|
+
its learning step runs the `share` skill (`teamai skill get share`) to summarize the
|
|
334
|
+
session, and its contribute step runs `teamai contribute`. A team file
|
|
335
|
+
`workflows/session-close.yaml` replaces teamai's default. Nobody has to invoke it by hand. (A member whose teamai config
|
|
335
336
|
cannot be loaded gets no prompt; `teamai skill get share` names the file and the error.)
|
|
336
337
|
|
|
337
338
|
Teams that work in English set `language: en` in `teamai.yaml` and `teamai push`.
|
|
@@ -242,7 +242,8 @@ needs permission to clone it and to push branches. Leave the default branch
|
|
|
242
242
|
protected. They open pull requests against it.
|
|
243
243
|
|
|
244
244
|
`teamai push` pushes a feature branch and opens a pull request. Reports and
|
|
245
|
-
learnings use the branches `teamai-reports` and `teamai-learnings
|
|
245
|
+
learnings use the branches `teamai-reports` and `teamai-learnings`, and pushed
|
|
246
|
+
sessions live on `teamai-reports`.
|
|
246
247
|
|
|
247
248
|
Do this before handing off the invite line below. Without branch access,
|
|
248
249
|
`teamai init` or `teamai push` fails with a permission error.
|
|
@@ -286,8 +287,10 @@ day-to-day work — they can keep letting the AI run things for them:
|
|
|
286
287
|
`/teamai Share this <skill-name> skill with my team` — see
|
|
287
288
|
`"$(teamai skill path core)/references/contribute-member.md"`.
|
|
288
289
|
- Sharing a **session's learnings** needs no command from them: TeamAI prompts on
|
|
289
|
-
its own at the end of a session worth sharing
|
|
290
|
-
(`teamai skill get share`)
|
|
290
|
+
its own at the end of a session worth sharing and offers the `session-close`
|
|
291
|
+
workflow, whose learning step runs the `share` skill (`teamai skill get share`)
|
|
292
|
+
with them; once they confirm, it can also publish and score the session. A team
|
|
293
|
+
replaces it with its own `workflows/session-close.yaml`. (Only once recall is on — off by default;
|
|
291
294
|
turn it on team-wide with `sharing.recall.enabled: true` in `teamai.yaml`, then
|
|
292
295
|
`teamai push`. Never on a read-only HTTP source, or while a member's teamai
|
|
293
296
|
config cannot be loaded. A team that works in English also sets `language: en`
|
|
@@ -118,7 +118,8 @@ and give it your team repo URL."*
|
|
|
118
118
|
does, run `teamai hooks remove` in the project first: it removes them.
|
|
119
119
|
Targeted project Codex uninstall keeps project config and records its
|
|
120
120
|
exclusion, even without local resources. Legacy project hook copies go.
|
|
121
|
-
User-scope uninstall removes these global channels
|
|
121
|
+
User-scope uninstall removes these global channels, the Hermes and Oh My
|
|
122
|
+
Pi ones from every home and profile teamai wrote.
|
|
122
123
|
The retained adapters respect project exclusions, including cached HTTP
|
|
123
124
|
prompt injection and HTTP sync. An excluded tool does not download its
|
|
124
125
|
resources again on the next session start.
|
|
@@ -3,13 +3,30 @@ name: share
|
|
|
3
3
|
description: >-
|
|
4
4
|
Turn a session into a team learning: summarize what was solved, discovered or worked around,
|
|
5
5
|
and publish it to the team knowledge base with `teamai contribute`. Loaded on demand by the
|
|
6
|
-
teamai discovery stub,
|
|
6
|
+
teamai discovery stub, by the learning step of the session-close workflow, and by the friction
|
|
7
|
+
reminder where session-close is not offered.
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Contribute — share what a session taught you with the team
|
|
10
11
|
|
|
11
12
|
Summarize what this AI coding session taught you and push it to the team knowledge base.
|
|
12
13
|
|
|
14
|
+
## Who sent you here
|
|
15
|
+
|
|
16
|
+
- **The `learning` step of a `session-close` run** (its brief names this skill): work steps 1–3 of
|
|
17
|
+
How It Works with the person, in this session rather than a sub-agent, and save the document
|
|
18
|
+
outside the repository. Return its path, title and learnings namespace as the brief says. Do
|
|
19
|
+
not run `teamai contribute`: the run's `contribute` step runs it after its approval.
|
|
20
|
+
- **The friction reminder** (its `[teamai]` text names `teamai skill get share`): teamai already
|
|
21
|
+
found that `session-close` cannot run here. Follow How It Works to the end.
|
|
22
|
+
- **The person asked to share a learning, or to close, publish or score this session**: start the
|
|
23
|
+
`session-close` workflow. Run `teamai workflow start --describe session-close --driver skill`,
|
|
24
|
+
give the person each proposed input with its `why`, and start it with those values once they
|
|
25
|
+
confirm or change them (`teamai skill get workflow` covers the run). Its `learning` step brings
|
|
26
|
+
you back here. When describe refuses it (`invoke_denied`, `unattended_denied`,
|
|
27
|
+
`nested_workflow`), tell the person why and follow How It Works to the end.
|
|
28
|
+
- **Anything else in When to Use**: follow How It Works to the end.
|
|
29
|
+
|
|
13
30
|
**Write the document in Simplified Chinese**, as earlier releases required. Commands, flags,
|
|
14
31
|
URLs, paths and code identifiers stay as they are.
|
|
15
32
|
|
|
@@ -50,7 +67,7 @@ teamai contribute --file /tmp/session-summary.md --title "Debugging K8s pod star
|
|
|
50
67
|
|
|
51
68
|
## Important
|
|
52
69
|
|
|
53
|
-
-
|
|
70
|
+
- Outside a `session-close` run, run this as a **sub-agent** (Agent tool) to avoid polluting the main session's context
|
|
54
71
|
- The document is pushed to the team repo's `teamai-learnings` branch, under `learnings/`, with no pull request
|
|
55
72
|
- Team members will see it on their next `teamai pull`
|
|
56
73
|
- Keep summaries concise and actionable — this is a knowledge base, not a diary
|
|
@@ -34,6 +34,7 @@ How did you solve it? What were the key steps?
|
|
|
34
34
|
| author | yes | Contributor's username | jeffyxu |
|
|
35
35
|
| date | yes | Date as YYYY-MM-DD | 2026-03-28 |
|
|
36
36
|
| tags | yes | 2-5 key tags | [k8s, oom, troubleshooting] |
|
|
37
|
+
| session | no | The session the learning came from. Leave it out: `teamai contribute` writes it | { platform: claude-code, sessionId: 7c1e… } |
|
|
37
38
|
|
|
38
39
|
### Choosing tags
|
|
39
40
|
|
|
@@ -103,7 +103,7 @@ Before the K1 deep read, use TeamAI to extract evidence-backed import/call struc
|
|
|
103
103
|
teamai import --dir <repo_abs_path> --skip-enrich
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
- Output: `teamwiki/evidence/code/<slug>/` pages and `teamwiki/evidence/code/<slug>/.indices/graph-index.json` (structural edges), merged into `teamwiki/.indices/graph-index.json`. `<slug>` is the `project:` the import prints (`<provider>__<owner>__<repo>` when the repo has an `origin`, else the repository name); reuse it for `teamai codebase --deep-enrich --project <slug>`.
|
|
106
|
+
- Output: `teamwiki/evidence/code/<slug>/` pages and `teamwiki/evidence/code/<slug>/.indices/graph-index.json` (structural edges), merged into `teamwiki/.indices/graph-index.json`. `<slug>` is the `project:` the import prints (`<provider>__<owner>__<repo>` when the repo has an `origin`, else the repository name, or `<name>-<hash8>` when another checkout without an `origin` already holds that name); reuse it for `teamai codebase --deep-enrich --project <slug>`.
|
|
107
107
|
- The source repository itself is left untouched.
|
|
108
108
|
- When K1/K2/K3 write `edges[]` in `_manifest.json`: **prefer citing** the `code-ast` edges from the import + their `evidenceRefs` (`path:line`); label Agent inferences `INFERRED`/`AMBIGUOUS`.
|
|
109
109
|
- After Phase K3, skip any extra graph compile / merge step that is not a `teamai` command. TeamAI does not ship a separate team-wiki CLI. Continue with this skill using `teamai` and the files under this skill directory. No extra plugin is required.
|
|
@@ -16,9 +16,10 @@ Run `teamai workflow start --describe <name> --driver skill` with the workflow n
|
|
|
16
16
|
Act on `data.describe.ask.kind`:
|
|
17
17
|
|
|
18
18
|
- `start`: tell the person `ask.say` when the reply has it, then run `ask.start`. In an unattended run (CI, a cloud agent) describe never asks the person; when `ask.inputs` is listed, fill `{inputs}` in `ask.start` with their values from your task, as one JSON object. The slot sits inside single quotes, so write each `'` in that JSON as `'\''`.
|
|
19
|
-
- `ask`: the question is the person's to answer, once, so the run goes on without them after. In one message, give them `ask.question.text` as it is, each entry of `ask.question.inputs
|
|
19
|
+
- `ask`: the question is the person's to answer, once, so the run goes on without them after. In one message, give them `ask.question.text` as it is, each entry of `ask.question.inputs`, and the `label` of each option as their choices. An entry with a `value` is a proposal: show it with its `why`, and say they may keep, change or empty it. An entry without one is theirs to fill in. Wait for their pick, also when an option is marked recommended. In the `start` of the option they pick, replace `{inputs}` with their answers as one JSON object, each `'` in it written as `'\''`, and run it. Those options are the whole choice: when the person wants a start none of them offers, show them the options again.
|
|
20
20
|
- `local`: tell the person `ask.reason` and give them `ask.start` for their own terminal. It is theirs to run.
|
|
21
21
|
- `denied`: tell the person `ask.reason`. Nothing is left to run here.
|
|
22
|
+
- `tool`: this session names no tool, and the run needs one. In `ask.describe`, replace `{tool}` with the entry of `ask.tools` for the tool you work in, run it, and act on its reply instead. When none of them is the tool you work in, tell the person `ask.reason`.
|
|
22
23
|
|
|
23
24
|
Done when a reply carries `data.turn` with a `run` id, or the person has `ask.reason`.
|
|
24
25
|
|
|
@@ -36,6 +37,7 @@ A turn lists the `actions` that wait for you, the `running` attempts, the `event
|
|
|
36
37
|
Done when a turn has no `then`.
|
|
37
38
|
|
|
38
39
|
In an unattended run nobody reads you: step 2 is for your own log, and you ask nothing. Keep running `then` until a turn has none, also after `done` while it carries `judging`, so the judge's label lands before your session ends.
|
|
40
|
+
Run `teamai score --drain` before your session ends.
|
|
39
41
|
|
|
40
42
|
An unattended session that reaches a `handoff` reports that the run waits for a person, and stops.
|
|
41
43
|
|
|
@@ -47,7 +49,7 @@ A `report` you run answers with `data.runner`, not a turn. After one, go on with
|
|
|
47
49
|
|
|
48
50
|
A `choose` action asks for one answer, and `about` says what it is for:
|
|
49
51
|
|
|
50
|
-
- `host`: comes once per run that has prompt steps. Follow `reference`: it says which option fits your host and how to run it.
|
|
52
|
+
- `host`: comes once per run that has prompt steps, or that you judge. Follow `reference`: it says which option fits your host and how to run it.
|
|
51
53
|
- `gate`: an optional approval or choice at `step`. `decide` says whose answer it is, as the person picked when the run started:
|
|
52
54
|
- `person`: put `question` and the `choice` of each option to the person, naming `default` when there is one, and run the `run` of the option they pick.
|
|
53
55
|
- `agent`: run the `run` of the option you recommend from what the run has done so far, and tell the person in one line what you chose and why.
|
|
@@ -111,11 +113,11 @@ Done when the turn carries a `dispatch` for its `attempt`.
|
|
|
111
113
|
|
|
112
114
|
## Done
|
|
113
115
|
|
|
114
|
-
The `done` action carries the `outcome`, the pull requests the run opened in `prs`, and the `failure` when there is one. Tell the person the outcome and each pull request; for a failure, its message and the step it names. The steps are over. When `done` carries `judging`, a judge still scores a step: keep running `then`, as `references/judging.md` says.
|
|
116
|
+
The `done` action carries the `outcome`, the pull requests the run opened in `prs`, and the `failure` when there is one. Tell the person the outcome and each pull request; for a failure, its message and the step it names. The steps are over. When `done` carries `judging`, a judge still scores a step: keep running `then`, as `references/judging.md` says. When `done` carries `score`, judge the run's scored steps yourself, as `references/judging.md` says.
|
|
115
117
|
|
|
116
118
|
## Errors
|
|
117
119
|
|
|
118
|
-
A reply with `error` carries `code`, `message` and `next`. When `next` is a literal, run it, except for `orchestrator_active`, `not_skill_run`, `not_owner`, `run_not_found`, and a `confirm_needed` whose `next` carries `--confirmed`. When it is null, tell the person `message`: only they can act on it.
|
|
120
|
+
A reply with `error` carries `code`, `message` and `next`. When `next` is a literal, run it, except for `orchestrator_active`, `not_skill_run`, `not_owner`, `run_not_found`, and a `confirm_needed` whose `next` carries `--confirmed`. When `next` holds `{tool}`, replace it with the id of the tool you work in before you run it, as for `ask.kind: tool`. When it is null, tell the person `message`: only they can act on it.
|
|
119
121
|
|
|
120
122
|
`agent_in_path` means an answer only the person can give came from your session. Hand the person the command `message` names, for their own terminal.
|
|
121
123
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The host question
|
|
2
2
|
|
|
3
|
-
The host question asks how this coding session starts a child agent, and so how many prompt steps the run hands out at once. Every child works from its brief in the `dir` its dispatch names. When your host starts its children in a sandbox, a container or a VM, read `sandbox.md` beside this file first.
|
|
3
|
+
The host question asks how this coding session starts a child agent, and so how many prompt steps the run hands out at once, and whether the session can judge the run in a fresh subagent. Every child works from its brief in the `dir` its dispatch names. When your host starts its children in a sandbox, a container or a VM, read `sandbox.md` beside this file first.
|
|
4
4
|
|
|
5
5
|
1. Find the most specialized way your host has to start a child agent, in this order:
|
|
6
6
|
1. App orchestration tools: a tool of the app you run in that starts a child task or thread with a prompt and a model.
|
|
@@ -11,3 +11,14 @@ A run whose steps list scorers is judged on this machine when describe found the
|
|
|
11
11
|
A `done` action that carries `judging` has a judge still open. Keep running `then` until a turn has none: each `judged` event comes in one of those turns.
|
|
12
12
|
|
|
13
13
|
The person opts out of judging before the run starts, by picking a `without judging` option of the describe question. A run keeps the judging it started with.
|
|
14
|
+
|
|
15
|
+
## Judging by this session
|
|
16
|
+
|
|
17
|
+
When `done` carries `score`, this machine has no verified judge of your tool, and you judge the run's scored steps yourself at `best-effort` isolation. A run started or resumed with `--no-judge` has no `score`, and neither has a run whose host you answered `h4`: you start no subagent, so a `judging-off` event says another driver judges it.
|
|
18
|
+
|
|
19
|
+
1. Run `score`. It answers the next `lease` of the run's judge work, or `idle` when none is left.
|
|
20
|
+
2. Judge each lease in a fresh subagent that reads only the lease's `prompt` and its `evidence` directory, never this session or the checkout, and answers in the shape of `answer.schema`.
|
|
21
|
+
3. From the lease's `cwd`, run its `submit` with the subagent's answer, the `driver` of `score`, and your tool as `judge.tool`. `teamai score --help` gives the payload. Tell the person each label. When the subagent gives no answer that fits, submit `"outcome":"released"`, tell the person, and stop judging this run: the work goes back to the queue for another driver.
|
|
22
|
+
4. Run `score` again until it answers `idle`. Work a scorer requires `verified` for stays open for another driver.
|
|
23
|
+
|
|
24
|
+
Without `score`, never judge the run's work yourself: teamai's confined judge or another driver judges it, and judging it here would downgrade verified judging to best-effort.
|
|
@@ -19,7 +19,7 @@ The local driver runs a whole run in one process on this machine: each command s
|
|
|
19
19
|
2. Start the run: `teamai workflow start <name> --driver local`, with the inputs as one JSON object in `--inputs`. `teamai workflow start --help` lists the other options, such as answering optional approvals and picking the prompt tool.
|
|
20
20
|
3. To continue a run that stopped, run `teamai workflow resume <run>`.
|
|
21
21
|
|
|
22
|
-
The command exits when the run ends: 0 when it succeeded, 1 when it failed or was cancelled. Done when it has exited and the outcome, the failing step's message and the pull requests the run opened are reported where the person reads them: the job log, or your reply.
|
|
22
|
+
The command exits when the run ends: 0 when it succeeded, 1 when it failed or was cancelled. A failed run names each failed step, its message and its `teamai workflow retry` command on stderr. Done when it has exited and the outcome, the failing step's message and the pull requests the run opened are reported where the person reads them: the job log, or your reply.
|
|
23
23
|
|
|
24
24
|
## Approvals
|
|
25
25
|
|
|
@@ -37,8 +37,8 @@ Inside a workflow step, every `teamai workflow` command that changes a run answe
|
|
|
37
37
|
|
|
38
38
|
## Env and secrets
|
|
39
39
|
|
|
40
|
-
A step gets the team env keys its `requires.env` lists, and no other team key. A key with no value on this machine fails the step `missing_env` before it runs, and the message names the `teamai env set`
|
|
40
|
+
A step gets the team env keys its `requires.env` lists, and no other team key. A key with no value on this machine fails the step `missing_env` before it runs, and the message names the fix: `teamai env set KEY` for a key the team declares; for one it does not, the environment, or `teamai env add KEY --secret` followed by `teamai env set KEY`. The person runs `env set` in their own terminal. A CI job exports each secret under its key name instead. TeamAI masks the value of every key in `env/secrets.yaml` in run files and output.
|
|
41
41
|
|
|
42
42
|
## CI
|
|
43
43
|
|
|
44
|
-
When you set up a CI job that starts a run, read `references/ci.md`.
|
|
44
|
+
When you set up a CI job that starts a run, or one that takes the runs members offer, read `references/ci.md`.
|
|
@@ -14,3 +14,16 @@ env: { TEAMAI_MODE: unattended }
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Done when the job pins that version and its token has those three permissions.
|
|
17
|
+
|
|
18
|
+
## Take the runs members offer
|
|
19
|
+
|
|
20
|
+
A runner job finishes a run a member started and published, instead of starting its own. The guide has the job to copy: [Take offered runs from CI](https://github.com/Tencent/teamai-cli/blob/main/docs/guide/workflow.md#take-offered-runs-from-ci). Its steps, in order:
|
|
21
|
+
|
|
22
|
+
1. `git config user.name` set to the runner's member name. List that name in `.teamai/manifest/members.yaml` when the team assigns roles, or in `manifest/members.yaml` of a separate team repo.
|
|
23
|
+
2. `teamai init . --provider git`, then `teamai pull`. In self mode the job's own token reaches the team repo too. A separate team repo needs a credential that can push to it, such as a deploy key, never a personal token.
|
|
24
|
+
3. `teamai workflow resume --next --tools default=<tool> --auto-approve`. It takes the oldest offered run of this repository that a runner can finish, or prints `{"data":{"idle":{"offered":N}}}` and exits 0. It leaves a run whose steps left need an env key the job does not set or a tool it does not install; `teamai workflow resume --tools default=<tool>` lists each as `cannot run here`, with what gives it.
|
|
25
|
+
4. `teamai score --drain` with `if: always()`, last.
|
|
26
|
+
|
|
27
|
+
The token needs `contents: write` and `pull-requests: write`. The job exports it as `GH_TOKEN`, since `deliver: pr` opens pull requests with it, and exports the API key of the tool `--tools` names, such as `ANTHROPIC_API_KEY`, and each `requires.env` key of the workflows it should take, such as `SIGNING_KEY`. It sets `TEAMAI_MODE=unattended` when the scheduler sets no `CI`. Pin a `teamai-cli` version whose `teamai workflow resume --help` lists `--next`.
|
|
28
|
+
|
|
29
|
+
Done when `teamai workflow resume` on the runner's checkout lists the offered run, and the job's log reads `Claimed <run> (<workflow>) from <member>`.
|