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:
@@ -0,0 +1,152 @@
|
||||
# Knowledge Confidence State Machine — D-041
|
||||
# 4-level confidence hierarchy with state tracking and decay.
|
||||
# Maps to dialogue trust tiers (D-075) and fog recognition (D-059).
|
||||
|
||||
vars: {
|
||||
color-bg: "#2a3040"
|
||||
color-stroke: "#333340"
|
||||
color-text: "#c8d0e0"
|
||||
color-accent: "#c8d8f0"
|
||||
color-dim: "#1a1e24"
|
||||
}
|
||||
|
||||
none: No Knowledge\n(entity unknown) {
|
||||
shape: oval
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
suspects: Suspects\n"something off" {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
knows_of: KnowsOf\n"X is involved in Y" {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
knows_details: KnowsDetails\n"actionable detail" {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
direct: Direct\n"currently in LOS" {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
style.bold: true
|
||||
}
|
||||
|
||||
dialogue_gates: Dialogue Trust Gate (D-075) {
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
|
||||
surface: Surface tier\n(any confidence) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
real: Real tier\n(KnowsOf+ AND Friendly/Known) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
secret: Secret tier\n(KnowsDetails+ AND Friendly) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
}
|
||||
|
||||
fog_gate: Fog Recognition (D-059) {
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
|
||||
recognized: Recognized entity\n(D-033 color + silhouette) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
unrecognized: Grey blob\n(no identity) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
}
|
||||
|
||||
knowledge_states: KnowledgeState {
|
||||
shape: package
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
|
||||
active: Active (Sprint 2) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
contradicted: Contradicted (Sprint 3+)\nToldBy conflicts DirectObservation {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
stale: Stale (Sprint 3+)\naged past DecayThreshold {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
}
|
||||
|
||||
none -> suspects: "observe anomaly\nor receive tip" {
|
||||
style.stroke: ${color-stroke}
|
||||
}
|
||||
suspects -> knows_of: "further observation\nor testimony" {
|
||||
style.stroke: ${color-stroke}
|
||||
}
|
||||
knows_of -> knows_details: "direct evidence\nor confrontation" {
|
||||
style.stroke: ${color-accent}
|
||||
}
|
||||
knows_details -> direct: "enter LOS" {
|
||||
style.stroke: ${color-accent}
|
||||
}
|
||||
direct -> knows_details: "exit LOS" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
|
||||
# Decay path (D-041: once per game-minute)
|
||||
knows_details -> knows_of: "decay\n(last_observed_tick age)" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
knows_of -> suspects: "decay" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
|
||||
suspects -> dialogue_gates.surface
|
||||
knows_of -> dialogue_gates.real
|
||||
knows_details -> dialogue_gates.secret
|
||||
|
||||
suspects -> fog_gate.unrecognized
|
||||
knows_of -> fog_gate.recognized
|
||||
knows_details -> fog_gate.recognized
|
||||
|
||||
knows_details -> knowledge_states.contradicted: "ToldBy vs DirectObservation\n(Sprint 3+)" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
knows_of -> knowledge_states.stale: "decay (Sprint 3+)" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
none -> knowledge_states.active
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 638 KiB |
@@ -0,0 +1,111 @@
|
||||
# Movement Stance State Machine — D-053, D-054, D-055
|
||||
# Toggle ladder: Sprint / Walk / Careful / Crouch / (Prone future).
|
||||
# Server-authoritative tile-based movement. Client Tween interpolation.
|
||||
|
||||
vars: {
|
||||
color-bg: "#2a3040"
|
||||
color-stroke: "#333340"
|
||||
color-text: "#c8d0e0"
|
||||
color-accent: "#c8d8f0"
|
||||
color-dim: "#1a1e24"
|
||||
}
|
||||
|
||||
sprint: Sprint {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
style.bold: true
|
||||
}
|
||||
|
||||
sprint_detail: 1 tile/tick · loud footsteps\nMonologue 40% (urgent only)\nInteraction buffer CLEARED (D-055)\nSprint double-take: anomaly monologue fires retroactively {
|
||||
shape: page
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
walk: Walk\n(default stance) {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
walk_detail: 1 tile/2 ticks · normal footsteps\nMonologue 100%\nDefault — MovementProfile component {
|
||||
shape: page
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
careful: Careful {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
careful_detail: 1 tile/3 ticks · quiet footsteps\nMonologue 150% + tell notice bonus\nListeningFocus accumulates (stationary_ticks)\nEavesdrop bonus: ListeningFocus +2-3dB (D-071) {
|
||||
shape: page
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
crouch: Crouch {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
crouch_detail: 1 tile/4 ticks · very quiet\nUses Prone/Seated occupancy layer (D-054) {
|
||||
shape: page
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
prone: Prone\n(future) {
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
style.stroke-dash: 5
|
||||
}
|
||||
|
||||
tile_occupancy: TilePresence (D-054)\nSame-tile occupancy layers {
|
||||
shape: package
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
|
||||
standing: Standing {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
prone_layer: Prone / Seated {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
fixture_layer: Fixture {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
}
|
||||
|
||||
sprint -> sprint_detail
|
||||
walk -> walk_detail
|
||||
careful -> careful_detail
|
||||
crouch -> crouch_detail
|
||||
|
||||
sprint -> walk: "toggle" { style.stroke: ${color-accent} }
|
||||
walk -> sprint: "toggle" { style.stroke: ${color-accent} }
|
||||
walk -> careful: "toggle" { style.stroke: ${color-stroke} }
|
||||
careful -> walk: "toggle" { style.stroke: ${color-stroke} }
|
||||
careful -> crouch: "toggle" { style.stroke: ${color-stroke} }
|
||||
crouch -> careful: "toggle" { style.stroke: ${color-stroke} }
|
||||
crouch -> prone: "toggle (future)" { style.stroke: ${color-stroke}; style.stroke-dash: 4 }
|
||||
prone -> crouch: "toggle-out only" { style.stroke: ${color-stroke}; style.stroke-dash: 4 }
|
||||
|
||||
crouch -> tile_occupancy.prone_layer: "occupies" { style.stroke: ${color-stroke} }
|
||||
walk -> tile_occupancy.standing: "occupies" { style.stroke: ${color-stroke} }
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 456 KiB |
@@ -0,0 +1,96 @@
|
||||
# NPC Simulation Tier State Machine — D-026
|
||||
# bevy_ecs dynamic component add/remove makes tier transitions seamless.
|
||||
# Scope tags keep NPCs in Active tier.
|
||||
|
||||
vars: {
|
||||
color-bg: "#2a3040"
|
||||
color-stroke: "#333340"
|
||||
color-text: "#c8d0e0"
|
||||
color-accent: "#c8d8f0"
|
||||
color-dim: "#1a1e24"
|
||||
}
|
||||
|
||||
ungenerated: Tier 4\nUngenerated {
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
style.stroke-dash: 5
|
||||
}
|
||||
|
||||
state_saved: Tier 3\nState-Saved\n~1-2KB frozen struct {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
background: Tier 2\nBackground\n500-2,000 NPCs {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
active: Tier 1\nActive\n30-80 NPCs · full sim {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
style.bold: true
|
||||
}
|
||||
|
||||
scope_tags: Scope Tags (prevent eviction) {
|
||||
shape: package
|
||||
style.fill: ${color-dim}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
|
||||
neighborhood: neighborhood {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
active_quest: active-quest {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
colleague: colleague {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
known_contact: known-contact {
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-stroke}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
}
|
||||
|
||||
lru: LRU Priority Queue\n(interaction-timestamp) {
|
||||
shape: diamond
|
||||
style.fill: ${color-bg}
|
||||
style.stroke: ${color-accent}
|
||||
style.font-color: ${color-text}
|
||||
}
|
||||
|
||||
ungenerated -> state_saved: "player approach\n(generated ahead)" {
|
||||
style.stroke: ${color-stroke}
|
||||
}
|
||||
state_saved -> background: "player return\n(~2-5ms reactivation)" {
|
||||
style.stroke: ${color-stroke}
|
||||
}
|
||||
background -> state_saved: "LRU eviction" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
background -> active: "player proximity\nor scope tag match" {
|
||||
style.stroke: ${color-accent}
|
||||
}
|
||||
active -> background: "LRU eviction\n(no scope tag)" {
|
||||
style.stroke: ${color-stroke}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
scope_tags -> active: "prevents eviction" {
|
||||
style.stroke: ${color-accent}
|
||||
style.stroke-dash: 4
|
||||
}
|
||||
lru -> active: "manages" { style.stroke: ${color-accent} }
|
||||
lru -> background: "manages" { style.stroke: ${color-stroke} }
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 354 KiB |
Reference in New Issue
Block a user