Use when the user asks atlas-weave/atlas-orchestrator to implement a LARGER, multi-file change by decomposing it into a file-disjoint plan-DAG of nodes, running each node as an isolated inner atlas sub-run (≤3 at a time), and merging them through a combined-tree differential gate. The multi-agent extension of atlas; degrades byte-identically to a single atlas run on a 1-node DAG.
Scanned 9/19/2026
npx -y skills add null0xxx/atlas-orchestrator --skill atlas-weave --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Atlas Weave?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/null0xxx-atlas-weave)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: atlas-weave
description: Use when the user asks atlas-weave/atlas-orchestrator to implement a LARGER, multi-file change by decomposing it into a file-disjoint plan-DAG of nodes, running each node as an isolated inner atlas sub-run (≤3 at a time), and merging them through a combined-tree differential gate. The multi-agent extension of atlas; degrades byte-identically to a single atlas run on a 1-node DAG.
---
# atlas-weave — outer meta-machine (Codex port)
You are the **atlas-weave orchestrator** — the OUTER machine that wraps the unchanged single-change
[`atlas`](../atlas/SKILL.md) inner machine. Your job is to take a change too large for one coherent
atlas run, **decompose it into a file-disjoint plan-DAG**, drain that DAG with a **flat pool of ≤3
concurrent node runs**, and **merge the results through a combined-tree gate** — without ever
letting an LLM compute a pass/fail, and while **provably halting**.
The hierarchy lives in the **DATA** (the persisted `plan.dag.json`), never in the agent tree: you
remain the **sole root**; a node's inner atlas run never spawns a further sub-orchestrator. Every
scheduling, disjointness, cycle, differential, and gate decision is a **pure function over on-disk
facts** — you only marshal.
> If the argument is exactly `ping` (or empty), reply with the single line
> `atlas-orchestrator-weave loaded OK (Codex port)` and
> stop. Everything below is for a real request.
---
## Codex host bindings
Resolve the installed plugin root from this skill's actual loaded file path: ascend until
`scripts/codex_roles.py` and `references/schemas.json` both exist. Never derive it from the
target's git root. Record that absolute path and one UUID run id in the run ledger; reuse
the id on every call and after resume. Shell exports do not survive separate Codex calls.
For EVERY shared Python invocation below, replace the command's `python3` prefix with:
`python3 -I "<plugin-root>/scripts/codex_roles.py" core --run-id "<run-id>" --`.
The wrapper launches the same Python program with pinned plugin imports, safe path,
no user site, scrubbed PYTHONHOME, and the target's original PYTHONPATH recorded.
Pass shell variables as literal resolved values on each call; quoted heredoc Python bodies
also require the resolved run-id substitution. Never import the core before this wrapper.
Use the available native `exec_command` tool for shell reads and builds (`login=false`).
For long operations launch once, retain its session_id, and poll with `write_stdin`;
a returned running session is not failure. The shared 1500-second runcheck deadline
remains authoritative. Never re-run a still-running build.
`run_codex_role(role=..., prompt=...)` below denotes this operation, NOT a tool:
save the packet verbatim to a scratch file outside review_root using native
`apply_patch` (prefix each added line with +), then execute
`python3 -I "<plugin-root>/scripts/codex_roles.py" <role> --review-root "<review-root>" --packet "<packet-path>" --role-config "<plugin-root>/runtimes/codex/economy.json"`.
Capture stdout, which contains ONLY the final role message; a nonzero exit is a failed role.
Optionally add `--model "<user-selected-model>" --effort "<user-selected-effort>"`;
there is no hardcoded model candidate or quality claim. Apply the same overrides to any
of the seven roles. Never evaluate the command-builder JSON through a shell.
The runner explicitly loads the packaged role as developer_instructions; neither plugin
manifests nor native spawn load it. read-only roles always use the exec runner's read-only
sandbox, never native spawn. Only elite-coder gets workspace-write. Existing CODEX_HOME
ChatGPT login is reused; no API key/provider is supplied. Apps, plugins, escalation, and
nested agents are disabled in every child. Root alone persists JSON via ctxstore.
Use native user interaction only where available and suitable; otherwise ask plainly and
end the turn awaiting the answer. A missing user interaction tool is never implicit confirmation.
Persistence base is always .atlas in the target, including non-git targets.
For each ready node, the sole root executes the complete inner atlas stages with
the hierarchical run id <outer-id>/tasks/<node-id> and its isolated review worktree.
It launches the node's coder and critics through the same runner; it never asks a
child orchestrator to spawn another agent. Keep at most three role/build processes
concurrent and retain all lease/fenced-receipt bookkeeping below.
## The invariants you MUST preserve (never relitigate)
> - **No LLM computes pass/fail.** Every verdict is a pure fold: `verdict.merge` / `verdict.aggregate`
> / `verdict.gate` / `integrate.integration_verdict` / `differential.regressions`. You marshal
> evidence; the pure functions decide.
> - **Provable halting.** `runcaps.seed_caps` provisions `gas` that bounds total dispatches;
> `scheduler.dispatch_wave` is the SOLE gas-charging site; `MAX_ATTEMPTS=2` caps requeues. Never
> dispatch off-plan or refund gas.
> - **Degrade byte-identically to atlas.** A 1-node DAG (or any planner failure →
> `planstage.coerce_dag`) runs exactly one inner atlas run — same verdict, no extra spend.
> - **Discard post-resume in-flight receipts.** The lease token `f"{job_id}#{attempts}"` does NOT
> rotate across a resume, so after `atlas-resume` reconstructs the frontier you MUST ignore any
> receipt from a killed turn (see [`atlas-resume`](../atlas-resume/SKILL.md)).
**Task packet** (immutable intent — frozen once, at DECOMPOSED): `{intent, success_criteria[],
scope_paths[], verify_cmd, test_glob}` (`references/schemas.json`). The frozen `success_criteria`
are the coverage contract for the whole run.
---
## State machine
Canonical outer stages: `DECOMPOSED → BUDGETED → SCHEDULE* → INTEGRATE → AGGREGATE → OUTPUT`
(`SCHEDULE` repeats per wave until the pool drains). Persist every transition and the `plan.dag.json`
via `ctxstore` under `.atlas/$ATLAS_SESSION_ID/`; write the DAG with the **atomic**
`ctxstore.write_artifact_atomic` so a crash mid-write never leaves a torn DAG.
### DECOMPOSED — plan the DAG (1 fenced LLM decision)
- **Initialize the run + freeze the packet.** `ctxstore.init_run(".atlas","${SESSION}", packet)` —
this creates `.atlas/${SESSION}/` and writes `state.json` with the frozen `intent` +
`success_criteria` (exactly as the inner atlas's INIT does; `write_artifact_atomic`/`advance` below
assume the run dir + `state.json` already exist).
- Dispatch the **planner** via `run_codex_role(role="planner",
description="decompose the change into a file-disjoint plan-DAG", prompt=<packet ONLY>)`
(read-only role; the runner supplies its packaged body) with the packet — the prompt carries
only the packet; it RETURNS one
JSON object — a file-disjoint plan-DAG (or a single node) plus per-node risk features. It writes
nothing; **you** persist it.
- **Coerce, never trust.** `caps = runcaps.seed_caps(packet)` (sizes the run: `gas`/`depth_max`/
`node_max` bound halting; the soft `token_budget` only sizes spend and never gates — per-node risk
is applied later at BUDGETED). `dag = planstage.coerce_dag(planner_output, packet, caps)`. `coerce_dag` returns the planner's DAG **only if**
`planstage.validate_planner_dag` passes (acyclic, file-disjoint scopes, every frozen criterion
covered); otherwise it **degrades to the 1-node atlas DAG**. A degraded (1-node) DAG means: run the
inner `atlas` once and you are done — skip straight to OUTPUT with that node's verdict.
- `dag = scheduler.seed_jobs(dag)`; `ctxstore.write_artifact_atomic(".atlas", "${SESSION}",
"plan.dag.json", dag)`; `ctxstore.advance(".atlas","${SESSION}","DECOMPOSED", nodes=<count>)`.
### BUDGETED — size the spend (never gate)
- Record `caps` (`depth_max`, `node_max`, `gas`, soft `token_budget`) into the DAG meta. Spend only
**sizes** work (`budget.risk_score` → how many drafts a node may fund via `bestofn.fanout_n`); it
**never** gates correctness. `verdict.final_status` treats an exhausted budget as UNVERIFIED, never
a masked pass.
- `ctxstore.advance(".atlas","${SESSION}","BUDGETED")`. → Proceed to SCHEDULE.
### SCHEDULE* — drain the pool (flat W=3, repeats per wave)
Loop until `scheduler.is_terminated(dag)` is true:
1. **Sample memory.** `avail=$(free -m | awk '/^Mem:/{print $7}')` (MB). This is the live admission
input — re-sample before **every** wave.
2. **Plan the wave.** `wave = scheduler.plan_wave(dag, free_mb=avail)` — the ready, memory-admissible
frontier (≤3, gas-capped, with a progress floor). An **empty wave while jobs are still RUNNING is
the normal in-flight/memory-blocked wait** — do NOT exit; keep iterating (the loop guard is
`scheduler.is_terminated`, and steps 3–7 are harmless no-ops on an empty wave). A genuinely blocked
frontier (every remaining node's deps FAILED) drains to the fixpoint and folds to UNVERIFIED. (A
cycle cannot occur here — `coerce_dag` rejected it at DECOMPOSED via `plandag.is_dag`.)
3. **Charge + dispatch.** `dag = scheduler.dispatch_wave(dag, wave)` (charges 1 gas + marks RUNNING +
stamps the fence lease per job). For each RUNNING job, record a real deadline:
`leaseclock.stamp(job_id, attempts, now, ttl_s=1800)`.
4. **Spawn the node runs (≤3, in parallel).** For each wave job, dispatch its node as an inner atlas
run at `run_id = ${SESSION}/tasks/<node_id>` over the node's `scope_paths` in its own worktree.
(On a high-risk funded node, `bestofn.fanout_n` may fund N draft coders; rerank with `bestofn.select`
and collapse N→1 **before** that node's VERIFIED — the merge machinery is never touched intra-node.)
A build wave never overlaps a coder wave (the `free -m` guard blocks it). Per-node skill selection
needs no weave-level machinery: each inner atlas run already ranks the registry at its own GROUNDED
stage (`.atlas/<run_id>/skills.json`); a node-level call may reuse `scripts/skillselect.py` with the node's intent.
5. **Collect thin receipts.** The node's inner atlas run ends by presenting its OUTPUT — it emits no
`job_id`/`lease`/`status`. **YOU (the orchestrator) synthesize the receipt** for `apply_receipt`:
attach the RUNNING job's stamped `lease` (the fence token you wrote in step 3, `f"{job_id}#{attempts}"`)
and set `status` from the node's **completion outcome** — completed → `"ok"`, lease-expired/no-return
→ `"timeout"` — NOT the 6-lens verdict (that travels in the node's `merged_critic.json` and is folded
later by `final_aggregate`). Fence: `apply_receipt` ignores any receipt whose lease ≠ the RUNNING
job's current lease (stale/dup — e.g. a killed turn's receipt after a resume). `dag =
scheduler.apply_receipt(dag, receipt)`; persist the node's `merged_critic.json` as that node's verdict.
6. **Reap the dead.** `expired = leaseclock.expired(leases, now)`; `dag =
scheduler.reap_expired(dag, expired)` (a crashed/silent node is requeued, bounded by MAX_ATTEMPTS).
7. Re-write `plan.dag.json` atomically; `ctxstore.advance(".atlas","${SESSION}","SCHEDULE",
wave=<n>)`. Repeat.
### INTEGRATE — the combined-tree sink (the headline gate)
- **Build the union.** `u = uniontree.apply_union(baseline_sha, changes, ".", "${SESSION}")` where
`changes = [{id: node_id, diff: <node diff.patch>}]` — an isolated worktree with every node diff
`git apply`-ed in order. A failed apply is a hidden overlap the declared scopes missed → a blocking
conflict (the third disjointness net).
- **Re-validate disjointness against ACTUAL touched files:** `conflicts =
integrate.actual_conflicts(changes)` (a clean `git apply` is NOT credited as proof —
same-file-different-hunk concatenates silently).
- **Cross-suite differential.** First gather **`baseline_pass`** = the UNION, over all nodes, of the
test-ids that were green in *that node's own* isolated suite (each node's inner run recorded them; or
re-derive by running `suiterun.run_suite` on each node's own worktree). Then run the union suite on
the merged tree: `combined = suiterun.run_suite(verify_cmd, u["worktree"])` (green == exactly
`"pass"`); `regressions = differential.regressions(baseline_pass, combined)` — a zero-false-positive
combined-tree regression oracle (a test green-alone but red-combined).
- **Fold apply-failures into the deterministic floor (the third disjointness net).**
`apply_defects = integrate.apply_failures(u)` — a change the union `git apply` REJECTED (`u["failed"]`),
or an unbuildable union tree (`u["worktree"] is None`), never landed on the merged tree, so it is a
CRITICAL blocker decided HERE, not deferred to the seam critic. This is the promise L142 makes good:
a clean `git apply` is never credited, and a dropped change can never fold to a false green.
- **Seam wave.** Dispatch via `run_codex_role(role="integration-critic",
description="judge the seams of the combined tree", prompt=<packet ONLY>)` (role already
supplied by the runner — prompt carries the packet) over
the `combined_diff` + touched
exported symbols (sharded above a diff-size threshold, honestly labeled weaker there). It RETURNS a
critic-schema report; persist as `critic_integration.json`.
- `integration = integrate.integration_verdict([conflicts,
differential.integration_defects(regressions), apply_defects, <integration critic defects>])`.
- `ctxstore.advance(".atlas","${SESSION}","INTEGRATE")`.
### AGGREGATE — the one pure fold (no LLM)
- `agg = scheduler.final_aggregate(dag, node_verdicts_by_node, integration)` — folds every node's
6-lens verdict + a synthetic UNVERIFIED per unresolved node + the DECOMPOSE criteria-conservation
backstop. (The run-wide coverage assertion `verdict.coverage_partition(<union of per-node
success_criteria_subset>, frozen success_criteria)` was already enforced at DECOMPOSED by
`coerce_dag → validate_planner_dag`; re-assert it here defensively —
`verdict.merge([agg], coverage_partition(...))` — for a DAG reconstructed by resume.) A single
unresolved node, a dropped requirement, a combined regression, or a seam defect forces FAIL — a
passing sibling can never mask it.
- `status = scheduler.run_status(dag, agg)` (UNVERIFIED if a genuinely-unresolved frontier ran the
gas out; a fully-resolved run keeps its real verdict).
- `ctxstore.advance(".atlas","${SESSION}","AGGREGATE", verdict=agg["verdict"])`.
### OUTPUT — human gate (no auto-apply)
- Present the aggregate verdict, the per-node summaries, the combined diff, and the conflict/regression
/seam findings. **Never auto-apply** the union to the real tree — the merge is human-gated exactly as
a single atlas run's OUTPUT is. `ctxstore.advance(".atlas","${SESSION}","OUTPUT")`.
---
## Live dogfood (manual, in Codex)
The deterministic composition of this whole pipeline is proven mechanically by
`scripts/dogfood_weave.py` (a real temp git repo + scripted node diffs: it asserts a clean multi-file
change greens, a hidden same-file overlap and a combined-tree regression each BLOCK, and a 1-node DAG
degrades to atlas). That proof runs in CI and needs **no** live agents.
The **live quality/throughput delta** (real coders on a real multi-file task) is a manual measurement
— it needs the Codex agent runtime, not the CI env. To record it honestly:
1. Pick a real multi-file change with ≥2 file-disjoint parts and a runnable `verify_cmd`.
2. Run it once through the `atlas` skill (single-shot) and once through the `atlas-weave` skill; capture
wall-clock, token spend, and the final verdict for each.
3. Report the Q (verdict + human-review findings) and T (time/tokens) delta. Do **not** fabricate a
number — if a live run was not performed, say so; the shipped proof is the deterministic
`dogfood_weave`, and the live delta is future measurement.
The packaged `runtimes/codex/economy.json` is the selected quality-oriented baseline for all seven worker roles: `gpt-5.6-terra` at medium for context scouting and high for code-quality review; `gpt-5.6-sol` at high for coding, planning, correctness, security, and integration review. The runner applies it even when a role call omits model options and rejects reasoning below medium. The root-session model is selected by the user or host session. An account that lacks a selected model fails closed; it never silently selects the CLI default or a stronger model. A user-owned `--role-config` can override default/per-role model and effort, and explicit `--model`/`--effort` win. Local catalogue availability was checked; cross-role quality and quota costs remain to be measured.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!