What Are the Three Intensity Levels of Ponytail?

Ponytail operates at three distinct intensity levels—lite, full, and ultra—that control how aggressively the tool compacts code, removes boilerplate, and optimizes performance.

The three intensity levels of Ponytail determine the aggressiveness of its code transformation engine. Defined in the DietrichGebert/ponytail repository, these settings allow developers to balance between conservative cleanup and maximal optimization without modifying source files directly.

Overview of the Three Intensity Levels

Ponytail's intensity system is documented in README.md at line 307 and implemented across the command interface and runtime hooks. Each level maps to a specific subset of transformation rules in the rule engine.

Lite (Conservative Mode)

The lite intensity applies minimal edits, preserving most of the original code structure while targeting only obvious waste. This mode activates only "low-cost" heuristics, such as trivial dead-code removal, making it ideal for exploratory development where readability must remain intact.

Full (Default Mode)

Full is the standard intensity used when no flag is supplied to the /ponytail command. It applies the complete default rule set, balancing meaningful code reduction with maintained readability. According to the command table in the repository documentation, this is the recommended setting for daily development workflows.

Ultra (Aggressive Mode)

The ultra intensity enables the most aggressive transformations available in Ponytail. It activates deep refactoring capabilities—including deep object flattening and comprehensive dead-code elimination—to produce the smallest and fastest possible code. This setting prioritizes performance and size over transformation transparency.

How to Set Intensity Levels via Command Interface

You select the intensity by passing an argument to the /ponytail command. The implementation in .opencode/command/ponytail.md accepts lite, full, ultra, or off as valid parameters.

// Switch to lite intensity for conservative cleanup
await agent.runCommand('/ponytail lite');

// Use default full intensity (no argument required)
await agent.runCommand('/ponytail');

// Enable ultra mode for maximum reduction
await agent.runCommand('/ponytail ultra');

// Disable Ponytail for the current session
await agent.runCommand('/ponytail off');

In terminal environments that support host agents like Claude or Codex, use the slash commands directly:

/ponytail lite    # minimal edits

/ponytail         # default full intensity  

/ponytail ultra   # aggressive optimization

/ponytail off     # disable transformations

For Python integrations using the OpenCode API:

from opencode import Agent

agent = Agent()
agent.exec('/ponytail ultra')   # set aggressive mode

print(agent.exec('/ponytail'))  # query current intensity

Architectural Implementation

The three intensity levels are stored and enacted through specific components in the repository.

Configuration Persistence

When you set an intensity level, hooks/ponytail-config.js writes the value to ~/.config/ponytail/config.json. This runtime configuration persists across sessions and is consulted by the mode tracker to determine which transformation rules to apply.

Rule Engine Mapping

The file hooks/ponytail-mode-tracker.js maps each intensity level to its corresponding rule set:

  • lite → Low-cost heuristics only
  • full → Complete default rule set
  • ultra → Aggressive refactorings including deep object flattening

This architecture allows users to toggle optimization aggressiveness instantly without code changes, supporting both safe exploration and production-grade optimization.

Summary

  • Ponytail provides three intensity levels: lite, full (default), and ultra.
  • Lite mode preserves structure while removing obvious waste; full balances reduction with readability; ultra maximizes performance through aggressive refactoring.
  • Intensity is configured via the /ponytail command and stored in ~/.config/ponytail/config.json by hooks/ponytail-config.js.
  • The mode tracker in hooks/ponytail-mode-tracker.js applies rule sets based on the selected intensity.
  • Valid command arguments are lite, full, ultra, or off, as defined in .opencode/command/ponytail.md and documented in README.md.

Frequently Asked Questions

What is the default intensity level if I don't specify one?

If you run /ponytail without arguments, the tool defaults to full intensity. This setting applies the complete standard rule set without requiring explicit configuration, providing balanced optimization suitable for most development scenarios.

How do I completely disable Ponytail transformations?

Pass the off argument to the command: /ponytail off. This disables Ponytail for the current session by updating the runtime configuration, preventing any transformation rules from executing until you re-enable the tool with a specific intensity level.

Where does Ponytail store my selected intensity setting?

The chosen intensity is written to ~/.config/ponytail/config.json by the configuration handler in hooks/ponytail-config.js. This JSON file maintains the persistent state that the mode tracker references when determining which rule set to apply to your code.

Which intensity level should I use for production code optimization?

Use ultra intensity for production-grade optimization where minimal code size and maximum performance are critical. However, verify the output carefully, as this mode applies aggressive transformations—such as deep object flattening—that may require review to ensure they maintain intended application behavior.

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 →