KI-Sherpa®KI-Richtlinie-Generator
Self-Service · 10 Minuten

KI-Richtlinien-Generator

Mitarbeitende nutzen längst ChatGPT & Co. – die Frage ist nur, ob mit oder ohne Leitplanken. Beantwortet zehn Fragen und ihr bekommt eine fertige, maßgeschneiderte KI-Nutzungsrichtlinie für euer Unternehmen: als Word-Datei, als Aushang-Onepager und als PDF.

📝 10 Fragen ⏱ ~10 Minuten 📄 Word & PDF 📌 Onepager zum Aushängen

Klartext statt Juristen-Deutsch. Ihr bekommt ein Dokument, das man tatsächlich liest – und an dem ihr nur noch wenig anpassen müsst.

zurücksetzen
blümlein · Blümlein AI & Automation GmbH · KI-Sherpa® · KI für den industriellen Mittelstand
`; } /* Block → Word-HTML */ function blockToWord(b){ if(typeof b==="string") return `

${b}

`; if(b.ul) return ``; if(b.callout) return `

${b.callout}

`; return ""; } /* ---- Download-Trigger ---- */ function downloadBlob(html, filename){ const blob = new Blob([""+html], { type:"application/msword;charset=utf-8" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); setTimeout(()=>URL.revokeObjectURL(url), 1500); } function safeName(){ const co = (state.company||"Unternehmen").trim() || "Unternehmen"; return co.replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,60) || "Unternehmen"; } function downloadDoc(){ downloadBlob(docWordHTML(), `KI-Richtlinie-${safeName()}.doc`); toast("Word-Datei wird heruntergeladen ✓"); } function downloadOne(){ downloadBlob(oneWordHTML(), `KI-Richtlinie-Onepager-${safeName()}.doc`); toast("Onepager wird heruntergeladen ✓"); } /* ---- Zwischenablage (Plain-Text-Fallback) ---- */ function plainText(){ const co = companyName(); if(resultView==="one"){ const { dos, donts } = buildOnepager(); let t = `KI-SPIELREGELN – ${co.toUpperCase()}\nStand: ${todayStr()}\n\n`; t += `DAS GEHÖRT SICH:\n` + dos.map(d=>" ✓ "+d).join("\n") + "\n\n"; t += `DAS IST TABU:\n` + donts.map(d=>" ✕ "+d).join("\n") + "\n\n"; t += `Auszug aus der KI-Nutzungsrichtlinie · keine Rechtsberatung.`; return t; } const sec = buildSections(); let t = `KI-NUTZUNGSRICHTLINIE DER ${co.toUpperCase()}\nStand: ${todayStr()} · Version 1.0\n\n`; sec.forEach(s=>{ t += `${s.n}. ${s.title}\n`; s.body.forEach(b=>{ if(typeof b==="string") t += stripTags(b)+"\n"; else if(b.ul) t += b.ul.map(li=>" • "+stripTags(li)).join("\n")+"\n"; else if(b.callout) t += " » "+stripTags(b.callout)+"\n"; }); t += "\n"; }); t += `Erstellt mit dem KI-Richtlinie-Generator von blümlein KI-Sherpa®. Vorlage – keine Rechtsberatung.`; return t; } function copyText(){ const txt = plainText(); const done = ()=>toast("In die Zwischenablage kopiert ✓"); if(navigator.clipboard && navigator.clipboard.writeText){ navigator.clipboard.writeText(txt).then(done).catch(()=>fallbackCopy(txt,done)); } else fallbackCopy(txt,done); } function fallbackCopy(txt,done){ const ta=document.createElement("textarea"); ta.value=txt; ta.style.position="fixed"; ta.style.opacity="0"; document.body.appendChild(ta); ta.focus(); ta.select(); try{ document.execCommand("copy"); done(); }catch(e){ toast("Kopieren nicht möglich – bitte manuell markieren."); } document.body.removeChild(ta); } /* ---- Capture: generierte Richtlinie an Hub/Delivery senden ---- */ function buildRichtlinieMd(){ const co = (state.company||"").trim(); let m = `## KI-Richtlinie\n\n`; m += `**Firma:** ${co||"—"}\n`; if((state.branche||"").trim()) m += `**Branche:** ${state.branche.trim()}\n`; if((state.verantwortlich||"").trim()) m += `**Verantwortlich für KI:** ${state.verantwortlich.trim()}\n`; m += `**Ansicht:** ${resultView==="one" ? "Onepager" : "Vollversion"}\n`; m += `\n---\n\n`; m += plainText(); return m; } async function submitLead(e){ e.preventDefault(); const email = ($("leadEmail")?.value||"").trim(); const note = $("leadNote"); if(!/.+@.+\..+/.test(email)){ if(note) note.textContent = "Bitte eine gültige E-Mail-Adresse angeben."; return false; } const company = (($("leadCompany")?.value||"").trim()) || (state.company||"").trim(); const btn = document.querySelector(".cta-form button"); if(btn){ btn.disabled = true; btn.textContent = "Wird gesendet …"; } try{ const res = await fetch("/api/submit",{ method:"POST", headers:{"content-type":"application/json"}, body: JSON.stringify({ kunde: company, contact_email: email, canvas_markdown: buildRichtlinieMd(), fields:{ company, branche:(state.branche||"").trim(), verantwortlich:(state.verantwortlich||"").trim(), view: resultView } }) }); const data = await res.json().catch(()=>({})); if(!res.ok || !data.ok) throw new Error(data.error || `Fehler ${res.status}`); if(note) note.innerHTML = `✓ Danke! Eure Richtlinie liegt bei Blümlein AI — wir melden uns an ${esc(email)}.`; const form=document.querySelector(".cta-form"); if(form) form.style.display="none"; }catch(err){ if(btn){ btn.disabled = false; btn.textContent = "Richtlinie an Blümlein senden →"; } if(note) note.textContent = "Senden hat gerade nicht geklappt — bitte gleich nochmal."; } return false; } /* ---- Toast ---- */ let toastTimer=null; function toast(msg){ const t=$("toast"); t.textContent=msg; t.classList.add("show"); clearTimeout(toastTimer); toastTimer=setTimeout(()=>t.classList.remove("show"),2400); } /* ---- Restart ---- */ function restart(){ state.company=""; state.branche=""; state.verantwortlich=""; state.tools=[]; state.daten=null; state.wer=null; state.freigabe=null; state.kennz=null; state.schulung=null; state.geltung=null; cur=0; $("result").classList.add("hide"); $("intro").classList.remove("hide"); window.scrollTo({top:0,behavior:"smooth"}); } /* ---- Utils ---- */ function esc(s){ return String(s).replace(/[&<>"]/g,c=>({"&":"&","<":"<",">":">",'"':"""}[c])); } function escAttr(s){ return String(s).replace(/[&<>"]/g,c=>({"&":"&","<":"<",">":">",'"':"""}[c])); } function stripTags(s){ return String(s).replace(/<[^>]+>/g,""); }