Skip to main content

Module output_style

Module output_style 

Source
Expand description

BP-5 (catalog D2 “Output style / personality module”: swappable response-style instruction layer; cc§7 “Output styles”; cx§2 “Personality layer”) — the named response-style layer.

This is a prompt-assembly INPUT, not a module. It has no state, no tools, no capability table and nothing in the loop consults it after construction: [core.output_style] names a style, this file resolves the name to text, and Agent::with_parts appends one section to the system prompt. That is the whole mechanism, and it is exactly what both harnesses do — Claude Code’s output styles “append custom instructions to the end of the system prompt” (docs:output-styles#how-output-styles-work) and Codex’s personality is one more spliced instruction block (codex-rs/core/src/context/personality_spec_instructions.rs).

Two resolution sources, in this order.

  1. A markdown file under the style roots of the harness [core.skills] harness names — for Claude Code, <CLAUDE_CONFIG_DIR>/output-styles/ then <cwd>/.claude/output-styles/ (docs:output-styles). A user’s own file WINS over a built-in of the same name, which is the only ordering that lets someone replace a shipped style.
  2. A BUILTIN_STYLES entry.

The built-in texts are supercode’s own. Each is a short transcription of what the named style is DOCUMENTED to do, written here; none is a copy of a harness’s shipped prompt. default (cc) and none (cx) are the neutral selections both harnesses ship with — they resolve, and contribute no text, which is precisely their documented behavior.

keep-coding-instructions. A custom cc style may DROP the built-in software-engineering instructions unless its frontmatter says keep-coding-instructions: true (docs:output-styles). That is the one place a style does more than append: Resolved::replaces_base reports it, and prompt assembly then uses the style text as the base prompt instead of appending it.

Structs§

Resolved
A resolved output style.

Constants§

BUILTIN_STYLES
The named styles this build ships, name → instruction text.

Functions§

resolve
Resolve [core.output_style] for config, or None when it names nothing (the default) or nothing by that name exists.