Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
2 lines (2 loc) · 3.69 KB
/
Copy pathscript.js
File metadata and controls
2 lines (2 loc) · 3.69 KB
1
2
/* Decision Relay: prewritten fictional cases only; no network, storage, scoring, or authorization. */
(() => { const cases={draft:{code:'CASE / DRAFT-01',state:'REQUESTED RIGHT / DRAFT ONLY',title:'Prepare—but do not send—a supplier update.',resource:'Sanitized delivery status and an approved contact list. No contract files, price history, or private notes.',question:'Is the workflow drafting text only, or has someone implicitly granted it an external communication right?',pause:'The draft includes an unverified date, a commercial statement, a new recipient, or a request to commit.',next:'A named owner checks the draft, recipient, facts, and authorization before any person sends it.',note:'A complete brief makes the boundary inspectable. It does not make the message correct or grant the right to send it.'},schedule:{code:'CASE / SCHEDULE-02',state:'REQUESTED RIGHT / RECOMMEND ONLY',title:'Rank maintenance windows—but do not schedule work.',resource:'Sanitized equipment constraints, technician availability bands, and agreed planning limits. No production override or supplier commitment.',question:'Can the workflow rank options without changing another team’s calendar, labor allocation, or production commitment?',pause:'Evidence is incomplete, a recommendation exceeds the planning limit, or an option displaces production work.',next:'The accountable operations owner chooses, rejects, or asks for a revised recommendation and records the reason.',note:'The brief separates a recommendation from the decision that changes other people’s work.'},config:{code:'CASE / CONFIG-03',state:'REQUESTED RIGHT / NO EXECUTION',title:'Diagnose a configuration drift—but do not alter the live system.',resource:'A read-only configuration snapshot and approved runbook excerpts. No write credential, production console, or secret value.',question:'Which finding is evidence, which change is merely proposed, and who holds the right to alter the production state?',pause:'The diagnosis is uncertain, a proposed change affects availability or access, or the containment path is unknown.',next:'A designated operator validates the finding, selects the appropriate change path, and records the observed result.',note:'A useful diagnosis can travel further than an execution right; access should not be treated as permission.'}};const fields={code:'#case-code',state:'#case-state',title:'#case-title',resource:'#case-resource',question:'#case-question',pause:'#case-pause',next:'#case-next',note:'#case-note'};const sheet=document.querySelector('.case-sheet');document.querySelectorAll('.case-button').forEach(button=>button.addEventListener('click',()=>{const current=cases[button.dataset.case];if(!current)return;sheet.classList.add('is-updating');Object.entries(fields).forEach(([key,selector])=>{document.querySelector(selector).textContent=current[key]});document.querySelectorAll('.case-button').forEach(item=>item.classList.toggle('is-selected',item===button));window.setTimeout(()=>sheet.classList.remove('is-updating'),140)}));const menuButton=document.querySelector('.menu-toggle');const menu=document.querySelector('.mobile-menu');if(!menuButton||!menu)return;const closeMenu=()=>{menu.classList.remove('is-open');menuButton.setAttribute('aria-expanded','false');menuButton.setAttribute('aria-label','Open navigation')};menuButton.addEventListener('click',()=>{const open=!menu.classList.contains('is-open');menu.classList.toggle('is-open',open);menuButton.setAttribute('aria-expanded',String(open));menuButton.setAttribute('aria-label',open?'Close navigation':'Open navigation')});menu.querySelectorAll('a').forEach(link=>link.addEventListener('click',closeMenu));document.addEventListener('keydown',event=>{if(event.key==='Escape')closeMenu()})})();