Additional

Behavior Adaptation

Synced from github.com/CoWork-OS/CoWork-OS/docs

CoWork OS can gradually adjust how it communicates — learning from observed messages and feedback, and adapting delivery style per channel. These are opt-in behavior controls, not safety guardrails.


Controls

Both settings live in Settings → Guardrails → Behavior Adaptation.

Adaptive Style

Setting: adaptiveStyleEnabled (default: false)

When enabled, AdaptiveStyleEngine observes user messages and feedback to nudge PersonalityManager style dimensions (response length, emoji usage, explanation depth) within a weekly drift budget.

Rate limit: adaptiveStyleMaxDriftPerWeek (default: 1) — the maximum number of one-level style shifts in any rolling 7-day window.

Signals that drive adaptation:

SignalDetected byEffect
Short messagesRolling average of last 50 lengthsShifts responseLengthterse
Emoji in messagesFraction of emoji-containing messagesShifts emojiUsagemoderate
Technical vocabularyDensity of tech termsShifts explanationDepthexpert
"too verbose" feedbackReason field matchShifts responseLengthterse
"more detail" feedbackReason field matchShifts responseLengthdetailed
"no emoji" feedbackReason field matchShifts emojiUsagenone

Audit: Every adaptation is recorded with dimension, from/to values, reason, and timestamp. Retrieve via AdaptiveStyleEngine.getAdaptationHistory().

Reset: The "Reset learned style" button in Guardrail Settings clears all accumulated state and adaptation history via AdaptiveStyleEngine.reset() over the shared IPC channel KIT_RESET_ADAPTIVE_STYLE (kit:resetAdaptiveStyle).

Feedback ingress: Thumbs-down assistant feedback reaches the adaptation pipeline over the shared IPC channel KIT_SUBMIT_MESSAGE_FEEDBACK (kit:submitMessageFeedback), so structured message feedback and style-reset behavior use the same typed channel registry.


Channel Persona

Setting: channelPersonaEnabled (default: false)

When enabled, ChannelPersonaAdapter appends a channel-specific communication directive to the system prompt — without replacing the core personality. The directive adjusts response length, formatting, emoji use, and formality norms for the originating channel.

Supported channels:

ChannelLengthFormattingEmojiFormal
slackShorterStructuredNoNo
emailLongerStructuredNoYes
whatsappShorterPlainYesNo
imessageShorterPlainYesNo
discordNormalMarkdownYesNo
teamsNormalStructuredNoNo
telegramShorterMinimalNoNo
signalShorterPlainNoNo

Group/public overlay: When the task's gatewayContext is "group" or "public", an additional privacy directive is added regardless of channel.


Relationship to Guardrails

These controls sit in Guardrail Settings because they govern agent behavior, but they are separate from safety guardrails (token budget, dangerous command blocking, etc.). A future refactor may move them to a dedicated "Behavior" settings tab.


Integration points

ComponentRole
src/electron/memory/AdaptiveStyleEngine.tsObservation, drift, state
src/electron/memory/ChannelPersonaAdapter.tsChannel directive generation
src/electron/agent/executor.tsInjects channel directive into system prompt
src/electron/agent/daemon.tsCalls observe() and observeFeedback()
src/renderer/components/GuardrailSettings.tsxSettings UI (Behavior Adaptation section)
src/electron/ipc/handlers.tskit:resetAdaptiveStyle and kit:submitMessageFeedback handlers
src/shared/types.tsShared IPC channel constants for behavior-adaptation and feedback wiring