scdenney/open-science-skills / codex/orchestrate
orchestrate
VerifiedOrchestrate complex work from an active gpt-6-astra or gpt-6.1-sol Codex session. The detected lead owns decomposition, integration, and verification; Astra keeps the hardest reasoning in the lead, while Sol escalates unusually difficult units to Astra. Both route bounded work to Sol at medium effort, mechanical work to Luna, and can use a cross-vendor Claude peer. Not for routine single-context work. Use when the user explicitly asks to orchestrate, delegate, fan out, parallelize, assign subagents, obtain independent checks, or have Codex act as tech lead.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 21.2 KB |
| agents/openai.yaml | config | 251 B |
| assets/architecture.svg | other | 4.8 KB |
| scripts/check-lead-runtime.shexecutable | script | 3.1 KB |
| scripts/claude-peer.shexecutable | script | 2.7 KB |
scripts/check-lead-runtime.sh
View on GitHub#!/usr/bin/env bash
# Verify the model and reasoning effort actually running the current Codex turn.
set -euo pipefail
ASTRA_MODEL="gpt-6-astra"
SOL_MODEL="gpt-6.1-sol"
CODEX_STATE_ROOT="${CODEX_HOME:-$HOME/.codex}"
THREAD_ID="${CODEX_THREAD_ID:-}"
die() {
printf 'orchestrate preflight: %s\n' "$*" >&2
exit 2
}
[[ -n "$THREAD_ID" ]] || die 'cannot verify the active runtime because CODEX_THREAD_ID is unset; stop and report this instead of assuming the lead model'
[[ -d "$CODEX_STATE_ROOT/sessions" ]] || die "cannot verify the active runtime because the Codex sessions directory is unavailable: $CODEX_STATE_ROOT/sessions"
shopt -s nullglob
session_files=("$CODEX_STATE_ROOT"/sessions/*/*/*/*"$THREAD_ID".jsonl)
shopt -u nullglob
[[ ${#session_files[@]} -eq 1 ]] || die "expected exactly one rollout for current thread $THREAD_ID, found ${#session_files[@]}; stop rather than guessing"
python3 - "${session_files[0]}" "$ASTRA_MODEL" "$SOL_MODEL" <<'PY'
import json
import sys
session_path, astra_model, sol_model = sys.argv[1:]
allowed_models = (astra_model, sol_model)
latest = None
reroute = None
try:
with open(session_path, encoding="utf-8") as handle:
for line_number, line in enumerate(handle, 1):
try:
event = json.loads(line)
except json.JSONDecodeError as exc:
raise SystemExit(
f"orchestrate preflight: invalid JSON in current rollout at line {line_number}: {exc}"
)
if event.get("type") == "turn_context":
latest = event.get("payload") or {}
reroute = None
elif (
event.get("type") == "model_reroute"
or (
event.get("type") == "event_msg"
and (event.get("payload") or {}).get("type") == "model_reroute"
)
):
reroute = event.get("payload") or event
except OSError as exc:
raise SystemExit(f"orchestrate preflight: cannot read current rollout: {exc}")
if latest is None:
raise SystemExit(
"orchestrate preflight: current rollout has no turn_context; stop rather than guessing"
)
if reroute is not None:
raise SystemExit(
"orchestrate preflight: Codex recorded a model reroute for the current turn; "
f"details={json.dumps(reroute, sort_keys=True)}. Do not proceed as if Astra were the lead."
)
model = latest.get("model")
effort = latest.get("effort")
if not model or not effort:
raise SystemExit(
"orchestrate preflight: current turn_context does not expose both model and effort; "
"stop rather than guessing"
)
if model not in allowed_models:
raise SystemExit(
"orchestrate preflight mismatch: "
f"current runtime is {model} at {effort}; supported leads are "
f"{astra_model} and {sol_model}. Do not proceed. Ask the operator to select "
"Astra or Sol in /model while keeping the selected reasoning effort, verify with /status, "
"and invoke $orchestrate again."
)
print(f"orchestrate preflight OK: {model} at {effort}")
PY
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |