Skip to content

joelklabo/brainwash

Repository files navigation

brainwash

Manage OpenClaw persona context files - audit, edit, and validate your agent's identity

brainwash is a CLI tool for managing OpenClaw persona context files. It helps you view, audit, edit, and validate the files that define your agent's identity (SOUL.md, IDENTITY.md, USER.md, etc.).

Features

  • Auto-discovery - Automatically finds your OpenClaw workspace
  • Convention auditing - Validates files against OpenClaw conventions
  • Quick editing - Opens files in your preferred editor
  • Avatar prompts - Generate avatar prompts from identity files
  • Template scaffolding - Create missing files from templates

Installation

npm install -g brainwash

Or run directly:

npx brainwash [command]

Usage

# List all context files
brainwash list

# Show a specific file
brainwash show soul
brainwash show identity
brainwash show user

# Audit conventions
brainwash audit

# Edit a file
brainwash edit soul

# Generate avatar prompt
brainwash avatar

# Create missing files
brainwash init

# Quick status
brainwash status

Workspace Selection

brainwash auto-discovers workspaces in this order:

  1. BRAINWASH_WORKSPACE env var
  2. Config file (~/.config/brainwash/settings.json)
  3. OpenClaw config (~/.openclaw/openclaw.json agents)
  4. OPENCLAW_PROFILE env (~/.openclaw/workspace-$PROFILE)
  5. Default: ~/.openclaw/workspace

Override with: brainwash --workspace /path/to/workspace

Context Files

File Purpose
SOUL.md Persona, voice, boundaries
IDENTITY.md Name, creature, emoji, avatar
USER.md User profile and preferences
AGENTS.md Operating rules and workflow
TOOLS.md Local tool notes
HEARTBEAT.md Heartbeat checklist
MEMORY.md Long-term memory

Convention Checks

  • PURPOSE comment - Bootstrap files should have <!-- PURPOSE: ... -->
  • Required fields - IDENTITY.md needs Name, Creature, Vibe, Emoji, Avatar
  • File size - Warns when approaching 20K truncation
  • Naming consistency - Name in IDENTITY.md should appear in SOUL.md

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors