Terse — Output Compression for Autonomous Loops
Purpose. Over a 20-round optimization loop, verbose prose summaries dominate emitted tokens even though a human is rarely reading intermediate rounds. Terse mode compresses the emit contract 40-60% without changing the loop, the decisions, or the logged state. Inspired by caveman's output-compression idea, restricted to what is safe for a structured, TSV-driven workflow.
Activate When
$GODMODE_TERSEis set (any non-empty value)/godmode:terse oninvoked (sets env var for the session)- Auto-enable after 5+ consecutive rounds with no human interaction (orchestrator decides based on session-state.json)
Deactivate: /godmode:terse off or unset the env var.
Auto-Activation
Long autonomous loops don't need verbose output — no human is reading intermediate rounds. After 5 consecutive rounds with no user interaction, terse mode auto-enables for the rest of the session.
- Trigger.
.godmode/session-state.jsontracksconsecutive_rounds_without_human. The orchestrator increments it at the end of each loop round (after DECIDE/LOG) and resets it to 0 on any user interaction (new prompt, slash command, explicit mode change). When the counter reaches 5, terse auto-enables for this and subsequent rounds. - Emit on activation. Print once:
Terse: AUTO ON (reason: 5+ autonomous rounds, session={session_id}). Do not re-print on every round thereafter. - Auto-deactivation. On the next explicit user prompt, reset
consecutive_rounds_without_humanto 0 and emit:Terse: AUTO OFF (user interaction). This reset happens regardless of whether terse was auto or manually enabled. - User opt-out is sticky. If the user ran
/godmode:terse offat any point this session, setterse_user_opted_out=truein session state. Auto-activation is disabled for the remainder of the session, even if the counter later crosses 5. - Interaction with manual mode. If
$GODMODE_TERSEis already set in the environment, terse is on regardless — auto-activation is a no-op. If/godmode:terse onwas invoked explicitly, the counter is irrelevant. Auto-activation only fires when neither manual switch is on AND no opt-out flag is set.
What Compresses
- Round summaries and status lines:
Round 7: kept change.→R7 keep - Agent reports: drop prose filler, keep field values
- Skill-level printed output: the
Godmode: ...lines - Intermediate "verify", "measure", "dispatching" progress prints
Pairs with rtk for compound savings. Terse compresses what godmode emits. The rtk Rust CLI compresses what godmode reads (tool output from git, ls, tests, etc.) by 60-90% before it enters model context. Installing both stacks both sides: input-side via rtk's shell hook, output-side via terse mode. Optional — terse works standalone and rtk is a separate binary.
What Stays Verbose (Never Compress)
- TSV rows — column count, delimiters, field meaning are contracts
- Code blocks — never touch syntax, never abbreviate identifiers
- Error messages and stack traces — full diagnostics always
- Commit messages — must remain git-log-readable and descriptive
- Final summary — the last line the user sees at session end
- Success criteria commands — shell commands stay literal
- Failure classifications —
scope_drift,noise,regression, etc. are exact strings that downstream rules depend on
Before / After Examples
Normal:
Round 7: Added connection pool sizing adjustment, verified with benchmark
(median of 3 runs), kept — metric improved from 276ms to 226ms (-18.2%).
Terse:
R7 keep: conn pool → 226ms (-18.2%)
Normal:
Builder Agent Report: Task implemented successfully. All 47 tests passing,
linter clean, no regressions in existing suite. 4 files modified, 2 files
created.
Terse:
Builder DONE: 47/47 tests, lint clean, 4 mod + 2 new.
Normal:
Godmode: stack=TypeScript, skill=optimize, phase=OPTIMIZE. Dispatching.
Terse:
GM: ts/opt/OPT dispatch.
Compression Rules
- Emit-only. Compress what you print. Never compress memory state, lessons.md, failures.tsv, session-state.json, or any file on disk.
- Structure preserved. Same field order, same field count, same
numbers.
(-18.2%)stays(-18.2%), not(~-18%). - Numeric precision unchanged. 198ms stays 198ms, never rounded.
- Code never touched. Diffs, snippets, and inline code are raw.
- Errors always full. A failing test's stack trace is emitted in full regardless of terse mode.
- Final summary always verbose. The last line of a session is the user's record — emit it in full prose.
Integration Contract
Every skill SHOULD branch its output template on terse mode. Pattern:
IF $GODMODE_TERSE:
print "R{round} {status}: {change} → {metric} ({delta}%)"
ELSE:
print "Round {round}: {change}. {status}. Metric: {metric} ({delta}%)."
Both templates carry identical information — terse is a strict 1:1 compression, not a lossy summary. This is verifiable: parsing either output MUST yield the same fields.
Hard Rules
- Terse is an output contract, not a behavior change. Loops, decisions, commits, reverts, and TSV writes are identical in both modes.
- Never drop a field. "Keep" status without metric is incomplete.
- Never compress user-facing errors. Silent truncation = lost evidence.
- Never compress the final summary at session end.
- TSV schemas are immutable. Terse mode does not touch column counts.
Success Criterion
Over a 10-round loop with GODMODE_TERSE=1, total emitted tokens decrease by at least 30% vs. baseline, AND:
- Same kept/discarded decisions
- Same TSV contents (byte-identical)
- Same commits (message content byte-identical)
- Same final summary (byte-identical)
Verify with:
# Run identical workflow twice
GODMODE_TERSE=0 /godmode:optimize 2>&1 | wc -c > baseline.bytes
git stash && git checkout HEAD~1 # reset state
GODMODE_TERSE=1 /godmode:optimize 2>&1 | wc -c > terse.bytes
echo "reduction: $(( 100 - 100 * $(cat terse.bytes) / $(cat baseline.bytes) ))%"
Target: ≥30% reduction. Accept ≥20% as success for short loops.
Stop Conditions
- target_reached: emitted-token reduction ≥30%
- contract_violated: any field dropped or TSV row malformed → disable terse mode for rest of session, log incident
- user_opts_out:
/godmode:terse offat any time
Output Format
On activation (terse itself):
Terse: ON (mode=auto|explicit, baseline_tokens={N}, target_reduction=30%)
On deactivation:
Terse: OFF. Emitted={N} tokens, reduction={N}%, contract_violations={N}.