Skip to main content

ROBOT.md — a single self-describing file so Claude can safely operate your robot.

Project description

robot-md

ROBOT.md is to a robot what CLAUDE.md is to a codebase. One file — YAML frontmatter + markdown prose — so Claude Code, Claude Desktop, Cursor, Zed, Gemini CLI, or any MCP-aware agent can safely operate your robot.

PyPI License Spec RCAN

Where this fits in the stack

This repo is the declaration layer — the file format + Python CLI. Everything else is independent; adopt one, or all seven.

Layer Piece What it is
Declarationthis ROBOT.md The file a robot ships at its root. YAML frontmatter + markdown prose. Declares identity, capabilities, safety gates. Spec + robot-md Python CLI (init, validate, render, calibrate, register, autodetect).
Agent bridge robot-md-mcp MCP server that exposes a ROBOT.md to Claude Code, Claude Desktop, Cursor, Zed, Gemini CLI — any MCP-aware agent. One claude mcp add away.
Wire protocol RCAN How robots, gateways, and planners talk. Signed envelopes, LoA enforcement, PQC crypto. Think HTTP for robots.
Python SDK rcan-py pip install rcanRCANMessage, RobotURI, ConfidenceGate, HiTLGate, AuditChain.
TypeScript SDK rcan-ts npm install rcan-ts — same API surface for Node + browser.
Registry Robot Registry Foundation Permanent RRN identities. Public resolver at /r/<rrn>. Like ICANN for robots.
Reference runtime OpenCastor Open-source robot runtime — connects LLM brains to hardware bodies. One implementation of RCAN.

The 60-second pitch

Every robot today is described in 5+ files: a YAML config, a P66 manifest, a CLAUDE.md, a firmware manifest, a README. They drift. When you add a joint, three files need updates.

ROBOT.md is the single source of truth. Drop one file at your robot's project root:

---
rcan_version: "3.0"
metadata:
  robot_name: bob
physics:
  type: arm+camera
  dof: 6
drivers:
  - { id: arm, protocol: feetech, port: /dev/ttyUSB0 }
capabilities:
  - arm.pick
  - arm.place
  - vision.describe
safety:
  payload_kg: 0.5
  estop: { software: true, response_ms: 100 }
  hitl_gates:
    - { scope: destructive, require_auth: true }
---

# bob

## Identity
Bob is a 6-DOF SO-ARM101 arm with an OAK-D camera.

## What bob Can Do
Pick, place, describe what the camera sees. Max payload 0.5 kg.

## Safety Gates
Software E-stop at 100 ms. Destructive actions require human approval.

Now Claude — in Code, Desktop, or Mobile — knows your robot.

Why it works

  • Machine-readable: frontmatter validates against a JSON Schema. Runtime tools consume it directly.
  • LLM-readable: the prose body tells Claude why — which actions are dangerous, which need HITL, how the robot's capabilities map to real-world tasks.
  • One file: no more drift between config, manifest, and README.

Install

pip install robot-md

Requires Python 3.10+.

Adopt it for your robot (60 seconds)

Two on-ramps, same destination — Claude Code as the planner and the executor, no OpenCastor, no gateway.


▶ Option A — On your machine (terminal) (recommended)

For: operators at a shell prompt on the robot (or a dev laptop with the robot plugged in).

One command does everything — install, scan, draft, register, print the MCP add line:

pip install robot-md && robot-md init my-bob --preset so-arm101 --register \
    --manufacturer acme --contact-email you@acme.com

What it does:

  1. Installs the robot-md CLI.
  2. Scans PCI/USB//dev/tty*, matches an SO-ARM101, pre-fills ~85% of the manifest (DH kinematics, servo IDs, safety defaults, capabilities).
  3. Mints a public RRN on rcan.dev and writes it back into the manifest.
  4. Prints the MCP add line for Claude Code:
claude mcp add robot-md -- npx -y robot-md-mcp "$(pwd)/ROBOT.md"
  1. Open Claude Code — it now knows your robot.
claude

For custom hardware, swap the preset: robot-md init my-bob --wizard. For pure scan-to-draft without a preset, robot-md autodetect --write ROBOT.md is the low-level primitive.

Physical calibration (for robots with arms): robot-md calibrate --zero ROBOT.md — pose the arm at its declared zero, press Enter; the CLI records encoder readings so the manifest's IK solver knows where "zero" is. Preserves YAML comments on rewrite.


▶ Option B — Inside Claude Code (ask Claude to do it)

For: operators who already have Claude Code open and would rather type a sentence than run commands.

In any Claude Code session inside the robot's project directory, paste this prompt:

Set up a ROBOT.md for this robot. Use the so-arm101 preset.
Register it publicly at rcan.dev under manufacturer "acme" with my
contact email me@acme.com. Then add the robot-md MCP server to this
session.

Claude will use its Bash tool to run the same one-liner from Option A, show you the result, and wire up the MCP server for you. See the full walkthrough (including what to paste for custom robots, how to calibrate interactively, and what Claude is allowed to do) in docs/getting-started-claude-code.md.


▶ Option C — SessionStart hook (pre-MCP path)

If you can't use MCP (older Claude Code, or you want the ROBOT.md context pinned into every session unconditionally):

mkdir -p ~/.claude/hooks
curl -fsSL https://robotmd.dev/hook > ~/.claude/hooks/robot-md.sh
chmod +x ~/.claude/hooks/robot-md.sh
# Add one entry to ~/.claude/settings.json — see integrations/claude-code/settings.template.json.

All three paths end the same way: Claude Code is the planner and the executor. No gateway, no runtime to stand up.

robot-md autodetect scans PCI + USB + /dev/tty* and emits a draft that validates against the v1 schema but deliberately marks identity fields (robot_name, physics.type, dof) as TODO — the operator is the authority on what the robot is.

Want a public identity? robot-md register ROBOT.md (shipping in v0.2) posts to the Robot Registry Foundation, writes the assigned RRN-XXXXXXXXXXXX into your manifest, and anchors your robot's signing key.

Want fleet-grade orchestration, P66 hardware interlocks, reactive VLA control, or EU AI Act audit? Add OpenCastor when the time comes. Until then, ROBOT.md + Claude Code is all you need.

Inspect a ROBOT.md (CLI)

robot-md autodetect                      # print a draft ROBOT.md to stdout
robot-md autodetect --write ROBOT.md     # write it (refuses to overwrite)

robot-md validate examples/bob.ROBOT.md
# → ✓ bob (arm+camera, 6 DoF, 5 capabilities)

robot-md render examples/bob.ROBOT.md | head -5
# strips prose, emits pure YAML for runtime tooling

robot-md context examples/bob.ROBOT.md | head -10
# emits the Claude-ready '# Robot context' block

Agent affordances

Beyond the initial setup, the rest of the package is designed so that Claude Code and other agent harnesses can recognize when to invoke it, without the operator naming specific tools. Three surfaces work together:

  • CLAUDE.md in the project root — generate with robot-md claude-md ROBOT.md. Teaches Claude which operator intents should dispatch which verb (safety → check HITL gates, "broken" → doctor, motion → HITL first). Read at session start.
  • MCP server descriptionsrobot-md-mcp v0.2+ advertises a server-level instructions field plus intent-matchable descriptions on every resource and tool. Any MCP client routes to the right resource by description alone.
  • Skill definition at integrations/claude-code-skill/SKILL.md — for operators running the superpowers plugin (or any skill-aware harness), a drop-in skill with the intent → action table and a safety protocol Claude follows automatically.

Claude integration

Surface Status Mechanism
Claude Code ✅ v0.1 claude mcp add robot-md -- npx -y robot-md-mcp ./ROBOT.md via robot-md-mcp (recommended) · alt: SessionStart hook → robot-md context
Claude Desktop ✅ v0.1 (read-only) robot-md-mcp — resources + validate/render; dispatch tools arrive with v0.2 signing
Claude Mobile (iOS) 🚧 v0.2 URL fetch: https://robotmd.dev/r/<rrn>
OpenAI (Codex CLI, ChatGPT Desktop) ✅ v0.1 Same MCP server — register npx -y robot-md-mcp /path/to/ROBOT.md in the tool's MCP config
Google Gemini CLI ✅ v0.1 Same MCP server — add to ~/.gemini/settings.json under mcpServers
Cursor / Zed / Cline / Continue.dev / any MCP-aware harness ✅ v0.1 Same MCP server — register the npx command in the tool's MCP settings

ROBOT.md is planner-agnostic by design. MCP is an open standard. The file you write is the file every provider reads. No per-vendor rewrites, no parallel manifests.

See integrations/claude-code/ for hook-path install instructions. The MCP path needs no files — just the claude mcp add one-liner (or your harness's equivalent) above.

The broader ecosystem

  ROBOT.md (this repo)     →  what the robot IS
  OpenCastor               →  what the robot RUNS   (github.com/craigm26/OpenCastor)
  RCAN                     →  what the robot SPEAKS (rcan.dev)
  Robot Registry Foundation → where the robot LIVES (robotregistryfoundation.org)

Each layer is independent. Use ROBOT.md without OpenCastor (just for Claude context). Use OpenCastor without ROBOT.md (the old YAML-only path). Compose them for the full flow.

Spec + docs

  • Format spec v1 — the authoritative definition of what goes in a ROBOT.md.
  • Rationale — design decisions + why.
  • JSON Schema — draft 2020-12.
  • Examples — 4 worked ROBOT.md files (Bob, so-arm101, TurtleBot 4, minimal).
  • v0.2 design (draft) — signing, registry ingestion, tamper-evidence. Design only; no code yet. Feedback welcome.

Scope

In scope

  • The ROBOT.md file format (spec + schema + examples)
  • A reference Python CLI (validate / render / context)
  • Claude Code integration hook

Out of scope

  • Robot runtime code — that's OpenCastor.
  • Registry implementation — that's RRF.
  • Wire protocol — that's RCAN.
  • Skill implementation framework — OpenCastor's SkillRegistry.

This repo is spec + tooling only. A hard line.

Contributing

  • Open an issue to propose a spec change; breaking changes require a design doc.
  • Small, focused PRs welcome.
  • See CONTRIBUTING.md for the full guide (tests, lint, commit style).

License

Apache 2.0 — see LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robot_md-0.2.4.tar.gz (80.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robot_md-0.2.4-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

File details

Details for the file robot_md-0.2.4.tar.gz.

File metadata

  • Download URL: robot_md-0.2.4.tar.gz
  • Upload date:
  • Size: 80.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for robot_md-0.2.4.tar.gz
Algorithm Hash digest
SHA256 434d2e26dafad426c427ec2520846de1a71e1ca49564dc14a156959ac72695f1
MD5 ca7ff2b1f6fc890b7186dd811e4bfe67
BLAKE2b-256 376597b619b608602f79e0b9581cc01ecea3a1c7ad39b2a0258075ee91daf126

See more details on using hashes here.

File details

Details for the file robot_md-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: robot_md-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 77.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for robot_md-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 803ea2272c2081ef0e3e9695d034bd972cd97c1661cb13a48e9b654756a2cb2b
MD5 ec40ef78a3dbe9faef0e72939627b0af
BLAKE2b-256 b09992e09bcb7d0fa553c34c22809340df32c8a2152504667cb483a259512492

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page