Understanding Wenyan Intensity Levels in Caveman

Wenyan intensity levels in Caveman are three specialized compression modes—wenyan-lite, wenyan-full, and wenyan-ultra—that progressively transform technical explanations into Classical Chinese (文言文) while preserving precise meaning, achieving up to 80-90% character reduction at the highest tier.

The Caveman project (JuliusBrussee/caveman) introduces these specialized wenyan intensity levels as an alternative to standard English compression. Unlike conventional caveman modes that simplify verbiage, the wenyan tiers translate technical concepts into classical literary Chinese, offering developers maximal information density through traditional grammar and vocabulary.

What Are Wenyan Intensity Levels?

The wenyan intensity levels are defined in skills/caveman/SKILL.md as distinct compression tiers that render technical documentation in Classical Chinese. Each level balances brevity against readability, using specific grammatical patterns and classical particles to condense explanations.

Wenyan-Lite (Semi-Classical)

wenyan-lite removes filler words and hedging language while maintaining full grammatical structure. This level preserves a classical register but keeps sentences accessible, functioning as a bridge between modern technical writing and traditional Chinese prose.

Wenyan-Full (Maximal Classical Terseness)

wenyan-full achieves 80-90% character reduction by employing fully classical sentence patterns. This mode places verbs before objects, omits subjects where contextually appropriate, and utilizes classical particles such as 之, 乃, 為, and 其 to create technically precise yet highly compressed statements.

Wenyan-Ultra (Extreme Abbreviation)

wenyan-ultra represents the highest compression tier, producing ultra-terse sentences that retain only the essential Classical Chinese feel. This level maximizes information density while maintaining the semantic core of technical explanations.

How Wenyan Intensity Levels Are Implemented

According to the Caveman source code, wenyan modes integrate seamlessly with the standard intensity system. The skills/caveman/SKILL.md file defines these levels alongside concrete examples, such as a "Why React component re-render?" explanation transformed across all three classical tiers.

Internally, the mode tracker in src/hooks/caveman-mode-tracker.js persists the active setting in a .caveman-active flag file located in the user's home directory. This component treats wenyan-lite, wenyan-full, and wenyan-ultra identically to standard caveman modes, reading and writing these strings to maintain state across sessions. The validation logic in src/hooks/caveman-config.js enumerates all valid mode strings, ensuring the wenyan levels receive proper autocomplete support and input validation.

The unit tests in tests/test_mode_tracker.py verify this persistence mechanism, specifically validating that the system correctly stores and retrieves wenyan-ultra settings in the flag file.

Activating Wenyan Modes

You can activate wenyan intensity levels through the command line, JavaScript API, or direct file manipulation.

Shell Activation

Use the CLI to switch between classical compression tiers:

caveman wenyan-lite   # Switches to semi-classical compression

caveman wenyan-full   # Switches to full Classical Chinese compression

caveman wenyan-ultra  # Switches to the most aggressive Classical compression

JavaScript API

Programmatically set the mode using the Caveman API:

import { setCavemanMode } from '@caveman/api';

await setCavemanMode('wenyan-full');   // Enable full wenyan mode

Direct Flag Manipulation

For testing or custom implementations, write directly to the flag file:

from pathlib import Path

flag_path = Path.home() / ".caveman-active"
flag_path.write_text("wenyan-ultra")   # Persist ultra wenyan mode

Summary

  • Wenyan intensity levels compress technical text into Classical Chinese through three tiers: wenyan-lite, wenyan-full, and wenyan-ultra.
  • These modes achieve 80-90% character reduction by utilizing classical particles (之, 乃, 為, 其) and traditional sentence patterns.
  • Configuration resides in skills/caveman/SKILL.md with runtime implementation across src/hooks/caveman-mode-tracker.js and src/hooks/caveman-config.js.
  • Activation persists via the .caveman-active flag file and supports CLI, JavaScript API, and direct file manipulation, as verified by tests/test_mode_tracker.py.

Frequently Asked Questions

How do wenyan intensity levels differ from standard Caveman modes?

Standard Caveman modes (lite, full, ultra) simplify English text by removing filler words, while wenyan levels specifically translate concepts into Classical Chinese grammar and vocabulary. This provides greater cultural and linguistic compression for Chinese-speaking technical audiences while maintaining precise semantic meaning.

Can I switch between wenyan levels dynamically without restarting my environment?

Yes. The mode tracker in src/hooks/caveman-mode-tracker.js updates the .caveman-active flag immediately when you invoke setCavemanMode() or use the CLI commands. This allows real-time switching between wenyan-lite, wenyan-full, and wenyan-ultra during active development sessions.

What is the performance impact of using wenyan compression?

Wenyan levels perform identically to standard modes because they utilize the same underlying flag system. The transformation logic defined in skills/caveman/SKILL.md executes at the rendering layer with no additional I/O overhead beyond the standard mode check performed by the tracker.

Which wenyan level should I use for technical documentation?

Use wenyan-lite for readable explanations that retain classical flavor, wenyan-full for concise technical specifications requiring 80-90% compression, and wenyan-ultra only when extreme brevity is prioritized over readability, such as for inline code comments or commit message summaries.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →