Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Document Format Reference

Complete reference for the procedure document format — every section, field, and convention.

Full Template

id: my-procedure
version: 1.0
trigger: manual
category: Operations
description: One to two sentences describing what this procedure does and when to use it.
access: public
admins:
  - slack:#ops-team
share:
  - slack:#all-employees
 
# My Procedure
 
One to two sentences describing what this procedure does and when to use it.
 
## Input
 
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| field_name | string | yes | | What this field is for |
 
## State
 
| Field | Storage | Description |
|-------|---------|-------------|
| current_step | invocation | Where we are |
 
## Steps
 
### first_step
Description of what to do.
 
→ next_step
 
### next_step
Description of what to do.
 
→ done ✓
 
### done ✓
Close the run.
 
## Output
 
| Field | Type | Description |
|-------|------|-------------|
| result | string | What was produced |

Frontmatter Fields

FieldTypeRequiredValues
idstringyesUnique, kebab-case identifier
versionstringyesmajor.minor — start at 1.0, LLM bumps based on edit nature
triggerstringyesmanual, schedule("0 9 * * MON"), event("type")
categorystringyesFinance, People, Procurement, Access, Compliance, Operations, Custom
descriptionstringyesUser-facing summary — what it does and when to use it
accessstringyespublic (discoverable by all) or private (only shared principals)
adminslistyesPrincipals who can manage, edit, and view all runs
sharelistnoPrincipals who can discover and invoke (for private procedures)

Principal Formats

FormatExampleResolves to
slack:#channelslack:#finance-teamAll members of the Slack channel (dynamic)
email:addremail:alice@co.comSingle user by email
user:iduser:abc123Single user by Gateway ID

Input Field Types

TypeDescriptionExample
stringText value"Fix the login bug"
numberNumeric value85.50
dateISO date2026-03-15
booleanTrue/falsetrue
string[]List of strings["alice", "bob"]
objectStructured data{ name: "...", email: "..." }

State Storage Types

During execution, all state lives in D1. On run completion, collections export to Notion.

StorageUse ForIn-Flight (D1)On Export (Notion)
Notion DBCollections the user should seerun_submissions rowsNotion DB under procedure page
Notion DB: {auto}Collections where AI designs the schemarun_submissions rowsAuto-created Notion DB
Notion DB rowSingle row in an existing databaserun_submissions rowNotion DB row
invocationScalar values for internal trackingruns.current_step etc.Run metadata in Notion

Step Patterns

Simple Transition

### create_record
Create the record in the database.
Notify the submitter.
 
→ review

Approval with Escalation

### approve
Post in #channel for approval.
- If amount ≤ $200 → team lead approves
- If amount > $200 → department head approves
 
**Wait**: 48h
**On event** `approved`: → next_step
**On event** `rejected`: → rejection_step
**On timeout**: Escalate — ping approver again, CC their manager.

Collect Over Time

### collect_responses
**Wait until**: {input.deadline}
**On event** `response`: Add to {state.responses}. Confirm to sender.
**On timeout**: Continue with whatever was collected.
 
→ process

Branch by Condition

### route
Based on {state.decision}:
 
**If approved:**
- Create Linear issue
- → execute
 
**If rejected:**
- Notify submitter
- → done ✓
 
**If deferred:**
- Schedule reminder for 3 months
- → done ✓

Periodic Check-in

### track_progress
**Wait until**: {input.target_date} - 14d
 
Weekly on Monday:
- Query status from Linear / Notion
- Post update in {input.channel}
- Flag blocked items
 
**On event** `ready`: → next_step

Multi-System Provisioning

### setup_accounts
Create or verify:
- Google Workspace account
- Slack invite → add to channels
- Notion access → share team spaces
- Linear team membership
- GitHub access (if engineering)
 
Create checklist in Notion to track completion.