My Plant
Loading...
LIVE
Plant VA
Studies
all lines
Actions
Top Waste
avg
Production Lines
Tap to drill in
Assembly Line A
Motion · 2 actions · 292 u/shift · -72 vs demand
41%
VA%
Frame Build
38%
+18.3s
Glass Drop
61%
on takt
Final Wrap
44%
+9s
Line B
Waiting · 0 actions · 328 u/shift · -36 vs demand
67%
VA%
Sub-Assembly
67%
on takt
Inspection
52%
+4.2s
Screen Dept
Motion · 1 action · 276 u/shift · -88 vs demand
34%
VA%
Casement
0 actions · No data · walk to start
VA%
Line Balance
Tap station to study →
Work Content
Study History
Open Actions
Walk My Floor
WorkSample
Which line?
Process Dx
Muri · Mura · Muda
Seven gates. Right sequence.
Fix overburden first.
Stabilize variation second.
Remove waste third.
At the end of this study you will have a prioritized action list, a time study record, and a target condition ready for your next coaching conversation.
Pre-loaded example study — Door Panel Sub-Assembly
⬇ Save Backup appears in the header bar after setup.
Tap it at any time to download your study file.
Auto-saves locally · Use backup before closing tab
Gate 1 of 7
Study Setup
Process information, time standards, and cost basis before you touch the floor.
Process Information
Study Identity — Plant · Line · Station *
Plant
Line
Station
File: .json
Plant-Line-Station · One file per station · Saves to your folder
Takt Calculator
Time Standards
Operating Schedule
Labor Cost
Efficiency Target
What % of takt are you targeting? Accounts for fatigue, minor delays, and line variation. 95% = industry standard. 85% = conservative buffer for unstable processes.
Product Variants (optional)
Define product types that run this station (Full, Half, C5). Tag cycles during capture. Set mix % in output for weighted CT.
Gate 2 of 7 — Muri Setup
Baseline + Gemba Log
Record the before number. Observe before capturing. Confirm conditions are representative.
2A — Baseline Time
Before you time anything — record the current cycle time. This becomes the locked before number for your ROI calculation.
Built-in Stopwatch
0:00.0
CT vs Takt
Units at Risk/Shift
$/Shift Exposure
Annual Exposure
2B — Gemba Observation Log
Full cycle observed
Watched at least one complete cycle start to finish without interruption
Operator informed
Operator knows this is improvement work — not a performance review.
Material flow confirmed
Materials are staged correctly. Supply is not a constraint during this study.
Equipment condition noted
No breakdowns or abnormal equipment conditions.
Quality standard known
Acceptance criteria for this station is understood before timing begins.
Normal conditions confirmed
Production is representative of a typical shift.
Load Study Video
Load your video before capture begins. The video stays loaded when you advance to Gate 3. If you have multiple clips, load the first one here — you can swap mid-session.
🎬
Load Video
on Gate 2
00:00.0
Cycle 1 discarded. Target 10 cycles.
Tap ▶ Start.
Tap ◼ Step End after each step.
Gate 4 of 7 — Mura Analysis
Variation Check
Variation is analyzed before waste. Short-cycle steps use an absolute threshold, not a percentage.
CT basis for all downstream calculations:
Step Variation — Cycles 2+
StepAvgLow RepVarianceThresholdStatus
Cycle Time vs Takt
Select category — what is driving the instability?
⚠ Select a root cause category and add detail before proceeding — this drives your first experiment.
Gate 5 of 7 — Muda
Waste Classification
Classify work content. Steps with Every Cycle / Frequent ergo flags or high variation are locked.
Work Content — select one per step. Locked steps show the reason. CLEAR recommendation auto-generates from your classification.
Gate 6 of 7 — Priority Output
Diagnostic Output
Fix first. Stabilize second. Remove waste third. Simulate future state on the chart.
Work Balance Chart — Current vs Future State
Step Time Chart
Tap a bar to toggle it in/out of future state
Future State — Adjust Step Times
Gate 7 of 7 — Scientific Thinking
Scientific Thinking
Five questions. One step at a time.
The Five Questions
01
Where do you want to be?
02
Where are you now?
03
What's stopping you from getting there today?
04
What step will you take?
05
When will it be ready to see what you learned from that step?
Scientific Thinking in Gate 7 is informed by the Improvement Kata developed by Mike Rother.
Recommended further study: Toyota Kata Practice Guide — Rother, 2017.
Study Record
Add Step
STEP CAPTURED
Duration
Elapsed
Work Classification
Non-cyclical step
Happens every N units, not every cycle
Ergo Flags
Select frequency for flagged ergo risks
✓ Saved
`; _downloadHTML(html,`Whats_Stopping_You_${(setup.process||'ProcessDx').replace(/\s+/g,'_')}.html`); } function exportPDCAExp(){ const{setup,pdca}=DX; const CSS=`@page{size:11in 8.5in landscape;margin:.5in} *{box-sizing:border-box;margin:0;padding:0} body{font-family:'Barlow',sans-serif;background:#fff;color:#1A2A1F; width:10in;padding:.3in .4in;-webkit-print-color-adjust:exact;print-color-adjust:exact} .hdr{display:flex;align-items:flex-end;justify-content:space-between; border-bottom:3px solid #1B4332;padding-bottom:8px;margin-bottom:10px} .doc-title{font-family:'Barlow Condensed',sans-serif;font-size:32px;font-weight:800; color:#1B4332;text-transform:uppercase;letter-spacing:-.5px;line-height:1} .doc-label{font-family:'IBM Plex Mono',monospace;font-size:8px;color:#5A7A66; letter-spacing:2px;text-transform:uppercase;margin-top:2px} .meta{display:flex;gap:24px;font-family:'IBM Plex Mono',monospace;font-size:9px; color:#3D5247;background:#F0F7F2;border:1px solid #C3D9C9;border-radius:3px; padding:6px 12px;margin-bottom:10px;flex-wrap:wrap} .meta span{white-space:nowrap} .meta strong{color:#1B4332} @media print{body{padding:.2in .3in}button{display:none}} @media screen{body{max-width:10.5in;margin:0 auto;padding:.4in}}`; const FONTS=``; const s=DX.setup||{};const b=DX.baseline||{};const takt=s.takt||0; const names=DX.ergoSteps.map(x=>x.name).filter(n=>!isElim(n)); const totalCT=names.reduce((a,n)=>a+stepCT(n),0); const META=`
Process: ${s.process||'—'} Analyst: ${s.analyst||'—'} Date: ${s.date||new Date().toLocaleDateString()} Baseline CT: ${b.ct||'—'}s Study CT: ${totalCT.toFixed(1)}s Takt: ${takt||'—'}s Target CT: ${DX.kata&&DX.kata.targetCT||'—'}s Target Date: ${DX.kata&&DX.kata.targetDate||'—'}
`; // Top obstacle from tier 1, then tier 2 const t1Items=_buildTier1(); const topObs=t1Items.length?t1Items[0].text:(pdca.obstacles&&pdca.obstacles[0]?pdca.obstacles[0].text:'See What\'s Stopping You document'); const exps=pdca.experiments||[]; const blankNeeded=Math.max(8-exps.length,3); const allRows=[...exps,...Array.from({length:blankNeeded},()=>({date:'',step:'',hypothesis:'',expected:'',result:'',learned:''}))]; const rowsHTML=allRows.map((e,i)=>{ const filled=!!(e.date||e.hypothesis||e.expected||e.result||e.learned); const bg=i%2===0?'#fff':'#F8FAF8'; const cellH=filled?'auto':'38px'; const td=(v,w='')=>`${v||''}`; const tdMono=(v,w='')=>`${v||''}`; return`${tdMono(i+1,'28px')}${tdMono(e.date||'','70px')}${td(e.step,'1.2in')}${td(e.hypothesis,'1.4in')}${tdMono(e.expected,'1in')}${td(e.result,'1.3in')}${td(e.learned,'1.3in')}`; }).join(''); const html=`What I Tried — ${setup.process||'Process Dx'}${FONTS}
What I Tried
Scientific Thinking — File 2 of 3 · Process Dx
${META}
CURRENT OBSTACLE:${topObs}
${rowsHTML}
#DateStepWhat I triedWhat I think will happenHow it really happenedThe lesson I learned
`; _downloadHTML(html,`What_I_Tried_${(setup.process||'ProcessDx').replace(/\s+/g,'_')}.html`); } function exportTargetSheet(){ const{setup,pdca,baseline}=DX; const CSS=`@page{size:11in 8.5in landscape;margin:.5in} *{box-sizing:border-box;margin:0;padding:0} body{font-family:'Barlow',sans-serif;background:#fff;color:#1A2A1F; width:10in;padding:.3in .4in;-webkit-print-color-adjust:exact;print-color-adjust:exact} .hdr{display:flex;align-items:flex-end;justify-content:space-between; border-bottom:3px solid #1B4332;padding-bottom:8px;margin-bottom:10px} .doc-title{font-family:'Barlow Condensed',sans-serif;font-size:32px;font-weight:800; color:#1B4332;text-transform:uppercase;letter-spacing:-.5px;line-height:1} .doc-label{font-family:'IBM Plex Mono',monospace;font-size:8px;color:#5A7A66; letter-spacing:2px;text-transform:uppercase;margin-top:2px} .meta{display:flex;gap:24px;font-family:'IBM Plex Mono',monospace;font-size:9px; color:#3D5247;background:#F0F7F2;border:1px solid #C3D9C9;border-radius:3px; padding:6px 12px;margin-bottom:10px;flex-wrap:wrap} .meta span{white-space:nowrap} .meta strong{color:#1B4332} @media print{body{padding:.2in .3in}button{display:none}} @media screen{body{max-width:10.5in;margin:0 auto;padding:.4in}}`; const FONTS=``; const s=DX.setup||{};const b=DX.baseline||{};const takt=s.takt||0; const names=DX.ergoSteps.map(x=>x.name).filter(n=>!isElim(n)); const totalCT=names.reduce((a,n)=>a+stepCT(n),0); const META=`
Process: ${s.process||'—'} Analyst: ${s.analyst||'—'} Date: ${s.date||new Date().toLocaleDateString()} Baseline CT: ${b.ct||'—'}s Study CT: ${totalCT.toFixed(1)}s Takt: ${takt||'—'}s Target CT: ${DX.kata&&DX.kata.targetCT||'—'}s Target Date: ${DX.kata&&DX.kata.targetDate||'—'}
`; const annShifts=s.annualShifts||250;const rate=s.rate||0;const heads=s.heads||1;const shiftMin=s.shiftMin||455; const fmt$=n=>n>=1000?'$'+(n/1000).toFixed(1)+'K':'$'+n.toFixed(0); const unitsNow=takt>0?Math.floor((shiftMin*60)/totalCT):0; const targetCTnum=parseFloat(pdca.targetCT)||0; const unitsTarget=targetCTnum>0?Math.floor((shiftMin*60)/targetCTnum):0; const gapAnnual=rate>0&&totalCT>takt?((Math.floor((shiftMin*60)/takt)-unitsNow)*heads*(rate/3600)*totalCT*annShifts):0; const wkData=pdca.weeklyTracking||[]; const blankWk=Math.max(8-wkData.length,4); const allWk=[...wkData,...Array.from({length:blankWk},()=>({week:'',date:'',ct:'',wasteOpen:'',notes:''}))]; const wkRows=allWk.map((w,i)=>{ const ct=parseFloat(w.ct)||0;const target=targetCTnum; const gap=ct&&target?ct-target:null; const bg=i%2===0?'#fff':'#F8FAF8'; return` ${w.week||''} ${w.date||''} ${w.ct||''} ${target||''} ${gap===null?'—':(gap<0?'−'+Math.abs(gap).toFixed(1):'+'+(gap).toFixed(1))+'s'} ${w.wasteOpen||''} ${w.notes||''} `; }).join(''); // Summary cards const summCards=[ {label:'Baseline CT',val:(b.ct||'—')+'s',c:'#1B4332'}, {label:'Study CT',val:totalCT.toFixed(1)+'s',c:totalCT>takt?'#B91C1C':'#40916C'}, {label:'Target CT',val:targetCTnum?targetCTnum.toFixed(1)+'s':'—',c:'#2D6A4F'}, {label:'Takt Time',val:takt?takt+'s':'—',c:'#1B4332'}, {label:'Annual Exposure',val:gapAnnual>0?fmt$(gapAnnual):'—',c:gapAnnual>0?'#B91C1C':'#5A7A66'}, {label:'Units / Shift Now',val:unitsNow||'—',c:'#1B4332'}, {label:'Target Units / Shift',val:unitsTarget||'—',c:'#2D6A4F'}, ].map(c=>`
${c.label}
${c.val}
`).join(''); // Obstacle summary from tier1 const t1=_buildTier1(); const obsRows=t1.map(o=>{const status=_getTier1Status(o.key);const isErgo=o.src==='Ergo';const bc=isErgo?'#B91C1C':'#D97706';return`${o.src.toUpperCase()}${o.text}${status}`;}).join(''); const html=`Where I'm Going — ${setup.process||'Process Dx'}${FONTS}
Where I'm Going
Scientific Thinking — File 3 of 3 · Process Dx
${META}
${summCards}
${t1.length?`
Required Obstacles — Status
${obsRows}
`:''}
Weekly CT Tracking
${wkRows}
WKDate Actual CT Target CT GapWaste OpenNotes
`; _downloadHTML(html,`Target_Sheet_${(setup.process||'ProcessDx').replace(/\s+/g,'_')}.html`); } function _downloadHTML(html,filename){const a=document.createElement('a');a.href=URL.createObjectURL(new Blob([html],{type:'text/html'}));a.download=filename;document.body.appendChild(a);a.click();a.remove();} // ═══ COACH'S NOTES ═══ let coachCallback=null,coachSkip=false; const COACH_NOTES={ 1:{icon:'🎯',eyebrow:"Coach's Note — Gate 1",title:'Start at the Bottleneck',body:'Before you time a single step — find the bottleneck.

The Theory of Constraints says it plainly: the line\'s output is limited by one station. Improving any other station does not change the line\'s output.

Look for WIP piling up in front of a station. Look for the longest cycle time on the line.

Start there. Not wherever is easiest.'}, 2:{icon:'👁',eyebrow:"Coach's Note — Gate 2",title:'Observe Before You Time',body:'Taiichi Ohno had one rule: stand and watch for one hour before you touch anything.

The baseline cycle time is the single most important number in this study. It\'s your before. Without a credible before number, you can\'t prove any after.

Enter what you actually observed. Not what the standard says. What you saw with your own eyes.'}, 3:{icon:'🦺',eyebrow:"Coach's Note — Gate 3",title:'Fix the Body First',body:'You cannot standardize a process that injures your operator.

If the method requires an awkward posture, excessive force, or repetitive strain — that IS the problem. Not the cycle time.

Flag it. Fix it. Re-study. In that order.'}, 4:{icon:'⏱',eyebrow:"Coach's Note — Gate 4",title:'How to Capture Properly',body:'Cycle 1 is always wrong. Plan for it.

The Hawthorne Effect is real: operators change their pace when observed. Capture Cycle 1 anyway — the system discards it automatically.

Minimum 3 valid cycles. Use quick notes to log observations without stopping the timer.'}, 5:{icon:'📊',eyebrow:"Coach's Note — Gate 5",title:'Variation Before Waste',body:'If a process varies by 30% cycle to cycle, you don\'t have one process. You have several.

Removing waste from an unstable process is pointless — variation will mask whatever you removed.

High variation tells you something is wrong with the method, material, or machine. Address that root cause first.'}, 6:{icon:'🗑',eyebrow:"Coach's Note — Gate 6",title:'CLEAR — What It Actually Means',body:'C — Cut it: Can this step be removed completely? No customer value — cut it. Do not simplify what should not exist.

L — Link it: Can one operator perform this step without setting the part down? Link steps that share a boundary.

E — Exchange it: Would doing this step earlier or later eliminate waste between steps? Wrong sequence creates motion, waiting, redundant setup.

A — Add to it: Is the step boundary, batch size, or split point correct for the demand rate? Adjust the work content at this step.

R — Reduce complexity: Only if you cannot Cut, Link, Exchange, or Add. Simplifying waste is still waste.

Work the sequence. Never skip to Reduce complexity.'}, }; function showCoach(n,cb){if(coachSkip){if(cb)cb();return;}const note=COACH_NOTES[n];if(!note){if(cb)cb();return;}coachCallback=cb||null;$('coachEyebrow').textContent=note.eyebrow;$('coachIcon').textContent=note.icon;$('coachTitle').textContent=note.title;$('coachBody').innerHTML=note.body;const yt=$('coachYT');if(note.yt){yt.innerHTML=note.yt;yt.style.display='block';}else yt.style.display='none';$('coachSkipToggle').checked=false;$('coachOverlay').style.display='flex';} function dismissCoach(){$('coachOverlay').style.display='none';if(coachCallback){const cb=coachCallback;coachCallback=null;cb();}} function setCoachSkip(val){coachSkip=val;} // ═══ YAMAZUMI ═══ let yamStepStates={}; function initYamStates(){ // Restore from DX if exists — only add NEW steps, never reset existing scales if(DX.yamStates)Object.assign(yamStepStates,DX.yamStates); DX.ergoSteps.forEach(s=>{ if(!yamStepStates[s.name]){ // First visit: waste steps default to OFF so simulated bar shows waste-removed state const cls=DX.waste&&DX.waste[s.name]; yamStepStates[s.name]={active:(cls!=='wst'),scale:1.0}; } }); DX.yamStates=yamStepStates; } function yamResetAll(){ Object.keys(yamStepStates).forEach(k=>{yamStepStates[k]={active:true,scale:1.0};}); DX.yamStates=yamStepStates; renderYamazumi();renderYamSliders(); } function goToKata(){ // Capture current simulated CT from sliders into target CT if not already set const stepNames=DX.ergoSteps.map(s=>s.name).filter(n=>!isElim(n)); const simCT=stepNames.reduce((a,name)=>{ const st=yamStepStates[name]||{active:true,scale:1.0}; return a+(st.active?stepCT(name)*st.scale:0); },0); const studyCT=stepNames.reduce((a,n)=>a+stepCT(n),0); if(!DX.kata)DX.kata={targetCT:'',targetDate:'',conditions:[],successCriteria:'',obstacles:[],experiments:[],weeklyTracking:[]}; // Auto-populate if simulated differs from original and target not yet manually set if(simCT>0.5&&Math.abs(simCT-studyCT)>0.5&&!DX.kata.targetCT){ DX.kata.targetCT=simCT.toFixed(1); } autosave();sbSave(6); goGate(7); } function yamUseAsTarget(){ const stepNames=DX.ergoSteps.map(s=>s.name).filter(n=>!isElim(n)); const futureTotal=stepNames.reduce((a,name)=>{ const avg=stepCT(name);const state=yamStepStates[name]||{active:true,scale:1.0}; return a+(state.active?avg*state.scale:0); },0); if(futureTotal<1)return; if(!DX.kata)DX.kata={targetCT:'',targetDate:'',conditions:[],successCriteria:'',obstacles:[],experiments:[],weeklyTracking:[]}; DX.kata.targetCT=futureTotal.toFixed(1); autosave(); // Re-render savings block so TARGET CT card updates immediately renderSavingsBlock(); // Flash confirmation on button const btn=document.querySelector('[onclick="yamUseAsTarget()"]'); if(btn){const orig=btn.textContent;btn.textContent='✓ Target CT set: '+futureTotal.toFixed(1)+'s';btn.style.background='var(--green)';btn.style.color='#fff';btn.style.borderColor='var(--green)';setTimeout(()=>{btn.textContent=orig;btn.style.background='var(--gdim)';btn.style.color='var(--green)';btn.style.borderColor='var(--green)';},2200);} // Sync target CT input field in Gate 7 if already rendered const g7field=$('g7targetCT');if(g7field)g7field.value=futureTotal.toFixed(1); // Also sync weekly tracking target column const wtel=$('weeklyTrackingSection');if(wtel&&wtel.innerHTML)renderWeeklyTracking(); // Update top scorecard to show new target CT card renderROIScorecard(); } function renderYamSliders(){ const el=$('yamSliders');if(!el)return;el.innerHTML=''; const stepNames=DX.ergoSteps.map(s=>s.name).filter(n=>!isElim(n)); if(!stepNames.length){el.innerHTML='
Complete capture in Gate 4 first.
';return;} stepNames.forEach(name=>{const avg=stepCT(name);const state=yamStepStates[name]||{active:true,scale:1.0};const wc=DX.waste[name];const wcColor=wc==='va'?'var(--green)':wc==='wst'?'var(--red)':wc==='inc'?'var(--amber)':'var(--muted)';const card=document.createElement('div');card.style.cssText='background:var(--s1);border:1px solid var(--br);border-radius:var(--r);padding:10px 12px;margin-bottom:8px;display:flex;align-items:center;gap:10px';card.innerHTML=`
${name}
${(avg*state.scale).toFixed(1)}s
`;el.appendChild(card);}); } function setYamScale(name,val){if(!yamStepStates[name])yamStepStates[name]={active:true,scale:1.0};yamStepStates[name].scale=parseInt(val)/100;DX.yamStates=yamStepStates;const avg=stepCT(name);const key='yamScale_'+name.replace(/\s+/g,'_');const el=$(key);if(el)el.textContent=(avg*yamStepStates[name].scale).toFixed(1)+'s';renderYamazumi();renderROIScorecard();autosave();} function toggleYamStep(name){if(!yamStepStates[name])yamStepStates[name]={active:true,scale:1.0};yamStepStates[name].active=!yamStepStates[name].active;DX.yamStates=yamStepStates;renderYamSliders();renderYamazumi();renderROIScorecard();autosave();} function renderYamazumi(){renderSavingsBlock(); const cv=$('yamCanvas');if(!cv)return;const ctx=cv.getContext('2d'); const dpr=window.devicePixelRatio||1;const cssW=cv.clientWidth||360;const cssH=220; cv.width=Math.floor(cssW*dpr);cv.height=Math.floor(cssH*dpr); ctx.setTransform(dpr,0,0,dpr,0,0);ctx.clearRect(0,0,cssW,cssH); const stepNames=DX.ergoSteps.map(s=>s.name).filter(n=>!isElim(n)); if(!stepNames.length){ctx.fillStyle='rgba(255,255,255,.2)';ctx.font='12px monospace';ctx.fillText('Complete capture to see chart',20,cssH/2);return;} // After-state: use latest committed re-study actual CTs const hasAfter=DX.afterStudies&&DX.afterStudies.length>0; const latestAfter=hasAfter?DX.afterStudies[DX.afterStudies.length-1]:null; const stepData=stepNames.map(name=>{ const avg=stepCT(name);const state=yamStepStates[name]||{active:true,scale:1.0}; const elimInAfter=latestAfter&&latestAfter.eliminated&&latestAfter.eliminated[name]; const afterCT=latestAfter&&latestAfter.afterCTs&&latestAfter.afterCTs[name]!=null?latestAfter.afterCTs[name]:null; return{name,avg,curDur:avg,futureDur:state.active?avg*state.scale:0, afterDur:elimInAfter?0:(afterCT!==null?afterCT:avg), wc:DX.waste[name],afterWc:latestAfter&&latestAfter.waste?latestAfter.waste[name]:null}; }); const takt=DX.setup.takt||0; const curTotal=stepData.reduce((a,s)=>a+s.curDur,0); const futureTotal=stepData.reduce((a,s)=>a+s.futureDur,0); const afterTotal=hasAfter?stepData.reduce((a,s)=>a+s.afterDur,0):0; const numBars=hasAfter?3:2; const maxVal=Math.max(curTotal,futureTotal,afterTotal,takt)*1.15||1; const padL=44,padR=10,padT=14,padB=32,w=cssW-padL-padR,h=cssH-padT-padB; const barColors={'va':'#40916C','inc':'#D97706','wst':'#B91C1C','null':'#6B7280'}; // Grid lines ctx.strokeStyle='rgba(255,255,255,.06)';ctx.lineWidth=1; for(let g=0;g<=4;g++){const y=padT+h-(h*g/4);ctx.beginPath();ctx.moveTo(padL,y);ctx.lineTo(padL+w,y);ctx.stroke();ctx.fillStyle='rgba(255,255,255,.4)';ctx.font='10px monospace';const v=maxVal*g/4;ctx.fillText(v>=60?(v/60).toFixed(1)+'m':v.toFixed(0)+'s',6,y+3);} // Bar layout const barW=Math.min(72,w/(numBars+1.5)); const gap=(w-barW*numBars)/(numBars+1); // Bar 1 — Current (original study) let yBase=padT+h; stepData.forEach(s=>{if(s.curDur<=0)return;const segH=(s.curDur/maxVal)*h;yBase-=segH;ctx.fillStyle=barColors[s.wc||'null']||'#6B7280';ctx.globalAlpha=1;ctx.fillRect(padL+gap,yBase,barW,segH);if(segH>14){ctx.fillStyle='rgba(255,255,255,.7)';ctx.font='9px monospace';ctx.fillText(s.name.substring(0,9),padL+gap+2,yBase+segH-3);}}); // Bar 2 — After-state actual (if re-study committed) if(hasAfter){yBase=padT+h;stepData.forEach(s=>{if(s.afterDur<=0)return;const segH=(s.afterDur/maxVal)*h;yBase-=segH;ctx.fillStyle=barColors[(s.afterWc||s.wc)||'null']||'#6B7280';ctx.globalAlpha=0.9;ctx.fillRect(padL+gap*2+barW,yBase,barW,segH);ctx.globalAlpha=1;});} // Bar 3 — Simulated future state (sliders) const simOffset=hasAfter?3:2; yBase=padT+h;stepData.forEach(s=>{if(s.futureDur<=0)return;const segH=(s.futureDur/maxVal)*h;yBase-=segH;ctx.fillStyle=barColors[s.wc||'null']||'#6B7280';ctx.globalAlpha=0.55;ctx.fillRect(padL+gap*simOffset+barW*(simOffset-1),yBase,barW,segH);ctx.globalAlpha=1;}); // Labels ctx.fillStyle='rgba(255,255,255,.55)';ctx.font='10px monospace'; ctx.fillText('ORIGINAL',padL+gap,padT+h+18); if(hasAfter)ctx.fillText('ACTUAL',padL+gap*2+barW,padT+h+18); ctx.fillText('SIMULATED',padL+gap*simOffset+barW*(simOffset-1),padT+h+18); // CT values above bars ctx.globalAlpha=1;ctx.fillStyle='rgba(255,255,255,.7)';ctx.font='bold 11px monospace'; const curY=padT+h-(curTotal/maxVal)*h-4;ctx.fillText(curTotal.toFixed(1)+'s',padL+gap+barW+2,Math.max(curY,padT+12)); if(hasAfter){ctx.fillStyle=afterTotal<=takt?'#74C69D':'#F87171';const aftY=padT+h-(afterTotal/maxVal)*h-4;ctx.fillText(afterTotal.toFixed(1)+'s',padL+gap*2+barW*2+2,Math.max(aftY,padT+12));} ctx.fillStyle=futureTotal0){const taktY=padT+h-(takt/maxVal)*h;ctx.strokeStyle='#F59E0B';ctx.lineWidth=2;ctx.setLineDash([6,4]);ctx.beginPath();ctx.moveTo(padL,taktY);ctx.lineTo(padL+w,taktY);ctx.stroke();ctx.setLineDash([]);ctx.fillStyle='#F59E0B';ctx.font='bold 10px monospace';ctx.fillText('TAKT '+takt+'s',padL+w-58,taktY-3);} // Effective takt line (green) — shown when effTarget set const effTakt=DX.setup&&DX.setup.effectiveTakt; if(effTakt&&effTakt>0&&effTakt!==takt){const effY=padT+h-(effTakt/maxVal)*h;ctx.strokeStyle='#40916C';ctx.lineWidth=2;ctx.setLineDash([4,3]);ctx.beginPath();ctx.moveTo(padL,effY);ctx.lineTo(padL+w,effY);ctx.stroke();ctx.setLineDash([]);ctx.fillStyle='#40916C';ctx.font='bold 10px monospace';ctx.fillText('TARGET '+(DX.setup.effTarget||'')+'% '+effTakt+'s',padL+2,effY-3);} // Legend const usedCls=new Set(stepNames.map(n=>DX.waste[n]||'null')); const legendDefs=[{c:'#40916C',l:'Value Creating',k:'va'},{c:'#D97706',l:'Incidental',k:'inc'},{c:'#B91C1C',l:'Waste',k:'wst'},{c:'#6B7280',l:'Unclassified',k:'null'}]; const activeLegend=legendDefs.filter(x=>usedCls.has(x.k)); if(takt>0)activeLegend.push({c:'#F59E0B',l:'Takt'}); if(hasAfter)activeLegend.push({c:'rgba(255,255,255,.6)',l:'Actual (Re-study '+latestAfter.expNum+')'}); $('yamLegend').innerHTML=activeLegend.map(x=>`${x.l}`).join(''); // Status line const taktEl=$('yamCTDisplay'); if(taktEl){ let txt=`Original: ${curTotal.toFixed(1)}s`; if(hasAfter)txt+=` → Actual: ${afterTotal.toFixed(1)}s (${afterTotal0.05)txt+=` → Simulated: ${futureTotal.toFixed(1)}s (${saving>0?'saves −':'adds +'}${Math.abs(saving).toFixed(1)}s)`; else txt+=` · Adjust sliders below to simulate future state`; if(takt)txt+=` · Takt: ${takt}s`; taktEl.textContent=txt; } } // ── Patch renderOutput to run Yamazumi + Table + PDCA ── const _origRenderOutput=renderOutput; window.renderOutput=function(){ // Init FIRST so both savings block and canvas read the same yamStepStates initYamStates(); _origRenderOutput(); renderYamazumi();renderYamSliders();renderTimeStudyTable();renderCycleLog();renderSavingsBlock();renderProductMixBlock(); }; function renderResStudyButtons(){ const btn=$('afterStudyBtn'); const activeWrap=$('afterStudyActiveWrap'); const commit=$('commitAfterBtn'); const cancel=$('cancelAfterBtn'); if(DX.afterStudyMode){ // In-flight re-study — show commit/cancel, hide start if(btn)btn.style.display='none'; if(activeWrap)activeWrap.style.display='flex'; } else { // No active re-study — show start button if(btn)btn.style.display='block'; if(activeWrap)activeWrap.style.display='none'; } } function renderPDCAGate(){ renderPDCASection();renderWeeklyTracking();renderResStudyButtons(); const m=$('studyMeta');const m2=$('studyMeta2');if(m&&m2)m2.innerHTML=m.innerHTML; } // Print styles const printStyle=document.createElement('style'); printStyle.textContent=` @media print { /* ── RESET ── */ * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } body { background: #fff !important; margin: 0; padding: 0; font-family: 'Barlow', sans-serif; } /* ── HIDE EVERYTHING ── */ #S0, #S1, #S2, #S3, #S4, #S5, #coachOverlay, #tipModal, #stepModal, #capSheet, .foot, #prog6, #prog7, .cap-bar, .quick-note-bar, .cycle-tabs, #yamSliders, #studyMeta, #afterStudySection, #afterStudyBtnWrap, #progressLog, #weeklyTrackingSection, #savingsBlock, #S6 .gate-hdr, #S7 .gate-hdr, button, .qbtn, .ctmethod-toggle, .var-override-btn, .save-flash { display: none !important; } /* ── SHOW ACTIVE GATE ONLY ── */ .scr { display: none !important; min-height: auto !important; } .scr.on { display: block !important; } .scr.on .scroll { overflow: visible !important; padding: 0 !important; } /* ── GATE 6 SPECIFIC HIDES (only when S6 is printing) ── */ #S6.on #kataSection, #S6.on #phase1Output, #S6.on #phase2Output, #S6.on #phase3Output { display: none !important; } /* ── GATE 7 SPECIFIC HIDES (only when S7 is printing) ── */ #S7.on #savingsBlock { display: none !important; } #S7.on #roiOutput { display: none !important; } #S7.on #phase1Output { display: none !important; } #S7.on #phase2Output { display: none !important; } #S7.on #phase3Output { display: none !important; } #S7.on #timeStudyTable { display: none !important; } #S7.on #captureObservations { display: none !important; } #S7.on #afterStudySection { display: none !important; } #S7.on #studyMeta { display: none !important; } #S7.on canvas { display: none !important; } #S7.on #yamSliders { display: none !important; } #S7.on .slbl:not(.kata-print-show) { display: none !important; } /* ── GATE 7 PRINT STYLES ── */ #S7.on #kataSection { display: block !important; } #S7.on #weeklyTrackingSection { display: block !important; } #S7.on .scroll { overflow: visible !important; padding: 0 !important; } #kataSection .kata-card { background: #fff !important; border: 1pt solid #C3D9C9 !important; border-radius: 4pt !important; padding: 10pt 12pt !important; margin-bottom: 10pt !important; break-inside: avoid !important; } #kataSection .kata-label { font-family: 'Barlow Condensed', sans-serif !important; font-size: 8pt !important; font-weight: 700 !important; color: #1B4332 !important; text-transform: uppercase !important; letter-spacing: 2px !important; margin-bottom: 4pt !important; } #kataSection .kata-value { font-size: 11pt !important; color: #1a1a1a !important; line-height: 1.5 !important; } #weeklyTrackingSection { break-before: page !important; page-break-before: always !important; } /* ── PAGE 1: ROI header + Yamazumi ── */ #roiOutput { margin-bottom: 12pt; } #roiOutput .roi-box { background: #1B4332 !important; color: #fff !important; border-radius: 6pt; padding: 10pt 14pt; margin-bottom: 8pt; } #roiOutput .roi-lbl { color: rgba(255,255,255,.6) !important; font-size: 7pt; letter-spacing: 2px; } #roiOutput .roi-val { color: #74C69D !important; font-size: 26pt; font-weight: 800; } #roiOutput .roi-sub { color: rgba(255,255,255,.5) !important; font-size: 8pt; } /* ── SAVINGS SUMMARY BAR (the 3 boxes at top) ── */ #savingsHeaderBar { page-break-after: avoid; } /* ── YAMAZUMI CARD ── */ #yamCanvas { width: 100% !important; max-width: 100% !important; height: 260pt !important; background: #0a0a0a !important; display: block !important; } #yamLegend { display: flex !important; flex-wrap: wrap; gap: 8pt; font-size: 8pt; margin-top: 6pt; } /* Page break AFTER yamazumi — page 2 starts here */ #timeStudyTable { page-break-before: always !important; break-before: page !important; } /* Page break after time study table — cycle log is page 3 */ #cycleLog { page-break-before: always !important; break-before: page !important; display: block !important; margin-top: 0 !important; } /* Cycle log print styles */ #cycleLog .slbl { font-family: 'Barlow Condensed', sans-serif !important; font-size: 11pt !important; font-weight: 800 !important; color: #1B4332 !important; text-transform: uppercase !important; letter-spacing: 2px !important; border-bottom: 2pt solid #1B4332 !important; padding-bottom: 4pt !important; margin-bottom: 10pt !important; } #cycleLog table { width: 100% !important; border-collapse: collapse !important; font-size: 9pt !important; } #cycleLog td { padding: 4pt 6pt !important; border-bottom: 0.5pt solid #C3D9C9 !important; font-size: 9pt !important; } #cycleLog th { padding: 4pt 6pt !important; font-size: 7.5pt !important; } /* Cycle header bars — force color print */ #cycleLog div[style*="background:var(--forest)"], #cycleLog div[style*="background:var(--red)"] { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } /* Keep each cycle block together where possible */ #cycleLog > div > div { break-inside: avoid !important; page-break-inside: avoid !important; margin-bottom: 8pt !important; } /* ── PAGE 2+: TIME STUDY TABLE ── */ #timeStudyTable { margin: 0 !important; } #timeStudyTable .slbl { font-family: 'Barlow Condensed', sans-serif !important; font-size: 11pt !important; font-weight: 800 !important; color: #1B4332 !important; text-transform: uppercase !important; letter-spacing: 2px !important; border-bottom: 2pt solid #1B4332 !important; padding-bottom: 4pt !important; margin-bottom: 10pt !important; } /* Table base */ #timeStudyTable table { width: 100% !important; border-collapse: collapse !important; font-size: 9pt !important; } #timeStudyTable th { background: #1B4332 !important; color: #fff !important; padding: 6pt 7pt !important; text-align: left !important; font-family: 'IBM Plex Mono', monospace !important; font-size: 7.5pt !important; font-weight: 600 !important; letter-spacing: .5px !important; } #timeStudyTable td { padding: 6pt 7pt !important; border-bottom: 1pt solid #C3D9C9 !important; vertical-align: middle !important; color: #1A2A1F !important; background: #fff !important; } #timeStudyTable tbody tr:nth-child(even) td { background: #F0F7F2 !important; } /* Step number badge */ #timeStudyTable .step-badge { background: #E8F2EB !important; color: #1B4332 !important; border: 1pt solid #A8C9B0 !important; border-radius: 2pt !important; font-family: 'IBM Plex Mono', monospace !important; font-size: 7pt !important; padding: 1pt 4pt !important; margin-right: 5pt !important; } /* Classification colors — print-safe high contrast */ .print-va { color: #1B4332 !important; font-weight: 700 !important; } .print-wst { color: #7B0000 !important; font-weight: 700 !important; } .print-unc { color: #555 !important; } /* CT bar */ .ts-pct-bar { display: none !important; } .print-bar-cell { position: relative; } /* AVG column — mono bold */ .print-avg { font-family: 'IBM Plex Mono', monospace !important; font-size: 11pt !important; font-weight: 700 !important; color: #1B4332 !important; text-align: center !important; } /* Footer totals row */ #timeStudyTable tfoot td { background: #1B4332 !important; color: #fff !important; font-family: 'IBM Plex Mono', monospace !important; font-size: 9pt !important; font-weight: 700 !important; padding: 7pt !important; } /* Variation notes in table */ .print-var-warn { color: #7B0000 !important; font-size: 8pt !important; } .print-var-ok { color: #2D6A4F !important; font-size: 8pt !important; } /* savingsBlock — keep visible but compact */ #savingsBlock { display: block !important; border: 1.5pt solid #D97706 !important; border-radius: 4pt !important; padding: 10pt 12pt !important; margin-bottom: 10pt !important; page-break-inside: avoid !important; } #savingsBlock * { color: #1A2A1F !important; } /* General layout cleanup */ .calc-grid { grid-template-columns: 1fr 1fr 1fr 1fr !important; } .calc-box { border: 1pt solid #C3D9C9 !important; padding: 6pt 8pt !important; } .calc-lbl { font-size: 7pt !important; } .calc-val { font-size: 14pt !important; } }`; document.head.appendChild(printStyle); // Demo study — loadDemoStudy function function loadDemoStudy(targetGate){ const demo = { app:'ProcessDx',version:'2.1',gate:6, setup:{ process:'Door Panel Sub-Assembly',dept:'Body Shop', analyst:'E. Martin',date:'04/07/2026',operator:'J. Rodriguez', takt:120,shiftMin:455,heads:2,rate:22.50, shiftsDay:2,daysWeek:5,weeks:50,annualShifts:500, bottleneck:true,target:227,effTarget:90,effectiveTakt:108 }, baseline:{ct:148,gap:28,targetUnits:227,actualUnits:184,unitsLost:43,shiftCost:537,annualCost:268500}, gemba:{ checks:{cycle:true,operator:true,material:true,equipment:true,quality:true,normal:true}, blind:false,abnormal:'', baselineNote:'Press tool torque inconsistent on every 4th unit — maintenance notified. Otherwise normal shift conditions.', timestamp:'06:42 AM' }, ergoSteps:[ {name:'Pick panel from conveyor',flags:[],freq:{}}, {name:'Position on fixture — locate datum pins',flags:['POSTURE'],freq:{'POSTURE':'Every Cycle'},notes:'Operator bends at waist to locate lower datum pin — fixture height 28" from floor.'}, {name:'Install clip bracket — lower rail',flags:['REACH','FORCE'],freq:{'REACH':'Every Cycle','FORCE':'Frequent'},notes:'Operator reaches 34" over panel fixture on every unit. High grip force required on press tool.'}, {name:'Install clip bracket — upper rail',flags:['REACH'],freq:{'REACH':'Every Cycle'},notes:'Overhead reach — arm extended above shoulder on every unit.'}, {name:'Apply sealant bead — door perimeter',flags:[],freq:{}}, {name:'Inspect sealant continuity',flags:['POSTURE'],freq:{'POSTURE':'Occasional'},notes:'Occasional — only when visual access to lower corner is obstructed.'}, {name:'Transfer to next station',flags:[],freq:{}} ], cycles:[ // Cycle 1 — discarded (Hawthorne) [ {name:'Pick panel from conveyor',dur:3.2,elapsed:3.2,note:''}, {name:'Position on fixture — locate datum pins',dur:9.1,elapsed:12.3,note:''}, {name:'Install clip bracket — lower rail',dur:14.2,elapsed:26.5,note:''}, {name:'Install clip bracket — upper rail',dur:11.8,elapsed:38.3,note:''}, {name:'Apply sealant bead — door perimeter',dur:32.4,elapsed:70.7,note:''}, {name:'Inspect sealant continuity',dur:8.6,elapsed:79.3,note:''}, {name:'Transfer to next station',dur:4.1,elapsed:83.4,note:''} ], // Cycles 2–10 — valid [{name:'Pick panel from conveyor',dur:3.4,elapsed:3.4},{name:'Position on fixture — locate datum pins',dur:11.2,elapsed:14.6,note:'pin hesitation'},{name:'Install clip bracket — lower rail',dur:13.8,elapsed:28.4},{name:'Install clip bracket — upper rail',dur:12.1,elapsed:40.5},{name:'Apply sealant bead — door perimeter',dur:34.2,elapsed:74.7},{name:'Inspect sealant continuity',dur:8.1,elapsed:82.8},{name:'Transfer to next station',dur:4.3,elapsed:87.1}], [{name:'Pick panel from conveyor',dur:3.1,elapsed:3.1},{name:'Position on fixture — locate datum pins',dur:8.4,elapsed:11.5},{name:'Install clip bracket — lower rail',dur:15.6,elapsed:27.1,note:'press tool hesitated'},{name:'Install clip bracket — upper rail',dur:11.4,elapsed:38.5},{name:'Apply sealant bead — door perimeter',dur:33.8,elapsed:72.3},{name:'Inspect sealant continuity',dur:7.9,elapsed:80.2},{name:'Transfer to next station',dur:3.9,elapsed:84.1}], [{name:'Pick panel from conveyor',dur:3.3,elapsed:3.3},{name:'Position on fixture — locate datum pins',dur:10.8,elapsed:14.1},{name:'Install clip bracket — lower rail',dur:13.2,elapsed:27.3},{name:'Install clip bracket — upper rail',dur:12.8,elapsed:40.1},{name:'Apply sealant bead — door perimeter',dur:35.1,elapsed:75.2},{name:'Inspect sealant continuity',dur:8.4,elapsed:83.6},{name:'Transfer to next station',dur:4.2,elapsed:87.8}], [{name:'Pick panel from conveyor',dur:3.5,elapsed:3.5},{name:'Position on fixture — locate datum pins',dur:9.6,elapsed:13.1},{name:'Install clip bracket — lower rail',dur:14.4,elapsed:27.5},{name:'Install clip bracket — upper rail',dur:11.9,elapsed:39.4},{name:'Apply sealant bead — door perimeter',dur:33.4,elapsed:72.8},{name:'Inspect sealant continuity',dur:7.6,elapsed:80.4},{name:'Transfer to next station',dur:4.0,elapsed:84.4}], [{name:'Pick panel from conveyor',dur:3.2,elapsed:3.2},{name:'Position on fixture — locate datum pins',dur:14.2,elapsed:17.4,note:'operator stopped to adjust part'},{name:'Install clip bracket — lower rail',dur:13.9,elapsed:31.3},{name:'Install clip bracket — upper rail',dur:12.3,elapsed:43.6},{name:'Apply sealant bead — door perimeter',dur:34.8,elapsed:78.4},{name:'Inspect sealant continuity',dur:8.8,elapsed:87.2},{name:'Transfer to next station',dur:4.4,elapsed:91.6}], [{name:'Pick panel from conveyor',dur:3.4,elapsed:3.4},{name:'Position on fixture — locate datum pins',dur:9.2,elapsed:12.6},{name:'Install clip bracket — lower rail',dur:14.1,elapsed:26.7},{name:'Install clip bracket — upper rail',dur:11.6,elapsed:38.3},{name:'Apply sealant bead — door perimeter',dur:33.9,elapsed:72.2},{name:'Inspect sealant continuity',dur:8.2,elapsed:80.4},{name:'Transfer to next station',dur:4.1,elapsed:84.5}], [{name:'Pick panel from conveyor',dur:3.3,elapsed:3.3},{name:'Position on fixture — locate datum pins',dur:10.4,elapsed:13.7},{name:'Install clip bracket — lower rail',dur:13.6,elapsed:27.3},{name:'Install clip bracket — upper rail',dur:12.6,elapsed:39.9},{name:'Apply sealant bead — door perimeter',dur:34.5,elapsed:74.4},{name:'Inspect sealant continuity',dur:7.8,elapsed:82.2},{name:'Transfer to next station',dur:4.2,elapsed:86.4}], [{name:'Pick panel from conveyor',dur:3.6,elapsed:3.6},{name:'Position on fixture — locate datum pins',dur:9.8,elapsed:13.4},{name:'Install clip bracket — lower rail',dur:14.8,elapsed:28.2},{name:'Install clip bracket — upper rail',dur:11.8,elapsed:40.0},{name:'Apply sealant bead — door perimeter',dur:33.1,elapsed:73.1},{name:'Inspect sealant continuity',dur:8.0,elapsed:81.1},{name:'Transfer to next station',dur:3.8,elapsed:84.9}], [{name:'Pick panel from conveyor',dur:3.2,elapsed:3.2},{name:'Position on fixture — locate datum pins',dur:10.1,elapsed:13.3},{name:'Install clip bracket — lower rail',dur:14.0,elapsed:27.3},{name:'Install clip bracket — upper rail',dur:12.2,elapsed:39.5},{name:'Apply sealant bead — door perimeter',dur:34.0,elapsed:73.5},{name:'Inspect sealant continuity',dur:8.3,elapsed:81.8},{name:'Transfer to next station',dur:4.1,elapsed:85.9}] ], curCycle:0, quickNotes:[ {text:'press tool torque light on unit 3 — maintenance flagged',cycle:3,t:'27.1s'}, {text:'operator paused to re-seat lower datum pin',cycle:6,t:'17.4s'} ], variation:{ 'Pick panel from conveyor': {avg:3.34,min:3.1,max:3.6,cv:4.8,high:false,isShort:true,flagVal:false,overridden:false,lowrep:3.25,lowrepFlag:false}, 'Position on fixture — locate datum pins': {avg:10.41,min:8.4,max:14.2,cv:17.8,high:true,isShort:false,flagVal:true,overridden:false,lowrep:9.40,lowrepFlag:false}, 'Install clip bracket — lower rail': {avg:14.16,min:13.2,max:15.6,cv:5.4,high:false,isShort:false,flagVal:false,overridden:false,lowrep:13.85,lowrepFlag:false}, 'Install clip bracket — upper rail': {avg:12.08,min:11.4,max:12.8,cv:3.9,high:false,isShort:false,flagVal:false,overridden:false,lowrep:11.90,lowrepFlag:false}, 'Apply sealant bead — door perimeter':{avg:34.09,min:33.1,max:35.1,cv:1.8,high:false,isShort:false,flagVal:false,overridden:false,lowrep:33.75,lowrepFlag:false}, 'Inspect sealant continuity': {avg:8.14,min:7.6,max:8.8,cv:5.2,high:false,isShort:false,flagVal:false,overridden:false,lowrep:7.95,lowrepFlag:false}, 'Transfer to next station': {avg:4.11,min:3.8,max:4.4,cv:4.7,high:false,isShort:true,flagVal:false,overridden:false,lowrep:4.00,lowrepFlag:false} }, varOverrides:{'Position on fixture — locate datum pins':'accepted'}, varAvgCT:86.33,varGap:-33.67,varUnitsGap:-18,varShiftCost:0, waste:{ 'Pick panel from conveyor':'va', 'Position on fixture — locate datum pins':'wst', 'Install clip bracket — lower rail':'va', 'Install clip bracket — upper rail':'va', 'Apply sealant bead — door perimeter':'va', 'Inspect sealant continuity':'wst', 'Transfer to next station':'wst' }, wasteType:{ 'Position on fixture — locate datum pins':'M', 'Inspect sealant continuity':'P', 'Transfer to next station':'T' }, eracs:{ 'Position on fixture — locate datum pins':'E', 'Inspect sealant continuity':'R', 'Transfer to next station':'E' }, g5notes:'Position on fixture CV 17.8% — datum pin worn and inconsistent part seating from upstream stamping variation. Accepted to proceed — step already flagged as waste to eliminate via fixture redesign.', ctMethod:'avg', afterStudies:[],afterStudyMode:false,afterStudyDraft:null,_asOrig:null, afterStudy:{cycles:[],variation:{},captured:false,ctLog:[]}, pdca:{ targetCT:'102',targetDate:'May 30 2026', conditions:[ {condition:'Position step eliminated — datum locating automated',measurement:'CT ≤ 102s for 5 consecutive cycles'}, {condition:'Transfer waste eliminated — in-line conveyor installed',measurement:'Zero manual transfer steps on time study'} ], successCriteria:'5 consecutive cycles at or under 102s with no ergo lock-level flags remaining.', obstacles:[ {text:'Fixture redesign required to eliminate datum pin positioning step — engineering review needed',src:'Waste',resolved:false,auto:false}, {text:'Press fixture locating pin worn — CV 17.8% on position step',src:'Variation',resolved:false,auto:false}, {text:'Resolve ergo risk: Install clip bracket — lower rail — REACH, FORCE (every cycle)',src:'Ergo',resolved:false,auto:false}, {text:'Transfer to next station — eliminate by moving stations adjacent or adding inline transfer',src:'Waste',resolved:false,auto:false} ], experiments:[ {date:'Apr 8 2026',step:'Position on fixture — locate datum pins',hypothesis:'Replace worn datum pin — tolerance tightened from 0.8mm to 0.3mm',expected:'CV drops below 10%, avg CT reduces to 9.2s',result:'CV dropped to 6.1%, avg CT 9.4s',learned:'Pin was primary variation source. Fixture geometry otherwise sound. New pin holds tolerance.'}, {date:'Apr 14 2026',step:'Install clip bracket — lower rail',hypothesis:'Reposition clip bin 12" closer to fixture centerline — reduce reach distance from 34" to 18"',expected:'REACH flag resolved, step CT reduces by 2–3s',result:'Reach distance 19". Ergo flag downgraded to Occasional. CT 12.1s avg.',learned:'Bin location change was zero-cost. Operator confirmed reduction in shoulder fatigue. FORCE flag remains — press tool still requires high grip.'} ], weeklyTracking:[ {week:1,date:'Apr 8 2026',ct:'86.3',wasteOpen:'3',notes:'Baseline re-confirmed. Datum pin replaced.'}, {week:2,date:'Apr 14 2026',ct:'83.1',wasteOpen:'3',notes:'Clip bin repositioned. Reach flag reduced.'}, ] } }; Object.assign(DX, demo); if(DX.kata&&!DX.kata)DX.kata=DX.kata; else if(DX.kata)Object.assign(DX.kata,DX.kata); DX.varOverrides = {'Position on fixture — locate datum pins': 'accepted'}; if(DX.variation['Position on fixture — locate datum pins']){ DX.variation['Position on fixture — locate datum pins'].high = false; DX.variation['Position on fixture — locate datum pins'].overridden = true; DX.variation['Position on fixture — locate datum pins'].overrideReason = 'Step already identified as waste — fixture redesign in plan. Proceeding to classification.'; } autosave(); const g=targetGate||6; // Always backfill all form inputs from DX state on resume/load if(DX.setup && DX.setup.process){ const s=DX.setup; const sf=(id,v)=>{const el=$(id);if(el&&v!=null)el.value=v;}; sf('g1proc',s.process);sf('g1dept',s.dept);sf('g1analyst',s.analyst); sf('g1date',s.date);sf('g1operator',s.operator); if(s.supervisor)sf('g1supervisor',s.supervisor); sf('g1takt',s.takt);sf('g1shiftmin',s.shiftMin); sf('g1heads',s.heads);sf('g1rate',s.rate); if(DX.studyFilename){const fn=$('g1filename');if(fn)fn.value=DX.studyFilename;} sf('g1weeks',s.weeks); const sd=$('g1shiftsday');if(sd)sd.value=s.shiftsDay||1; const dw=$('g1daysweek');if(dw)dw.value=s.daysWeek||5; setBn(s.bottleneck); if(s.effTarget)setEff(s.effTarget); // Gate 2 baseline if(DX.baseline){ sf('g2ct',DX.baseline.ct); calcBaseline(); } sf('g2baselineNote',DX.gemba&&DX.gemba.baselineNote); sf('g2abnormal',DX.gemba&&DX.gemba.abnormal||''); // Gate 5 variation notes if(DX.g5notes)sf('g5notes',DX.g5notes); } goGate(g); } // ── PWA SERVICE WORKER REGISTRATION ── if('serviceWorker' in navigator){ window.addEventListener('load',()=>{ navigator.serviceWorker.register('sl-sw.js') .then(reg=>console.log('ProcessDx SW registered',reg.scope)) .catch(err=>console.log('SW registration failed',err)); }); }
✓ Saved