docs(diagrams): add decision diagrams across all domains

16 d2 diagrams covering architecture (IPC bridge, system tiers,
testability, audio bus), data flow (perception, dialogue, eavesdrop
pipelines), entity (knowledge graph, NPC generation, dialogue tags),
state (simulation tiers, movement stances, knowledge confidence), and
UI (HUD layout, interaction flow, fog layers). PNG output for universal
viewer compatibility. Removes test SVG from font debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 11:57:07 +01:00
co-authored by Claude Opus 4.6
parent 08dfadb863
commit 1e556ccca2
33 changed files with 2153 additions and 97 deletions
+101
View File
@@ -0,0 +1,101 @@
# Dialogue + Monologue Tag Taxonomy — D-035, D-028
# Converged tag schema for tagged line pools.
# Structural tags (required), selection tags (recommended), monologue additions.
# Includes Sprint 8 + 14 + 15 amendments.
vars: {
color-bg: "#2a3040"
color-stroke: "#333340"
color-text: "#c8d0e0"
color-accent: "#c8d8f0"
color-dim: "#1a1e24"
}
dialogue_line: Dialogue Line {
shape: sql_table
id: "{npc-slug}_{d|m}_{###}" {constraint: primary_key}
text: String
role: enum (template-defined role)
access: list<enum> (public · insider · authority · peer · hostile)
trust: enum (surface · real · secret)
situation: list<enum> (14 situations)
topic: list<enum> (9 topics — optional)
mood: list<enum> (8 moods — optional)
tags: list<string> (freeform — optional)
}
monologue_line: Monologue Line {
shape: sql_table
id: "{npc-slug}_m_{s|d}_{###}" {constraint: primary_key}
character: enum (smuggler · detective) {constraint: not_null}
trigger: enum (9 triggers) {constraint: not_null}
prerequisite: map or null
dual_lens: map (authoring-only)
notes: String (authoring-only)
}
access_values: AccessTier values {
shape: sql_table
public: Public — default, anyone
insider: Insider — social network member
authority: Authority — institutional role
peer: Peer — known colleague
hostile: Hostile — adversarial context
}
trust_values: TrustTier values {
shape: sql_table
surface: Surface — any relationship + any confidence
real: Real — (Friendly|Known) + KnowsOf+
secret: Secret — Friendly + KnowsDetails+
}
situation_values: Situation (14) {
shape: sql_table
s1: first_meeting
s2: regular_contact
s3: after_conflict
s4: work_context
s5: social_context
s6: private_context
s7: witnessed_something
s8: under_suspicion
s9: post_confrontation
s10: trust_broken
s11: urgent
s12: relaxed
s13: farewell
s14: greeting
}
mood_values: Mood (8) {
shape: sql_table
m1: anxious
m2: frustrated
m3: content
m4: suspicious
m5: warm
m6: hostile
m7: relieved
m8: focused
}
trigger_values: Monologue Triggers (9) {
shape: sql_table
t1: enter_location
t2: observe_npc
t3: hear_sound
t4: observe_anomaly
t5: post_conversation
t6: discover_evidence
t7: witness_interaction
t8: time_idle
t9: return_visit
}
dialogue_line -> access_values: "access field" { style.stroke: ${color-accent} }
dialogue_line -> trust_values: "trust field" { style.stroke: ${color-accent} }
dialogue_line -> situation_values: "situation field" { style.stroke: ${color-stroke} }
dialogue_line -> mood_values: "mood field" { style.stroke: ${color-stroke} }
monologue_line -> dialogue_line: "extends" { style.stroke: ${color-accent} }
monologue_line -> trigger_values: "trigger field" { style.stroke: ${color-accent} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 753 KiB

+88
View File
@@ -0,0 +1,88 @@
# Knowledge Graph Data Model — D-041
# Per-entity bevy_ecs Component with BTreeMap storage.
# Confidence hierarchy, knowledge state, knowledge source, event-driven updates.
vars: {
color-bg: "#2a3040"
color-stroke: "#333340"
color-text: "#c8d0e0"
color-accent: "#c8d8f0"
color-dim: "#1a1e24"
}
KnowledgeGraph: KnowledgeGraph {
shape: sql_table
entity_knowledge: BTreeMap<StableId, EntityKnowledge>
fact_knowledge: BTreeMap<FactId, FactKnowledge>
}
EntityKnowledge: EntityKnowledge {
shape: sql_table
stable_id: StableId(u64) {constraint: foreign_key}
confidence: KnowledgeConfidence
state: KnowledgeState
source: KnowledgeSource
last_observed_tick: u64
}
FactKnowledge: FactKnowledge {
shape: sql_table
fact_id: FactId {constraint: primary_key}
confidence: KnowledgeConfidence
state: KnowledgeState
source: KnowledgeSource
last_observed_tick: u64
}
KnowledgeConfidence: KnowledgeConfidence {
shape: sql_table
direct: Direct — currently in LOS
knows_details: KnowsDetails — actionable (secret tier)
knows_of: KnowsOf — involved in Y (real tier)
suspects: Suspects — something off (surface tier)
}
KnowledgeState: KnowledgeState {
shape: sql_table
active: Active — believed true
contradicted: Contradicted — conflict detected (Sprint 3+)
stale: Stale — aged beyond threshold (Sprint 3+)
}
KnowledgeSource: KnowledgeSource {
shape: sql_table
direct_observation: DirectObservation
heard: Heard
told_by: ToldBy (Sprint 3+)
inferred: Inferred (Sprint 3+)
background: Background
}
EntityRegistry: EntityRegistry {
shape: sql_table
stable_to_entity: BTreeMap<StableId, Entity>
entity_to_stable: BTreeMap<Entity, StableId>
}
KnowledgeEventQueue: KnowledgeEventQueue\n(bevy_ecs Resource) {
shape: queue
style.fill: ${color-dim}
style.stroke: ${color-accent}
style.font-color: ${color-text}
}
KnowledgeGraph -> EntityKnowledge: "contains many"
KnowledgeGraph -> FactKnowledge: "contains many"
EntityKnowledge -> KnowledgeConfidence: "uses"
EntityKnowledge -> KnowledgeState: "uses"
EntityKnowledge -> KnowledgeSource: "uses"
FactKnowledge -> KnowledgeConfidence: "uses"
FactKnowledge -> KnowledgeState: "uses"
FactKnowledge -> KnowledgeSource: "uses"
EntityKnowledge -> EntityRegistry: "StableId lookup" {
style.stroke: ${color-accent}
style.stroke-dash: 4
}
KnowledgeEventQueue -> KnowledgeGraph: "drained each tick\n→ writes components" {
style.stroke: ${color-accent}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

+154
View File
@@ -0,0 +1,154 @@
# NPC Generation Model — D-024, D-025
# 10 axes + combat component. Social site / functional cluster as atomic template unit.
vars: {
color-bg: "#2a3040"
color-stroke: "#333340"
color-text: "#c8d0e0"
color-accent: "#c8d8f0"
color-dim: "#1a1e24"
}
direction: right
npc: NPC (generated) {
shape: person
style.fill: ${color-bg}
style.stroke: ${color-accent}
style.font-color: ${color-text}
}
essential: 7 Essential Axes {
style.fill: ${color-dim}
style.stroke: ${color-accent}
style.font-color: ${color-text}
want: Want {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
secret: Secret / Vulnerability {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
relationships: Relationships (1-3) {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
tolerance: Tolerance Threshold {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
routine: Daily Routine {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
info_inv: Information Inventory {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
contentment: Contentment {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
}
supporting: 3 Supporting Axes {
style.fill: ${color-dim}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
personality: Personality Traits (2-3) {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
tell: Tell System {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
skills: Skill Set {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
}
combat_comp: CombatCapability\n(optional ECS component) {
shape: package
style.fill: ${color-bg}
style.stroke: ${color-accent}
style.font-color: ${color-text}
style.stroke-dash: 4
}
key_interactions: Key Contradiction Interactions {
style.fill: ${color-dim}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
i1: Want × Secret {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
i2: Routine × Secret {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
i3: Tolerance × Relationships {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
i4: Want × Relationships {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
i5: Personality × Tolerance {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
}
social_site: Social Site\n(atomic Tier 2 template unit) {
style.fill: ${color-dim}
style.stroke: ${color-accent}
style.font-color: ${color-text}
group: Social Group (4-8 NPCs)\n2+ triangles + 1 cross-template triangle {
style.fill: ${color-bg}
style.stroke: ${color-accent}
style.font-color: ${color-text}
}
cluster: Functional Cluster\n15-40 tiles, internal sightlines {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
ownership: NPC Ownership\nowned by 1 template, referenced by others {
style.fill: ${color-bg}
style.stroke: ${color-stroke}
style.font-color: ${color-text}
}
}
npc -> essential: "generated with" { style.stroke: ${color-accent} }
npc -> supporting: "generated with" { style.stroke: ${color-stroke} }
supporting.skills -> combat_comp: "combat tag → component" {
style.stroke: ${color-accent}
style.stroke-dash: 4
}
essential -> key_interactions: "produces" { style.stroke: ${color-stroke} }
npc -> social_site: "placed in" { style.stroke: ${color-accent} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 634 KiB