agentleFS
EnderfgaEnderfga/openclaw-claude-code/AGENTS.md

openclaw-claude-code

AGENTS.md625 starsChanged 36 days agoMITView on GitHub

This file provides context for coding agents (Claude Code, Codex, OpenCode, and others) working on this project. CLAUDE.md only imports it, so there is one copy to keep current. Claw Orchestrator wraps coding CLIs (Claude Code, Codex, Antigravity, Grok Build, Cursor, OpenCode, any Agent Client Protocol agent, any remote Agent2Agent agent, plus arbitrary custom CLIs) into a managed, programmable session layer for claw-style agent systems. Runs as a standalone CLI/server, an MCP server, an ACP agent or an A2A agent,…

  • Deletes or force-pushes
  • Installs packages
  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,266 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All documentation lives in skills/references/.

    line 207
  2. Distinctive:

    When you change functionality, update the corresponding reference file:

    line 210
  3. Very specific:

    Run npm run build && npm run lint && npm run format:check && npm run test before submitting

    line 245
  4. Distinctive:

    Update CHANGELOG.md for user-facing changes

    line 246
  5. Distinctive:

    Follow this checklist for every release.

    line 252
  6. Distinctive:

    Hard rule on leak-fix releases: if the patch is sanitising something previously hard-coded, the commit message / CHANGELOG entry / release …

    line 269
  7. Very specific:

    Update version in package.json.

    line 277
  8. Distinctive:

    Add a new section at the top:

    line 285
  9. Distinctive:

    Check and update if needed:

    line 297
  10. Very specific:

    If a publish ever 404s on the PUT, check the Trusted Publisher config on npmjs.com — it is not a token problem.

    line 327
  11. Very specific:

    Add it as the repository secret CLAWHUB_TOKEN.

    line 346
  12. Very specific:

    Important: When CLI vendors change flags or output format, update the corresponding persistent-*-session.ts and re-run integration tests.

    line 373

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — claw-orchestrator

This file provides context for coding agents (Claude Code, Codex, OpenCode, and others) working on this project. CLAUDE.md only imports it, so there is one copy to keep current.

Architecture

Claw Orchestrator wraps coding CLIs (Claude Code, Codex, Antigravity, Grok Build, Cursor, OpenCode, any Agent Client Protocol agent, any remote Agent2Agent agent, plus arbitrary custom CLIs) into a managed, programmable session layer for claw-style agent systems. Runs as a standalone CLI/server, an MCP server, an ACP agent or an A2A agent, with first-class OpenClaw plugin support. Key source files:

FilePurpose
src/index.tsPlugin entry — registers all 86 canonical tools; also the SDK's export surface
src/session-params.tsThe session_start parameters — one list, read by the MCP tool, the CLI's session flags and the defaults file
src/clawo-config.tsThe defaults file (~/.claw-orchestrator/config.json): the default engine and per-engine session defaults, read on every session start
src/session-manager.tsCore orchestrator — session lifecycle, handoff, orchestrated sessions, delegation, failover, and the entry point of every mode (council, fan-out, ultraplan/ultrareview, autoloop, UltraApp, workflows, verify_run)
src/orchestrator.tsOrchestrated sessions (executor): the spec, the planner's brief, its <executor-task> blocks and the <executor-report> it gets back; the session manager runs the rounds
src/base-oneshot-session.tsAbstract base class for one-shot (process-per-send) engines
src/engine-spawn.tsThe one place engine CLIs are spawned (cross-spawn, so Windows .cmd shims run without a shell) and their process trees killed
src/persistent-session.tsClaude Code CLI wrapper (spawn, JSON protocol, stream parsing)
src/claude-commands.tsClaude Code's commands for session_command — slash commands, skills and custom commands from the initialize listing, and control requests named as commands — plus its quota and context-breakdown readings
src/persistent-codex-session.tsCodex CLI wrapper (codex exec --sandbox <mode> --json, one process per send, thread resume)
src/persistent-codex-app-session.tsCodex app-server wrapper (codex-app engine: codex app-server --listen stdio://, JSON-RPC) — /goal, interrupt, steer, fork, rollback
src/codex-app-client.tsA short-lived codex app-server for one job: what codex exec has no surface for (rate limits, skills and MCP listings, compaction, review, side questions, revert)
src/codex-commands.tsCodex's commands for both Codex engines, each run as the app-server RPC it maps to (commandStyle: 'rpc'), never as message text
src/codex-quota.tsThe Codex account's rate limits (account/rateLimits/read) for codex and codex-app, read on the session's own app-server or a short-lived one
src/codex-rollout.tsReads Codex's rollout files for the spend no stream reports: sub-agent threads and review threads
src/persistent-gemini-session.tsGemini CLI wrapper — legacy: Gemini CLI is sunset, superseded by Antigravity (agy). Kept working for existing callers; not documented as an option and not version-tracked.
src/persistent-agy-session.tsGoogle Antigravity CLI wrapper (agy -p --output-format stream-json) — reported token usage, conversation resumed by id (--conversation)
src/agy-conversation.tsReads agy's own log for the created conversation id and for tool-confirmation denials
src/agy-commands.tsAntigravity's slash commands as print mode runs them: info commands (no model turn, structured data), system commands and skills (a turn), and the interactive-only ones agy refuses
src/agy-transcripts.tsReads agy's conversation transcripts for what result.usage lacks: the model each request ran on, and the spend of /teamwork members, /swarm workers, /run-workflow agents and subagents
src/agy-quota.tsagy's quota from its own info commands (agy -p /usage, agy -p /credits), which run no model turn
src/agy-goal-session.tsAntigravity's own /goal loop behind GoalSession (nativeGoal): the goal stays set on the conversation, and a steer cuts the running process and continues it
src/persistent-cursor-session.tsCursor Agent CLI wrapper (cursor-agent -p --output-format stream-json) — chat resumed by id, each turn billed at the model id it was run on, Cursor's sandbox for workspace-write. Binary is cursor-agent, never the contested agent name.
src/cursor-config-dir.tsA per-session Cursor config directory (CURSOR_CONFIG_DIR): every entry links to the user's except a copy of cli-config.json, so --model never rewrites the user's default model
src/cursor-models.tsCursor's model ids (cursor-agent models), and a session's effort applied by picking the listed id with that effort suffix
src/cursor-commands.tsCursor's commands and skills, listed by a short-lived cursor-agent acp with no turn, and the plan tier cursor-agent about prints as its quota
src/cursor-goal-session.tsCursor's own /goal behind GoalSession (nativeGoal): the goal's state read from its CreateGoal / UpdateGoal tool calls, spend checked as each process ends
src/persistent-grok-session.tsGrok Build CLI wrapper (grok -p --output-format streaming-json) — engine-reported cost, resumable session id
src/grok-commands.tsGrok Build's slash commands as grok -p handles them: local built-ins, skills and workflows as turns, TUI commands refused, and the ones that need the long-lived ACP route
src/grok-goal-session.tsGrok Build's own /goal behind GoalSession (nativeGoal): one grok -p process plans, implements and verifies; the verdict is read from grok's goal state
src/grok-quota.tsGrok Build's quota: the plan from ACP _x.ai/billing, and the rolling 24-hour token window from the last usage-limit refusal grok logged
src/grok-acp-client.tsOne-off calls to grok agent stdio with no session open: the command list with descriptions (_x.ai/commands/list) and the account's plan (_x.ai/billing)
src/grok-acp-extension.tsGrok's ACP extension for the acp engine (grok preset): each turn's usage from _x.ai/session_notification, turns grok starts itself (/deep-research, /workflow, /loop) included
src/persistent-opencode-session.tssst/opencode CLI wrapper (opencode run --format json)
src/opencode-server.tsA private OpenCode 2 server (opencode serve) held by one session: turns run as run --server clients of it; steers, interrupts, commands, compaction, side questions, reverts and /goal go through its HTTP API
src/opencode-goal-session.tsOpenCode 2's own /goal behind GoalSession (nativeGoal): set on the held server, its state read through opencode.goal/get; OpenCode's judge decides when it is met
src/opencode-quota.tsOpenCode's quota: OpenCode Go usage limits and account budgets (/api/experimental/usage/limits), through the held server or opencode api --standalone
src/persistent-custom-session.tsCustom engine — any CLI via user-provided CustomEngineConfig
src/persistent-acp-session.tsACP engine — any Agent Client Protocol agent over stdio (kimi acp, dsh --profile acp, grok agent stdio, cursor-agent acp, agy acp); an agent's extension (registerAcpExtension) reports turn usage and the turns it starts itself
src/persistent-a2a-session.tsA2A engine — a remote Agent2Agent (A2A 1.0) agent as a session: one message per send in the agent's context, streamed or polled; interrupt = CancelTask; what its card has no channel for is refused
src/a2a/client.tsA2A client of one remote agent: its card read, a JSON-RPC 1.0 interface and a credential chosen from it (token from tokenEnv or CLAWO_A2A_TOKEN_<HOST>), calls and event streams
src/a2a/protocol.tsA2A 1.0 wire objects (ProtoJSON), JSON-RPC error codes, clawo's session extension URI, the SSE reader
src/council.tsMulti-agent collaboration engine with git worktree isolation and post-processing
src/consensus.tsConsensus voting parser for council
src/delegation.tsDelegation — the delegation spec, the delegate tools' definitions and limits, and the loopback endpoint their calls reach with a session's own token
bin/delegate-mcp.tsThe delegate tools as the MCP server a delegating session's engine gets, calling the session manager's delegation endpoint
src/fanout.tsFan-out — one task across N engine/model agents in parallel, optional synthesis pass; no worktrees
src/autoloop/Autoloop — the runner, the dispatcher that drives the Planner / Coder / Reviewer sessions, the message protocol, push notifications
src/autoloop/forum-bridge.tsAn autoloop on its run forum: roles as members, its messages mirrored as posts, what each turn carries, reply blocks, the forum_post SSE follower
src/ultraapp/UltraApp — interview → AppSpec → council build → deploy, its build queue and the /forge/<slug>/ router
src/kernel/types.tsOne state vocabulary — RunState, RunOutcome, WorkflowSpec, node specs
src/kernel/engine.tsThe run kernel — checkpointed execution, resume, retry, timeout, cancel, steer
src/kernel/store.tsDurable run store (~/.claw-orchestrator/wf/<runId>/) — guards, leases, and the one storage transaction
src/kernel/file-lock.tsThe one exclusive file lock, shared by the run store and the ultraapp build queue
src/kernel/exec.tsThe single child-process wrapper — non-throwing, timeout kills the process group, output capped
src/kernel/agent-step.tsThe single start→send→stop lifecycle; success reads turnsSucceeded
src/kernel/conditions.tsRouter conditions — a closed set (always, node_failed, node_succeeded, verified, visits_lt, and), deliberately not an expression language
src/kernel/projections.tsThe *_status tool shapes (council, fan-out, ultraplan, ultrareview, autoloop), derived from the durable run record
src/kernel/forum/The run forum, every mode's message bus — store and spool, posts and the authored ledger (user/orchestrator), routing and pushes, briefs and turn inboxes, rosters, metrics; forum.ts re-exports it
src/kernel/handover.tsA node's output posted on its run's forum when it ends, and the open-ASKs note of a result
src/kernel/isolation.tsA run in a git worktree of its own (isolation: "worktree") — created at start, the spec's directories moved into it, committed to clawo/<runId> and removed as the run ends, restored on resume
src/kernel/secrets.tsSecret references — a caller names a secret, the server resolves it from its own environment
src/kernel/nodes/One executor per node kind; thin wrappers over the existing engines
src/turn-goal-session.tsclawo's goal loop for agy, grok, Cursor, OpenCode and ACP agents, unless nativeGoal runs the engine's own: clawo runs the turns until the agent declares GOAL COMPLETE / GOAL BLOCKED
src/kernel/templates/Built-in workflows (solve, council, fanout, goal), UltraApp's build pipeline, and the single-node workflows council_start / fanout_start / ultraplan_start / ultrareview_start run on
src/verify/contract.tsAcceptanceContract + CheckSpec, and the normalizer that keeps agent-authored contracts out
src/verify/runner.tsRuns the checks — the generalisation of ultraapp's fix-on-failure
src/verify/baseline.tsBase-commit capture and change sets that include created files
src/verify/protected-tests.tsRefutes a run that changed the tests its contract runs
src/verify/evidence.tsEvidence bundles — verdict, per-check logs, patch, screenshots
src/verify/metric.tsThe metric check — a number read from a command's output, held to bounds and to the same command on the base commit in a temporary worktree
src/verify/check-env.tsThe environment checks run with — minimal (no secrets, plus passEnv) when an agent of the run worked in a sandbox, the server's otherwise, or what the contract's checkEnv says
src/run-ledger.tsDurable per-turn record (~/.claw-orchestrator/runs/*.jsonl) — append, query, summarize, verdict join — and one row per workflow run (runs/outcomes/), grouped by model, engine or workflow
src/provenance.tsProvenance — the clawo version and each engine CLI's --version, read once per executable per process, on every ledger and run row
src/concurrency.tsBounded parallel map — fan-out and council start no more agents than there are session slots
src/workspace-lock.tsWorkspace turns — writing sessions in one git work tree take turns, FIFO, across processes; an executor or a session started inside a turn (CLAWO_WORKSPACE_LINEAGE) enters under its ancestor's hold
src/budget.tsRuntime-enforced maxBudgetUsd spend cap (all engines, not just Claude Code)
src/engine-quota.tsEngine quota readers — each engine registers its own (registerQuotaReader); engine_quota and clawo quota read them
src/engine-capabilities.tsWhat each engine can do and how (engine_capabilities, clawo capabilities), read from the wrapper classes and the fallback layer
src/capability-fallbacks.tsclawo's way where an engine has none: a plan per send, compaction (summary turn + newConversation), a side question on a throwaway session
src/structured-output.tsjsonSchema on every engine — the schema in the message where the engine takes none, the reply's value extracted and validated, one retry
src/models.tsCentralized model registry — pricing, aliases, engine/provider mapping
src/engine-presets.tsCommunity engine presets (configs/engines/) — tiering, provenance validation, customEngine / acpAgent id resolution
src/types.tsShared types, interfaces; re-exports from models.ts
src/logger.tsStructured Logger interface + console implementation
src/circuit-breaker.tsEngine failure tracking with exponential backoff
src/inbox-manager.tsCross-session messages on the session forum (fm-sessions-…): the delivery policy, the inbox view, answers by reply block, the <cross-session-message> envelope
src/handoff.tsSession handoff — per-session conversation record, and its replay onto another engine
src/usage-limit.tsOne classification of a usage or rate limit for every engine, from a failed turn's error, result event and the engine's own signal, with the reset time when it says
src/failover.tsEngine failover (fallbackEngines): the list, the next engine, what a session keeps when it moves, the spend of the engines it left, a goal's carry-over brief
src/validation.tsWorking-directory and input validation shared by the tool handlers and the HTTP server
src/sanitize.tsSecret redaction for engine stderr and logged error reasons, used by the Claude, agy, Grok, OpenCode and custom wrappers
src/embedded-server.tsHTTP server for standalone/CLI usage
src/turn-stream.tsA turn's events as they happen — text, tool_use, tool_result read out of each engine's shape — for the streamed /session/send, the CLI and MCP progress; the SSE reader
src/dashboard/Web dashboard served by the embedded server at /dashboard (Autoloop, Council, Forge and Runs tabs)
src/openai-compat.tsOpenAI-compatible /v1/chat/completions endpoint
src/acp-server.tsAgent Client Protocol adapter — runs the orchestrator as an ACP agent
src/a2a/server.tsA2A agent — the embedded server's Agent Card and /a2a JSON-RPC endpoint: a context is a session, a message a turn, a task its lifecycle
src/proxy/Multi-model proxy (Gemini, GPT via Anthropic format translation)
bin/cli.tsCLI entry point (commander-based)
bin/session-flags.tsThe session flags of clawo session-start, built from session-params.ts, and the engine shorthands (--codex, --agy, …)
bin/session-send-output.tsclawo session-send output, plain and --stream (text on stdout, tool activity on stderr, --json one line per event)
bin/mcp-server.tsMCP stdio entry (clawo-mcp) — serves the tools src/index.ts registers
src/mcp-progress.tsA tool's partial results (session_send: its turn) as MCP notifications/progress for a call that carries a progressToken
bin/acp-server.tsACP stdio entry (clawo-acp / clawo acp)

Development

npm run build          # rm -rf dist && tsc && scripts/postbuild.mjs (dist/index.js shim, dashboard assets)
npm run lint           # ESLint (src/ and bin/)
npm run format:check   # Prettier check (src/**/*.ts and bin/**/*.ts)
npm run test           # Vitest unit tests (src/__tests__/)

CI (.github/workflows/ci.yml) runs these four on Node 22 and 24, on pushes to main and on pull requests against it — nowhere else, so a branch has no CI run until it is in a PR.

Integration test — a manual smoke test, not part of CI; needs claude installed and authenticated:

npx tsx scripts/test-integration.ts

Weekly engine sweep — the measurement half of the weekly check, deterministic, no LLM. Reports installed / pinned / upstream versions, the flag surface of each core engine against what its wrapper passes, its slash-command listing, one live turn per engine, the ACP + MCP handshakes, and src/models.ts against the OpenAI, Anthropic and xAI published price tables. The flag surface is --help plus, for Claude and Cursor, the options their shipped JavaScript declares, hidden ones included, and each hidden option is reviewed like a listed flag. On a live run it also checks that a session-level option does not write the user's engine config: one Cursor turn with --model, on a scratch copy of CURSOR_CONFIG_DIR, compared afterwards. Exit 1 on a regression. A flag, subcommand or slash command with no decision is one; so is a hidden-option scan or command listing that could not run, a config write, and an unreachable price source — an unverified pass is how a stale number keeps its cover. The pinned versions it compares against are read from the Tested Version column of the Engine CLI Reference table below, so keep that table's shape. Run it before touching any wrapper; its not in --help list (flags the wrapper passes that are neither in --help nor in the option list the CLI declares) is a prompt for judgement, not a verdict.

Each engine's own slash commands (codex: its app-server's RPC methods) are listed without a model turn and reviewed in scripts/sweep-reviewed.json, one command name per key (a key ending in * covers a prefix): slashCommands for what the listing shows (a decision it no longer matches is reported stale), unlistedSlashCommands for TUI-only commands and others the headless listing cannot show. A command the engine's source names as a quoted literal ('/compact', 'thread/start') needs no decision. The user's and the project's skills and commands are left out of every listing — by the source the engine reports, by where their files are, or by listing on a config of the sweep's own — so the review does not depend on what is installed on the machine.

npx tsx scripts/sweep.ts             # human table
npx tsx scripts/sweep.ts --no-live   # no turns: versions, flags, hidden options, slash commands; costs nothing
npx tsx scripts/sweep.ts --only cursor,claude   # those engines only, a partial check
npx tsx scripts/sweep.ts --json --out report.json

The installed opencode is OpenCode 2 (@opencode/cli). The 1.x line (opencode-ai) is still supported and checked through OPENCODE1_BIN: install it into a scratch prefix (npm i --prefix <dir> opencode-ai@latest) and point the variable at <dir>/node_modules/.bin/opencode; without it that row is skipped.

Conventions

  • ESM only — "type": "module" in package.json, .js extensions in imports
  • Strict TypeScript — no any (eslint warns), full type annotations
  • Lazy initialization — SessionManager created on first tool call, not at plugin load
  • Engine-agnostic — all session engines implement ISession interface (types.ts)
  • Adding a new tool — register in src/index.ts, add it to openclaw.plugin.json contracts.tools and give it MCP hints in src/mcp-annotations.ts (tool-registration.test.ts fails when any of the three differ), document it in skills/references/tools.md and the annotation table in mcp.md, and update the tool count where it is quoted: openclaw-tool-result-contract.test.ts, embedded-server-tools.test.ts, README.md, skills/SKILL.md, skills/references/tools.md, mcp.md, getting-started.md, and this file
  • Adding a session field — add it to src/session-params.ts (and SessionConfig in src/types.ts); it is then an MCP session_start parameter, a clawo session-start flag and a clawo config key at once (cli-session-flags.test.ts holds the three together). Document it in skills/references/tools.md
  • Legacy engines — gemini and cursor stay in ENGINE_TYPES for existing callers; they are not offered in new surfaces (the ACP model selector hides them) and not documented as options

Testing

  • Unit tests live in src/__tests__/*.test.ts (vitest, no external dependencies)
  • vitest.config.ts runs at most four forked workers with a 1 GB heap each, so a runaway test fails as a heap-limit crash instead of exhausting the machine's memory. Keep those caps
  • scripts/test-integration.ts is a manual smoke test requiring live CLIs — not part of CI
  • scripts/test-ultraapp-integration.ts --trace=<name|all> replays UltraApp's reference interview traces (spec-extraction quality); manual, not part of CI
  • Tests are excluded from TypeScript compilation (tsconfig.json exclude) so they don't ship in dist/. npm run typecheck:tests type-checks them (tsconfig.test.json); it is a diagnostic, not a gate, and still reports pre-existing errors in test doubles — read the errors a change adds

Documentation

All documentation lives in skills/references/. This is the single source of truth; docs/ is gitignored local scratch and never ships.

When you change functionality, update the corresponding reference file:

What changedUpdate
Tool parameters or behaviorskills/references/tools.md
Engine invocation / flagsskills/references/multi-engine.md
Session lifecycleskills/references/sessions.md
ACP agent behaviourskills/references/acp.md
A2A agent and a2a engineskills/references/a2a.md
Council protocolskills/references/council.md
Inbox messagingskills/references/inbox.md
Ultraplan/Ultrareviewskills/references/ultra.md
Autoloopskills/references/autoloop.md
UltraAppskills/references/ultraapp.md
Run ledger / cost / spend capsskills/references/observability.md
Workflow kernel, nodes, resumeskills/references/workflow.md
Acceptance contracts, evidenceskills/references/verification.md
CLI commandsskills/references/cli.md
Dashboardskills/references/dashboard.md
MCP serverskills/references/mcp.md
OpenAI-compatible endpointskills/references/openai-compat.md
Setup / prerequisitesskills/references/getting-started.md
Community engine presetsconfigs/engines/README.md
Engine version alignmentskills/references/claude-cli-tracking.md
New feature or toolAlso update skills/SKILL.md description for trigger keywords

Also update:

  • README.md — if the change affects the Highlights list, the All features table, the News list, the Quick Start commands, or the engine compatibility table
  • CHANGELOG.md — always, for any user-facing change

PR Guidelines

  • Prefix: feat:, fix:, docs:, chore:, test:
  • Run npm run build && npm run lint && npm run format:check && npm run test before submitting
  • Update CHANGELOG.md for user-facing changes
  • Installing through openclaw plugins install requires --dangerously-force-unsafe-install (child_process usage); install.sh registers the package through plugins.load.paths instead

Release Process

Follow this checklist for every release. Do not skip steps.

1. Pre-flight

npm run build && npm run lint && npm run format:check && npm run test   # Must all pass

# Tarball + leak sweep (added after the 3.5.0-3.5.4 incident, see git history)
npm pack --dry-run                                                       # Inspect file list
grep -rEn '<personal-or-internal-string>' src configs skills bin scripts README.md CHANGELOG.md package.json  # Tree
git log --all -p -S '<personal-or-internal-string>'                      # History

The build script must clean dist/ first (it does: rm -rf dist && tsc && ...). Without that, source-tree refactors leave stale paths in the tarball and ship content the new source already removed.

Hard rule on leak-fix releases: if the patch is sanitising something previously hard-coded, the commit message / CHANGELOG entry / release title / release body must NOT name what was leaked, list affected versions, or include words like "security" / "🔒" / "hard-coded" / "sanitize". Frame as a bland refactor. The CHANGELOG entry ships in the tarball — same treatment.

2. Version bump

Update version in package.json. Follow semver:

  • patch (x.y.Z) — bug fixes, no new features
  • minor (x.Y.0) — new features, backward compatible
  • major (X.0.0) — breaking changes

3. CHANGELOG.md

Add a new section at the top:

## [X.Y.Z] - YYYY-MM-DD

### Added / Fixed / Changed / Removed

- Description of each change

4. README.md sync

Check and update if needed:

  • Engine compatibility table — npx tsx scripts/sweep.ts --no-live reports installed vs pinned versions of every core engine; keep it, and the Engine CLI Reference table below, in step. Its ACP row quotes the bundled presets' provenance.verifiedAgainst
  • News, Highlights and All features (if new features added)

5. Commit, tag, push

git add -A
git commit -m "feat/fix: description (vX.Y.Z)"
git tag vX.Y.Z
git push origin main && git push origin vX.Y.Z

6. Create GitHub Release

gh release create vX.Y.Z --title "vX.Y.Z — Title" --notes "release notes"

This triggers the Publish to npm workflow automatically, and Publish to ClawHub once it is set up (see ClawHub below).

Publishing uses npm trusted publishing (OIDC) — there is no NPM_TOKEN to rotate. publish.yml installs npm 11.x (trusted publishing needs >= 11.5.1; the pin stays on the 11.x line on purpose) and runs npm publish --provenance --access public with no auth token; credentials come from GitHub OIDC (id-token: write) against the Trusted Publisher configured on npmjs.com (Package → Settings: repo Enderfga/claw-orchestrator, workflow publish.yml, no environment). If a publish ever 404s on the PUT, check the Trusted Publisher config on npmjs.com — it is not a token problem. (Migrated from a 90-day-expiring NPM_TOKEN secret in v4.5.0.)

7. Verify

gh run list --limit 3                          # CI + Publish (+ ClawHub) should all pass
npm view @enderfga/claw-orchestrator version   # should equal X.Y.Z

ClawHub

The same GitHub release also triggers clawhub-publish.yml. It builds and packs the package, then publishes it to ClawHub through ClawHub's reusable package-publish.yml workflow, pinned by commit SHA, and waits for ClawHub's security checks. It runs only when the repository secret CLAWHUB_TOKEN exists; without it, release runs skip. One-time setup:

  1. Sign in at clawhub.ai with the GitHub account that owns the @enderfga scope, and create a token under Settings → API tokens. The package scope must match the publishing account.
  2. Add it as the repository secret CLAWHUB_TOKEN.

The next release is then the first ClawHub publish, which also creates the package there. A manual run (Actions → Publish to ClawHub → Run workflow) is a dry run by default; a real manual publish, for example to retry a release, must be started on that release's tag (vX.Y.Z matching package.json). ClawHub keeps each release hidden until its security checks pass; if they hold it, the run fails after the wait (30 minutes by default) and the release can be retried or recovered with clawhub package recover. openclaw.compat.pluginApi and openclaw.build.openclawVersion in package.json are required by ClawHub; clawhub-metadata.test.ts keeps them equal to the openclaw peer range and the lockfile version.

Engine CLI Reference

Current tested versions (update on each release):

EngineCLITested VersionInvocation
Claudeclaude2.1.332Persistent subprocess: claude -p --input-format stream-json --output-format stream-json --replay-user-messages --verbose --include-partial-messages --permission-mode M [--resume <id>] [--model M] [--effort E] [--advisor M] [--settings S] (read-only sessions run --permission-mode plan; fastMode and outputStyle go in through --settings; CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING=1 unless the environment sets it, so a rewind can restore files)
Codexcodex0.172.0codex exec --sandbox <mode> --skip-git-repo-check --json -C <dir> [--model M] [--output-schema F] [--profile P] [--ephemeral] [--ignore-user-config] [--ignore-rules] [-c key=value]... [--add-dir D] --output-last-message <tmp> [--image=<path>]... - (prompt on stdin; later turns codex exec resume <thread>, a fork codex exec fork <thread>, with the sandbox restated as -c sandbox_mode=…). The codex-app engine runs codex app-server --listen stdio:// --enable goals for /goal; a codex session's commands, quota, side questions, compaction and rewinds run on a short-lived codex app-server --listen stdio://
Antigravityagy1.5.20agy -p <msg> --output-format stream-json --log-file <tmp> [--mode plan|accept-edits|auto | --dangerously-skip-permissions | --sandbox] [--model M] [--effort E] [--conversation <id>] [--settings S] [--json-schema J] [--add-dir D]... [--agent A] [--disable-slash-commands] --print-timeout <n>s (--mode plan for read-only sessions; --sandbox runs with "agentMode": "" merged into --settings). A command or skill is -p '/name args' and a plan send -p '/plan <msg>', neither with --disable-slash-commands; orchestrator models get no --effort; quota is agy -p /usage and agy -p /credits
Grokgrok1.0.92grok -p --output-format streaming-json --cwd <dir> [--resume <id>] [--model M] [--permission-mode M] [--effort E] [--tools T] [--allow R]... [--deny R]... [--disallowed-tools T] [--json-schema] [--rules=…] [--no-wait-for-background], prompt on stdin (a turn with images: --prompt-file <tmp>.json). Read-only runs in --sandbox read-only, workspace-write in --sandbox workspace, OS-enforced; refused under the temp dir for read-only, off macOS/Linux, or if grok cannot apply it. A plan send runs --permission-mode plan; a native goal's process waits for grok's later rounds (no --no-wait-for-background); a side question runs on --resume <id> --fork-session --max-turns 1 with every tool removed
Cursorcursor-agent2026.11.22cursor-agent -p <msg> [--mode plan|ask | --sandbox enabled | --force] [--auto-review] --trust --output-format stream-json --stream-partial-output [--add-dir D]... [--plugin-dir D]... [--image <path>]... [--resume <chatId>] --model <id> [--workspace <dir>], with CURSOR_CONFIG_DIR set to a per-session mirror of the user's config directory. --model is always passed (auto by default, the effort written into the id). Read-only: --mode ask, or --mode plan for a plan turn, plus a deny-all-writes .cursor/cli.json in the process cwd; workspace-write: Cursor's OS sandbox, never with --force. Commands are listed by cursor-agent acp
OpenCodeopencode1.19.6opencode run --format json [--command=<name>] --thinking [--session <id> [--fork]] [--title=…] [--model provider/model] [--variant E] [--agent A] [--auto] [--pure] [--file=<image>]..., prompt on stdin (read-only sessions add --agent clawo-readonly + OPENCODE_CONFIG_CONTENT; a plan send runs --agent plan)
OpenCode 2opencode 2.x2.4.2opencode run --format json --server <url> --thinking [--session <id> [--fork]] [--title=…] [--archived] [--model provider/model[#variant]] [--agent A] [--auto] [-f <image>]..., prompt on stdin: a client of the session's own opencode serve --stdio --port 0, stopped after 30 s unused, whose HTTP API takes steers, interrupts, commands, compaction, side questions, reverts and /goal. --standalone replaces --server when that server cannot start, or with CLAWO_OPENCODE_STANDALONE=1. Effort joins the model as #variant; a variant the model lacks is retried without it. Read-only sessions add --agent clawo-readonly with the agent in the V2 format in OPENCODE_CONFIG_CONTENT; a plan send runs --agent plan

ACP agents and custom engines are not pinned here: a community preset carries its own tested version in provenance.verifiedAgainst (configs/engines/*.json).

Important: When CLI vendors change flags or output format, update the corresponding persistent-*-session.ts and re-run integration tests.

See skills/references/claude-cli-tracking.md for full sync history.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.