Skip to content

[FEATURE] Output style picker (/config) — switch output styles in-session, like Claude Code #42414

Description

@roynasser

Problem

opencode loads agent rules from AGENTS.md only, with no concept of multiple switchable "output styles". Users who want ADHD-friendly / terse / briefing variants of the agent voice (see attention-span) have to manually edit AGENTS.md to swap the style block, and cannot switch per-session.

Claude Code solves this with output-style markdown files (~/.claude/output-styles/*.md) plus a /config picker and settings.json: { "outputStyle": "..." } default. The styles are plain markdown bodies (one frontmatter name/description line each) and the engine injects the active one as a system rule.

Proposal

Add a first-class output style concept:

  • ~/.config/opencode/output-styles/*.md (global) and .opencode/output-styles/ (project) — one markdown file per style, optionally with YAML frontmatter (name, description).
  • A /config (or /style) slash command in the TUI that pops a list of installed styles and activates one for the current session.
  • A settings.json / opencode.json key like "outputStyle": "Attention-kind" to set the default, so it persists across sessions without manual AGENTS.md edits.
  • The active style body is injected into the system prompt the same way AGENTS.md content is today; non-active styles are ignored.

Why

  • Per-session switching. Today, switching voice = edit AGENTS.md, restart. A picker makes it a keystroke.
  • Composable with AGENTS.md. Project rules and personal voice preferences stop fighting for the same file. AGENTS.md carries project/work conventions; output styles carry delivery preferences.
  • Parity with Claude Code. Users coming from Claude Code (and tools like attention-span that target it) get the same workflow on opencode with zero porting effort. The attention-span README already documents per-agent installs; a native picker would make that unnecessary.
  • Cheap to implement. Markdown files + a slash command + one settings key + one system-prompt injection point. No model behavior change.

Detail

  • Default-on style: none (current behavior). Backwards compatible.
  • File format: plain markdown body, optional frontmatter. If no frontmatter, derive name from filename.
  • Scope: global styles apply everywhere; project styles override for that project; /config selection overrides both for the session.
  • Token cost: ~650 tokens per style, cached after first request — same as AGENTS.md content today.

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions