@dreamforgestudiollc/emet 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.env.example +53 -0
  2. package/CHANGELOG.md +67 -3
  3. package/CHARTER.md +19 -7
  4. package/README.md +106 -21
  5. package/docs/AUTHORSHIP.md +3 -3
  6. package/docs/BOTS.md +4 -0
  7. package/docs/COVERAGE.md +2 -2
  8. package/docs/DEPLOY.md +9 -4
  9. package/docs/GUARDRAILS-AND-MONORAILS.md +2 -1
  10. package/docs/GUIDED-SETUP.md +8 -3
  11. package/docs/PERMISSIONS.md +6 -3
  12. package/docs/ROADMAP.md +25 -22
  13. package/docs/SETUP.md +8 -2
  14. package/docs/SUBKEYS.md +59 -0
  15. package/gems/artifact-index.json +12 -0
  16. package/gems/bot-team-backup/floor.json +15 -0
  17. package/gems/bot-team-backup/gem.json +43 -0
  18. package/gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md +27 -0
  19. package/gems/bot-team-backup/guides/BOT_TEAM_RECOVERY.md +23 -0
  20. package/gems/fieldnote/floor.json +14 -0
  21. package/gems/fieldnote/gem.json +70 -0
  22. package/gems/fieldnote/runes/fieldnote.js +4 -0
  23. package/gems/lean-six-sigma/CHANGELOG.md +10 -0
  24. package/gems/lean-six-sigma/README.md +92 -0
  25. package/gems/lean-six-sigma/floor.json +31 -0
  26. package/gems/lean-six-sigma/gem.json +1296 -0
  27. package/gems/lean-six-sigma/guides/ASSUMPTIONS.md +45 -0
  28. package/gems/lean-six-sigma/guides/BELTS.md +52 -0
  29. package/gems/lean-six-sigma/guides/DMADV.md +56 -0
  30. package/gems/lean-six-sigma/guides/DMAIC.md +127 -0
  31. package/gems/lean-six-sigma/guides/FORMULAS.md +330 -0
  32. package/gems/lean-six-sigma/guides/LEAN.md +97 -0
  33. package/gems/lean-six-sigma/guides/TEMPLATES.md +279 -0
  34. package/gems/lean-six-sigma/runes/lss_capability.js +132 -0
  35. package/gems/lean-six-sigma/runes/lss_control_limits.js +240 -0
  36. package/gems/lean-six-sigma/runes/lss_dpmo_sigma.js +81 -0
  37. package/gems/lean-six-sigma/runes/lss_hypothesis.js +298 -0
  38. package/gems/lean-six-sigma/runes/lss_sample_size.js +81 -0
  39. package/gems/neurendipity/floor.json +65 -0
  40. package/gems/neurendipity/gem.json +42 -0
  41. package/gems/neurendipity/guides/AUTISTIC_BURNOUT.md +81 -0
  42. package/{guides → gems/neurendipity/guides}/NEURODIVERGENT_SUPPORT.md +17 -8
  43. package/guides/README.md +3 -0
  44. package/package.json +11 -5
  45. package/server.json +44 -4
  46. package/src/aleph.js +4 -4
  47. package/src/annotations.js +38 -3
  48. package/src/atlas-role.js +1 -1
  49. package/src/attribution.js +555 -0
  50. package/src/conformance.js +2 -2
  51. package/src/database.js +6 -5
  52. package/src/dispatch.js +116 -13
  53. package/src/env.js +54 -9
  54. package/src/floor.js +82 -41
  55. package/src/gaps.js +39 -6
  56. package/src/gem-check.js +1359 -0
  57. package/src/guides.js +31 -4
  58. package/src/host-reach.js +23 -0
  59. package/src/http-remote.js +46 -2
  60. package/src/index.js +9 -2
  61. package/src/layers.js +1 -1
  62. package/src/lessons-to-checks.js +3 -3
  63. package/src/logger.js +2 -1
  64. package/src/mongo-connect.js +45 -2
  65. package/src/oauth-provider.js +2 -2
  66. package/src/owner-approvals.js +281 -0
  67. package/src/persons.js +20 -0
  68. package/src/redact.js +10 -4
  69. package/src/request-log.js +1 -1
  70. package/src/rune-dispatch.js +360 -0
  71. package/src/rune-registry.js +71 -0
  72. package/src/rune-scope.js +42 -0
  73. package/src/scopes.js +3 -0
  74. package/src/session-graph.js +25 -23
  75. package/src/session.js +9 -9
  76. package/src/setup.js +297 -30
  77. package/src/socket.js +545 -0
  78. package/src/startup-pages.js +23 -6
  79. package/src/startup-payload.js +9 -6
  80. package/src/subkey-store.js +357 -0
  81. package/src/subkeys.js +947 -0
  82. package/src/tools.js +299 -62
  83. package/src/transcript-session.js +1 -1
  84. package/src/validation.js +26 -2
  85. package/src/version.js +1 -1
  86. package/templates/BOARD.md +2 -2
  87. package/templates/BOTHANDOFF.md +2 -2
  88. package/templates/CHARACTER.md +1 -1
  89. package/templates/HANDOFF.md +1 -1
  90. package/templates/IDENTITY.md +1 -1
  91. package/templates/INDEX.md +19 -19
  92. package/templates/INSTALL.md +1 -1
  93. package/templates/PROCEDURE.md +1 -1
  94. package/templates/ROSTER.md +2 -2
  95. package/templates/SEED.md +2 -2
  96. package/templates/STAGING.md +2 -2
  97. package/templates/STANDARD.md +5 -5
  98. package/templates/THREAD.md +1 -1
  99. package/templates/USER.md +4 -1
  100. package/verification/load-gate/corpus.json +1765 -0
  101. package/verification/load-gate/load-gate.mjs +1246 -0
@@ -0,0 +1,97 @@
1
+ # Lean tools
2
+
3
+ Use a tool when the project cause or the process walk calls for it. Record what you saw. Leave times and counts blank until you measure them. An illustration is not your data.
4
+
5
+ ## Wastes
6
+
7
+ Walk the process and write what you see. The seven wastes to look for:
8
+
9
+ 1. Transportation: material or product moved farther than the work requires.
10
+ 2. Inventory: more material or jobs waiting than the next step needs.
11
+ 3. Motion: people moving or reaching in a way that does not change the product.
12
+ 4. Waiting: people or machines idle while something else finishes.
13
+ 5. Overproduction: making more, or sooner, than the customer pulled.
14
+ 6. Over-processing: work the customer does not need, or a tighter spec than the CTQ.
15
+ 7. Defects: work that fails the spec and must be redone or scrapped.
16
+
17
+ Unused human skill is a common eighth. Add it when the team wants that category. It is an extension, not one of the original seven.
18
+
19
+ For each waste you record: place, what you saw, and your note. Do not mark a waste you did not see. Do not invent a count.
20
+
21
+ Blank row: place | waste type | what was seen | note
22
+
23
+ Illustration, not your data: place "pack cell", type "waiting", note "boxes sat 20 minutes while the label printer was down". Use this shape only. Use your own observation on the real sheet.
24
+
25
+ ## 5S
26
+
27
+ 5S is Sort, Set in order, Shine, Standardize, Sustain, for one area.
28
+
29
+ 1. Sort: what you removed, and where it went.
30
+ 2. Set in order: where the remaining items live, so a stranger can find them.
31
+ 3. Shine: what "clean" means here, and what you clean.
32
+ 4. Standardize: the written standard for the first three steps.
33
+ 5. Sustain: who checks, and how often.
34
+
35
+ Blank: area | removed | home for what remains | clean standard | who checks
36
+
37
+ Illustration, not your data: area "gage cabinet", removed "three expired stickers", home "hooks labeled by size", clean standard "no loose cards on the shelf", who checks "cell lead, Friday".
38
+
39
+ ## Value stream map
40
+
41
+ Draw the current state, then a future state only after you have measured the current one.
42
+
43
+ For each step record: process time, wait time, and the information that triggers the step. Add material flow and information flow. Lead time is the sum of the times you entered. Process time is the sum of the process times you entered. If a time is missing, leave the total blank and name the missing step.
44
+
45
+ Do not draw a future state that assumes a time you have not measured. Mark a future-state time as a target when the user sets it, and keep it separate from the current-state time.
46
+
47
+ Blank step row: step name | process time | wait time | trigger | unit of time
48
+
49
+ Illustration, not your data: step "weld", process time "4 min", wait time "30 min", trigger "paper traveler". Lead time stays blank until every step in the real map has a time.
50
+
51
+ ## Flow
52
+
53
+ Flow means work moves in one piece or in a small batch, and waiting is called waiting.
54
+
55
+ Write the batch size you use now, the batch size you will try, and where the work stops. A stop with no time stays a stop. Do not convert a stop into a savings number until the financial worksheet has a cost the user or finance supplied.
56
+
57
+ Blank: product | current batch | trial batch | where it waits
58
+
59
+ Illustration, not your data: product "bracket", current batch "50", trial batch "5", waits "before paint".
60
+
61
+ ## Pull
62
+
63
+ A downstream signal authorizes the upstream step. The signal may be a kanban card or another signal you already use.
64
+
65
+ Write the signal, the maximum inventory that signal allows, and who acts when the signal is empty. If you do not have a maximum, leave it blank. Do not copy a maximum from a textbook.
66
+
67
+ Blank: upstream step | downstream step | signal | maximum inventory | who acts
68
+
69
+ Illustration, not your data: upstream "cut", downstream "weld", signal "red card", maximum "one tray", who acts "cutter".
70
+
71
+ ## Kaizen
72
+
73
+ A kaizen here is a short cycle inside the project, not a substitute for the DMAIC tollgates.
74
+
75
+ Write: target condition, current condition, the countermeasures the team will try, the date, and the follow-up the owner accepted. Current condition uses facts you recorded. Target condition is a state you choose, labeled as a target.
76
+
77
+ Blank: target | current | countermeasures | date | follow-up owner
78
+
79
+ Illustration, not your data: target "changeover under 15 minutes", current "last three changeovers were 40, 35, and 38 minutes", countermeasure "stage the fixture before the line stops", date "the user supplies it", owner "the user names them".
80
+
81
+ ## SMED
82
+
83
+ SMED (single-minute exchange of die) shortens setup. List every setup step. Mark each step internal (the process is stopped) or external (the process can keep running). The change to try is a step that can move from internal to external, or a step that can be shorter. Times stay blank until you measure them.
84
+
85
+ Blank: step | internal or external | time now | time after the change you will try
86
+
87
+ Illustration, not your data: step "fetch fixture", mark "internal today, external after staging", time now "blank until timed".
88
+
89
+ ## Poka-yoke
90
+
91
+ Poka-yoke is a change that makes a mistake hard to make, or hard to pass on.
92
+
93
+ Write the mistake, the device or check, and how you will see that the mistake was stopped. A sensor or a fixture you have not tried stays a plan. Do not record a prevented defect count until you have counted it.
94
+
95
+ Blank: mistake | device or check | how you will see that it stopped the mistake
96
+
97
+ Illustration, not your data: mistake "bracket loaded backward", device "pin that blocks the backward seat", see it "the press will not cycle".
@@ -0,0 +1,279 @@
1
+ # Templates
2
+
3
+ Copy a blank block onto the project sheet. Leave a cell empty until you have the fact. Each filled block is an illustration with made-up details. Do not copy those details into a live project. A calculator returns numbers only. File a sealed record only when you ask.
4
+
5
+ ## Project charter
6
+
7
+ Instructions. One charter per project. Problem statement: what, where, when, how large. No cause and no solution in that sentence. Goal: baseline, target, date. Baseline may read "baseline not measured yet". Mark the path DMAIC or DMADV.
8
+
9
+ Blank
10
+
11
+ | Field | Entry |
12
+ | --- | --- |
13
+ | Project name | |
14
+ | Path (DMAIC or DMADV) | |
15
+ | Problem statement | |
16
+ | Business case | |
17
+ | Goal baseline | |
18
+ | Goal target | |
19
+ | Goal date | |
20
+ | Scope in | |
21
+ | Scope out | |
22
+ | Team and roles | |
23
+ | Champion | |
24
+ | Start date | |
25
+ | Target end | |
26
+ | Define milestone | |
27
+ | Measure milestone | |
28
+ | Analyze milestone | |
29
+ | Improve milestone | |
30
+ | Control milestone | |
31
+ | Resources | |
32
+
33
+ Filled example. Illustration, not your data. Project name: North dock seal leaks. Path: DMAIC. Problem statement: Line 2 seal rejects rose in March at the north dock, 40 rejects in 2,000 seals. Business case: returns and rework. Goal baseline: baseline not measured yet. Goal target: the user sets it. Goal date: the user sets it. Scope in: line 2 seal cell. Scope out: line 1 and the warehouse. Team: one operator, one quality tech, one supervisor. Champion: the name the user supplies. Milestones: blank until dated.
34
+
35
+ ## SIPOC
36
+
37
+ Instructions. About five to seven process steps. Customer requirements only when you know them.
38
+
39
+ Blank
40
+
41
+ | Suppliers | Inputs | Process steps | Outputs | Customers | Requirement if known |
42
+ | --- | --- | --- | --- | --- | --- |
43
+ | | | 1. | | | |
44
+ | | | 2. | | | |
45
+ | | | 3. | | | |
46
+ | | | 4. | | | |
47
+ | | | 5. | | | |
48
+
49
+ Filled example. Illustration, not your data. Supplier: resin crib. Input: pellet lot. Steps: dry, mold, trim, inspect, pack. Output: sealed case. Customer: finish plant. Requirement: no leak at 5 psi, only if the user has that spec.
50
+
51
+ ## VOC and CTQ tree
52
+
53
+ Instructions. Keep the voice in the customer's words. A CTQ must be measurable. Kano only if you supply the label.
54
+
55
+ Blank
56
+
57
+ | Voice (verbatim) | Customer | Need | Driver | CTQ | Target | LSL | USL | Unit | Method | Kano if supplied |
58
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
59
+ | | | | | | | | | | | |
60
+
61
+ Filled example. Illustration, not your data. Voice: "The case leaks on the truck." Customer: finish plant. Need: arrives dry. Driver: seal integrity. CTQ: leak pressure. Target: blank. LSL: blank. USL: blank. Unit: psi. Method: hold test. Kano: blank.
62
+
63
+ ## Data collection plan
64
+
65
+ Instructions. Write the operational definition so two people count the same way. Sample size stays blank until you calculate it or you supply a size and name the source.
66
+
67
+ Blank
68
+
69
+ | Measure | Continuous or discrete | Operational definition | Unit | Source | Method | Sample size | Stratification | Who collects | When | Integrity check |
70
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
+ | | | | | | | | | | | |
72
+
73
+ Filled example. Illustration, not your data. Measure: leak fails. Discrete. Definition: a case that loses pressure before 30 seconds on the hold test. Unit: case. Source: line 2 log. Method: tally at inspect. Sample size: blank until calculated. Stratification: shift. Who: the user names them. When: each shift. Integrity check: recount one hour with a second person.
74
+
75
+ ## MSA and Gage R&R plan
76
+
77
+ Instructions. This sheet plans the study. It does not calculate Gage R&R. Result cells stay blank until you have a result from a study you ran. Write the acceptance rule in the sponsor's words. Do not insert a 10 percent or 30 percent cutoff unless the sponsor stated that rule.
78
+
79
+ Blank
80
+
81
+ | Field | Entry |
82
+ | --- | --- |
83
+ | Instrument | |
84
+ | Characteristic | |
85
+ | Unit | |
86
+ | Resolution | |
87
+ | Appraisers | |
88
+ | Parts | |
89
+ | Replicates | |
90
+ | Crossed or nested | |
91
+ | Sponsor acceptance rule | |
92
+ | Repeatability result | |
93
+ | Reproducibility result | |
94
+ | Percent of tolerance | |
95
+ | Percent of study variation | |
96
+
97
+ Filled example. Illustration, not your data. Instrument: pressure gage A. Characteristic: leak pressure. Unit: psi. Resolution: 0.1 psi. Appraisers: two names the user supplies. Parts: 10. Replicates: 3. Crossed. Sponsor rule: blank until the sponsor writes it. All four result cells: blank.
98
+
99
+ ## Fishbone
100
+
101
+ Instructions. Write the effect as the problem, not the cause. Use people, method, machine, material, measurement, and environment, or replace those labels. A cause is marked for testing only when you say so.
102
+
103
+ Blank
104
+
105
+ | Effect | Category | Cause | Marked for test (yes or blank) |
106
+ | --- | --- | --- | --- |
107
+ | | | | |
108
+
109
+ Filled example. Illustration, not your data. Effect: seal leak at inspect. Category: method. Cause: dwell time shorter than the card. Marked for test: blank until you say yes.
110
+
111
+ ## Five Whys
112
+
113
+ Instructions. Stop at the why you stop at. Leave later whys blank. Countermeasure stays blank until you write it.
114
+
115
+ Blank
116
+
117
+ | Problem statement | |
118
+ | --- | --- |
119
+ | Why 1 | |
120
+ | Why 2 | |
121
+ | Why 3 | |
122
+ | Why 4 | |
123
+ | Why 5 | |
124
+ | Countermeasure | |
125
+
126
+ Filled example. Illustration, not your data. Problem: dwell shorter than the card. Why 1: the timer was set to the old card. Why 2: the card changed last month and the timer was not updated. Why 3 through why 5: blank. Countermeasure: blank until you write the action.
127
+
128
+ ## FMEA
129
+
130
+ Instructions. Severity, occurrence, and detection are integers you enter from 1 to 10. RPN is severity times occurrence times detection, and only when all three are present. Otherwise RPN stays blank. New ratings stay blank until you return with them. Worked product: see `guides/FORMULAS.md#RPN` (8 times 4 times 5 = 160) as arithmetic, not as a score for this row.
131
+
132
+ Blank
133
+
134
+ | Step | Function | Failure mode | Effect | Severity | Cause | Occurrence | Current controls | Detection | RPN | Action | Owner | Date | New severity | New occurrence | New detection | New RPN |
135
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
136
+ | | | | | | | | | | | | | | | | | |
137
+
138
+ Filled example. Illustration, not your data. Step: seal. Function: hold pressure. Failure mode: short dwell. Effect: leak. Severity: blank until you score it. Cause: old timer setting. Occurrence: blank. Controls: work instruction. Detection: blank. RPN: blank. Action: blank. Owner: blank. Date: blank. New ratings: blank.
139
+
140
+ ## Hypothesis test selection
141
+
142
+ Instructions. Answer the four questions. Then you pick the candidate. The package does not launch a test you did not name. Tests this version works by hand are in `guides/FORMULAS.md`. A row marked named only is a name and a list of assumptions. You compute that statistic with your own source. This version does not return a p-value.
143
+
144
+ Questions
145
+
146
+ 1. What are you comparing?
147
+ 2. Are the data measurements or counts?
148
+ 3. How many groups?
149
+ 4. Is a standard deviation known, or estimated from this sample?
150
+
151
+ | Situation you describe | Candidate | In the formula guide |
152
+ | --- | --- | --- |
153
+ | One mean, sigma estimated from the sample | One-sample t | Yes. Statistic and degrees of freedom. |
154
+ | One mean, sigma treated as known | z test | The interval only, when you supply z. The test decision is not computed. |
155
+ | Paired measurements | Paired t on the differences | Named only. |
156
+ | Two independent means | Two-sample t | Named only. |
157
+ | More than two means | One-way ANOVA | Yes. Sums of squares and F. |
158
+ | Counts against expected counts | Chi-square goodness of fit | Yes. Statistic and degrees of freedom. |
159
+ | Two continuous measures, a line | Simple linear regression | Yes. Slope, intercept, and R squared. |
160
+ | A variance, two variances, or a proportion test | The matching textbook test | Named only. |
161
+
162
+ Blank decision
163
+
164
+ | Question | Your answer |
165
+ | --- | --- |
166
+ | What is compared | |
167
+ | Measurements or counts | |
168
+ | How many groups | |
169
+ | Sigma known or estimated | |
170
+ | Candidate you pick | |
171
+ | Assumptions you have not checked | |
172
+
173
+ Filled example. Illustration, not your data. Compared: mean dwell time against 12 seconds. Measurements. One group. Sigma estimated. Candidate you pick: one-sample t. Assumptions not checked: normality.
174
+
175
+ ## DOE planning
176
+
177
+ Instructions. You choose the design name and you supply the run order. This version does not build a design matrix and does not randomize for you.
178
+
179
+ Blank
180
+
181
+ | Response | |
182
+ | --- | --- |
183
+ | Factors and levels | |
184
+ | Ranges | |
185
+ | Design name you choose | |
186
+ | Replicates | |
187
+ | Randomized (yes or no) | |
188
+ | Run order you supply | |
189
+ | Blocking | |
190
+ | Noise factors | |
191
+
192
+ Filled example. Illustration, not your data. Response: leak pressure. Factors: dwell at two levels, temperature at two levels. Ranges: the user writes the numbers. Design name: full factorial. Replicates: 2. Randomized: blank until you say. Run order: blank until you list it. Blocking: none stated. Noise: ambient humidity, blank until measured.
193
+
194
+ ## Control plan
195
+
196
+ Instructions. One row per step and CTQ. Chart type is a name (individuals, X-bar and R, p, np, c, or u) you choose after you know the data. Limits are computed in the formula guide or written "limits not set".
197
+
198
+ Blank
199
+
200
+ | Step | CTQ | Spec | Measurement method | Sample size | Frequency | Chart type | Response plan pointer | Owner |
201
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
202
+ | | | | | | | | | |
203
+
204
+ Filled example. Illustration, not your data. Step: inspect. CTQ: leak pressure. Spec: blank. Method: hold test. Sample size: 5. Frequency: each hour. Chart: X-bar and R. Response pointer: the response plan row. Owner: the user names them.
205
+
206
+ ## Response plan
207
+
208
+ Instructions. Name the chart and the limit. Immediate action, containment, escalation, and the resume condition are yours. A point is out of limits only when you supply the point and the limits.
209
+
210
+ Blank
211
+
212
+ | Signal (chart and limit) | Immediate action | Owner | Containment | Escalation | Resume when |
213
+ | --- | --- | --- | --- | --- | --- |
214
+ | | | | | | |
215
+
216
+ Filled example. Illustration, not your data. Signal: X-bar above the upper limit you calculated. Immediate action: stop the sealer. Owner: cell lead. Containment: hold the last hour of cases. Escalation: supervisor. Resume when: the user writes the condition.
217
+
218
+ ## A3
219
+
220
+ Instructions. One page of plain sentences. Empty sections stay empty.
221
+
222
+ Blank
223
+
224
+ | Background | |
225
+ | --- | --- |
226
+ | Current condition | |
227
+ | Goal | |
228
+ | Analysis | |
229
+ | Countermeasures | |
230
+ | Plan | |
231
+ | Follow-up | |
232
+
233
+ Filled example. Illustration, not your data. Background: north dock leaks in March. Current condition: 40 rejects in 2,000 seals, from the user's count. Goal: blank until set. Analysis: blank until Analyze. Countermeasures: blank. Plan: blank. Follow-up: blank.
234
+
235
+ ## Tollgate checklists
236
+
237
+ Instructions. Mark a line only when the matching tollgate in `guides/DMAIC.md` or `guides/DMADV.md` is satisfied by something you supplied. An open line stays open.
238
+
239
+ Blank, DMAIC
240
+
241
+ | Gate | Item | Open or met | Evidence you supply |
242
+ | --- | --- | --- | --- |
243
+ | Define | Problem, goal, scope, team, champion, SIPOC, CTQ or dated plan | | |
244
+ | Measure | Definitions, data plan, MSA plan, map, baseline from your data | | |
245
+ | Analyze | Cause list, Five Whys, chosen analysis, accepted cause | | |
246
+ | Improve | Countermeasures, pilot, DOE or "no DOE", FMEA, pilot data, money sheet | | |
247
+ | Control | Control plan, response plan, limits or "limits not set", owner, lessons, benefits, frequency | | |
248
+
249
+ Blank, DMADV
250
+
251
+ | Gate | Item | Open or met | Evidence you supply |
252
+ | --- | --- | --- | --- |
253
+ | Define | Customer, business case, charter | | |
254
+ | Measure | CTQs and targets you set | | |
255
+ | Analyze | Concepts you listed and risks you named | | |
256
+ | Design | Selected design, predicted capability from your inputs, pilot plan | | |
257
+ | Verify | Validation data you collected, control plan | | |
258
+
259
+ Filled example. Illustration, not your data. Define row: Open. Evidence: problem statement drafted, champion name still blank.
260
+
261
+ ## Financial benefits worksheet
262
+
263
+ Instructions. Hard savings and soft savings stay on their own rows. Do not turn soft into hard. Do not annualize unless you supply the number of periods and ask for the product. The finance name stays blank until you supply it.
264
+
265
+ Blank
266
+
267
+ | Field | Entry |
268
+ | --- | --- |
269
+ | Baseline metric | |
270
+ | Baseline period | |
271
+ | Improved metric | |
272
+ | Volume | |
273
+ | Cost per unit of the metric | |
274
+ | Hard savings | |
275
+ | Soft savings (keep this label) | |
276
+ | Periods, if you ask to annualize | |
277
+ | Finance name | |
278
+
279
+ Filled example. Illustration, not your data. Baseline metric: leak rejects. Period: March. Improved metric: blank until measured. Volume: blank. Cost per unit: blank until finance or you supply it. Hard savings: blank. Soft savings: blank. Periods: blank. Finance name: blank.
@@ -0,0 +1,132 @@
1
+ // Pure function of the caller's inputs. Returns numbers. Writes nothing.
2
+
3
+ const MISSING = "missing-input";
4
+ const ASSUMPTION = "assumption-not-checked";
5
+ const LABEL = "sigma-label-mismatch";
6
+
7
+ const WITHIN = Object.freeze({
8
+ __proto__: null,
9
+ cp: true,
10
+ cpk: true,
11
+ cpu: true,
12
+ cpl: true,
13
+ });
14
+ const OVERALL = Object.freeze({
15
+ __proto__: null,
16
+ pp: true,
17
+ ppk: true,
18
+ });
19
+
20
+ function isNum(value) {
21
+ return typeof value === "number" && Number.isFinite(value);
22
+ }
23
+
24
+ function push(flags, flag) {
25
+ if (flag && flags.indexOf(flag) < 0) flags.push(flag);
26
+ }
27
+
28
+ function blank(flags, missing, error) {
29
+ return {
30
+ ok: false,
31
+ flags,
32
+ missing,
33
+ wrote: false,
34
+ error,
35
+ value: null,
36
+ sigmaUsed: null,
37
+ };
38
+ }
39
+
40
+ function fail(flags, missing, error) {
41
+ if (missing.length) push(flags, MISSING);
42
+ return blank(flags, missing, error);
43
+ }
44
+
45
+ export function run(input) {
46
+ const flags = [];
47
+ const missing = [];
48
+ if (input === null || typeof input !== "object" || Array.isArray(input)) {
49
+ missing.push("index", "sigmaKind");
50
+ return fail(flags, missing, "Missing index, sigmaKind.");
51
+ }
52
+
53
+ const index = String(input.index);
54
+ const sigmaKind = input.sigmaKind;
55
+ if (!Object.hasOwn(WITHIN, index) && !Object.hasOwn(OVERALL, index)) missing.push("index");
56
+ if (sigmaKind !== "within" && sigmaKind !== "overall") missing.push("sigmaKind");
57
+ if (missing.length) {
58
+ return fail(flags, missing, "Missing " + missing.join(", ") + ".");
59
+ }
60
+
61
+ const hasSigma = isNum(input.sigma);
62
+ const hasRange = isNum(input.rBar) || isNum(input.d2);
63
+ if (hasSigma && hasRange) {
64
+ missing.push("sigma", "rBar", "d2");
65
+ return fail(flags, missing, "Pass sigma or the range pair, not both.");
66
+ }
67
+
68
+ let sigmaUsed = null;
69
+ if (hasSigma) {
70
+ if (!(input.sigma > 0)) {
71
+ missing.push("sigma");
72
+ return fail(flags, missing, "sigma must be greater than 0.");
73
+ }
74
+ sigmaUsed = input.sigma;
75
+ } else if (isNum(input.rBar) && isNum(input.d2)) {
76
+ if (!(input.d2 > 0) || !(input.rBar / input.d2 > 0)) {
77
+ missing.push("rBar", "d2");
78
+ return fail(flags, missing, "sigma must be greater than 0.");
79
+ }
80
+ sigmaUsed = input.rBar / input.d2;
81
+ } else {
82
+ if (!isNum(input.rBar)) missing.push("rBar");
83
+ if (!isNum(input.d2)) missing.push("d2");
84
+ if (!hasRange) missing.push("sigma");
85
+ return fail(flags, missing, "Missing " + missing.join(", ") + ".");
86
+ }
87
+
88
+ const need = [];
89
+ if (index === "cp" || index === "pp" || index === "cpk" || index === "ppk" || index === "cpl") {
90
+ if (!isNum(input.lsl)) need.push("lsl");
91
+ }
92
+ if (index === "cp" || index === "pp" || index === "cpk" || index === "ppk" || index === "cpu") {
93
+ if (!isNum(input.usl)) need.push("usl");
94
+ }
95
+ if (index === "cpk" || index === "ppk" || index === "cpu" || index === "cpl") {
96
+ if (!isNum(input.mean)) need.push("mean");
97
+ }
98
+ if (need.length) {
99
+ return fail(flags, need, "Missing " + need.join(", ") + ".");
100
+ }
101
+
102
+ if (isNum(input.usl) && isNum(input.lsl) && input.usl < input.lsl) {
103
+ return fail(flags, [], "USL is below LSL.");
104
+ }
105
+
106
+ const expected = Object.hasOwn(WITHIN, index) ? "within" : "overall";
107
+ if (sigmaKind !== expected) push(flags, LABEL);
108
+
109
+ let value = null;
110
+ if (index === "cp" || index === "pp") {
111
+ value = (input.usl - input.lsl) / (6 * sigmaUsed);
112
+ } else if (index === "cpu") {
113
+ value = (input.usl - input.mean) / (3 * sigmaUsed);
114
+ } else if (index === "cpl") {
115
+ value = (input.mean - input.lsl) / (3 * sigmaUsed);
116
+ } else {
117
+ const cpu = (input.usl - input.mean) / (3 * sigmaUsed);
118
+ const cpl = (input.mean - input.lsl) / (3 * sigmaUsed);
119
+ value = Math.min(cpu, cpl);
120
+ }
121
+
122
+ push(flags, ASSUMPTION);
123
+ return {
124
+ ok: true,
125
+ flags,
126
+ missing,
127
+ wrote: false,
128
+ error: null,
129
+ value,
130
+ sigmaUsed,
131
+ };
132
+ }