cy0307 commited on
Commit
ed9840f
·
verified ·
1 Parent(s): 50fd2be

Redesign semantic agent loop scenes

Browse files
Files changed (3) hide show
  1. design-qa.md +9 -0
  2. docs/assets/loop-hero-scene.js +695 -61
  3. docs/index.html +57 -14
design-qa.md CHANGED
@@ -22,6 +22,9 @@
22
  - Social preview: 1280 x 640, exact 579-resource, 20-pattern, 20-contract, and 8-starter counts, with the model-to-operations scope line.
23
  - Interactive hero, desktop: 1440 x 1000, one ready WebGL canvas, no horizontal overflow, and meaningful agent-system labels.
24
  - Interactive hero, mobile: 390 x 844, one ready WebGL canvas, no horizontal overflow, and all six stations inside the frame.
 
 
 
25
  - Interactive hero motion: the frame counter advanced by 47 frames during a 450 ms pointer-parallax check.
26
  - Interactive hero efficiency: the frame counter advanced by zero during a 700 ms offscreen check at the Resources section.
27
  - Future directions: three role-based tracks remain side by side at 1440 x 1000 and become a rule-separated single column at 390 x 844 without horizontal overflow.
@@ -63,6 +66,9 @@
63
  - Mobile future directions: `/private/tmp/future-viewport-mobile.png`
64
  - Three.js pointer-motion frame: `/private/tmp/awesome-loop-hero-three-motion-final.png`
65
  - Social preview: `/Users/chaoyue/Library/CloudStorage/Dropbox/Loop Engineering/awesome-loop-engineering/assets/social-preview.png`
 
 
 
66
 
67
  ## 2026-07-18 Repository Audit
68
 
@@ -82,5 +88,8 @@
82
  - Narrow phone: 320 x 844, document width equals viewport width; the headline stays within 16 px gutters and the Three.js canvas remains fully inside the 288 px content width.
83
  - Source audit: 579 rows checked; 528 public sources reachable, 3 access-restricted, 48 repository-native, and 0 broken or unreachable as of 2026-07-18 UTC.
84
  - Data and copy: the website, README, translations, social preview source, release copy, and Hugging Face card all report 579 resources, 20 patterns, 20 contracts, 8 runtime starters, and version 0.8.0. The dataset exposes 50 fields, including `loop_layer` and `scope_fit`.
 
 
 
85
 
86
  final result: passed
 
22
  - Social preview: 1280 x 640, exact 579-resource, 20-pattern, 20-contract, and 8-starter counts, with the model-to-operations scope line.
23
  - Interactive hero, desktop: 1440 x 1000, one ready WebGL canvas, no horizontal overflow, and meaningful agent-system labels.
24
  - Interactive hero, mobile: 390 x 844, one ready WebGL canvas, no horizontal overflow, and all six stations inside the frame.
25
+ - Agent-loop semantics: the bounded agent workspace is the visual anchor; context and three scoped tools feed the agent, verification remains external, memory remains durable, and decision outcomes branch to retry, human handoff, or verified exit.
26
+ - Engineering-stack scene: desktop adds a second, independent WebGL canvas that separates one-run prompt/context/harness concerns from the outer recurring loop. The original SVG remains the WebGL fallback.
27
+ - Engineering-stack mobile fallback: the desktop canvas is removed from layout at 560 px and below; a four-row semantic stack preserves the same model without shrinking 3D labels.
28
  - Interactive hero motion: the frame counter advanced by 47 frames during a 450 ms pointer-parallax check.
29
  - Interactive hero efficiency: the frame counter advanced by zero during a 700 ms offscreen check at the Resources section.
30
  - Future directions: three role-based tracks remain side by side at 1440 x 1000 and become a rule-separated single column at 390 x 844 without horizontal overflow.
 
66
  - Mobile future directions: `/private/tmp/future-viewport-mobile.png`
67
  - Three.js pointer-motion frame: `/private/tmp/awesome-loop-hero-three-motion-final.png`
68
  - Social preview: `/Users/chaoyue/Library/CloudStorage/Dropbox/Loop Engineering/awesome-loop-engineering/assets/social-preview.png`
69
+ - Semantic agent loop, desktop: `/tmp/awesome-loop-agent-desktop.png`
70
+ - Semantic engineering stack, desktop: `/tmp/awesome-loop-stack-desktop.png`
71
+ - Semantic agent loop, mobile: `/tmp/awesome-loop-agent-mobile.png`
72
 
73
  ## 2026-07-18 Repository Audit
74
 
 
88
  - Narrow phone: 320 x 844, document width equals viewport width; the headline stays within 16 px gutters and the Three.js canvas remains fully inside the 288 px content width.
89
  - Source audit: 579 rows checked; 528 public sources reachable, 3 access-restricted, 48 repository-native, and 0 broken or unreachable as of 2026-07-18 UTC.
90
  - Data and copy: the website, README, translations, social preview source, release copy, and Hugging Face card all report 579 resources, 20 patterns, 20 contracts, 8 runtime starters, and version 0.8.0. The dataset exposes 50 fields, including `loop_layer` and `scope_fit`.
91
+ - Semantic scene pass: the desktop hero crop paints 14.61% of pixels beyond the paper background with a 254.71 luminance range; the desktop stack paints 27.83% with a 249.98 range; the mobile hero paints 20.84% with a 229.45 range.
92
+ - Stage interaction: selecting Verify updates `aria-pressed` across all six controls and replaces the live detail with the independent evidence-gate explanation.
93
+ - Progressive enhancement: desktop loads the agent-loop and engineering-stack canvases; mobile loads only the agent-loop canvas and exposes the four-layer text stack. Both target viewports have zero horizontal overflow and no console messages.
94
 
95
  final result: passed
docs/assets/loop-hero-scene.js CHANGED
@@ -256,20 +256,20 @@ if (container && hero) {
256
  }
257
 
258
  const desktopStagePositions = [
259
- new THREE.Vector3(-4.55, 0, 0.06),
260
- new THREE.Vector3(-2.72, 0, 0),
261
- new THREE.Vector3(-0.7, 0, 0.06),
262
- new THREE.Vector3(1.42, 0, 0),
263
- new THREE.Vector3(3.2, 0, 0.06),
264
- new THREE.Vector3(4.72, 0, 0),
265
  ];
266
  const compactStagePositions = [
267
- new THREE.Vector3(-1.68, 0.94, 0.04),
268
- new THREE.Vector3(0, 0.94, 0),
269
- new THREE.Vector3(1.68, 0.94, 0.04),
270
- new THREE.Vector3(1.68, -1.02, 0),
271
- new THREE.Vector3(0, -1.02, 0.04),
272
- new THREE.Vector3(-1.68, -1.02, 0),
273
  ];
274
  const stagePositions = desktopStagePositions.map((position) => position.clone());
275
 
@@ -288,15 +288,15 @@ if (container && hero) {
288
  const controls = compact
289
  ? [
290
  start,
291
- new THREE.Vector3(-2.36, -1.04, -0.5),
292
- new THREE.Vector3(-2.36, 0.94, -0.5),
293
  end,
294
  ]
295
  : [
296
  start,
297
- new THREE.Vector3(3.55, 1.12, -0.62),
298
- new THREE.Vector3(0, 1.3, -0.72),
299
- new THREE.Vector3(-3.5, 1.12, -0.62),
300
  end,
301
  ];
302
  return new THREE.CatmullRomCurve3(controls, false, 'centripetal', 0.42);
@@ -385,6 +385,7 @@ if (container && hero) {
385
  numberLabels.push(number);
386
 
387
  const state = {
 
388
  baseMaterial,
389
  group,
390
  haloMaterial,
@@ -414,7 +415,7 @@ if (container && hero) {
414
  return label;
415
  }
416
 
417
- const intake = createStation(0, 'WORK QUEUE', colors.work);
418
  const queueCards = [];
419
  for (let index = 0; index < 3; index += 1) {
420
  const card = new THREE.Group();
@@ -485,53 +486,85 @@ if (container && hero) {
485
  ));
486
  return node;
487
  });
488
- addMicroLabel(delegate.group, 'ROUTES SCOPE + ROLE', colors.orchestrator, new THREE.Vector3(-0.03, -0.68, 0.18), 0.98);
489
 
490
- const act = createStation(2, 'AGENT TEAM', colors.agent);
491
- const workspaceGeometry = new THREE.BoxGeometry(1.08, 0.72, 0.54);
492
  const workspace = new THREE.LineSegments(
493
  new THREE.EdgesGeometry(workspaceGeometry),
494
- new THREE.LineBasicMaterial({ color: colors.agent, transparent: true, opacity: 0.42 }),
495
  );
496
- workspace.position.y = 0.06;
497
  act.group.add(workspace);
498
  const workspaceFloor = new THREE.Mesh(
499
- new THREE.BoxGeometry(1.02, 0.035, 0.5),
500
  track(act, standardMaterial(colors.agent, 0.48, { transparent: true, opacity: 0.78, depthWrite: false })),
501
  );
502
- workspaceFloor.position.y = -0.29;
503
  act.group.add(workspaceFloor);
504
- const roleNames = ['PLAN', 'BUILD', 'REVIEW'];
505
- const roleColors = [colors.work, colors.agent, colors.evidence];
506
- const agentPods = roleNames.map((role, index) => {
507
- const pod = new THREE.Group();
508
- pod.userData.role = role;
509
- pod.position.set((index - 1) * 0.34, -0.04 + (index === 1 ? 0.04 : 0), 0.05);
510
- const material = track(act, standardMaterial(roleColors[index], 0.4, { emissiveIntensity: 0.18 }));
511
- const body = new THREE.Mesh(new THREE.CylinderGeometry(0.105, 0.13, 0.22, 16), material);
512
- body.position.y = 0.05;
513
- const head = new THREE.Mesh(new THREE.SphereGeometry(0.11, 18, 12), material);
514
- head.position.y = 0.25;
515
- const visor = new THREE.Mesh(new THREE.BoxGeometry(0.13, 0.035, 0.035), basicMaterial(0x172033, 0.86));
516
- visor.position.set(0, 0.26, 0.1);
517
- const base = new THREE.Mesh(new THREE.CylinderGeometry(0.16, 0.19, 0.035, 18), basicMaterial(roleColors[index], 0.42));
518
- base.position.y = -0.09;
519
- pod.add(body, head, visor, base);
520
- act.group.add(pod);
521
- return pod;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  });
523
- addMicroLabel(act.group, 'PLAN / BUILD / REVIEW', colors.agent, new THREE.Vector3(-0.04, -0.68, 0.2), 1.02);
524
  const contextChips = roleColors.map((hex, index) => {
525
  const chip = new THREE.Mesh(
526
- new THREE.BoxGeometry(0.17, 0.11, 0.035),
527
  track(act, standardMaterial(hex, 0.4, { emissiveIntensity: 0.12 })),
528
  );
529
- chip.position.set((index - 1) * 0.32, 0.56 + (index % 2) * 0.05, 0.02);
 
530
  act.group.add(chip);
531
  return chip;
532
  });
533
 
534
- const verify = createStation(3, 'EVIDENCE GATE', colors.evidence);
535
  const gateMaterial = track(verify, standardMaterial(colors.evidence, 0.45, { emissiveIntensity: 0.18 }));
536
  [-0.36, 0.36].forEach((x) => {
537
  const post = new THREE.Mesh(new THREE.BoxGeometry(0.11, 0.75, 0.16), gateMaterial);
@@ -576,7 +609,7 @@ if (container && hero) {
576
  });
577
  addMicroLabel(verify.group, 'TESTS / EVALS / TRACES', colors.evidence, new THREE.Vector3(-0.05, -0.68, 0.18), 1.05);
578
 
579
- const persist = createStation(4, 'STATE LEDGER', colors.state);
580
  const stateLayers = [0, 1, 2].map((index) => {
581
  const material = track(persist, standardMaterial(index === 1 ? colors.orchestrator : colors.state, 0.34, {
582
  emissiveIntensity: 0.12,
@@ -606,7 +639,7 @@ if (container && hero) {
606
  });
607
  addMicroLabel(persist.group, 'RECEIPTS + MEMORY', colors.state, new THREE.Vector3(-0.04, -0.68, 0.18), 0.92);
608
 
609
- const decide = createStation(5, 'NEXT ACTION', colors.decision);
610
  const decisionCoreMaterial = track(decide, standardMaterial(colors.decision, 0.35, {
611
  emissiveIntensity: 0.3,
612
  roughness: 0.28,
@@ -651,6 +684,80 @@ if (container && hero) {
651
  packetLine.position.set(-0.03, -0.03, 0.048);
652
  const packetMarker = new THREE.Mesh(new THREE.BoxGeometry(0.052, 0.052, 0.02), basicMaterial(colors.evidence, 0.9));
653
  packetMarker.position.set(0.13, -0.035, 0.052);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  const packetAuraMaterial = new THREE.MeshBasicMaterial({
655
  color: colors.work,
656
  transparent: true,
@@ -660,9 +767,21 @@ if (container && hero) {
660
  });
661
  const packetAura = new THREE.Mesh(new THREE.SphereGeometry(0.31, 16, 10), packetAuraMaterial);
662
  const packetGroup = new THREE.Group();
663
- packetGroup.add(packetAura, packetBody, packetHeader, packetLine, packetMarker);
 
 
 
 
 
 
 
 
 
 
 
 
664
  packetGroup.position.copy(mainCurve.getPointAt(0));
665
- packetGroup.position.z = 0.42;
666
  root.add(packetGroup);
667
 
668
  const trail = [];
@@ -753,7 +872,10 @@ if (container && hero) {
753
  }
754
  }
755
 
756
- targetPacketPosition.z = 0.42;
 
 
 
757
  packetGroup.position.lerp(targetPacketPosition, reducedMotion.matches ? 1 : 0.18);
758
  const targetAngle = Math.atan2(targetPacketTangent.y, targetPacketTangent.x);
759
  packetGroup.rotation.z += (targetAngle - packetGroup.rotation.z) * 0.12;
@@ -770,7 +892,7 @@ if (container && hero) {
770
  const selected = index === visualStage;
771
  const packetDistance = state.group.position.distanceTo(packetGroup.position);
772
  const nearby = Math.max(0, 1 - packetDistance / 1.2);
773
- const scale = stationScale * (1 + (selected ? 0.075 : 0) + nearby * 0.025);
774
  state.group.scale.setScalar(scale);
775
  state.haloMaterial.opacity = selected ? 0.32 : 0.07 + nearby * 0.12;
776
  state.baseMaterial.emissiveIntensity = selected ? 0.14 : 0.025 + nearby * 0.05;
@@ -791,12 +913,17 @@ if (container && hero) {
791
  const pulse = reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 2 + index * 1.8) * 0.08;
792
  node.scale.setScalar(pulse);
793
  });
794
- agentPods.forEach((pod, index) => {
795
- const working = reducedMotion.matches ? 0 : Math.sin(seconds * 1.8 + index * 1.6) * 0.025;
796
- pod.position.y = -0.04 + (index === 1 ? 0.04 : 0) + working;
 
 
 
 
 
797
  });
798
  contextChips.forEach((chip, index) => {
799
- chip.position.y = 0.56 + (index % 2) * 0.05 + (reducedMotion.matches ? 0 : Math.sin(seconds * 1.4 + index) * 0.04);
800
  chip.rotation.y = seconds * 0.25 + index * 0.5;
801
  });
802
  scanner.position.y = reducedMotion.matches ? 0.02 : -0.22 + ((Math.sin(seconds * 1.65) + 1) * 0.22);
@@ -818,6 +945,14 @@ if (container && hero) {
818
  const pulse = reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 1.8 + index * 1.9) * 0.07;
819
  node.scale.setScalar(pulse);
820
  });
 
 
 
 
 
 
 
 
821
  retryPulse.position.copy(retryCurve.getPointAt((seconds * 0.12 + 0.2) % 1));
822
 
823
  root.rotation.x += (targetRotationX - root.rotation.x) * 0.04;
@@ -888,8 +1023,8 @@ if (container && hero) {
888
  const viewHeight = compact
889
  ? Math.max(3.42, (narrow ? 5.42 : 5.2) / aspect)
890
  : tablet
891
- ? 11.2 / aspect
892
- : 3.15;
893
  const viewWidth = viewHeight * aspect;
894
  camera.left = -viewWidth / 2;
895
  camera.right = viewWidth / 2;
@@ -899,7 +1034,7 @@ if (container && hero) {
899
  camera.lookAt(0, compact ? -0.05 : 0, 0);
900
  camera.updateProjectionMatrix();
901
 
902
- stationScale = narrow ? 0.94 : compact ? 0.99 : tablet ? 0.92 : 1.04;
903
  packetGroup.scale.setScalar(narrow ? 1.02 : compact ? 1.08 : 1);
904
  stationLabels.forEach((label) => {
905
  label.visible = !compact;
@@ -997,9 +1132,12 @@ if (container && hero) {
997
  }
998
  return {
999
  activeStage,
1000
- agentRoles: roleNames.length,
1001
  compactLayout,
 
1002
  drawCalls: renderer.info.render.calls,
 
 
1003
  flowStage,
1004
  frameCount,
1005
  height,
@@ -1012,6 +1150,7 @@ if (container && hero) {
1012
  reducedMotion: reducedMotion.matches,
1013
  sampled,
1014
  semanticStages: stationStates.length,
 
1015
  triangles: renderer.info.render.triangles,
1016
  width,
1017
  };
@@ -1034,3 +1173,498 @@ if (container && hero) {
1034
  startAnimation();
1035
  }
1036
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  }
257
 
258
  const desktopStagePositions = [
259
+ new THREE.Vector3(-4.45, -0.34, 0.06),
260
+ new THREE.Vector3(-2.55, 0.72, 0),
261
+ new THREE.Vector3(0, 0.02, 0.1),
262
+ new THREE.Vector3(2.55, 0.72, 0),
263
+ new THREE.Vector3(4.42, -0.34, 0.06),
264
+ new THREE.Vector3(2.12, -1.08, 0),
265
  ];
266
  const compactStagePositions = [
267
+ new THREE.Vector3(-1.72, 0.46, 0.04),
268
+ new THREE.Vector3(-0.88, 0.96, 0),
269
+ new THREE.Vector3(0, -0.02, 0.08),
270
+ new THREE.Vector3(0.9, 0.96, 0),
271
+ new THREE.Vector3(1.72, 0.46, 0.04),
272
+ new THREE.Vector3(1.08, -0.82, 0),
273
  ];
274
  const stagePositions = desktopStagePositions.map((position) => position.clone());
275
 
 
288
  const controls = compact
289
  ? [
290
  start,
291
+ new THREE.Vector3(0.1, -1.18, -0.5),
292
+ new THREE.Vector3(-1.82, -0.9, -0.5),
293
  end,
294
  ]
295
  : [
296
  start,
297
+ new THREE.Vector3(0.4, -1.54, -0.62),
298
+ new THREE.Vector3(-2.5, -1.4, -0.72),
299
+ new THREE.Vector3(-4.1, -0.95, -0.62),
300
  end,
301
  ];
302
  return new THREE.CatmullRomCurve3(controls, false, 'centripetal', 0.42);
 
385
  numberLabels.push(number);
386
 
387
  const state = {
388
+ baseScale: index === 2 ? 1.3 : 0.91,
389
  baseMaterial,
390
  group,
391
  haloMaterial,
 
415
  return label;
416
  }
417
 
418
+ const intake = createStation(0, 'WORK IN', colors.work);
419
  const queueCards = [];
420
  for (let index = 0; index < 3; index += 1) {
421
  const card = new THREE.Group();
 
486
  ));
487
  return node;
488
  });
489
+ addMicroLabel(delegate.group, 'SCOPE + ROUTE', colors.orchestrator, new THREE.Vector3(-0.03, -0.68, 0.18), 0.9);
490
 
491
+ const act = createStation(2, 'AGENT + TOOLS', colors.agent);
492
+ const workspaceGeometry = new THREE.BoxGeometry(1.16, 0.82, 0.62);
493
  const workspace = new THREE.LineSegments(
494
  new THREE.EdgesGeometry(workspaceGeometry),
495
+ new THREE.LineBasicMaterial({ color: colors.agent, transparent: true, opacity: 0.56 }),
496
  );
497
+ workspace.position.y = 0.03;
498
  act.group.add(workspace);
499
  const workspaceFloor = new THREE.Mesh(
500
+ new THREE.BoxGeometry(1.1, 0.035, 0.56),
501
  track(act, standardMaterial(colors.agent, 0.48, { transparent: true, opacity: 0.78, depthWrite: false })),
502
  );
503
+ workspaceFloor.position.y = -0.365;
504
  act.group.add(workspaceFloor);
505
+ const agentCoreGroup = new THREE.Group();
506
+ agentCoreGroup.position.set(0, -0.02, 0.08);
507
+ const agentCoreMaterial = track(act, standardMaterial(colors.agent, 0.3, {
508
+ emissiveIntensity: 0.34,
509
+ roughness: 0.24,
510
+ }));
511
+ const agentBody = new THREE.Mesh(new THREE.CylinderGeometry(0.14, 0.18, 0.29, 20), agentCoreMaterial);
512
+ agentBody.position.y = 0.02;
513
+ const agentHead = new THREE.Mesh(new THREE.SphereGeometry(0.165, 24, 16), agentCoreMaterial);
514
+ agentHead.position.y = 0.28;
515
+ const agentVisor = new THREE.Mesh(new THREE.BoxGeometry(0.205, 0.05, 0.045), basicMaterial(0x172033, 0.9));
516
+ agentVisor.position.set(0, 0.29, 0.14);
517
+ const agentCore = new THREE.Mesh(
518
+ new THREE.SphereGeometry(0.055, 16, 10),
519
+ track(act, standardMaterial(colors.work, 0.08, { emissiveIntensity: 0.78, roughness: 0.18 })),
520
+ );
521
+ agentCore.position.set(0, 0.03, 0.17);
522
+ const agentRing = new THREE.Mesh(
523
+ new THREE.TorusGeometry(0.24, 0.018, 8, 42),
524
+ new THREE.MeshBasicMaterial({ color: colors.work, transparent: true, opacity: 0.5, depthWrite: false }),
525
+ );
526
+ agentRing.position.set(0, 0.03, 0.02);
527
+ agentCoreGroup.add(agentBody, agentHead, agentVisor, agentCore, agentRing);
528
+ act.group.add(agentCoreGroup);
529
+
530
+ const roleNames = ['CODE', 'BROWSE', 'SHELL'];
531
+ const roleColors = [colors.work, colors.evidence, colors.state];
532
+ const toolPositions = [
533
+ new THREE.Vector3(-0.43, -0.04, 0.04),
534
+ new THREE.Vector3(0.43, -0.04, 0.04),
535
+ new THREE.Vector3(0, -0.3, 0.05),
536
+ ];
537
+ const toolPods = toolPositions.map((position, index) => {
538
+ const material = track(act, standardMaterial(roleColors[index], 0.36, { emissiveIntensity: 0.22 }));
539
+ const tool = index === 0
540
+ ? new THREE.Mesh(new THREE.BoxGeometry(0.14, 0.14, 0.14), material)
541
+ : index === 1
542
+ ? new THREE.Mesh(new THREE.IcosahedronGeometry(0.095, 1), material)
543
+ : new THREE.Mesh(new THREE.CylinderGeometry(0.085, 0.105, 0.13, 16), material);
544
+ tool.position.copy(position);
545
+ tool.userData.basePosition = position.clone();
546
+ act.group.add(tool);
547
+ act.group.add(cylinderBetween(
548
+ new THREE.Vector3(0, 0.03, 0.06),
549
+ position,
550
+ 0.009,
551
+ basicMaterial(roleColors[index], 0.55),
552
+ ));
553
+ return tool;
554
  });
555
+ addMicroLabel(act.group, 'CONTEXT + TOOLS', colors.agent, new THREE.Vector3(-0.05, -0.68, 0.2), 0.92);
556
  const contextChips = roleColors.map((hex, index) => {
557
  const chip = new THREE.Mesh(
558
+ new THREE.BoxGeometry(0.19, 0.12, 0.035),
559
  track(act, standardMaterial(hex, 0.4, { emissiveIntensity: 0.12 })),
560
  );
561
+ chip.position.set((index - 1) * 0.29, 0.52 + (index % 2) * 0.035, 0.02);
562
+ chip.userData.baseY = chip.position.y;
563
  act.group.add(chip);
564
  return chip;
565
  });
566
 
567
+ const verify = createStation(3, 'INDEPENDENT GATE', colors.evidence);
568
  const gateMaterial = track(verify, standardMaterial(colors.evidence, 0.45, { emissiveIntensity: 0.18 }));
569
  [-0.36, 0.36].forEach((x) => {
570
  const post = new THREE.Mesh(new THREE.BoxGeometry(0.11, 0.75, 0.16), gateMaterial);
 
609
  });
610
  addMicroLabel(verify.group, 'TESTS / EVALS / TRACES', colors.evidence, new THREE.Vector3(-0.05, -0.68, 0.18), 1.05);
611
 
612
+ const persist = createStation(4, 'DURABLE MEMORY', colors.state);
613
  const stateLayers = [0, 1, 2].map((index) => {
614
  const material = track(persist, standardMaterial(index === 1 ? colors.orchestrator : colors.state, 0.34, {
615
  emissiveIntensity: 0.12,
 
639
  });
640
  addMicroLabel(persist.group, 'RECEIPTS + MEMORY', colors.state, new THREE.Vector3(-0.04, -0.68, 0.18), 0.92);
641
 
642
+ const decide = createStation(5, 'DECISION', colors.decision);
643
  const decisionCoreMaterial = track(decide, standardMaterial(colors.decision, 0.35, {
644
  emissiveIntensity: 0.3,
645
  roughness: 0.28,
 
684
  packetLine.position.set(-0.03, -0.03, 0.048);
685
  const packetMarker = new THREE.Mesh(new THREE.BoxGeometry(0.052, 0.052, 0.02), basicMaterial(colors.evidence, 0.9));
686
  packetMarker.position.set(0.13, -0.035, 0.052);
687
+ const taskArtifact = new THREE.Group();
688
+ taskArtifact.add(packetBody, packetHeader, packetLine, packetMarker);
689
+
690
+ const assignmentArtifact = new THREE.Group();
691
+ const assignmentCore = new THREE.Mesh(
692
+ new THREE.DodecahedronGeometry(0.13, 0),
693
+ standardMaterial(colors.orchestrator, 0.28, { emissiveIntensity: 0.42, roughness: 0.24 }),
694
+ );
695
+ const assignmentRing = new THREE.Mesh(
696
+ new THREE.TorusGeometry(0.2, 0.025, 8, 36),
697
+ basicMaterial(colors.orchestrator, 0.82),
698
+ );
699
+ assignmentArtifact.add(assignmentCore, assignmentRing);
700
+
701
+ const actionArtifact = new THREE.Group();
702
+ const actionCore = new THREE.Mesh(
703
+ new THREE.SphereGeometry(0.12, 18, 12),
704
+ standardMaterial(colors.agent, 0.24, { emissiveIntensity: 0.48, roughness: 0.22 }),
705
+ );
706
+ actionArtifact.add(actionCore);
707
+ [-0.2, 0, 0.2].forEach((x, index) => {
708
+ const toolSignal = new THREE.Mesh(
709
+ new THREE.BoxGeometry(0.075, 0.075, 0.075),
710
+ basicMaterial(roleColors[index], 0.94),
711
+ );
712
+ toolSignal.position.set(x, index === 1 ? 0.2 : -0.16, 0);
713
+ actionArtifact.add(toolSignal);
714
+ });
715
+
716
+ const evidenceArtifact = new THREE.Group();
717
+ const evidenceBadge = new THREE.Mesh(
718
+ new THREE.CircleGeometry(0.2, 6),
719
+ standardMaterial(colors.evidence, 0.28, { emissiveIntensity: 0.44, roughness: 0.24 }),
720
+ );
721
+ evidenceArtifact.add(evidenceBadge);
722
+ evidenceArtifact.add(cylinderBetween(
723
+ new THREE.Vector3(-0.095, -0.005, 0.04),
724
+ new THREE.Vector3(-0.025, -0.08, 0.04),
725
+ 0.018,
726
+ basicMaterial(0xffffff, 0.96),
727
+ 10,
728
+ ));
729
+ evidenceArtifact.add(cylinderBetween(
730
+ new THREE.Vector3(-0.025, -0.08, 0.04),
731
+ new THREE.Vector3(0.12, 0.1, 0.04),
732
+ 0.018,
733
+ basicMaterial(0xffffff, 0.96),
734
+ 10,
735
+ ));
736
+
737
+ const stateArtifact = new THREE.Group();
738
+ [-0.09, 0, 0.09].forEach((y, index) => {
739
+ const layer = new THREE.Mesh(
740
+ new THREE.CylinderGeometry(0.17, 0.17, 0.07, 22),
741
+ standardMaterial(index === 1 ? colors.orchestrator : colors.state, 0.3, {
742
+ emissiveIntensity: 0.34,
743
+ roughness: 0.3,
744
+ }),
745
+ );
746
+ layer.position.y = y;
747
+ stateArtifact.add(layer);
748
+ });
749
+
750
+ const decisionArtifact = new THREE.Group();
751
+ const decisionSignal = new THREE.Mesh(
752
+ new THREE.OctahedronGeometry(0.16, 0),
753
+ standardMaterial(colors.decision, 0.26, { emissiveIntensity: 0.5, roughness: 0.2 }),
754
+ );
755
+ const decisionSignalRing = new THREE.Mesh(
756
+ new THREE.TorusGeometry(0.22, 0.02, 8, 36),
757
+ basicMaterial(colors.decision, 0.78),
758
+ );
759
+ decisionArtifact.add(decisionSignal, decisionSignalRing);
760
+
761
  const packetAuraMaterial = new THREE.MeshBasicMaterial({
762
  color: colors.work,
763
  transparent: true,
 
767
  });
768
  const packetAura = new THREE.Mesh(new THREE.SphereGeometry(0.31, 16, 10), packetAuraMaterial);
769
  const packetGroup = new THREE.Group();
770
+ const packetRepresentations = [
771
+ taskArtifact,
772
+ assignmentArtifact,
773
+ actionArtifact,
774
+ evidenceArtifact,
775
+ stateArtifact,
776
+ decisionArtifact,
777
+ ];
778
+ packetRepresentations.forEach((artifact, index) => {
779
+ artifact.visible = index === 0;
780
+ packetGroup.add(artifact);
781
+ });
782
+ packetGroup.add(packetAura);
783
  packetGroup.position.copy(mainCurve.getPointAt(0));
784
+ packetGroup.position.z = 0.24;
785
  root.add(packetGroup);
786
 
787
  const trail = [];
 
872
  }
873
  }
874
 
875
+ packetRepresentations.forEach((artifact, index) => {
876
+ artifact.visible = index === visualStage;
877
+ });
878
+ targetPacketPosition.z = 0.24;
879
  packetGroup.position.lerp(targetPacketPosition, reducedMotion.matches ? 1 : 0.18);
880
  const targetAngle = Math.atan2(targetPacketTangent.y, targetPacketTangent.x);
881
  packetGroup.rotation.z += (targetAngle - packetGroup.rotation.z) * 0.12;
 
892
  const selected = index === visualStage;
893
  const packetDistance = state.group.position.distanceTo(packetGroup.position);
894
  const nearby = Math.max(0, 1 - packetDistance / 1.2);
895
+ const scale = stationScale * state.baseScale * (1 + (selected ? 0.075 : 0) + nearby * 0.025);
896
  state.group.scale.setScalar(scale);
897
  state.haloMaterial.opacity = selected ? 0.32 : 0.07 + nearby * 0.12;
898
  state.baseMaterial.emissiveIntensity = selected ? 0.14 : 0.025 + nearby * 0.05;
 
913
  const pulse = reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 2 + index * 1.8) * 0.08;
914
  node.scale.setScalar(pulse);
915
  });
916
+ const agentWorking = reducedMotion.matches ? 0 : Math.sin(seconds * 1.8) * 0.018;
917
+ agentCoreGroup.position.y = -0.02 + agentWorking;
918
+ agentRing.rotation.z = -seconds * 0.3;
919
+ agentCore.scale.setScalar(reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 2.4) * 0.1);
920
+ toolPods.forEach((tool, index) => {
921
+ tool.position.copy(tool.userData.basePosition);
922
+ tool.position.y += reducedMotion.matches ? 0 : Math.sin(seconds * 1.7 + index * 1.7) * 0.018;
923
+ tool.rotation.y = seconds * (index % 2 ? -0.34 : 0.34);
924
  });
925
  contextChips.forEach((chip, index) => {
926
+ chip.position.y = chip.userData.baseY + (reducedMotion.matches ? 0 : Math.sin(seconds * 1.4 + index) * 0.025);
927
  chip.rotation.y = seconds * 0.25 + index * 0.5;
928
  });
929
  scanner.position.y = reducedMotion.matches ? 0.02 : -0.22 + ((Math.sin(seconds * 1.65) + 1) * 0.22);
 
945
  const pulse = reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 1.8 + index * 1.9) * 0.07;
946
  node.scale.setScalar(pulse);
947
  });
948
+ assignmentCore.rotation.x = seconds * 0.5;
949
+ assignmentCore.rotation.y = seconds * 0.7;
950
+ assignmentRing.rotation.z = -seconds * 0.32;
951
+ actionArtifact.rotation.z = seconds * 0.2;
952
+ evidenceArtifact.rotation.z = reducedMotion.matches ? 0 : Math.sin(seconds * 1.2) * 0.08;
953
+ stateArtifact.rotation.y = seconds * 0.28;
954
+ decisionSignal.rotation.y = seconds * 0.6;
955
+ decisionSignalRing.rotation.z = -seconds * 0.28;
956
  retryPulse.position.copy(retryCurve.getPointAt((seconds * 0.12 + 0.2) % 1));
957
 
958
  root.rotation.x += (targetRotationX - root.rotation.x) * 0.04;
 
1023
  const viewHeight = compact
1024
  ? Math.max(3.42, (narrow ? 5.42 : 5.2) / aspect)
1025
  : tablet
1026
+ ? 11.6 / aspect
1027
+ : 3.48;
1028
  const viewWidth = viewHeight * aspect;
1029
  camera.left = -viewWidth / 2;
1030
  camera.right = viewWidth / 2;
 
1034
  camera.lookAt(0, compact ? -0.05 : 0, 0);
1035
  camera.updateProjectionMatrix();
1036
 
1037
+ stationScale = narrow ? 0.78 : compact ? 0.82 : tablet ? 0.88 : 0.96;
1038
  packetGroup.scale.setScalar(narrow ? 1.02 : compact ? 1.08 : 1);
1039
  stationLabels.forEach((label) => {
1040
  label.visible = !compact;
 
1132
  }
1133
  return {
1134
  activeStage,
1135
+ boundedAgent: true,
1136
  compactLayout,
1137
+ contextInputs: contextChips.length,
1138
  drawCalls: renderer.info.render.calls,
1139
+ durableMemory: true,
1140
+ externalVerifier: true,
1141
  flowStage,
1142
  frameCount,
1143
  height,
 
1150
  reducedMotion: reducedMotion.matches,
1151
  sampled,
1152
  semanticStages: stationStates.length,
1153
+ scopedTools: roleNames.length,
1154
  triangles: renderer.info.render.triangles,
1155
  width,
1156
  };
 
1173
  startAnimation();
1174
  }
1175
  }
1176
+
1177
+ const stackContainer = document.querySelector('[data-stack-scene]');
1178
+ const desktopStackMedia = window.matchMedia('(min-width: 561px)');
1179
+ let stackSceneInitialized = false;
1180
+
1181
+ function initStackScene() {
1182
+ if (!stackContainer || stackSceneInitialized || !desktopStackMedia.matches) return;
1183
+ stackSceneInitialized = true;
1184
+
1185
+ const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
1186
+ const lowPower = Number(navigator.hardwareConcurrency || 8) <= 4;
1187
+ const colors = {
1188
+ prompt: 0x172033,
1189
+ context: 0x0c8b66,
1190
+ harness: 0x098fb8,
1191
+ loop: 0x155eef,
1192
+ violet: 0x7055d9,
1193
+ evidence: 0x0c9b68,
1194
+ human: 0xd97706,
1195
+ line: 0x91a0b8,
1196
+ };
1197
+ const paper = new THREE.Color(0xf4f7fc);
1198
+ const white = new THREE.Color(0xffffff);
1199
+ const yAxis = new THREE.Vector3(0, 1, 0);
1200
+ let renderer;
1201
+
1202
+ try {
1203
+ renderer = new THREE.WebGLRenderer({
1204
+ alpha: false,
1205
+ antialias: !lowPower,
1206
+ preserveDrawingBuffer: true,
1207
+ powerPreference: 'high-performance',
1208
+ });
1209
+ } catch (error) {
1210
+ stackContainer.dataset.sceneState = 'fallback';
1211
+ return;
1212
+ }
1213
+
1214
+ renderer.setClearColor(paper, 1);
1215
+ renderer.outputColorSpace = THREE.SRGBColorSpace;
1216
+ renderer.toneMapping = THREE.ACESFilmicToneMapping;
1217
+ renderer.toneMappingExposure = 1.02;
1218
+ renderer.domElement.setAttribute('aria-hidden', 'true');
1219
+ renderer.domElement.dataset.stackSceneCanvas = 'true';
1220
+ stackContainer.appendChild(renderer.domElement);
1221
+
1222
+ const scene = new THREE.Scene();
1223
+ const camera = new THREE.OrthographicCamera(-4, 4, 2.5, -2.5, 0.1, 40);
1224
+ camera.position.set(0, 3.5, 10);
1225
+ camera.lookAt(0, 0, 0);
1226
+
1227
+ scene.add(new THREE.HemisphereLight(0xffffff, 0xb9c8dc, 1.7));
1228
+ const keyLight = new THREE.DirectionalLight(0xffffff, 2.2);
1229
+ keyLight.position.set(-4, 6, 8);
1230
+ scene.add(keyLight);
1231
+ const blueLight = new THREE.PointLight(colors.loop, 4.6, 12, 2);
1232
+ blueLight.position.set(-1.4, 2.2, 4.4);
1233
+ scene.add(blueLight);
1234
+ const greenLight = new THREE.PointLight(colors.evidence, 3.8, 10, 2);
1235
+ greenLight.position.set(1.2, -0.2, 4.2);
1236
+ scene.add(greenLight);
1237
+
1238
+ const root = new THREE.Group();
1239
+ scene.add(root);
1240
+ const stack = new THREE.Group();
1241
+ stack.position.x = -1.25;
1242
+ root.add(stack);
1243
+
1244
+ function material(hex, lighten = 0.36, options = {}) {
1245
+ const color = new THREE.Color(hex);
1246
+ const result = new THREE.MeshStandardMaterial({
1247
+ color: color.clone().lerp(white, Math.min(lighten, 0.58)),
1248
+ emissive: color,
1249
+ emissiveIntensity: options.emissiveIntensity ?? 0.08,
1250
+ metalness: options.metalness ?? 0.08,
1251
+ roughness: options.roughness ?? 0.4,
1252
+ transparent: options.transparent ?? false,
1253
+ opacity: options.opacity ?? 1,
1254
+ depthWrite: options.depthWrite ?? true,
1255
+ });
1256
+ result.userData.baseEmissiveIntensity = result.emissiveIntensity;
1257
+ return result;
1258
+ }
1259
+
1260
+ function basic(hex, opacity = 1) {
1261
+ return new THREE.MeshBasicMaterial({
1262
+ color: hex,
1263
+ transparent: opacity < 1,
1264
+ opacity,
1265
+ depthWrite: opacity >= 0.94,
1266
+ });
1267
+ }
1268
+
1269
+ function cylinderBetween(start, end, radius, meshMaterial) {
1270
+ const direction = end.clone().sub(start);
1271
+ const cylinder = new THREE.Mesh(
1272
+ new THREE.CylinderGeometry(radius, radius, direction.length(), 12),
1273
+ meshMaterial,
1274
+ );
1275
+ cylinder.position.copy(start).add(end).multiplyScalar(0.5);
1276
+ cylinder.quaternion.setFromUnitVectors(yAxis, direction.clone().normalize());
1277
+ return cylinder;
1278
+ }
1279
+
1280
+ function makeLayerLabel(title, description, hex) {
1281
+ const canvas = document.createElement('canvas');
1282
+ canvas.width = 768;
1283
+ canvas.height = 160;
1284
+ const context = canvas.getContext('2d');
1285
+ const accent = `#${new THREE.Color(hex).getHexString()}`;
1286
+ context.clearRect(0, 0, canvas.width, canvas.height);
1287
+ context.fillStyle = accent;
1288
+ context.fillRect(20, 29, 42, 5);
1289
+ context.fillStyle = accent;
1290
+ context.font = '700 38px Inter, Arial, sans-serif';
1291
+ context.textAlign = 'left';
1292
+ context.textBaseline = 'middle';
1293
+ context.fillText(title, 20, 67);
1294
+ context.fillStyle = '#4d5b70';
1295
+ context.font = '500 23px Inter, Arial, sans-serif';
1296
+ context.fillText(description, 20, 111);
1297
+ const texture = new THREE.CanvasTexture(canvas);
1298
+ texture.colorSpace = THREE.SRGBColorSpace;
1299
+ texture.minFilter = THREE.LinearFilter;
1300
+ const sprite = new THREE.Sprite(new THREE.SpriteMaterial({
1301
+ map: texture,
1302
+ transparent: true,
1303
+ depthTest: false,
1304
+ depthWrite: false,
1305
+ }));
1306
+ sprite.scale.set(3.5, 0.73, 1);
1307
+ sprite.renderOrder = 40;
1308
+ return sprite;
1309
+ }
1310
+
1311
+ function makeMicroLabel(text, hex, width = 1.15) {
1312
+ const canvas = document.createElement('canvas');
1313
+ canvas.width = 512;
1314
+ canvas.height = 96;
1315
+ const context = canvas.getContext('2d');
1316
+ context.clearRect(0, 0, canvas.width, canvas.height);
1317
+ context.fillStyle = `#${new THREE.Color(hex).getHexString()}`;
1318
+ context.font = '700 29px IBM Plex Mono, monospace';
1319
+ context.textAlign = 'center';
1320
+ context.textBaseline = 'middle';
1321
+ context.fillText(text, 256, 48);
1322
+ const texture = new THREE.CanvasTexture(canvas);
1323
+ texture.colorSpace = THREE.SRGBColorSpace;
1324
+ const sprite = new THREE.Sprite(new THREE.SpriteMaterial({
1325
+ map: texture,
1326
+ transparent: true,
1327
+ depthTest: false,
1328
+ depthWrite: false,
1329
+ }));
1330
+ sprite.scale.set(width, 0.22, 1);
1331
+ sprite.renderOrder = 42;
1332
+ return sprite;
1333
+ }
1334
+
1335
+ const layerSpecs = [
1336
+ { title: 'Prompt Engineering', description: 'Instruction for one model call', color: colors.prompt, y: -1.32 },
1337
+ { title: 'Context Engineering', description: 'Memory, state, documents, examples', color: colors.context, y: -0.62 },
1338
+ { title: 'Harness Engineering', description: 'Tools, permissions, sandbox, traces', color: colors.harness, y: 0.08 },
1339
+ { title: 'Loop Engineering', description: 'Trigger, verify, persist, decide, repeat', color: colors.loop, y: 0.9 },
1340
+ ];
1341
+ const layerMeshes = [];
1342
+ const layerLabels = [];
1343
+
1344
+ layerSpecs.forEach((spec, index) => {
1345
+ const layerMaterial = material(spec.color, index === 0 ? 0.5 : 0.44, {
1346
+ emissiveIntensity: index === 3 ? 0.16 : 0.06,
1347
+ roughness: 0.48,
1348
+ transparent: index === 3,
1349
+ opacity: index === 3 ? 0.82 : 1,
1350
+ });
1351
+ const slab = new THREE.Mesh(new THREE.BoxGeometry(2.8, 0.14, 1.48), layerMaterial);
1352
+ slab.position.y = spec.y;
1353
+ stack.add(slab);
1354
+ layerMeshes.push(slab);
1355
+
1356
+ const connectorStart = new THREE.Vector3(0.2, spec.y, 0.04);
1357
+ const connectorEnd = new THREE.Vector3(0.58, spec.y, 0.04);
1358
+ root.add(cylinderBetween(connectorStart, connectorEnd, 0.009, basic(spec.color, 0.64)));
1359
+ const connectorDot = new THREE.Mesh(new THREE.SphereGeometry(0.045, 12, 8), basic(spec.color, 0.9));
1360
+ connectorDot.position.copy(connectorEnd);
1361
+ root.add(connectorDot);
1362
+
1363
+ const label = makeLayerLabel(spec.title, spec.description, spec.color);
1364
+ label.position.set(2.35, spec.y + 0.04, 0.12);
1365
+ root.add(label);
1366
+ layerLabels.push(label);
1367
+ });
1368
+
1369
+ const promptCard = new THREE.Group();
1370
+ const promptBody = new THREE.Mesh(new THREE.BoxGeometry(0.9, 0.06, 0.62), material(colors.prompt, 0.64, { roughness: 0.58 }));
1371
+ const promptHeader = new THREE.Mesh(new THREE.BoxGeometry(0.68, 0.012, 0.07), basic(colors.loop, 0.88));
1372
+ promptHeader.position.set(0, 0.042, 0.16);
1373
+ const promptLine = new THREE.Mesh(new THREE.BoxGeometry(0.48, 0.012, 0.055), basic(0x8fa0b7, 0.72));
1374
+ promptLine.position.set(-0.08, 0.043, -0.04);
1375
+ promptCard.add(promptBody, promptHeader, promptLine);
1376
+ promptCard.position.set(0, -1.18, 0.02);
1377
+ stack.add(promptCard);
1378
+
1379
+ const contextCards = [-0.65, 0, 0.65].map((x, index) => {
1380
+ const card = new THREE.Mesh(
1381
+ new THREE.BoxGeometry(0.43, 0.08, 0.36),
1382
+ material([colors.context, colors.loop, colors.violet][index], 0.48, { emissiveIntensity: 0.12 }),
1383
+ );
1384
+ card.position.set(x, -0.48 + (index === 1 ? 0.05 : 0), 0.02);
1385
+ card.userData.baseY = card.position.y;
1386
+ stack.add(card);
1387
+ return card;
1388
+ });
1389
+
1390
+ const harnessFrame = new THREE.LineSegments(
1391
+ new THREE.EdgesGeometry(new THREE.BoxGeometry(1.52, 0.66, 0.92)),
1392
+ new THREE.LineBasicMaterial({ color: colors.harness, transparent: true, opacity: 0.62 }),
1393
+ );
1394
+ harnessFrame.position.y = 0.32;
1395
+ stack.add(harnessFrame);
1396
+
1397
+ const agent = new THREE.Group();
1398
+ const agentMaterial = material(colors.loop, 0.28, { emissiveIntensity: 0.3, roughness: 0.24 });
1399
+ const agentBody = new THREE.Mesh(new THREE.CylinderGeometry(0.15, 0.2, 0.34, 20), agentMaterial);
1400
+ const agentHead = new THREE.Mesh(new THREE.SphereGeometry(0.18, 24, 16), agentMaterial);
1401
+ agentHead.position.y = 0.31;
1402
+ const agentVisor = new THREE.Mesh(new THREE.BoxGeometry(0.22, 0.05, 0.05), basic(colors.prompt, 0.9));
1403
+ agentVisor.position.set(0, 0.32, 0.16);
1404
+ const agentCore = new THREE.Mesh(
1405
+ new THREE.SphereGeometry(0.06, 16, 10),
1406
+ material(colors.context, 0.08, { emissiveIntensity: 0.78, roughness: 0.18 }),
1407
+ );
1408
+ agentCore.position.set(0, 0, 0.2);
1409
+ agent.add(agentBody, agentHead, agentVisor, agentCore);
1410
+ agent.position.set(0, 0.18, 0.08);
1411
+ stack.add(agent);
1412
+
1413
+ const toolNodes = [-0.58, 0.58].map((x, index) => {
1414
+ const node = new THREE.Mesh(
1415
+ index === 0 ? new THREE.BoxGeometry(0.16, 0.16, 0.16) : new THREE.IcosahedronGeometry(0.11, 1),
1416
+ material(index === 0 ? colors.harness : colors.evidence, 0.32, { emissiveIntensity: 0.28 }),
1417
+ );
1418
+ node.position.set(x, 0.25, 0.08);
1419
+ node.userData.baseY = node.position.y;
1420
+ stack.add(node);
1421
+ stack.add(cylinderBetween(
1422
+ new THREE.Vector3(0, 0.18, 0.08),
1423
+ node.position,
1424
+ 0.01,
1425
+ basic(index === 0 ? colors.harness : colors.evidence, 0.62),
1426
+ ));
1427
+ return node;
1428
+ });
1429
+
1430
+ const loopRing = new THREE.Mesh(
1431
+ new THREE.TorusGeometry(1.05, 0.035, 10, lowPower ? 54 : 88),
1432
+ new THREE.MeshBasicMaterial({ color: colors.loop, transparent: true, opacity: 0.82, depthWrite: false }),
1433
+ );
1434
+ loopRing.rotation.x = Math.PI / 2;
1435
+ loopRing.position.y = 1.07;
1436
+ stack.add(loopRing);
1437
+
1438
+ const checkpointColors = [colors.loop, colors.evidence, colors.violet, colors.human];
1439
+ const checkpoints = checkpointColors.map((hex, index) => {
1440
+ const angle = index * Math.PI / 2;
1441
+ const checkpoint = new THREE.Mesh(
1442
+ new THREE.SphereGeometry(0.095, 16, 10),
1443
+ material(hex, 0.24, { emissiveIntensity: 0.46, roughness: 0.22 }),
1444
+ );
1445
+ checkpoint.position.set(Math.cos(angle) * 1.05, 1.07, Math.sin(angle) * 1.05);
1446
+ stack.add(checkpoint);
1447
+ return checkpoint;
1448
+ });
1449
+
1450
+ const loopToken = new THREE.Mesh(
1451
+ new THREE.OctahedronGeometry(0.105, 0),
1452
+ material(colors.loop, 0.16, { emissiveIntensity: 0.72, roughness: 0.16 }),
1453
+ );
1454
+ stack.add(loopToken);
1455
+
1456
+ const runPulse = new THREE.Mesh(
1457
+ new THREE.SphereGeometry(0.055, 14, 10),
1458
+ basic(colors.context, 0.92),
1459
+ );
1460
+ stack.add(runPulse);
1461
+
1462
+ const runLabel = makeMicroLabel('ONE AGENT RUN', colors.context, 1.35);
1463
+ runLabel.position.set(0, -1.67, 0.18);
1464
+ stack.add(runLabel);
1465
+ const loopLabel = makeMicroLabel('WORK OVER TIME', colors.loop, 1.35);
1466
+ loopLabel.position.set(0, 1.63, 0.18);
1467
+ stack.add(loopLabel);
1468
+
1469
+ let frameCount = 0;
1470
+ let animationFrame = 0;
1471
+ let visible = true;
1472
+ let targetRotationX = 0;
1473
+ let targetRotationY = 0;
1474
+ const startedAt = performance.now();
1475
+
1476
+ function render(time = 0) {
1477
+ const seconds = Math.max(0, time - startedAt) * 0.001;
1478
+ const loopAngle = reducedMotion.matches ? Math.PI * 0.2 : seconds * 0.5;
1479
+ loopToken.position.set(Math.cos(loopAngle) * 1.05, 1.07, Math.sin(loopAngle) * 1.05);
1480
+ loopToken.rotation.x = seconds * 0.6;
1481
+ loopToken.rotation.y = seconds * 0.8;
1482
+
1483
+ const runPhase = reducedMotion.matches ? 0.55 : (seconds * 0.22) % 1;
1484
+ const runY = runPhase < 0.5
1485
+ ? -1.05 + runPhase * 2.5
1486
+ : 0.2 - (runPhase - 0.5) * 1.3;
1487
+ runPulse.position.set(
1488
+ reducedMotion.matches ? 0.28 : Math.sin(runPhase * Math.PI * 2) * 0.2,
1489
+ runY,
1490
+ 0.3,
1491
+ );
1492
+
1493
+ contextCards.forEach((card, index) => {
1494
+ card.position.y = card.userData.baseY + (reducedMotion.matches ? 0 : Math.sin(seconds * 1.25 + index) * 0.025);
1495
+ card.rotation.y = reducedMotion.matches ? 0 : Math.sin(seconds * 0.7 + index) * 0.08;
1496
+ });
1497
+ toolNodes.forEach((node, index) => {
1498
+ node.position.y = node.userData.baseY + (reducedMotion.matches ? 0 : Math.sin(seconds * 1.6 + index * 1.8) * 0.025);
1499
+ node.rotation.y = seconds * (index ? -0.34 : 0.34);
1500
+ });
1501
+ checkpoints.forEach((checkpoint, index) => {
1502
+ const pulse = reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 1.7 + index * 1.4) * 0.08;
1503
+ checkpoint.scale.setScalar(pulse);
1504
+ });
1505
+ agent.position.y = 0.18 + (reducedMotion.matches ? 0 : Math.sin(seconds * 1.5) * 0.018);
1506
+ agentCore.scale.setScalar(reducedMotion.matches ? 1 : 1 + Math.sin(seconds * 2.3) * 0.1);
1507
+ promptCard.rotation.y = reducedMotion.matches ? 0 : Math.sin(seconds * 0.6) * 0.035;
1508
+
1509
+ root.rotation.x += (targetRotationX - root.rotation.x) * 0.045;
1510
+ root.rotation.y += (targetRotationY - root.rotation.y) * 0.045;
1511
+ renderer.render(scene, camera);
1512
+ frameCount += 1;
1513
+ stackContainer.dataset.sceneFrames = String(frameCount);
1514
+ stackContainer.dataset.sceneReady = 'true';
1515
+ }
1516
+
1517
+ function animate(time) {
1518
+ animationFrame = 0;
1519
+ if (!visible || document.hidden || reducedMotion.matches || !desktopStackMedia.matches) return;
1520
+ render(time);
1521
+ animationFrame = window.requestAnimationFrame(animate);
1522
+ }
1523
+
1524
+ function startAnimation() {
1525
+ if (!animationFrame && visible && !document.hidden && !reducedMotion.matches && desktopStackMedia.matches) {
1526
+ animationFrame = window.requestAnimationFrame(animate);
1527
+ }
1528
+ }
1529
+
1530
+ function stopAnimation() {
1531
+ if (!animationFrame) return;
1532
+ window.cancelAnimationFrame(animationFrame);
1533
+ animationFrame = 0;
1534
+ }
1535
+
1536
+ function resize() {
1537
+ const width = Math.max(stackContainer.clientWidth, 1);
1538
+ const height = Math.max(stackContainer.clientHeight, 1);
1539
+ renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, lowPower ? 1.25 : 1.55));
1540
+ renderer.setSize(width, height, false);
1541
+ const aspect = width / height;
1542
+ const viewHeight = 4.25;
1543
+ const viewWidth = viewHeight * aspect;
1544
+ camera.left = -viewWidth / 2;
1545
+ camera.right = viewWidth / 2;
1546
+ camera.top = viewHeight / 2;
1547
+ camera.bottom = -viewHeight / 2;
1548
+ camera.updateProjectionMatrix();
1549
+ render(performance.now());
1550
+ }
1551
+
1552
+ function updatePointer(event) {
1553
+ const bounds = stackContainer.getBoundingClientRect();
1554
+ const x = (event.clientX - bounds.left) / bounds.width * 2 - 1;
1555
+ const y = (event.clientY - bounds.top) / bounds.height * 2 - 1;
1556
+ targetRotationY = x * 0.035;
1557
+ targetRotationX = -y * 0.018;
1558
+ }
1559
+
1560
+ function resetPointer() {
1561
+ targetRotationX = 0;
1562
+ targetRotationY = 0;
1563
+ }
1564
+
1565
+ if ('ResizeObserver' in window) {
1566
+ const resizeObserver = new ResizeObserver(resize);
1567
+ resizeObserver.observe(stackContainer);
1568
+ } else {
1569
+ window.addEventListener('resize', resize, { passive: true });
1570
+ }
1571
+
1572
+ if ('IntersectionObserver' in window) {
1573
+ const visibilityObserver = new IntersectionObserver((entries) => {
1574
+ visible = entries[0]?.isIntersecting ?? true;
1575
+ if (visible) startAnimation();
1576
+ else stopAnimation();
1577
+ }, { threshold: 0.02 });
1578
+ visibilityObserver.observe(stackContainer);
1579
+ }
1580
+
1581
+ document.addEventListener('visibilitychange', () => {
1582
+ if (document.hidden) stopAnimation();
1583
+ else startAnimation();
1584
+ });
1585
+
1586
+ const handleMotionChange = () => {
1587
+ if (reducedMotion.matches) {
1588
+ stopAnimation();
1589
+ resetPointer();
1590
+ render(performance.now());
1591
+ } else {
1592
+ startAnimation();
1593
+ }
1594
+ };
1595
+ if (reducedMotion.addEventListener) reducedMotion.addEventListener('change', handleMotionChange);
1596
+ else reducedMotion.addListener(handleMotionChange);
1597
+
1598
+ stackContainer.addEventListener('pointermove', updatePointer, { passive: true });
1599
+ stackContainer.addEventListener('pointerleave', resetPointer, { passive: true });
1600
+ renderer.domElement.addEventListener('webglcontextlost', (event) => {
1601
+ event.preventDefault();
1602
+ stopAnimation();
1603
+ stackContainer.dataset.sceneState = 'fallback';
1604
+ });
1605
+
1606
+ window.__loopStackDiagnostics = () => {
1607
+ const gl = renderer.getContext();
1608
+ const width = renderer.domElement.width;
1609
+ const height = renderer.domElement.height;
1610
+ const pixels = new Uint8Array(width * height * 4);
1611
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
1612
+ let sampled = 0;
1613
+ let painted = 0;
1614
+ let minimumLuminance = 255;
1615
+ let maximumLuminance = 0;
1616
+ for (let index = 0; index < pixels.length; index += 64) {
1617
+ const red = pixels[index];
1618
+ const green = pixels[index + 1];
1619
+ const blue = pixels[index + 2];
1620
+ const distanceFromPaper = Math.abs(red - 244) + Math.abs(green - 247) + Math.abs(blue - 252);
1621
+ const luminance = red * 0.2126 + green * 0.7152 + blue * 0.0722;
1622
+ sampled += 1;
1623
+ if (distanceFromPaper > 24) painted += 1;
1624
+ minimumLuminance = Math.min(minimumLuminance, luminance);
1625
+ maximumLuminance = Math.max(maximumLuminance, luminance);
1626
+ }
1627
+ return {
1628
+ agentCore: true,
1629
+ contextSources: contextCards.length,
1630
+ drawCalls: renderer.info.render.calls,
1631
+ frameCount,
1632
+ harnessTools: toolNodes.length,
1633
+ height,
1634
+ layers: layerMeshes.length,
1635
+ loopCheckpoints: checkpoints.length,
1636
+ luminanceRange: maximumLuminance - minimumLuminance,
1637
+ painted,
1638
+ paintedRatio: sampled ? painted / sampled : 0,
1639
+ reducedMotion: reducedMotion.matches,
1640
+ sampled,
1641
+ triangles: renderer.info.render.triangles,
1642
+ width,
1643
+ };
1644
+ };
1645
+
1646
+ window.__loopStackPause = () => {
1647
+ stopAnimation();
1648
+ render(performance.now());
1649
+ return window.__loopStackDiagnostics();
1650
+ };
1651
+ window.__loopStackResume = () => {
1652
+ startAnimation();
1653
+ return true;
1654
+ };
1655
+
1656
+ resize();
1657
+ startAnimation();
1658
+ }
1659
+
1660
+ initStackScene();
1661
+ function handleDesktopStackChange(event) {
1662
+ if (!stackSceneInitialized) {
1663
+ initStackScene();
1664
+ return;
1665
+ }
1666
+ if (event.matches) window.__loopStackResume?.();
1667
+ else window.__loopStackPause?.();
1668
+ }
1669
+ if (desktopStackMedia.addEventListener) desktopStackMedia.addEventListener('change', handleDesktopStackChange);
1670
+ else desktopStackMedia.addListener(handleDesktopStackChange);
docs/index.html CHANGED
@@ -190,7 +190,7 @@
190
  z-index: 0;
191
  min-width: 0;
192
  width: 100%;
193
- height: 300px;
194
  overflow: hidden;
195
  background: #f4f7fc;
196
  pointer-events: none;
@@ -345,6 +345,42 @@
345
  .definition strong { color: var(--ink); }
346
 
347
  .mobile-stack { display: none; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
 
349
  .section-head { display: grid; grid-template-columns: minmax(250px, 0.78fr) minmax(360px, 1.22fr); gap: 64px; align-items: end; margin-bottom: 36px; }
350
  .section-intro { max-width: 720px; margin: 0; color: var(--muted); }
@@ -875,7 +911,7 @@
875
  width: 100%;
876
  margin-top: 28px;
877
  }
878
- .hero-scene { height: 300px; }
879
  .hero-inspector { grid-template-columns: 1fr; gap: 12px; padding: 14px 0; }
880
  .hero-system .loop-stage-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
881
  .hero-inspector .loop-stage-detail { min-height: 42px; }
@@ -886,7 +922,7 @@
886
  section { padding: 68px 0; }
887
  .hero { min-height: 0; padding: 40px 0 24px; }
888
  .hero-system { margin-top: 24px; }
889
- .hero-scene { width: 100%; height: 270px; }
890
  .hero-scene canvas { opacity: 1; }
891
  .hero-system .loop-stage-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
892
  .hero-system .loop-stage:nth-child(n) { border-top: 0; border-left: 1px solid var(--line); }
@@ -990,7 +1026,7 @@
990
  .hero-system { display: flex; flex-direction: column; margin-top: 8px; }
991
  .scene-head { order: 1; justify-content: center; min-height: 24px; padding: 2px 0; }
992
  .scene-flow { display: none; }
993
- .hero-scene { order: 2; width: 100%; height: 208px; }
994
  .hero-scene canvas { opacity: 1; }
995
  .scene-key { display: none; }
996
  .scene-key-item { justify-content: flex-start; min-width: 0; min-height: 34px; padding: 7px 8px; }
@@ -1014,6 +1050,7 @@
1014
  .definition-compact { display: inline; }
1015
  .hero-visual { width: min(100%, 420px); }
1016
  .hero-visual .desktop-stack-visual { display: none; }
 
1017
  .mobile-stack {
1018
  display: block;
1019
  border: 1px solid var(--line-strong);
@@ -1376,17 +1413,17 @@
1376
  </div>
1377
  <div class="hero-system">
1378
  <div class="scene-head" aria-hidden="true">
1379
- <strong>Agent loop runtime</strong>
1380
- <span class="scene-flow"><span>Trigger</span><i>&rarr;</i><span>Orchestrator</span><i>&rarr;</i><span>Agent team</span><i>&rarr;</i><span>Evidence gate</span><i>&rarr;</i><span>State</span><i>&rarr;</i><span>Next action</span></span>
1381
  </div>
1382
- <div class="hero-scene" data-loop-scene role="img" aria-label="Animated agent loop runtime. A task enters an orchestrator, is delegated to specialist agents with tools and context, passes an evidence gate, writes to durable state, and reaches a bounded next-action decision.">
1383
- <div class="scene-fallback">A task enters an orchestrator, moves through a specialist agent team and evidence gate, writes to durable state, and reaches a bounded next action.</div>
1384
  </div>
1385
  <div class="scene-key" aria-label="Agent runtime visual key">
1386
- <span class="scene-key-item packet">Work packet</span>
1387
- <span class="scene-key-item agents">Orchestrator + agent team</span>
1388
- <span class="scene-key-item evidence">Evidence gate</span>
1389
- <span class="scene-key-item state">Durable state</span>
1390
  </div>
1391
  <div class="scene-outcomes" aria-label="Possible loop outcomes">
1392
  <span class="scene-outcome retry">Retry with evidence</span>
@@ -1412,7 +1449,13 @@
1412
  <div class="wrap">
1413
  <p class="definition"><span class="definition-full"><strong>Loop Engineering</strong> is the practice of designing recurring systems that discover work, delegate it to agents, verify results, persist state, decide next actions, and run again on a cadence, event, or until a verifiable goal is reached.</span><span class="definition-compact"><strong>Loop Engineering</strong> designs recurring agent systems that discover work, delegate it, verify results, persist state, and decide what happens next.</span></p>
1414
  <figure class="hero-visual">
1415
- <img class="desktop-stack-visual" src="assets/loop-engineering-stack.svg?v=7" width="1200" height="680" loading="lazy" alt="The engineering stack: prompt, context, and harness engineering improve one agent run; Loop Engineering governs recurring work over time.">
 
 
 
 
 
 
1416
  <div class="mobile-stack" role="img" aria-label="Four engineering layers. Prompt, context, and harness engineering improve one agent run. Loop Engineering governs recurring work over time.">
1417
  <div class="mobile-stack-head"><span class="mobile-stack-eyebrow">Mental model / four layers</span><strong>Loop Engineering Stack</strong></div>
1418
  <ol class="mobile-stack-list">
@@ -2474,6 +2517,6 @@
2474
  });
2475
  });
2476
  </script>
2477
- <script type="module" src="assets/loop-hero-scene.js?v=22"></script>
2478
  </body>
2479
  </html>
 
190
  z-index: 0;
191
  min-width: 0;
192
  width: 100%;
193
+ height: 330px;
194
  overflow: hidden;
195
  background: #f4f7fc;
196
  pointer-events: none;
 
345
  .definition strong { color: var(--ink); }
346
 
347
  .mobile-stack { display: none; }
348
+ .desktop-stack-scene {
349
+ position: relative;
350
+ width: 100%;
351
+ height: 442px;
352
+ border: 1px solid var(--line-strong);
353
+ border-radius: 6px 6px 0 0;
354
+ background: #f4f7fc;
355
+ overflow: hidden;
356
+ }
357
+ .desktop-stack-scene canvas,
358
+ .desktop-stack-scene .desktop-stack-visual {
359
+ position: absolute;
360
+ inset: 0;
361
+ display: block;
362
+ width: 100%;
363
+ height: 100%;
364
+ }
365
+ .desktop-stack-scene canvas { opacity: 0.98; }
366
+ .desktop-stack-scene .desktop-stack-visual { object-fit: cover; transition: opacity 180ms ease; }
367
+ .desktop-stack-scene[data-scene-ready="true"] .desktop-stack-visual { opacity: 0; pointer-events: none; }
368
+ .desktop-stack-scene[data-scene-state="fallback"] canvas { display: none; }
369
+ .desktop-stack-key {
370
+ display: grid;
371
+ grid-template-columns: repeat(2, minmax(0, 1fr));
372
+ border: 1px solid var(--line-strong);
373
+ border-top: 0;
374
+ border-radius: 0 0 6px 6px;
375
+ background: var(--surface);
376
+ color: var(--muted);
377
+ font-size: 0.73rem;
378
+ line-height: 1.45;
379
+ text-align: left;
380
+ }
381
+ .desktop-stack-key span { min-width: 0; padding: 11px 14px; }
382
+ .desktop-stack-key span + span { border-left: 1px solid var(--line); }
383
+ .desktop-stack-key strong { color: var(--ink); }
384
 
385
  .section-head { display: grid; grid-template-columns: minmax(250px, 0.78fr) minmax(360px, 1.22fr); gap: 64px; align-items: end; margin-bottom: 36px; }
386
  .section-intro { max-width: 720px; margin: 0; color: var(--muted); }
 
911
  width: 100%;
912
  margin-top: 28px;
913
  }
914
+ .hero-scene { height: 316px; }
915
  .hero-inspector { grid-template-columns: 1fr; gap: 12px; padding: 14px 0; }
916
  .hero-system .loop-stage-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
917
  .hero-inspector .loop-stage-detail { min-height: 42px; }
 
922
  section { padding: 68px 0; }
923
  .hero { min-height: 0; padding: 40px 0 24px; }
924
  .hero-system { margin-top: 24px; }
925
+ .hero-scene { width: 100%; height: 286px; }
926
  .hero-scene canvas { opacity: 1; }
927
  .hero-system .loop-stage-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
928
  .hero-system .loop-stage:nth-child(n) { border-top: 0; border-left: 1px solid var(--line); }
 
1026
  .hero-system { display: flex; flex-direction: column; margin-top: 8px; }
1027
  .scene-head { order: 1; justify-content: center; min-height: 24px; padding: 2px 0; }
1028
  .scene-flow { display: none; }
1029
+ .hero-scene { order: 2; width: 100%; height: 224px; }
1030
  .hero-scene canvas { opacity: 1; }
1031
  .scene-key { display: none; }
1032
  .scene-key-item { justify-content: flex-start; min-width: 0; min-height: 34px; padding: 7px 8px; }
 
1050
  .definition-compact { display: inline; }
1051
  .hero-visual { width: min(100%, 420px); }
1052
  .hero-visual .desktop-stack-visual { display: none; }
1053
+ .desktop-stack-scene, .desktop-stack-key { display: none; }
1054
  .mobile-stack {
1055
  display: block;
1056
  border: 1px solid var(--line-strong);
 
1413
  </div>
1414
  <div class="hero-system">
1415
  <div class="scene-head" aria-hidden="true">
1416
+ <strong>Bounded agent loop</strong>
1417
+ <span class="scene-flow"><span>Work</span><i>&rarr;</i><span>Scope</span><i>&rarr;</i><span>Agent + tools</span><i>&rarr;</i><span>Evidence</span><i>&rarr;</i><span>Memory</span><i>&rarr;</i><span>Decision</span></span>
1418
  </div>
1419
+ <div class="hero-scene" data-loop-scene role="img" aria-label="Animated bounded agent loop. Work is scoped by an orchestrator, handled by an agent inside a controlled workspace with context and tools, checked by an independent verifier, saved to durable memory, and routed to retry, human handoff, or verified exit.">
1420
+ <div class="scene-fallback">Work is scoped, handled by an agent with context and tools, independently verified, saved to durable memory, and routed to retry, human handoff, or verified exit.</div>
1421
  </div>
1422
  <div class="scene-key" aria-label="Agent runtime visual key">
1423
+ <span class="scene-key-item packet">Scoped work</span>
1424
+ <span class="scene-key-item agents">Agent workspace + tools</span>
1425
+ <span class="scene-key-item evidence">Independent verifier</span>
1426
+ <span class="scene-key-item state">Durable memory</span>
1427
  </div>
1428
  <div class="scene-outcomes" aria-label="Possible loop outcomes">
1429
  <span class="scene-outcome retry">Retry with evidence</span>
 
1449
  <div class="wrap">
1450
  <p class="definition"><span class="definition-full"><strong>Loop Engineering</strong> is the practice of designing recurring systems that discover work, delegate it to agents, verify results, persist state, decide next actions, and run again on a cadence, event, or until a verifiable goal is reached.</span><span class="definition-compact"><strong>Loop Engineering</strong> designs recurring agent systems that discover work, delegate it, verify results, persist state, and decide what happens next.</span></p>
1451
  <figure class="hero-visual">
1452
+ <div class="desktop-stack-scene" data-stack-scene role="img" aria-label="Interactive engineering stack. A prompt shapes a model call, context feeds the agent, a harness surrounds the run with tools and permissions, and Loop Engineering connects triggers, independent verification, durable state, budgets, and next actions over time.">
1453
+ <img class="desktop-stack-visual" src="assets/loop-engineering-stack.svg?v=7" width="1200" height="680" loading="lazy" alt="">
1454
+ </div>
1455
+ <div class="desktop-stack-key" aria-hidden="true">
1456
+ <span><strong>One agent run:</strong> prompt, context, and harness shape what the agent can understand and do.</span>
1457
+ <span><strong>Work over time:</strong> the outer loop triggers work, verifies evidence, persists state, and chooses the next action.</span>
1458
+ </div>
1459
  <div class="mobile-stack" role="img" aria-label="Four engineering layers. Prompt, context, and harness engineering improve one agent run. Loop Engineering governs recurring work over time.">
1460
  <div class="mobile-stack-head"><span class="mobile-stack-eyebrow">Mental model / four layers</span><strong>Loop Engineering Stack</strong></div>
1461
  <ol class="mobile-stack-list">
 
2517
  });
2518
  });
2519
  </script>
2520
+ <script type="module" src="assets/loop-hero-scene.js?v=26"></script>
2521
  </body>
2522
  </html>