/compose — Generate Document from Template
Purpose
Produces structured output artifacts by combining a composition template (ROM) with
live workspace data. The template defines the skeleton. The agent fills it with
current context. The output lands in output/ for human review.
Usage
/compose <template-name> [--for <receiver>] [--data <source>] [--status draft|review]
Arguments
| Arg | Required | Default | Description |
|-----|----------|---------|-------------|
| template-name | Yes | — | Name of template in reference/compositions/ |
| --for | No | — | Intended receiver (adjusts genre encoding) |
| --data | No | auto | Data source: auto scans relevant data/ + output/ |
| --status | No | draft | Initial status of the output file |
| --output | No | auto | Override output directory (default: output/{genre}/) |
Workflow
- Load template — Read
reference/compositions/{template-name}.md - Resolve receiver — If
--forspecified, look up receiver's genre preference
(from SYSTEM.md people table or company.yaml org chart)
- Gather data — Scan
data/, recentoutput/, and engine (if available) for
relevant context. Use search if engine exists, otherwise scan by keyword.
- Generate — Fill template skeleton with gathered data. Follow genre rules.
Apply Signal Theory encoding: resolve all 5 dimensions S=(M,G,T,F,W).
- Write output — Save to
output/{genre}/{date}-{title}.mdwith frontmatter:
```yaml
genre: {from template}
type: {speech act}
status: {draft|review}
created_by: {agent name}
created_at: {date}
for: {receiver if specified}
template: {template-name}
```
- Report — Show output path, word count, data sources used.
Examples
# Generate a quarterly review from template
/compose quarterly-review
# Write a proposal for a specific client
/compose client-brief --for "ACME Corp" --status review
# Create a weekly signal report using specific data
/compose weekly-signal --data "data/pipeline.json"
# Generate meeting prep doc
/compose meeting-prep --for "Ed Honour"
Composition Template Format
Templates in reference/compositions/ follow this structure:
---
genre: proposal
default_output: output/proposals/
sections:
- objective
- key_messages
- supporting_data
- call_to_action
data_sources:
- data/pipeline.json
- output/analyses/
---
# {title}
## Objective
{Agent fills: one sentence, what outcome}
## Key Messages
{Agent fills: 3-5 bullets from gathered data}
## Supporting Data
{Agent fills: relevant metrics, quotes, evidence}
## Call to Action
{Agent fills: single unambiguous ask + deadline}
Output
- File written to
output/{genre}/{date}-{title}.md - Frontmatter with full metadata for OSA command center
- Status set to
draft(user reviews and promotes toapproved)
Dependencies
reference/compositions/must contain the named templatedata/and/oroutput/for context gathering- Engine search (optional, for richer data gathering)
- People/receiver table in SYSTEM.md or company.yaml (optional, for genre matching)