Skip to content
LogoLogo

File formats

Markdown file formats read by Toolang 0.4.0. Caps and chores use YAML frontmatter followed by a Markdown body. Names come from filenames or skill directories; a supplied cap name field must match that path.

Cap files

Root cap directories supply shared definitions; agent-home directories supply agent-specific definitions. Home definitions take precedence over matching root definitions. Inline or referenced caps belong to their .too module.

KindFileBody
Psychepsyches/NAME.mdPersistent behavioral guidance
Skillskills/NAME/SKILL.mdRequired workflow instructions; sibling assets may accompany them
Serviceservices/NAME.mdOptional MCP usage notes
Promptprompts/NAME.mdReusable input template

Markdown and inline declarations

TermMarkdown cap fileInline .too cap
NameFilename or skill directory; optional matching name metadataRequired declaration name
PropertiesYAML frontmatter with native scalar, list, and map valuesLeading key = value lines with nonempty text values
Service envList of names or comma-separated stringComma-separated names, such as env = API_TOKEN,REGION
Service headersYAML string mapInline text property, valid only for HTTP; built-in connector limitation below applies
Extra metadataSkills and services reject unknown fields; psyches and prompts have no format-specific metadata schemaOnly properties allowed by that cap kind; prompts allow none

These formats are not interchangeable. Keep YAML --- delimiters and YAML lists inside Markdown files; see Grammar for .too declarations. A malformed definition produces a validation error, not an unavailable row in too caps --all.

Psyche files

psyches/concise.md
Prefer direct answers and concrete examples.
State uncertainty when the available evidence is incomplete.

Frontmatter is optional. Other psyche metadata has no format-specific schema; name, when supplied, still has to match the filename.

Skill files

skills/reviewer/SKILL.md
---
description: Review code changes for defects and missing regression coverage.
---
 
Read the changed code and its callers. Report actionable findings with locations.
FieldRequiredMeaning
descriptionyesNonblank trigger summary shown before the skill is loaded
namenoMust match the skill directory name

The body must be nonblank. Other frontmatter fields are rejected. A skill may keep supporting files in its directory, for example references/ and scripts/.

Service files

services/search.md
---
description: Search the project's external knowledge service.
transport: http
target: https://example.com/mcp
---
 
Use the service to find project documentation.
FieldRequiredMeaning
descriptionyesNonblank progressive-loading trigger summary
transportyeshttp or stdio; protocol is accepted as an alias
targetyesNonblank MCP URL or shell-like process command line
headersnoString-to-string map accepted as metadata; see the runtime limitation below
envnoRequired environment names, as a comma-separated string or list
namenoMust match the filename stem

The body is optional. Other fields are rejected. In 0.4.0 the built-in service connector does not forward this headers metadata or expand environment references inside it. A value such as Bearer $SEARCH_API_KEY does not configure authentication. Use the service connector's authentication flow when required.

A stdio service describes one command, with shell-style quoting for arguments:

services/knowledge.md
---
description: Retrieve material from a local knowledge service.
transport: stdio
target: uvx example-mcp-server
env:
  - API_TOKEN
---

env lists variable names, not assignments. Those variables must exist in the selected agent environment. The connector supplies their values to service operations; a missing name fails when the connection is prepared. The stdio target is split into arguments with shell-style quoting; shell operators and $VARIABLE expansion are not evaluated by Toolang.

Prompt files

prompts/summarize.md
Summarize {{_}} for {{audience}}.

Frontmatter is optional. The body is the template. {{_}} refers to primary input; other root placeholder names declare named text arguments. Invoke an available prompt at the beginning of a content line:

$summarize audience=developers -- Explain the proposed change.

A bare {{input}} is a named argument called input; it is not the special primary-input placeholder. Other prompt metadata has no format-specific schema; a supplied name must match the filename stem.

All free named placeholders are required text arguments. Use name=value assignments with shell-style quoting; unknown or duplicate arguments fail. -- TEXT supplies same-line primary input, - captures the remaining content, and --- captures content through a closing line containing exactly ---. The fenced form is available to prompt calls only. A Markdown code fence keeps $PROMPT and @file lines literal.

Validation examples

Invalid Markdown definitionDiagnostic
A skill with no descriptionskill description is required
A skill with an empty bodyskill body is required
name: other in skills/reviewer/SKILL.mdCap name does not match its path
env: {API_TOKEN: secret} in a serviceService env must list variable names
schedule: "" in a choreChore schedule must be non-empty text

Chore files

Chores are current definitions in the agent home's chores/ directory. The filename stem is the case-sensitive chore name, addressed as chore/NAME. Inline .too declarations use the same title, schedule, and work text; see Grammar.

Markdown format

A chore without a schedule runs once for each body revision:

chores/review-api.md
---
title: Review API changes
---
 
Review the API changes and summarize actionable findings.

Add an explicit RRULE for recurring work:

chores/check-prs.md
---
title: Check stale pull requests
schedule: FREQ=HOURLY;INTERVAL=6
---
 
Check stale pull requests and report actionable changes.

Frontmatter

FieldRequiredMeaning
titlenoNonblank display title; otherwise derived from the body or name
schedulenoNonblank RFC 5545 RRULE; omission selects one-off work

Only title and schedule are interpreted from chore frontmatter. Other metadata is preserved but does not configure execution. Names cannot contain path separators or surrounding whitespace. Markdown names are case-sensitive and allow more characters than inline .too declaration names.

The body supplies the work instruction. The name and agent determine the runtime ID; it is not an authored frontmatter field. Editing the title, body, schedule, or location preserves identity when the name stays the same. Renaming the chore changes its identity.

A plain RRULE uses a UTC anchor when the scheduler first observes the definition. Its first scheduled occurrence is strictly after that observation. Changing the schedule resets the anchor; editing only a recurring chore's body does not. For a daily 09:00 UTC schedule, use FREQ=DAILY;BYHOUR=9;BYMINUTE=0;BYSECOND=0. A cron expression is not an RRULE.

Execution status and checkpoints are stored separately. There are no task files, draft/ready/archive directories, or authored state/stage transitions. The Chore driver must be enabled for dispatch. Removing a definition stops future dispatch while preserving history; it does not cancel an active run. Use too alice chore run NAME to request another occurrence and too alice chore cancel NAME to cancel pending or active work. Canceling an occurrence leaves a recurring definition's future schedule in place; remove the definition to stop later scheduled dispatches.

The body is parsed as authored run input. It can start with /model, /allow, /limit, /workdir, or a runnable selection such as /flow:review. File includes resolve relative to the chore definition's directory. Editing only a title does not create another one-off occurrence; body revisions ignore CRLF versus LF and surrounding whitespace.