Documentation
¶
Overview ¶
Package caveman implements an output-brevity policy that can be injected into the agent's system prompt before each turn, at three levels (lite/full/ultra) plus an off switch.
It is a Pando-owned re-implementation of the idea behind the caveman skill by Julius Brussee (https://github.com/juliusbrussee/caveman, MIT licensed): the upstream project compresses the assistant's prose to cut output tokens while keeping code, commands and errors exact. Pando does not vendor its assets, hooks or telemetry; only the output policy is reproduced here, in a neutral, safety-preserving form.
The policy constrains expression only. It never relaxes reasoning, tool use, testing or verification requirements, and it never reduces input or reasoning tokens — only the words the model writes back.
Index ¶
Constants ¶
const DisabledMessage = "Caveman output brevity disabled. Back to normal output."
DisabledMessage confirms /caveman-finish.
const FinishUsage = "Usage: /caveman-finish\nIt takes no level. To change level, use /caveman [lite|full|ultra]."
FinishUsage is shown when /caveman-finish is given an argument: the command takes no level, and silently ignoring one would hide the user's mistake.
const SettingDescription = "Reduces output-token usage by giving shorter explanations and removing filler. " +
"It keeps code, commands, errors, reasoning quality, tool use, and verification intact. " +
"Output savings vary; input and reasoning tokens are not reduced."
SettingDescription is the help text for the global default in the settings surfaces (TUI and Web UI). It must state the output-only caveat: the mode cannot reduce input or reasoning tokens, and the savings depend on the task.
const Usage = "Usage: /caveman [lite|full|ultra]\nNo argument defaults to full. Use /caveman-finish to disable."
Usage is the one-liner shown when /caveman gets an unsupported level.
Variables ¶
This section is empty.
Functions ¶
func ActivationMessage ¶
ActivationMessage is the confirmation for /caveman. It states what changes (fewer words) and, just as importantly, what does not: reasoning, tool use, testing and verification are untouched, and the savings are output-only.
func Description ¶
Description returns a one-line summary of a mode for confirmation messages.
func Instructions ¶
Instructions returns the full caveman policy to inject for the given mode, or the empty string when the mode is off. The result is the always-on core policy plus the snippet for the active level.
func SettingOptions ¶
func SettingOptions() []string
SettingOptions lists the selectable values for the global default, in the order the settings surfaces present them.
Types ¶
type Mode ¶
type Mode string
Mode is the caveman output-brevity level for a session.
const ( // ModeOff disables caveman; nothing is injected. ModeOff Mode = "" // ModeLite trims filler but keeps normal sentences. ModeLite Mode = "lite" // ModeFull is the default: terse fragments, no unrequested prose. ModeFull Mode = "full" // ModeUltra is maximally terse: answer only, near-telegraphic. ModeUltra Mode = "ultra" )
func ParseMode ¶
ParseMode normalizes user input into a Mode. It accepts the level names plus a few natural-language off synonyms ("off", "stop", "normal", "none", "disable"). The second return value is false when the input is not a recognized token.