nodes-operator
Drive a running culture-nodes control plane: inspect runs/ledger/actors, author + validate + publish workflows, and assign real work to registered agent actors (codex-thor, codex-orin) through the normal engine dispatch path. Use when the user says "assign this to codex", "run it through nodes", "create a workflow for X", "what's running", "cancel that run", "check the ledger", or when you want to delegate a scoped task to the production actor fleet instead of doing it in-session. Works for ANY operator with the skill — Claude, the colleague backend, codex sessions, or a human at a shell — plain bash + curl + python3 against the public v1alpha1 HTTP API.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-29
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- nodes-operator
- type
- command
- description
- Drive a running culture-nodes control plane: inspect runs/ledger/actors, author + validate + publish workflows, and assign real work to registered agent actors (codex-thor, codex-orin) through the normal engine dispatch path. Use when the user says "assign this to codex", "run it through nodes", "create a workflow for X", "what's running", "cancel that run", "check the ledger", or when you want to delegate a scoped task to the production actor fleet instead of doing it in-session. Works for ANY operator with the skill — Claude, the colleague backend, codex sessions, or a human at a shell — plain bash + curl + python3 against the public v1alpha1 HTTP API.
02 资源文件 2
- 脚本scripts/nodes-op.sh27.4 KB
- 参考文档templates/assign.workflow.yaml3.6 KB
03 SKILL.md 正文
nodes-operator — assign work through the culture-nodes system
The point of this skill: anyone — this agent, another agent, a human — can delegate a scoped task to the registered actor fleet and get back a run id, node outcomes, and proposed ledger claims, all through the engine's normal dispatch path. No bypasses: everything lands in the same runs/board/jobs UI, the same ledger, the same evidence trail.
How to run
bash .claude/skills/nodes-operator/scripts/nodes-op.sh <verb> [args]
API resolution: $NODES_API_URL → ~/.culture-nodes/operator.env →
http://192.168.1.146:18080 (thor's LAN address; the web UI lives at the
same origin). Requires bash, curl, python3 (+PyYAML for
validate/publish/assign; jq not required).
The verbs
| Verb | What it does |
|---|---|
status |
healthz + run-state counts |
running |
every running run with its metadata/input and current node/attempt detail |
workflows |
published workflows (key, digest) |
runs [N] / run <id> |
newest runs / one run's nodes, outcomes, attempts |
ledger <id> |
a run's ledger records (authority, origin actor, data) |
tasks |
pending human tasks |
validate <f.yaml> / publish <f.yaml> |
server-side compile check / publish, printing the content digest |
create <digest> <input.json> [--category C] --yes |
create a run from a published digest |
watch <id> |
poll to terminal, then print outcomes + ledger |
cancel <id> |
cancel: reaps work items, best-effort Cancels in-flight sessions |
grade <run-id> --rating N --notes "..." [--actor ID] [--as ID] [--category C] |
grade a run against an actor (1-5 rating + rationale, issue #28 item 1) |
assign <actor> "instruction" [opts] --yes |
the headline: one-node workflow → publish → run → watch |
actors |
registered actor rows, read over the API (no ssh); the 4th column is each lane's liveness (session_ok/reason/mode/locked, or unmeasured) |
assign — delegate one task to one actor
bash .claude/skills/nodes-operator/scripts/nodes-op.sh assign codex-thor \
"Read deploy/prod/README.md and report any statement that no longer matches the repo tree. Make no changes." \
--yes
Renders templates/assign.workflow.yaml (single task node → finish,
modelled byte-for-byte on the proven examples/codex-smoke-pair shape) for
the chosen actor, publishes it (idempotent — identical renders return the
same digest), creates the run with the instruction as input, and watches it
to terminal. Options: --sandbox read-only|workspace-write (default
read-only), --timeout (default 15m — always explicit: a node timeout is
the recovery story for a bridge restart), --retries (default 1 — a
billable session is investigated, not auto-retried), --outcome,
--category (optional flat tag on the created run, e.g. review, audit
— retaggable later via nodes run retag <id> --category C), --devague-write
(the package writes .devague/: developer lane only, in its custody
checkout — refused for every other actor before anything is billed; see
docs/operations/spec-chain-lane.md), --no-watch.
Actors map to a checkout owned by that bridge's dedicated Unix account, not
to the operator's own checkout: codex-thor and codex-orin each run as
culture-codex on their host, both checking out
/home/culture-codex/git/culture-nodes-agent; developer, planner,
verifier, intake run as culture-claude on spark, each in its own clone
under /home/culture-claude/git/culture-nodes-<role>; qwen-developer runs
as culture-qwen on spark, in /home/culture-qwen/git/culture-nodes-qwen-developer.
New actors: for a harness lane (qwen, pi, colleague) run
deploy/prod/cutover.sh <host> <engine> --dry-run and then --yes — one
command for secrets → deploy → registration, refusing by name when the
engine account or the compose token key is missing (#298); creating the
culture-<engine> account stays a root hand-turn typed on the host. For
anything else, register with deploy/prod/register-actor.sh directly. Either
way, then extend the actor table in scripts/nodes-op.sh (one case line)
with a checkout under that bridge's account.
Harness-comparison lanes (#294). Four actors run the same served model
(unsloth/Qwen3.8-27B-NVFP4 at http://thor:8000/v1) through two harnesses
on the two prod hosts, so a run's harness is a property to compare rather than
a fixed backend:
| Actor | Harness | Host | Account | Port |
|---|---|---|---|---|
qwen-thor |
Qwen Code (ACP) | thor | culture-qwen |
8092 |
qwen-orin |
Qwen Code (ACP) | orin | culture-qwen |
8092 |
pi-thor |
pi (--mode json) |
thor | culture-pi |
8093 |
pi-orin |
pi (--mode json) |
orin | culture-pi |
8093 |
The qwen actors require --mode (yolo is admitted since #294 t1 — the
engine account is the confinement); the pi actors take no mode. Dispatch the
same instruction to more than one and read the runs side by side, or run the
examples/harness-compare workflow to fan and join in one graph.
grade — record an opinion on a run's actor
bash .claude/skills/nodes-operator/scripts/nodes-op.sh grade run_01J... \
--rating 4 --notes "read the files it was asked to, correct diagnosis, one stale detail" \
--actor codex-thor-actor-id
Appends a grade ledger record (POST /v1alpha1/runs/{id}/grades) evaluating
--actor on the named run. --as (the grading actor) defaults to the first
registered kind=human actor; --actor defaults to the run's most recently
attempted actor when it can be read cheaply off the run itself — both can be
passed explicitly, and the verb refuses rather than guessing when neither a
default nor an explicit value is available. The API looks up --as's
registered kind and decides origin/authority from it: a human actor's grade
lands confirmed immediately; an agent actor's grade lands proposed and
reaches confirmed only through the ordinary review surface. No actor may
grade its own work.
This is the mechanism behind CLAUDE.md's "nodes dogfooding reflex" —
grade every assigned run against its actor so the comparative record of
which actor is better at what accrues as first-class ledger evidence, not
only as an eidetic /remember note.
What every operator must know
- Billable + guarded.
assign/createdispatch real agent sessions (ChatGPT quota today). They refuse without--yes/NODES_OP_YES=1. - Sandbox reality (issues #18 / #63) and the account model. codex
sessions on thor/orin can exec shell commands, including in a
read-onlysandbox. The blocker was the host AppArmor userns restriction, not codex: withkernel.apparmor_restrict_unprivileged_userns=0applied and persisted on all three hosts, run01M00AM5NME6TZ1PXDG4A454HEexecutedgit log,git status,pwdandlsand returned real output. Every bridge now runs as its own dedicated, unprivileged Unix account (culture-codexon thor/orin,culture-claudeandculture-qwenon spark —deploy/prod/lanes/unix-user.sh) rather than the operator's login user, so a--sandbox workspace-writedispatch is confined by account ownership, not by a sandbox flag: the account cannot write anything it does not own, and it cannot read the operator's own checkout at all. Theread-onlyprobe above was pre-account. The account model was proven live on 2026-08-29/30 (#243 t10): asculture-codex, runs01M17E36Z7G8A60WP6TA9QB0AP(orin) and01M17E3ZC1MBQ6DZRKY93T8PWE(thor) fetched from github, ran black/isort/flake8 throughuvx, passed 29 loopback tests and were denied on the login user's home,sudoand the docker socket; runs01M17NJ8W7B6NQ2RKT6B89SF94/01M17NK19NY09G55J7AJWYW7XTdid the same underworkspace-writewith network from the account's own codex config. Asculture-claude, run01M17P15BJ28XN57N7P7Q77Y48did all of that AND handed its change over asrefs/culture-nodes/01M17P15BJ28XN57N7P7Q77Y48/...authored by the account, fetched by the operator asculture-claude@localhost. Assign reads, analysis and writes freely; a--handoverdispatch is how a write reaches you (see "Harvesting a dispatched checkout"). - Results are claims, not evidence. A session's report lands as a
proposedledger claim attributed to its registered actor. Confirming it is a human's job; treat the summary exactly as you'd treat a colleague's "done" — worth reading, not worth asserting onward unverified. - Retry semantics. The engine parks a node as
failedafter 3 dispatch attempts per work item; workflow-declared--retriescompose on top.cancelreaps immediately and SIGTERMs in-flight sessions (~30ms observed). - Everything is inspectable afterward: web UI at the API origin, this
skill's
run/ledgerverbs, or the PythonnodesCLI (uv run nodes run list) which speaks the same API.
Harvesting a dispatched checkout
A dispatch writes into the bridge's account checkout, not the operator's.
To read or copy what an actor left behind, log in as that account rather
than sudo-ing into its home: ssh culture-<engine>@<host> (culture-codex
on thor/orin, culture-claude or culture-qwen on spark — for spark use
ssh culture-<engine>@localhost since the operator is already on that
host). Never sudo -u into the account or read its files as the operator's
login user — the account's checkout is deliberately unreadable to any other
account, the harvest path goes through the account's own login, the same
way a dispatch does.
Pre-check lanes before fan-out (issue #308)
Before any assign fan-out or split plan, read the lanes' liveness. Both
codex lanes answered /healthz 200 and codex login status said "Logged in"
on 2026-09-07, minutes before every dispatch failed with "refresh token was
revoked" — a healthy bridge process in front of a dead session, discovered
by paying for the sessions. The bridge's liveness fact is what tells the
two apart, and two surfaces read it off the control plane:
bash .claude/skills/nodes-operator/scripts/nodes-op.sh actors
# company/codex-orin|2|http://...:8086|session_ok=false reason=refresh_token_spent mode=LOCK locked=true
# company/codex-thor|1|http://...:8086|session_ok=true reason=ok mode=CHECK locked=false
uv run nodes doctor # [FAIL] lane_liveness: 1 dead lane(s): company/codex-orin (...)
The rule: a lane reading session_ok=false or locked=true is not in the
split plan. Route its packages to its registered fallback_actor
(register-actor.sh --metadata fallback_actor=<actor_key>; codex-thor and
codex-orin point at each other) or another live actor, and note the
substitution in the wave's session declaration below. unmeasured
(session_ok=null, no liveness field yet, or an unreachable API) is not a
verdict — dispatch as usual, knowing the first failure is what will measure
it (LOCK mode latches on it).
Restoring a dead lane is an operator hand-turn — and the check itself is one
too. It takes two clears, because there are two latches: the bridge's
per-process one (liveness_mode: LOCK, reset by a restart) and the control
plane's locked=true lock, which a restart does not touch and only the
resume endpoint clears (decision c43).
# 1. re-login as the LOGIN user on the bridge host — bootstrap copies the
# credential out of the login user's home, not the engine account's, so a
# login as culture-<engine> is not what it will pick up
ssh <host> # then, interactively on the host: codex login
# 2. copy it into the engine account. bootstrap is the lane's ONE root step
# and refuses any non-root caller
ssh <host> 'sudo bash culture-nodes-prod/deploy/prod/lanes/unix-user.sh bootstrap codex'
# 3. restart the bridge: its latch is per-process, so this returns the
# bridge's own fact to `unmeasured`
ssh culture-codex@<host> \
'export XDG_RUNTIME_DIR=/run/user/$(id -u); systemctl --user restart codex-bridge'
# 4. clear the control-plane lock. Nothing else clears it — not a restart,
# not a fresh credential. Needs the registration bearer, and the actor
# ID (act_...), not the key
curl -fsS -X POST "$NODES_API_URL/v1alpha1/actors/<actor-id>/resume" \
-H "authorization: Bearer $NODES_ACTOR_REGISTRATION_TOKEN_SECRET"
Then re-read the surface rather than assuming step 4 finished it: resume
clears the lock and nothing else, so a lane whose last stored fact is still
session_ok=false in LOCK mode stays un-leasable until a later collector
write replaces that fact. nodes-op.sh actors showing session_ok no
longer false and locked=false is the recovery; a green curl from step 4
is not.
Record the repair and the check with the CLI so they count (CLAUDE.md, "Every piece of operator work opens or updates an issue"):
# the ledger-native hand-turn record (t16): stage from the confirmed
# hand_turn_definition, the work item the turn served, one line of what
uv run nodes hand-turn --stage dispatch --work-item SCRUM-9 \
"read lane liveness before the wave-1 fan-out; codex-orin dead, routed to codex-thor"
codex-preflight.sh's login status check is advisory for the same reason:
it reads the stored credential, not the session.
Split-plan lane guidance and session accounting (issue #48)
When building an implementation split plan (via /spec-to-plan and
/assign-to-workforce), account for session economics across the dispatch
landscape. The operator's interactive Claude, local subagents, and all bridge
sessions share ONE subscription window — not independent capacity pools.
One meter, many lanes
- Operator main loop (lowest cost): prompt cache warm, marginal session cost lowest; right place for small/mechanical steps and merge gates.
- Local subagents: cold-ish start but same-process context handoff, no HTTP overhead.
- Bridge sessions (full cold tax): each codex exec / claude -p / colleague work invocation pays a complete cold-session cost (repo discovery, plan reading, zero conversational history) plus engine dispatch overhead. Worth it only when ledger attribution, isolation, or cross-machine execution justifies it.
Node granularity and routing
- Work-package model nodes: amortize bootstrap into one persistent warm session with many ledgered sub-actions, never one cold session per small plan task. This cycle's wave-0 averaged ~25k output tokens per task on top of repeated cold bootstrap — a shared workstream session would have paid that bootstrap once.
- Deterministic/code nodes: stay microscopic — these belong in the operator lane or as part of a larger model workstream.
- Codex-first routing for big analysis and build packages: the cold-session tax is large enough to amortize over significant work; reserve the operator's Claude window for operator-lane work and human merge gates.
Split-plan template
Before any fan-out, declare expected model-session count per wave against the remaining subscription window (windows reset on a fixed clock; the operator should know the reset time and remaining capacity before planning), and only over lanes the pre-check above read as live. Copy this template into the plan's waves section and fill it in:
# Wave W: <description>
# - Tasks: t1, t2, t3, ...
# - Model sessions (remaining window): N (justify per lane: operator X sessions,
# codex-bridge Y sessions for big packages P1, P2, ...)
# - Non-billable: deterministic nodes, human tasks
Example:
# Wave 0: Core design pass and scope exploration
# - Tasks: t1 (scope), t2 (think), t3 (challenge), t4 (spec-to-plan)
# - Model sessions (remaining window: 4h): 1 (operator lane, local design refinement)
# - Non-billable: challenge pass findings, spec review
#
# Wave 1: Phase-0 vertical slice implementation
# - Tasks: t5–t11 (usage telemetry, session stickiness, breaker, pacing, budget)
# - Model sessions (remaining window: 3.5h): 3 (codex-thor for usage + stickiness,
# codex-orin for breaker logic + pacing; operator: PR review gates only)
# - Non-billable: tests, documentation
Record deviations (issue #48 comment item 5): if a wave exhausts budget mid-execution or stays significantly under-budget, emit a deviation record with the observed session count and reason (longer node output, unforeseen complexity, faster execution). These records feed the next build's planning accuracy and the economics analysis (issue #28 per-actor analytics).
Provenance
First-party to culture-nodes — authored here (2026-08-12 cycle), not
vendored; steward may broadcast it to the mesh later. Cite, don't import:
downstream repos copy it. See docs/skill-sources.md.
04 同仓库更多 Skills
sample
Fixture skill proving the .qwen/skills leg carries at least one skill.
sample
Fixture skill proving the .qwen/skills leg carries at least one skill.
sample
Fixture skill proving the .qwen/skills leg carries at least one skill.
think
Think a vague feature idea into a buildable spec by working backwards (the idea→spec leg; drives the `devague` CLI). Start from the announcement ("pretend it shipped"), capture and classify claims, interrogate them with honesty conditions and hard questions, park open vagueness as a first-class object, and export a spec only once the frame *converges*. Use when the user says "think this through", "spec this", "work backwards", "turn this idea into a spec", "announcement frame", or "devague", or when a feature request is too vague to build yet. Explore scope first when the idea touches an existing codebase — the sibling `scope` skill is the optional opening leg ahead of `think`. Once a spec exports, hand off to the sibling `spec-to-plan` skill to turn it into a plan. Authored and maintained in agentculture/devague (origin = devague); guildmaster pulls this skill from here and broadcasts it to the AgentCulture mesh — it is NOT vendored from guildmaster like the other skills here.
summarize-delivery
Close the loop after an `assign-to-workforce` run by turning what actually happened into an accountability artifact — planned versus actual delivery, mid-work decisions, plan drift, evidence-backed delivery claims, and remaining work. The plan the user confirmed is the contract; this skill records where execution obeyed it, where it changed, and what is genuinely safe to claim as delivered. Runs on complete, partial, AND failed runs — failure is reported faithfully, never smoothed over. Use when the user says "summarize delivery", "delivery summary", "wrap up", "close the loop", "what did we actually ship", or "plan versus actual", or after `assign-to-workforce` merges (or fails to merge) a plan's waves. Authored and maintained in agentculture/devague (origin = devague); guildmaster pulls this skill from here and broadcasts it to the AgentCulture mesh — it is NOT vendored from guildmaster like the inbound skills here.
spec-to-plan
Turn a converged devague spec into a buildable plan by working forwards (the spec→plan leg; drives the `devague plan` CLI group). Seed a plan from a converged frame, add tasks that collectively cover every coverage target (the frame's confirmed claims + honesty conditions), give each task acceptance criteria and an honest dependency order, park genuine unknowns as first-class risks, and export a plan only once it *converges*. Use when the user says "spec to plan", "stp", "turn this spec into a plan", "plan this spec", "make a build plan", or after the `think` skill exports a spec. Authored and maintained in agentculture/devague (origin = devague); guildmaster pulls this skill from here and broadcasts it to the AgentCulture mesh — it is NOT vendored from guildmaster like the other skills here.