diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 7102ac0..c5470b9 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -1,7 +1,7 @@ { "name": "session-optimizer-codex", "interface": { - "displayName": "Session Optimizer" + "displayName": "Session Optimizer — Refine Gate" }, "plugins": [ { diff --git a/.gitignore b/.gitignore index beaa8b8..e1333eb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ __pycache__/ .DS_Store .claude/ .pytest_cache/ +.coverage +coverage.xml +htmlcov/ diff --git a/README.md b/README.md index 92be6e6..7d7bb7d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # session-optimizer -

session-optimizer — a visible, enforced context budget for long Claude Code sessions

+

session-optimizer — cross-platform prompt refinement with Claude-native session controls

-Three small, dependency-light, **independently installable** plugins for -keeping long [Claude Code](https://code.claude.com) sessions **readable, -cheap, and un-poisoned** — shipped from one marketplace. Install exactly the -ones you want; none requires the others. +**Cross-platform prompt refinement for Codex, Gemini CLI, and Claude Code, +plus Claude-native context-budget and telemetry controls.** The portable +`refine-gate` skill binds vague requests to concrete evidence on all three +hosts. `context-guard` and `statusline` add lifecycle automation where Claude +Code exposes the required hooks, session files, and statusline metrics. -`refine-gate` is also packaged as a portable Agent Skill for Codex and Gemini -CLI. `context-guard` and `statusline` remain Claude-specific because their -behavior depends on Claude lifecycle hooks, session files, and statusline -metrics. +The repository ships three small, dependency-light, **independently +installable** packages. Install exactly the ones your host supports and you +need; none requires the others. ``` /plugin marketplace add cdeust/session-optimizer @@ -19,7 +19,7 @@ metrics. | Plugin | One-line install | What it does | |---|---|---| | [**context-guard**](plugins/context-guard) | `/plugin install context-guard@session-optimizer-marketplace` | A `Stop` hook enforces a per-model context budget: at the WARN threshold it writes a mechanical checkpoint stub and delegates persistence to a budgeted `memory-writer` subagent as a reflection pause; at the hard cap it forces checkpoint → `/clear` → resume. A `SubagentStop` tracker surfaces true session spend (main thread + subagents). | -| [**refine-gate**](plugins/refine-gate) | `/plugin install refine-gate@session-optimizer-marketplace` | A `UserPromptSubmit` hook + `/refine` skill that bind vague prompt references ("the SSE solution", "like before", "still broken") to concrete artifacts with evidence, then select an execution strategy from a research-backed table — before any code is touched. | +| [**refine-gate**](plugins/refine-gate) | Claude: `/plugin install refine-gate@session-optimizer-marketplace`; Codex/Gemini: [portable install](plugins/refine-gate/README.md) | A portable skill that binds vague prompt references ("the SSE solution", "like before", "still broken") to concrete artifacts with evidence, then selects an execution strategy from a research-backed table before any code is touched. Claude Code additionally receives an automatic `UserPromptSubmit` hook. | | [**statusline**](plugins/statusline) | `/plugin install statusline@session-optimizer-marketplace` | A multi-line status bar: discrete heat-track context bar tied to per-model checkpoint thresholds, one deduplicated cost ledger covering subagent spend, telemetry (tok/s, compactions, cache countdown), rate-limit gauges with burn-rate pacing, and terminal-width fitting. Ships an install skill — after installing, ask Claude to "install the statusline" and it wires everything. | For Codex and Gemini installation commands, see the diff --git a/plugins/refine-gate/.codex-plugin/plugin.json b/plugins/refine-gate/.codex-plugin/plugin.json index 66e1745..9ee6b15 100644 --- a/plugins/refine-gate/.codex-plugin/plugin.json +++ b/plugins/refine-gate/.codex-plugin/plugin.json @@ -11,6 +11,9 @@ "repository": "https://github.com/cdeust/session-optimizer", "license": "MIT", "keywords": [ + "agent-skills", + "codex", + "gemini-cli", "prompt-engineering", "intent-binding", "evidence",