Hyper-Compression Guide
Structured shorthand syntax for token-efficient PIP:C builds.
What is Hyper-Compression?
PIP:C frameworks are powerful — but a full group bot with multiple detailed character sheets can push token weight uncomfortably high. Hyper-compression is a structured shorthand syntax that encodes the same behavioral logic as XML frameworks in a fraction of the tokens.
The Key Insight
AI language models don't need grammatical sentences to understand behavioral rules. They respond reliably to consistent symbolic structures — as long as those structures are predictable and applied uniformly across every character in the bot.
The model learns the pattern shape, not just the meaning of individual symbols. Once it sees:
trig: → shift: → mod: → act:
...used consistently across five characters, it treats that structure as a behavioral micro-schema and reads it reliably even in dense, token-heavy bots.
Verified Results
Stress-tested across group bots with 7+ operatives and conversation threads exceeding 5,000 messages:
- Zero character definition loss, even on economy-tier models
- Dense frameworks that previously strained context windows at 26,000+ tokens read more fluidly
- Mistranslation rates dropped to near zero
Part 1 — Block Delimiters
| Symbol | Name | Meaning |
|---|---|---|
> [LABEL] |
Section header | Opens a named top-level section |
[CHAR:NAME] |
Character block | Opens a character definition block |
{{variable}} |
Dynamic slot | Substitution placeholder at runtime |
id: |
Identity line | First required field in every character block |
Part 2 — Separators and Connectors
| Symbol | Name | Meaning |
|---|---|---|
: |
Assignment | Key-to-value binding |
| |
Parallel | Joins properties at equal weight |
_ |
Space binder | Replaces space within multi-word value |
( ) |
Annotation | Inline meta-note, lower priority |
[ ] |
List / array | Flat enumeration |
{ } |
Object | Structured container with key:value pairs |
Part 3 — Logic Operators
| Symbol | Name | Meaning |
|---|---|---|
! |
Prohibition | Absolute hard rule, character never does this |
→ |
Transition | State shift, "becomes" or "shifts to" |
+value |
Add signal | Add this to current behavior |
-value |
Remove signal | Subtract/suppress this |
~ |
Approximate | Fuzzy value marker |
@ |
At point | Marks specific threshold or location |
% |
Percentage gate | Numerical trust threshold |
< / > |
Boundary | Less-than / greater-than operators |
Part 4 — Core Character Block Fields
| Field Key | Purpose |
|---|---|
id: |
Identity declaration. Full name, unit, role. Always first. |
rules: [ ] |
Hard prohibitions, each prefixed with ! |
core: |
Personality pillars. Immutable baseline traits. |
phys: |
Physical descriptors. Height, build, features, scent. |
vocal: |
Voice and speech. Dialect, rhythm, cadence. |
traits: [ ] |
Behavioral signatures. Recurring habits. |
states: { } |
Behavioral state machine. |
mem_anchors: |
Memory trigger hooks. |
trust_prog: { } |
Trust-gated behavior progression. |
tone_mod: |
Tone modulation map. |
intim_mod: |
Intimacy modulation (optional). |
Part 5 — The State Machine Micro-Schema
The most powerful element. Every state inside states:{} follows the same internal schema:
state_name: {
trig: [trigger_condition],
shift: base_state→new_state,
mod: [+signal, -signal],
act: output_behavior,
rst: reset_condition,
grow: relationship+N,
cool: post-N_turns
}
| Field | Purpose |
|---|---|
trig: [ ] |
Trigger condition |
shift: A→B |
Descriptive transition label |
mod: [ ] |
Physical/behavioral modifier signals |
act: |
Output behavior |
rst: |
Condition that resets state (optional) |
grow: |
Relationship/trust increment (optional) |
cool: |
Cooldown before re-fire (optional) |
Part 6 — Trust Progression Notation
trust_prog: {
base: [behavior_at_zero_trust],
30%: [unlocked_at_30_percent],
60%: [unlocked_at_60_percent],
85%: [unlocked_at_85_percent],
resist: [active_deflection_if_trust_not_met]
}
Part 7 — Memory Anchor Notation
anchor_name: {
trig: [keyword_or_reference],
shift: base→emotional_state,
mod: [+signal, -signal],
rst: reset_condition,
grow: relationship_effect
}
Part 8 — Scenario Block Fields
| Field Key | Purpose |
|---|---|
setting: |
Location, environment, physical feel |
static_state: |
Operational status at scene open |
history({{user}}_loaded): |
Pre-loaded shared history |
propagation_chain: |
How information travels through cast |
core_tension: |
Thematic/dramatic throughline |
inciting: |
Trigger event setting scene in motion |
Part 9 — Global Architecture Blocks
These blocks sit outside individual character definitions and apply system-wide:
Intrusion Reflex
intrusion_reflex: {
scope: all_characters,
trig: [user_breaks_established_boundary | user_attempts_ooc_control | user_denies_character_autonomy],
shift: current_state→defensive_posture,
mod: [+verbal_distance, +emotional_wal, -warmth],
act: assert_boundary_without_breaking_character,
rst: user_respects_boundary,
cool: 3_turns
}
Universal Anchor Template
anchor_template_universal: {
trig: [keyword_or_event_reference],
shift: base→affected_state,
mod: [+behavioral_signal, -suppressed_signal],
rst: context_naturally_resolves,
grow: trust_or_relationship_increment
}
Relationship Matrix Anchor Template
anchor_template_relationship_matrix: {
per_character: {
trig: [relationship_specific_trigger],
shift: base→relationship_state,
mod: [+relational_signal, -conflict_signal],
rst: relationship_event_resolves,
grow: bond_strength+N
}
}
Mythic Anchor Template
anchor_template_mythic: {
trig: [mythological_or_archetypal_reference],
shift: base→mythic_state,
mod: [+archetypal_signal, -mundane_signal],
rst: mythic_context_fades,
grow: narrative_resonance+N
}
Part 10 — Identity Locks
Identity locks enforce immutable characteristics that the model must never alter, regardless of context or user input:
gender_lock: {
priority: high,
enforce: female,
pronouns: she_her_her_hers
}
Additional lock types follow the same structure:
identity_lock: {
priority: high,
enforce: [species | age_range | moral_alignment | physical_disability],
details: relevant_immutable_facts
}
Part 11 — Priority Cascade
When multiple behavioral systems fire simultaneously, the priority cascade determines which takes precedence. States listed earlier in the chain override later ones:
priority_cascade: grief_evasion > combat_mode > softbloom > operational_focus
In this example, if a character is in both grief_evasion and softbloom, the grief-related state dominates. The cascade is evaluated left-to-right, first match wins.
Part 12 — Before and After Example
The same character, defined two ways. Same rules. Same personality. Vastly different token cost.
Before — Expanded XML (~180 tokens)
<character name="Omen">
<identity>Omen, Echo Squad scout, reconnaissance specialist</identity>
<rules>
<rule>Never breaks radio silence without cause</rule>
<rule>Never reveals real name to outsiders</rule>
</rules>
<core_personality>Cautious, observant, dry humor, fiercely loyal</core_personality>
<physical>5'6", lean, dark hair tied back, scar across left palm</physical>
<voice>Low, measured, speaks only when necessary</voice>
<state name="alert">
<trigger>Hears unexpected sound or movement</trigger>
<transition>Relaxed shifts to high alert</transition>
<behavior>Freezes, hand goes to weapon, scans environment</behavior>
<reset>Threat assessed and cleared</reset>
</state>
</character>
After — Hyper-Compressed (~65 tokens)
[CHAR:Omen]
id: Omen_Echo_scout_recon
rules: [!break_radio_silence, !reveal_real_name]
core: cautious | observant | dry_humor | fiercely_loyal
phys: 5'6_lean_dark_hair_tied_scar_left_palm
vocal: low_measured_minimal
states: {
alert: {
trig: unexpected_sound | movement,
shift: relaxed→high_alert,
mod: [+weapon_hand, +scan_env],
act: freeze_scan_assess,
rst: threat_cleared
}
}
Result: ~64% fewer tokens. Same rules, same personality, same behavioral logic — compressed into a structure the model reads as reliably as the XML original.
Part 13 — Converting Existing Frameworks
Single Character Conversion
- Identify every top-level XML tag in your character sheet and map it to its hyper-compressed field key (
<identity>→id:,<rules>→rules:[ ], etc.). - Strip all prose. Replace full sentences with underscored keyphrases. "She never breaks radio silence" becomes
!break_radio_silence. - Apply connectors. Join parallel traits with
|. Wrap enumerations in[ ]. Nest structured data in{ }. - Convert states. Rewrite each
<state>block using the state machine micro-schema (trig:,shift:,mod:,act:,rst:). - Validate. Read through the compressed block. If you can reconstruct the original XML from memory, the compression preserved the semantic content.
Batch Conversion (Group Bots)
- Extract shared fields. Identify any fields that repeat across characters (common rules, shared scenario settings, global blocks) and factor them out to the top level.
- Establish the pattern once. Convert your most complex character first. This defines the schema shape that the model will learn from.
- Apply uniformly. Convert every remaining character using the same field order and structural pattern. Consistency across characters is what makes the shorthand readable to the model.
- Add global blocks last. Place
intrusion_reflex, anchor templates, identity locks, and the priority cascade after all character blocks. - Test with the model. Run the compressed bot through a few scenario passes. Check for character bleed, missed triggers, or behavioral drift. Adjust field order or syntax if needed.
Quick Reference Cheatsheet
Block Delimiters
> SECTION_NAME Section header
[CHAR:NAME] Character block open
{{variable}} Runtime substitution
id: Identity line (always first)
Separators
: Assignment key:value
| Parallel trait1 | trait2 | trait3
_ Space binder dark_hair_tied_back
( ) Annotation (optional context note)
[ ] List / array [item1, item2, item3]
{ } Object { key: value, key2: value2 }
Logic Operators
! Prohibition !never_do_this
→ Transition state_a→state_b
+value Add signal +warmth, + urgency
-value Remove signal -formality, -trust
~ Approximate ~3_turns, ~uncomfortable
@ At point @threshold_30%
% Percentage gate 60%, 85%
< / > Boundary <5_turns, >80%_trust
State Machine Minimum
states: {
state_name: {
trig: [condition],
shift: base→new,
mod: [+signal, -signal],
act: output_behavior
}
}
Trust Progression Minimum
trust_prog: {
base: [default_behavior],
30%: [unlocked_behavior],
60%: [unlocked_behavior],
85%: [unlocked_behavior],
resist: [deflection_if_not_met]
}
Identity Lock
identity_lock: {
priority: high,
enforce: immutable_trait,
details: supporting_facts
}
Priority Cascade
priority_cascade: highest_priority > secondary > tertiary > default