### Get Self-Documenting Explanation Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use `quickstart` with `--json` to get a self-documenting explanation of the system. ```bash # Self-documenting explanation cm quickstart --json ``` -------------------------------- ### Quick Capability Check and Self-Explanation Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Use the `quickstart` command to get a complete explanation of the system and how to use it. The output is in JSON format. ```bash # Quick capability check and self-explanation cm quickstart --json # → Returns complete explanation of the system and how to use it ``` -------------------------------- ### Install Script Options Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Examples of using the install script with specific options like version, destination, system-wide install, easy mode, and verification. ```bash # Full options install.sh [--version vX.Y.Z] [--dest DIR] [--system] [--easy-mode] [--verify] [--from-source] [--quiet] # Examples install.sh --version v0.2.2 --verify # Specific version install.sh --system --verify # Install to /usr/local/bin (requires sudo) install.sh --from-source # Build from source (requires bun) ``` -------------------------------- ### Install from Source Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Install the Claude Memory System from source by cloning the repository, installing dependencies, building, and moving the executable. ```bash git clone https://github.com/Dicklesworthstone/cass_memory_system.git cd cass_memory_system bun install && bun run build sudo mv ./dist/cass-memory /usr/local/bin/cm ``` -------------------------------- ### Install cass-reflect CLI Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Install the cass-reflect tool using Bun. This includes installing dependencies and running the CLI. ```bash bun install bun run cass-reflect.ts --help bun run build ./dist/cass-reflect --help ``` -------------------------------- ### Install System-Wide Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Install the Claude Memory System system-wide using the install script with the '--system' flag. ```bash install.sh --system --verify ``` -------------------------------- ### Install Dependencies Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/CONTRIBUTING.md Install project dependencies using Bun. Ensure Bun is installed and updated. ```bash bun install ``` -------------------------------- ### Installation - One-Liner Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md The recommended one-liner command for installing the Cass Memory System CLI. ```bash # Recommended One-Liner (Installation) ``` -------------------------------- ### Get Context for Task CLI Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/AGENT_FRIENDLINESS_REPORT.md Example of how to use the 'context' command with the '--json' flag to retrieve task-specific information. ```bash cm context "implement feature X" --json ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Clone the cass-memory system repository and install its dependencies using bun. ```bash git clone https://github.com/Dicklesworthstone/cass_memory_system.git cd cass_memory_system bun install ``` -------------------------------- ### Get context before starting a task Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Generates context for a given task description. Use the --json flag for machine-readable output. ```bash cm context "implement user authentication" --json ``` -------------------------------- ### Build from Source Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Clone the repository, install dependencies with bun, build the project, and move the binary to the system path. ```bash git clone https://github.com/Dicklesworthstone/cass_memory_system.git cd cass_memory_system bun install bun run build sudo mv ./dist/cass-memory /usr/local/bin/cm ``` -------------------------------- ### One-liner Install (Linux/macOS) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Installs cass-memory using curl and bash. The --verify flag ensures the integrity of the installation. ```bash curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/cass_memory_system/main/install.sh?$(date +%s)" \ | bash -s -- --easy-mode --verify ``` -------------------------------- ### Project Command Examples Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/PLAN_FOR_CASS_MEMORY_SYSTEM.md Export playbook content into agent-specific formats for documentation. Supports various formats and options for customization. ```bash cm project --format agents.md --output ./AGENTS.md ``` ```bash cm project --format claude.md --per-category 10 ``` ```bash cm project --show-counts ``` -------------------------------- ### Install cass CLI Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Install the cass CLI tool using a curl script. This is a prerequisite for using cass-reflect. ```bash curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/coding_agent_session_search/main/install.sh | bash ``` -------------------------------- ### Show Playbook Stats CLI Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/AGENT_FRIENDLINESS_REPORT.md Example of the 'stats' command with '--json' to display playbook health metrics. ```bash cm stats --json ``` -------------------------------- ### Install via Scoop (Windows) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Installs cass-memory using the Scoop package manager. Requires adding the custom bucket first. ```bash scoop bucket add dicklesworthstone https://github.com/Dicklesworthstone/scoop-bucket scoop install dicklesworthstone/cm ``` -------------------------------- ### Reset Onboarding Process Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use `cm onboard reset` to start the onboarding process fresh. ```bash cm onboard reset # Start fresh ``` -------------------------------- ### Record Feedback CLI Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/AGENT_FRIENDLINESS_REPORT.md Example of the 'mark' command used with '--json' to record feedback on a specific bullet. ```bash cm mark b-xxx helpful --json ``` -------------------------------- ### Find Similar Rules CLI Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/AGENT_FRIENDLINESS_REPORT.md Example of using the 'similar' command with '--json' to find rules related to a specific query. ```bash cm similar "error handling" --json ``` -------------------------------- ### Initialize Playbook with Starter Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Command to initialize a new playbook using a specified starter. For example, initializing with the 'typescript' starter. ```bash # Initialize with a starter cm init --starter typescript ``` -------------------------------- ### ACE Protocol: Learning Command Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-gemini-gemini_-_direct_access_to_google_ai.md An example of the `ace learn` command used in the 'POST-FLIGHT' phase of the ACE Protocol. This command takes the path to a session log file for validation. ```bash ace learn ``` -------------------------------- ### Install via Homebrew (macOS/Linux) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Installs cass-memory using the Homebrew package manager. Ensure you have added the custom tap first. ```bash brew install dicklesworthstone/tap/cm ``` -------------------------------- ### Install Claude Memory System (One-liner) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Install the Claude Memory System using a recommended one-liner curl command. Includes options for easy mode and verification. ```bash curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/cass_memory_system/main/install.sh \ | bash -s -- --easy-mode --verify ``` -------------------------------- ### Query cass for diverse examples of successes/failures Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-grok-integrating_cass_into_reflective_workflows_shared_grok_conversation.md Use this command to fetch diverse examples of successes or failures from cass for query analysis. Supports wildcard fallback and explanation. ```bash cass search "*failure* parallelization" --robot --wildcard-fallback --explain for query analysis ``` -------------------------------- ### Update CLAUDE.md with Networking Best Practices Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-gemini-gemini_-_direct_access_to_google_ai.md Update the CLAUDE.md file with empirical findings. This example suggests using 'httpx' over 'requests' for networking and provides a search query for related examples. ```bash CLAUDE.md with: **"NETWORKING: Always use `httpx` instead of `requests`. See `cass search 'httpx migration'` for examples."** ``` -------------------------------- ### Retrieve Examples with Cass Expand in ACE Reflector Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-grok-integrating_cass_into_reflective_workflows_shared_grok_conversation.md After trajectory, retrieve examples for context or analysis. Use cass's fuzzy fallback for broader matches. Reflect on combined input to extract lessons. ```bash cass expand /path/to/session.jsonl -n 42 -C 3 --json ``` ```bash cass search "*failure* code quality" --robot --explain ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-gemini-gemini_-_direct_access_to_google_ai.md Install necessary dependencies for the ace.ts CLI using Bun. This includes Commander for CLI argument parsing, Zod for schema validation, and the Vercel AI SDK with OpenAI support. ```bash bun add commander zode ai @ai-sdk/openai zod ``` -------------------------------- ### List available starter templates Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Lists the available starter templates for initialization. ```bash cm starters ``` -------------------------------- ### Build Playbook (Onboarding Sample with Fill Gaps) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Generates a sample playbook onboarding entry, filling in any gaps. Use --json for structured output. ```bash cm onboard sample --fill-gaps --json ``` -------------------------------- ### Get Task-Specific Memory Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Retrieves memory context relevant to a specific task before starting. Always use the --json flag in agent contexts. ```bash cm context "implement auth rate limiting" --json ``` -------------------------------- ### Retrieve Context for Tasks with cm Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/AGENTS.md Before starting complex tasks, retrieve relevant context using the `cm context` command. This command helps gather potential rules, anti-patterns, past session examples, and suggested search queries for deeper investigation. ```bash cm context "" --json ``` -------------------------------- ### Apply Starter Playbook to Existing Project Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use 'cm playbook bootstrap ' to apply a starter playbook to an existing project. ```bash cm playbook bootstrap react ``` -------------------------------- ### Initialize configuration and playbook Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Initializes the system configuration and playbook. Can use starter templates. ```bash cm init ``` ```bash cm init --starter typescript ``` -------------------------------- ### List Available Starters Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Command to list all available starter playbooks. This is the first step in initializing or applying a starter playbook. ```bash # List all available starters cm starters ``` -------------------------------- ### Initialize Cass Memory Project Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use 'cm init' to initialize a new project. Specify a starter template with '--starter' or reinitialize with '--force' to create a backup. ```bash cm init ``` ```bash cm init --starter typescript ``` ```bash cm init --force ``` -------------------------------- ### Apply Starter to Existing Playbook Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Command to apply a starter playbook to an existing playbook. This is useful for bootstrapping a project with a specific tech stack's best practices. ```bash # Apply a starter to an existing playbook cm playbook bootstrap react ``` -------------------------------- ### Bootstrap Playbook with Starter Rules Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Apply starter rules for a specific technology using `cm playbook bootstrap`. ```bash cm playbook bootstrap react # Apply starter to existing ``` -------------------------------- ### Install Specific Version Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Install a specific version of the Claude Memory System using the install script with the '--version' flag. ```bash install.sh --version v0.2.2 --verify ``` -------------------------------- ### Install Trauma Guard Hooks Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Install Trauma Guard hooks using `cm guard`. Use `--install` for the Claude Code hook, `--git` for a Git pre-commit hook, or both. ```bash cm guard --install # Claude Code hook ``` ```bash cm guard --git # Git pre-commit hook ``` ```bash cm guard --install --git # Both ``` -------------------------------- ### Check installation status of safety hooks Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Checks the installation status of the safety hooks. ```bash cm guard --status ``` -------------------------------- ### List Cass Memory Starters Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use 'cm starters' to list available starter templates for project initialization or playbook bootstrapping. ```bash cm starters ``` -------------------------------- ### Markdown Integration Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Example of how to integrate Claude Code or Codex into a CLAUDE.md file. ```markdown Add to your `CLAUDE.md`: ```markdown ``` -------------------------------- ### Diary Output Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Example JSON output structure for a generated diary entry. ```json { "sessionPath": "/home/user/.claude/projects/myapp/session-123.jsonl", "timestamp": "2025-12-07T10:30:00Z", "agent": "claude_code", "workspace": "/projects/myapp", "accomplishments": ["Implemented JWT refresh endpoint", "Added rate limiting"], "decisions": ["Chose sliding window for rate limiting over fixed window"], "challenges": ["Redis connection pooling caused timeout issues"], "preferences": ["User prefers explicit error messages over codes"], "keyLearnings": ["Always set maxRetriesPerRequest on ioredis client"] } ``` -------------------------------- ### Manage Configuration Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Commands for showing, setting, and locating configuration settings. ```bash # Show config cass-reflect config show ``` ```bash # Update settings cass-reflect config set provider openai ``` ```bash cass-reflect config set model gpt-4o ``` ```bash cass-reflect config set maxReflectorIterations 5 ``` ```bash # Show config path cass-reflect config path ``` -------------------------------- ### Check Onboarding Status and Recommendations Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Checks the current onboarding status and provides recommendations for next steps. This is a good starting point for the onboarding process. ```bash cm onboard status ``` -------------------------------- ### Playbook Schema Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Example YAML structure for a playbook entry, including metadata and bullet details. ```yaml schema_version: 1 name: "my-project" description: "Accumulated coding wisdom" metadata: last_reflection: "2025-12-07T10:00:00Z" total_reflections: 42 created_at: "2025-11-01T00:00:00Z" bullets: - id: "b-1a2b3c4d-x7y8" category: "debugging" content: | When debugging TypeScript type errors with generics, use `tsc --noEmit --pretty` and check the instantiated type at the call site, not just the generic definition. created_at: "2025-11-15T14:30:00Z" updated_at: "2025-12-05T09:00:00Z" helpful_count: 8 harmful_count: 1 tags: ["typescript", "debugging", "generics"] source_sessions: - "/home/user/.claude/projects/app/session-001.jsonl:142" - "/home/user/.cursor/state.vscdb:session-xyz" ``` -------------------------------- ### Install Trauma Guard Hooks via CLI Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md These bash commands install the necessary hooks for the Trauma Guard system to intercept and prevent dangerous commands. Options include installing the Claude Code hook, the Git pre-commit hook, or both. ```bash # Install Claude Code hook (intercepts Bash commands) cm guard --install ``` ```bash # Install Git pre-commit hook (scans commits) cm guard --git ``` ```bash # Install both cm guard --install --git ``` ```bash # Check installation status cm guard --status ``` -------------------------------- ### Install safety hooks Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Installs safety hooks for various environments like Claude Code or Git pre-commit. ```bash cm guard --install ``` ```bash cm guard --git ``` ```bash cm guard --install --git ``` -------------------------------- ### Deprecate Bullet Delta Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/gpt_pro_version.md An example of a 'deprecate_bullet' delta, used to mark a playbook entry as outdated or harmful. ```json { "type": "deprecate_bullet", "id": "cass-global-0012" } ``` -------------------------------- ### Context Command Example with JSON Output Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Demonstrates the `context` command with a specific task and the expected structured JSON output, including relevant bullets, anti-patterns, and history snippets. ```bash cm context "fix the auth timeout bug" --json ``` -------------------------------- ### Cass CLI Commands for Presets Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/SUGGESTED_IMPROVEMENTS_TO_CASS_BASED_ON_CMS.md Demonstrates how to add SSH sources with predefined platform-specific default paths using presets. ```bash cass sources add ssh work-laptop --host work-laptop --preset macos-defaults ``` ```bash cass sources add ssh home-server --host home-server --preset linux-defaults ``` -------------------------------- ### Get Specific Rule Details Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use `cm playbook get` followed by a rule ID to retrieve its details. ```bash cm playbook get b-8f3a2c # Rule details ``` -------------------------------- ### Initialize CLI and Imports Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-grok-integrating_cass_into_reflective_workflows_shared_grok_conversation.md Sets up the command-line interface using commander and imports necessary modules for AI interaction, file system operations, and process spawning. Ensure all dependencies are installed. ```typescript #!/usr/bin/env bun import { Command } from 'commander'; import { openai } from '@ai-sdk/openai'; // Or import { anthropic } from '@ai-sdk/anthropic'; import { generateText } from 'ai'; // Vercel AI SDK core import { spawn } from 'bun'; import * as fs from 'fs/promises'; import * as path from 'path'; import { fileURLToPath } from 'url'; ``` -------------------------------- ### Verify Installation Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Check the installed version of the cm CLI and run a system health check using the doctor command. ```bash cm --version cm doctor --json ``` -------------------------------- ### Run Development Server (One-off) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/CONTRIBUTING.md Execute a command once using the development server. Replace `` and `[args]` with your specific command and arguments. ```bash bun run dev -- [args] ``` -------------------------------- ### Build Playbook (Onboarding Status) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Checks the status of the playbook onboarding process. Use --json for structured data output. ```bash cm onboard status --json ``` -------------------------------- ### Generate Prioritized Onboarding Samples Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use `cm onboard sample` to generate prioritized sessions for onboarding. Use `--fill-gaps` to prioritize filling gaps. Filter by agent (`--agent`) or time (`--days`). ```bash cm onboard sample --fill-gaps # Prioritized sessions ``` ```bash cm onboard sample --agent claude --days 14 # Filter by agent/time ``` ```bash cm onboard sample --workspace /path/project # Filter by workspace ``` ```bash cm onboard sample --include-processed # Re-analyze sessions ``` -------------------------------- ### Check Onboarding Progress Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use `cm onboard status` to check the progress of the agent-native playbook building. ```bash cm onboard status # Check progress ``` -------------------------------- ### Category Keyword Detection Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md A TypeScript example demonstrating how category keywords can be used to detect relevant categories from text content. ```typescript // Example: detecting categories from text const CATEGORY_KEYWORDS = { debugging: ["debug", "error", "fix", "bug", "trace", "stack", ...], testing: ["test", "mock", "assert", "expect", "jest", "vitest", ...], security: ["security", "auth", "token", "encrypt", "permission", ...], // ... more categories }; // Count keyword matches → category with most matches wins ``` -------------------------------- ### Agent Playbook Section Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/gpt_pro_version.md An example of how playbook rules can be presented in a markdown file for agent documentation, including helpfulness counts. ```markdown ## Agent Playbook (auto-generated from Cass) These rules are synthesized from past sessions across Claude, Cursor, Codex, and other agents, using Cass + reflection. ### Testing (top 5 rules) 1. [3× helpful] Run `pnpm test` for the current package before committing, and rerun after updating dependencies. 2. [2× helpful] For flaky tests, reproduce in isolation with `pnpm vitest run -t ""` and document any nondeterminism. 3. [1× helpful] After moving files, always run `pnpm lint --filter ` to validate TypeScript and ESLint rules. ``` -------------------------------- ### Define a Custom Django Starter Playbook (src/) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Create a YAML file in the src/starters/ directory to define a custom starter playbook for Django. This version includes metadata like version and tags. ```yaml # src/starters/django.yaml metadata: name: django description: Django web framework best practices version: "1.0" tags: [python, django, web] bullets: - content: "Always use Django's ORM for database operations" category: database scope: framework kind: stack_pattern maturity: established - content: "Run migrations before deploying" category: deployment scope: framework kind: workflow_rule maturity: proven ``` -------------------------------- ### Register Agent and Ensure Project Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/AGENTS.md Register an agent within a project and ensure the project is set up. Use `project_key` as an absolute path. ```python ensure_project(project_key=) register_agent(project_key, program, model) ``` -------------------------------- ### Update Bullet Delta Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/gpt_pro_version.md An example of an 'update_bullet' delta, used to adjust the helpfulness or harmfulness counts of an existing playbook bullet. ```json { "type": "update_bullet", "id": "cass-global-0012", "delta_helpful": 1, "delta_harmful": 0, "note": "Rule was followed and produced a clean PR with minimal feedback." } ``` -------------------------------- ### Handle Cass Unavailability Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/planning/PLAN_FOR_CASS_MEMORY_SYSTEM.md Checks if cass is available and attempts to find it in common installation paths. If not found, it returns an error with installation instructions. ```typescript async function handleCassUnavailable(): CommandResult { // Check if cass exists if (!cassAvailable()) { // Try common installation paths const commonPaths = [ "/usr/local/bin/cass", "~/.cargo/bin/cass", "~/.local/bin/cass" ]; for (const p of commonPaths) { if (await fileExists(p)) { // Update config with found path return { success: true, message: `Found cass at ${p}` }; } } return { success: false, error: "cass not found", message: `Install cass from https://github.com/Dicklesworthstone/coding_agent_session_search or set CASS_PATH environment variable` }; } } ``` -------------------------------- ### Build Playbook (Read Session with Template) Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/README.md Reads a session file and generates a playbook entry using a template. Use --json for structured output. ```bash cm onboard read /path/to/session.jsonl --template --json ``` -------------------------------- ### Check Trauma Guard Installation Status Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/SKILL.md Use `cm guard --status` to check the installation status of the Trauma Guard hooks. ```bash cm guard --status # Check installation ``` -------------------------------- ### CLI Setup with Commander.js Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-grok-integrating_cass_into_reflective_workflows_shared_grok_conversation.md Initializes a Commander.js CLI application with basic information and defines commands for diary, reflect, curate, and full reflection cycles. ```typescript // CLI Setup const program = new Command(); program .name('agent-reflect') .description('General reflection CLI for coding agents') .version('1.0.0'); program.command('diary') .description('Generate diary entry') .argument('', 'Session trace file') .option('-o, --output ', 'Output diary file', 'diary.md') .option('--cass-query ', 'Cass search query') .action(async (input, opts) => runDiary(input, opts.output, opts.cassQuery)); program.command('reflect') .description('Reflect on diaries') .argument('', 'Directory of diary files') .option('--cass-query ', 'Cass search query') .option('--json', 'JSON output') .action(async (dir, opts) => runReflect(dir, opts.cassQuery, opts.json)); program.command('curate') .description('Curate playbook updates') .argument('', 'Reflections input') .option('-p, --playbook ', 'Playbook file', 'playbook.md') .action(async (refl, opts) => runCurate(refl, opts.playbook)); program.command('full') .description('Full reflection cycle') .option('--since ', 'Process since days ago', '7') .option('-o, --output ', 'Output playbook', 'playbook.md') .option('--limit ', 'Max sessions', '10') .option('--provider ', 'AI provider', 'openai') .option('--model ', 'AI model') .action(async (opts) => runFull(opts.since, opts.output, opts)); program.parseAsync(); ``` -------------------------------- ### Batch Onboarding Script for Cass-Memory Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/docs/AGENT_NATIVE_ONBOARDING.md A bash script to automate the agent-assisted onboarding process. It lists sessions to process, and includes placeholders for agent interaction and final checks. ```bash #!/bin/bash # Agent-assisted onboarding # 1. List sessions to process cass search "*" --robot --limit 50 | jq -r '.hits[].source_path' | sort -u > sessions.txt # 2. For each session, agent reads and extracts rules # (Agent does this interactively) # 3. After extraction, check results cm playbook list cm stats --json ``` -------------------------------- ### Add Bullet Delta Example Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/gpt_pro_version.md An example of an 'add_bullet' delta, specifying a new lesson learned with its category, scope, content, and initial counts. ```json { "type": "add_bullet", "category": "testing", "scope": { "type": "workspace", "path": "/Users/me/devshop" }, "content": "Before running the full test suite, run targeted tests for files you changed to get faster feedback.", "initial_helpful_count": 1, "initial_harmful_count": 0, "sources": [ { "diary_path": "...", "session_path": "..." } ] } ``` -------------------------------- ### Initialize CLI and Imports for Agent Reflection Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-grok-integrating_cass_into_reflective_workflows_shared_grok_conversation.md Sets up the command-line interface using commander and imports necessary modules for AI interaction, file system operations, and process management. Includes type definitions for session traces and CASS hits. ```typescript #!/usr/bin/env bun import { Command } from 'commander'; import { openai } from '@ai-sdk/openai'; // Or import { anthropic } from '@ai-sdk/anthropic'; import { generateText } from 'ai'; // Vercel AI SDK core import { spawn } from 'bun'; import * as fs from 'fs/promises'; import * as path from 'path'; import { fileURLToPath } from 'url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); interface SessionTrace { messages: Array<{ role: string; content: string }>; metadata?: { agent?: string; timestamp?: string }; } interface CassHit { agent: string; snippet: string; score: number; path: string; } ``` -------------------------------- ### Get Context with Options Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Get contextual information for a task with specific options, including workspace path, maximum number of bullets, and JSON output format. ```bash cass-reflect context "Debug memory leak" --workspace /path/to/project --max-bullets 20 --json ``` -------------------------------- ### Get Context for a Task Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/claude_version/README.md Retrieve relevant playbook entries and historical context for a given task. This is the primary command for agents to call to get contextual information. ```bash cass-reflect context "Fix the authentication timeout bug in auth.ts" ``` -------------------------------- ### Initialize ACE CLI with Commander.js Source: https://github.com/dicklesworthstone/cass_memory_system/blob/main/competing_proposal_plans/2025-12-07-gemini-gemini_-_direct_access_to_google_ai.md Sets up the main command-line interface for ACE using the Commander.js library. Includes basic name, description, and version. ```typescript import { Command } from "commander"; const program = new Command(); program .name("ace") .description("Agentic Context Engine: Middleware for Agent Memory") .version("1.0.0"); ```