Problem
squeez is used inside an agent session, but every knob that controls how aggressive it is can only be changed outside that session, by hand-editing ~/.claude/squeez/config.ini ($SQUEEZ_DIR/config.ini).
There are ~60 tunables in Config (src/config.rs) — find_max_results, max_lines, summarize_threshold_lines, ultra_trigger_pct, adaptive_intensity, persona, lang, sig_mode_*, the nudge thresholds, etc. — and today the only way to touch any of them is:
- leave the conversation,
- open
~/.claude/squeez/config.ini in an editor,
- find/guess the right key name,
- save,
- come back.
This is backwards. If squeez feels too aggressive mid-task (e.g. it just collapsed an ls listing, or the persona is too terse), the user should be able to dial it down without leaving the console or the conversation.
Current state confirmed in code:
- No config-mutation CLI.
src/main.rs dispatches wrap/filter/track/init/compress-md/compress-prompt/setup/uninstall/update/benchmark/track-result/compress-output/mcp/calibrate/budget-params/protocol — there is no config get / config set / config list. (compact is a stub.)
- MCP server is read-only. All 14 tools (
src/commands/mcp_server.rs) read session state; none can write config.
- No slash command / skill ships today. No
.claude/commands/ assets in the repo; squeez setup installs hooks only.
- Config is a flat
key=value ini, parsed by Config::from_str (src/config.rs:198), loaded fresh on every invocation via Config::load() (src/config.rs:361).
Goal
Run /squeez from inside Claude Code (and the other supported hosts) to inspect and change squeez's behaviour in natural language:
- "squeez is too aggressive" → relax the compression budgets.
- "switch the persona to lite" / "turn the persona off" → set
persona.
- "bump find_max_results to 200" → set a specific key.
- "show the current config" → list current values vs defaults.
- "reset everything to defaults" → reset.
No editor, no leaving the conversation.
Why this needs two layers
A Claude Code slash command is just a prompt file — it has no way to safely mutate config.ini on its own (sed-editing an ini from a prompt is fragile and would silently corrupt the file). So the feature is two parts:
Layer 1 — squeez config CLI (the enabler)
Add a config subcommand that is the single safe path to read/write config.ini:
squeez config list # all keys: current value, default, source (default|file)
squeez config get <key> # one value
squeez config set <key> <value> # validate + write, preserving comments/unknown lines
squeez config reset [<key>] # remove key (revert to default) or reset all
squeez config path # print the resolved config.ini path
Requirements:
- Validation reuses the existing schema.
set must reject unknown keys and type-invalid values (bool/usize/f32/enum) instead of writing garbage — leverage the same match arms Config::from_str already has, so the source of truth stays single.
- Non-destructive writes. Preserve comments, blank lines, key order, and any keys the binary doesn't recognise. Create the file (and parent dir) if missing.
- Machine-readable output (
--json) so the skill can parse current state reliably.
- Zero-dependency constraint stays. No TOML/serde crate — extend the existing hand-rolled ini handling (
Cargo.toml is stdlib + libc only).
Layer 2 — /squeez skill
A /squeez command (markdown prompt) that squeez setup installs into each host's command dir where supported (.claude/commands/squeez.md for Claude Code; equivalent for Copilot/OpenCode/Gemini/Codex). The skill:
- runs
squeez config list --json to read current state,
- maps the user's natural-language intent to concrete key changes,
- applies them with
squeez config set ...,
- confirms what changed (old → new).
Effect-timing nuance (must be documented in the skill)
- Compression knobs are live immediately.
wrap calls Config::load() fresh per command, so find_max_results, max_lines, adaptive_intensity, thresholds, etc. take effect on the next bash command — no restart needed.
persona / lang are injected at SessionStart by init.rs into the CLAUDE.md <!-- squeez:start --> block. Changing them via config set updates the file, but the already-loaded session prompt won't change until the block is re-injected. The skill should re-run squeez init to rewrite the block and tell the user the persona change fully lands on the next session / /compact.
UX proposals (nice-to-have on top of raw get/set)
- Presets / levels that bundle several knobs: e.g.
squeez config preset gentle|balanced|aggressive mapping to sensible find_max_results / max_lines / ultra_trigger_pct / grouping bundles. "too aggressive" → gentle.
- Quick toggles:
enabled, persona off, adaptive_intensity on/off.
- Diff view:
config list highlights values that differ from defaults, so the user sees what they've changed.
Scope / constraints
- Zero runtime dependencies (extend the existing ini parser; don't pull in a config crate).
- Multi-host:
setup should install the command for each detected host that supports user-defined slash commands; degrade gracefully where a host has no equivalent.
- Validation errors must be human-readable (the skill surfaces them back to the user).
Acceptance criteria
Problem
squeez is used inside an agent session, but every knob that controls how aggressive it is can only be changed outside that session, by hand-editing
~/.claude/squeez/config.ini($SQUEEZ_DIR/config.ini).There are ~60 tunables in
Config(src/config.rs) —find_max_results,max_lines,summarize_threshold_lines,ultra_trigger_pct,adaptive_intensity,persona,lang,sig_mode_*, the nudge thresholds, etc. — and today the only way to touch any of them is:~/.claude/squeez/config.iniin an editor,This is backwards. If squeez feels too aggressive mid-task (e.g. it just collapsed an
lslisting, or the persona is too terse), the user should be able to dial it down without leaving the console or the conversation.Current state confirmed in code:
src/main.rsdispatcheswrap/filter/track/init/compress-md/compress-prompt/setup/uninstall/update/benchmark/track-result/compress-output/mcp/calibrate/budget-params/protocol— there is noconfig get/config set/config list. (compactis a stub.)src/commands/mcp_server.rs) read session state; none can write config..claude/commands/assets in the repo;squeez setupinstalls hooks only.key=valueini, parsed byConfig::from_str(src/config.rs:198), loaded fresh on every invocation viaConfig::load()(src/config.rs:361).Goal
Run
/squeezfrom inside Claude Code (and the other supported hosts) to inspect and change squeez's behaviour in natural language:persona.No editor, no leaving the conversation.
Why this needs two layers
A Claude Code slash command is just a prompt file — it has no way to safely mutate
config.inion its own (sed-editing an ini from a prompt is fragile and would silently corrupt the file). So the feature is two parts:Layer 1 —
squeez configCLI (the enabler)Add a
configsubcommand that is the single safe path to read/writeconfig.ini:Requirements:
setmust reject unknown keys and type-invalid values (bool/usize/f32/enum) instead of writing garbage — leverage the same match armsConfig::from_stralready has, so the source of truth stays single.--json) so the skill can parse current state reliably.Cargo.tomlis stdlib +libconly).Layer 2 —
/squeezskillA
/squeezcommand (markdown prompt) thatsqueez setupinstalls into each host's command dir where supported (.claude/commands/squeez.mdfor Claude Code; equivalent for Copilot/OpenCode/Gemini/Codex). The skill:squeez config list --jsonto read current state,squeez config set ...,Effect-timing nuance (must be documented in the skill)
wrapcallsConfig::load()fresh per command, sofind_max_results,max_lines,adaptive_intensity, thresholds, etc. take effect on the next bash command — no restart needed.persona/langare injected at SessionStart byinit.rsinto the CLAUDE.md<!-- squeez:start -->block. Changing them viaconfig setupdates the file, but the already-loaded session prompt won't change until the block is re-injected. The skill should re-runsqueez initto rewrite the block and tell the user the persona change fully lands on the next session //compact.UX proposals (nice-to-have on top of raw get/set)
squeez config preset gentle|balanced|aggressivemapping to sensiblefind_max_results/max_lines/ultra_trigger_pct/ grouping bundles. "too aggressive" →gentle.enabled,persona off,adaptive_intensityon/off.config listhighlights values that differ from defaults, so the user sees what they've changed.Scope / constraints
setupshould install the command for each detected host that supports user-defined slash commands; degrade gracefully where a host has no equivalent.Acceptance criteria
squeez config get/set/list/reset/pathimplemented, with--json, key+type validation, and comment-preserving writes.squeez config set persona lite && squeez config get personaround-trips; an invalid key/value exits non-zero with a clear message.find_max_results) takes effect on the nextsqueez wrapwith no restart./squeezskill installed bysqueez setupfor Claude Code (and other hosts where supported), driving the above in natural language.tests/.