Omnigraph Atlas Omnigraph's documentation, bound to its Rust workspace
91 documents
docs/rfcs/0000-template.md

RFC NNNN: </h1> <table> <thead> <tr> <th></th> <th></th> </tr> </thead> <tbody> <tr> <td><strong>Status</strong></td> <td>Proposed</td> </tr> <tr> <td><strong>Author(s)</strong></td> <td><your name / handle></td> </tr> <tr> <td><strong>Discussion</strong></td> <td><link to the originating Discussion, if any></td> </tr> <tr> <td><strong>Implementation</strong></td> <td><issue/PR links, filled in as work lands></td> </tr> </tbody> </table> <blockquote> <p>Status is maintained by maintainers: <code>Proposed</code> while the PR is open, <code>Accepted</code> on merge, <code>Declined</code> on close, <code>Superseded by NNNN</code> later.</p> </blockquote> <h2 id="summary">Summary</h2> <p>One paragraph: what this changes, in plain terms.</p> <h2 id="motivation">Motivation</h2> <p>What problem does this solve, and why is it worth the ongoing cost? Tie it to a concrete need (a Discussion, a recurring issue, a user request). Per the project's first principle, argue the <em>long-run liability</em>, not just the short-term convenience.</p> <h2 id="guide-level-explanation">Guide-level explanation</h2> <p>Explain the change as you'd teach it to a user or contributor: new commands, syntax, API shapes, behavior. Examples first.</p> <h2 id="reference-level-design">Reference-level design</h2> <p>The precise design: data structures, IR/AST/planner changes, storage/format impact, migration path, error behavior. Enough that a reviewer can find the holes.</p> <h2 id="invariants-deny-list-check">Invariants & deny-list check</h2> <p>Which Hard Invariants in <a href="../dev/invariants.md.html">../dev/invariants.md</a> does this touch? Does it brush against any deny-list item — and if so, why is this the justified exception? State explicitly that no invariant is weakened, or which Known Gap moves.</p> <h2 id="drawbacks-alternatives">Drawbacks & alternatives</h2> <p>What does this cost, what did you reject, and why. "Do nothing" is a valid alternative to weigh.</p> <h2 id="reversibility">Reversibility</h2> <p>Is this reversible? On-disk/wire/format and substrate choices are near-permanent and demand more evidence; a CLI flag or doc is cheap to undo. Say which this is.</p> <h2 id="unresolved-questions">Unresolved questions</h2> <p>What's deliberately left open for review to settle.</p> </div> <footer class="doc-footer"> <h2 class="backlinks-title">Linked from</h2> <ul class="backlinks"> <li><a href="README.md.html">RFCs</a> <span class="doc-path">docs/rfcs/README.md</span></li> </ul> </footer> </article> <aside id="code-panel" class="code-panel" aria-label="Code evidence"></aside> </div> <script type="application/json" id="comment-counts">{}</script> <script src="../../../static/comments.js" defer></script> </main> </div> <script> // "/" focuses search; Enter goes to the full results page; Esc dismisses. var searchBox = document.getElementById("global-search"); document.addEventListener("keydown", function (e) { if (e.key === "/" && document.activeElement !== searchBox && !/^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement.tagName)) { e.preventDefault(); searchBox.focus(); } }); searchBox.addEventListener("keydown", function (e) { if (e.key === "Enter" && searchBox.value.trim()) { window.location = "/search?q=" + encodeURIComponent(searchBox.value.trim()); } else if (e.key === "Escape") { document.getElementById("search-dropdown").innerHTML = ""; searchBox.blur(); } }); document.addEventListener("click", function (e) { if (!e.target.closest(".topbar-search")) { document.getElementById("search-dropdown").innerHTML = ""; } }); // Copy agent briefs to the clipboard (delegated — works in htmx swaps too). document.body.addEventListener("click", function (e) { var btn = e.target.closest("[data-brief-url]"); if (!btn || !btn.dataset.briefUrl) return; fetch(btn.dataset.briefUrl) .then(function (r) { return r.text(); }) .then(function (text) { return navigator.clipboard.writeText(text).then(function () { var original = btn.textContent; btn.textContent = "✓ copied"; setTimeout(function () { btn.textContent = original; }, 1600); }).catch(function () { // clipboard unavailable: show the brief in a copyable overlay var ta = document.createElement("textarea"); ta.className = "brief-fallback"; ta.value = text; document.body.appendChild(ta); ta.focus(); ta.select(); ta.addEventListener("blur", function () { ta.remove(); }); }); }); }); document.getElementById("theme-toggle").addEventListener("click", function () { var root = document.documentElement; var next = root.dataset.theme === "dark" ? "light" : "dark"; root.dataset.theme = next; try { localStorage.setItem("atlas-theme", next); } catch (e) {} }); // Mermaid diagrams: ```mermaid fences arrive as <pre class="mermaid">. // Rendered client-side from the vendored bundle (offline, no CDN), on // first load and again after htmx swaps; data-processed guards re-runs. var mermaidInited = false; function renderMermaid() { if (typeof mermaid === "undefined") return; if (!mermaidInited) { mermaid.initialize({ startOnLoad: false, securityLevel: "strict", theme: "neutral" }); mermaidInited = true; } var nodes = document.querySelectorAll(".mermaid:not([data-processed])"); if (nodes.length) { mermaid.run({ nodes: nodes }).catch(function (err) { console.error("mermaid render failed:", err); }); } } document.addEventListener("DOMContentLoaded", renderMermaid); // Open the 50/50 split whenever the code panel receives content, // and scroll the panel to the jump-target symbol when there is one. document.body.addEventListener("htmx:afterSwap", function (evt) { renderMermaid(); if (evt.target && evt.target.id === "code-panel") { document.body.classList.toggle("panel-open", evt.target.innerHTML.trim() !== ""); var target = evt.target.querySelector(".hl-target"); if (target) { target.scrollIntoView({ block: "center" }); } else { evt.target.scrollTop = 0; } } }); // ── Mermaid lightbox: click a rendered diagram to zoom/pan it full-screen ── // Delegated (survives htmx swaps); overlay is built once, lazily, and reused. (function () { var TRIGGER = '.mermaid[data-processed] svg'; var box = null, stage = null, canvas = null, lastFocus = null; var natW = 0, natH = 0, scale = 1, fitScale = 1, tx = 0, ty = 0; var dragging = false, dragMoved = false, px = 0, py = 0; function build() { box = document.createElement("div"); box.className = "mmlb"; box.setAttribute("role", "dialog"); box.setAttribute("aria-modal", "true"); box.setAttribute("aria-label", "Diagram viewer"); box.tabIndex = -1; box.innerHTML = '<div class="mmlb-stage"></div>' + '<div class="mmlb-tools">' + '<button type="button" class="mmlb-btn" data-mmlb="out" aria-label="Zoom out" title="Zoom out (-)">−</button>' + '<button type="button" class="mmlb-btn" data-mmlb="in" aria-label="Zoom in" title="Zoom in (+)">+</button>' + '<button type="button" class="mmlb-btn" data-mmlb="fit" aria-label="Fit to screen" title="Fit to screen (0)">⤢</button>' + '<button type="button" class="mmlb-btn" data-mmlb="close" aria-label="Close" title="Close (Esc)">×</button>' + '</div>'; document.body.appendChild(box); stage = box.querySelector(".mmlb-stage"); box.addEventListener("click", function (e) { var btn = e.target.closest("[data-mmlb]"); if (btn) { var act = btn.getAttribute("data-mmlb"); if (act === "close") close(); else if (act === "fit") fitView(); else zoomAt(box.clientWidth / 2, box.clientHeight / 2, act === "in" ? 1.35 : 1 / 1.35); } else if (e.target === stage && !dragMoved) { close(); // backdrop click (not the end of a drag) closes } }); box.addEventListener("wheel", function (e) { e.preventDefault(); zoomAt(e.clientX, e.clientY, e.deltaY < 0 ? 1.15 : 1 / 1.15); }, { passive: false }); stage.addEventListener("pointerdown", function (e) { if (e.button !== 0) return; dragging = true; dragMoved = false; px = e.clientX; py = e.clientY; stage.classList.add("dragging"); if (stage.setPointerCapture) stage.setPointerCapture(e.pointerId); }); stage.addEventListener("pointermove", function (e) { if (!dragging) return; var dx = e.clientX - px, dy = e.clientY - py; if (Math.abs(dx) + Math.abs(dy) > 3) dragMoved = true; tx += dx; ty += dy; px = e.clientX; py = e.clientY; apply(); }); stage.addEventListener("pointerup", function () { dragging = false; stage.classList.remove("dragging"); }); document.addEventListener("keydown", function (e) { if (!box.classList.contains("open")) return; if (e.key === "Escape") { e.preventDefault(); close(); } else if (e.key === "+" || e.key === "=") zoomAt(box.clientWidth / 2, box.clientHeight / 2, 1.35); else if (e.key === "-" || e.key === "_") zoomAt(box.clientWidth / 2, box.clientHeight / 2, 1 / 1.35); else if (e.key === "0") fitView(); }); } function apply() { var t = "translate(" + tx + "px, " + ty + "px) scale(" + scale + ")"; canvas.style.transform = t; } function fitView() { var vw = box.clientWidth, vh = box.clientHeight; fitScale = Math.min((vw - 64) / natW, (vh - 120) / natH); if (!isFinite(fitScale) || fitScale <= 0) fitScale = 1; scale = fitScale; tx = (vw - natW * scale) / 2; ty = (vh - natH * scale) / 2; apply(); } function zoomAt(cx, cy, factor) { var next = Math.max(0.05, Math.min(40, scale * factor)); tx = cx - ((cx - tx) * next) / scale; ty = cy - ((cy - ty) * next) / scale; scale = next; apply(); } function open(svg) { if (!box) build(); lastFocus = document.activeElement; var rect = svg.getBoundingClientRect(); var vb = svg.viewBox && svg.viewBox.baseVal; natW = (vb && vb.width) || rect.width || 800; natH = (vb && vb.height) || rect.height || 600; var clone = svg.cloneNode(true); clone.removeAttribute("width"); clone.removeAttribute("height"); clone.style.maxWidth = "none"; clone.style.width = natW + "px"; clone.style.height = natH + "px"; canvas = document.createElement("div"); canvas.className = "mmlb-canvas"; canvas.style.width = natW + "px"; canvas.style.height = natH + "px"; canvas.appendChild(clone); stage.innerHTML = ""; stage.appendChild(canvas); box.classList.add("open"); document.body.classList.add("mmlb-lock"); fitView(); box.focus(); } function close() { box.classList.remove("open"); document.body.classList.remove("mmlb-lock"); stage.innerHTML = ""; canvas = null; if (lastFocus && lastFocus.focus) { try { lastFocus.focus(); } catch (e) {} } lastFocus = null; } document.addEventListener("click", function (e) { if (!e.target || !e.target.closest) return; if (e.target.closest("a")) return; // links inside diagrams still navigate var svg = e.target.closest(TRIGGER); if (svg) open(svg); }); })(); </script> <style id="export-atlas-search-css"> #search-dropdown:not(:empty){position:absolute;z-index:60;background:Canvas;border:1px solid color-mix(in srgb,CanvasText 25%,transparent);border-radius:8px;max-width:520px;max-height:60vh;overflow:auto;box-shadow:0 8px 24px #0003} #search-dropdown a{display:block;padding:.4rem .6rem;text-decoration:none;color:inherit;border-bottom:1px solid color-mix(in srgb,CanvasText 12%,transparent)} #search-dropdown a small{opacity:.6} #search-dropdown a:hover{background:color-mix(in srgb,CanvasText 12%,transparent)} #search-dropdown .se{padding:.45rem .6rem;opacity:.6} </style> <script id="export-atlas-search"> (function(){var ROOT="../../../";var input=document.getElementById('global-search'),box=document.getElementById('search-dropdown'); if(!input||!box)return;var idx=null,loading=false; function esc(s){return (s||'').replace(/[&<>"]/g,function(c){return {'&':'&','<':'<','>':'>','"':'"'}[c];});} function load(cb){if(idx)return cb();if(loading)return;loading=true;fetch(ROOT+'search-index.json').then(function(r){return r.json();}).then(function(d){idx=d;cb();}).catch(function(){});} function run(){var q=input.value.trim().toLowerCase();if(!q){box.innerHTML='';return;}load(function(){var h=[];for(var i=0;i<idx.length;i++){var p=idx[i],t=(p.title||'').toLowerCase(),b=(p.text||'').toLowerCase(),s=0;if(t.indexOf(q)>=0)s+=10;if(b.indexOf(q)>=0)s+=3;if(s>0)h.push({p:p,s:s});}h.sort(function(a,b){return b.s-a.s;});var o='';for(var j=0;j<Math.min(h.length,10);j++){var p=h[j].p;o+='<a href="'+ROOT+esc(p.url)+'">'+esc(p.title||p.url)+'</a>';}box.innerHTML=o||'<div class="se">No results</div>';});} var t;input.addEventListener('input',function(){clearTimeout(t);t=setTimeout(run,180);}); input.addEventListener('keydown',function(e){if(e.key==='Enter'){e.preventDefault();var q=encodeURIComponent(input.value.trim());if(q)location.href=ROOT+'search.html?q='+q;}}); document.addEventListener('click',function(e){if(!box.contains(e.target)&&e.target!==input)box.innerHTML='';});})(); </script> </body> </html>