(function () { const y = document.getElementById("y"); if (y) y.textContent = String(new Date().getFullYear()); // Brief generator (index) const form = document.getElementById("briefForm"); const out = document.getElementById("output"); const copyBtn = document.getElementById("copyBtn"); function setCopyEnabled(btn, enabled) { if (!btn) return; btn.disabled = !enabled; btn.style.opacity = enabled ? "1" : ".6"; } if (form && out) { form.addEventListener("submit", (e) => { e.preventDefault(); const data = new FormData(form); const industry = data.get("industry") || ""; const usecase = data.get("usecase") || ""; const constraints = data.get("constraints") || ""; const metric = data.get("metric") || ""; const brief = `K20X Discussion Brief — ML + Genetics Industry: - ${industry} Use case: - ${usecase} Constraints / non-negotiables: - ${constraints || "—"} Success metric: - ${metric || "—"} Proposed approach: 1) Data foundations: ingest → QC → provenance 2) Modeling: baseline clustering → stability checks → optional embeddings 3) Risk controls: population-structure confounding checks; leakage tests 4) Governance: access tiers + audit logging + allowed-claims policy 5) Delivery: reproducible report/dashboard + evaluation harness `; out.textContent = brief; setCopyEnabled(copyBtn, true); }); if (copyBtn) { copyBtn.addEventListener("click", async () => { try { await navigator.clipboard.writeText(out.textContent || ""); copyBtn.textContent = "Copied"; setTimeout(() => (copyBtn.textContent = "Copy"), 1200); } catch { copyBtn.textContent = "Copy failed"; setTimeout(() => (copyBtn.textContent = "Copy"), 1200); } }); setCopyEnabled(copyBtn, false); } } // Decision note generator (case-notes) const noteForm = document.getElementById("noteForm"); const noteOut = document.getElementById("noteOut"); const copyNoteBtn = document.getElementById("copyNoteBtn"); if (noteForm && noteOut) { noteForm.addEventListener("submit", (e) => { e.preventDefault(); const data = new FormData(noteForm); const decision = data.get("decision") || ""; const reason = data.get("reason") || ""; const mitigation = data.get("mitigation") || ""; noteOut.textContent = `Decision Note — ML + Genetics Decision: - ${decision} Reason: - ${reason || "—"} Risk / mitigation: - ${mitigation || "—"} Next step: - Assign owner + date + evaluation criteria `; setCopyEnabled(copyNoteBtn, true); }); if (copyNoteBtn) { copyNoteBtn.addEventListener("click", async () => { try { await navigator.clipboard.writeText(noteOut.textContent || ""); copyNoteBtn.textContent = "Copied"; setTimeout(() => (copyNoteBtn.textContent = "Copy"), 1200); } catch { copyNoteBtn.textContent = "Copy failed"; setTimeout(() => (copyNoteBtn.textContent = "Copy"), 1200); } }); setCopyEnabled(copyNoteBtn, false); } } })();