Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 73 additions & 12 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"email": "admin@ai-architect.tools"
},
"metadata": {
"description": "Session optimizer: context-budget Stop guard, status line, and the refine gate (prompt → bound, research-backed execution contract).",
"version": "1.4.3"
"description": "Session optimizer, split into three independently installable plugins: context-guard (Stop-hook context budget + memory-writer checkpoint subagent + subagent spend tracker), refine-gate (UserPromptSubmit prompt-binding gate + /refine skill), and statusline (multi-line status bar + install skill).",
"version": "2.0.0"
},
"plugins": [
{
"name": "session-optimizer",
"source": "./",
"description": "Context-budget Stop guard + status line for long Claude Code sessions, plus the refine gate: a UserPromptSubmit hook and /refine skill that resolve vague prompt references (\"the X solution\", \"the heat variable\", \"like before\") to concrete artifacts with evidence, then select an execution strategy from a research-backed table (15 strategies verified against 2024-2026 literature, counter-evidence included: intrinsic self-correction degrades reasoning arXiv:2310.01798; CoT marginal on reasoning models; multi-agent failure taxonomy MAST). Acceptance criteria must be external signals - tests, measurements, sources - never the model re-checking itself.",
"version": "1.4.3",
"name": "context-guard",
"source": "./plugins/context-guard",
"description": "Context-budget guard: a Stop hook enforces a per-model checkpoint protocol — 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-then-clear. A SubagentStop tracker surfaces true session spend (main thread + subagents). Default protocol uses only vanilla Claude Code; a scoped memory layer is detected at runtime when installed.",
"version": "2.0.0",
"author": {
"name": "Clement Deust",
"email": "admin@ai-architect.tools"
Expand All @@ -26,15 +26,76 @@
"context-window",
"token-budget",
"checkpoint",
"statusline",
"stop-hook",
"subagent-cost",
"session-management"
],
"category": "productivity",
"runtime": [
"cli",
"cowork"
"category": "productivity"
},
{
"name": "refine-gate",
"source": "./plugins/refine-gate",
"description": "Prompt-binding gate: a UserPromptSubmit hook + /refine skill that resolve vague prompt references (\"the X solution\", \"like before\", \"still broken\") to concrete artifacts with evidence, then select an execution strategy from a research-backed table (15 strategies verified against 2024-2026 literature, counter-evidence included: intrinsic self-correction degrades reasoning arXiv:2310.01798; CoT marginal on reasoning models; multi-agent failure taxonomy MAST). Acceptance criteria must be external signals - tests, measurements, sources - never the model re-checking itself.",
"version": "2.0.0",
"author": {
"name": "Clement Deust",
"email": "admin@ai-architect.tools"
},
"homepage": "https://github.com/cdeust/session-optimizer",
"repository": "https://github.com/cdeust/session-optimizer",
"license": "MIT",
"keywords": [
"claude-code",
"prompt-engineering",
"refine",
"intent-binding",
"userpromptsubmit",
"execution-strategy"
],
"category": "productivity"
},
{
"name": "statusline",
"source": "./plugins/statusline",
"description": "Multi-line Claude Code statusline with RGB-gradient context bars tied to per-model checkpoint thresholds (shared with context-guard), monthly cost tracking, per-session telemetry, rate-limit gauges, and live subagent spend. Ships an install skill that copies the bundled assets into ~/.claude and wires settings.json.",
"version": "2.0.0",
"author": {
"name": "Clement Deust",
"email": "admin@ai-architect.tools"
},
"homepage": "https://github.com/cdeust/session-optimizer",
"repository": "https://github.com/cdeust/session-optimizer",
"license": "MIT",
"keywords": [
"statusline",
"status",
"context",
"git",
"cost",
"rate-limits",
"telemetry",
"ui"
],
"category": "productivity"
},
{
"name": "session-optimizer",
"source": "./",
"description": "DEPRECATED meta plugin (v2.0.0). session-optimizer split into three independently installable plugins: context-guard, refine-gate, and statusline. This shim registers no functional hooks — it only announces the migration at session start. Install the three plugins from this marketplace, then uninstall session-optimizer.",
"version": "2.0.0",
"author": {
"name": "Clement Deust",
"email": "admin@ai-architect.tools"
},
"homepage": "https://github.com/cdeust/session-optimizer",
"repository": "https://github.com/cdeust/session-optimizer",
"license": "MIT",
"keywords": [
"deprecated",
"meta",
"session-management"
],
"runtime_notes": "Hooks (Stop guard, refine gate) and the statusline run wherever Claude Code plugins run: CLI, desktop app, IDE extensions, and Cowork. The claude.ai chat / Claude Desktop chat surface has no hook mechanism - there, upload skills/refine/ as an Agent Skill (same SKILL.md format): the /refine procedure travels, the automatic per-prompt gate does not."
"category": "productivity"
}
]
}
16 changes: 5 additions & 11 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "session-optimizer",
"description": "Session optimizer for long Claude Code sessions: context-budget Stop guard + status line (per-model checkpoint protocol), and a refine gate — a UserPromptSubmit hook + /refine skill that bind vague prompt references to concrete artifacts and select a research-backed execution strategy before any code is touched.",
"version": "1.4.3",
"description": "DEPRECATED meta plugin (v2.0.0): session-optimizer split into three independently installable plugins — context-guard (Stop-hook context budget + memory-writer checkpoint subagent + subagent spend tracker), refine-gate (UserPromptSubmit prompt-binding gate + /refine skill), and statusline (multi-line status bar + install skill). This shim registers no functional hooks; it only announces the migration at session start. Install the three plugins from the same marketplace, then uninstall session-optimizer.",
"version": "2.0.0",
"author": {
"name": "Clement Deust",
"email": "admin@ai-architect.tools"
Expand All @@ -10,14 +10,8 @@
"repository": "https://github.com/cdeust/session-optimizer",
"license": "MIT",
"keywords": [
"claude-code",
"context-window",
"token-budget",
"checkpoint",
"statusline",
"session-management",
"prompt-engineering",
"refine",
"intent-binding"
"deprecated",
"meta",
"session-management"
]
}
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ jobs:
run: bash tests/statusline/test_heat_rgb.sh

- name: Shellcheck statusline script
run: shellcheck statusline-command.sh
run: shellcheck plugins/statusline/assets/statusline-command.sh

- name: Validate hook and plugin JSON
- name: Validate marketplace, plugin, and hook JSON
run: |
python -m json.tool .claude-plugin/marketplace.json > /dev/null
python -m json.tool .claude-plugin/plugin.json > /dev/null
python -m json.tool hooks/hooks.json > /dev/null
for plugin in context-guard refine-gate statusline; do
python -m json.tool "plugins/$plugin/.claude-plugin/plugin.json" > /dev/null
python -m json.tool "plugins/$plugin/hooks/hooks.json" > /dev/null
done
python -m json.tool plugins/statusline/assets/statusline-budget.json > /dev/null
python -m json.tool plugins/statusline/assets/ctxguard-thresholds.json > /dev/null
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __pycache__/
*.pyc
.DS_Store
.claude/
.pytest_cache/
Loading
Loading