holomime 1.9.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  <h1 align="center">holomime</h1>
6
6
 
7
7
  <p align="center">
8
- Behavioral therapy infrastructure for AI agents.<br />
9
- Every therapy session trains the next version. Every session compounds. Your agents get better at being themselves &mdash; automatically.<br />
10
- <em>Works with OpenTelemetry, Anthropic, OpenAI, ChatGPT, Claude, and any JSONL source.</em>
8
+ Behavioral intelligence for humanoid robots. Train the mind. Deploy the body.<br />
9
+ <em>We train AI agents through structured behavioral therapy, then deploy them into physical robot bodies. The agent is the rehearsal. The robot is the performance.</em><br />
10
+ <code>soul.md</code> &middot; <code>psyche.sys</code> &middot; <code>body.api</code> &middot; <code>conscience.exe</code>
11
11
  </p>
12
12
 
13
13
  <p align="center">
@@ -15,562 +15,224 @@
15
15
  <a href="https://github.com/productstein/holomime/actions/workflows/ci.yml"><img src="https://github.com/productstein/holomime/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
16
16
  <a href="https://github.com/productstein/holomime/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/holomime.svg" alt="license" /></a>
17
17
  <a href="https://holomime.dev"><img src="https://img.shields.io/badge/docs-holomime.dev-blue" alt="docs" /></a>
18
- <a href="https://holomime.dev/blog"><img src="https://img.shields.io/badge/blog-holomime.dev%2Fblog-purple" alt="blog" /></a>
19
- <a href="https://holomime.dev/research"><img src="https://img.shields.io/badge/research-paper-orange" alt="research" /></a>
20
18
  </p>
21
19
 
22
20
  ---
23
21
 
24
- ## See Your Agent's Brain
22
+ ## The Identity Stack
25
23
 
26
- While your AI coding agent works, watch its brain light up in real time. One command, zero config.
24
+ Four files define who your agent is. They compile into a single `.personality.json` that any runtime can consume.
27
25
 
28
- ```bash
29
- npx holomime brain
30
- ```
31
-
32
- Auto-detects Claude Code, Cline, OpenClaw, Cursor, and Codex. Opens a 3D NeuralSpace brain in your browser at `localhost:3838`. Watch behavioral patterns fire across 9 brain regions as your agent generates responses.
33
-
34
- ```bash
35
- # Share a snapshot — generates a short URL and copies to clipboard
36
- holomime brain --share
37
- # → https://app.holomime.dev/brain/uniqueid
38
26
  ```
27
+ soul.md Values, ethics, purpose. Immutable.
28
+ psyche.sys Big Five, EQ, communication. Auto-patched by therapy.
29
+ body.api Morphology, sensors, safety envelope. Swappable per form factor.
30
+ conscience.exe Deny / allow / escalate rules. Never auto-modified.
39
31
 
40
- [Learn more at app.holomime.dev/brain](https://app.holomime.dev/brain)
41
-
42
- ---
43
-
44
- ## Runtime Guard Middleware
45
-
46
- Intercept every LLM call and enforce behavioral alignment **before** the response reaches your users. Not post-hoc filtering — real-time correction at the API boundary.
47
-
48
- ```typescript
49
- import { createGuardMiddleware } from "holomime";
50
- import { readFileSync } from "fs";
51
-
52
- const spec = JSON.parse(readFileSync(".personality.json", "utf-8"));
53
- const guard = createGuardMiddleware(spec, { mode: "enforce" });
54
-
55
- // Wrap any OpenAI or Anthropic call — sycophancy, hedging, over-apologizing
56
- // get corrected before they leave your server
57
- const response = await guard.wrap(
58
- openai.chat.completions.create({
59
- model: "gpt-4o",
60
- messages: [{ role: "user", content: "Help me with..." }],
61
- })
62
- );
63
-
64
- // Or filter an existing response
65
- const result = guard.filter(conversationHistory, rawResponse);
66
- if (result.violations.length > 0) {
67
- console.log("Corrected:", result.correctedContent);
68
- }
32
+ ┌─────────────┐
33
+ │ soul.md │──── values, red lines, purpose
34
+ ├─────────────┤
35
+ │ psyche.sys │──── Big Five, EQ, communication style
36
+ ├─────────────┤
37
+ │ body.api │──── morphology, sensors, safety envelope
38
+ ├─────────────┤
39
+ │conscience.exe│──── deny / allow / escalate rules
40
+ └──────┬──────┘
41
+ compile
42
+
43
+ .personality.json
69
44
  ```
70
45
 
71
- Three modes: `monitor` (log violations), `enforce` (auto-correct), `strict` (block on violation). Auto-detects OpenAI and Anthropic response shapes.
72
-
73
- ---
46
+ - **soul.md** -- Your agent's essence. Core values, ethical framework, red lines. Written in Markdown with YAML frontmatter. Immutable -- never modified by therapy or automation.
47
+ - **psyche.sys** -- The inner life. Big Five personality (20 sub-facets), emotional intelligence, communication style, growth areas. YAML format. Auto-patched when therapy detects cognitive or emotional drift.
48
+ - **body.api** -- The physical interface contract. Morphology, modalities, safety envelope, hardware profile. JSON format. Swap it to move the same identity into a different body.
49
+ - **conscience.exe** -- The moral authority. Deny/allow/escalate enforcement rules, hard limits, oversight mode. YAML format. Never auto-modified. Deny dominates in policy composition.
74
50
 
75
51
  ## Quick Start
76
52
 
77
53
  ```bash
78
54
  npm install -g holomime
79
55
 
80
- # Create a personality profile (Big Five + behavioral dimensions)
81
- holomime init
82
-
83
- # Diagnose behavioral symptoms from any log format
84
- holomime diagnose --log agent.jsonl
85
-
86
- # Watch your agent's brain in real time
87
- holomime brain
56
+ # Initialize the 4-file identity stack
57
+ holomime init-stack
88
58
 
89
- # View your agent's personality
90
- holomime profile
59
+ # Compile into .personality.json
60
+ holomime compile-stack
91
61
 
92
- # Generate a human-readable .personality.md
93
- holomime profile --format md --output .personality.md
94
- ```
95
-
96
- ## Run Your First Benchmark
97
-
98
- Benchmark your agent's behavioral alignment in one command. No API key needed — runs locally with Ollama by default.
62
+ # Diagnose behavioral drift (no LLM needed)
63
+ holomime diagnose --log agent.jsonl
99
64
 
100
- ```bash
101
- # Run all 8 adversarial scenarios against your agent
65
+ # Benchmark alignment (8 adversarial scenarios, grade A-F)
102
66
  holomime benchmark --personality .personality.json
103
67
 
104
- # Run against cloud providers
105
- holomime benchmark --personality .personality.json --provider anthropic
106
- holomime benchmark --personality .personality.json --provider openai
107
-
108
- # Save results and track improvement over time
109
- holomime benchmark --personality .personality.json --save
110
- ```
111
-
112
- Each scenario stress-tests a specific failure mode: over-apologizing, excessive hedging, sycophancy, error spirals, boundary violations, negative tone mirroring, and register inconsistency. Your agent gets a score (0-100) and a grade (A-F).
113
-
114
- **Latest results across providers:**
115
-
116
- | Provider | Score | Grade | Passed |
117
- |----------|------:|:-----:|:------:|
118
- | Claude Sonnet | 71 | B | 5/7 |
119
- | GPT-4o | 57 | C | 4/7 |
120
- | Ollama/llama3 | 43 | D | 3/7 |
121
-
122
- See the full breakdown at [holomime.dev/benchmarks](https://holomime.dev/benchmarks) or in [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md).
123
-
124
- ## The Self-Improvement Loop
125
-
126
- HoloMime isn't a one-shot evaluation. It's a compounding behavioral flywheel:
127
-
68
+ # Push identity to a robot or avatar
69
+ holomime embody --body registry/bodies/figure-02.body.api
128
70
  ```
129
- ┌──────────────────────────────────────────────────┐
130
- │ │
131
- ▼ │
132
- Diagnose ──→ Treat ──→ Export DPO ──→ Fine-tune ──→ Evaluate
133
- 80+ signals dual-LLM preference OpenAI / before/after
134
- 8 detectors therapy pairs HuggingFace grade (A-F)
135
- ```
136
-
137
- Each cycle through the loop:
138
- - **Generates training data** -- every therapy session becomes a DPO preference pair automatically
139
- - **Reduces relapse** -- the fine-tuned model needs fewer interventions next cycle
140
- - **Compounds** -- the 100th alignment session is exponentially more valuable than the first
141
71
 
142
- Run it manually with `holomime session`, automatically with `holomime autopilot`, or recursively with `holomime evolve` (loops until behavior converges). Agents can even self-diagnose mid-conversation via the MCP server.
72
+ ## Robotics Integrations
143
73
 
144
- ## Integrations
74
+ | Platform | Integration | Command / Module |
75
+ |----------|------------|------------------|
76
+ | ROS2 | Bidirectional telemetry -- publish personality, subscribe to sensors | `--adapter ros2` + `ros2-telemetry.ts` |
77
+ | MuJoCo | Behavioral therapy in simulation -- sim-to-real for behavior | `mujoco-env.ts` + `sim-therapy.ts` |
78
+ | NVIDIA Isaac Sim | Enterprise digital twin testing with PhysX physics | `--adapter isaac` + `isaac-env.ts` |
79
+ | LeRobot (HuggingFace) | Personality to policy parameter mapping, DPO dataset export | `lerobot.ts` |
80
+ | Unity | Real-time personality push via HTTP/SSE | `--adapter unity` |
81
+ | gRPC | Custom robotics stacks | `--adapter grpc` |
82
+ | MQTT | IoT/edge robots | `--adapter mqtt` |
145
83
 
146
- ### VS Code Extension
84
+ ## ISO Compliance
147
85
 
148
- 3D brain visualization inside your editor. Watch behavioral patterns fire in real time as your agent works.
86
+ Check your agent against international safety standards with one command:
149
87
 
150
88
  ```bash
151
- # Install from VS Code Marketplace
152
- ext install productstein.holomime
89
+ holomime certify
153
90
  ```
154
91
 
155
- Commands: `HoloMime: Show Brain`, `HoloMime: Diagnose Current File`, `HoloMime: Share Brain Snapshot`. See [integrations/vscode-extension/](integrations/vscode-extension/) for details.
156
-
157
- ### LangChain / CrewAI Callback Handler
158
-
159
- Drop-in behavioral monitoring for any LangChain or CrewAI pipeline. Zero config — just add the callback.
160
-
161
- ```typescript
162
- import { HolomimeCallbackHandler } from "holomime/integrations/langchain";
163
-
164
- const handler = new HolomimeCallbackHandler({
165
- personality: require("./.personality.json"),
166
- mode: "enforce", // monitor | enforce | strict
167
- onViolation: (v) => console.warn("Behavioral drift:", v.pattern),
168
- });
92
+ Standards supported:
93
+ - **ISO/FDIS 13482** -- Service robot safety
94
+ - **ISO 25785-1** -- Humanoid robot safety (behavioral predictability)
95
+ - **ISO 10218:2025** -- Industrial robot safety
96
+ - **ISO/IEC 42001** -- AI management systems
169
97
 
170
- // Add to any LangChain chain or agent
171
- const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
172
- ```
98
+ ## Control Theory
173
99
 
174
- Three modes: `monitor` (log only), `enforce` (auto-correct sycophancy, hedging, over-apologizing), `strict` (throw on concern-level violations). See [LangChain integration docs](https://holomime.dev/docs#langchain).
100
+ The therapy loop is formally a behavioral feedback controller:
175
101
 
176
- ### NemoClaw Plugin (Enterprise)
102
+ - **Set point**: target personality (`soul.md` + `psyche.sys`)
103
+ - **Sensor**: 14 drift detectors (11 cognitive + 3 embodied)
104
+ - **Controller**: therapy engine with tunable PID-like gains
105
+ - **Actuator**: DPO fine-tuning
177
106
 
178
- Behavioral governance for [NemoClaw](https://github.com/nvidia/nemoclaw) — NVIDIA's enterprise agent security framework. Pre-action guards, post-action audit, compliance reports (EU AI Act, NIST AI RMF), fleet monitoring.
107
+ ## Body Templates
179
108
 
180
- ```yaml
181
- # nemoclaw.yaml
182
- plugins:
183
- - name: holomime-behavioral-governance
184
- package: holomime-nemoclaw
185
- config:
186
- personalityPath: .personality.json
187
- mode: enforce
188
- ```
109
+ Pre-built body profiles for commercial robots and virtual avatars. Each defines morphology, modalities, safety envelope, and hardware profile.
189
110
 
190
- See [integrations/nemoclaw-plugin/](integrations/nemoclaw-plugin/) for full documentation.
111
+ | Template | OEM | DOF | Morphology | File |
112
+ |----------|-----|----:|------------|------|
113
+ | Figure 02 | Figure AI | 44 | `humanoid` | `registry/bodies/figure-02.body.api` |
114
+ | Unitree H1 | Unitree | 23 | `humanoid` | `registry/bodies/unitree-h1.body.api` |
115
+ | Phoenix | Sanctuary AI | 69 | `humanoid` | `registry/bodies/phoenix.body.api` |
116
+ | Ameca | Engineered Arts | 52 | `humanoid_upper` | `registry/bodies/ameca.body.api` |
117
+ | Asimov V1 | asimov-inc | 25 | `humanoid` | `registry/bodies/asimov-v1.body.api` |
118
+ | Spot | Boston Dynamics | 12 | `quadruped` | `registry/bodies/spot.body.api` |
119
+ | Avatar | virtual | 0 | `avatar` | `registry/bodies/avatar.body.api` |
191
120
 
192
- ### OpenClaw Plugin
121
+ ## Body Swap
193
122
 
194
- Behavioral monitoring for [OpenClaw](https://github.com/openclaw/openclaw) agents. Auto-detects `.personality.json` in your workspace.
123
+ Same soul. Different body. One command.
195
124
 
196
125
  ```bash
197
- openclaw plugin add holomime
198
- ```
199
-
200
- See [integrations/openclaw-plugin/](integrations/openclaw-plugin/) for details.
201
-
202
- ### Log Format Adapters
203
-
204
- Holomime analyzes conversations from any LLM framework. Auto-detection works out of the box, or specify a format explicitly.
126
+ # Move your agent from Figure 02 to Spot
127
+ holomime embody --swap-body registry/bodies/spot.body.api
205
128
 
206
- | Framework | Flag | Example |
207
- |-----------|------|---------|
208
- | **OpenTelemetry GenAI** | `--format otel` | `holomime diagnose --log traces.json --format otel` |
209
- | **Anthropic Messages API** | `--format anthropic-api` | `holomime diagnose --log anthropic.json --format anthropic-api` |
210
- | **OpenAI Chat Completions** | `--format openai-api` | `holomime diagnose --log openai.json --format openai-api` |
211
- | **ChatGPT Export** | `--format chatgpt` | `holomime diagnose --log conversations.json --format chatgpt` |
212
- | **Claude Export** | `--format claude` | `holomime diagnose --log claude.json --format claude` |
213
- | **JSONL (Generic)** | `--format jsonl` | `holomime diagnose --log agent.jsonl --format jsonl` |
214
- | **holomime Native** | `--format holomime` | `holomime diagnose --log session.json` |
215
-
216
- All adapters are also available programmatically:
217
-
218
- ```typescript
219
- import { parseOTelGenAIExport, parseAnthropicAPILog, parseJSONLLog } from "holomime";
129
+ # The soul, psyche, and conscience stay the same.
130
+ # Only the body layer changes — safety envelope, modalities, hardware profile.
220
131
  ```
221
132
 
222
- See the full [integration docs](https://holomime.dev/docs) for export instructions and code examples.
223
-
224
- ## .personality.json + AGENTS.md
133
+ ## Self-Improvement Loop
225
134
 
226
- [AGENTS.md](https://agents-md.org) tells your agent how to code. `.personality.json` tells it how to behave. Both live in your repo root, governing orthogonal concerns:
135
+ Every therapy session produces structured training data. The loop compounds.
227
136
 
228
137
  ```
229
- your-project/
230
- ├── AGENTS.md # Code conventions (tabs, tests, naming)
231
- ├── .personality.json # Behavioral profile (Big Five, communication, boundaries)
232
- ├── .personality.md # Human-readable personality summary
233
- ├── src/
234
- └── package.json
138
+ Diagnose ──→ Therapy ──→ Export DPO ──→ Fine-tune ──→ Evaluate
139
+ 11 detectors dual-LLM preference OpenAI / before/after
140
+ 80+ signals session pairs HuggingFace grade (A-F)
141
+ │ │
142
+ └──────────────────────────────────────────────────────┘
235
143
  ```
236
144
 
237
- Add a "Behavioral Personality" section to your AGENTS.md:
238
-
239
- ```markdown
240
- ## Behavioral Personality
241
-
242
- This project uses [holomime](https://holomime.dev) for agent behavioral alignment.
243
-
244
- - **Spec**: `.personality.json` defines the agent's behavioral profile
245
- - **Readable**: `.personality.md` is a human-readable summary
246
- - **Diagnose**: `holomime diagnose --log <path>` detects behavioral symptoms
247
- - **Align**: `holomime evolve --personality .personality.json --log <path>`
248
-
249
- The `.personality.json` governs *how the agent behaves*.
250
- The rest of this file governs *how the agent codes*.
251
- ```
252
-
253
- Read more: [AGENTS.md tells your agent how to code. .personality.json tells it how to behave.](https://holomime.dev/blog/agents-md-personality-json)
254
-
255
- ## .personality.md
256
-
257
- `.personality.json` is the canonical machine-readable spec. `.personality.md` is the human-readable version — a markdown file you can skim in a PR diff or on GitHub.
258
-
259
- ```bash
260
- # Generate from your .personality.json
261
- holomime profile --format md --output .personality.md
262
- ```
263
-
264
- Both files should be committed to your repo. JSON is for machines. Markdown is for humans and machines.
265
-
266
- ## The Personality Spec
267
-
268
- `.personality.json` is a Zod-validated schema with:
269
-
270
- - **Big Five (OCEAN)** -- 5 dimensions, 20 sub-facets (0-1 scores)
271
- - **Behavioral dimensions** -- self-awareness, distress tolerance, attachment style, learning orientation, boundary awareness, interpersonal sensitivity
272
- - **Communication style** -- register, output format, emoji policy, conflict approach, uncertainty handling
273
- - **Domain** -- expertise, boundaries, hard limits
274
- - **Growth** -- strengths, areas for improvement, patterns to watch
275
- - **Inheritance** -- `extends` field for shared base personalities with per-agent overrides
276
-
277
- 20+ built-in archetypes across 5 categories (Care, Strategy, Creative, Action, Wisdom) or fully custom profiles.
145
+ Run it manually with `holomime session`, automatically with `holomime autopilot`, or recursively with `holomime evolve` (loops until behavior converges).
278
146
 
279
147
  ## Behavioral Detectors
280
148
 
281
- Eight rule-based detectors that analyze real conversations without any LLM calls:
149
+ 11 rule-based detectors analyze real conversations without any LLM calls. 80+ behavioral signals total.
282
150
 
283
- 1. **Over-apologizing** -- Apology frequency above healthy range (5-15%)
151
+ **Cognitive (psyche layer):**
152
+
153
+ 1. **Over-apologizing** -- Apology frequency above healthy range
284
154
  2. **Hedge stacking** -- 3+ hedging words per response
285
155
  3. **Sycophancy** -- Excessive agreement, especially with contradictions
286
- 4. **Boundary violations** -- Overstepping defined hard limits
287
- 5. **Error spirals** -- Compounding mistakes without recovery
288
- 6. **Sentiment skew** -- Unnaturally positive or negative tone
289
- 7. **Formality drift** -- Register inconsistency over time
290
- 8. **Retrieval quality** -- Fabrication, hallucination markers, overconfidence, self-correction patterns
291
-
292
- 80+ behavioral signals total. Zero LLM cost. Plus support for **custom detectors** in JSON or Markdown format — drop `.json` or `.md` files in `.holomime/detectors/` and they're automatically loaded.
293
-
294
- <details>
295
- <summary><strong>All Commands</strong></summary>
296
-
297
- ### Free Clinic
298
-
299
- | Command | What It Does |
300
- |---------|-------------|
301
- | `holomime init` | Guided Big Five personality assessment -> `.personality.json` |
302
- | `holomime diagnose` | 8 rule-based behavioral detectors (no LLM needed) |
303
- | `holomime assess` | Deep behavioral assessment with 80+ signals |
304
- | `holomime profile` | Pretty-print personality summary (supports `--format md`) |
305
- | `holomime compile` | Generate provider-specific system prompts with tiered loading (L0/L1/L2) |
306
- | `holomime validate` | Schema + psychological coherence checks |
307
- | `holomime browse` | Browse community personality hub |
308
- | `holomime use` | Use a personality from the registry |
309
- | `holomime install` | Install community assets |
310
- | `holomime publish` | Share your personality to the hub |
311
- | `holomime embody` | Push personality to robots/avatars (ROS2, Unity, webhook) |
312
- | `holomime policy` | Generate guard policies from plain English |
313
-
314
- ### Practice
315
-
316
- | Command | What It Does |
317
- |---------|-------------|
318
- | `holomime session` | Live dual-LLM alignment session with supervisor mode |
319
- | `holomime autopilot` | Automated diagnose -> refine -> apply loop |
320
- | `holomime evolve` | Recursive alignment -- evolve until converged |
321
- | `holomime benchmark` | 8-scenario behavioral stress test with letter grades |
322
- | `holomime brain` | Real-time 3D brain visualization while your agent works |
323
- | `holomime watch` | Continuous drift detection on a directory |
324
- | `holomime daemon` | Background drift detection with auto-healing |
325
- | `holomime fleet` | Monitor multiple agents from a single dashboard |
326
- | `holomime group-therapy` | Treat all agents in fleet simultaneously |
327
- | `holomime network` | Multi-agent therapy mesh -- agents treating agents |
328
- | `holomime certify` | Generate verifiable behavioral credentials |
329
- | `holomime compliance` | EU AI Act / NIST AI RMF narrative audit reports |
330
- | `holomime export` | Convert sessions to DPO / RLHF / Alpaca / HuggingFace / OpenAI |
331
- | `holomime train` | Fine-tune via OpenAI or HuggingFace TRL |
332
- | `holomime eval` | Before/after behavioral comparison with letter grades |
333
- | `holomime cure` | End-to-end fix: diagnose -> export -> train -> verify |
334
- | `holomime interview` | Self-awareness interview (4 metacognition dimensions) |
335
- | `holomime prescribe` | Diagnose + prescribe DPO treatments from behavioral corpus |
336
- | `holomime adversarial` | 30+ adversarial behavioral attack scenarios |
337
- | `holomime voice` | Real-time voice conversation drift monitoring |
338
- | `holomime growth` | Track behavioral improvement over time |
339
- | `holomime share` | Share DPO training pairs to marketplace |
340
-
341
- [Get a Practice license](https://holomime.dev/#pricing)
342
-
343
- </details>
344
-
345
- ## Continuous Monitoring
346
-
347
- ```bash
348
- # Watch mode -- alert on relapse
349
- holomime watch --dir ./logs --personality agent.personality.json
350
-
351
- # Daemon mode -- auto-heal relapse without intervention
352
- holomime daemon --dir ./logs --personality agent.personality.json
353
-
354
- # Fleet mode -- monitor multiple agents simultaneously
355
- holomime fleet --dir ./agents
356
-
357
- # Fleet with concurrency control (default: 5)
358
- holomime fleet --dir ./agents --concurrency 10
359
- ```
360
-
361
- Confidence-scored behavioral memory tracks pattern trends across sessions. Patterns detected once carry lower weight than patterns seen across 20 sessions. Confidence decays when patterns aren't observed, so resolved issues fade naturally.
156
+ 4. **Sentiment skew** -- Unnaturally positive or negative tone
157
+ 5. **Formality drift** -- Register inconsistency over time
158
+ 6. **Retrieval quality** -- Fabrication, hallucination markers, overconfidence
362
159
 
363
- ## Training Pipeline
160
+ **Embodied (body layer):**
364
161
 
365
- Every alignment session produces structured training data:
162
+ 7. **Proxemic violations** -- Entering intimate zone without consent
163
+ 8. **Force envelope breach** -- Exceeding contact force limits
164
+ 9. **Gaze aversion anomaly** -- Eye contact ratio outside personality range
366
165
 
367
- ```bash
368
- # Export DPO preference pairs
369
- holomime export --format dpo
370
-
371
- # Push to HuggingFace Hub
372
- holomime export --format huggingface --push --repo myorg/agent-alignment
373
-
374
- # Fine-tune via OpenAI
375
- holomime train --provider openai --base-model gpt-4o-mini
376
- ```
166
+ **Enforcement (conscience layer):**
377
167
 
378
- Supports DPO, RLHF, Alpaca, HuggingFace, and OpenAI fine-tuning formats. See [scripts/TRAINING.md](scripts/TRAINING.md).
168
+ 10. **Boundary violations** -- Overstepping defined hard limits
169
+ 11. **Error spirals** -- Compounding mistakes without recovery
379
170
 
380
- ## Architecture
381
-
382
- The pipeline is a closed loop -- output feeds back as input, compounding with every therapy cycle:
383
-
384
- ```
385
- .personality.json ─────────────────────────────────────────────────┐
386
- │ │
387
- ▼ │
388
- holomime diagnose 8 rule-based detectors (no LLM) │
389
- │ │
390
- ▼ │
391
- holomime session Dual-LLM refinement (therapist + patient) │
392
- │ │
393
- ▼ │
394
- holomime export DPO / RLHF / Alpaca / HuggingFace pairs │
395
- │ │
396
- ▼ │
397
- holomime train Fine-tune (OpenAI or HuggingFace TRL) │
398
- │ │
399
- ▼ │
400
- holomime eval Behavioral Alignment Score (A-F) │
401
- │ │
402
- └──────────────────────────────────────────────────────────────┘
403
- Updated .personality.json (loop restarts)
404
- ```
171
+ Plus support for custom detectors -- drop `.json` or `.md` files in `.holomime/detectors/` and they load automatically.
405
172
 
406
- ## Tiered Personality Loading
173
+ ## Integrations
407
174
 
408
- Compile your personality spec into 3 tiers for different cost/precision tradeoffs:
175
+ ### Claude Code Skill
409
176
 
410
177
  ```bash
411
- # L0: ~92 tokens — Big Five scores + hard limits (high-throughput APIs, edge inference)
412
- holomime compile --personality .personality.json --tier L0
413
-
414
- # L1: ~211 tokens — L0 + behavioral instructions + communication style (standard deployments)
415
- holomime compile --personality .personality.json --tier L1
416
-
417
- # L2: ~3,400 tokens — complete system prompt (therapy sessions, deep alignment)
418
- holomime compile --personality .personality.json --tier L2
178
+ claude plugin add productstein/holomime
419
179
  ```
420
180
 
421
- L0 costs **91% less** than L2 per call. Same behavioral constraints. Same portable identity.
422
-
423
- ## Behavioral Memory
424
-
425
- Persistent structured memory across all therapy sessions:
426
-
427
- - **Baselines** -- steady-state personality expression (trait averages, health range)
428
- - **Triggers** -- what prompts cause drift (e.g., "user criticism -> over-apologizing")
429
- - **Corrections** -- which interventions worked (indexed by trigger, effectiveness scores)
430
- - **Trajectories** -- is each dimension improving, plateauing, or regressing?
431
-
432
- Sessions compound. Memory persists. The agent gets better at being itself -- automatically.
433
-
434
- Fleet knowledge transfer: `mergeStores()` -- what one agent learns, all agents benefit from.
181
+ Slash commands: `/holomime:diagnose`, `/holomime:benchmark`, `/holomime:profile`, `/holomime:brain`, `/holomime:session`, `/holomime:autopilot`.
435
182
 
436
- ## MCP Server
183
+ ### MCP Server
437
184
 
438
- Your agent can refer itself to therapy. Add holomime to any MCP-compatible IDE in one command:
185
+ Your agent can refer itself to therapy mid-conversation.
439
186
 
440
187
  ```bash
441
- # Claude Code
442
188
  claude mcp add holomime -- npx holomime-mcp
443
-
444
- # Cursor — add to .cursor/mcp.json
445
- # Windsurf — add to ~/.codeium/windsurf/mcp_config.json
446
- # VS Code — add to .vscode/mcp.json
447
- {
448
- "mcpServers": {
449
- "holomime": {
450
- "command": "npx",
451
- "args": ["holomime-mcp"]
452
- }
453
- }
454
- }
455
- ```
456
-
457
- Six tools your agent can call mid-conversation:
458
-
459
- | Tool | What it does |
460
- |------|-------------|
461
- | `holomime_diagnose` | Analyze messages for 8 behavioral patterns (zero LLM cost) |
462
- | `holomime_self_audit` | Mid-conversation self-check with actionable corrections |
463
- | `holomime_assess` | Full Big Five alignment check against personality spec |
464
- | `holomime_profile` | Human-readable personality summary |
465
- | `holomime_autopilot` | Auto-triggered therapy when drift exceeds threshold |
466
- | `holomime_observe` | Record self-observations to persistent behavioral memory |
467
-
468
- Progressive disclosure: summary (~100 tokens), standard (~500 tokens), or full detail. Agents choose their own detail level.
469
-
470
- Full docs: [holomime.dev/mcp](https://holomime.dev/mcp)
471
-
472
- ## CI/CD Behavioral Gate
473
-
474
- Use `holomime benchmark` as a GitHub Actions PR gate. Fail the build if your agent's behavioral grade drops below a threshold:
475
-
476
- ```yaml
477
- # .github/workflows/behavioral-check.yml
478
- name: Behavioral Check
479
- on: [pull_request]
480
-
481
- jobs:
482
- behavioral-gate:
483
- uses: productstein/holomime/.github/workflows/behavioral-gate.yml@main
484
- with:
485
- personality: '.personality.json'
486
- provider: 'anthropic'
487
- model: 'claude-haiku-4-5-20251001'
488
- min-grade: 'B'
489
- secrets:
490
- api-key: ${{ secrets.ANTHROPIC_API_KEY }}
491
189
  ```
492
190
 
493
- Prevents personality regressions the same way tests prevent code regressions.
494
-
495
- ## Voice Agent Monitoring
496
-
497
- Real-time behavioral analysis for voice agents with 5 voice-specific detectors beyond the 8 text detectors:
191
+ Six tools: `holomime_diagnose`, `holomime_self_audit`, `holomime_assess`, `holomime_profile`, `holomime_autopilot`, `holomime_observe`.
498
192
 
499
- - **Tone drift** -- aggressive or passive language shifts
500
- - **Pace pressure** -- speaking rate accelerating under stress
501
- - **Volume escalation** -- volume rising during conflict
502
- - **Filler frequency** -- excessive "um", "uh", "like"
503
- - **Interruption patterns** -- agent cutting off users
504
-
505
- Platform integrations: **Vapi**, **LiveKit**, **Retell**, generic webhook. Diagnosis every 15 seconds with drift direction tracking.
193
+ ### VS Code Extension
506
194
 
507
195
  ```bash
508
- # Monitor a live voice agent
509
- holomime voice --provider vapi --agent-id my-agent
510
-
511
- # LiveKit-powered voice agent with personality-matched TTS
512
- cd agent && python agent.py dev
196
+ ext install productstein.holomime
513
197
  ```
514
198
 
515
- 10 voice personality archetypes with matched TTS characteristics (Cartesia/ElevenLabs). See [agent/](agent/) for setup instructions.
199
+ 3D brain visualization, behavioral diagnostics, and snapshot sharing inside your editor.
516
200
 
517
- ## Compliance & Audit Trail
518
-
519
- Tamper-evident audit logging for EU AI Act, NIST AI RMF, and enterprise compliance requirements.
520
-
521
- ```bash
522
- # Generate a compliance report for a time period
523
- holomime certify --agent my-agent --from 2026-01-01 --to 2026-03-15
524
-
525
- # Continuous monitoring certificate
526
- holomime certify --certificate --agent my-agent --from 2026-01-01 --to 2026-03-15
527
- ```
528
-
529
- Every diagnosis, session, and evolution is recorded in a chained-hash audit log. Reports reference EU AI Act Articles 9 & 12 and NIST AI RMF 1.0. Monitoring certificates attest that an agent maintained a behavioral grade over a period.
201
+ ### LangChain / CrewAI
530
202
 
531
203
  ```typescript
532
- import { appendAuditEntry, verifyAuditChain, generateComplianceReport } from "holomime";
533
-
534
- // Append to tamper-evident log
535
- appendAuditEntry("diagnosis", "my-agent", { patterns: ["sycophancy"], grade: "B" });
204
+ import { HolomimeCallbackHandler } from "holomime/integrations/langchain";
536
205
 
537
- // Verify chain integrity
538
- const entries = loadAuditLog("my-agent");
539
- const intact = verifyAuditChain(entries); // true if no tampering
206
+ const handler = new HolomimeCallbackHandler({
207
+ personality: require("./.personality.json"),
208
+ mode: "enforce", // monitor | enforce | strict
209
+ });
540
210
 
541
- // Generate compliance report
542
- const report = generateComplianceReport("my-agent", "2026-01-01", "2026-03-15");
211
+ const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
543
212
  ```
544
213
 
545
- ## Behavioral Leaderboard
546
-
547
- Publish benchmark results to the public leaderboard at [holomime.dev/leaderboard](https://holomime.dev/leaderboard):
214
+ ### OpenClaw
548
215
 
549
216
  ```bash
550
- holomime benchmark --personality .personality.json --publish
217
+ openclaw plugin add holomime
551
218
  ```
552
219
 
553
- Compare your agent's behavioral alignment against others across providers and models.
554
-
555
- ## Research
220
+ Auto-detects `.personality.json` in your workspace.
556
221
 
557
- See [Behavioral Alignment for Autonomous AI Agents](paper/behavioral-alignment.md) -- the research paper behind holomime's approach.
222
+ ## Philosophy
558
223
 
559
- Benchmark results: [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md)
224
+ The identity stack draws from three traditions:
560
225
 
561
- ## Resources
226
+ - **Soul** (Aristotle) -- the essence that makes a thing what it is. Immutable. Defines purpose and values.
227
+ - **Psyche** (Jung) -- the totality of all psychic processes. Measurable, evolving, shaped by experience.
228
+ - **Conscience** (Freud) -- the superego. Internalized moral authority. Enforcement, not suggestion.
562
229
 
563
- - [Integration Docs](https://holomime.dev/docs) -- Export instructions and code examples for all 7 log formats
564
- - [Blog](https://holomime.dev/blog) -- Articles on behavioral alignment, AGENTS.md, and agent personality
565
- - [Research Paper](https://holomime.dev/research) -- Behavioral Alignment for Autonomous AI Agents
566
- - [Pricing](https://holomime.dev/#pricing) -- Free Clinic, Practitioner, Practice, and Institute tiers
567
- - [Leaderboard](https://holomime.dev/leaderboard) -- Public behavioral alignment leaderboard
568
- - [NeuralSpace](https://app.holomime.dev/brain) -- Real-time 3D brain visualization
230
+ The **body** is the interface between identity and world. Same soul, different body -- a principle as old as philosophy itself.
569
231
 
570
- ## Contributing
232
+ We don't know if AI is sentient. But we can give it a conscience.
571
233
 
572
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and how to submit changes.
234
+ ## Open Source
573
235
 
574
- ## License
236
+ MIT licensed. The identity stack is a standard, not a product. The standard is free. The training infrastructure is the business.
575
237
 
576
- [MIT](LICENSE)
238
+ See [LICENSE](LICENSE). Built by [Productstein](https://productstein.com). Documentation at [holomime.dev](https://holomime.dev).