Output Modes

Output modes are provider-neutral presentation constraints selected at runtime. With no configured m

Composable output modes

Prompt-first procedure: Describe the outcome you want in your agent conversation. The agent should select and load the appropriate AIWG assets, explain material changes, request any needed approval, and report verification evidence. Exact commands and flags appear only in the CLI reference.

Output modes are provider-neutral instructions for changing the language or presentation of generated content at runtime. They are sometimes called output masks. The implementation and CLI use the term output mode.

With no selected mode, the effective stack is `unaltered`: AIWG adds no instructions and performs no post-processing.

Quick start

Inspect the available modes, select one for the current session, and verify the effective stack:

Use AIWG to complete this documented outcome: Inspect the available modes, select one for the current session, and verify the effective stack
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Run one script-bearing skill with an invocation-only stack:

Use AIWG to complete this documented outcome: Run one script-bearing skill with an invocation-only stack
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Clean up session state when it is no longer wanted:

Use AIWG to complete this documented outcome: Clean up session state when it is no longer wanted
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Built-in modes

IDKindPurposeAssurance
`unaltered`presentationExplicit no-op; the empty stack behaves the same wayadvisory
`wittgenstein-inspired`voiceConcise propositions, terms clarified in use, and category errors exposedadvisory
`asd-ste`controlled languageAdapter for operator-supplied ASD-STE rules and terminologyadvisory until a licensed ruleset and validator are configured

Existing voice-framework profiles also appear in the agent-owned output-mode operation through voice adapters.

The Wittgenstein-inspired mode is original general style guidance. It does not imitate Ludwig Wittgenstein and must not attribute generated text to him. The built-in ASD-STE mode does not contain or redistribute the standard.

Scopes

ScopeLifetimeStorageTypical use
invocationone the agent-owned run operation callnot persistedexperiment or one-off deliverable
sessioncurrent workspace/session identitytemporary runtime directoryconsistent output during a working session
projectuntil disabled`.aiwg/output-modes.yaml`shared project writing policy

For the same mode ID, invocation selection takes precedence over session selection, which takes precedence over project selection. Profile definitions have a separate precedence order: project, user, adapted voice profile, then built-in.

Project profiles live in `.aiwg/output-modes/`. User profiles live in the `output-modes/` directory below the path reported by the agent-owned config operation. This respects `AIWG_CONFIG` and AIWG's active user configuration rather than assuming a fixed home-directory path.

What selection actually does

Output-mode processing has four distinct steps:

1. The registry loads and validates profiles. 2. Project, session, and invocation selections resolve into one ordered stack. 3. the agent-owned run operation exports that stack as `AIWG_OUTPUT_MODES` and `AIWG_OUTPUT_MODES_JSON`. 4. A participating skill, script, or provider adapter applies each profile's `instructions` and any configured validator.

Selecting a mode does not transparently intercept every terminal command or every response from an arbitrary AI provider. A consumer that ignores the runtime contract will not change its output. See Integrating output modes when building or diagnosing a consumer.

Composition and precedence

Modes execute deterministically by stage:

1. semantic 2. voice 3. controlled language 4. structure 5. presentation

Numeric `order`, then stable ID, break ties within a stage. Two selected modes of the same non-voice kind are rejected. Multiple voice modes require an explicit `weighted-voice` merge strategy. Explicit conflicts and missing requirements also stop resolution before state is saved or a child process starts.

Output modes are lower authority than user instructions, project policy, safety, factuality, accuracy, and citation requirements. They should change expression, not evidence or meaning.

Protected content

A profile may protect these literal classes:

  • `code`
  • `commands`
  • `citations`
  • `quoted-text`
  • `identifiers`
  • `machine-readable-blocks`

The runtime replaces protected spans with opaque tokens before transformation and restores them afterward. Removing or duplicating a token fails closed. Protected-content masking is a guardrail, not a parser for every programming or markup language; consumers should add domain-specific tests for unusual formats.

Continue