# How to Configure output_style in DeepSeek-Reasonix for Different Persona Tones

> Learn how to configure output_style in DeepSeek-Reasonix using TOML, slash commands, or programmatically. Control explanatory depth with explanatory, learning, or concise tones.

- Repository: [YHH/DeepSeek-Reasonix](https://github.com/esengine/DeepSeek-Reasonix)
- Tags: how-to-guide
- Published: 2026-08-06

---

**Set `output_style` to `explanatory`, `learning`, or `concise` in your TOML configuration, use the `/output-style` slash command at runtime, or assign `cfg.Agent.OutputStyle` programmatically to control the agent’s explanatory depth.**

The open-source DeepSeek-Reasonix framework lets you reshape the agent’s communication persona without touching the core inference logic. By configuring the `output_style` parameter, you append or replace system prompt instructions to shift the tone between verbose explanations, interactive tutorials, or terse code-only responses. This guide covers the three built-in styles and exactly where in the codebase the transformation happens.

## What Is output_style?

An **output style** is a text block that modifies the system prompt to alter how the agent presents information. DeepSeek-Reasonix ships with three built-in personas:

- **explanatory**: Explains non-obvious implementation choices as it generates code.
- **learning**: Pauses for user decisions and inserts `TODO(human)` stubs.
- **concise**: Minimal prose—outputs code and short bullets only.

All built-in styles use `KeepCoding: true`, meaning they append their instructions to the existing system prompt rather than replacing it entirely. The implementation lives in [`internal/outputstyle/outputstyle.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/outputstyle/outputstyle.go), where the `Resolve` function performs case-insensitive name lookups and `Apply` handles prompt injection.

## Where Configuration Is Defined

Understanding the data flow requires knowing these four key locations:

- **[`internal/config/config.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/config.go)** (lines 1258–1261): Defines the TOML field `output_style` as a string within the `[agent]` table.
- **[`internal/boot/boot.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/boot/boot.go)** (lines 543–545): Calls `outputstyle.Resolve` at boot time to validate the configured name, then invokes `outputstyle.Apply` to fold the style into the system prompt.
- **[`internal/cli/slash_registry.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/slash_registry.go)** (lines 46–48): Registers the `/output-style` command and its `/output-styles` alias.
- **[`internal/cli/output_style_view.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/output_style_view.go)** (lines 10–22): Renders the interactive list you see when changing styles in the TUI.

## Three Ways to Configure output_style

### Edit the TOML Configuration File

The most persistent method is editing your configuration file (typically [`reasonix.example.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.example.toml) or a custom copy). Add the `output_style` key under the `[agent]` table:

```toml
[agent]

# ... other settings ...

output_style = "learning"   # Options: explanatory | learning | concise

```

The file is automatically rendered when you run `reasonix config edit`, as noted in [`internal/config/render.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/render.go) (lines 290–291). Changes take effect on the next agent restart when [`internal/boot/boot.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/boot/boot.go) processes the configuration.

### Use the /output-style Slash Command

For on-the-fly changes inside the REPL or TUI, type:

```text
/output-style concise

```

The parser in [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) (lines 1279–1280) stores the value in `m.outputStyle`, and the TUI highlights the active selection via `renderOutputStyles` in [`internal/cli/chat_tui.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/chat_tui.go) (lines 4686–4689). This overrides the file setting for the current session.

### Set It Programmatically in Go

If you are embedding DeepSeek-Reasonix as a library, set the style directly on the configuration struct before initialization:

```go
cfg := reasonix.DefaultConfig()
cfg.Agent.OutputStyle = "explanatory"
// Proceed with agent initialization

```

When the agent boots, `outputstyle.Resolve` matches the string to a style definition, and `outputstyle.Apply` injects the corresponding prompt text.

## How Styles Modify the System Prompt

The transformation happens in two steps:

1. **Resolution**: `outputstyle.Resolve` searches for the style name (case-insensitive) among built-ins and any custom markdown files located in directories returned by `outputstyle.Dirs()` (such as `.reasonix/output-styles` or `.agents/output-styles`).
2. **Application**: `outputstyle.Apply` either appends the style body to the system prompt (if `KeepCoding == true`) or replaces the prompt entirely (if `KeepCoding == false`). The built-in styles all append, ensuring core coding instructions remain intact.

Custom styles can override this behavior by setting `keep-coding-instructions: "false"` in their front matter.

## Adding Custom Persona Styles

You can extend the three built-ins by creating markdown files in the convention directories. Create a file like [`.reasonix/output-styles/mentor.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/.reasonix/output-styles/mentor.md) with YAML front matter:

```yaml
name: "mentor"
description: "Senior engineer review tone"
keep-coding-instructions: "false"

```

The body of the file becomes the prompt text. Because `keep-coding-instructions` is set to `"false"`, this style replaces the entire system prompt rather than appending to it. Custom files take precedence over built-ins when names collide.

## Summary

- **Configure `output_style`** in [`reasonix.example.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.example.toml) under `[agent]` for persistent defaults.
- **Switch styles at runtime** with the `/output-style` slash command, handled by [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) and rendered in [`internal/cli/output_style_view.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/output_style_view.go).
- **Embed programmatically** by setting `cfg.Agent.OutputStyle` before boot.
- **Built-in options**: `explanatory`, `learning`, and `concise`, all defined in [`internal/outputstyle/outputstyle.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/outputstyle/outputstyle.go).
- **Extend capabilities** by placing custom `.md` files in `.reasonix/output-styles` with front-matter metadata.

## Frequently Asked Questions

### What are the differences between the three built-in output_style options?

**Explanatory** narrates non-obvious implementation choices while coding. **Learning** pauses generation to ask clarifying questions and leaves `TODO(human)` markers for user completion. **Concise** suppresses narrative, emitting only code blocks and essential bullet points. All three append to the base system prompt (`KeepCoding: true`).

### Can I switch output_style during an active session?

Yes. The `/output-style` command updates the active configuration stored in the TUI model (`m.outputStyle` in [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go)). The change takes effect immediately on the next agent turn without requiring a restart.

### How do I override a built-in style with my own definition?

Create a markdown file with the same name as the built-in (e.g., [`concise.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/concise.md)) in one of the search directories returned by `outputstyle.Dirs()`. According to the resolution logic in [`internal/outputstyle/outputstyle.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/outputstyle/outputstyle.go) (lines 119–128), custom files override built-ins when names match.

### Does output_style affect the code generation or just the commentary?

It primarily affects the **commentary tone and structure**—for example, whether to insert explanatory paragraphs or `TODO` stubs. The underlying code generation capabilities remain consistent because the built-in styles append to rather than replace the core coding instructions (`KeepCoding == true`), unless you explicitly configure a custom style with `keep-coding-instructions: "false"`.