<workspace>/.claude/agents/<slug>.md. The filename without .md is the agent’s slug. The file has two parts: YAML frontmatter at the top, and a markdown body underneath that becomes the agent’s system prompt.
This page is the reference. For the concept, see Agents.
Field categories
Frontmatter fields fall into two categories:- Universal fields belong to the Claude agent format, and Claude Code reads them when it runs the agent. Rundock reads some of them too, and each row below says which.
- Rundock-only fields are read by Rundock and silently ignored by other tools. They control how the agent looks in the org chart and how it relates to other agents.
Frontmatter fields
The capabilities object
The capabilities block is shown on the agent’s profile page. The parser accepts any string-valued keys, but the conventional structure is:The skills array
Both YAML forms parse. The flow form is tried first:.claude/skills/<slug>/. Slugs are case-insensitive on the match, but write them lowercase to match directory names. The list only takes effect on an agent that is on the team: see the status table under Common pitfalls.
The routines array
Each entry is a YAML object withname, schedule, prompt, enabled, and an optional description. A routine needs enabled: true to run: without it, the routine is listed and waits to be turned on.
schedule field accepts only specific human-readable forms. Cron is not supported. Routines fire only while Rundock is running. A routine made in the form also carries skill, runOn, paused and plan-approval keys: see Routine format for every field, and ROUTINES.md on GitHub for the full source.
The prompts array
Starter prompts shown in the conversation panel on first open. Each entry is a complete sentence written as the user would phrase it.The body
Everything after the closing--- of the frontmatter is the agent’s system prompt. Claude Code loads this verbatim when it spawns the agent.
Write the body in the second person, addressing the agent as “you”. This is what Claude Code’s spawn loader expects.
What goes in the body:
- The agent’s identity (name, role, who they work for).
- Scope: what the agent handles and what it does not.
- Delegation rules: which specialists it routes to and for what.
- Voice or tone guidance specific to the agent.
- File path conventions, output formats, and skill usage instructions.
- The “when out of scope, route back” instruction.
- The team roster. Rundock injects
YOUR TEAMMATESat spawn time. - Delegation marker syntax. Rundock injects the delegation mechanics.
- The scope boundary on what the agent can and cannot touch. Rundock and Claude Code inject this jointly.
- Platform routing instructions for Doc. Rundock injects them.
Workspace modes
Workspace mode is a workspace-level setting, not an agent-level one. There is no per-agent override.
Mode is set in Settings, under Permissions, where it is the question What are you working on?, or by editing
.rundock/state.json directly:
notes and code. A workspace an earlier release stored as knowledge is read as Notes, and stays as it is until you change the mode.
When a workspace is first opened, Rundock auto-detects the likely mode by looking at the file structure (presence of package.json, pyproject.toml, Cargo.toml, etc).
Mode does not decide whether agents are kept inside the workspace. That is its own switch in the same pane, and changing mode never moves it: see Keep agents inside this workspace.
Complete worked example
Here is a complete agent file,lead-developer.md. There are no comments on the frontmatter lines, deliberately: see Common pitfalls.
name: lead-developermatches the filenamelead-developer.md.displayNameandroleare what the org chart card shows.type: specialistplaces it under the orchestrator.order: 4places Forge fourth on the chart, after the orchestrator (0) and three earlier specialists.reportsTo: chief-of-staffputs Forge on the orchestrator’s direct line.colouruses the UK spelling. The hex is quoted here by preference: the parser is a line regex, not YAML, so the unquoted form works too.modeltakes any model your runtime serves, orinherit.descriptionuses YAML’s folded-scalar syntax (>) so the description spans lines while parsing as a single string.promptsare written as the user would phrase them, not as commands.
Common pitfalls
A few specific things that go wrong silently, in roughly order of frequency. Filename does not matchname. The filename is the slug. The frontmatter’s name should match. A mismatch can cause the agent to be invisible to the orchestrator’s delegation. Keep them the same.
Two orchestrators in one workspace. Only one agent should have type: orchestrator. Rundock will surface both, but the delegation chain assumes a single root. The org chart and routing logic will pick one arbitrarily.
reportsTo points to a slug that does not exist. The reference must resolve to another agent’s slug in the same workspace. The Workspace audit catches this.
Frontmatter validates loosely. Typos in field names (displayname instead of displayName, colors instead of colour) are silently ignored. The agent loads with whatever defaults Rundock assigns.
order collisions. Two specialists with the same order value appear in indeterminate sibling order. Pick a unique integer for each top-level specialist. Use decimals for sub-agents (1.1, 1.2).
Comments after a value become part of the value. Rundock reads single-value fields with a line regex, not a YAML parser, so it does not strip a trailing # comment. model: opus # fast hands the runtime the model name opus # fast, and a comment after displayName shows on the org chart. Put comments on their own line. The same line regex is why a hex colour needs no quotes: colour: #E87A5A and colour: "#E87A5A" both read as #E87A5A.
Status is three-state, and order alone does not decide it.
Skills attach only to
onTeam agents. An available or raw agent gets none however it declares them, and nothing warns. If a skills: array seems to do nothing, check the status first.
Other things that parse cleanly and do nothing. description: | leaves a literal pipe in the text, because only the folded > form is stripped. capabilities: needs exactly two spaces and word-character keys, or the whole block is dropped. The profile panel shows at most the first 20,000 characters of the body; the running agent still receives the whole file.
Both skills: forms parse. The flow style skills: [a, b] is tried first and the block form with indented - slug lines is the fallback. An earlier version of this page said the flow form parsed as empty; it does not.
Body says “you must delegate using this exact marker”. Do not write delegation marker syntax into the agent’s body. Rundock injects it at spawn time. The body should describe what to delegate and to whom, never the marker format.
No “out of scope” instruction. Every specialist should include a short instruction on what to do when a request falls outside its domain: tell the user briefly, do not name other specialists, and emit <!-- RUNDOCK:RETURN --> at the end of the response. Without this, the specialist will try to handle out-of-scope work itself.
Where to next
- The Agents concept page covers what an agent is and how delegation works at the conceptual level.
- The full source of truth is
AGENTS.mdin the Rundock GitHub repo. It includes the parser specifics and tracks any new fields as they ship.