agentleFS
xsovad06xsovad06/sova/CLAUDE.md

sova

CLAUDE.md2 starsChanged 3 months agoApache-2.0View on GitHub

This file provides Claude Code-specific commands and behaviors. Architecture, conventions, and cross-cutting rules are in AGENTS.md and .claude/rules/*.md -- this file contains only run commands, knowledge system config, and Claude-specific preferences. Ticket workflow (branch naming, PR linking, etc.) is in AGENTS.md under "Development Workflow". SOVA uses database-backed configuration (.claude/sova.db) instead of sova.toml. The migration is automatic: - First run: sova install /path/to/project creates the database - Read: sova config prints the current values - Edit: sova config set <key> <value>,…

  • Installs packages

The file

We split this CLAUDE.md into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer sova config set, which writes valid JSON for you

    line 62
  2. Distinctive:

    If you see "Skipping setting 'X': invalid JSON value" when running commands:

    line 67
  3. Very specific:

    When Python upgrades (e.g., 3.13 → 3.14), reinstall SOVA:

    line 85
  4. Very specific:

    If you installed RTK after running sova install, add the hook manually to .claude/settings.json:

    line 109
  5. Distinctive:

    Run Claude Code through Headroom without a separate process to manage:

    line 159
  6. Distinctive:

    Start a local compressing proxy:

    line 167
  7. Very specific:

    Confirmed patterns: Add to .claude/rules/*.md (Tier 1)

    line 202
  8. Very specific:

    New findings (not yet confirmed): Add to .claude/agent-memory/ (Tier 2)

    line 203
  9. Distinctive:

    Do NOT include "Generated with Claude Code" in PR descriptions

    line 209
  10. Very specific:

    Always run shellcheck on changed bash scripts before creating commits

    line 210
  11. Distinctive:

    NEVER use emojis in any output

    line 211

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

@AGENTS.md

CLAUDE.md

This file provides Claude Code-specific commands and behaviors. Architecture, conventions, and cross-cutting rules are in AGENTS.md and .claude/rules/*.md -- this file contains only run commands, knowledge system config, and Claude-specific preferences.

Running the Project

# SOVA CLI (globally installed via: pip install --user --break-system-packages -e .)
sova --help                         # Show all commands
sova install /path/to/project       # Install SOVA into a project
sova setup /path/to/project         # Run setup wizard
sova uninstall /path/to/project     # Remove SOVA from a project
sova run 42                         # Work on issue #42
sova triage 42                      # Triage a single issue
sova briefing                       # Show awareness briefing
sova dashboard --project /path      # Start web UI at http://localhost:8111

# Server management (dashboard + scheduler daemon)
sova server start                   # Start the server
sova server restart                 # Restart the server
sova server stop                    # Stop the server
sova server status                  # Check if server is running
sova server digest --hours 24       # Show activity summary
sova server install-service --type systemd  # Install as system service

# Dashboard (shortcut)
make serve                          # Start web UI at http://localhost:8111

# Development
make check                          # Run all linters + tests (CI-equivalent)
make test                           # Run bash + python tests
make lint                           # ShellCheck + Ruff
make format                         # Auto-format Python code
make marketplace                    # Regenerate plugins/sova/ from commands/ (run after editing a published command)
make commands-render                # Regenerate .claude/commands/ from commands/ (run after editing a managed command)

# Git hooks (after fresh clone)
git config core.hooksPath .githooks

Starting a Session

# Verify you are authenticated as the correct GitHub user
gh auth status

Ticket workflow (branch naming, PR linking, etc.) is in AGENTS.md under "Development Workflow".

Configuration

SOVA uses database-backed configuration (.claude/sova.db) instead of sova.toml. The migration is automatic:

  • First run: sova install /path/to/project creates the database
  • Read: sova config prints the current values
  • Edit: sova config set <key> <value>, or the dashboard settings page. Both go through the same validation, so neither can persist a value that makes load_config() raise. List-valued keys accept a JSON array or comma-separated text: sova config set awareness.providers "gmail, gcal"
  • Last resort: sqlite3 .claude/sova.db (all values stored as JSON; see troubleshooting below). Prefer sova config set, which writes valid JSON for you
  • Environment overrides: SOVA_GITHUB_REPO=owner/repo (prefix with SOVA_, replace dots with underscores: SOVA_AGENT_MODEL)

Troubleshooting Config Load Errors

If you see "Skipping setting 'X': invalid JSON value" when running commands:

  1. Check the value: sqlite3 .claude/sova.db "SELECT key, value FROM project_settings WHERE key='X';"
  2. All values must be valid JSON:
    • Strings: "value" (with quotes)
    • Numbers: 123 or 1.5 (no quotes)
    • Arrays: ["item1","item2"]
    • Booleans: true or false (no quotes)
  3. Fix non-JSON values (sova config set is config-tolerant, so it still works when the config no longer loads):
    sova config set agent.model your-string-value
    Or edit the row directly:
    sqlite3 .claude/sova.db "UPDATE project_settings SET value = '\"your-string-value\"' WHERE key = 'agent.model';"

When Python upgrades (e.g., 3.13 → 3.14), reinstall SOVA:

python3 -m pip install --user --break-system-packages -e .

For an unknown llm.provider value (e.g. after a typo or downgrade), see "Setting an Unknown LLM Provider" in docs/troubleshooting-config.md.

RTK Token Compression (Optional)

SOVA supports RTK (Rust Token Killer) for reducing token consumption by 60-90% on bash command outputs. When RTK is installed, sova install automatically configures it.

Installation

# Install RTK via Homebrew (macOS/Linux)
brew install rtk

# Verify installation
rtk --version

Manual Setup

If you installed RTK after running sova install, add the hook manually to .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "type": "command",
        "command": "rtk hook claude"
      }
    ]
  }
}

Important: The command must be "rtk hook claude", not just "rtk". The bare rtk command prints help and blocks tool calls.

Configuration

RTK is enabled by default. Disable hook injection during sova install with:

sova config set rtk.enabled false

Verification

# Check if RTK is available
sova doctor

# View RTK savings after a few sessions
rtk gain

Headroom Token Compression (Optional)

Headroom is a broader context-compression tool (JSON, code, logs, prose) than RTK, and is separate from the in-process Headroom compression wired into sova/llm/ for LLM invocations; see epic #894 for that integration. This section covers the standalone CLI for local use: SOVA's in-process path installs the compression extra declared in pyproject.toml (headroom-ai>=0.3.0), while local wrap/proxy usage below installs the full headroom-ai[all] bundle instead.

Headroom Installation

pip install "headroom-ai[all]"

# Verify installation
headroom --version

Wrap Mode

Run Claude Code through Headroom without a separate process to manage:

headroom wrap claude

Proxy Mode

Start a local compressing proxy:

headroom proxy --port 8787

Starting the proxy alone does not route traffic: point Claude Code at it by setting ANTHROPIC_BASE_URL=http://localhost:8787 in the shell that runs claude.

Headroom Verification

# View durable compression savings (tokens, cost, per-model breakdown)
headroom savings

Headroom is optional and licensed under Apache 2.0. sova doctor does not check for it, and installing it is not required for SOVA to function.

Knowledge System (4-Tier)

Tier 1: Project Rules (always loaded, no truncation)

  • CLAUDE.md -- This file (Claude Code-specific)
  • AGENTS.md -- Cross-cutting conventions for all AI tools
  • .claude/rules/*.md -- Modular knowledge files:
    • architecture.md -- Project structure, key paths, design decisions
    • bash-patterns.md -- Shell scripting conventions and gotchas
  • .claude/commands/*.md -- Workflow commands (on-demand, loaded via /command)

Tier 2: Agent Memory (persists across tasks, gitignored)

  • .claude/agent-memory/MEMORY.md -- Index file
  • .claude/agent-memory/cookbook.md -- Topical knowledge by domain, common mistakes with occurrence counts

Tier 3: Session Memory (auto-managed by Claude Code)

  • ~/.claude/projects/.../memory/MEMORY.md -- User preferences, project state (200-line limit)

Adding new knowledge

  • Confirmed patterns: Add to .claude/rules/*.md (Tier 1)
  • New findings (not yet confirmed): Add to .claude/agent-memory/ (Tier 2)
  • Session state / preferences: Auto-memory (Tier 3)
  • Promote: Tier 2 → Tier 1 when confirmed in 2+ tasks

Claude Code Behavioral Preferences

  • Do NOT include "Generated with Claude Code" in PR descriptions
  • Always run shellcheck on changed bash scripts before creating commits
  • NEVER use emojis in any output

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.