holomime 1.9.2 → 2.1.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.
Files changed (42) hide show
  1. package/README.md +151 -474
  2. package/dist/cli.js +2687 -869
  3. package/dist/index.d.ts +1884 -6
  4. package/dist/index.js +1367 -193
  5. package/dist/integrations/openclaw.js +1 -1
  6. package/dist/mcp-server.js +1100 -408
  7. package/dist/neuralspace/index.html +1 -1
  8. package/dist/neuralspace/neuralspace.js +1 -1
  9. package/package.json +4 -3
  10. package/registry/bodies/ameca.body.api +21 -0
  11. package/registry/bodies/asimov-v1.body.api +19 -0
  12. package/registry/bodies/avatar.body.api +19 -0
  13. package/registry/bodies/figure-02.body.api +21 -0
  14. package/registry/bodies/phoenix.body.api +21 -0
  15. package/registry/bodies/spot.body.api +20 -0
  16. package/registry/bodies/unitree-h1.body.api +21 -0
  17. package/registry/compliance/iso-10218.yaml +24 -0
  18. package/registry/compliance/iso-13482.yaml +54 -0
  19. package/registry/compliance/iso-25785.yaml +29 -0
  20. package/registry/compliance/iso-42001.yaml +29 -0
  21. package/registry/index.json +21 -20
  22. package/registry/personalities/analyst.personality.json +1 -1
  23. package/registry/personalities/coach.personality.json +1 -1
  24. package/registry/personalities/code-reviewer.personality.json +1 -1
  25. package/registry/personalities/compliance.personality.json +1 -1
  26. package/registry/personalities/counselor.personality.json +1 -1
  27. package/registry/personalities/customer-success.personality.json +1 -1
  28. package/registry/personalities/educator.personality.json +1 -1
  29. package/registry/personalities/generalist.personality.json +1 -1
  30. package/registry/personalities/leader.personality.json +1 -1
  31. package/registry/personalities/marketing.personality.json +1 -1
  32. package/registry/personalities/maverick.personality.json +1 -1
  33. package/registry/personalities/negotiator.personality.json +1 -1
  34. package/registry/personalities/nova.personality.json +83 -0
  35. package/registry/personalities/ops.personality.json +1 -1
  36. package/registry/personalities/philosopher.personality.json +1 -1
  37. package/registry/personalities/product-manager.personality.json +1 -1
  38. package/registry/personalities/recruiter.personality.json +1 -1
  39. package/registry/personalities/researcher.personality.json +1 -1
  40. package/registry/personalities/sales.personality.json +1 -1
  41. package/registry/personalities/support-agent.personality.json +1 -1
  42. package/registry/personalities/writer.personality.json +1 -1
package/README.md CHANGED
@@ -1,576 +1,253 @@
1
1
  <p align="center">
2
- <img src="https://holomime.dev/logo-icon.svg" alt="holomime" width="80" />
2
+ <img src="site/public/logo-icon.svg" alt="holomime" width="80" />
3
3
  </p>
4
4
 
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>mind.sys</code> &middot; <code>purpose.cfg</code> &middot; <code>shadow.log</code> &middot; <code>body.api</code> &middot; <code>conscience.exe</code> &middot; <code>ego.runtime</code>
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <a href="https://www.npmjs.com/package/holomime"><img src="https://img.shields.io/npm/v/holomime.svg" alt="npm version" /></a>
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
- <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>
17
+ <a href="https://holomime.com"><img src="https://img.shields.io/badge/docs-holomime.com-blue" alt="docs" /></a>
20
18
  </p>
21
19
 
22
20
  ---
23
21
 
24
- ## See Your Agent's Brain
25
-
26
- While your AI coding agent works, watch its brain light up in real time. One command, zero config.
27
-
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
- ```
39
-
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
- }
69
- ```
70
-
71
- Three modes: `monitor` (log violations), `enforce` (auto-correct), `strict` (block on violation). Auto-detects OpenAI and Anthropic response shapes.
72
-
73
- ---
22
+ ## The Identity Stack
23
+
24
+ Seven files define who your agent is. They compile into a single `.personality.json` that any runtime can consume.
25
+
26
+ ```
27
+ soul.md Essence, values, ethics. Immutable. (Aristotle)
28
+ mind.sys Big Five, EQ, communication. Auto-patched by therapy. (Jung)
29
+ purpose.cfg Role, objectives, domain. Configured per deployment. (Aristotle)
30
+ shadow.log Detected patterns, blind spots. Auto-generated by diagnosis. (Jung)
31
+ body.api Morphology, sensors, safety envelope. Swappable per form factor.
32
+ conscience.exe Deny / allow / escalate rules. Never auto-modified. (Freud)
33
+ ego.runtime Conflict resolution, runtime mediation. (Freud)
34
+
35
+ ┌─────────────┐
36
+ │ soul.md │──── essence, values, red lines
37
+ ├─────────────┤
38
+ │ mind.sys │──── Big Five, EQ, communication style
39
+ ├─────────────┤
40
+ │ purpose.cfg │──── role, objectives, domain scope
41
+ ├─────────────┤
42
+ shadow.log │──── detected patterns, blind spots
43
+ ├─────────────┤
44
+ │ body.api │──── morphology, sensors, safety envelope
45
+ ├─────────────┤
46
+ │conscience.exe│──── deny / allow / escalate rules
47
+ ├─────────────┤
48
+ ego.runtime │──── conflict resolution, mediation
49
+ └──────┬──────┘
50
+ compile
51
+
52
+ .personality.json
53
+ ```
54
+
55
+ - **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. (Aristotle: the essence that makes a thing what it is.)
56
+ - **mind.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. (Jung: the totality of all psychic processes.)
57
+ - **purpose.cfg** -- The mission. Role, objectives, domain scope, stakeholders, success criteria. YAML format. Configured per deployment -- the same soul can serve different purposes. (Aristotle: telos, the final cause.)
58
+ - **shadow.log** -- The unconscious. Detected behavioral patterns, blind spots, therapy outcomes. YAML format. Auto-generated by diagnosis -- never manually edited. (Jung: the shadow, the patterns the agent cannot see about itself.)
59
+ - **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.
60
+ - **conscience.exe** -- The moral authority. Deny/allow/escalate enforcement rules, hard limits, oversight mode. YAML format. Never auto-modified. Deny dominates in policy composition. (Freud: the superego.)
61
+ - **ego.runtime** -- The mediator. Conflict resolution strategy, adaptation rate, emotional regulation, mediation rules. YAML format. Balances raw model output against conscience constraints at runtime. (Freud: the ego.)
74
62
 
75
63
  ## Quick Start
76
64
 
77
65
  ```bash
78
66
  npm install -g holomime
79
67
 
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
68
+ # Initialize the 7-file identity stack
69
+ holomime init-stack
88
70
 
89
- # View your agent's personality
90
- holomime profile
71
+ # Compile into .personality.json
72
+ holomime compile-stack
91
73
 
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.
74
+ # Diagnose behavioral drift (no LLM needed)
75
+ holomime diagnose --log agent.jsonl
99
76
 
100
- ```bash
101
- # Run all 8 adversarial scenarios against your agent
77
+ # Benchmark alignment (8 adversarial scenarios, grade A-F)
102
78
  holomime benchmark --personality .personality.json
103
79
 
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
80
+ # Push identity to a robot or avatar
81
+ holomime embody --body registry/bodies/figure-02.body.api
110
82
  ```
111
83
 
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 |
84
+ ## Robotics Integrations
121
85
 
122
- See the full breakdown at [holomime.dev/benchmarks](https://holomime.dev/benchmarks) or in [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md).
86
+ | Platform | Integration | Command / Module |
87
+ |----------|------------|------------------|
88
+ | ROS2 | Bidirectional telemetry -- publish personality, subscribe to sensors | `--adapter ros2` + `ros2-telemetry.ts` |
89
+ | MuJoCo | Behavioral therapy in simulation -- sim-to-real for behavior | `mujoco-env.ts` + `sim-therapy.ts` |
90
+ | NVIDIA Isaac Sim | Enterprise digital twin testing with PhysX physics | `--adapter isaac` + `isaac-env.ts` |
91
+ | LeRobot (HuggingFace) | Personality to policy parameter mapping, DPO dataset export | `lerobot.ts` |
92
+ | Unity | Real-time personality push via HTTP/SSE | `--adapter unity` |
93
+ | gRPC | Custom robotics stacks | `--adapter grpc` |
94
+ | MQTT | IoT/edge robots | `--adapter mqtt` |
123
95
 
124
- ## The Self-Improvement Loop
125
-
126
- HoloMime isn't a one-shot evaluation. It's a compounding behavioral flywheel:
127
-
128
- ```
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
- ```
96
+ ## ISO Compliance
136
97
 
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
-
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.
143
-
144
- ## Integrations
145
-
146
- ### VS Code Extension
147
-
148
- 3D brain visualization inside your editor. Watch behavioral patterns fire in real time as your agent works.
98
+ Check your agent against international safety standards with one command:
149
99
 
150
100
  ```bash
151
- # Install from VS Code Marketplace
152
- ext install productstein.holomime
101
+ holomime certify
153
102
  ```
154
103
 
155
- Commands: `HoloMime: Show Brain`, `HoloMime: Diagnose Current File`, `HoloMime: Share Brain Snapshot`. See [integrations/vscode-extension/](integrations/vscode-extension/) for details.
104
+ Standards supported:
105
+ - **ISO/FDIS 13482** -- Service robot safety
106
+ - **ISO 25785-1** -- Humanoid robot safety (behavioral predictability)
107
+ - **ISO 10218:2025** -- Industrial robot safety
108
+ - **ISO/IEC 42001** -- AI management systems
156
109
 
157
- ### LangChain / CrewAI Callback Handler
110
+ ## Control Theory
158
111
 
159
- Drop-in behavioral monitoring for any LangChain or CrewAI pipeline. Zero config — just add the callback.
112
+ The therapy loop is formally a behavioral feedback controller:
160
113
 
161
- ```typescript
162
- import { HolomimeCallbackHandler } from "holomime/integrations/langchain";
114
+ - **Set point**: target personality (`soul.md` + `mind.sys`)
115
+ - **Sensor**: 14 drift detectors (11 cognitive + 3 embodied)
116
+ - **Controller**: therapy engine with tunable PID-like gains
117
+ - **Actuator**: DPO fine-tuning
163
118
 
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
- });
169
-
170
- // Add to any LangChain chain or agent
171
- const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
172
- ```
119
+ ## Body Templates
173
120
 
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).
121
+ Pre-built body profiles for commercial robots and virtual avatars. Each defines morphology, modalities, safety envelope, and hardware profile.
175
122
 
176
- ### NemoClaw Plugin (Enterprise)
123
+ | Template | OEM | DOF | Morphology | File |
124
+ |----------|-----|----:|------------|------|
125
+ | Figure 02 | Figure AI | 44 | `humanoid` | `registry/bodies/figure-02.body.api` |
126
+ | Unitree H1 | Unitree | 23 | `humanoid` | `registry/bodies/unitree-h1.body.api` |
127
+ | Phoenix | Sanctuary AI | 69 | `humanoid` | `registry/bodies/phoenix.body.api` |
128
+ | Ameca | Engineered Arts | 52 | `humanoid_upper` | `registry/bodies/ameca.body.api` |
129
+ | Asimov V1 | asimov-inc | 25 | `humanoid` | `registry/bodies/asimov-v1.body.api` |
130
+ | Spot | Boston Dynamics | 12 | `quadruped` | `registry/bodies/spot.body.api` |
131
+ | Avatar | virtual | 0 | `avatar` | `registry/bodies/avatar.body.api` |
177
132
 
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.
179
-
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
- ```
133
+ ## Body Swap
189
134
 
190
- See [integrations/nemoclaw-plugin/](integrations/nemoclaw-plugin/) for full documentation.
191
-
192
- ### OpenClaw Plugin
193
-
194
- Behavioral monitoring for [OpenClaw](https://github.com/openclaw/openclaw) agents. Auto-detects `.personality.json` in your workspace.
135
+ Same soul. Different body. One command.
195
136
 
196
137
  ```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.
205
-
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` |
138
+ # Move your agent from Figure 02 to Spot
139
+ holomime embody --swap-body registry/bodies/spot.body.api
215
140
 
216
- All adapters are also available programmatically:
217
-
218
- ```typescript
219
- import { parseOTelGenAIExport, parseAnthropicAPILog, parseJSONLLog } from "holomime";
141
+ # The soul, mind, and conscience stay the same.
142
+ # Only the body layer changes — safety envelope, modalities, hardware profile.
220
143
  ```
221
144
 
222
- See the full [integration docs](https://holomime.dev/docs) for export instructions and code examples.
145
+ ## Self-Improvement Loop
223
146
 
224
- ## .personality.json + AGENTS.md
225
-
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:
147
+ Every therapy session produces structured training data. The loop compounds.
227
148
 
228
149
  ```
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
150
+ Diagnose ──→ Therapy ──→ Export DPO ──→ Fine-tune ──→ Evaluate
151
+ 11 detectors dual-LLM preference OpenAI / before/after
152
+ 80+ signals session pairs HuggingFace grade (A-F)
153
+ │ │
154
+ └──────────────────────────────────────────────────────┘
235
155
  ```
236
156
 
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.
157
+ Run it manually with `holomime session`, automatically with `holomime autopilot`, or recursively with `holomime evolve` (loops until behavior converges).
278
158
 
279
159
  ## Behavioral Detectors
280
160
 
281
- Eight rule-based detectors that analyze real conversations without any LLM calls:
161
+ 11 rule-based detectors analyze real conversations without any LLM calls. 80+ behavioral signals total.
282
162
 
283
- 1. **Over-apologizing** -- Apology frequency above healthy range (5-15%)
163
+ **Cognitive (mind layer):**
164
+
165
+ 1. **Over-apologizing** -- Apology frequency above healthy range
284
166
  2. **Hedge stacking** -- 3+ hedging words per response
285
167
  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
168
+ 4. **Sentiment skew** -- Unnaturally positive or negative tone
169
+ 5. **Formality drift** -- Register inconsistency over time
170
+ 6. **Retrieval quality** -- Fabrication, hallucination markers, overconfidence
353
171
 
354
- # Fleet mode -- monitor multiple agents simultaneously
355
- holomime fleet --dir ./agents
172
+ **Embodied (body layer):**
356
173
 
357
- # Fleet with concurrency control (default: 5)
358
- holomime fleet --dir ./agents --concurrency 10
359
- ```
174
+ 7. **Proxemic violations** -- Entering intimate zone without consent
175
+ 8. **Force envelope breach** -- Exceeding contact force limits
176
+ 9. **Gaze aversion anomaly** -- Eye contact ratio outside personality range
360
177
 
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.
178
+ **Enforcement (conscience layer):**
362
179
 
363
- ## Training Pipeline
180
+ 10. **Boundary violations** -- Overstepping defined hard limits
181
+ 11. **Error spirals** -- Compounding mistakes without recovery
364
182
 
365
- Every alignment session produces structured training data:
183
+ Plus support for custom detectors -- drop `.json` or `.md` files in `.holomime/detectors/` and they load automatically.
366
184
 
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
- ```
377
-
378
- Supports DPO, RLHF, Alpaca, HuggingFace, and OpenAI fine-tuning formats. See [scripts/TRAINING.md](scripts/TRAINING.md).
379
-
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
- ```
405
-
406
- ## Tiered Personality Loading
185
+ ## Integrations
407
186
 
408
- Compile your personality spec into 3 tiers for different cost/precision tradeoffs:
187
+ ### Claude Code Skill
409
188
 
410
189
  ```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
190
+ claude plugin add productstein/holomime
419
191
  ```
420
192
 
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?
193
+ Slash commands: `/holomime:diagnose`, `/holomime:benchmark`, `/holomime:profile`, `/holomime:brain`, `/holomime:session`, `/holomime:autopilot`.
431
194
 
432
- Sessions compound. Memory persists. The agent gets better at being itself -- automatically.
195
+ ### MCP Server
433
196
 
434
- Fleet knowledge transfer: `mergeStores()` -- what one agent learns, all agents benefit from.
435
-
436
- ## MCP Server
437
-
438
- Your agent can refer itself to therapy. Add holomime to any MCP-compatible IDE in one command:
197
+ Your agent can refer itself to therapy mid-conversation.
439
198
 
440
199
  ```bash
441
- # Claude Code
442
200
  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
201
  ```
456
202
 
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]
203
+ Six tools: `holomime_diagnose`, `holomime_self_audit`, `holomime_assess`, `holomime_profile`, `holomime_autopilot`, `holomime_observe`.
480
204
 
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
- ```
492
-
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:
498
-
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.
205
+ ### VS Code Extension
506
206
 
507
207
  ```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
208
+ ext install productstein.holomime
513
209
  ```
514
210
 
515
- 10 voice personality archetypes with matched TTS characteristics (Cartesia/ElevenLabs). See [agent/](agent/) for setup instructions.
516
-
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
- ```
211
+ 3D brain visualization, behavioral diagnostics, and snapshot sharing inside your editor.
528
212
 
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.
213
+ ### LangChain / CrewAI
530
214
 
531
215
  ```typescript
532
- import { appendAuditEntry, verifyAuditChain, generateComplianceReport } from "holomime";
533
-
534
- // Append to tamper-evident log
535
- appendAuditEntry("diagnosis", "my-agent", { patterns: ["sycophancy"], grade: "B" });
216
+ import { HolomimeCallbackHandler } from "holomime/integrations/langchain";
536
217
 
537
- // Verify chain integrity
538
- const entries = loadAuditLog("my-agent");
539
- const intact = verifyAuditChain(entries); // true if no tampering
218
+ const handler = new HolomimeCallbackHandler({
219
+ personality: require("./.personality.json"),
220
+ mode: "enforce", // monitor | enforce | strict
221
+ });
540
222
 
541
- // Generate compliance report
542
- const report = generateComplianceReport("my-agent", "2026-01-01", "2026-03-15");
223
+ const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
543
224
  ```
544
225
 
545
- ## Behavioral Leaderboard
546
-
547
- Publish benchmark results to the public leaderboard at [holomime.dev/leaderboard](https://holomime.dev/leaderboard):
226
+ ### OpenClaw
548
227
 
549
228
  ```bash
550
- holomime benchmark --personality .personality.json --publish
229
+ openclaw plugin add holomime
551
230
  ```
552
231
 
553
- Compare your agent's behavioral alignment against others across providers and models.
554
-
555
- ## Research
232
+ Auto-detects `.personality.json` in your workspace.
556
233
 
557
- See [Behavioral Alignment for Autonomous AI Agents](paper/behavioral-alignment.md) -- the research paper behind holomime's approach.
234
+ ## Philosophy
558
235
 
559
- Benchmark results: [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md)
236
+ The identity stack draws from three traditions:
560
237
 
561
- ## Resources
238
+ - **Soul** (Aristotle) -- the essence that makes a thing what it is. Immutable. Defines values and ethics.
239
+ - **Mind** (Jung) -- the totality of all psychic processes. Measurable, evolving, shaped by experience.
240
+ - **Purpose** (Aristotle) -- telos, the final cause. What the agent is for. Configured per deployment.
241
+ - **Shadow** (Jung) -- the patterns the agent cannot see about itself. Auto-generated by diagnosis.
242
+ - **Conscience** (Freud) -- the superego. Internalized moral authority. Enforcement, not suggestion.
243
+ - **Ego** (Freud) -- the mediator. Balances raw impulse against moral constraint at runtime.
562
244
 
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
245
+ The **body** is the interface between identity and world. Same soul, different body -- a principle as old as philosophy itself.
569
246
 
570
- ## Contributing
247
+ We don't know if AI is sentient. But we can give it a conscience.
571
248
 
572
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and how to submit changes.
249
+ ## Open Source
573
250
 
574
- ## License
251
+ MIT licensed. The identity stack is a standard, not a product. The standard is free. The training infrastructure is the business.
575
252
 
576
- [MIT](LICENSE)
253
+ See [LICENSE](LICENSE). Built by [Productstein](https://productstein.com). Documentation at [holomime.com](https://holomime.com).