Role Spec v1 JSON Schema
role-spec/v1 is the format TappHQ stores every role in. It describes what the role is for, the decisions it owns, the tools and files it uses, and what it has learned. People, agents and bots who fill a role all read the same spec.
| Field | Path | Type | Presence | Values |
|---|---|---|---|---|
agentTeam | agentTeam | array of object | Required | |
handoffTo | agentTeam[].handoffTo | string | Optional | up to 200 characters |
name | agentTeam[].name | string | Required | up to 200 characters |
owns | agentTeam[].owns | array of string | Required | |
tools | agentTeam[].tools | array of string | Required | |
cadence | cadence | array of object | Required | |
schedule | cadence[].schedule | string | Required | up to 200 characters |
task | cadence[].task | string | Required | up to 4000 characters |
decisions | decisions | array of object | Required | |
authority | decisions[].authority | string | Required | owns, recommends, escalates |
description | decisions[].description | string | Required | up to 4000 characters |
escalateTo | decisions[].escalateTo | object | Optional | |
kind | decisions[].escalateTo.kind | string | Required | role, position, manager |
ref | decisions[].escalateTo.ref | string | Optional | |
key | decisions[].key | string | Required | |
timeoutHours | decisions[].timeoutHours | integer | Optional | |
tools | decisions[].tools | array of string | Optional | |
expertise | expertise | array of object | Required | |
area | expertise[].area | string | Required | up to 200 characters |
depth | expertise[].depth | string | Required | working, strong, expert |
files | files | array of object | Required | |
access | files[].access | string | Required | write, read |
kind | files[].kind | string | Required | document, url, drive |
ref | files[].ref | string | Required | up to 4000 characters |
handoffs | handoffs | array of object | Required | |
artifact | handoffs[].artifact | string | Required | up to 4000 characters |
toRole | handoffs[].toRole | string | Required | up to 200 characters |
trigger | handoffs[].trigger | string | Required | up to 4000 characters |
learnings | learnings | array of object | Required | |
approvedAt | learnings[].approvedAt | string | Required | |
approvedBy | learnings[].approvedBy | string or string | Required | |
id | learnings[].id | string | Required | |
provenance | learnings[].provenance | string | Required | up to 4000 characters |
text | learnings[].text | string | Required | up to 4000 characters |
locale | locale | string | Required | en |
meta | meta | object | Required | |
name | meta.name | string | Required | up to 200 characters |
roleType | meta.roleType | string | Required | |
summary | meta.summary | string | Required | up to 4000 characters |
mission | mission | object | Required | |
kpis | mission.kpis | array of object | Required | |
cadence | mission.kpis[].cadence | string | Required | up to 200 characters |
key | mission.kpis[].key | string | Required | |
metric | mission.kpis[].metric | string | Required | up to 200 characters |
source | mission.kpis[].source | object or string | Required | |
auto | mission.kpis[].source.auto | string | Required | |
target | mission.kpis[].target | string | Required | up to 200 characters |
outcomes | mission.outcomes | array of string | Required | |
purpose | mission.purpose | string | Required | up to 4000 characters |
responsibilities | responsibilities | array of object | Required | |
description | responsibilities[].description | string | Required | up to 4000 characters |
doneWhen | responsibilities[].doneWhen | string | Required | up to 4000 characters |
frequency | responsibilities[].frequency | string | Required | up to 200 characters |
key | responsibilities[].key | string | Required | |
schema | schema | string | Required | role-spec/v1 |
streams | streams | array of object | Required | |
config | streams[].config | object | Required | |
key | streams[].key | string | Required | |
kind | streams[].kind | string | Required | event, inbox, feed, schedule |
name | streams[].name | string | Optional | up to 200 characters |
tools | tools | object | Required | |
external | tools.external | array of object | Required | |
name | tools.external[].name | string | Required | up to 200 characters |
notes | tools.external[].notes | string | Required | up to 4000 characters |
platform | tools.platform | array of string | Required |
agentTeam- agentTeam - array of object - Required
handoffTo- agentTeam[].handoffTo - string - Optional - up to 200 characters
name- agentTeam[].name - string - Required - up to 200 characters
owns- agentTeam[].owns - array of string - Required
tools- agentTeam[].tools - array of string - Required
cadence- cadence - array of object - Required
schedule- cadence[].schedule - string - Required - up to 200 characters
task- cadence[].task - string - Required - up to 4000 characters
decisions- decisions - array of object - Required
authority- decisions[].authority - string - Required - owns, recommends, escalates
description- decisions[].description - string - Required - up to 4000 characters
escalateTo- decisions[].escalateTo - object - Optional
kind- decisions[].escalateTo.kind - string - Required - role, position, manager
ref- decisions[].escalateTo.ref - string - Optional
key- decisions[].key - string - Required
timeoutHours- decisions[].timeoutHours - integer - Optional
tools- decisions[].tools - array of string - Optional
expertise- expertise - array of object - Required
area- expertise[].area - string - Required - up to 200 characters
depth- expertise[].depth - string - Required - working, strong, expert
files- files - array of object - Required
access- files[].access - string - Required - write, read
kind- files[].kind - string - Required - document, url, drive
ref- files[].ref - string - Required - up to 4000 characters
handoffs- handoffs - array of object - Required
artifact- handoffs[].artifact - string - Required - up to 4000 characters
toRole- handoffs[].toRole - string - Required - up to 200 characters
trigger- handoffs[].trigger - string - Required - up to 4000 characters
learnings- learnings - array of object - Required
approvedAt- learnings[].approvedAt - string - Required
approvedBy- learnings[].approvedBy - string or string - Required
id- learnings[].id - string - Required
provenance- learnings[].provenance - string - Required - up to 4000 characters
text- learnings[].text - string - Required - up to 4000 characters
locale- locale - string - Required - en
meta- meta - object - Required
name- meta.name - string - Required - up to 200 characters
roleType- meta.roleType - string - Required
summary- meta.summary - string - Required - up to 4000 characters
mission- mission - object - Required
kpis- mission.kpis - array of object - Required
cadence- mission.kpis[].cadence - string - Required - up to 200 characters
key- mission.kpis[].key - string - Required
metric- mission.kpis[].metric - string - Required - up to 200 characters
source- mission.kpis[].source - object or string - Required
auto- mission.kpis[].source.auto - string - Required
target- mission.kpis[].target - string - Required - up to 200 characters
outcomes- mission.outcomes - array of string - Required
purpose- mission.purpose - string - Required - up to 4000 characters
responsibilities- responsibilities - array of object - Required
description- responsibilities[].description - string - Required - up to 4000 characters
doneWhen- responsibilities[].doneWhen - string - Required - up to 4000 characters
frequency- responsibilities[].frequency - string - Required - up to 200 characters
key- responsibilities[].key - string - Required
schema- schema - string - Required - role-spec/v1
streams- streams - array of object - Required
config- streams[].config - object - Required
key- streams[].key - string - Required
kind- streams[].kind - string - Required - event, inbox, feed, schedule
name- streams[].name - string - Optional - up to 200 characters
tools- tools - object - Required
external- tools.external - array of object - Required
name- tools.external[].name - string - Required - up to 200 characters
notes- tools.external[].notes - string - Required - up to 4000 characters
platform- tools.platform - array of string - Required
Authority rules
- A decision's authority is one of owns, recommends, escalates. Moving right narrows it.
- File access is one of write, read. Moving right narrows it.
- The authority fields are decisions, tools, files. A per-seat override may only narrow them, never widen them.
- Every tool a decision uses must also be listed in tools.platform.
- Changes to the authority fields, and new learnings, are submitted as proposals. Most apply right away; a change that affects agents someone else owns, or gives a decision the proposer owns a new write tool, waits for an admin or HR.
Markdown format
- The first line is `<!-- role-spec/v1 | role <id> | version <n> -->`. Only the role-spec/v1 token is required.
- A level-one heading holds the role name, followed by `Role type: <key>` and `Locale: en` lines.
- Every level-two section appears once, in the order listed below.
- Fields are written as `- <field>: <value>`. List fields put one ` - <value>` item per line under the field line.
- An empty list is the single line `_None._`.
- A value is written as-is when it is one line, has no leading or trailing spaces and does not start with a quote, dash, #, >, backtick or the empty-list marker. Any other value is written as a JSON string in double quotes.
- Stream config is a fenced ```json block under `- config:`.
- Errors name the line they were found on. A saved document is validated against the JSON Schema before anything changes.
- Summary
- meta.summary as a `- summary:` field.
- Mission
- mission.purpose and the mission.outcomes list.
- KPIs
- One `### <key>` entry per KPI; source is `manual` or `auto <key>`.
- Responsibilities
- One `### <key>` entry per responsibility.
- Expertise
- Numbered `### <n>` entries; depth is working, strong or expert.
- Decisions
- One `### <key>` entry per decision; escalateTo is `<kind> <ref>`.
- Streams
- One `### <key>` entry per stream; an optional display name; config is a fenced json block.
- Files
- Numbered entries; access is write or read.
- Tools
- The tools.platform list of platform tool names.
- External tools
- Numbered entries for tools outside the platform.
- Cadence
- Numbered entries of recurring work.
- Handoffs
- Numbered entries of work passed to another role.
- Agent team
- Numbered entries of the agents that support the role.
- Learnings
- Numbered entries; an entry with only `- text:` is a new learning, submitted for approval.