nucleus_delegate
Hand a coding or review task to a cross-vendor lane — a cheap, non-Claude
agent that does the work for you. Use this INSTEAD OF shelling out to any CLI: it
picks the vendor, injects the correct per-vendor permission flags, captures all
output synchronously, and reports a real status. Do NOT run `agy`/`devin`
yourself in Bash — the raw CLIs take DIFFERENT per-vendor flags (pass the wrong
one and a build silently makes ZERO edits yet exits 0), and hand-driven
background calls flush output late (a finished call looks empty for tens of
seconds). This tool is the only robust path.
First call `list` — it needs no setup, confirms cross-vendor is enabled, and
shows each vendor's selectable_models + default_model. If dispatch/review return
a disabled error, cross-vendor is OFF: run `nucleus onboard` once (one-time),
then retry.
Actions:
dispatch - Hand a task to a cross-vendor lane.
params: {vendor, prompt, artifact_ref, mode?, model?, expect_paths?, to?}
REQUIRED: vendor ∈ 'agy'|'devin', prompt, artifact_ref.
mode ∈ 'write'|'read' (default 'write'):
write = the vendor CHANGES things (edit files, run commands, build/fix).
read = the vendor only LOOKS and REPORTS (analyze/summarize); no file changes.
When unsure use 'write': a read task still works in write mode, but a write
task silently does NOTHING in read mode.
model? — optional. Defaults to the vendor's verified model
(agy → gemini-3.1-pro-high, devin → glm-5.2). These are ALREADY the
defaults, so omitting model is sufficient; pass it only to be explicit or
to override. The response echoes model_id — read model_id (NOT model_family)
to confirm which model ran. A cross-wired model (e.g. glm-5.2 with agy) is
rejected with the valid ids named.
artifact_ref — a commit SHA / PR# / file path to bind the result to. No commit
yet (a from-scratch build)? Pass the repo-relative path you will write,
e.g. src/foo.py.
expect_paths? — optional list of file paths you expect the vendor to change.
If you pass them and the vendor changes none, status comes back NOT success
("no_files_touched") even if it narrated success. Without expect_paths,
success means only that the vendor produced output — not that it edited
anything, so ALWAYS confirm with your own `git diff`. (Paths are checked in
the nucleus server process's working dir; pass paths valid there.)
You never pass CLI flags — the tool injects the right permissions per vendor.
Example (build): action="dispatch", params={"vendor":"devin","prompt":"<task>",
"artifact_ref":"src/foo.py","mode":"write","model":"glm-5.2",
"expect_paths":["src/foo.py"]}
review - Independent, different-model verdict on pasted code / a diff.
params: {content, ref?, vendor?, model?, to?}
content REQUIRED (paste the code/diff inline). Default vendor agy (Gemini,
model gemini-3.1-pro-high) — a genuinely different model from the devin/GLM
builder, so the review is diverse. Read-only, edits nothing. Returns a terse
two-line verdict. For a devin/GLM second opinion pass vendor='devin'.
Example: action="review", params={"content":"<code or diff>",
"model":"gemini-3.1-pro-high"}
list - Show vendors, their selectable_models + default_model, the mode vocabulary,
and whether cross-vendor is enabled. Needs no setup — call it first.
A green result is a hypothesis until you verify it on your own shell (zero-trust).
Read the response's `status` and `success`: 'ok' = produced output; 'empty_output'
/ 'no_files_touched' / 'timed_out' / 'error' come back success=false — NOT done.
(If NUCLEUS_ENVELOPE is on, gate on the INNER success flag, not the envelope's ok.)
Two caveats from real use:
- SECRET HYGIENE: vendor OUTPUT is best-effort secret-redacted (Bearer/JWT/API-key
patterns -> <REDACTED>; the count is in the response `redacted` field). This is a
BACKSTOP, not a guarantee — never put credentials in a prompt, and the tool CANNOT
scrub a file the vendor writes itself, so review any vendor file-writes near secrets
yourself before trusting them.
- REVIEW SEES ONLY WHAT YOU PASTE: 'review' (and 'dispatch') cannot read the repo, a
diff, or any file — they judge only the text in your params. Paste the real code/diff
or the reviewer will confidently critique things it cannot see. For a whole PR, paste
the actual diff, not a description of it.
nucleus_sessions
Session management, events, state & checkpoint tools.
Actions:
save - Save session for later. params: {context, active_task?, pending_decisions?, breadcrumbs?, next_steps?}
resume - Resume a saved session. params: {session_id?}
list - List all saved sessions
check_recent - Check for recent session to resume (alias: "current")
end - End work session. params: {summary?, learnings?, mood?}
start - Mandatory session start protocol
archive_resolved - Archive .resolved.* backup files
propose_merges - Detect redundant artifacts, generate merge proposals
garbage_collect - Archive stale tasks. params: {max_age_hours?, dry_run?}
emit_event - Emit event to brain ledger. params: {event_type, emitter, data, description?}
read_events - Read recent events. params: {limit?}
get_state - Get brain state. params: {path?}
update_state - Update brain state. params: {updates}
checkpoint - Save task checkpoint. params: {task_id, step?, progress_percent?, context?, artifacts?, resumable?}
resume_checkpoint - Resume from checkpoint. params: {task_id}
handoff_summary - Generate handoff summary. params: {task_id, summary, key_decisions?, handoff_notes?}
ingest_conversations - Ingest Claude Code JSONL transcripts. params: {mode?: "incremental"|"batch"|"single", session_id?, limit?, dry_run?}
search_conversations - Search ingested conversations. params: {query, limit?, session_id?, date_from?, date_to?}
list_conversations - List ingested sessions. params: {limit?, offset?, sort?: "recent"|"size"|"turns"}
conversation_stats - Aggregate conversation corpus statistics
register - [T3.11] Register agent session envelope. params: {session_id, agent, role, provider, worktree_path?, pid?, heartbeat_interval_s?, role_credential?} (role_credential required when NUCLEUS_ROLE_CREDENTIAL=1 — see stone-1.5)
heartbeat - [T3.11] Touch last_heartbeat on an envelope. params: {session_id}
unregister - [T3.11] Delete a session envelope. params: {session_id}
list_agents - [T3.11] List registered agent envelopes. params: {worktree_path?, role?, alive_only?}
detect_splits - [T3.11] Report (worktree, role) buckets with >1 alive session. params: {worktree_path?}
nucleus_sync
Sync, artifact, trigger & deploy management for multi-agent coordination.
Actions:
identify_agent - Register agent identity. params: {role, provider, session_id} (per ADR-0005 §D1)
OR legacy {agent_id, environment, role?} (coerced per §D5 until end of Cycle C+2)
sync_status - Check current multi-agent sync status
sync_now - Manually trigger sync. params: {force?}
sync_auto - Enable/disable file watching. params: {enable}
sync_resolve - Resolve a file conflict. params: {file_path, strategy?}
read_artifact - Read an artifact file. params: {path}
write_artifact - Write to an artifact file. params: {path, content}
list_artifacts - List artifacts. params: {folder?}
trigger_agent - Trigger an agent via event. params: {agent, task_description, context_files?}
get_triggers - Get all defined neural triggers
evaluate_triggers - Evaluate triggers for an event. params: {event_type, emitter}
start_deploy_poll - Start monitoring a Render deploy. params: {service_id, commit_sha?}
check_deploy - Check deploy poll status. params: {service_id}
complete_deploy - Mark deploy complete. params: {service_id, success, deploy_url?, error?, run_smoke_test?}
smoke_test - Run a smoke test. params: {url, endpoint?}
shared_read - Read shared state. params: {key}
shared_write - Write shared state. params: {key, value, agent_id?}
shared_list - List all shared state keys
notify - Send notification to all channels. params: {title, message, level?}
list_channels - List configured notification channels
add_channel - Add a channel. params: {channel_type, webhook_url?}
test_channel - Test a channel. params: {channel_name?}
relay_post - Post message to another session type (Cowork↔Claude Code). params: {to, subject, body, priority?, context?, sender?, to_session_id?, from_session_id?, in_reply_to?, task_id?}
relay_inbox - Read messages for current session type. params: {unread_only?, limit?, recipient?, session_id?, task_id?}
task_comment_add - Post a task-scoped comment (coordination during task execution). params: {task_id, message, sender, subject?, priority?, in_reply_to?}
task_comment_list - List all comments for a task. params: {task_id, limit?}
declare_posture - Declare agent role + approach (pending operator approval). params: {role, approach?, agent_id?, delegation_targets?}
approve_posture - Approve the declared posture (operator only). params: {approved_by?}
get_posture - Get current posture. params: {}
clear_posture - Clear current posture. params: {}
relay_ack - Mark a relay message as read. params: {message_id, recipient?, session_id?}
relay_status - Get relay mailbox status across all session types
relay_clear - Clean up old relay messages. params: {recipient?, older_than_hours?}
relay_log_event - Log a fire/skip event. params: {event, side, subject, tags?, match_reason?, priority?, message_id?, in_reply_to?}
relay_skip_review - List recent unclassified skips. params: {limit?}
relay_classify_skip - Classify a skip event. params: {ts, subject, classification, note?}
relay_event_stats - Compute override + skip rates from event_log.jsonl
marketplace_search - Search registered capability cards. params: {tags?, min_tier?, limit?}
marketplace_whoami - Get caller's address, tier, reputation. params: {role?}
marketplace_can_call - Pre-flight permission check. params: {caller, target}
marketplace_recommend - Recommend agents by task description. params: {task, top_k?}
marketplace_dashboard - Aggregated health snapshot. params: {}
marketplace_history - Reputation event timeline for an address. params: {address, limit?}
marketplace_promote - Admin: manually set address tier. params: {address, new_tier, caller?}
marketplace_quarantine - Admin: flag address quarantined. params: {address, caller?, reason?}
marketplace_audit - Replay admin_actions.jsonl with filters. params: {caller?, target?, action_type?, since_timestamp?, limit?, offset?}
marketplace_compare - Head-to-head comparison of two addresses. params: {a, b}
marketplace_trends - Tier distribution trend over N days. params: {days?}
marketplace_alert - Subscribe to alert rules. params: {subscriber, target, event_types?}
marketplace_export - Full registry snapshot (read-only). params: {}
marketplace_diff - Diff two registry snapshots. params: {snapshot_a, snapshot_b}
marketplace_subscribe - Subscribe to tier-change events. params: {subscriber, target?, event_types?}
marketplace_unsubscribe - Remove subscription. params: {subscriber, target?}
marketplace_subscriptions - List subscriptions. params: {subscriber?}
marketplace_federation_proxy - Proxy an action to a remote federation brain. params: {target_brain, action, payload?}
marketplace_federation_register - Register local brain as a federated capability card. params: {address, capabilities?, display_name?, tags?}
marketplace_federation_sync - Force federation sync and reconcile marketplace registry. params: {}