-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1513 lines (1374 loc) · 47.8 KB
/
index.html
File metadata and controls
1513 lines (1374 loc) · 47.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#ffffff">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="Interviews">
<title>Senior Engineer Interviews</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='6' fill='%23111111'/%3E%3Cpath d='M8 16.5 L13.5 22 L24 10.5' stroke='white' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E">
<link rel="apple-touch-icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 180'%3E%3Crect width='180' height='180' rx='34' fill='%23111111'/%3E%3Cpath d='M45 92 L76 124 L135 59' stroke='white' stroke-width='17' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E">
<style>
:root {
--bg: #ffffff;
--bg-soft: #f7f7f7;
--ink: #111111;
--ink-soft: #444444;
--ink-faded: #888888;
--line: #e3e3e3;
--line-strong: #cccccc;
--accent: #1a1a1a;
--success: #1f6b3a;
--warn: #b3520a;
--danger: #b3261e;
--shadow: 0 1px 2px rgba(0,0,0,0.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
color: var(--ink);
font-size: 16px;
line-height: 1.5;
min-height: 100dvh;
padding-top: env(safe-area-inset-top);
-webkit-font-smoothing: antialiased;
}
.app {
max-width: 680px;
margin: 0 auto;
padding: 20px 20px 32px;
padding-bottom: calc(32px + env(safe-area-inset-bottom));
min-height: 100dvh;
display: flex;
flex-direction: column;
}
.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }
/* ── Top bar ──────────────────────────────────────────────────────────── */
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 20px;
border-bottom: 1px solid var(--line);
margin-bottom: 24px;
gap: 12px;
}
.wordmark {
font-size: 0.85rem;
font-weight: 600;
color: var(--ink);
}
.wordmark .light { color: var(--ink-faded); font-weight: 400; }
.topbar-back {
background: none;
border: none;
color: var(--ink-soft);
font: inherit;
font-size: 0.9rem;
cursor: pointer;
padding: 6px 0;
}
.topbar-back:hover { color: var(--ink); }
.topbar-back::before { content: '← '; }
/* ── Headings ─────────────────────────────────────────────────────────── */
h1 {
font-size: 1.5rem;
font-weight: 700;
line-height: 1.3;
margin-bottom: 6px;
}
.sub {
color: var(--ink-soft);
font-size: 0.95rem;
margin-bottom: 24px;
}
.section-label {
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--ink-faded);
margin-bottom: 10px;
}
/* ── Library ──────────────────────────────────────────────────────────── */
.library-stats {
display: flex;
gap: 16px;
font-size: 0.85rem;
color: var(--ink-faded);
margin-bottom: 24px;
}
.library-stats strong { color: var(--ink); font-weight: 600; }
.new-cta-row {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 28px;
}
.new-cta {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: var(--ink);
color: white;
padding: 14px 20px;
border-radius: 6px;
border: 1px solid var(--ink);
cursor: pointer;
font: inherit;
font-weight: 600;
font-size: 0.95rem;
width: 100%;
min-height: 48px;
}
.new-cta:hover { background: #000; }
.new-cta-secondary {
background: white;
color: var(--ink);
border-color: var(--line-strong);
}
.new-cta-secondary:hover { background: var(--bg-soft); border-color: var(--ink-soft); }
.type-pill {
display: inline-block;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.02em;
padding: 2px 6px;
border-radius: 3px;
margin-right: 8px;
vertical-align: middle;
}
.type-pill.type-hr { background: #eef4fb; color: #1f4f8b; }
.type-pill.type-tech { background: #f2efe6; color: #6b4f1a; }
.empty-state {
border: 1px dashed var(--line-strong);
border-radius: 6px;
padding: 32px 20px;
text-align: center;
color: var(--ink-faded);
}
.empty-state strong { display: block; font-size: 1rem; color: var(--ink-soft); margin-bottom: 4px; font-weight: 600; }
.list-heading {
font-size: 0.8rem;
font-weight: 600;
color: var(--ink-faded);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 10px;
margin-top: 24px;
}
.list-heading:first-child { margin-top: 0; }
.interview-list { display: flex; flex-direction: column; gap: 8px; }
.interview-card {
background: white;
border: 1px solid var(--line);
border-radius: 6px;
padding: 14px 16px;
cursor: pointer;
text-align: left;
font: inherit;
color: inherit;
width: 100%;
transition: border-color 0.1s;
}
.interview-card:hover { border-color: var(--ink-soft); }
.card-row {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 12px;
margin-bottom: 4px;
}
.card-name { font-size: 1.02rem; font-weight: 600; }
.card-meta { font-size: 0.8rem; color: var(--ink-faded); white-space: nowrap; }
.card-detail {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
font-size: 0.85rem;
color: var(--ink-soft);
}
.card-role { color: var(--ink-faded); }
.status {
display: inline-block;
font-size: 0.72rem;
font-weight: 600;
letter-spacing: 0.02em;
padding: 3px 8px;
border-radius: 3px;
white-space: nowrap;
}
.status-progress { background: #fff4e5; color: var(--warn); }
.status-done { background: var(--bg-soft); color: var(--ink-soft); }
.status-strong { background: #e6f4ea; color: var(--success); }
.status-maybe { background: var(--bg-soft); color: var(--ink-soft); }
.status-no { background: #fbe9e7; color: var(--danger); }
.status-draft { background: var(--bg-soft); color: var(--ink-faded); }
.library-footer {
margin-top: auto;
padding-top: 32px;
display: flex;
flex-direction: column;
gap: 4px;
font-size: 0.85rem;
color: var(--ink-faded);
border-top: 1px solid var(--line);
}
.footer-link {
background: none;
border: none;
color: var(--ink-soft);
cursor: pointer;
font: inherit;
text-align: left;
padding: 8px 0;
text-decoration: underline;
}
.footer-link:hover { color: var(--ink); }
.footer-link.danger { color: var(--danger); }
/* ── Forms ────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field-label {
display: block;
font-size: 0.82rem;
font-weight: 600;
color: var(--ink-soft);
margin-bottom: 6px;
}
.field-label .req { color: var(--danger); }
input[type=text], input[type=date], textarea {
width: 100%;
padding: 11px 12px;
font: inherit;
font-size: 16px; /* prevents iOS zoom */
color: var(--ink);
background: white;
border: 1px solid var(--line-strong);
border-radius: 5px;
-webkit-appearance: none;
appearance: none;
}
input:focus, textarea:focus {
outline: none;
border-color: var(--ink);
box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
input::placeholder, textarea::placeholder { color: var(--ink-faded); }
textarea {
resize: vertical;
min-height: 88px;
line-height: 1.5;
font-size: 15px;
}
/* ── Question screen ─────────────────────────────────────────────────── */
.q-status {
display: flex;
justify-content: space-between;
font-size: 0.8rem;
color: var(--ink-faded);
margin-bottom: 12px;
}
.q-status .candidate {
color: var(--ink-soft);
max-width: 14em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.progress {
height: 4px;
background: var(--line);
border-radius: 4px;
margin-bottom: 24px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--ink);
transition: width 0.2s;
}
.q-tags {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 14px;
}
.tag-required {
font-size: 0.72rem;
font-weight: 600;
color: white;
background: var(--ink);
padding: 3px 8px;
border-radius: 3px;
letter-spacing: 0.02em;
}
.tag-optional {
font-size: 0.72rem;
font-weight: 600;
color: var(--ink-faded);
background: var(--bg-soft);
padding: 3px 8px;
border-radius: 3px;
}
.tag-time { font-size: 0.82rem; color: var(--ink-faded); }
.q-text {
font-size: 1.25rem;
font-weight: 600;
line-height: 1.4;
margin-bottom: 8px;
color: var(--ink);
}
.q-skip-hint {
font-size: 0.85rem;
color: var(--ink-faded);
margin-bottom: 24px;
}
.q-no-hint { margin-bottom: 24px; }
.expand-btn {
display: inline-flex;
align-items: center;
gap: 6px;
background: white;
border: 1px solid var(--line-strong);
border-radius: 5px;
padding: 8px 12px;
font: inherit;
font-size: 0.85rem;
color: var(--ink-soft);
cursor: pointer;
margin-bottom: 14px;
}
.expand-btn:hover { border-color: var(--ink-soft); }
.expand-btn .arrow { font-size: 0.7rem; transition: transform 0.15s; }
.expand-btn.open .arrow { transform: rotate(90deg); }
.drills-panel {
display: none;
background: var(--bg-soft);
border-radius: 5px;
padding: 14px 18px;
margin-bottom: 24px;
}
.drills-panel.open { display: block; }
.drills-panel ol { padding-left: 22px; }
.drills-panel li {
font-size: 0.92rem;
color: var(--ink-soft);
line-height: 1.6;
padding: 2px 0;
}
.signals-list { margin-bottom: 6px; }
.sig-row {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 10px 0;
cursor: pointer;
border-bottom: 1px solid var(--line);
}
.sig-row:last-child { border-bottom: none; }
.sig-row input[type=checkbox] {
appearance: none;
-webkit-appearance: none;
width: 22px;
height: 22px;
border: 1.5px solid var(--line-strong);
border-radius: 4px;
background: white;
cursor: pointer;
flex-shrink: 0;
position: relative;
margin-top: 0;
}
.sig-row input[type=checkbox]:hover { border-color: var(--ink-soft); }
.sig-row input[type=checkbox]:checked {
background: var(--ink);
border-color: var(--ink);
}
.sig-row input[type=checkbox]:checked::after {
content: '';
position: absolute;
left: 6px; top: 2px;
width: 6px; height: 11px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.sig-row span {
font-size: 0.95rem;
color: var(--ink);
line-height: 1.45;
user-select: none;
flex: 1;
}
.cross-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
background: none;
border: none;
font: inherit;
font-size: 0.85rem;
color: var(--ink-faded);
cursor: pointer;
padding: 12px 0;
}
.cross-toggle:hover { color: var(--ink-soft); }
.cross-panel { display: none; margin-bottom: 16px; }
.cross-panel.open { display: block; }
.notes-section { margin: 22px 0 16px; }
/* ── Bottom nav ──────────────────────────────────────────────────────── */
.nav {
position: sticky;
bottom: 0;
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--bg) 30%);
padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
margin: 16px -20px 0;
padding-left: 20px;
padding-right: 20px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
z-index: 10;
}
.btn {
font: inherit;
font-weight: 600;
font-size: 0.92rem;
border-radius: 6px;
border: 1px solid transparent;
cursor: pointer;
padding: 12px 20px;
min-height: 46px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.btn-primary {
background: var(--ink);
color: white;
border-color: var(--ink);
}
.btn-primary:hover { background: #000; }
.btn-secondary {
background: white;
color: var(--ink);
border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink-soft); }
.btn-skip {
background: none;
border: none;
color: var(--ink-faded);
font: inherit;
font-size: 0.88rem;
cursor: pointer;
padding: 12px;
text-decoration: underline;
}
.btn-skip:hover { color: var(--ink-soft); }
.nav-actions { display: flex; align-items: center; gap: 4px; }
/* ── End screen ──────────────────────────────────────────────────────── */
.end-meta {
font-size: 0.9rem;
color: var(--ink-soft);
margin-bottom: 28px;
}
.end-meta .sep { color: var(--line-strong); margin: 0 6px; }
.impression-row { display: flex; gap: 8px; margin-bottom: 28px; }
.imp-btn {
flex: 1;
padding: 12px 8px;
background: white;
border: 1.5px solid var(--line-strong);
border-radius: 6px;
font: inherit;
font-size: 0.92rem;
font-weight: 600;
color: var(--ink-soft);
cursor: pointer;
min-height: 48px;
}
.imp-btn:hover { border-color: var(--ink-soft); }
.imp-btn.selected {
background: var(--ink);
border-color: var(--ink);
color: white;
}
.sum-item {
background: white;
border: 1px solid var(--line);
border-radius: 5px;
padding: 12px 14px;
margin-bottom: 8px;
}
.sum-item.skipped { opacity: 0.5; }
.sum-header {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 10px;
margin-bottom: 4px;
}
.sum-label { font-weight: 600; font-size: 0.95rem; }
.sum-label em { font-style: normal; color: var(--ink-faded); font-weight: 400; font-size: 0.85rem; }
.sum-score { font-size: 0.8rem; color: var(--ink-faded); white-space: nowrap; }
.sum-signals-line { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }
.sum-signals-line .check { color: var(--success); margin-right: 4px; font-weight: 600; }
.sum-notes {
font-size: 0.9rem;
color: var(--ink-soft);
margin-top: 6px;
white-space: pre-wrap;
padding-left: 10px;
border-left: 2px solid var(--line);
line-height: 1.5;
}
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.export-btn {
width: 100%;
padding: 14px;
font-size: 1rem;
background: var(--ink);
color: white;
border: none;
border-radius: 6px;
font: inherit;
font-weight: 600;
cursor: pointer;
margin-top: 28px;
min-height: 50px;
}
.export-btn:hover { background: #000; }
.end-actions { display: flex; gap: 8px; margin-top: 10px; }
.end-actions .btn { flex: 1; padding: 12px; font-size: 0.9rem; }
@media (max-width: 480px) {
.app { padding: 16px 16px 24px; }
.nav { margin: 16px -16px 0; padding-left: 16px; padding-right: 16px; }
.q-text { font-size: 1.18rem; }
}
@media (prefers-reduced-motion: reduce) {
* { transition: none !important; }
}
</style>
</head>
<body>
<main class="app" id="app">
<!-- ────── Library ────── -->
<section class="screen" id="screen-library">
<header class="topbar">
<div class="wordmark">Interviews <span class="light">· senior engineer</span></div>
</header>
<h1>Saved interviews</h1>
<p class="sub">A simple tool for evaluating senior engineers. All data stays on this device.</p>
<div class="library-stats" id="library-stats"></div>
<div class="new-cta-row">
<button class="new-cta" onclick="startNewInterview('hr')">+ New initial HR interview</button>
<button class="new-cta new-cta-secondary" onclick="startNewInterview('technical')">+ New technical interview</button>
</div>
<div id="library-content"></div>
<footer class="library-footer">
<button class="footer-link" onclick="exportAllJSON()">Export backup (JSON)</button>
<button class="footer-link" onclick="importBackup()">Import backup</button>
<button class="footer-link danger" onclick="confirmWipe()">Delete all data</button>
<input type="file" id="import-file" accept=".json" style="display:none" onchange="onImportFile(event)">
</footer>
</section>
<!-- ────── Setup ────── -->
<section class="screen" id="screen-setup">
<header class="topbar">
<button class="topbar-back" onclick="goLibrary()">Library</button>
<div class="wordmark light" id="setup-wordmark">New interview</div>
</header>
<h1 id="setup-heading">New interview</h1>
<p class="sub">Fill in candidate details to begin.</p>
<div class="field">
<label class="field-label" for="f-candidate">Candidate name <span class="req">*</span></label>
<input type="text" id="f-candidate" placeholder="Jane Doe" autocomplete="off" autocapitalize="words" spellcheck="false">
</div>
<div class="field">
<label class="field-label" for="f-role">Role</label>
<input type="text" id="f-role" placeholder="Senior Engineer" autocomplete="off">
</div>
<div class="field">
<label class="field-label" for="f-date">Date</label>
<input type="date" id="f-date">
</div>
<div class="field">
<label class="field-label" for="f-interviewer">Interviewer</label>
<input type="text" id="f-interviewer" placeholder="Your name" autocomplete="off">
</div>
<div class="nav" style="margin-top:24px">
<button class="btn btn-secondary" onclick="goLibrary()">Cancel</button>
<button class="btn btn-primary" onclick="commitNewInterview()">Start →</button>
</div>
</section>
<!-- ────── Question (dynamic) ────── -->
<section class="screen" id="screen-question"></section>
<!-- ────── End (dynamic) ────── -->
<section class="screen" id="screen-end"></section>
</main>
<script>
const TECH_QUESTIONS = [
{
id: 'opening', label: '48h Production Access', required: true, time: '8–10 min',
text: "Imagine you get production access to our system tomorrow. What do you try to understand in the first 48 hours?",
drills: [
"Tell me exactly what you'd do first.",
"What risks would you look for?",
"How would you figure out what's critical vs what can wait?",
"What would you not touch yet — and why?"
],
signals: [
"Asked about risk before suggesting changes",
"Mentioned observability / logs",
"Asked about deploy / rollback process",
"Mapped the critical path",
"Asked about auth",
"Asked questions before proposing anything",
"Talked about domain, not just tech stack"
]
},
{
id: 'incident', label: 'Most uncomfortable incident', required: true, time: '6–8 min',
text: "Tell me about the most uncomfortable incident you've been through.",
drills: [
"Tell me exactly how that happened.",
"What was the first signal?",
"What did you do first?",
"What went wrong?",
"What would you do differently today?"
],
signals: [
"Named a specific incident (not generic)",
'Said "I" not just "we"',
"Named the first signal",
"Described what went wrong",
"Has a 'would do differently' answer",
"Showed emotional honesty — not just technical summary"
]
},
{
id: 'production_down', label: 'Took down production', required: true, time: '5–7 min',
text: "Have you ever taken down production? Walk me through it.",
drills: [
"How did you find out?",
"What was the root cause?",
"How did you recover?",
"What happened after — postmortem, follow-up action?"
],
signals: [
'Has actually done it (not "almost")',
"Named root cause",
"Named how they found out",
"Described the recovery",
"Postmortem or follow-up existed"
]
},
{
id: 'hardest_bug', label: 'Hardest bug', required: true, time: '4–6 min',
text: "What's the hardest bug you've ever debugged?",
drills: [
"Tell me exactly how that happened.",
"What was the first signal?",
"What tools did you use?",
"How long did it take — and why longer than expected?"
],
signals: [
"Specific bug, not a category",
"Described debugging process, not just the solution",
"Named tools used",
"Took longer than expected — and knows why"
]
},
{
id: 'rollback', label: 'Emergency rollback', required: false, time: '4–5 min',
skipHint: 'Skip if rollback already came up in the incident question.',
text: "Have you ever had to do an emergency rollback? What triggered it?",
drills: [
"What triggered the decision?",
"What was the rollback mechanism?",
"What happened after?"
],
signals: [
"Has done it under pressure (not just planned)",
"Knows the rollback mechanism at their company",
"Describes what triggered the decision"
]
},
{
id: 'oncall', label: 'On-call setup', required: false, time: '2–3 min',
skipHint: 'Skip if on-call came up naturally earlier.',
text: "What does your on-call setup look like at your current job?",
drills: ["Who gets paged?", "What's the escalation path?", "Tell me about a time you got paged."],
signals: ["Has been on-call personally", "Describes rotation and escalation", "Has a story from an actual page"]
},
{
id: 'monitoring', label: 'Monitoring stack', required: false, time: '5–7 min',
skipHint: 'Skip if monitoring came up in the incident question.',
text: "What were you monitoring? Walk me through the stack. What was the most important alert you had?",
drills: [
"What did you personally own vs inherit?",
"Which incident did monitoring help you catch?",
"What did you find that you didn't expect?"
],
signals: [
'Names a real stack (not just "we had Datadog")',
"Describes what they personally owned",
"Named most important alert and why",
"Has a story about something unexpected surfacing"
]
},
{
id: 'regret', label: 'Technical regret', required: true, time: '5–6 min',
text: "Tell me about a technical decision you made that you later regretted.",
drills: [
"What made you choose that at the time?",
"When did you realize it was wrong?",
"What was the cost?",
"What would you do differently today?"
],
signals: [
"Names a real decision (not vague)",
"Accepts personal responsibility",
"Has a concrete 'would do differently'",
"Shows judgment about why it seemed right then"
]
},
{
id: 'ai_workflow', label: 'AI workflow', required: false, time: '4–6 min',
skipHint: 'Skip if role is not expected to work autonomously with AI.',
text: "Give me a real example where AI dramatically changed your velocity.",
drills: [
"Walk me through the specific task.",
"Which parts still needed human judgment?",
"What did AI get wrong?"
],
signals: [
"Real example with specifics",
"Names limits or human judgment required",
'Not just "autocomplete"',
"Aware of failure modes"
]
}
];
const HR_QUESTIONS = [
{
id: 'hr_communication', label: 'Communication & English clarity', required: true, time: '5–7 min',
text: "Can you walk me through a project you owned end-to-end — what it was, what you did, and what the outcome was?",
drills: [
"What was the problem you were solving — in non-technical terms?",
"How did you explain that to a non-engineer at the time?",
"What part of this would be hard to explain to your CEO?"
],
signals: [
"Structured the answer (context → problem → action → outcome)",
"Adapts jargon down when probed",
"Pauses and clarifies when question is ambiguous",
"Comfortable English under conversational pressure",
"Did not ramble or get fragmented"
]
},
{
id: 'hr_ownership', label: 'Ownership', required: true, time: '5–7 min',
text: "Tell me about the most ambitious thing you've ever owned — not just contributed to, but owned. Walk me through how it ended.",
drills: [
"Who decided what to build? Who decided when it was done?",
"What was the hardest decision you had to make alone?",
"What did you do when something went wrong?",
"What was the impact — how do you know?"
],
signals: [
'Uses "I" naturally, distinguishes self from team',
"Describes decisions they made, not just tasks executed",
"Names a setback and how they handled it",
"Can quantify impact (users, revenue, latency — anything concrete)",
'Avoids constant "we" with no personal contribution'
]
},
{
id: 'hr_ambiguity', label: 'Ambiguity & autonomy', required: true, time: '4–6 min',
text: "Tell me about a time you had to start working on something where the requirements were unclear or kept changing. How did you handle it?",
drills: [
"Who did you go to first — and why them?",
"What did you decide on your own vs. escalate?",
"Did the direction change midway? How did you adapt?"
],
signals: [
"Asks clarifying questions before acting",
"Makes assumptions explicit and validates them",
"Defines a starting direction even without full clarity",
"Communicates risks proactively",
"Did not just wait for instructions"
]
},
{
id: 'hr_maturity', label: 'Maturity', required: true, time: '4–6 min',
text: "Tell me about a time something you owned failed or went badly. What happened, and what changed afterwards?",
drills: [
"What was your role in the failure?",
"What did you learn? What do you do differently now?",
"Who was affected? Did you talk to them about it?"
],
signals: [
"Names their role in the failure without prompting",
"Specific lesson tied to a specific behavior change",
"Emotional honesty — not just a tidy lessons-learned narrative",
"Has a real story with specifics",
"Did not externalize blame or minimize"
]
},
{
id: 'hr_engagement', label: 'Engagement & role fit', required: true, time: '6–8 min',
text: "What attracted you to this role specifically? What questions do you have about us, the product, or the team?",
drills: [
"What did you read or watch about us before this call?",
"What's a question you couldn't answer from public material?",
"What would make this role a bad fit for you?"
],
signals: [
"Has researched the product — describes it in their own words",
"Asks specific questions about work, team, or product direction",
"Names what they're optimizing for in their next role",
"Honest about what would make it a bad fit",
"Did not have only logistics questions (PTO, hours)"
]
},
{
id: 'hr_product_thinking', label: 'Product thinking (basic)', required: false, time: '3–4 min',
skipHint: 'Skip if product mindset already came up.',
text: "When you build something, how do you decide what's good enough to ship?",
drills: [
"Walk me through a recent example.",
"What did you choose to leave out?",
"Who decided what was good enough?"
],
signals: [
"Thinks about user impact",
"Considers trade-offs explicitly",
"Names what can wait",
"Has a concrete example, not abstract"
]
},
{
id: 'hr_remote', label: 'Remote / async work', required: false, time: '3–4 min',
skipHint: 'Skip if not relevant or already covered.',
text: "Have you worked with US-based or fully-remote teams before? What was different about it?",
drills: [
"How do you handle time-zone overlap?",
"What does good written communication look like to you?",
"Where did remote work cause problems for you?"
],
signals: [
"Comfortable with async communication",
"Names specific practices or tools",
"Awareness of time-zone constraints",
"Has strong written-clarity stories"
]
},
{
id: 'hr_ai_workflow', label: 'AI-assisted development', required: false, time: '3–4 min',
skipHint: 'Skip if role does not expect autonomous AI use.',
text: "How do you use AI tools in your day-to-day work?",
drills: [
"Give me a concrete example from this week.",
"Where did it help — where didn't it?",
"How do you validate what AI gives you?"
],
signals: [
"Concrete example with specifics",
"Names limits or validation needed",
'Not just "autocomplete"',
"Aware of failure modes"
]
}
];
const QUESTION_SETS = { technical: TECH_QUESTIONS, hr: HR_QUESTIONS };
const TYPE_LABELS = { technical: 'Technical', hr: 'Initial HR' };
function qsFor(i) { return QUESTION_SETS[(i && i.type) || 'technical']; }
function labelFor(i) { return TYPE_LABELS[(i && i.type) || 'technical']; }
const CROSS_SIGNALS = [
'Uses "I" consistently',
'Names numbers / dates / specifics',
'Asks clarifying questions',
"Volunteers what they don't know"
];
const STORAGE_KEY = 'casebook_v1';
let store = { interviews: [] };
let currentId = null;
function loadStore() {
try {
const saved = localStorage.getItem(STORAGE_KEY);
if (saved) store = JSON.parse(saved);
if (!Array.isArray(store.interviews)) store.interviews = [];
} catch (e) { store = { interviews: [] }; }
}
function saveStore() {
try { localStorage.setItem(STORAGE_KEY, JSON.stringify(store)); } catch (e) {}
}
function uuid() {
if (crypto && crypto.randomUUID) return crypto.randomUUID();
return 'id-' + Date.now() + '-' + Math.random().toString(36).slice(2, 10);
}
function newInterview(type) {
return {
id: uuid(),
type: type || 'technical',
candidate: '', role: '', date: '', interviewer: '',
createdAt: Date.now(), updatedAt: Date.now(),
answers: {}, currentIndex: 0,
started: false, finished: false,
impression: '', globalNotes: ''
};
}