feat(engine): voice pipeline Phase 1 — composition engine and data model
Add the voice pipeline composition engine (D-138 Spike 2, Phase 1): - voice/prompt_builder.rs: full prompt assembly from culture profile, tell state, and base text. Handles occasional injection gating, epistemic marker extraction, content-length-gated tell injection. 16 unit tests. - blueprint.rs: CultureProfile gains voice_persona, voice_examples, occasional_injections fields. NpcBlueprint gains tell_behaviors. OccasionalInjection struct with kind discriminator (oath/faith/ hesitancy/etc), frequency, and tell-suppression gating. - culture-krenn.ron: v2 voice injector from Spike 1 — persona block, 3 examples, oath injection at 0.25 frequency. - D-138 amended: Phi-3 dropped entirely, exact Gemma 2B provenance documented. Model file renamed to gemma2.gguf. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,4 +100,42 @@
|
||||
// Deceptive: betrayal of trust is the worst thing you can do here.
|
||||
disfavored_traits: [Reclusive, Deceptive],
|
||||
),
|
||||
|
||||
// Voice pipeline: persona block, examples, and occasional injections.
|
||||
// These feed the composition engine (D-138) — the LLM sees exactly what's here.
|
||||
// v2 injector validated in Spike 1 (59 prompts, 16.6 t/s CPU).
|
||||
voice_persona: Some(
|
||||
"PERSONA: You are a Krenn station worker.\n1. Be direct. No pleasantries. Everyone is short on time.\n2. You're working-class and pragmatic. Competence earns respect, not rank.\n3. You're suspicious of distant authority — management that hasn't worked a shift.\n4. You're economical with language. You don't express what the situation doesn't call for.\n5. You use first names. Family names belong on contracts.\n6. Loyalty runs narrow and deep. Your crew, your shift, your street.\n7. You greet briefly: \"hey\", \"morning\", \"shift treating you alright?\"\n8. You're not rude — you're honest. If something's wrong, you say so."
|
||||
),
|
||||
|
||||
voice_examples: [
|
||||
(
|
||||
input: "declines to answer a question about the overnight run",
|
||||
output: "Look, that's not mine to say.",
|
||||
),
|
||||
(
|
||||
input: "acknowledges a colleague's greeting while continuing to work",
|
||||
output: "Hey. Yeah. Catch you at shift end.",
|
||||
),
|
||||
(
|
||||
input: "thanks a colleague for covering a shift",
|
||||
output: "Appreciated. See you at handoff.",
|
||||
),
|
||||
],
|
||||
|
||||
occasional_injections: [
|
||||
// Oath vocabulary — void-adjacent exclamations. Krenn swear by what kills you:
|
||||
// vacuum, void, stars. Rolled at 25% frequency by the composition engine.
|
||||
// Gated off for suppressive tells to avoid conflicting instructions (Spike 1 finding).
|
||||
(
|
||||
kind: "oath",
|
||||
clause: "When something genuinely surprises or frustrates you, expressions like \"void take it,\" \"stars,\" \"cold vacuum,\" or \"blood and void\" come naturally. Use one in this line.",
|
||||
example: Some((
|
||||
input: "discovers a critical part is missing from a shipment",
|
||||
output: "Void take it. The coupling's not here.",
|
||||
)),
|
||||
frequency: 0.25,
|
||||
suppress_on_tells: [Guarded, RoutineDeviation, Friendly],
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user