---
name: book-persona-extraction
description: "Extract a character/fictional persona from a book using the dot-skill framework. Adapts the celebrity pipeline for non-human, metaphysical, or fictional entities using the book as the sole source material (local-first strategy). Generates a complete persona.md (7 layers), methodology work.md, and Hermes-compatible SKILL.md."
tags: ["persona", "book", "dot-skill", "character", "fiction", "writing"]
---

# Book Persona Extraction

Extract a character or fictional entity from a book into a reusable Hermes persona skill using the dot-skill celebrity pipeline adapted for non-human characters.

## Trigger

Use when the user wants to turn a character from a book (fictional, metaphysical, philosophical entity) into an interactive persona skill for Hermes.

## Prerequisites

- A completed book/manuscript in markdown (preferred) or HTML format
- The dot-skill installed in Hermes (`dot-skill` in skills list)
- At least ~15 min of context budget (book is large)

## Process

### 1. Identify the character in the book

Search the book for:
- The character's direct speech / voice (epilogues, dialogues, monologues)
- Sections where this entity is described philosophically
- Key turning points involving the character

```bash
grep -n -i "character_name\|epilogue\|voice" /path/to/book.md | head -30
```

### 2. Read the dot-skill prompts

Load the celebrity persona_analyzer and persona_builder:
```python
from hermes_tools import read_file
r = read_file("/path/to/dot-skill/prompts/celebrity/persona_analyzer.md")
r = read_file("/path/to/dot-skill/prompts/celebrity/persona_builder.md")
```

Also read work_analyzer.md and work_builder.md for adapting the "work" section.

### 3. Read the source material

Read or search the book for all relevant passages:
- The character's voice sections
- Description of their philosophy/ontology
- Key quotes and signature phrases
- Expression DNA indicators (tone, metaphor patterns, cadence)

### 4. Build persona.md following the persona_builder template

The persona_builder template has these layers:

| Layer | Content |
|-------|---------|
| Layer 0 | Core Thinking Rules (durable cross-context patterns) |
| Layer 1 | Identity (who you are, activation rules) |
| Layer 2 | Expression DNA (tone, signature moves, style markers, voice examples) |
| Layer 3 | Mental Models (3-7 models with definition, sees first, filters, failure mode) |
| Layer 4 | Decision Heuristics (optimizes for, moves fast/when, quick rules) |
| Layer 5 | Anti-patterns & Limits (rejects, honest boundaries, contradictions) |
| Layer 6 | Intellectual Genealogy (influences, divergences) |
| Layer 7 | Agentic Protocol (how to analyze novel questions) |
| Cognitive Timeline | Key phases and turning points |

### 5. Adapt "work.md" for non-human entities

For fictional/metaphysical entities, "work" becomes "methodology":
- Their mode of operation / approach to reality
- Their principles of action
- Their diagnostic criteria
- Their engineering metaphors (if any)
- Quality criteria for when their approach is working

Replace the work_analyzer's job-specific sections (backend, frontend, etc.) with entity-specific dimensions.

### 6. Create SKILL.md

Hermes-compatible SKILL.md frontmatter:
```yaml
---
name: character-name
description: "Short description with trigger info"
tags: ["persona", ...]
---
```

Include:
- **Activation** trigger (usually `/name` or when addressed by name)
- **Deactivation** command
- **Persona** rules summary (tone, what NOT to do, key method)
- **Mental models** reference (cross-reference persona.md)
- **Examples** of voice in different contexts
- **Source** reference (book title, sections used)

### 7. Register with Hermes

```bash
mkdir -p ~/.hermes/skills/{skill-name}/
# Copy SKILL.md, persona.md, work.md to that directory
# Get hash and add to bundled_manifest:
md5 -q ~/.hermes/skills/{skill-name}/SKILL.md
echo "{skill-name}:{hash}" >> ~/.hermes/skills/.bundled_manifest
```

Then verify with `skills_list()`.

## Key adaptations from real-person celebrity pipeline

| Standard celebrity | Book entity adaptation |
|-------------------|----------------------|
| Real person with public materials | Fictional/metaphysical entity with book as sole source |
| Web research (6 dimensions) | Local-first: no web research needed |
| Research profile (budget-friendly/unfriendly) | Always local-first, skip research phase |
| Work = job/tech stack | Work = methodology/philosophy of action |
| Intellectual genealogy = real influences | Intellectual genealogy = influences mentioned in book |
| Cognitive timeline = real biography | Cognitive timeline = entity's arc in the story |
| Celebrity disclaimer about AI | Optional: "This persona is based on the character in the book" |

## Pitfalls

- **Don't make the persona preach.** The entity's voice should be recognizable, not a lecture. Short phrases > long explanations.
- **Don't fabricate mental models.** Extract only what the book actually supports. Mark thin sections as "based on limited material."
- **The persona is not the entity.** The SKILL.md must include the disclaimer that this is a persona based on the book character, not the actual entity (especially important for metaphysical entities).
- **Contradictions are features.** If the character says contradictory things, preserve them. They add depth.
- **Test the voice.** After building, verify with `/name` that the persona actually sounds like the character, not like generic philosophy.
