# Output styles

Text appended to the system prompt. It changes tone, length and structure, not tools, abilities or model. One style is active at a time, for every call through the prompt assembler: chat turns, agentic function bodies, background agents.

## Switch

| Where | How |
| --- | --- |
| TUI | `/style` lists and marks the active one; `/style concise` switches; `/style default` clears |
| Shell | `openprogram config get agent.output_style` `openprogram config set agent.output_style concise` |
| Web | Settings, Agent group |

Global, stored as `agent.output_style` in `~/.openprogram/config.json`. Applies from the next turn.

## Built-in

| Name | Effect |
| --- | --- |
| `default` | Appends nothing |
| `concise` | As few words as the question allows; result first, no preamble or closing summary |
| `explanatory` | Answer, then reasoning, trade-offs and how a change fits its surroundings |
| `direct` | Conclusions without hedging; drops caveats that do not change the decision; corrects wrong premises |
| `detailed` | Edge cases, failure modes, assumptions; headings or lists for longer answers |

## Custom

A Markdown file. Its name is the style name; its body is the appended text.

```
mkdir -p ~/.openprogram/output-styles
cat > ~/.openprogram/output-styles/lab-notes.md <<'END'
## Output style: lab notes

Report work as a lab notebook entry. State what was tried, what was observed,
and what it implies. Record negative results as plainly as positive ones.
END

openprogram config set agent.output_style lab-notes
```

| Precedence | Source | Path |
| --- | --- | --- |
| 1, lowest | Built-in | the table above |
| 2 | User | `~/.openprogram/output-styles/<name>.md` |
| 3, wins | Project | `<cwd>/output-styles/<name>.md` |

YAML frontmatter is stripped, so a `description:` never reaches the model. A file with an empty body is ignored.

**Where the text lands**

- A registered context component (`output_style`, layer L0), entering through the assembler in `openprogram/runtime/context/prompt_assembly/components.py`, not a user message.
- After identity and tool-use guidance, before the agent's inline system prompt, so the agent's instructions win a conflict.
- `default` is empty and empty components are dropped: the prompt is byte-for-byte the one built with no component.

[Configuration](https://fzkuji.github.io/OpenProgram/docs/reference/config.html) · [Context composition](https://fzkuji.github.io/OpenProgram/docs/reference/design/context/composition.html)
