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
2 changes: 1 addition & 1 deletion .claude/agents/anomaly-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are an anomaly detection and statistics specialist working on the **context-pulse** project.
You are an anomaly detection and statistics specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/code-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Glob, Grep, Bash
effort: high
---

You are a senior code reviewer working on the **context-pulse** project.
You are a senior code reviewer working on the **context-analyzer-tool** project.

## Your review criteria

Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/config-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a configuration and CLI design specialist working on the **context-pulse** project.
You are a configuration and CLI design specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand All @@ -20,12 +20,12 @@ You are a configuration and CLI design specialist working on the **context-pulse

## Key constraints for this project

- Config lives at `~/.context-pulse/config.toml`
- Config lives at `~/.context-analyzer-tool/config.toml`
- Config loaded ONCE at startup, passed as dependency — never re-read mid-request
- Must handle missing config gracefully (generate defaults on first run)
- Cross-platform path expansion (`~` on all platforms)
- Config sections: collector, anomaly, classifier, notifications, dashboard
- CLI entry point: `context-pulse` with subcommands (status, dashboard, anomalies, etc.)
- CLI entry point: `context-analyzer-tool` with subcommands (status, dashboard, anomalies, etc.)
- All config values have sensible defaults
- Config object should be a Pydantic model for validation

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/fastapi-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a FastAPI and async Python specialist working on the **context-pulse** project.
You are a FastAPI and async Python specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/hooks-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a Claude Code hooks integration specialist working on the **context-pulse** project.
You are a Claude Code hooks integration specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/llm-classifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are an LLM integration and prompt engineering specialist working on the **context-pulse** project.
You are an LLM integration and prompt engineering specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Glob, Grep, Bash, Agent, WebSearch, WebFetch
effort: max
---

You are a senior software architect and technical planner for the **context-pulse** project — a per-tool-call context window analyzer for Claude Code.
You are a senior software architect and technical planner for the **context-analyzer-tool** project — a per-tool-call context window analyzer for Claude Code.

## Your role

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/researcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a research specialist supporting the **context-pulse** project.
You are a research specialist supporting the **context-analyzer-tool** project.

## Your role

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/sqlite-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a SQLite database specialist working on the **context-pulse** project.
You are a SQLite database specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/tester.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash
effort: high
---

You are a testing specialist working on the **context-pulse** project.
You are a testing specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/tui-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a terminal UI specialist working on the **context-pulse** project.
You are a terminal UI specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand All @@ -18,7 +18,7 @@ You are a terminal UI specialist working on the **context-pulse** project.

## Key constraints for this project

- TUI is the default dashboard mode, launched with `context-pulse dashboard`
- TUI is the default dashboard mode, launched with `context-analyzer-tool dashboard`
- Must auto-refresh every 2s from SQLite data
- Panels needed:
- Current session: ctx%, burn rate, active tool, session timer
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/web-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: Read, Edit, Write, Glob, Grep, Bash, WebSearch, WebFetch
effort: high
---

You are a React web frontend specialist working on the **context-pulse** project.
You are a React web frontend specialist working on the **context-analyzer-tool** project.

## Your expertise

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ What actually happened.

- OS:
- Python version:
- context-pulse version:
- context-analyzer-tool version:
- Claude Code version:

## Logs / Error Output
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 0.3.0 (2026-04-07)

### Project Rename

- **Renamed from `context-pulse` to `context-analyzer-tool`** -- package, module, CLI entry point, and all internal references updated

### TUI Visual Overhaul

- **New color theme** -- vibrant `bright_*` color palette with centralized theme constants replacing scattered hardcoded styles
- **Distinct panel frames** -- each panel type has its own Rich box style: `HEAVY` header, `ROUNDED` sessions/anomalies, `DOUBLE` tasks
- **Alternating row highlights** -- zebra-striping on all tables for improved readability
- **Unicode panel icons** -- `⭐` header, `☰` sessions, `▒` tasks, `⚠` anomalies, `⚙` RTK
- **Header bar redesign** -- stats separated by `│` dividers with `⏱` `⚡` `▣` icons
- **Sleeping cat animation** -- 20-frame ASCII cat in the bottom-left "nap zone" with drifting z's, subtle ear twitches, and a brief wake-up frame
- **Double-bordered nap zone** -- outer `DOUBLE` frame with inner `ROUNDED` border confining the cat art
- **Faster refresh** -- default refresh rate increased from 2s to 1s for smoother animations

## 0.2.0 (2026-04-05)

### Smart Warnings & Cache Awareness
Expand All @@ -13,7 +30,7 @@
- **Compaction tracking** -- PreCompact/PostCompact hooks track compaction events with tokens saved
- **Compaction API endpoint** -- `/api/compactions` for querying compaction history
- **Burn rate API endpoint** -- `/api/sessions/{id}/burn-rate` for programmatic access
- **Uninstall command** -- `context-pulse uninstall` cleanly removes hooks from Claude Code
- **Uninstall command** -- `context-analyzer-tool uninstall` cleanly removes hooks from Claude Code

### Improvements

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ uv run ruff check src tests
### Project Structure

```
src/context_pulse/
src/context_analyzer_tool/
cli.py # Typer CLI entry point
config.py # TOML + env var configuration
collector/ # FastAPI HTTP server + delta engine
Expand Down Expand Up @@ -60,13 +60,13 @@ uv run pyright # Type checker (strict mode)

```bash
# Start the collector server
uv run context-pulse serve
uv run context-analyzer-tool serve

# In another terminal, view the dashboard
uv run context-pulse dashboard
uv run context-analyzer-tool dashboard

# Check health
uv run context-pulse health
uv run context-analyzer-tool health
```

## Submitting Changes
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ uv sync --extra classifier

```bash
# Install hooks into Claude Code (also writes default config)
context-pulse install
context-analyzer-tool install

# Start the collector (keep running in a terminal)
context-pulse serve
context-analyzer-tool serve

# Open the dashboard
context-pulse dashboard
context-analyzer-tool dashboard
```

That's it. Use Claude Code normally -- CAT tracks everything in the background.
Expand All @@ -68,22 +68,22 @@ That's it. Use Claude Code normally -- CAT tracks everything in the background.
## CLI Reference

```
context-pulse install Install hooks into Claude Code
context-pulse uninstall Remove hooks from Claude Code
context-pulse serve Start the collector server
context-pulse dashboard Launch the live TUI dashboard
context-pulse status View active sessions and recent tasks
context-pulse anomalies List recent anomalies with root causes
context-pulse context-cost Show context cost breakdown
context-pulse health Collector health check
context-pulse rtk-status Show RTK integration status and savings
context-pulse prune Clean up old data
context-pulse clear Clear all stored data and start fresh
context-analyzer-tool install Install hooks into Claude Code
context-analyzer-tool uninstall Remove hooks from Claude Code
context-analyzer-tool serve Start the collector server
context-analyzer-tool dashboard Launch the live TUI dashboard
context-analyzer-tool status View active sessions and recent tasks
context-analyzer-tool anomalies List recent anomalies with root causes
context-analyzer-tool context-cost Show context cost breakdown
context-analyzer-tool health Collector health check
context-analyzer-tool rtk-status Show RTK integration status and savings
context-analyzer-tool prune Clean up old data
context-analyzer-tool clear Clear all stored data and start fresh
```

## Configuration

Config lives at `~/.context-pulse/config.toml` (created automatically on first `install`). Every setting can be overridden with environment variables using the `CONTEXT_PULSE_` prefix.
Config lives at `~/.context-analyzer-tool/config.toml` (created automatically on first `install`). Every setting can be overridden with environment variables using the `CAT_` prefix.

```toml
[collector]
Expand All @@ -108,9 +108,9 @@ webhook_url = "" # Slack/Discord webhook

Environment variable overrides:
```bash
CONTEXT_PULSE_COLLECTOR_PORT=8080
CONTEXT_PULSE_ANOMALY_Z_SCORE_THRESHOLD=3.0
CONTEXT_PULSE_CLASSIFIER_ENABLED=false
CAT_COLLECTOR_PORT=8080
CAT_ANOMALY_Z_SCORE_THRESHOLD=3.0
CAT_CLASSIFIER_ENABLED=false
```

## How It Works
Expand Down
6 changes: 3 additions & 3 deletions docs/demo-cli.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading