Skip to content

docs(skills): worker/sandbox skill bodies for agent registry#1627

Open
andersonleal wants to merge 2 commits into
mainfrom
feature/worker-sandbox-skills-content
Open

docs(skills): worker/sandbox skill bodies for agent registry#1627
andersonleal wants to merge 2 commits into
mainfrom
feature/worker-sandbox-skills-content

Conversation

@andersonleal
Copy link
Copy Markdown
Contributor

@andersonleal andersonleal commented May 12, 2026

Summary

  • Adds 14 markdown skill bodies under crates/iii-worker/src/cli/worker_manager_daemon/skills/ (9 worker ops) and crates/iii-worker/src/sandbox_daemon/skills/ (5 sandbox ops). These are the prose the skills worker will register at boot via include_str! from the companion code branch feature/worker-manager-trigger.
  • Every leaf carries a uniform agent-facing shape: H1 + 1–2 sentence summary + - id / timeout / idempotent / request / response metadata + complete request/response example + per-code error list.
  • Total surface: 14 files / ~16 KiB. Every leaf is 843–1713 bytes (well inside the 50–4096 byte validate_leaf window). Worker bodies cross-reference against crates/iii-worker/src/core/{types.rs,error.rs} and cli/worker_manager_daemon.rs. Sandbox bodies cross-reference against crates/iii-worker/src/sandbox_daemon/{create,exec,stop,list,errors}.rs.

Context

This branch is content-only and does not build standalone. The include_str! call sites live on feature/worker-manager-trigger. Both branches land together; reviewing prose in isolation here keeps the diff readable.

Examples use image-resize (real worker at https://workers.iii.dev/workers/image-resize) so agents reading the docs can copy-paste a working call rather than chase a placeholder.

Test plan

  • Confirm every documented W-code maps to a WorkerOpErrorKind variant on main (grep -hoE 'W[0-9]{3}' .../skills/*.mderror.rs).
  • Confirm every documented S-code maps to a SandboxErrorCode variant on main.
  • Confirm every - id: matches a register_function/register_function_with call in worker_manager_daemon.rs / sandbox_daemon/mod.rs.
  • Confirm every request/response shape matches core/types.rs (worker) and sandbox_daemon/{create,exec,stop,list}.rs (sandbox) — including sandbox_id vs id, env: Vec<String> not map, exit_code not rc, etc.
  • Confirm every leaf is 50–4096 bytes (wc -c .../skills/*.md).
  • On the companion code branch, run the skills-registration boot path and verify each of the 13 leaf URIs resolves to the expected body.

Summary by CodeRabbit

  • Documentation
    • Expanded worker guides covering add/remove/list/update/start/stop/clear and schema discovery, with examples and error codes.
    • Expanded sandbox guides covering create/exec/stop/list, execution semantics, and error behaviors.
    • Updated API specifications with request/response schemas, examples, standardized error envelopes, and operation metadata.

Review Change Stack

Content-only review branch. Pairs with feature/worker-manager-trigger,
which carries the code that registers these bodies with the `skills`
worker on boot (via include_str! from the same paths).

This branch is for prose review in isolation; it does not build
standalone — the include_str! call sites live on the code branch.

Content map:
  crates/iii-worker/src/cli/worker_manager_daemon/skills/
    router.md         iii://worker — router for the 8 worker::* ops
    add.md            iii://worker/add
    remove.md         iii://worker/remove
    update.md         iii://worker/update
    start.md          iii://worker/start
    stop.md           iii://worker/stop
    list.md           iii://worker/list
    clear.md          iii://worker/clear
    schema.md         iii://worker/schema
  crates/iii-worker/src/sandbox_daemon/skills/
    router.md         iii://sandbox — router for the 4 sandbox::* ops
    create.md         iii://sandbox/create
    exec.md           iii://sandbox/exec
    stop.md           iii://sandbox/stop
    list.md           iii://sandbox/list

Each leaf carries a uniform agent-facing shape:
  H1 with one-line action
  1-2 sentence summary (non-obvious contract surfaced)
  - id / timeout / idempotent / request / response (bulleted metadata)
  ## Example (complete request + response payloads)
  ## Errors (every code with cause + fix hint)

Total ~16 KiB across 14 files (worker 9.7 KiB, sandbox 6.3 KiB).
Sandbox bodies cross-reference against the actual on-disk daemon
(crates/iii-worker/src/sandbox_daemon/{create,exec,stop,list,errors}.rs)
— field names, codes, and envelope shapes are pinned to the real
sdk_contract. Each leaf validates against the planned
crate::skills::validate_leaf (50–4096 bytes, H1 required,
[a-z0-9_-] segments).
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
iii-website Ready Ready Preview, Comment May 13, 2026 1:07pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 08316549-a642-467f-b3bc-57bdafc8131c

📥 Commits

Reviewing files that changed from the base of the PR and between bb5de0e and 1c32561.

📒 Files selected for processing (4)
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/stop.md
✅ Files skipped from review due to trivial changes (4)
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/stop.md

📝 Walkthrough

Walkthrough

Adds documentation-only API specs for two daemons: worker-manager (worker/* ops) and sandbox (sandbox/* ops), including request/response schemas, error envelopes, examples, and a schema introspection endpoint.

Changes

Worker Manager Daemon Skills

Layer / File(s) Summary
Router and schema foundation
crates/iii-worker/src/cli/worker_manager_daemon/skills/router.md, crates/iii-worker/src/cli/worker_manager_daemon/skills/schema.md
Worker operations namespace documents available commands, the WorkerOpError envelope, enumerated W-codes, and the worker::schema introspection endpoint returning per-op JSON schemas and metadata.
Lifecycle operations: add, remove, update
crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md, crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md, crates/iii-worker/src/cli/worker_manager_daemon/skills/update.md
Documentation for installing from registry/OCI (add), uninstalling workers with validation (remove), and re-resolving/updating registry-backed workers with lockfile updates (update).
Control operations: start and stop
crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md, crates/iii-worker/src/cli/worker_manager_daemon/skills/stop.md
Start via engine WebSocket and graceful shutdown requiring explicit yes:true; nullable pid/port semantics, grace-window behavior, examples, and error codes.
Utility operations: list and clear
crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md, crates/iii-worker/src/cli/worker_manager_daemon/skills/clear.md
Listing installed/running workers with running_only filter and pid/version rules; clearing cached artifacts under ~/.iii/managed/ without touching config/lock.

Sandbox Daemon Skills

Layer / File(s) Summary
Router foundation
crates/iii-worker/src/sandbox_daemon/skills/router.md
Sandbox operations namespace, supported ops (create, exec, stop, list), fail-closed image catalog behavior, and standardized S-series error envelope.
Lifecycle operations: create and stop
crates/iii-worker/src/sandbox_daemon/skills/create.md, crates/iii-worker/src/sandbox_daemon/skills/stop.md
Creating sandbox VMs from catalog images (env, id format) and graceful shutdown with optional wait and idempotency semantics.
Execution operations: exec and list
crates/iii-worker/src/sandbox_daemon/skills/exec.md, crates/iii-worker/src/sandbox_daemon/skills/list.md
Executing commands inside sandboxes with per-sandbox serialization, base64 stdin, optional timeout, and listing sandboxes with age/exec/stopped metadata and S003 collision semantics.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • sergiofilhowz
  • ytallo
  • guibeira

Poem

🐰 I hopped through docs with a joyful cheer,
Worker and Sandbox specs now crystal clear,
Requests and responses in tidy array,
Error codes listed for night and day,
Small changes, big clarity — hop hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding skill body documentation files for worker and sandbox operations to the agent registry.
Description check ✅ Passed The description provides comprehensive context: clear summary of all 14 files added, their purpose, structure, test plan, and explanation of why this is content-only. However, the licensing checkbox is not marked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/worker-sandbox-skills-content

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ytallo
ytallo previously approved these changes May 12, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (7)
crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md (1)

34-34: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 34.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md` at line 34,
Add a trailing newline to the end of the Markdown file
"crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md" so the file
ends with a final newline character; simply open start.md and ensure there is an
empty newline after the current last line (line 34) and save the file.
crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md (1)

38-38: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 38.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md` at line 38,
The file crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md is
missing a final newline; open that file and add a single newline character at
the end of the file (ensure the last line ends with a newline), save and commit
so the file ends with a trailing newline.
crates/iii-worker/src/cli/worker_manager_daemon/skills/update.md (1)

34-34: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 34.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/update.md` at line 34,
The file update.md is missing a trailing newline at the end; open update.md and
add a final newline character after line 34 (ensure the file ends with a
newline) so the file conforms to POSIX text file conventions and prevents
tooling diffs.
crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md (1)

35-35: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 35.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md` at line 35,
The file add.md is missing a final newline at EOF; open add.md (the
skills/add.md document) and add a single trailing newline character at the end
of the file so the file ends with a blank line (ensure the last line 35 ends
with a newline).
crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md (1)

26-26: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 26.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md` at line 26,
The file remove.md is missing a trailing newline at EOF; open the file
(crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md) and add a
single final newline character after the last line (line 26) so the file ends
with a newline.
crates/iii-worker/src/cli/worker_manager_daemon/skills/schema.md (1)

31-31: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 31.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/schema.md` at line 31,
Add a final newline at the end of the skills schema markdown document so the
file ends with a trailing newline; open the skills schema file (schema.md) and
ensure the last line (the current end-of-file) is followed by a single newline
character, then save the file.
crates/iii-worker/src/cli/worker_manager_daemon/skills/clear.md (1)

29-29: ⚡ Quick win

Add a final newline.

The file is missing a final newline after line 29.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/clear.md` at line 29,
Add a missing final newline to the end of the markdown file clear.md by ensuring
the file ends with a single newline character (i.e., append a trailing newline
after the current last line). This is a trivial edit—open clear.md and add a
final newline so the file terminates with a newline character.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md`:
- Line 35: The file add.md is missing a final newline at EOF; open add.md (the
skills/add.md document) and add a single trailing newline character at the end
of the file so the file ends with a blank line (ensure the last line 35 ends
with a newline).

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/clear.md`:
- Line 29: Add a missing final newline to the end of the markdown file clear.md
by ensuring the file ends with a single newline character (i.e., append a
trailing newline after the current last line). This is a trivial edit—open
clear.md and add a final newline so the file terminates with a newline
character.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md`:
- Line 38: The file
crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md is missing a
final newline; open that file and add a single newline character at the end of
the file (ensure the last line ends with a newline), save and commit so the file
ends with a trailing newline.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md`:
- Line 26: The file remove.md is missing a trailing newline at EOF; open the
file (crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md) and add
a single final newline character after the last line (line 26) so the file ends
with a newline.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/schema.md`:
- Line 31: Add a final newline at the end of the skills schema markdown document
so the file ends with a trailing newline; open the skills schema file
(schema.md) and ensure the last line (the current end-of-file) is followed by a
single newline character, then save the file.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md`:
- Line 34: Add a trailing newline to the end of the Markdown file
"crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md" so the file
ends with a final newline character; simply open start.md and ensure there is an
empty newline after the current last line (line 34) and save the file.

In `@crates/iii-worker/src/cli/worker_manager_daemon/skills/update.md`:
- Line 34: The file update.md is missing a trailing newline at the end; open
update.md and add a final newline character after line 34 (ensure the file ends
with a newline) so the file conforms to POSIX text file conventions and prevents
tooling diffs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5c6193bd-26ce-4718-a4df-9ed704610056

📥 Commits

Reviewing files that changed from the base of the PR and between 3512ada and bb5de0e.

📒 Files selected for processing (14)
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/add.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/clear.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/list.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/remove.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/router.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/schema.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/start.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/stop.md
  • crates/iii-worker/src/cli/worker_manager_daemon/skills/update.md
  • crates/iii-worker/src/sandbox_daemon/skills/create.md
  • crates/iii-worker/src/sandbox_daemon/skills/exec.md
  • crates/iii-worker/src/sandbox_daemon/skills/list.md
  • crates/iii-worker/src/sandbox_daemon/skills/router.md
  • crates/iii-worker/src/sandbox_daemon/skills/stop.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants