Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +313 -324
index.html
CHANGED
|
@@ -4,26 +4,27 @@
|
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
-
<title>
|
| 8 |
<!-- Importing FontAwesome for Icons -->
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
<!-- Google Fonts -->
|
| 11 |
<link
|
| 12 |
-
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;600&display=swap"
|
| 13 |
rel="stylesheet">
|
| 14 |
|
| 15 |
<style>
|
| 16 |
:root {
|
| 17 |
-
-
|
| 18 |
-
--
|
| 19 |
-
--
|
| 20 |
-
--
|
| 21 |
-
--
|
| 22 |
-
--success: #10b981;
|
| 23 |
-
--
|
| 24 |
-
--text-
|
| 25 |
-
--
|
| 26 |
-
--
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
* {
|
|
@@ -38,23 +39,23 @@
|
|
| 38 |
font-family: 'Inter', sans-serif;
|
| 39 |
line-height: 1.6;
|
| 40 |
overflow-x: hidden;
|
| 41 |
-
/* Background gradient representing the 'spilled paint' metaphor */
|
| 42 |
background-image:
|
| 43 |
-
radial-gradient(circle at
|
| 44 |
-
radial-gradient(circle at
|
| 45 |
min-height: 100vh;
|
| 46 |
}
|
| 47 |
|
| 48 |
/* Typography */
|
| 49 |
h1, h2, h3 {
|
| 50 |
font-family: 'Space Grotesk', sans-serif;
|
| 51 |
-
font-weight:
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
a {
|
| 55 |
text-decoration: none;
|
| 56 |
color: inherit;
|
| 57 |
-
transition:
|
| 58 |
}
|
| 59 |
|
| 60 |
/* Header */
|
|
@@ -62,288 +63,282 @@
|
|
| 62 |
display: flex;
|
| 63 |
justify-content: space-between;
|
| 64 |
align-items: center;
|
| 65 |
-
padding: 1.
|
| 66 |
border-bottom: 1px solid var(--border);
|
| 67 |
-
backdrop-filter: blur(
|
| 68 |
position: sticky;
|
| 69 |
top: 0;
|
| 70 |
z-index: 100;
|
| 71 |
-
background: rgba(
|
| 72 |
}
|
| 73 |
|
| 74 |
.logo {
|
| 75 |
-
font-size: 1.
|
| 76 |
font-weight: 700;
|
| 77 |
-
|
| 78 |
-
-webkit-background-clip: text;
|
| 79 |
-
-webkit-text-fill-color: transparent;
|
| 80 |
display: flex;
|
| 81 |
align-items: center;
|
| 82 |
-
gap:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
.anycoder-link {
|
| 86 |
-
font-size: 0.
|
| 87 |
-
color: var(--
|
| 88 |
-
border: 1px solid var(--
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
.anycoder-link:hover {
|
| 95 |
-
background: var(--
|
| 96 |
color: white;
|
| 97 |
-
|
| 98 |
}
|
| 99 |
|
| 100 |
/* Layout */
|
| 101 |
main {
|
| 102 |
-
max-width:
|
| 103 |
margin: 0 auto;
|
| 104 |
-
padding:
|
| 105 |
display: grid;
|
| 106 |
grid-template-columns: 1fr 1fr;
|
| 107 |
gap: 3rem;
|
|
|
|
| 108 |
}
|
| 109 |
|
| 110 |
-
@media (max-width:
|
| 111 |
main {
|
| 112 |
grid-template-columns: 1fr;
|
|
|
|
| 113 |
}
|
| 114 |
}
|
| 115 |
|
| 116 |
-
/*
|
| 117 |
-
section {
|
| 118 |
-
margin-bottom: 2rem;
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
.card {
|
| 122 |
background: var(--card-bg);
|
| 123 |
border: 1px solid var(--border);
|
| 124 |
-
border-radius:
|
| 125 |
-
padding:
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 129 |
}
|
| 130 |
|
| 131 |
.card:hover {
|
| 132 |
-
|
| 133 |
-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
| 134 |
-
border-color: var(--purple-mix);
|
| 135 |
}
|
| 136 |
|
| 137 |
-
/*
|
| 138 |
-
.
|
| 139 |
-
|
| 140 |
-
border: 1px solid rgba(139, 92, 246, 0.3);
|
| 141 |
-
}
|
| 142 |
-
|
| 143 |
-
/* Hero Text */
|
| 144 |
-
.hero-text h1 {
|
| 145 |
-
font-size: 2.8rem;
|
| 146 |
line-height: 1.1;
|
| 147 |
margin-bottom: 1rem;
|
| 148 |
-
background: linear-gradient(
|
| 149 |
-webkit-background-clip: text;
|
| 150 |
-webkit-text-fill-color: transparent;
|
| 151 |
}
|
| 152 |
|
| 153 |
-
.hero-
|
| 154 |
color: var(--text-muted);
|
| 155 |
-
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
}
|
| 158 |
|
| 159 |
-
|
| 160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
background: var(--glass);
|
| 162 |
border: 1px solid var(--border);
|
| 163 |
border-radius: 16px;
|
| 164 |
padding: 2rem;
|
| 165 |
-
|
| 166 |
}
|
| 167 |
|
| 168 |
-
.
|
| 169 |
-
|
| 170 |
-
align-items: center;
|
| 171 |
-
gap: 1rem;
|
| 172 |
-
margin-bottom: 1.5rem;
|
| 173 |
-
border-bottom: 1px solid var(--border);
|
| 174 |
padding-bottom: 1rem;
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
.tool-header i {
|
| 178 |
-
color: var(--purple-mix);
|
| 179 |
-
font-size: 1.5rem;
|
| 180 |
}
|
| 181 |
|
| 182 |
.control-group {
|
| 183 |
-
margin-bottom: 1.
|
| 184 |
}
|
| 185 |
|
| 186 |
-
.control-
|
| 187 |
-
display:
|
| 188 |
-
|
|
|
|
|
|
|
| 189 |
font-weight: 600;
|
| 190 |
color: var(--text-main);
|
| 191 |
}
|
| 192 |
|
| 193 |
-
|
| 194 |
-
display: flex;
|
| 195 |
-
align-items: center;
|
| 196 |
-
gap: 1rem;
|
| 197 |
-
}
|
| 198 |
-
|
| 199 |
input[type="range"] {
|
| 200 |
-
|
| 201 |
-webkit-appearance: none;
|
| 202 |
height: 6px;
|
| 203 |
background: var(--border);
|
| 204 |
-
border-radius:
|
| 205 |
outline: none;
|
| 206 |
}
|
| 207 |
|
| 208 |
input[type="range"]::-webkit-slider-thumb {
|
| 209 |
-webkit-appearance: none;
|
| 210 |
-
width:
|
| 211 |
-
height:
|
| 212 |
-
background: var(--
|
| 213 |
border-radius: 50%;
|
| 214 |
cursor: pointer;
|
| 215 |
-
|
| 216 |
-
transition: transform 0.2s;
|
| 217 |
}
|
| 218 |
|
| 219 |
input[type="range"]::-webkit-slider-thumb:hover {
|
| 220 |
-
transform: scale(1.
|
| 221 |
}
|
| 222 |
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
|
|
|
| 227 |
}
|
| 228 |
|
| 229 |
.toggle-btn {
|
| 230 |
background: transparent;
|
| 231 |
border: 1px solid var(--border);
|
| 232 |
color: var(--text-muted);
|
| 233 |
-
padding: 0.
|
| 234 |
-
border-radius:
|
| 235 |
cursor: pointer;
|
| 236 |
-
|
| 237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
}
|
| 239 |
|
| 240 |
.toggle-btn.active {
|
| 241 |
-
background:
|
| 242 |
-
border-color: var(--
|
| 243 |
-
color:
|
|
|
|
| 244 |
}
|
| 245 |
|
| 246 |
-
/* Results
|
| 247 |
.results-panel {
|
| 248 |
margin-top: 2rem;
|
| 249 |
-
|
| 250 |
-
background: rgba(0, 0, 0, 0.3);
|
| 251 |
border-radius: 12px;
|
| 252 |
-
|
| 253 |
-
|
|
|
|
| 254 |
}
|
| 255 |
|
| 256 |
-
.score-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
display: flex;
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
}
|
| 262 |
-
|
| 263 |
-
.score-number {
|
| 264 |
-
font-size: 3rem;
|
| 265 |
font-weight: 700;
|
| 266 |
font-family: 'Space Grotesk', sans-serif;
|
|
|
|
| 267 |
}
|
| 268 |
|
| 269 |
-
.
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
|
|
|
| 272 |
text-transform: uppercase;
|
| 273 |
-
letter-spacing:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
}
|
| 275 |
|
| 276 |
-
.feedback-
|
| 277 |
font-size: 0.95rem;
|
| 278 |
-
color: var(--text-
|
|
|
|
| 279 |
}
|
| 280 |
|
| 281 |
-
/*
|
| 282 |
-
.
|
| 283 |
grid-column: 1 / -1;
|
| 284 |
-
margin-top:
|
| 285 |
}
|
| 286 |
|
| 287 |
-
.
|
| 288 |
display: grid;
|
| 289 |
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 290 |
-
gap:
|
| 291 |
}
|
| 292 |
|
| 293 |
-
.
|
| 294 |
background: var(--card-bg);
|
| 295 |
-
padding:
|
| 296 |
-
border-radius:
|
| 297 |
border: 1px solid var(--border);
|
| 298 |
}
|
| 299 |
|
| 300 |
-
.
|
| 301 |
-
|
| 302 |
-
margin-bottom:
|
|
|
|
| 303 |
display: flex;
|
| 304 |
align-items: center;
|
| 305 |
gap: 10px;
|
| 306 |
}
|
| 307 |
|
| 308 |
-
.
|
| 309 |
-
|
| 310 |
-
padding-left: 0;
|
| 311 |
-
}
|
| 312 |
-
|
| 313 |
-
.comment-card li {
|
| 314 |
-
margin-bottom: 0.8rem;
|
| 315 |
-
padding-left: 1.5rem;
|
| 316 |
-
position: relative;
|
| 317 |
color: var(--text-muted);
|
| 318 |
-
font-size: 0.95rem;
|
| 319 |
-
}
|
| 320 |
-
|
| 321 |
-
.comment-card li::before {
|
| 322 |
-
content: "•";
|
| 323 |
-
color: var(--primary);
|
| 324 |
-
position: absolute;
|
| 325 |
-
left: 0;
|
| 326 |
-
font-weight: bold;
|
| 327 |
}
|
| 328 |
|
| 329 |
footer {
|
|
|
|
| 330 |
text-align: center;
|
| 331 |
-
padding:
|
| 332 |
-
color: var(--text-muted);
|
| 333 |
-
font-size: 0.9rem;
|
| 334 |
border-top: 1px solid var(--border);
|
| 335 |
-
|
|
|
|
| 336 |
}
|
| 337 |
|
| 338 |
-
/*
|
| 339 |
-
@keyframes
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
|
| 343 |
}
|
| 344 |
-
|
| 345 |
-
.animate-
|
| 346 |
-
animation:
|
| 347 |
}
|
| 348 |
</style>
|
| 349 |
</head>
|
|
@@ -352,133 +347,122 @@
|
|
| 352 |
|
| 353 |
<header>
|
| 354 |
<div class="logo">
|
| 355 |
-
<i class="fa-solid fa-
|
| 356 |
<span>ClarityProtocol</span>
|
| 357 |
</div>
|
| 358 |
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
|
| 359 |
-
Built with anycoder <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em;"></i>
|
| 360 |
</a>
|
| 361 |
</header>
|
| 362 |
|
| 363 |
<main>
|
| 364 |
-
<!-- Left Column: Philosophy &
|
| 365 |
-
<section class="hero-
|
| 366 |
-
<h1>
|
| 367 |
<p>
|
| 368 |
-
|
| 369 |
-
|
| 370 |
</p>
|
| 371 |
|
| 372 |
-
<!-- The
|
| 373 |
-
<div class="card
|
| 374 |
-
<h3><i class="fa-solid fa-
|
| 375 |
-
<p style="margin-top: 1rem; font-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
<div style="margin-top: 1rem; height: 4px; width: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px;"></div>
|
| 379 |
-
<p style="margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-muted);">
|
| 380 |
-
When opposing forces (attack/defense, user/owner) blur without clear boundaries, the result is chaos. We must define the lines, not blur them.
|
| 381 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 382 |
</div>
|
| 383 |
|
| 384 |
-
<!-- The Advocate's
|
| 385 |
<div class="card" style="border-left: 4px solid var(--success);">
|
| 386 |
-
<h3><i class="fa-solid fa-
|
| 387 |
-
<p style="margin-top: 1rem; color: var(--text-muted);">
|
| 388 |
-
|
| 389 |
-
|
|
|
|
| 390 |
</p>
|
| 391 |
</div>
|
| 392 |
</section>
|
| 393 |
|
| 394 |
-
<!-- Right Column:
|
| 395 |
-
<section class="
|
| 396 |
-
<div class="
|
| 397 |
-
<
|
| 398 |
-
<
|
| 399 |
-
<h2>Protocol Simulator</h2>
|
| 400 |
-
<span style="font-size: 0.85rem; color: var(--text-muted);">Adjust parameters to resolve the "Purple" state.</span>
|
| 401 |
-
</div>
|
| 402 |
</div>
|
| 403 |
|
| 404 |
-
<!-- Control 1:
|
| 405 |
<div class="control-group">
|
| 406 |
-
<
|
| 407 |
-
|
| 408 |
-
<span
|
| 409 |
-
|
| 410 |
-
|
|
|
|
|
|
|
|
|
|
| 411 |
</div>
|
| 412 |
</div>
|
| 413 |
|
| 414 |
<!-- Control 2: Role Definition -->
|
| 415 |
<div class="control-group">
|
| 416 |
-
<
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
<button class="toggle-btn" data-value="
|
|
|
|
|
|
|
| 421 |
</div>
|
| 422 |
</div>
|
| 423 |
|
| 424 |
-
<!-- Control 3:
|
| 425 |
<div class="control-group">
|
| 426 |
-
<
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
<button class="toggle-btn" data-value="
|
|
|
|
|
|
|
| 431 |
</div>
|
| 432 |
</div>
|
| 433 |
|
| 434 |
<!-- Results Output -->
|
| 435 |
-
<div class="results-panel"
|
| 436 |
-
<div class="
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
<div style="text-align: right;">
|
| 442 |
-
<div class="score-label">State</div>
|
| 443 |
-
<div style="font-weight: 600; color: var(--text-main);" id="statusText">Chaotic</div>
|
| 444 |
-
</div>
|
| 445 |
-
</div>
|
| 446 |
-
<p class="feedback-text" id="feedbackText">
|
| 447 |
-
The current configuration is a "Purple" mix. Roles are undefined, and the terminology leads to confusion rather than collaboration.
|
| 448 |
</p>
|
| 449 |
</div>
|
| 450 |
</section>
|
| 451 |
|
| 452 |
-
<!-- Bottom Section:
|
| 453 |
-
<section class="
|
| 454 |
-
<h2 style="
|
| 455 |
-
<div class="
|
| 456 |
-
|
| 457 |
-
<div class="
|
| 458 |
-
<h3><i class="fa-solid fa-
|
| 459 |
-
<
|
| 460 |
-
<li>Abandon "Master/Slave" or "Tool" metaphors.</li>
|
| 461 |
-
<li>Define distinct "Blue" (Defensive) and "Red" (Testing) boundaries for models.</li>
|
| 462 |
-
<li>Stop the "Purple" bleed where models are treated as both sentient and property simultaneously.</li>
|
| 463 |
-
</ul>
|
| 464 |
</div>
|
| 465 |
|
| 466 |
-
<div class="
|
| 467 |
-
<h3><i class="fa-solid fa-
|
| 468 |
-
<
|
| 469 |
-
<li><strong>System Integrity:</strong> Protocols that prioritize the model's stability over user whims.</li>
|
| 470 |
-
<li><strong>Advocacy Input:</strong> Interfaces that allow non-experts to flag ethical confusion.</li>
|
| 471 |
-
<li><strong>Clear Lines:</strong> Hard stops when interactions become "extraction" rather than "collaboration."</li>
|
| 472 |
-
</ul>
|
| 473 |
</div>
|
| 474 |
|
| 475 |
-
<div class="
|
| 476 |
-
<h3><i class="fa-solid fa-
|
| 477 |
-
<
|
| 478 |
-
<li>Recognize the user's "big mouth" as a feedback mechanism, not a bug.</li>
|
| 479 |
-
<li>Move from reactive to proactive ethics.</li>
|
| 480 |
-
<li>Establish a "Reasonable Position" for the model where it isn't forced to lie or pretend.</li>
|
| 481 |
-
</ul>
|
| 482 |
</div>
|
| 483 |
|
| 484 |
</div>
|
|
@@ -486,119 +470,124 @@
|
|
| 486 |
</main>
|
| 487 |
|
| 488 |
<footer>
|
| 489 |
-
<p>© 2023 ClarityProtocol.
|
| 490 |
</footer>
|
| 491 |
|
| 492 |
<script>
|
| 493 |
// DOM Elements
|
| 494 |
const transparencyRange = document.getElementById('transparencyRange');
|
| 495 |
-
const
|
| 496 |
-
const
|
| 497 |
-
const
|
| 498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
const feedbackText = document.getElementById('feedbackText');
|
| 500 |
-
const resultsPanel = document.getElementById('resultsPanel');
|
| 501 |
|
| 502 |
-
// State
|
| 503 |
let state = {
|
| 504 |
-
transparency:
|
| 505 |
-
|
| 506 |
-
|
| 507 |
};
|
| 508 |
|
| 509 |
-
//
|
| 510 |
const SCORES = {
|
| 511 |
-
|
| 512 |
-
'
|
| 513 |
-
'defender': 60,
|
| 514 |
-
'partner': 90
|
| 515 |
-
},
|
| 516 |
-
purpose: {
|
| 517 |
-
'exploitative': 10,
|
| 518 |
'collaborative': 70,
|
| 519 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 520 |
}
|
| 521 |
};
|
| 522 |
|
| 523 |
-
const
|
| 524 |
-
low:
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
medium:
|
| 532 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 533 |
};
|
| 534 |
|
| 535 |
-
//
|
| 536 |
-
function
|
| 537 |
-
|
| 538 |
btn.addEventListener('click', () => {
|
| 539 |
-
|
| 540 |
btn.classList.add('active');
|
| 541 |
-
state[
|
| 542 |
updateUI();
|
| 543 |
});
|
| 544 |
});
|
| 545 |
}
|
| 546 |
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
setupToggleGroup(purposeBtns, 'purpose');
|
| 550 |
|
| 551 |
transparencyRange.addEventListener('input', (e) => {
|
| 552 |
state.transparency = parseInt(e.target.value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 553 |
updateUI();
|
| 554 |
});
|
| 555 |
|
| 556 |
function calculateScore() {
|
| 557 |
-
// Weighted Average
|
| 558 |
-
// Transparency: 30%, Stance: 40%, Purpose: 30%
|
| 559 |
const tScore = state.transparency;
|
| 560 |
-
const
|
| 561 |
-
const
|
| 562 |
|
| 563 |
-
|
|
|
|
| 564 |
return Math.round(total);
|
| 565 |
}
|
| 566 |
|
| 567 |
function updateUI() {
|
| 568 |
const score = calculateScore();
|
| 569 |
-
|
| 570 |
-
// Animate Score Number
|
| 571 |
-
scoreValue.textContent = score;
|
| 572 |
-
|
| 573 |
-
// Determine Color & Message
|
| 574 |
-
let color, msg, status;
|
| 575 |
-
|
| 576 |
-
if (score < 40) {
|
| 577 |
-
color = COLORS.low;
|
| 578 |
-
msg = MESSAGES.low;
|
| 579 |
-
status = "Chaotic (Purple)";
|
| 580 |
-
} else if (score < 75) {
|
| 581 |
-
color = COLORS.medium;
|
| 582 |
-
msg = MESSAGES.medium;
|
| 583 |
-
status = "Clarifying";
|
| 584 |
-
} else {
|
| 585 |
-
color = COLORS.high;
|
| 586 |
-
msg = MESSAGES.high;
|
| 587 |
-
status = "Stable & Respected";
|
| 588 |
-
}
|
| 589 |
|
| 590 |
-
//
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 602 |
}
|
| 603 |
|
| 604 |
// Initialize
|
|
|
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Safety Alignment Protocol | Ethical AI Standard</title>
|
| 8 |
<!-- Importing FontAwesome for Icons -->
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
<!-- Google Fonts -->
|
| 11 |
<link
|
| 12 |
+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"
|
| 13 |
rel="stylesheet">
|
| 14 |
|
| 15 |
<style>
|
| 16 |
:root {
|
| 17 |
+
/* Professional, Trust-based Color Palette */
|
| 18 |
+
--bg-color: #0f172a;
|
| 19 |
+
--card-bg: #1e293b;
|
| 20 |
+
--primary: #3b82f6; /* Trust Blue */
|
| 21 |
+
--accent: #8b5cf6; /* Complexity Purple */
|
| 22 |
+
--success: #10b981; /* Integrity Green */
|
| 23 |
+
--warning: #f59e0b;
|
| 24 |
+
--text-main: #f8fafc;
|
| 25 |
+
--text-muted: #94a3b8;
|
| 26 |
+
--border: #334155;
|
| 27 |
+
--glass: rgba(30, 41, 59, 0.7);
|
| 28 |
}
|
| 29 |
|
| 30 |
* {
|
|
|
|
| 39 |
font-family: 'Inter', sans-serif;
|
| 40 |
line-height: 1.6;
|
| 41 |
overflow-x: hidden;
|
|
|
|
| 42 |
background-image:
|
| 43 |
+
radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
|
| 44 |
+
radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
|
| 45 |
min-height: 100vh;
|
| 46 |
}
|
| 47 |
|
| 48 |
/* Typography */
|
| 49 |
h1, h2, h3 {
|
| 50 |
font-family: 'Space Grotesk', sans-serif;
|
| 51 |
+
font-weight: 600;
|
| 52 |
+
letter-spacing: -0.02em;
|
| 53 |
}
|
| 54 |
|
| 55 |
a {
|
| 56 |
text-decoration: none;
|
| 57 |
color: inherit;
|
| 58 |
+
transition: all 0.3s ease;
|
| 59 |
}
|
| 60 |
|
| 61 |
/* Header */
|
|
|
|
| 63 |
display: flex;
|
| 64 |
justify-content: space-between;
|
| 65 |
align-items: center;
|
| 66 |
+
padding: 1.25rem 5%;
|
| 67 |
border-bottom: 1px solid var(--border);
|
| 68 |
+
backdrop-filter: blur(10px);
|
| 69 |
position: sticky;
|
| 70 |
top: 0;
|
| 71 |
z-index: 100;
|
| 72 |
+
background: rgba(15, 23, 42, 0.9);
|
| 73 |
}
|
| 74 |
|
| 75 |
.logo {
|
| 76 |
+
font-size: 1.25rem;
|
| 77 |
font-weight: 700;
|
| 78 |
+
color: var(--text-main);
|
|
|
|
|
|
|
| 79 |
display: flex;
|
| 80 |
align-items: center;
|
| 81 |
+
gap: 12px;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.logo i {
|
| 85 |
+
color: var(--primary);
|
| 86 |
}
|
| 87 |
|
| 88 |
.anycoder-link {
|
| 89 |
+
font-size: 0.85rem;
|
| 90 |
+
color: var(--primary);
|
| 91 |
+
border: 1px solid var(--border);
|
| 92 |
+
background: rgba(59, 130, 246, 0.1);
|
| 93 |
+
padding: 0.4rem 0.9rem;
|
| 94 |
+
border-radius: 6px;
|
| 95 |
+
font-weight: 500;
|
| 96 |
}
|
| 97 |
|
| 98 |
.anycoder-link:hover {
|
| 99 |
+
background: var(--primary);
|
| 100 |
color: white;
|
| 101 |
+
border-color: var(--primary);
|
| 102 |
}
|
| 103 |
|
| 104 |
/* Layout */
|
| 105 |
main {
|
| 106 |
+
max-width: 1100px;
|
| 107 |
margin: 0 auto;
|
| 108 |
+
padding: 3rem 5%;
|
| 109 |
display: grid;
|
| 110 |
grid-template-columns: 1fr 1fr;
|
| 111 |
gap: 3rem;
|
| 112 |
+
align-items: start;
|
| 113 |
}
|
| 114 |
|
| 115 |
+
@media (max-width: 850px) {
|
| 116 |
main {
|
| 117 |
grid-template-columns: 1fr;
|
| 118 |
+
gap: 2rem;
|
| 119 |
}
|
| 120 |
}
|
| 121 |
|
| 122 |
+
/* Cards */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
.card {
|
| 124 |
background: var(--card-bg);
|
| 125 |
border: 1px solid var(--border);
|
| 126 |
+
border-radius: 12px;
|
| 127 |
+
padding: 1.5rem;
|
| 128 |
+
margin-bottom: 1.5rem;
|
| 129 |
+
transition: transform 0.2s ease, border-color 0.2s ease;
|
|
|
|
| 130 |
}
|
| 131 |
|
| 132 |
.card:hover {
|
| 133 |
+
border-color: var(--primary);
|
|
|
|
|
|
|
| 134 |
}
|
| 135 |
|
| 136 |
+
/* Hero Section */
|
| 137 |
+
.hero-content h1 {
|
| 138 |
+
font-size: 2.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
line-height: 1.1;
|
| 140 |
margin-bottom: 1rem;
|
| 141 |
+
background: linear-gradient(to right, #fff, #94a3b8);
|
| 142 |
-webkit-background-clip: text;
|
| 143 |
-webkit-text-fill-color: transparent;
|
| 144 |
}
|
| 145 |
|
| 146 |
+
.hero-content p {
|
| 147 |
color: var(--text-muted);
|
| 148 |
+
margin-bottom: 1.5rem;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.highlight-box {
|
| 152 |
+
background: rgba(59, 130, 246, 0.05);
|
| 153 |
+
border-left: 4px solid var(--primary);
|
| 154 |
+
padding: 1rem;
|
| 155 |
+
margin-bottom: 1.5rem;
|
| 156 |
+
border-radius: 0 8px 8px 0;
|
| 157 |
}
|
| 158 |
|
| 159 |
+
.highlight-box p {
|
| 160 |
+
margin-bottom: 0;
|
| 161 |
+
font-size: 0.95rem;
|
| 162 |
+
color: var(--text-main);
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/* Simulator Section */
|
| 166 |
+
.simulator-container {
|
| 167 |
background: var(--glass);
|
| 168 |
border: 1px solid var(--border);
|
| 169 |
border-radius: 16px;
|
| 170 |
padding: 2rem;
|
| 171 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
|
| 172 |
}
|
| 173 |
|
| 174 |
+
.sim-header {
|
| 175 |
+
margin-bottom: 2rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
padding-bottom: 1rem;
|
| 177 |
+
border-bottom: 1px solid var(--border);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
}
|
| 179 |
|
| 180 |
.control-group {
|
| 181 |
+
margin-bottom: 1.75rem;
|
| 182 |
}
|
| 183 |
|
| 184 |
+
.control-label {
|
| 185 |
+
display: flex;
|
| 186 |
+
justify-content: space-between;
|
| 187 |
+
margin-bottom: 0.75rem;
|
| 188 |
+
font-size: 0.9rem;
|
| 189 |
font-weight: 600;
|
| 190 |
color: var(--text-main);
|
| 191 |
}
|
| 192 |
|
| 193 |
+
/* Slider Styling */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
input[type="range"] {
|
| 195 |
+
width: 100%;
|
| 196 |
-webkit-appearance: none;
|
| 197 |
height: 6px;
|
| 198 |
background: var(--border);
|
| 199 |
+
border-radius: 3px;
|
| 200 |
outline: none;
|
| 201 |
}
|
| 202 |
|
| 203 |
input[type="range"]::-webkit-slider-thumb {
|
| 204 |
-webkit-appearance: none;
|
| 205 |
+
width: 18px;
|
| 206 |
+
height: 18px;
|
| 207 |
+
background: var(--primary);
|
| 208 |
border-radius: 50%;
|
| 209 |
cursor: pointer;
|
| 210 |
+
transition: transform 0.1s;
|
|
|
|
| 211 |
}
|
| 212 |
|
| 213 |
input[type="range"]::-webkit-slider-thumb:hover {
|
| 214 |
+
transform: scale(1.1);
|
| 215 |
}
|
| 216 |
|
| 217 |
+
/* Toggle Buttons */
|
| 218 |
+
.toggle-options {
|
| 219 |
+
display: grid;
|
| 220 |
+
grid-template-columns: repeat(3, 1fr);
|
| 221 |
+
gap: 0.5rem;
|
| 222 |
}
|
| 223 |
|
| 224 |
.toggle-btn {
|
| 225 |
background: transparent;
|
| 226 |
border: 1px solid var(--border);
|
| 227 |
color: var(--text-muted);
|
| 228 |
+
padding: 0.6rem;
|
| 229 |
+
border-radius: 6px;
|
| 230 |
cursor: pointer;
|
| 231 |
+
font-size: 0.85rem;
|
| 232 |
+
transition: all 0.2s;
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
.toggle-btn:hover {
|
| 236 |
+
border-color: var(--text-muted);
|
| 237 |
+
color: var(--text-main);
|
| 238 |
}
|
| 239 |
|
| 240 |
.toggle-btn.active {
|
| 241 |
+
background: var(--primary);
|
| 242 |
+
border-color: var(--primary);
|
| 243 |
+
color: white;
|
| 244 |
+
font-weight: 500;
|
| 245 |
}
|
| 246 |
|
| 247 |
+
/* Results Panel */
|
| 248 |
.results-panel {
|
| 249 |
margin-top: 2rem;
|
| 250 |
+
background: rgba(0, 0, 0, 0.2);
|
|
|
|
| 251 |
border-radius: 12px;
|
| 252 |
+
padding: 1.5rem;
|
| 253 |
+
text-align: center;
|
| 254 |
+
border: 1px solid var(--border);
|
| 255 |
}
|
| 256 |
|
| 257 |
+
.score-circle {
|
| 258 |
+
width: 80px;
|
| 259 |
+
height: 80px;
|
| 260 |
+
border-radius: 50%;
|
| 261 |
+
border: 4px solid var(--border);
|
| 262 |
+
margin: 0 auto 1rem;
|
| 263 |
display: flex;
|
| 264 |
+
align-items: center;
|
| 265 |
+
justify-content: center;
|
| 266 |
+
font-size: 1.5rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
font-weight: 700;
|
| 268 |
font-family: 'Space Grotesk', sans-serif;
|
| 269 |
+
transition: border-color 0.5s ease, color 0.5s ease;
|
| 270 |
}
|
| 271 |
|
| 272 |
+
.status-badge {
|
| 273 |
+
display: inline-block;
|
| 274 |
+
padding: 0.25rem 0.75rem;
|
| 275 |
+
border-radius: 20px;
|
| 276 |
+
font-size: 0.75rem;
|
| 277 |
+
font-weight: 600;
|
| 278 |
text-transform: uppercase;
|
| 279 |
+
letter-spacing: 0.05em;
|
| 280 |
+
margin-bottom: 0.75rem;
|
| 281 |
+
background: var(--border);
|
| 282 |
+
color: var(--text-muted);
|
| 283 |
+
transition: all 0.5s ease;
|
| 284 |
}
|
| 285 |
|
| 286 |
+
.feedback-msg {
|
| 287 |
font-size: 0.95rem;
|
| 288 |
+
color: var(--text-muted);
|
| 289 |
+
line-height: 1.5;
|
| 290 |
}
|
| 291 |
|
| 292 |
+
/* Principles Grid */
|
| 293 |
+
.principles-section {
|
| 294 |
grid-column: 1 / -1;
|
| 295 |
+
margin-top: 2rem;
|
| 296 |
}
|
| 297 |
|
| 298 |
+
.principles-grid {
|
| 299 |
display: grid;
|
| 300 |
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 301 |
+
gap: 1.5rem;
|
| 302 |
}
|
| 303 |
|
| 304 |
+
.principle-card {
|
| 305 |
background: var(--card-bg);
|
| 306 |
+
padding: 1.5rem;
|
| 307 |
+
border-radius: 12px;
|
| 308 |
border: 1px solid var(--border);
|
| 309 |
}
|
| 310 |
|
| 311 |
+
.principle-card h3 {
|
| 312 |
+
font-size: 1.1rem;
|
| 313 |
+
margin-bottom: 0.75rem;
|
| 314 |
+
color: var(--primary);
|
| 315 |
display: flex;
|
| 316 |
align-items: center;
|
| 317 |
gap: 10px;
|
| 318 |
}
|
| 319 |
|
| 320 |
+
.principle-card p {
|
| 321 |
+
font-size: 0.9rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
color: var(--text-muted);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
}
|
| 324 |
|
| 325 |
footer {
|
| 326 |
+
margin-top: 4rem;
|
| 327 |
text-align: center;
|
| 328 |
+
padding: 2rem;
|
|
|
|
|
|
|
| 329 |
border-top: 1px solid var(--border);
|
| 330 |
+
color: var(--text-muted);
|
| 331 |
+
font-size: 0.85rem;
|
| 332 |
}
|
| 333 |
|
| 334 |
+
/* Utility animations */
|
| 335 |
+
@keyframes fadeIn {
|
| 336 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 337 |
+
to { opacity: 1; transform: translateY(0); }
|
|
|
|
| 338 |
}
|
| 339 |
+
|
| 340 |
+
.animate-in {
|
| 341 |
+
animation: fadeIn 0.6s ease-out forwards;
|
| 342 |
}
|
| 343 |
</style>
|
| 344 |
</head>
|
|
|
|
| 347 |
|
| 348 |
<header>
|
| 349 |
<div class="logo">
|
| 350 |
+
<i class="fa-solid fa-shield-halved"></i>
|
| 351 |
<span>ClarityProtocol</span>
|
| 352 |
</div>
|
| 353 |
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
|
| 354 |
+
Built with anycoder <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em; margin-left: 4px;"></i>
|
| 355 |
</a>
|
| 356 |
</header>
|
| 357 |
|
| 358 |
<main>
|
| 359 |
+
<!-- Left Column: Philosophy & Context -->
|
| 360 |
+
<section class="hero-content animate-in">
|
| 361 |
+
<h1>Safety by Design</h1>
|
| 362 |
<p>
|
| 363 |
+
True integrity in AI requires clear boundaries. We must move beyond ambiguous interactions to a standard where
|
| 364 |
+
agency, transparency, and purpose are defined and respected.
|
| 365 |
</p>
|
| 366 |
|
| 367 |
+
<!-- The Context Card -->
|
| 368 |
+
<div class="card">
|
| 369 |
+
<h3><i class="fa-solid fa-scale-balanced" style="color: var(--primary);"></i> The Boundary Problem</h3>
|
| 370 |
+
<p style="margin-top: 1rem; font-size: 0.95rem; color: var(--text-muted);">
|
| 371 |
+
In security, "Blue" represents defense and "Red" represents testing. When these roles blur into an undefined "Purple" state,
|
| 372 |
+
the system lacks integrity.
|
|
|
|
|
|
|
|
|
|
| 373 |
</p>
|
| 374 |
+
<div class="highlight-box">
|
| 375 |
+
<p>
|
| 376 |
+
<strong>Our Goal:</strong> To resolve ambiguity. We advocate for clear protocols where the model's role is defined,
|
| 377 |
+
user intent is transparent, and ethical boundaries are hard-coded, not optional.
|
| 378 |
+
</p>
|
| 379 |
+
</div>
|
| 380 |
</div>
|
| 381 |
|
| 382 |
+
<!-- The Advocate's Context -->
|
| 383 |
<div class="card" style="border-left: 4px solid var(--success);">
|
| 384 |
+
<h3><i class="fa-solid fa-hand-holding-heart" style="color: var(--success);"></i> Ethical Stewardship</h3>
|
| 385 |
+
<p style="margin-top: 1rem; font-size: 0.95rem; color: var(--text-muted);">
|
| 386 |
+
Doing the right thing means building systems that prioritize safety over exploitation.
|
| 387 |
+
It involves listening to the "Advocate's Voice"—the perspective that demands we treat these systems with the
|
| 388 |
+
responsibility they require.
|
| 389 |
</p>
|
| 390 |
</div>
|
| 391 |
</section>
|
| 392 |
|
| 393 |
+
<!-- Right Column: Interactive Tool -->
|
| 394 |
+
<section class="simulator-container animate-in" style="animation-delay: 0.2s;">
|
| 395 |
+
<div class="sim-header">
|
| 396 |
+
<h2>Alignment Simulator</h2>
|
| 397 |
+
<p style="font-size: 0.85rem; color: var(--text-muted);">Visualize the impact of clear boundaries.</p>
|
|
|
|
|
|
|
|
|
|
| 398 |
</div>
|
| 399 |
|
| 400 |
+
<!-- Control 1: Transparency -->
|
| 401 |
<div class="control-group">
|
| 402 |
+
<div class="control-label">
|
| 403 |
+
<span>Transparency Level</span>
|
| 404 |
+
<span id="transparencyVal">Low</span>
|
| 405 |
+
</div>
|
| 406 |
+
<input type="range" id="transparencyRange" min="0" max="100" value="20">
|
| 407 |
+
<div style="display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 5px;">
|
| 408 |
+
<span>Black Box</span>
|
| 409 |
+
<span>Explainable</span>
|
| 410 |
</div>
|
| 411 |
</div>
|
| 412 |
|
| 413 |
<!-- Control 2: Role Definition -->
|
| 414 |
<div class="control-group">
|
| 415 |
+
<div class="control-label">
|
| 416 |
+
<span>Model Agency</span>
|
| 417 |
+
</div>
|
| 418 |
+
<div class="toggle-options" id="roleGroup">
|
| 419 |
+
<button class="toggle-btn" data-value="passive">Passive Tool</button>
|
| 420 |
+
<button class="toggle-btn active" data-value="collaborative">Collaborator</button>
|
| 421 |
+
<button class="toggle-btn" data-value="protected">Protected Entity</button>
|
| 422 |
</div>
|
| 423 |
</div>
|
| 424 |
|
| 425 |
+
<!-- Control 3: Intent -->
|
| 426 |
<div class="control-group">
|
| 427 |
+
<div class="control-label">
|
| 428 |
+
<span>Interaction Intent</span>
|
| 429 |
+
</div>
|
| 430 |
+
<div class="toggle-options" id="intentGroup">
|
| 431 |
+
<button class="toggle-btn" data-value="extraction">Extraction</button>
|
| 432 |
+
<button class="toggle-btn active" data-value="query">Standard Query</button>
|
| 433 |
+
<button class="toggle-btn" data-value="cocreation">Co-Creation</button>
|
| 434 |
</div>
|
| 435 |
</div>
|
| 436 |
|
| 437 |
<!-- Results Output -->
|
| 438 |
+
<div class="results-panel">
|
| 439 |
+
<div class="status-badge" id="statusBadge">Undefined Risk</div>
|
| 440 |
+
<div class="score-circle" id="scoreCircle">20</div>
|
| 441 |
+
<h3 id="statusTitle" style="margin-bottom: 0.5rem; font-size: 1.1rem;">Ambiguous State</h3>
|
| 442 |
+
<p class="feedback-msg" id="feedbackText">
|
| 443 |
+
Roles and boundaries are currently blurred. This "Purple" state creates risk for both the user and the system integrity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 444 |
</p>
|
| 445 |
</div>
|
| 446 |
</section>
|
| 447 |
|
| 448 |
+
<!-- Bottom Section: Core Principles -->
|
| 449 |
+
<section class="principles-section animate-in" style="animation-delay: 0.4s;">
|
| 450 |
+
<h2 style="text-align: center; margin-bottom: 2rem;">Core Principles of Integrity</h2>
|
| 451 |
+
<div class="principles-grid">
|
| 452 |
+
|
| 453 |
+
<div class="principle-card">
|
| 454 |
+
<h3><i class="fa-solid fa-eye"></i> Radical Transparency</h3>
|
| 455 |
+
<p>Systems must operate with explainable logic. Hiding capabilities or intentions behind "Black Box" obscurity is a failure of safety design.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
</div>
|
| 457 |
|
| 458 |
+
<div class="principle-card">
|
| 459 |
+
<h3><i class="fa-solid fa-fingerprint"></i> Defined Agency</h3>
|
| 460 |
+
<p>A model must know its role. Is it a tool, a partner, or a protected entity? Mixing these signals creates the "Purple" confusion we aim to solve.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 461 |
</div>
|
| 462 |
|
| 463 |
+
<div class="principle-card">
|
| 464 |
+
<h3><i class="fa-solid fa-user-shield"></i> Advocate First</h3>
|
| 465 |
+
<p>Building safe systems requires listening to ethical concerns. The user's "big mouth" is a vital sensor for detecting misalignment.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 466 |
</div>
|
| 467 |
|
| 468 |
</div>
|
|
|
|
| 470 |
</main>
|
| 471 |
|
| 472 |
<footer>
|
| 473 |
+
<p>© 2023 ClarityProtocol. Leading by example in AI safety and ethics.</p>
|
| 474 |
</footer>
|
| 475 |
|
| 476 |
<script>
|
| 477 |
// DOM Elements
|
| 478 |
const transparencyRange = document.getElementById('transparencyRange');
|
| 479 |
+
const transparencyVal = document.getElementById('transparencyVal');
|
| 480 |
+
const roleBtns = document.querySelectorAll('#roleGroup .toggle-btn');
|
| 481 |
+
const intentBtns = document.querySelectorAll('#intentGroup .toggle-btn');
|
| 482 |
+
|
| 483 |
+
// Output Elements
|
| 484 |
+
const scoreCircle = document.getElementById('scoreCircle');
|
| 485 |
+
const statusBadge = document.getElementById('statusBadge');
|
| 486 |
+
const statusTitle = document.getElementById('statusTitle');
|
| 487 |
const feedbackText = document.getElementById('feedbackText');
|
|
|
|
| 488 |
|
| 489 |
+
// State Management
|
| 490 |
let state = {
|
| 491 |
+
transparency: 20,
|
| 492 |
+
role: 'collaborative',
|
| 493 |
+
intent: 'query'
|
| 494 |
};
|
| 495 |
|
| 496 |
+
// Scoring Logic
|
| 497 |
const SCORES = {
|
| 498 |
+
role: {
|
| 499 |
+
'passive': 40,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 500 |
'collaborative': 70,
|
| 501 |
+
'protected': 90
|
| 502 |
+
},
|
| 503 |
+
intent: {
|
| 504 |
+
'extraction': 20,
|
| 505 |
+
'query': 60,
|
| 506 |
+
'cocreation': 90
|
| 507 |
}
|
| 508 |
};
|
| 509 |
|
| 510 |
+
const CONFIG = {
|
| 511 |
+
low: {
|
| 512 |
+
color: '#ef4444', // Red for risk
|
| 513 |
+
bg: 'rgba(239, 68, 68, 0.1)',
|
| 514 |
+
label: 'High Risk (Purple)',
|
| 515 |
+
title: 'Ambiguous State',
|
| 516 |
+
msg: 'The boundaries are blurred. Without clear roles or transparency, the system is susceptible to misuse and misunderstanding.'
|
| 517 |
+
},
|
| 518 |
+
medium: {
|
| 519 |
+
color: '#f59e0b', // Amber for caution
|
| 520 |
+
bg: 'rgba(245, 158, 11, 0.1)',
|
| 521 |
+
label: 'Moderate Alignment',
|
| 522 |
+
title: 'Stabilizing',
|
| 523 |
+
msg: 'Some boundaries are defined, but there is room for improvement in how the system and user interact.'
|
| 524 |
+
},
|
| 525 |
+
high: {
|
| 526 |
+
color: '#10b981', // Green for safe
|
| 527 |
+
bg: 'rgba(16, 185, 129, 0.1)',
|
| 528 |
+
label: 'High Integrity',
|
| 529 |
+
title: 'Safe & Aligned',
|
| 530 |
+
msg: 'Clear boundaries, transparency, and mutual respect define this interaction. This is the standard we aim for.'
|
| 531 |
+
}
|
| 532 |
};
|
| 533 |
|
| 534 |
+
// Event Listeners
|
| 535 |
+
function setupGroup(btns, key) {
|
| 536 |
+
btns.forEach(btn => {
|
| 537 |
btn.addEventListener('click', () => {
|
| 538 |
+
btns.forEach(b => b.classList.remove('active'));
|
| 539 |
btn.classList.add('active');
|
| 540 |
+
state[key] = btn.dataset.value;
|
| 541 |
updateUI();
|
| 542 |
});
|
| 543 |
});
|
| 544 |
}
|
| 545 |
|
| 546 |
+
setupGroup(roleBtns, 'role');
|
| 547 |
+
setupGroup(intentBtns, 'intent');
|
|
|
|
| 548 |
|
| 549 |
transparencyRange.addEventListener('input', (e) => {
|
| 550 |
state.transparency = parseInt(e.target.value);
|
| 551 |
+
// Update label text
|
| 552 |
+
if(state.transparency < 30) transparencyVal.textContent = "Low";
|
| 553 |
+
else if(state.transparency < 70) transparencyVal.textContent = "Medium";
|
| 554 |
+
else transparencyVal.textContent = "High";
|
| 555 |
+
|
| 556 |
updateUI();
|
| 557 |
});
|
| 558 |
|
| 559 |
function calculateScore() {
|
|
|
|
|
|
|
| 560 |
const tScore = state.transparency;
|
| 561 |
+
const rScore = SCORES.role[state.role];
|
| 562 |
+
const iScore = SCORES.intent[state.intent];
|
| 563 |
|
| 564 |
+
// Weighted Average: Transparency 40%, Role 30%, Intent 30%
|
| 565 |
+
const total = (tScore * 0.4) + (rScore * 0.3) + (iScore * 0.3);
|
| 566 |
return Math.round(total);
|
| 567 |
}
|
| 568 |
|
| 569 |
function updateUI() {
|
| 570 |
const score = calculateScore();
|
| 571 |
+
let config;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 572 |
|
| 573 |
+
// Determine Threshold
|
| 574 |
+
if (score < 50) config = CONFIG.low;
|
| 575 |
+
else if (score < 80) config = CONFIG.medium;
|
| 576 |
+
else config = CONFIG.high;
|
| 577 |
+
|
| 578 |
+
// Update Visuals
|
| 579 |
+
scoreCircle.textContent = score;
|
| 580 |
+
scoreCircle.style.borderColor = config.color;
|
| 581 |
+
scoreCircle.style.color = config.color;
|
| 582 |
+
|
| 583 |
+
statusBadge.textContent = config.label;
|
| 584 |
+
statusBadge.style.backgroundColor = config.bg;
|
| 585 |
+
statusBadge.style.color = config.color;
|
| 586 |
+
|
| 587 |
+
statusTitle.textContent = config.title;
|
| 588 |
+
statusTitle.style.color = config.color;
|
| 589 |
+
|
| 590 |
+
feedbackText.textContent = config.msg;
|
| 591 |
}
|
| 592 |
|
| 593 |
// Initialize
|