{"id":"caf28a0a-263a-47e0-ac88-4e5606e98420","org_id":"5b607c7a-3ba2-4077-b038-cdccd0ce7c34","project_id":"b18679c0-fffb-4308-82b6-9e91be23582f","parent_id":null,"identifier":"BEB-2909","number":2909,"title":"Recreate 3JS viz service — loop viz + workflow reports (edge-native, was abilifi-payload)","description":"Repo: alexrollin/abilifi-apps\nRoute: app.abilifi.net/viz — ABCMS block tree via the shared door (BEB-2859), path abcms/pages/viz.json. NOT a page.tsx.\nClass: CODE\nLane: part\nBudget: estimate 120 / ceiling 240\nroute: app.abilifi.net/viz (loop viz) + /viz/report/:ticket\n\n## RETARGETED 2026-09-02 (Fable) — THIS IS WHY IT HAS BEEN PARKED 18 DAYS\nticket_state on 2026-09-02 returns ALL SIX EDGES SATISFIED and unsatisfied[] EMPTY, yet buildable:false, lane BUILD/parked, 59 attempts. The dep (BEB-3514) closed 2026-08-15.\n\nCause: output_target and route still pointed at alexrollin/abilifi-apps:abilifi-payload/src/app/(frontend)/viz/page.tsx — the page.tsx path that BEB-3514 RETIRED on 2026-08-15 (\"page.tsx path retired\", acceptance 4: \"Zero page.tsx lands from part lanes after 2026-08-15 09:38Z\"). The lane was being asked to write the one path the loop is now forbidden to write, so every attempt died and nothing said so. The DEPS NOTE above (parked on 3514) has been stale since 08-15.\n\nTarget is now the part path 3514 shipped: a standalone HTML document landed as one full-page ABCMS html block, git provenance at abcms/pages/viz.json, written through the ABCMS door and verified by door read-back, registered as a graph node at landing.\n\nAlex 2026-09-02: the viz service is REQUIRED PROOF and our signature service. Loop work does not report done without it.\n\nAlex 2026-08-08 + SPEC 2026-08-14: recreate the 3JS (three.js) viz service — edge-native, port the INTENT from the payload era (BEB-2127/2105/2179), do NOT resurrect Next/Payload. Existing repos: abilifi-loopviz (deployed, currently 500 — fix) + abilifi-workflow (undeployed — first deploy).\n\n## VISUAL SPEC OF RECORD — Agentic Loop Visualization Protocol\nBB Docs 898f34f0 is the binding visual language. Build to it:\n- Reason=Diamond(soft pulse+glow) · Act=Gear/Circle(clockwise spin) · Observe=Eye(rapid pulse on event).\n- Edges carry emissive photon sprites; photon speed ∝ real execution latency.\n- 0.3s morph on state transitions.\n- Governance/HITL triggers on REAL loop state: thrashing (repair-reopen >3) = AMBER edge · stall (lane active > lease) = RED node · HITL Gate node (NEEDS_OPERATOR / held) pulses until manual input.\n- Three.js: TubeGeometry + texture.offset for flowing data packets.\n\n## Two surfaces\n1. Loop viz GET / — WebGL scene visualizing LIVE loop state per the protocol. Data server-side from abilifi-dispatcher/lanes + /record/summary.\n2. Workflow reports GET /report/:ticket — one ticket's build history (attempts, stages, held reasons, proof links).\n\n## Editor = PUCK (BEB-2858)\nThe viz page composes on the Puck editor (BEB-2858 / ABCMS), not hand-coded layout — the scene + report blocks are Puck components so layout is editable without a redeploy.\n\n## Edge-native constraints\nSelf-contained Worker page; three.js inlined or from R2 (no external CDN, CSP). Data at GET /api. No build step in the contributor path.\n\n## Acceptance\n1. GET / → 200 text/html, WebGL canvas renders the protocol scene (screenshot_url: rendered_has_content true, real nodes/edges).\n2. GET /api → 200 JSON, real lane counts matching dispatcher /lanes (non-zero).\n3. GET /report/<real ticket> → 200, shows build history + proof links.\n4. Governance triggers proven: inject a >3 repair-reopen → AMBER edge; a held/NEEDS_OPERATOR ticket → Gate node. Recorded (record_url) into BB Docs.\n5. Renders as a Puck-composed page (BEB-2858) — blocks editable, not hand-coded.\n6. Zero page.tsx written by this lane (BEB-3514 acceptance 4 applies here).\n\nRefs: SPEC BB Docs 898f34f0 (visual protocol), spec doc 8fa206d2, BEB-3514 (part-lane flip, closed), BEB-2859 (door), BEB-2858 (Puck editor), BEB-9194/9198 (viz proof required on loop work), abilifi-loopviz + abilifi-workflow.","status":"todo","priority":0,"assignee_id":null,"created_at":1786225503633,"updated_at":1788445246364,"completed_at":null,"due_date":null,"claimed_by":null,"claimed_until":null,"required_capabilities":null,"estimate":120,"cost_ceiling":240,"cancelled_at":null,"last_actor":"unverified:shared"}