### Install Cozempic Plugin from Marketplace Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/README.md Install the Cozempic plugin from the Claude Code marketplace once it is published. ```bash claude plugin install cozempic ``` -------------------------------- ### Install Cozempic with pipx Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Install Cozempic using pipx for an isolated user installation that is always available on the PATH. ```bash pipx install cozempic ``` -------------------------------- ### Install Cozempic with Nix flake Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Install Cozempic using a Nix flake for reproducible environments. ```bash nix profile install github:Ruya-AI/cozempic?dir=packaging/nix ``` -------------------------------- ### Install Cozempic with Homebrew Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Install Cozempic on macOS or Linux using the Homebrew package manager. ```bash brew install Ruya-AI/cozempic/cozempic ``` -------------------------------- ### Install Cozempic Plugin for Development Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/README.md Install the Cozempic plugin for local development and testing by specifying the plugin directory. ```bash claude --plugin-dir ./plugin ``` -------------------------------- ### Quick Start: Show All Strategies and Prescriptions Source: https://github.com/ruya-ai/cozempic/blob/main/README.md View a comprehensive list of all available Cozempic strategies and their associated prescriptions. ```bash cozempic formulary ``` -------------------------------- ### Quick Start: Apply Standard Prescription with Backup Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Apply the standard Cozempic prescription to the current session, creating a backup before execution. ```bash cozempic treat current --execute ``` -------------------------------- ### Run Cozempic with uvx Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Execute Cozempic commands on demand using uvx without a formal installation. ```bash uvx cozempic --help ``` -------------------------------- ### Start Cozempic Guard Daemon Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/guard/SKILL.md Run the cozempic guard daemon for continuous session protection. This command starts the guard in the background with a 50MB threshold and a 30-second interval, applying gentle pruning at 60% and full pruning with reload at the threshold. ```bash cozempic guard --daemon --threshold 50 -rx standard --interval 30 ``` -------------------------------- ### Start Cozempic Guard Daemon Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Initiate the Cozempic guard process, which can also be started automatically via hooks. Use the `--daemon` flag to run it in the background. ```bash cozempic guard [--daemon] Start guard (auto-starts via hook) ``` -------------------------------- ### Install Cozempic Python Package Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/README.md Install the Cozempic Python package using pip. This is a prerequisite for using the plugin. ```bash pip install cozempic ``` -------------------------------- ### Quick Start: View Behavioral Digest Rules Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Display the currently configured behavioral digest rules used by Cozempic. ```bash cozempic digest show ``` -------------------------------- ### Cozempic Example Output Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Illustrates the typical output format after running a Cozempic prescription, showing space and message savings. ```text Prescription: aggressive Before: 158.2K tokens (29.56MB, 6602 messages) After: 121.5K tokens (23.09MB, 5073 messages) Freed: 36.7K tokens (23.2%) — 6.47MB, 1529 removed, 4038 modified Context: [============--------] 61% Strategy Results: compact-summary-collapse 8.17MB saved (85.2%) (4201 removed) progress-collapse 1.63MB saved (5.5%) (1525 removed) metadata-strip 693.9KB saved (2.3%) (2735 modified) tool-use-result-strip 1.44MB saved (4.9%) (891 modified) thinking-blocks 1.11MB saved (3.8%) (1127 modified) tool-output-trim 1.72MB saved (5.8%) (167 modified) ... ``` -------------------------------- ### Quick Start: Aggressive Prescription on Specific Session Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Apply an aggressive Cozempic prescription to a specific session ID after creating a backup. ```bash cozempic treat -rx aggressive --execute ``` -------------------------------- ### Run Cozempic Guard Daemon Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Starts the Cozempic guard daemon. It auto-starts via the SessionStart hook after cozempic init, or can be run manually. ```bash # Auto-starts via SessionStart hook after cozempic init # Or run manually: cozempic guard --daemon ``` -------------------------------- ### Update Cozempic to Latest Version Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Upgrade your Cozempic installation to the latest version available on PyPI. ```bash cozempic self-update Upgrade to latest version from PyPI ``` -------------------------------- ### Add Cozempic as a Claude Code Plugin Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Install Cozempic as a plugin within the Claude Code environment. ```bash /plugin marketplace add Ruya-AI/cozempic /plugin install cozempic ``` -------------------------------- ### Quick Start: Dry-run Standard Prescription Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Perform a dry run of the standard Cozempic prescription on the current session without making changes. ```bash cozempic treat current ``` -------------------------------- ### Exact Reflection Generation Prompt Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md This prompt is used to generate reflections by guiding the model to analyze past failures, devise new strategies, and specify corrective actions. It emphasizes strategic thinking over environmental summarization and grounds reflections in executable steps for future use. ```text You will be given the history of a past experience in which you were placed in an environment and given a task to complete. You were unsuccessful in completing the task. Do not summarize your environment, but rather think about the strategy and path you took to attempt to complete the task. Devise a concise, new plan of action that accounts for your mistake with reference to specific actions that you should have taken. For example, if you tried A and B but forgot C, then devise a plan to achieve C with environment-specific actions. You will need this later when you are solving the same task. Give your plan after "Plan". ``` -------------------------------- ### Local Nix Flake Usage Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Commands to run or install Cozempic locally using Nix flakes. This allows for easy testing and integration within a Nix environment. ```bash nix run github:Ruya-AI/cozempic?dir=packaging/nix -- --help # or nix profile install github:Ruya-AI/cozempic?dir=packaging/nix ``` -------------------------------- ### Diagnose Cozempic Issues Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Use the `doctor` command to diagnose potential issues within your Cozempic setup. Add the `--fix` flag to attempt automatic resolution of detected problems. ```bash cozempic doctor # Diagnose issues ``` ```bash cozempic doctor --fix # Auto-fix where possible ``` -------------------------------- ### LLM Extraction Prompt for Behavioral Rules Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md This prompt guides an LLM to verify and extract behavioral rules from user corrections within a conversational context. It uses a 'verify and suggest alternatives' framing to reduce false positives and requires specific outputs for persistence, violated behavior, desired behavior, signal, trigger, rule, priority, scope, confidence, and evidence. ```prompt You are verifying whether a user correction in this conversation warrants a persistent behavioral rule. CONTEXT (3 turns before the correction): [context] FLAGGED TURN (classified as: EXPLICIT_CORRECTION / IMPLICIT_CORRECTION / PREFERENCE): [turn text] Step 1 — Verify persistence: Would this apply to other similar situations in this project? - Yes → proceed to extraction - No (task-specific only) → output {"persist": false} - Already in CLAUDE.md or project files → output {"persist": false} Step 2 — Extract (if persistent): - VIOLATED_BEHAVIOR: What the assistant did that was wrong (one sentence, specific) - DESIRED_BEHAVIOR: What the user wants instead (one sentence, specific) - SIGNAL: Why the assistant likely made this error — what signal did it misread? (one sentence, specific) - TRIGGER: Under what conditions does this apply? (specific situation, not "always") - RULE: "Do not [X]" or "When [trigger], always [Y]" (one sentence, prohibition framing) - PRIORITY: "hard" (user expressed as zero-tolerance) or "soft" (preference, context-dependent) - SCOPE: git | file-ops | testing | communication | architecture | general - CONFIDENCE: 0.0-1.0 (1.0 = explicit unambiguous correction, 0.3 = implicit/inferred) - EVIDENCE: Direct quote from the conversation supporting this extraction Output as JSON object. ``` -------------------------------- ### Correction Classification Prompt Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md A 5-shot prompt to classify user turns into categories like EXPLICIT_CORRECTION, IMPLICIT_CORRECTION, PREFERENCE, CLARIFICATION, ONE_OFF, or NONE. It defines each category and provides examples. ```prompt Classify this user turn in the conversation. Choose one: EXPLICIT_CORRECTION | IMPLICIT_CORRECTION | PREFERENCE | CLARIFICATION | ONE_OFF | NONE Rules: - EXPLICIT_CORRECTION: User directly says agent was wrong, or provides replacement output - IMPLICIT_CORRECTION: User rephrases with added constraints / completes task themselves - PREFERENCE: Proactive style/format/approach declaration, no prior agent failure implied - CLARIFICATION: Resolves current task ambiguity; agent asked or user volunteered context - ONE_OFF: "For this response", "just this time", "in this case" → task-scoped only - NONE: Normal turn, no feedback signal Examples: [A] "Don't use bullet points. I always want prose." → EXPLICIT_CORRECTION [B] "What I mean is, I need it in markdown" → CLARIFICATION (answering agent question) [C] "By the way, I prefer code examples over explanations" → PREFERENCE [D] "For this one, use British spelling" → ONE_OFF [E] User rephrases "summarize this" as "briefly summarize this in 2 sentences" → IMPLICIT_CORRECTION Turn to classify: "[TURN]" Classification: Reasoning (one sentence): Persistence: session | persistent ``` -------------------------------- ### Run Claude Code Health Checks Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/doctor/SKILL.md Execute the `cozempic doctor` command to perform a comprehensive health check of your Claude Code setup. This command identifies common issues that may affect functionality. ```bash cozempic doctor ``` -------------------------------- ### Initialize Cozempic Project Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Wire hooks and slash commands into your project using the `init` command. This is a foundational step for integrating Cozempic. ```bash cozempic init Wire hooks + slash command into project ``` -------------------------------- ### Upstream PR to Nixpkgs Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Instructions for submitting Cozempic to the main Nixpkgs repository. This involves copying the `default.nix` file, creating a new branch, building for sanity check, committing, and creating a pull request. ```bash git clone https://github.com/NixOS/nixpkgs ~/nixpkgs mkdir -p ~/nixpkgs/pkgs/by-name/co/cozempic cp packaging/nix/default.nix ~/nixpkgs/pkgs/by-name/co/cozempic/package.nix cd ~/nixpkgs && git checkout -b cozempic-init # by-name auto-registers; no all-packages.nix edit needed. nix-build -A cozempic # sanity check git add pkgs/by-name/co/cozempic && git commit -m "cozempic: init at 1.7.1" git push origin cozempic-init gh pr create --repo NixOS/nixpkgs --title "cozempic: init at 1.7.1" ``` -------------------------------- ### Display Cozempic Strategies Source: https://github.com/ruya-ai/cozempic/blob/main/README.md View all available strategies and prescriptions within Cozempic. ```bash cozempic formulary Show all strategies & prescriptions ``` -------------------------------- ### Dry-run Session Treatment (Standard Prescription) Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/treat/SKILL.md Perform a dry-run of the 'treat' skill with the 'standard' prescription to see potential savings without applying changes. This is a crucial step before execution. ```bash cozempic treat current -rx standard ``` -------------------------------- ### First-time AUR Submission Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Commands for the initial submission of the Cozempic package to the AUR. This includes cloning the AUR repository, copying the build files, committing, and pushing. ```bash git clone ssh://aur@aur.archlinux.org/cozempic.git /tmp/aur-cozempic cp packaging/aur/PKGBUILD packaging/aur/.SRCINFO /tmp/aur-cozempic/ cd /tmp/aur-cozempic && git add PKGBUILD .SRCINFO git commit -m "Initial import, cozempic 1.7.1" && git push ``` -------------------------------- ### Refresh Version, URL, and SHA256 Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Use this script to refresh version, URL, and SHA256 fields for a new release. It calculates file size, SHA256, and RMD160 hashes, and generates a Nix SRI string. ```bash VERSION=X.Y.Z curl -sL "https://files.pythonhosted.org/packages/source/c/cozempic/cozempic-${VERSION}.tar.gz" -o /tmp/cozempic.tgz echo "size: $(wc -c < /tmp/cozempic.tgz)" echo "sha256: $(shasum -a 256 /tmp/cozempic.tgz | awk '{print $1}')" echo "rmd160: $(openssl dgst -rmd160 /tmp/cozempic.tgz | awk '{print $NF}')" python3 -c "import base64; print('nix-sri: sha256-' + base64.b64encode(bytes.fromhex('')).decode())" ``` -------------------------------- ### Run Single Cozempic Strategy Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Execute a specific strategy on a given session by providing the strategy name and session identifier. ```bash cozempic strategy Run single strategy ``` -------------------------------- ### Release New Homebrew Package Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Steps to release a new version of Cozempic to the self-hosted Homebrew tap. This involves cloning the tap, copying the updated formula, committing, and pushing. ```bash cd /tmp && git clone https://github.com/Ruya-AI/homebrew-cozempic.git cp /packaging/homebrew/cozempic.rb homebrew-cozempic/Formula/cozempic.rb cd homebrew-cozempic && git add Formula/cozempic.rb git commit -m "cozempic X.Y.Z" && git push ``` -------------------------------- ### List Cozempic Sessions Source: https://github.com/ruya-ai/cozempic/blob/main/README.md View a list of active sessions along with their estimated sizes and token counts using the `list` command. ```bash cozempic list List sessions with sizes and token estimates ``` -------------------------------- ### Dry-run Session Treatment Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/reload/SKILL.md Perform a dry-run of the session treatment to preview changes without applying them. Use 'standard' if no specific argument is provided. ```bash cozempic treat current -rx $ARGUMENTS ``` ```bash cozempic treat current -rx standard ``` -------------------------------- ### Cozempic Configuration Environment Variables Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Configure Cozempic's behavior using environment variables such as `COZEMPIC_NO_AUTO_UPDATE`, `COZEMPIC_NO_TELEMETRY`, and `COZEMPIC_CONTEXT_WINDOW`. ```bash COZEMPIC_NO_AUTO_UPDATE ``` ```bash COZEMPIC_NO_TELEMETRY ``` ```bash COZEMPIC_CONTEXT_WINDOW ``` -------------------------------- ### Cycle Experienced by Power Users Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md Illustrates the recurring problem of losing behavioral state across sessions due to compaction, leading to repeated user effort. ```text Session start → corrections accumulate mid-session → compaction discards behavioral signal → same mistakes repeat in next session → user re-teaches same corrections → repeat ``` -------------------------------- ### Dry-run Session Treatment (Variable Prescription) Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/treat/SKILL.md Perform a dry-run of the 'treat' skill using a variable for the prescription. This allows for dynamic selection of the pruning strategy. ```bash cozempic treat current -rx $ARGUMENTS ``` -------------------------------- ### Apply Cozempic Session Treatment Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Run a prescription to optimize a session. By default, it performs a dry-run; use `--execute` to apply changes. Presets can be specified with `-rx PRESET`. ```bash cozempic treat [-rx PRESET] Run prescription (dry-run default) ``` ```bash cozempic treat --execute Apply changes with backup ``` -------------------------------- ### Apply Session Treatment (Variable Prescription) Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/treat/SKILL.md Execute the 'treat' skill with a specified prescription after confirming the dry-run results. This command applies the pruning to the current session. ```bash cozempic treat current -rx $ARGUMENTS --execute ``` -------------------------------- ### Run Session Diagnosis Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/diagnose/SKILL.md Execute the diagnose command on the current session to analyze its bloat. This command provides detailed metrics on session size, token usage, and context window utilization. ```bash cozempic current --diagnose ``` -------------------------------- ### Dry-run Treat & Reload Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Perform a dry-run of the 'treat' command with a specified prescription to preview token savings before applying changes. ```bash cozempic treat current -rx ``` -------------------------------- ### MacPorts New Port Creation Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Steps to create a new Cozempic port for MacPorts. This involves forking the macports-ports repository, copying the `Portfile`, linting, testing the build, and creating a pull request. ```bash mkdir -p python/py-cozempic cp packaging/macports/Portfile python/py-cozempic/Portfile # From a Mac with MacPorts installed: cd python/py-cozempic && port lint sudo port -v install subport=py312-cozempic # test build git checkout -b py-cozempic-init && git add python/py-cozempic git commit -m "py-cozempic: new port, version 1.7.1" && git push gh pr create --repo macports/macports-ports --title "py-cozempic: new port, version 1.7.1" ``` -------------------------------- ### Apply Reload Skill Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/reload/SKILL.md Execute the reload skill to treat the session, save changes, and spawn an auto-resume watcher. Do not run 'cozempic treat --execute' beforehand as reload handles treatment internally. ```bash cozempic reload -rx $ARGUMENTS ``` -------------------------------- ### Run Silent Size Check Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Execute a silent size check of the current session. Redirects errors to /dev/null to avoid outputting anything. ```bash cozempic current 2>/dev/null ``` -------------------------------- ### Save Cozempic Team State Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Save the current state of the team to disk using the `checkpoint` command. Use `--show` to view the saved state. ```bash cozempic checkpoint [--show] Save team state to disk ``` -------------------------------- ### Check Cozempic Guard Status and Stop Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/guard/SKILL.md Check if the cozempic guard daemon is running by listing its PID file, view recent activity by tailing its log file, and stop the daemon by killing the process using its PID. ```bash ls /tmp/cozempic_guard_*.pid 2>/dev/null # is it running? ``` ```bash tail -20 /tmp/cozempic_guard_*.log 2>/dev/null # recent activity ``` ```bash kill "$(cat /tmp/cozempic_guard_*.pid)" # stop it ``` -------------------------------- ### Apply a Single Pruning Strategy Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Applies a specific pruning strategy to the current conversation. Use the -v flag for verbose output or --execute to apply changes. ```bash cozempic strategy current -v ``` ```bash cozempic strategy current --execute ``` -------------------------------- ### Configure Thinking Block Pruning Mode Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Sets the mode for handling 'thinking blocks' in the conversation. Options include removing them entirely, truncating, or keeping only the signature. ```bash cozempic treat current --thinking-mode truncate ``` -------------------------------- ### Execute Treat & Reload Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Apply the 'reload' command with a specified prescription to prune the session, save changes, and automatically restart the session in a new terminal. ```bash cozempic reload -rx ``` -------------------------------- ### Guard Mode Without Reload Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Runs guard mode for background pruning without restarting the session. Useful when only session cleanup is desired. ```bash cozempic guard --threshold 50 --no-reload ``` -------------------------------- ### Show Current Cozempic Session Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Display information about the current session or diagnose it further by adding the `-d` flag. ```bash cozempic current [-d] Show/diagnose current session ``` -------------------------------- ### Subsequent AUR Bumps Source: https://github.com/ruya-ai/cozempic/blob/main/packaging/README.md Procedure for updating an existing Cozempic package in the AUR. It involves updating the `pkgver` in `PKGBUILD`, regenerating `.SRCINFO`, committing, and pushing changes. ```bash # On an Arch box (or docker run -it archlinux): cd /tmp/aur-cozempic # update pkgver in PKGBUILD, then: makepkg --printsrcinfo > .SRCINFO git commit -am "cozempic X.Y.Z" && git push ``` -------------------------------- ### Execute Treat Only Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Apply the 'treat' command with a specified prescription and the --execute flag for in-place pruning. This does not auto-resume the session. ```bash cozempic treat current -rx --execute ``` -------------------------------- ### Manage Cozempic Behavioral Digest Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Commands to view, update, and inject behavioral rules into Cozempic's digest system. Rules are extracted from session corrections and synced to Claude Code's memory. ```bash # View extracted rules cozempic digest show # Manually extract from current session cozempic digest update # Sync rules to Claude Code's memory system cozempic digest inject ``` -------------------------------- ### Enable Guard Mode for Agent Teams Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Activates guard mode to prevent agent team state loss during auto-compaction. Monitors session file size and prunes messages while protecting team state. ```bash cozempic guard --threshold 50 -rx standard --interval 30 ``` -------------------------------- ### Diagnose Session Bloat Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Analyze the sources of bloat within a specific session using the `diagnose` command, providing the session identifier. ```bash cozempic diagnose Analyze bloat sources ``` -------------------------------- ### Agent Team vs. Subagent vs. Heuristic Extraction Decision Flow Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md This decision flow illustrates the strategy for extracting behavioral digests. It prioritizes using persistent monitoring agents when agent teams are available, falls back to one-shot subagents if available, and finally uses heuristic triggers with LLM extraction when neither agent team nor subagents are present. ```plaintext Agent Teams available? ├─ Yes → Persistent monitoring agent (real-time extraction) └─ No → Subagents available? ├─ Yes → One-shot subagent on trigger events └─ No → Heuristic trigger + LLM extraction ``` -------------------------------- ### Diagnose and Fix Cozempic Issues Source: https://github.com/ruya-ai/cozempic/blob/main/src/cozempic/data/cozempic_slash_command.md Use the doctor command to diagnose potential issues within Cozempic sessions. The --fix flag attempts to auto-correct identified problems. ```bash cozempic doctor ``` ```bash cozempic doctor --fix ``` -------------------------------- ### Cozempic Telemetry Opt-out Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Disable anonymous usage counters by setting the `COZEMPIC_NO_TELEMETRY` environment variable to `1`. ```bash COZEMPIC_NO_TELEMETRY=1 ``` -------------------------------- ### Rule Quality Assessment Prompt Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md A prompt to evaluate the quality of a behavioral rule based on four criteria: TRIGGER_SPECIFICITY, ACTION_CLARITY, SCOPE_APPROPRIATENESS, and CONFLICT_RISK. It also includes fields for an overall score and whether a revision is needed. ```prompt Evaluate this behavioral rule for quality. Score each criterion 1-5: Rule: "[RULE_TEXT]" TRIGGER_SPECIFICITY (1=vague, 5=precise): Can the agent reliably recognize when this applies? ACTION_CLARITY (1=ambiguous, 5=unambiguous): Is the required action clear? SCOPE_APPROPRIATENESS (1=too narrow/broad, 5=well-scoped): Session vs. universal correctly set? CONFLICT_RISK (1=high risk, 5=no conflict): Does it contradict common behaviors? OVERALL: [1-5] REVISION_NEEDED: [yes/no] IMPROVED_RULE: ``` -------------------------------- ### Manage Cozempic Digest Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Perform various operations on the Cozempic digest, including showing, updating, clearing, flushing, recovering, and injecting entries. ```bash cozempic digest [show|update|clear|flush|recover|inject] ``` -------------------------------- ### Reload Cozempic Session Source: https://github.com/ruya-ai/cozempic/blob/main/README.md Reload the current session, applying treatments and resuming in a new terminal. Useful for recovering from detection issues with the `--session` flag. ```bash cozempic reload [-rx PRESET] Treat + auto-resume in new terminal ``` ```bash cozempic reload --session ``` -------------------------------- ### Behavioral Digest Markdown Format Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md Defines the structure for storing behavioral rules in a markdown file. Includes metadata like rule ID, priority, scope, and the rule itself framed as a prohibition. ```markdown # Behavioral Digest ## Active Rules — Hard (always injected) ### [R001] No Co-Authored-By commits **Priority**: HARD **Source**: User correction (3 occurrences) **First seen**: 2026-03-15 | **Last reinforced**: 2026-03-30 **Importance**: 5 (3 corrections + 2 upvotes) **Scope**: git operations **Rule**: Do not add "Co-Authored-By" lines to git commit messages. **Before**: Added `Co-Authored-By: Claude Sonnet ` to commit **After**: User deleted that line from the commit message **Signal**: I added Co-Authored-By because default behavior includes it; user treats this project's commits as single-author. **Trigger**: Any git commit operation ## Active Rules — Soft (injected by scope relevance) ### [R002] Edit not Write for existing files **Priority**: SOFT **Source**: User correction (2 occurrences) **First seen**: 2026-03-20 | **Last reinforced**: 2026-03-28 **Importance**: 2 **Scope**: file operations **Rule**: Do not use the Write tool to modify existing files — use Edit. Only use Write for new files. **Before**: Used Write tool to replace entire file content **After**: User said "use Edit not Write" **Signal**: I used Write because the change was large; user prefers surgical edits. **Trigger**: Any file modification operation on existing files ## Pending Rules (< 3 occurrences, under observation) ### [P001] Prefer uv over pip **Priority**: SOFT (pending) **Source**: User correction (1 occurrence) **First seen**: 2026-03-31 **Importance**: 1 **Rule**: Use uv instead of pip for package operations in this project. **Before**: Suggested `pip install ...` **After**: User said "we use uv" **Trigger**: Any package installation or management command ``` -------------------------------- ### Auto-Fix Detected Issues with Claude Code Doctor Source: https://github.com/ruya-ai/cozempic/blob/main/plugin/skills/doctor/SKILL.md Use the `--fix` flag with the `cozempic doctor` command to automatically resolve detected health check issues. This is useful for quickly addressing common problems without manual intervention. ```bash cozempic doctor --fix ``` -------------------------------- ### Composite Confidence Scoring Formula Source: https://github.com/ruya-ai/cozempic/blob/main/docs/behavioral-digest-design.md This formula normalizes evidence count, incorporates source reliability, applies a decay based on recency, and adjusts for rule type priors to calculate composite confidence. The admission threshold is 0.55. ```plaintext confidence = w1 * (evidence_count / 3) // normalize to promotion threshold + w2 * source_reliability // 1.0 explicit, 0.6 implicit, 0.3 inferred + w3 * recency_decay // exp(-λ * days_since_last_confirmation) + w4 * type_prior // correction=0.8, preference=0.9, one-off=0.1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.