corpus-persona-extraction
Ingest a corpus of session logs (JSONL transcripts, chat exports) and extract a persona profile — vocabulary frequency, unique idioms and coinages, structural analogies — then synthesize an ideal_yearning and archetypal_pattern and append the result to a {persona_id}.lexicon.yaml. Triggers on "extract persona", "build a lexicon", "map the domain language", or any request to process conversation logs into a voice/vocabulary model.
Best use case
corpus-persona-extraction is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Ingest a corpus of session logs (JSONL transcripts, chat exports) and extract a persona profile — vocabulary frequency, unique idioms and coinages, structural analogies — then synthesize an ideal_yearning and archetypal_pattern and append the result to a {persona_id}.lexicon.yaml. Triggers on "extract persona", "build a lexicon", "map the domain language", or any request to process conversation logs into a voice/vocabulary model.
Teams using corpus-persona-extraction should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/corpus-persona-extraction/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How corpus-persona-extraction Compares
| Feature / Agent | corpus-persona-extraction | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Ingest a corpus of session logs (JSONL transcripts, chat exports) and extract a persona profile — vocabulary frequency, unique idioms and coinages, structural analogies — then synthesize an ideal_yearning and archetypal_pattern and append the result to a {persona_id}.lexicon.yaml. Triggers on "extract persona", "build a lexicon", "map the domain language", or any request to process conversation logs into a voice/vocabulary model.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Corpus Persona-Extraction
Distill *how a specific voice thinks and speaks* from a pile of session logs, and persist it as a machine-usable lexicon that downstream agents can write against.
## Why this exists
Agents that work with a long-running human collaborator keep re-learning the same voice from scratch: the coinages, the load-bearing metaphors, the sentence shapes that mean "yes, proceed" versus "you've missed the point." A lexicon file makes that knowledge durable and composable — voice-enforcement gates can score against it, drafting skills can imitate it, and translation layers (persona storefronts) can project from it.
## Core doctrine
- **User coinages outrank standard vocabulary.** When the corpus shows an idiosyncratic term for a concept ("vacuum", "organ", "cartridge", "liturgy"), the lexicon records the coinage as primary and the standard term as gloss — never the reverse.
- **Append-only.** Each extraction run adds a dated block. Prior blocks are evidence of drift, not errors to clean up.
- **Separate speakers ruthlessly.** A transcript interleaves human, assistant, and tool text. Only the persona's own turns feed frequency analysis; assistant paraphrase contaminates the signal.
## Workflow
### 1. Assemble and filter the corpus
- Gather session files; record provenance (paths, date range, message counts) in the extraction header.
- Parse each format to (speaker, timestamp, text) tuples; keep only `speaker == persona_id` turns.
- Strip quoted/pasted material (code blocks, tool output, copied text) — the persona's *own* prose only.
- **Redact before analysis**: run the corpus through secret/PII patterns first; a lexicon must be shareable.
### 2. Vocabulary frequency
- Tokenize; compute frequency ranks for unigrams/bigrams/trigrams.
- Diff against a general-English baseline: the interesting set is terms whose corpus rank vastly exceeds baseline rank (keyness), not raw frequency.
- Bucket results: domain terms (shared with field), **coinages** (absent from baseline entirely), and inflections (standard words used in non-standard senses).
### 3. Idioms and structural analogies
- Idioms: recurring multiword expressions with stable meaning ("fix bases, not outputs", "the soul persists").
- Structural analogies: the source domains the persona habitually maps from — music, anatomy, liturgy, architecture. Record each as `analogy: {source_domain} → {target_domain}` with 2-3 verbatim examples.
- Register markers: profanity patterns, emphasis habits (caps, em-dashes), sentence-length distribution, imperative density.
### 4. Synthesize ideal_yearning and archetypal_pattern
These two fields are the lexicon's soul — short synthesized statements, each grounded in ≥3 verbatim quotes:
- **`ideal_yearning`** — what the persona is reaching toward across all sessions; the recurring wish underneath the tasks. Written as one sentence in the persona's own idiom.
- **`archetypal_pattern`** — the recurring role/shape the persona enacts (e.g. "the conductor who builds the orchestra rather than playing the instrument"). One sentence plus the evidence quotes.
These are *hypotheses*, marked with extraction date and confidence — later blocks may revise them.
### 5. Append to the lexicon
```yaml
# {persona_id}.lexicon.yaml — append block, never rewrite
- extraction:
date: 2026-06-07
corpus: {files: 128, persona_turns: 1432, date_range: [2026-04-17, 2026-06-07]}
redaction: {patterns_run: true, hits_scrubbed: 0}
vocabulary:
coinages:
- term: vacuum
gloss: "an absence that is unrepresented anywhere durable; never a resting state"
examples: ["N/A is a vacuum", "vacuum field burn"]
domain_terms: [...]
inflections: [...]
idioms:
- phrase: "fix bases, not outputs"
meaning: "modify the source/template/pipeline, never the rendered artifact"
analogies:
- source: liturgy/theology
target: configuration management
examples: ["Tier-0 Liturgy", "the Reliquary", "testament"]
register:
profanity: "affection-marker, not hostility"
emphasis: ["em-dash chains", "bold imperatives"]
ideal_yearning: "…" # one sentence, persona's idiom, ≥3 quote citations
archetypal_pattern: "…"
```
### 6. Report
Emit a short extraction report: new coinages since last block, terms that dropped out (candidate drift), and any revision to yearning/pattern with the evidence that forced it. Commit lexicon + report together.
## Anti-patterns
- **Extracting from assistant turns.** The most common contamination; the lexicon ends up describing the model, not the persona.
- **Overwriting prior blocks.** Drift between blocks is the most valuable longitudinal signal; preserve it.
- **Unredacted lexicons.** Verbatim example quotes can carry credentials/PII from the source sessions; redact at extraction time, not later.
- **Synthesizing yearning from one loud session.** Require cross-session recurrence (≥3 sessions) before a theme reaches the yearning/pattern fields.Related Skills
personalized-storefront-render
Translate internal markdown artifacts (pitch decks, business plans, research) into per-persona client-facing storefront surfaces in the client's domain language with ELI5/TLDR layers. Sits above Product Domain Engine and 8-Strata Domain Ideal-Whole; invokes voice-enforcement against persona-specific voice_constitution. Triggers on requests for client-facing surfaces, persona-tuned translation, ELI5/TLDR projections, or storefront-style client deliverables. Render is scaffold-and-curate (never auto-publish) to protect client trust.
natural-center-extraction
Apply narratological scoring to a text, transcript, or recording transcript — rating contiguous spans for pathos, logos, ethos, kairos, and density — then extract the single highest-scoring contiguous block as the work's Natural Center, with a scoring table and justification. Triggers on "find the natural center", "extract the most dramatic moment", "what's the strongest passage", or pulling the peak block from a long artifact for a short, excerpt, or trailer.
document-audit-extraction
Audit document collections to extract features, identify patterns, assess quality, and build structured inventories. Covers metadata extraction, content classification, gap analysis, and coverage mapping. Triggers on document audit, content inventory, or document feature extraction requests.
taxonomy-modeling-design
Phase 2 of the pentaphase structural-overhaul protocol. Classifies entities, standardizes attributes, establishes relationships, and designs the access framework. Use when the user invokes phase 2 of an overhaul, asks to "design the taxonomy" or "model the structure", or has completed a landscape audit and is ready to redesign. Consumes phase-1-landscape-report.md; produces phase-2-taxonomy-model.md.
systemic-ingestion-normalization
Phase 4 of the pentaphase structural-overhaul protocol. Purges redundancies, enriches and aligns legacy entities to the new schema, executes phased ingestion into the new environment, and audits integrity. Use when the user invokes phase 4 of an overhaul, asks to "migrate the data" or "ingest into the new system", or has a configured environment ready to accept legacy entities. Consumes phase-3-environment-spec.md; produces phase-4-ingestion-report.md.
system-environment-configuration
Phase 3 of the pentaphase structural-overhaul protocol. Translates the taxonomy model into objective technical criteria, evaluates candidate mechanisms or frameworks, instantiates the chosen architecture, and programs validation rules. Use when the user invokes phase 3 of an overhaul, asks to "select a system" or "configure the environment", or has a taxonomy model and is ready to choose technology. Consumes phase-2-taxonomy-model.md; produces phase-3-environment-spec.md.
pentaphase-orchestrator
Threads the full five-phase structural-overhaul protocol — landscape discovery, taxonomy design, environment configuration, systemic ingestion, governance evolution — for any substrate the user names. Use when the user requests a structural overhaul, system redesign, or end-to-end restructuring of a documentation system, asset registry, code monorepo, knowledge base, or operational workflow; or when they explicitly invoke the pentaphase methodology. Coordinates handoffs between phase-skills and seats validation gates between phases.
landscape-discovery-audit
Phase 1 of the pentaphase structural-overhaul protocol. Inventories assets, maps current flow, identifies friction, and defines value metrics for any substrate. Use when the user invokes phase 1 of an overhaul, requests a baseline audit, asks to "discover the landscape" of a system, or wants to understand current state before redesigning. Produces phase-1-landscape-report.md.
governance-evolution-protocol
Phase 5 of the pentaphase structural-overhaul protocol. Codifies operational protocols, onboards the ecosystem of participants, programs behavior monitoring, and establishes an iteration cadence so the substrate evolves rather than calcifies. Use when the user invokes phase 5 of an overhaul, asks to "establish governance" or "lock in the protocols", or has completed ingestion and is ready to declare the substrate operational. Consumes phase-4-ingestion-report.md; produces phase-5-governance-charter.md, which closes the protocol.
dimension-surfacing
Surfaces the parallel domain dimensions implicit in a dense or minimal prompt. Use when a user prompt is small on the surface but plainly implies multiple independent domains needing different expertise; when explicitly invoked by the coliseum-orchestrator skill as Phase 1; or when the user asks "what dimensions does this prompt encode" or "what axes does this break into." Produces a named dimension set where each dimension is independently executable and not a paraphrase of another.
coliseum-dispatch
Dispatches a composed set of assignment envelopes to domain-expert subagents in parallel, in a single message with multiple Agent tool calls. Enforces the no-pingpong gate via the pingpong-detector agent before any dispatch fires. Use when invoked by the coliseum-orchestrator as Phase 3; when envelopes are already composed and the next step is parallel execution; or when the user asks to "fan out" or "dispatch in parallel." Produces a dispatch log capturing what was sent, when, and where returns land.
assignment-composition
Wraps each surfaced dimension as a self-contained 9-section autonomous-work-assignment envelope — scope, context, success criteria, allowed tools, return format, handoff — all the recipient subagent needs to execute without coming back. Use when invoked by coliseum-orchestrator as Phase 2; when dimensions are named and the next step is to make each independently dispatchable; or when the user asks "compose this as an assignment." The no-pingpong gate validates each envelope before dispatch.