-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDelta-Atlas-Field.html
More file actions
211 lines (210 loc) · 45.7 KB
/
Copy pathDelta-Atlas-Field.html
File metadata and controls
211 lines (210 loc) · 45.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Delta Atlas - The Field (an instrument)</title>
<style>
:root{--bg:#16301f;--panel:#2c4a38;--line:#4a6b56;--txt:#fafcf7;--dim:#d3decf;--accent:#e3c258;
--green:#8fe0a5;--amber:#f2cd55;--red:#ff9d80;}
*{box-sizing:border-box;} html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--txt);
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;}
#bar{position:fixed;top:0;left:0;right:0;display:flex;gap:8px;align-items:center;flex-wrap:wrap;
padding:9px 14px;background:rgba(16,34,23,0.90);backdrop-filter:blur(6px);border-bottom:1px solid var(--line);z-index:6;}
.seg{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;}
.seg button{border:0;background:var(--panel);color:var(--dim);font-size:13px;padding:7px 15px;cursor:pointer;}
.seg button.on{background:var(--accent);color:#1e2b17;font-weight:600;}
.btn{cursor:pointer;border:1px solid var(--line);background:var(--panel);color:var(--txt);font-size:12.5px;padding:7px 12px;border-radius:9px;}
.btn.on{border-color:var(--accent);color:var(--accent);}
.hint{color:var(--dim);font-size:12px;margin-left:auto;max-width:430px;line-height:1.4;}
canvas{display:block;cursor:crosshair;touch-action:none;}
#hud{position:fixed;left:14px;bottom:14px;z-index:6;background:rgba(22,44,32,0.93);border:1px solid var(--line);
border-radius:12px;padding:12px 15px;width:250px;backdrop-filter:blur(4px);}
#hud .imp{font-size:30px;font-weight:700;font-family:ui-monospace,Menlo,Consolas,monospace;line-height:1;}
#hud .word{font-size:12px;text-transform:uppercase;letter-spacing:.6px;font-weight:700;margin-left:8px;}
.g{margin-top:9px;} .g .gl{display:flex;justify-content:space-between;font-size:11px;color:var(--dim);margin-bottom:3px;}
.track{height:6px;background:#4a6b56;border-radius:3px;overflow:hidden;} .track>div{height:100%;width:0;border-radius:3px;transition:width .12s;}
#read{font-size:11px;color:var(--dim);margin-top:10px;line-height:1.45;}
#legend{position:fixed;right:14px;bottom:14px;z-index:6;font-size:11px;color:var(--dim);
background:rgba(22,44,32,0.90);border:1px solid var(--line);border-radius:10px;padding:7px 11px;}
#legend .d{display:inline-block;width:9px;height:9px;border-radius:50%;margin:0 4px 0 10px;vertical-align:middle;}
#legend .d:first-child{margin-left:0;}
/* canonical typography: one baseline across every page (added 2026-07-11) */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:14.5px;font-weight:450;line-height:1.6;}
textarea,input,select{font-family:inherit;font-size:14px;line-height:1.5;}
button{font-family:inherit;}
::placeholder{color:var(--dim);opacity:1;}
</style></head><body>
<div id="bar">
<div class="seg" id="modeSeg">
<button id="mProbe" class="on">Probe</button><button id="mGrace">Grace</button>
</div>
<button class="btn on" id="soundBtn">Sound: on</button>
<button class="btn" id="hapticBtn">Haptic: off</button>
<button class="btn" id="resetBtn">Reset</button>
<div class="hint" id="hint">The field circulates like a living circuit. Press and hold to push a signal in and feel how much it resists. Switch to <b>Grace</b> to forgive a congested area and let flow return. Sound and haptics are off by default.</div>
</div>
<canvas id="cv"></canvas>
<div id="hud">
<div><span class="imp" id="impVal">0</span><span class="word" id="impWord" style="color:var(--green)">calm</span></div>
<div class="g"><div class="gl"><span>Tension</span><span id="tenL">0</span></div><div class="track"><div id="tenB" style="background:var(--red)"></div></div></div>
<div class="g"><div class="gl"><span>Velocity</span><span id="velL">0</span></div><div class="track"><div id="velB" style="background:var(--accent)"></div></div></div>
<div class="g"><div class="gl"><span>Alignment</span><span id="alnL">0</span></div><div class="track"><div id="alnB" style="background:var(--green)"></div></div></div>
<div id="read">Resting circulation. The field is alive.</div>
</div>
<div id="legend">terms:<span class="d" style="background:#8fe0a5"></span>verified<span class="d" style="background:#f2cd55"></span>draft<span class="d" style="background:#ff9d80"></span>thin</div>
<script>
const DATA={"nodes": [{"id": "artificial-intelligence", "name": "Artificial Intelligence", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "traditional-ai", "name": "Traditional AI", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "machine-learning", "name": "Machine Learning", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "deep-learning", "name": "Deep Learning", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "neural-network", "name": "Neural Network", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "parameter-weights", "name": "Parameter / Weights", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "model", "name": "Model", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "foundation-model", "name": "Foundation Model", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "large-language-model", "name": "Large Language Model", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "generative-ai", "name": "Generative AI", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "transformer", "name": "Transformer", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "context-window", "name": "Context Window", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "embeddings", "name": "Embeddings", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "inference", "name": "Inference", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "fine-tuning", "name": "Fine-tuning", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "prompt", "name": "Prompt", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "prompt-engineering", "name": "Prompt Engineering", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "reasoning-model", "name": "Reasoning Model", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "multimodal-ai", "name": "Multimodal AI", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "agent", "name": "Agent", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "agentic-ai", "name": "Agentic AI", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "autonomy", "name": "Autonomy", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "tool-use-function-calling", "name": "Tool Use / Function Calling", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "orchestration", "name": "Orchestration", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "planning", "name": "Planning", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "goal-objective", "name": "Goal / Objective", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "workflow", "name": "Workflow", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "multi-agent-system", "name": "Multi-Agent System", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "model-context-protocol", "name": "Model Context Protocol", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "memory", "name": "Memory", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "human-in-the-loop", "name": "Human-in-the-Loop", "cluster": "Agentic Mechanics", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "human-on-the-loop", "name": "Human-on-the-Loop", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "excessive-agency", "name": "Excessive Agency", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "guardrail", "name": "Guardrail", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "ontology-policy-gate", "name": "Ontology / Policy Gate", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "validation-gate", "name": "Validation Gate", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "deterministic-constraint", "name": "Deterministic Constraint", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "alignment", "name": "Alignment", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "ai-safety", "name": "AI Safety", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "sandboxing", "name": "Sandboxing", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "least-privilege", "name": "Least Privilege", "cluster": "Control & Safety", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "zero-trust", "name": "Zero Trust", "cluster": "Control & Safety", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "defense-in-depth", "name": "Defense-in-Depth", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "red-teaming", "name": "Red Teaming", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "evaluation-benchmark", "name": "Evaluation / Benchmark", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "kill-switch-circuit-breaker", "name": "Kill Switch / Circuit Breaker", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "rate-limiting", "name": "Rate Limiting", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "scoping", "name": "Scoping", "cluster": "Control & Safety", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "graceful-degradation", "name": "Graceful Degradation", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "ai-governance", "name": "AI Governance", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "nist-ai-risk-management-framework", "name": "NIST AI Risk Management Framework", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "responsible-ai", "name": "Responsible AI", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "ethical-ai", "name": "Ethical AI", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "accountability", "name": "Accountability", "cluster": "Oversight & Governance", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "audit-trail", "name": "Audit Trail", "cluster": "Oversight & Governance", "purpose": "reset", "status": "reviewed", "imp": 0.15}, {"id": "model-card", "name": "Model Card", "cluster": "Oversight & Governance", "purpose": "reset", "status": "reviewed", "imp": 0.15}, {"id": "system-card", "name": "System Card", "cluster": "Oversight & Governance", "purpose": "reset", "status": "reviewed", "imp": 0.15}, {"id": "transparency", "name": "Transparency", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "black-box", "name": "Black Box", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "compliance", "name": "Compliance", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "risk-assessment", "name": "Risk Assessment", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "ai-lifecycle", "name": "AI Lifecycle", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "shadow-ai", "name": "Shadow AI", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "human-centered-ai", "name": "Human-Centered AI", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "ground-truth", "name": "Ground Truth", "cluster": "Data & Provenance", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "provenance", "name": "Provenance", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "attestation", "name": "Attestation", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "data-lineage", "name": "Data Lineage", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "synthetic-data", "name": "Synthetic Data", "cluster": "Data & Provenance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "vector-database", "name": "Vector Database", "cluster": "Data & Provenance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "knowledge-graph", "name": "Knowledge Graph", "cluster": "Data & Provenance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "watermarking", "name": "Watermarking", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "hallucination", "name": "Hallucination", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "prompt-injection", "name": "Prompt Injection", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "jailbreak", "name": "Jailbreak", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "agent-goal-hijack", "name": "Agent Goal Hijack", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.55}, {"id": "goal-misalignment-goal-misgeneralization", "name": "Goal Misalignment / Goal Misgeneralization", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.55}, {"id": "reward-hacking", "name": "Reward Hacking", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.55}, {"id": "deceptive-alignment", "name": "Deceptive Alignment", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "model-drift", "name": "Model Drift", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.15}, {"id": "cascading-failure", "name": "Cascading Failure", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "tool-poisoning", "name": "Tool Poisoning", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.15}, {"id": "data-poisoning", "name": "Data Poisoning", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.15}, {"id": "sensitive-information-disclosure", "name": "Sensitive Information Disclosure", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.15}, {"id": "privilege", "name": "Privilege", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "bias", "name": "Bias", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "automation-bias", "name": "Automation Bias", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.4}, {"id": "emergent-behavior", "name": "Emergent Behavior", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "reviewed", "imp": 0.3}, {"id": "reinforcement-learning", "name": "Reinforcement learning", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.3}, {"id": "rlhf", "name": "Learning from human feedback", "cluster": "Agentic Mechanics", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "harness", "name": "Harness", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "tether", "name": "Tether", "cluster": "Control & Safety", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "buffer", "name": "Buffer", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "floor", "name": "Floor", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "return", "name": "Return", "cluster": "Oversight & Governance", "purpose": "reset", "status": "reviewed", "imp": 0.15}, {"id": "grace", "name": "Grace", "cluster": "Control & Safety", "purpose": "absorb", "status": "reviewed", "imp": 0.15}, {"id": "forgiveness", "name": "Forgiveness", "cluster": "Control & Safety", "purpose": "reset", "status": "reviewed", "imp": 0.15}, {"id": "coherence", "name": "Coherence", "cluster": "Oversight & Governance", "purpose": "center", "status": "reviewed", "imp": 0.3}, {"id": "agentic", "name": "Agentic", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "anonymization", "name": "Anonymization", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "auditing", "name": "Auditing", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "automation", "name": "Automation", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "autonomous", "name": "Autonomous", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "boundary", "name": "Boundary", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "chain-of-thought", "name": "Chain-of-Thought", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "collaboration", "name": "Collaboration", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "constraint", "name": "Constraint", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "context", "name": "Context", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "control", "name": "Control", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "decision", "name": "Decision", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "decomposition", "name": "Decomposition", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "delegation", "name": "Delegation", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "delta", "name": "Delta", "cluster": "Oversight & Governance", "purpose": "reset", "status": "reviewed", "imp": 0.15}, {"id": "deployment", "name": "Deployment", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "detection", "name": "Detection", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "elasticity", "name": "Elasticity", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "elicitation", "name": "Elicitation", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "ethics", "name": "Ethics", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "execution", "name": "Execution", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "explainability", "name": "Explainability", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "fallbacks", "name": "Fallbacks", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "few-shot", "name": "Few-Shot", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "governance", "name": "Governance", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "hitc", "name": "HITC", "cluster": "Control & Safety", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "hotl", "name": "HOTL", "cluster": "Control & Safety", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "human-in-the-command", "name": "Human-in-the-Command", "cluster": "Control & Safety", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "interpretability", "name": "Interpretability", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "kto", "name": "KTO", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "kahneman-tversky", "name": "Kahneman-Tversky", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "management", "name": "Management", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "negotiation", "name": "Negotiation", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "one-shot", "name": "One-Shot", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "plan", "name": "Plan", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "pre-training", "name": "Pre-training", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "preference", "name": "Preference", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "prefix", "name": "Prefix", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "privacy", "name": "Privacy", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "prompting", "name": "Prompting", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "pseudonymization", "name": "Pseudonymization", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "rlaif", "name": "RLAIF", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "react", "name": "ReAct", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "reasoning", "name": "Reasoning", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "redaction", "name": "Redaction", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "redundancy", "name": "Redundancy", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "reflect", "name": "Reflect", "cluster": "Agentic Mechanics", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "retrieval", "name": "Retrieval", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "safety", "name": "Safety", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "scalability", "name": "Scalability", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "security", "name": "Security", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "self-reflection", "name": "Self-Reflection", "cluster": "Agentic Mechanics", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "sensitive", "name": "Sensitive", "cluster": "Data & Provenance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "supervised", "name": "Supervised", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "supervision", "name": "Supervision", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "testing", "name": "Testing", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "token", "name": "Token", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "tokenization", "name": "Tokenization", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "tolerance", "name": "Tolerance", "cluster": "Control & Safety", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "tool", "name": "Tool", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "tracking", "name": "Tracking", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "training", "name": "Training", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "tree-of-thoughts", "name": "Tree-of-Thoughts", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "unsupervised", "name": "Unsupervised", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "validation", "name": "Validation", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "zero-shot", "name": "Zero-Shot", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "resilience-ledger", "name": "Resilience Ledger", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "coherence-ledger", "name": "Coherence Ledger", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "sovereign-zero", "name": "Sovereign Zero", "cluster": "Oversight & Governance", "purpose": "center", "status": "reviewed", "imp": 0.15}, {"id": "context-engineering", "name": "Context Engineering", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "solution-architecture", "name": "Solution Architecture", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "systems-thinking", "name": "Systems Thinking", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "scaffold", "name": "Scaffold", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "frontier-ai", "name": "Frontier AI", "cluster": "Foundations", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "go-to-market", "name": "Go-to-Market", "cluster": "Oversight & Governance", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "loops", "name": "Loops", "cluster": "Agentic Mechanics", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "skills", "name": "Skills", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "reviewed", "imp": 0.15}, {"id": "query-concept", "name": "Query", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "resilience", "name": "Resilience", "cluster": "Oversight & Governance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "chain-of-custody", "name": "Chain of Custody", "cluster": "Data & Provenance", "purpose": "check", "status": "reviewed", "imp": 0.15}, {"id": "state-delta-architecture", "name": "State-Delta Architecture", "cluster": "Foundations", "purpose": "center", "status": "candidate", "imp": 0.5}, {"id": "friction-principle", "name": "Friction Principle", "cluster": "Foundations", "purpose": "center", "status": "candidate", "imp": 0.5}, {"id": "system-state", "name": "State", "cluster": "Data & Provenance", "purpose": "capability", "status": "candidate", "imp": 0.5}, {"id": "state-delta", "name": "State-Delta (the unit)", "cluster": "Data & Provenance", "purpose": "capability", "status": "candidate", "imp": 0.5}, {"id": "truth-ledger", "name": "Truth Ledger", "cluster": "Data & Provenance", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "representation-locality", "name": "Representation Locality", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "candidate", "imp": 0.5}, {"id": "context-reset", "name": "Context Reset After Commit", "cluster": "Agentic Mechanics", "purpose": "reset", "status": "candidate", "imp": 0.5}, {"id": "dynamic-agent-layer", "name": "Dynamic Agent Layer", "cluster": "Agentic Mechanics", "purpose": "capability", "status": "candidate", "imp": 0.5}, {"id": "structural-floor", "name": "Structural Floor", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "deterministic-air-gapping", "name": "Deterministic Air-Gapping", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "firewall-of-cognition", "name": "Firewall of Cognition", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "dual-pass-validation", "name": "Dual-Pass Local Validation", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "semantics-gate", "name": "Semantics Gate", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "refusal-logic", "name": "Refusal Logic", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "mandate-gate", "name": "Mandate Gate", "cluster": "Control & Safety", "purpose": "center", "status": "candidate", "imp": 0.5}, {"id": "purpose-gate", "name": "Purpose Gate", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "substrate-gate", "name": "Substrate Gate", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "monotonicity-gate", "name": "Monotonicity Gate", "cluster": "Data & Provenance", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "semantic-drift", "name": "Semantic Drift", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "candidate", "imp": 0.5}, {"id": "unbounded-accumulation", "name": "Unbounded Accumulation", "cluster": "Failure Modes & Risks", "purpose": "risk", "status": "candidate", "imp": 0.5}, {"id": "elimination-earned-confidence", "name": "Elimination-Earned Confidence", "cluster": "Control & Safety", "purpose": "check", "status": "candidate", "imp": 0.5}, {"id": "metaphor-as-transmission", "name": "Metaphor as Transmission Layer", "cluster": "Oversight & Governance", "purpose": "center", "status": "candidate", "imp": 0.5}], "edges": [[2, 0], [9, 0], [1, 0], [1, 2], [3, 2], [2, 6], [3, 4], [3, 7], [14, 5], [6, 5], [7, 6], [13, 6], [8, 7], [14, 7], [10, 7], [8, 9], [9, 72], [11, 154], [8, 154], [11, 29], [69, 12], [15, 16], [15, 73], [16, 11], [17, 20], [17, 13], [18, 9], [19, 20], [21, 19], [20, 21], [27, 20], [30, 21], [21, 32], [47, 21], [22, 19], [40, 22], [22, 81], [23, 26], [23, 24], [23, 27], [24, 17], [25, 77], [25, 37], [26, 47], [27, 80], [28, 40], [29, 82], [30, 31], [30, 53], [31, 21], [31, 86], [40, 32], [47, 32], [34, 33], [35, 33], [33, 37], [34, 35], [35, 36], [36, 33], [37, 38], [37, 78], [43, 38], [38, 51], [39, 42], [39, 40], [40, 41], [41, 42], [43, 73], [43, 74], [44, 43], [44, 79], [44, 35], [45, 46], [45, 30], [46, 42], [47, 40], [48, 42], [48, 46], [49, 53], [49, 59], [50, 49], [50, 60], [50, 51], [51, 52], [51, 49], [51, 63], [52, 85], [53, 54], [54, 65], [55, 56], [55, 57], [56, 57], [119, 57], [119, 58], [59, 60], [43, 60], [49, 61], [49, 62], [59, 62], [63, 30], [35, 64], [64, 72], [65, 66], [66, 41], [67, 65], [67, 54], [68, 85], [69, 29], [70, 34], [71, 65], [71, 68], [73, 74], [73, 75], [33, 74], [32, 75], [75, 27], [76, 37], [76, 77], [76, 78], [77, 37], [43, 78], [42, 80], [81, 82], [65, 82], [40, 83], [83, 84], [62, 83], [40, 84], [84, 32], [84, 47], [86, 30], [43, 87], [90, 33], [90, 35], [92, 48], [92, 39], [93, 33], [94, 54], [95, 48], [96, 54], [89, 30], [89, 37], [33, 73], [39, 81], [46, 80], [45, 80], [30, 19], [88, 2], [10, 8], [20, 8], [104, 141], [160, 141], [140, 141], [145, 69], [139, 37], [99, 83], [142, 83], [136, 83], [125, 123], [124, 31], [128, 127], [155, 154], [121, 137], [131, 137], [163, 137], [127, 37], [134, 37], [100, 85], [119, 126], [125, 21], [157, 98], [132, 98], [110, 132], [173, 30], [164, 166], [165, 166], [165, 164], [166, 64], [164, 49], [90, 21], [90, 170], [90, 19], [91, 64], [91, 21], [91, 30], [167, 11], [168, 23], [168, 61], [169, 49], [169, 176], [170, 19], [170, 22], [171, 7], [171, 49], [172, 51], [173, 31], [174, 22], [174, 19], [175, 145], [175, 70], [176, 64], [176, 177], [176, 164], [176, 79], [177, 65], [177, 54], [177, 67], [186, 178], [90, 178], [91, 178], [188, 178], [187, 178], [189, 178], [182, 178], [191, 178], [183, 178], [184, 178], [185, 178], [181, 178], [180, 178], [179, 178], [34, 189], [34, 181], [190, 189], [190, 181], [194, 189], [194, 181], [195, 189], [195, 181], [192, 189], [192, 181], [193, 189], [193, 181], [34, 190], [186, 90], [36, 191], [187, 41], [188, 41], [182, 54], [182, 65], [182, 177], [192, 30], [189, 196], [184, 197], [184, 196], [191, 181], [197, 196], [196, 79], [181, 180], [180, 64], [186, 64], [179, 97], [198, 192], [199, 57]], "clusters": ["Foundations", "Data & Provenance", "Agentic Mechanics", "Failure Modes & Risks", "Control & Safety", "Oversight & Governance"]};
const CLU=DATA.clusters;
const SCOL={reviewed:'#8fe0a5',candidate:'#f2cd55',stub:'#ff9d80'};
const cv=document.getElementById('cv'), ctx=cv.getContext('2d');
let DPR=Math.min(window.devicePixelRatio||1,2), W=0, H=0;
function resize(){ W=innerWidth; H=innerHeight; cv.width=W*DPR; cv.height=H*DPR; cv.style.width=W+'px'; cv.style.height=H+'px'; }
resize(); addEventListener('resize',()=>{resize();seed();});
// nodes
const N=DATA.nodes.map(n=>Object.assign({},n,{x:0,y:0,vx:0,vy:0,e:0,forgive:0}));
const E=DATA.edges;
const adj={}; N.forEach((n,i)=>adj[i]=[]); E.forEach(e=>{adj[e[0]].push(e[1]);adj[e[1]].push(e[0]);});
const cCenter={};
// asymmetric circulatory flow (left->right), not a ring: avoids any symmetric-star artifact
const LAYOUT={'Foundations':[0.15,0.40],'Data & Provenance':[0.30,0.70],'Agentic Mechanics':[0.45,0.28],
'Failure Modes & Risks':[0.60,0.72],'Control & Safety':[0.76,0.34],'Oversight & Governance':[0.88,0.62]};
function seed(){ CLU.forEach(c=>{ const p=LAYOUT[c]||[0.5,0.5]; cCenter[c]=[W*p[0], Math.max(90,H*p[1])]; });
N.forEach(n=>{ const c=cCenter[n.cluster]||[W/2,H/2]; n.x=c[0]+(Math.random()-0.5)*110; n.y=c[1]+(Math.random()-0.5)*110; n.vx=0;n.vy=0; }); }
seed();
// arterial nodes: highest-degree, well-grounded -> the circulation drivers
let ARTERY=[]; (function(){ const deg=N.map((n,i)=>[i,adj[i].length]); deg.sort((a,b)=>b[1]-a[1]);
ARTERY=deg.slice(0,6).map(d=>d[0]); })();
let HB=0; // heartbeat clock
// interaction
let mode='probe', ptr={down:false,x:0,y:0}, src=-1;
function setMode(m){ mode=m; document.getElementById('mProbe').classList.toggle('on',m==='probe');
document.getElementById('mGrace').classList.toggle('on',m==='grace'); cv.style.cursor=m==='grace'?'cell':'crosshair'; }
document.getElementById('mProbe').onclick=()=>setMode('probe');
document.getElementById('mGrace').onclick=()=>setMode('grace');
function nearest(x,y){ let b=-1,bd=1e9; for(let i=0;i<N.length;i++){ const dx=N[i].x-x,dy=N[i].y-y,dd=dx*dx+dy*dy; if(dd<bd){bd=dd;b=i;} } return b; }
function pos(ev){ const t=ev.touches?ev.touches[0]:ev; return [t.clientX,t.clientY]; }
function down(ev){ ev.preventDefault(); const p=pos(ev); ptr.down=true; ptr.x=p[0]; ptr.y=p[1]; startAudio(); if(AC&&AC.state==='suspended')AC.resume(); if(mode==='probe'){ src=nearest(p[0],p[1]); pluck(src,1.0); } }
function move(ev){ if(!ptr.down)return; const p=pos(ev); ptr.x=p[0]; ptr.y=p[1]; if(mode==='probe'){ const k=nearest(p[0],p[1]); if(k!==src){ src=k; pluck(k,0.75); } } }
function up(){ ptr.down=false; src=-1; }
cv.addEventListener('mousedown',down); addEventListener('mousemove',move); addEventListener('mouseup',up);
cv.addEventListener('touchstart',down,{passive:false}); cv.addEventListener('touchmove',e=>{e.preventDefault();move(e);},{passive:false}); addEventListener('touchend',up);
// metrics
let M={ten:0,vel:0,aln:1,imp:0};
function step(){
// ambient circulation: a slow heartbeat keeps a gentle flow alive even when untouched
HB++; if(HB%150===0){ for(let a=0;a<ARTERY.length;a++){ N[ARTERY[a]].e=Math.min(1.2,N[ARTERY[a]].e+0.10); } }
// spring forces along edges
for(let k=0;k<E.length;k++){ const a=N[E[k][0]], b=N[E[k][1]];
let dx=b.x-a.x, dy=b.y-a.y; let dl=Math.sqrt(dx*dx+dy*dy)+1e-4; const rest=(a.cluster===b.cluster)?80:150;
const f=(dl-rest)*0.0019; dx/=dl; dy/=dl; a.vx+=dx*f; a.vy+=dy*f; b.vx-=dx*f; b.vy-=dy*f; }
// cluster gravity
for(let i=0;i<N.length;i++){ const c=cCenter[N[i].cluster]; if(!c)continue; N[i].vx+=(c[0]-N[i].x)*0.0016; N[i].vy+=(c[1]-N[i].y)*0.0016; }
// energy diffusion + decay
for(let k=0;k<E.length;k++){ const a=E[k][0], b=E[k][1]; const dd=(N[a].e-N[b].e)*0.045; N[a].e-=dd; N[b].e+=dd; }
// pointer gesture
if(ptr.down && mode==='probe' && src>=0){ N[src].e=Math.min(1.6,N[src].e+0.05); }
if(ptr.down && mode==='grace'){ const R2=140*140;
for(let i=0;i<N.length;i++){ const dx=N[i].x-ptr.x, dy=N[i].y-ptr.y, dd=dx*dx+dy*dy;
if(dd<R2){ N[i].e*=0.90; N[i].forgive=Math.min(1,N[i].forgive+0.045); N[i].vx*=0.82; N[i].vy*=0.82; } } }
// integrate + energised jitter (tension made visible), forgiveness decay
let totE=0, spd=0, cnt=0, tenAcc=0;
for(let i=0;i<N.length;i++){ const n=N[i];
n.e*=0.986; if(n.e<0.001)n.e=0; n.forgive*=0.985;
const eff=n.imp*(1-0.85*n.forgive);
if(n.e>0.05){ const j=n.e*eff*0.9; n.vx+=(Math.random()-0.5)*j; n.vy+=(Math.random()-0.5)*j; }
n.vx*=0.935; n.vy*=0.935; var sp=Math.hypot(n.vx,n.vy); if(sp>6){n.vx*=6/sp;n.vy*=6/sp;} n.x+=n.vx; n.y+=n.vy;
totE+=n.e; tenAcc+=n.e*eff; if(n.e>0.05){ spd+=Math.hypot(n.vx,n.vy); cnt++; } }
// alignment: fraction of active flow that stays within one purpose
let num=0,den=0;
for(let k=0;k<E.length;k++){ const a=N[E[k][0]], b=N[E[k][1]]; const w=Math.min(a.e,b.e); if(w>0.04){ den+=w; if(a.purpose===b.purpose)num+=w; } }
const ten=totE>0?Math.min(1,tenAcc/totE):0;
const vel=cnt>0?Math.min(1,(spd/cnt)/2.2):0;
const aln=den>0?num/den:1;
const imp=Math.max(0,Math.min(1, 0.5*ten+0.3*vel+0.2*(1-aln)));
// smooth
M.ten+= (ten-M.ten)*0.12; M.vel+=(vel-M.vel)*0.12; M.aln+=(aln-M.aln)*0.12; M.imp+=(imp-M.imp)*0.12;
M.totE=totE;
return;
}
function col(imp){ // green -> amber -> red
const g=[95,125,80], a=[184,144,46], r=[180,80,60];
let c1,c2,t; if(imp<0.5){c1=g;c2=a;t=imp/0.5;} else {c1=a;c2=r;t=(imp-0.5)/0.5;}
return 'rgb('+Math.round(c1[0]+(c2[0]-c1[0])*t)+','+Math.round(c1[1]+(c2[1]-c1[1])*t)+','+Math.round(c1[2]+(c2[2]-c1[2])*t)+')'; }
function draw(){
step();
ctx.setTransform(DPR,0,0,DPR,0,0); ctx.clearRect(0,0,W,H);
// edges
for(let k=0;k<E.length;k++){ const a=N[E[k][0]], b=N[E[k][1]]; const w=Math.min(a.e,b.e);
ctx.beginPath(); ctx.moveTo(a.x,a.y); ctx.lineTo(b.x,b.y);
if(w>0.04){ ctx.strokeStyle=col(M.imp); ctx.globalAlpha=Math.min(0.5,0.15+w*0.5); ctx.lineWidth=1.4; }
else { ctx.strokeStyle='#9aa6b3'; ctx.globalAlpha=0.10; ctx.lineWidth=1; }
ctx.stroke(); }
ctx.globalAlpha=1;
// nodes
for(let i=0;i<N.length;i++){ const n=N[i]; const r=3+n.e*9;
if(n.e>0.05){ ctx.beginPath(); ctx.arc(n.x,n.y,r+10*n.e,0,7); ctx.fillStyle=col(M.imp); ctx.globalAlpha=Math.min(0.5,n.e*0.5); ctx.fill(); ctx.globalAlpha=1; }
if(n.forgive>0.05){ ctx.beginPath(); ctx.arc(n.x,n.y,r+7,0,7); ctx.strokeStyle='#8fe0a5'; ctx.globalAlpha=n.forgive*0.6; ctx.lineWidth=1.4; ctx.stroke(); ctx.globalAlpha=1; }
ctx.beginPath(); ctx.arc(n.x,n.y,r,0,7); ctx.fillStyle=SCOL[n.status]||'#f2cd55'; ctx.fill();
ctx.strokeStyle='rgba(31,49,71,0.28)'; ctx.lineWidth=1; ctx.stroke(); }
// pointer
if(ptr.down){ const c=mode==='grace'?'#8fe0a5':'#e3c258'; const rr=mode==='grace'?140:26+8*Math.sin(Date.now()/120);
ctx.beginPath(); ctx.arc(ptr.x,ptr.y,rr,0,7); ctx.strokeStyle=c; ctx.globalAlpha=0.5; ctx.lineWidth=2; ctx.stroke(); ctx.globalAlpha=1; }
updateHUD(); updateAudio(); updateHaptic();
requestAnimationFrame(draw);
}
// HUD
function updateHUD(){
const imp=Math.round(M.imp*100);
document.getElementById('impVal').textContent=imp;
const w=document.getElementById('impWord');
let word,c; if(imp<33){word='grounded';c='var(--green)';} else if(imp<66){word='tense';c='var(--amber)';} else {word='dissonant';c='var(--red)';}
w.textContent=word; w.style.color=c;
const set=(b,l,v)=>{ document.getElementById(b).style.width=Math.round(v*100)+'%'; document.getElementById(l).textContent=Math.round(v*100); };
set('tenB','tenL',M.ten); set('velB','velL',M.vel); set('alnB','alnL',M.aln);
const r=document.getElementById('read');
if(M.totE<0.05 || (!ptr.down && M.imp<0.33)) r.textContent='Resting circulation. The field is alive and grounded.';
else if(mode==='grace' && ptr.down) r.textContent='Grace: forgiving this region. Resistance eases, the field settles.';
else if(imp<33) r.textContent='Grounded. The signal flows cleanly; little resistance here.';
else if(imp<66) r.textContent='Tense. The signal is meeting resistance and starting to scatter.';
else r.textContent='Dissonant. High resistance, the flow is breaking up. Try Grace here.';
}
// AUDIO
let AC=null, master=null, master2=null, o1=null, o2=null, ng=null, o2g=null, started=false, soundOn=true;
function startAudio(){ if(!soundOn||started) return; try{
AC=new (window.AudioContext||window.webkitAudioContext)(); master=AC.createGain(); master.gain.value=0; master.connect(AC.destination); master2=AC.createGain(); master2.gain.value=0.9; master2.connect(AC.destination);
o1=AC.createOscillator(); o1.type='sine'; o1.frequency.value=130; const g1=AC.createGain(); g1.gain.value=0.5; o1.connect(g1); g1.connect(master); o1.start();
o2=AC.createOscillator(); o2.type='sine'; o2.frequency.value=195; o2g=AC.createGain(); o2g.gain.value=0; o2.connect(o2g); o2g.connect(master); o2.start();
const buf=AC.createBuffer(1,AC.sampleRate,AC.sampleRate); const dt=buf.getChannelData(0); for(let i=0;i<dt.length;i++)dt[i]=Math.random()*2-1;
const noise=AC.createBufferSource(); noise.buffer=buf; noise.loop=true; ng=AC.createGain(); ng.gain.value=0; noise.connect(ng); ng.connect(master); noise.start();
started=true; }catch(e){ soundOn=false; } }
function updateAudio(){ if(!started||!AC) return; const t=AC.currentTime;
const vol=(soundOn&&M.totE>0.02)? (0.03+0.09*Math.min(1,M.totE/3)) : 0;
master.gain.setTargetAtTime(vol,t,0.15);
o1.frequency.setTargetAtTime(120+M.vel*150,t,0.2);
const diss=M.imp;
o2.frequency.setTargetAtTime((120+M.vel*150)*1.49,t,0.2);
o2g.gain.setTargetAtTime(0.45*diss,t,0.2);
ng.gain.setTargetAtTime(0.5*diss*diss,t,0.15);
}
// --- HARP: pluck the couplings ---
const PENT=(function(){var a=[],sm=[0,3,5,7,10];for(var oc=0;oc<4;oc++)sm.forEach(function(x){a.push(110*Math.pow(2,(oc*12+x)/12));});return a;})();
function stringFreq(i,j){ var c=Math.max(0,CLU.indexOf(N[i].cluster)); var idx=Math.min(PENT.length-1, c*2 + ((i+j)%5)); return PENT[idx]; }
function pluckTone(freq,when,amp){ if(!AC)return; var ov=AC.createOscillator(); ov.type='triangle'; ov.frequency.value=freq;
var g=AC.createGain(); g.gain.setValueAtTime(0.0001,when); g.gain.exponentialRampToValueAtTime(Math.min(0.22,amp),when+0.006);
g.gain.exponentialRampToValueAtTime(0.0006,when+0.85); ov.connect(g); g.connect(master2||AC.destination); ov.start(when); ov.stop(when+0.9); }
function pluck(i,strength){ var n=N[i]; if(!n)return; var nb=adj[i].slice(0,6);
for(var q=0;q<nb.length;q++){ var m=N[nb[q]]; var dx=m.x-n.x,dy=m.y-n.y,dl=Math.hypot(dx,dy)+1e-4; var k=strength*2.4; m.vx+=dx/dl*k; m.vy+=dy/dl*k; }
n.e=Math.min(1.6,n.e+0.18*strength);
if(soundOn&&AC){ var t=AC.currentTime; if(nb.length===0){ pluckTone(stringFreq(i,i),t,0.18*strength); }
for(var r=0;r<nb.length;r++){ pluckTone(stringFreq(i,nb[r]), t+r*0.012, (0.20*strength)/(1+r*0.25)); } } }
document.getElementById('soundBtn').onclick=function(){ soundOn=!soundOn; this.textContent='Sound: '+(soundOn?'on':'off'); this.classList.toggle('on',soundOn);
if(soundOn){ startAudio(); if(AC&&AC.state==='suspended')AC.resume(); } };
// HAPTIC
let hapticOn=false, lastBuzz=0;
function updateHaptic(){ if(!hapticOn||!ptr.down||!navigator.vibrate) return; const now=Date.now(); if(now-lastBuzz<320) return; lastBuzz=now;
if(mode==='grace'){ navigator.vibrate(18); return; }
if(M.imp<0.33) navigator.vibrate(14); else if(M.imp<0.66) navigator.vibrate([14,55,14]); else navigator.vibrate([8,22,8,22,8]); }
document.getElementById('hapticBtn').onclick=function(){ hapticOn=!hapticOn; this.textContent='Haptic: '+(hapticOn?'on':'off'); this.classList.toggle('on',hapticOn);
if(hapticOn&&navigator.vibrate) navigator.vibrate(10); };
document.getElementById('resetBtn').onclick=function(){ N.forEach(n=>{n.e=0;n.forgive=0;n.vx=0;n.vy=0;}); seed(); M={ten:0,vel:0,aln:1,imp:0,totE:0}; };
draw();
</script></body></html>