en un clic
team
Multi-worker GJC tmux team orchestration
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Multi-worker GJC tmux team orchestration
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Create and execute durable repo-native multi-goal plans over GJC goal mode artifacts.
Socratic deep interview with mathematical ambiguity gating before explicit execution approval
Consensus planning entrypoint that auto-gates vague team/ultragoal requests before execution
Use GJC's published tmux session helpers for Clawhip-visible worktree sessions, prompt injection, tail checks, and harness owner debugging.
Adds domain design guidance for ralplan planner phase.
Delegate planning, execution, and team workflows to gajae-code via the coordinator MCP server.
| name | team |
| description | Multi-worker GJC tmux team orchestration |
| source | forked from upstream team skill and rebranded for GJC |
$team is the tmux-based multi-worker execution mode for GJC. It starts real GJC worker CLI sessions by splitting the current tmux leader window and coordinates them through .gjc/_session-{sessionid}/state/team/... files plus CLI team interop (gjc team api ...) and state files.
This skill is operationally sensitive. Treat it as an operator workflow, not a generic prompt pattern. In GJC App or plain outside-tmux sessions, do not present $team / gjc team as directly available; launch GJC CLI from shell first, or stay on the nearest app-safe surface until the user explicitly wants the tmux runtime.
When team detects its own current-session state is corrupt, tampered, unreadable, or stale on resume, run gjc state clear --force --mode team before reseeding or restarting. Scope the clear to the current session via --session-id, the command payload, or GJC_SESSION_ID; it clears only team state for that session and never clears other skills or sessions.
gjc team when you need durable visible tmux workers, shared task state, worker mailbox files, worktrees, explicit lifecycle control, or long-running execution that must survive beyond one local reasoning burst.Use the shared workflow guidance pattern: outcome-first framing, concise visible updates for multi-step work, local overrides for the active workflow branch, validation proportional to risk, explicit stop rules, and automatic continuation for safe reversible steps. Ask only for material, destructive, credentialed, external-production, or preference-dependent branches.
When user triggers $team, the agent must:
gjc team ...spawn_agent fanoutIf gjc team is unavailable, stop with a hard error.
gjc team [N:agent-type] "<task description>"
Examples:
gjc team 3:executor "analyze feature X and report flaws"
gjc team "debug flaky integration tests"
gjc team "ship end-to-end fix with verification"
gjc team ... is now the canonical launch path for coordinated execution.
Team mode should carry visible worker delivery/verification lanes without
requiring a separate linked execution loop up front. GJC team supports current-window multi-worker mode; explicit N:agent-type values select worker count and shared role.
gjc team ... / $team ... for the coordinated worker.lane metadata plus required_role / allowed_roles; claiming enforces owner, role, dependency, and lease order.gjc team ... for coordinated execution.Use $ultragoal for durable leader-owned goal/ledger tracking and $team for parallel visible tmux execution lanes. When Team is launched with an active .gjc/_session-{sessionid}/ultragoal/goals.json, worker task/status context may include leader-owned Ultragoal context: .gjc/_session-{sessionid}/ultragoal/goals.json, .gjc/_session-{sessionid}/ultragoal/ledger.jsonl, the active goal id, GJC goal mode, and the fresh_leader_goal_get_required checkpoint policy.
Workers provide task status and verification evidence only. They do not own Ultragoal goal state, create worker ledgers, mutate .gjc/_session-{sessionid}/ultragoal, auto-launch Team from Ultragoal, or perform hidden GJC goal mutation. Workers must not run gjc ultragoal checkpoint; checkpoint authority stays with the leader after worker tasks are terminal. Ultragoal does not auto-launch Team and performs no hidden goal mutation. The leader uses terminal Team evidence plus the current-session active GJC goal snapshot and strict quality gate to run gjc ultragoal checkpoint --goal-id <id> --status complete --evidence "<team evidence mentioning .gjc/_session-{sessionid}/ultragoal and <id>>" --quality-gate-json <quality-gate-json-or-path>.
Important: N:agent-type (for example 3:executor) selects the worker count and role prompt. Plain gjc team "task" defaults to 3 executor workers; gjc team 1:executor "task" is the explicit single-worker form.
To launch the worker with a specific GJC-compatible command, use GJC_TEAM_WORKER_COMMAND:
GJC_TEAM_WORKER_COMMAND="bun packages/coding-agent/src/cli.ts" gjc team executor "update docs and report"
Before running $team, confirm:
tmux installed (tmux -V)$TMUX is set)gjc command resolves to the intended install/buildnode bin/gjc.js ..., run npm run build after src changeshud --watch panes before splitSuggested preflight:
tmux list-panes -F '#{pane_id}\t#{pane_start_command}' | rg 'hud --watch' || true
If duplicates exist, remove extras before gjc team to prevent HUD ending up in worker stack.
Before launching gjc team, require a grounded context snapshot:
.gjc/context/{slug}-*.md when available..gjc/context/{slug}-{timestamp}.md (UTC YYYYMMDDTHHMMSSZ) with:
$deep-interview --quick <task> before team launch.planner for broad context mapping/sequencing, architect for architecture or external-doc-risk assessment, and direct web/search tools when configured.Do not start the worker pane until this gate is satisfied; if forced to proceed quickly, state explicit scope/risk limitations in the launch report.
For simple read-only brownfield lookups during intake, use narrow repo inspection first; for broader mapping, delegate to planner or architect with a concrete fact-finding assignment.
When $team is used as a follow-up mode from ralplan, carry forward the approved plan's explicit available-agent-types roster and convert it into concrete staffing guidance before launch:
gjc team "<task>" / $team "<task>") for the coordinated worker run; mention $ultragoal as the default durable follow-up/ledger path; mention a later separate Single-owner execution follow-up only when explicitly requested or genuinely needed as a fallbackgjc team rejects ambiguous inline lane splits because they previously caused every worker to receive the same broad task. Use explicit markdown lane sections instead:
### Lane A — Delivery
Implement delivery-only changes and evidence.
### Lane B — Verification
Add focused tests and smoke evidence.
Explicit ### Lane <id> — <title> sections are converted into distinct worker-owned initial tasks.gjc team currently performs:
N, agent-type, task), default to 3 workers, and cap workers at 20.display-message -p "#S:#I #{pane_id}" before creating state or worktrees..gjc/_session-{sessionid}/state/team/<team>/config.json.gjc/_session-{sessionid}/state/team/<team>/manifest.v2.json.gjc/_session-{sessionid}/state/team/<team>/tasks/task-*.json (one per explicit lane section, otherwise one worker-owned compatibility task per worker).gjc/_session-{sessionid}/state/team/<team>/mailbox/worker-1.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/status.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/lifecycle.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/heartbeat.jsonGJC_TEAM_WORKER_COMMAND or the active gjc entrypoint.select-layout main-vertical and main-pane-width keep leader-left/worker-right at roughly 50/50.GJC_TEAM_NAME=<team>GJC_TEAM_WORKER_ID=worker-1GJC_TEAM_STATE_ROOT=<leader-cwd>/.gjc/_session-{sessionid}/state/teamGJC_TEAM_WORKTREE_PATH=<path> when worktree mode is activelast_integrated_headtmux_session, tmux_session_name, tmux_target, leader pane id, worker pane ids, worker_lifecycle_by_id, and integration_by_worker.status, resume, shutdown, and gjc team api.Important:
GJC_TEAM_WORKER_CLI and GJC_TEAM_WORKER_CLI_MAP accept only auto or gjc; legacy/provider values such as codex, claude, or gemini are rejected before launch.gjc team --worktree[=<name>]) while sharing the team state root.shutdown kills only the recorded worker pane after confirming it still belongs to the stored tmux target and is not the leader pane. It never kills the tmux session.Follow this exact lifecycle when running $team:
worker_lifecycle_by_id.<worker>.lifecycle_state=ready after startup ACK).gjc team status <team>, gjc team resume <team>, task files).pending=0in_progress=0failed=0 (or explicitly acknowledged failure path)status / resume must not report phase=awaiting_integration)gjc team shutdown <team>.phase=complete, worker runtime status stopped, lifecycle stopped with a matching graceful shutdown request id). If shutdown is forced before evidence-backed task completion, expect phase=cancelled or phase=failed; if tasks are complete but integration is still pending or conflicted, expect phase=awaiting_integration, not complete.Do not run shutdown while the worker is actively writing updates unless user explicitly requested abort/cancel. Do not treat ad-hoc pane typing as primary control flow when runtime/state evidence is available.
While a team is running, keep checking live team state until terminal completion.
Minimum acceptable loop:
sleep 30 && gjc team monitor <team-name>
The mutating monitor path also performs bounded liveness recovery: expired task claims, stale heartbeat claims, and missing recorded worker panes are requeued instead of leaving work permanently in_progress.
gjc team status <team-name>
gjc team monitor <team-name>
gjc team resume <team-name>
gjc team shutdown <team-name>
Semantics:
status: read-only snapshot path; it does not recover claims, replay notifications, integrate worker commits, or sync HUD state.monitor: mutating monitor path; reads team snapshot, recovers expired/stale worker claims, applies pending worker worktree integration, replays notifications, syncs HUD state, and returns task counts, worker state, tmux target/pane evidence, worker_lifecycle_by_id, and integration_by_worker.resume: mutating monitor path; performs the same liveness-recovery and integration-aware live snapshot for reconnect/inspection flows.list: pure read path; lists known teams without integrating worker commits.claim-task: mutating task path; before granting a new claim, it recovers expired claims and rejects claims from workers already classified as not live.shutdown: writes per-worker graceful shutdown-request.json, moves lifecycle through draining to stopped, kills the recorded worker pane when it still belongs to the stored tmux target, removes clean created worktrees, marks worker runtime status stopped, and sets phase from task, lifecycle, and integration state: complete only when all tasks have verified completion_evidence, every worker has matching graceful shutdown lifecycle evidence, and no integration request/conflict is pending; awaiting_integration when tasks and lifecycle are complete but leader integration still requires action; failed when tasks failed/blocked or completed tasks lack valid evidence; and cancelled when work remains pending or in progress. It preserves .gjc/_session-{sessionid}/state/team/<team> as evidence.gjc team lifecycle commands.gjc team api claim-task and gjc team api transition-task-status..gjc/_session-{sessionid}/state/team/<team>/config.json.gjc/_session-{sessionid}/state/team/<team>/manifest.v2.json.gjc/_session-{sessionid}/state/team/<team>/phase.json.gjc/_session-{sessionid}/state/team/<team>/events.jsonl.gjc/_session-{sessionid}/state/team/<team>/trace.jsonl.gjc/_session-{sessionid}/state/team/<team>/trace-errors.jsonl.gjc/_session-{sessionid}/state/team/<team>/telemetry.jsonl.gjc/_session-{sessionid}/state/team/<team>/monitor-snapshot.json.gjc/_session-{sessionid}/state/team/<team>/integration-report.md.gjc/_session-{sessionid}/state/team/<team>/tasks/task-1.json (includes structured completion_evidence after completed transitions).gjc/_session-{sessionid}/state/team/<team>/mailbox/worker-1/<message-id>.json.gjc/_session-{sessionid}/state/team/<team>/mailbox/worker-1.json (legacy compatibility view).gjc/_session-{sessionid}/state/team/<team>/notifications/<notification-id>.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/startup-ack.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/status.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/lifecycle.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/heartbeat.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/shutdown-request.json.gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/nudges/<fingerprint>.json.gjc/_session-{sessionid}/reports/team-commit-hygiene/<team>.ledger.jsonUse gjc team api for machine-readable task lifecycle operations.
gjc team api worker-startup-ack --input '{"team_name":"my-team","worker_id":"worker-1","protocol_version":"1"}' --json
gjc team api claim-task --input '{"team_name":"my-team","worker_id":"worker-1"}' --json
gjc team api transition-task-status --input '{"team_name":"my-team","task_id":"task-1","to":"completed","worker_id":"worker-1","claim_token":"<claim-token>","completion_evidence":{"summary":"Completed requested work and verified it locally.","items":[{"kind":"command","status":"passed","summary":"Focused test passed","command":"bun test packages/coding-agent/test/gjc-runtime/team-runtime.test.ts"}],"files":["packages/coding-agent/test/gjc-runtime/team-runtime.test.ts"],"notes":"Include at least one passed command or verified inspection/artifact item."}}' --json
gjc team api update-worker-status --input '{"team_name":"my-team","worker_id":"worker-1","status":"working","current_task_id":"task-1"}' --json
gjc team api recover-stale-claims --input '{"team_name":"my-team"}' --json
gjc team api read-traces --input '{"team_name":"my-team"}' --json
gjc team api create-task --input '{"team_name":"my-team","subject":"Verify delivery","description":"Run verification","owner":"worker-1","lane":"verification","required_role":"executor","depends_on":["task-1"]}' --json
Canonical worker lifecycle operations:
worker-startup-ack before task work; this records startup ACK and moves workers/<worker>/lifecycle.json to readyclaim-taskupdate-worker-status when the worker starts/stops a task-local activity; this updates worker-reported status.json without replacing the runtime lifecycle source of truthrecover-stale-claims is leader/runtime-owned; it clears expired claim files, requeues in-progress tasks claimed by stale workers, and records task_claim_recovered events without modifying terminal task records or completion evidencetransition-task-status with the claim token, worker id, and structured completion_evidence objectrelease-task-claim
Claim eligibility is ordered and must not be bypassed: explicit task id selection, task status/terminal checks, owner/assignee checks, lane/role checks, dependency/blocked checks, then active lease creation. lane is descriptive metadata; required_role and allowed_roles are the enforced worker role gates.Completion evidence is stored inline on the task record as completion_evidence. It must include a non-empty summary, an items array, and at least one item with status: "passed" or status: "verified". Valid item kinds are command, inspection, and artifact; command items require command. The camel-case alias completionEvidence is accepted by the API input, but legacy string evidence and separate evidence files are not part of the public completion contract.
GJC-team interop operations are also available for mailbox, native notification, worker heartbeat/status, stale-claim recovery, startup ACK, events, monitor snapshots, approvals, and shutdown request/ack flows; run gjc team api --help for the full operation list.
Structured trace records in trace.jsonl are append-only schema version 1 entries. Each trace references the legacy events.jsonl source via source_event_id, keeps event_type, worker/task ids, and includes evidence_refs for completion evidence or claim recovery when available. Trace append failures are isolated in trace-errors.jsonl and do not break events.jsonl compatibility.
GJC ports team-mode concepts from ../../oh-my-codex, not code or OMX/Codex-specific assumptions:
| Concept | GJC-native equivalent |
|---|---|
| Worker identity/inbox/mailbox paths | .gjc/_session-{sessionid}/state/team/<team>/workers/<worker>/identity.json, inbox.md, and per-message mailbox records under .gjc/_session-{sessionid}/state/team/<team>/mailbox/<worker>/. |
| Startup ACK | gjc team api worker-startup-ack, persisted as workers/<worker>/startup-ack.json. |
| Claim-safe lifecycle APIs | claim-task, transition-task-status, and release-task-claim with worker ownership and claim-token guards. |
| Delivery states and deferred pane attempts | Native notification records under .gjc/_session-{sessionid}/state/team/<team>/notifications/ with pending, sent, queued, deferred, failed, delivered, and acknowledged states. |
| Non-destructive leader nudges | Lifecycle nudge records under workers/<worker>/nudges/; GJC suggests inspection/relaunch but never auto-kills or auto-relaunches workers. |
Forbidden assumptions: do not copy OMX paths, Codex notify payload formats, OMX process names, or source code directly. Keep tmux as the current runtime; native split-worker TUI remains roadmap-only.
Worker protocol:
worker-startup-ack before task work.update-worker-status; this is the worker-reported status plane, not the runtime lifecycle state.claim-task.completed, failed, or blocked with transition-task-status, including claim token and evidence for completion.monitor/resume path will auto-checkpoint dirty worktrees and integrate committed history where possible..gjc/_session-{sessionid}/state/team/<team>/mailbox/leader-fixed.json.Useful runtime env vars:
GJC_TMUX_COMMAND / GJC_TEAM_TMUX_COMMAND
tmux on POSIX, psmux / pmux / tmux on native Windows when one of those resolves on PATH). GJC_TMUX_COMMAND applies to every GJC tmux flow; GJC_TEAM_TMUX_COMMAND is honored as an alias by the team path. Both resolve through the same resolver, so the team leader and gjc session ... always target the same multiplexer. These values are executable path/name overrides, not shell command lines; do not include flags such as psmux -L <namespace> in the env var.gjc --tmux, gjc session, and gjc team. Psmux can be exposed as psmux.exe or as its tmux.exe/pmux.exe aliases. GJC probes psmux / pmux / tmux on Windows PATH, picks the first that resolves, and treats that binary as the multiplexer. Worker commands on Windows are emitted with PowerShell-safe $env:VAR = 'value'; assignments so psmux's ConPTY panes inherit GJC_TEAM_* correctly.GJC_PSMUX_COMMAND forces a wrapper to be treated as psmux, GJC_PSMUX_DETECTION=off skips detection, GJC_PSMUX_FORCE_DETECT=1 re-probes every call. The mouse / set-clipboard / mode-style UX profile is filtered out for psmux; the @gjc-profile ownership tag and branch / project / session identity markers still round-trip and are required for gjc session and gjc team.-c <path> cwd/start-directory flags do not isolate the server namespace; psmux uses the tmux-compatible global -L <namespace> flag for isolated server instances. GJC does not currently expose structured runtime -L support, because launch, gjc session, and gjc team must all carry the same namespace prefix together. If you need isolated psmux servers, start psmux -L <namespace> yourself before gjc --tmux and let GJC attach to it; do not pass -L through GJC_TMUX_COMMAND.GJC_TEAM_WORKER_COMMAND
gjc)GJC_TEAM_STATE_ROOT
<cwd>/.gjc/_session-{sessionid}/state/team)Operator note (important for GJC panes):
tmux send-keys ... C-m) can appear to "do nothing" when a worker is actively processing; Enter may be queued by the pane/task flow.gjc team from an attached tmux leader pane.GJC_TEAM_STATE_ROOT points somewhere else. Check .gjc/_session-{sessionid}/state/team/<team>/ before assuming worker failure.tmux_target and is not the leader pane. Stale panes outside that target require manual inspection.gjc team monitor <team> / resume aborts the failing merge, cherry-pick, or worker rebase; gjc team status <team> is read-only inspection. Inspect .gjc/_session-{sessionid}/state/team/<team>/integration-report.md, .gjc/_session-{sessionid}/state/team/<team>/events.jsonl, .gjc/_session-{sessionid}/state/team/<team>/mailbox/leader-fixed.json, and .gjc/_session-{sessionid}/reports/team-commit-hygiene/<team>.ledger.json.Use only after checking gjc team status <team> and state evidence:
.gjc/_session-{sessionid}/state/team/<team>/config.json.gjc/_session-{sessionid}/state/team/<team>/tasks/task-1.json.gjc/_session-{sessionid}/state/team/<team>/mailbox/worker-1.jsongjc team status <team> for current recorded stategjc team monitor <team> when a live monitor/update loop is neededgjc team api <team> only for documented programmatic operationsC-c or escape flow (CLI-specific) once, then re-check gjc team status <team> and relevant state filestmux send-keys -t %<worker-pane> "continue current task; report status" C-mgjc team status <team>.Cause:
tmux_target, or came from a previous failed run.Fix:
Run from leader pane:
# 1) Inspect panes
tmux list-panes -F '#{pane_id} #{pane_current_command} #{pane_start_command}'
# 2) Kill verified stale worker panes only (examples)
tmux kill-pane -t %450
tmux kill-pane -t %451
# 3) Shut down recorded team state/workers through the supported team runtime
# Replace <team-name> with the team from `gjc team list` / `gjc team status`.
gjc team shutdown <team-name>
# 4) Retry
gjc team executor "fresh retry"
Guidelines:
gjc team shutdown <team> for recorded active workers; use manual pane cleanup only for verified stale panes.When operating this skill, provide concrete progress evidence:
Team started: <name>)gjc team status <team>, mutating gjc team monitor <team>, or .gjc/_session-{sessionid}/state/team/<team>/tasks/task-1.jsonphase=complete, worker status stopped) when the run is terminal; incomplete shutdowns must report phase=cancelled/failed, and integration-blocked shutdowns must report phase=awaiting_integrationDo not claim success without file/pane evidence.
Do not claim clean completion if shutdown occurred with in_progress>0.
Use gjc team status <team> and gjc team monitor <team> as the supported operator aids for status inspection; keep raw state-file or pane evidence available for manual intervention and proof.
Use the gjc team ... CLI as the supported team-launch surface. For automation, drive the same CLI flow from scripts or supervising agents rather than relying on a separate runtime integration runner.
gjc team ... CLI — Primary method for interactive or automated team orchestration. Use this when you want direct tmux-pane visibility or a scriptable launch path.gjc team status <team> — Read current team/task/worker state.gjc team monitor <team> — Follow live progress through the supported runtime surface.gjc team shutdown <team> — Stop recorded active workers and move the team toward terminal state.gjc team api <team> — Use only for documented programmatic operations exposed by the team runtime..gjc/_session-{sessionid}/state/team/<team>/ when you need status, task, or mailbox evidence after launch.Use gjc team shutdown <team> for recorded active workers. After shutdown reports a terminal state and required evidence is preserved, use supported gjc state ... session/mode cleanup commands only when you are intentionally clearing state; do not delete team state by hand during an active run. Use manual tmux/session cleanup only for verified stale panes that are not handled by the documented shutdown flow.
1. gjc team executor "fix bugs"
2. gjc team status <team-name>
3. gjc team shutdown <team-name>
4. Clean up the finished team state for <team-name>
Good: The user says continue after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.
Good: The user changes only the output shape or downstream delivery step (for example make a PR). Preserve earlier non-conflicting workflow constraints and apply the update locally.
Bad: The user says continue, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
When the team task-set completes OR the user requests return to planning/persistence, mark team ready for handoff so the skill tool's chain guard permits the transition:
gjc state team write --input '{"current_phase":"handoff"}' --json
The skill tool then dispatches /skill:ralplan, /skill:deep-interview, or /skill:ultragoal same-turn and runs gjc state team handoff --to <ralplan|deep-interview|ultragoal> --json in-process to atomically demote team, promote the callee, and sync both .gjc/_session-{sessionid}/state/skill-active-state.json files. You do not need to run the handoff verb yourself.