-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1548 lines (1452 loc) · 80.2 KB
/
Copy pathindex.html
File metadata and controls
1548 lines (1452 loc) · 80.2 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.0"/>
<meta name="description" content="The definitive guide to prompting AI for production-quality code. Stop vibe coding, start shipping."/>
<meta property="og:title" content="Vibe Coding Best Practices — AI Prompting for Production Code"/>
<meta property="og:description" content="30+ proven prompt patterns, anti-patterns, and templates for writing production-quality code with AI."/>
<title>Vibe Coding Best Practices — Ship Production Code with AI</title>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Cabinet+Grotesk:wght@400;500;700;800;900&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400&display=swap" rel="stylesheet"/>
<style>
/* ═══════════════════════════════════════════════
DESIGN SYSTEM
═══════════════════════════════════════════════ */
:root {
--bg: #0a0f0d;
--bg2: #0d1410;
--bg3: #111a14;
--surface: #141f17;
--card: #172018;
--border: rgba(134,239,172,.08);
--border2: rgba(134,239,172,.14);
--green: #86efac;
--green2: #4ade80;
--green3: #22c55e;
--lime: #d9f99d;
--amber: #fcd34d;
--red: #fca5a5;
--blue: #93c5fd;
--text: #e8f0e9;
--muted: rgba(232,240,233,.5);
--dim: rgba(232,240,233,.25);
--ink: rgba(232,240,233,.08);
--F: 'Cabinet Grotesk', sans-serif;
--S: 'Fraunces', serif;
--M: 'IBM Plex Mono', monospace;
--ease: cubic-bezier(0.76, 0, 0.24, 1);
--ease2: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
background: var(--bg);
color: var(--text);
font-family: var(--F);
line-height: 1.6;
overflow-x: hidden;
cursor: none;
}
::selection { background: rgba(134,239,172,.25); color: var(--green); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green3); border-radius: 2px; }
a { text-decoration: none; color: inherit; }
/* ── Cursor ── */
#cur {
position: fixed; z-index: 9999; pointer-events: none;
width: 6px; height: 6px; border-radius: 50%;
background: var(--green);
transform: translate(-50%,-50%);
box-shadow: 0 0 8px var(--green);
transition: transform .1s, background .2s;
mix-blend-mode: screen;
}
#curR {
position: fixed; z-index: 9998; pointer-events: none;
width: 28px; height: 28px; border-radius: 50%;
border: 1px solid rgba(134,239,172,.4);
transform: translate(-50%,-50%);
transition: left .09s var(--ease2), top .09s var(--ease2), width .3s, height .3s;
}
body.ch #cur { background: var(--lime); box-shadow: 0 0 12px var(--lime); }
body.ch #curR { width: 44px; height: 44px; border-color: rgba(217,249,157,.6); }
/* ── Noise ── */
#noise {
position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .02;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
animation: noiseA .5s steps(1) infinite;
}
@keyframes noiseA {
0%{transform:translate(0,0)}25%{transform:translate(-2%,-2%)}
50%{transform:translate(2%,1%)}75%{transform:translate(-1%,2%)}
}
/* ── NAV ── */
#nav {
position: fixed; top: 0; left: 0; right: 0; z-index: 600;
display: flex; align-items: center; justify-content: space-between;
padding: 1.2rem 4vw;
background: rgba(10,15,13,.9);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
transition: transform .5s var(--ease);
}
#nav.hide { transform: translateY(-100%); }
.nav-logo {
display: flex; align-items: center; gap: .7rem;
font-family: var(--M); font-size: .72rem; font-weight: 600;
letter-spacing: .04em; color: var(--text);
}
.logo-badge {
background: var(--green3); color: var(--bg);
font-size: .45rem; letter-spacing: .2em; text-transform: uppercase;
padding: .15rem .5rem; font-weight: 600;
}
.nav-links { display: flex; gap: 2rem; }
.nav-lnk {
font-family: var(--M); font-size: .58rem; letter-spacing: .1em;
color: var(--dim); cursor: none; transition: color .25s;
position: relative;
}
.nav-lnk::after {
content: ''; position: absolute; bottom: -2px; left: 0;
width: 0; height: 1px; background: var(--green);
transition: width .35s var(--ease);
}
.nav-lnk:hover { color: var(--green); }
.nav-lnk:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }
.nav-star {
font-family: var(--M); font-size: .58rem; letter-spacing: .1em;
color: var(--amber); border: 1px solid rgba(252,211,77,.25);
padding: .4rem .9rem; cursor: none;
transition: background .25s, border-color .25s;
display: flex; align-items: center; gap: .4rem;
}
.nav-star:hover { background: rgba(252,211,77,.08); border-color: rgba(252,211,77,.5); }
.nav-progress {
position: absolute; bottom: 0; left: 0;
height: 1px; width: 0; background: var(--green3);
box-shadow: 0 0 6px var(--green3);
transition: width .1s linear;
}
/* ── HERO ── */
#hero {
min-height: 100vh; display: flex; flex-direction: column;
justify-content: center; padding: 14vh 4vw 10vh;
position: relative; overflow: hidden;
}
.hero-bg-grid {
position: absolute; inset: 0; z-index: 0;
background-image:
linear-gradient(rgba(134,239,172,.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(134,239,172,.04) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
}
.hero-glow {
position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
width: 800px; height: 500px;
background: radial-gradient(ellipse at 50% 0%, rgba(34,197,94,.12) 0%, transparent 65%);
pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 1100px; }
.hero-kicker {
display: flex; align-items: center; gap: 1rem;
margin-bottom: 2rem;
animation: fadeUp .8s var(--ease) .2s both;
}
.kicker-tag {
font-family: var(--M); font-size: .58rem; letter-spacing: .3em;
text-transform: uppercase; color: var(--green);
border: 1px solid rgba(134,239,172,.3); padding: .3rem .8rem;
}
.kicker-meta {
font-family: var(--M); font-size: .58rem; letter-spacing: .1em; color: var(--dim);
}
.kicker-dot { color: var(--green); animation: dotBlink 1.5s step-end infinite; }
@keyframes dotBlink { 0%,100%{opacity:1}50%{opacity:0} }
.hero-title {
font-family: var(--F); font-weight: 900;
font-size: clamp(3rem, 7.5vw, 8.5rem);
line-height: .92; letter-spacing: -.03em; color: var(--text);
margin-bottom: 1.5rem;
animation: fadeUp .9s var(--ease) .35s both;
}
.hero-title .accent {
font-family: var(--S); font-weight: 300; font-style: italic;
color: var(--green); letter-spacing: -.02em;
}
.hero-title .strike {
position: relative; color: var(--dim);
}
.hero-title .strike::after {
content: ''; position: absolute; top: 50%; left: -2% ; right: -2%;
height: 3px; background: var(--red); transform: rotate(-1.5deg);
}
.hero-sub {
font-family: var(--S); font-style: italic; font-weight: 300;
font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.7;
color: var(--muted); max-width: 58ch; margin-bottom: 3rem;
animation: fadeUp .8s var(--ease) .5s both;
}
.hero-sub strong { font-style: normal; font-weight: 400; color: var(--text); }
.hero-ctas {
display: flex; gap: 1rem; flex-wrap: wrap;
animation: fadeUp .8s var(--ease) .65s both;
}
.cta-primary {
font-family: var(--M); font-size: .65rem; letter-spacing: .18em;
text-transform: uppercase; color: var(--bg);
background: var(--green); padding: .85rem 1.8rem; cursor: none;
border: 1px solid var(--green);
transition: background .25s, box-shadow .25s;
display: flex; align-items: center; gap: .5rem;
}
.cta-primary:hover { background: var(--green2); box-shadow: 0 0 30px rgba(134,239,172,.3); }
.cta-secondary {
font-family: var(--M); font-size: .65rem; letter-spacing: .18em;
text-transform: uppercase; color: var(--muted);
border: 1px solid var(--border2); padding: .85rem 1.8rem; cursor: none;
transition: color .25s, border-color .25s;
}
.cta-secondary:hover { color: var(--text); border-color: rgba(232,240,233,.3); }
/* Hero stats */
.hero-stats {
display: flex; gap: 3rem; margin-top: 5rem; padding-top: 3rem;
border-top: 1px solid var(--border);
animation: fadeUp .8s var(--ease) .8s both;
flex-wrap: wrap;
}
.hstat-num {
font-family: var(--F); font-size: 2rem; font-weight: 900;
letter-spacing: -.03em; color: var(--green);
}
.hstat-label { font-family: var(--M); font-size: .52rem; letter-spacing: .2em; color: var(--dim); margin-top: .2rem; }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
/* ── MARQUEE ── */
.marquee-strip {
border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
overflow: hidden; background: var(--bg2); padding: .9rem 0;
}
.marquee-track {
display: flex; white-space: nowrap;
animation: marqueeRoll 30s linear infinite;
font-family: var(--M); font-size: .58rem; letter-spacing: .18em;
}
.marquee-item { padding: 0 3rem; color: var(--dim); text-transform: uppercase; }
.marquee-item span { color: var(--green); }
@keyframes marqueeRoll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
/* ═══════════════════════════════════════════════
SHARED SECTION STYLES
═══════════════════════════════════════════════ */
section { padding: 10vh 4vw; border-top: 1px solid var(--border); position: relative; }
.sec-label {
font-family: var(--M); font-size: .56rem; letter-spacing: .4em;
text-transform: uppercase; color: var(--green);
display: flex; align-items: center; gap: .7rem; margin-bottom: 1.5rem;
}
.sec-label::before { content: ''; width: 20px; height: 1px; background: var(--green); }
.sec-num { color: var(--dim); }
.sec-title {
font-family: var(--F); font-weight: 900;
font-size: clamp(1.8rem, 4vw, 4rem);
letter-spacing: -.025em; line-height: 1; color: var(--text);
margin-bottom: .8rem;
}
.sec-title em { font-family: var(--S); font-weight: 300; font-style: italic; color: var(--green); }
.sec-sub {
font-family: var(--S); font-style: italic; font-weight: 300;
font-size: 1.05rem; color: var(--muted); line-height: 1.8;
max-width: 55ch; margin-bottom: 4vh;
}
/* ── REVEAL ── */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-l { opacity: 0; transform: translateX(-24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv-l.in { opacity: 1; transform: none; }
.rv-r { opacity: 0; transform: translateX(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv-r.in { opacity: 1; transform: none; }
/* ═══════════════════════════════════════════════
SECTION 1 — THE PROBLEM
═══════════════════════════════════════════════ */
#problem { background: var(--bg); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: start; margin-top: 4vh; }
.bad-code-block {
background: #0d0600; border: 1px solid rgba(252,165,165,.15);
border-left: 3px solid var(--red); padding: 1.5rem;
position: relative;
}
.bad-code-block::before {
content: '✗ VIBE CODING'; position: absolute; top: -1px; left: -1px;
font-family: var(--M); font-size: .46rem; letter-spacing: .25em;
background: var(--red); color: var(--bg); padding: .2rem .6rem;
}
.good-code-block {
background: #04110a; border: 1px solid rgba(134,239,172,.15);
border-left: 3px solid var(--green); padding: 1.5rem;
position: relative;
}
.good-code-block::before {
content: '✓ PRODUCTION PROMPT'; position: absolute; top: -1px; left: -1px;
font-family: var(--M); font-size: .46rem; letter-spacing: .25em;
background: var(--green); color: var(--bg); padding: .2rem .6rem;
}
pre.code-demo {
font-family: var(--M); font-size: .68rem; line-height: 1.7;
color: #7a9080; white-space: pre-wrap; word-break: break-word;
}
pre.code-demo .kw { color: #86efac; }
pre.code-demo .str { color: #fbbf24; }
pre.code-demo .cm { color: #4a6050; font-style: italic; }
pre.code-demo .hl { color: #e2e8f0; }
pre.code-demo .err { color: #fca5a5; }
/* Pain points */
.pain-list { display: flex; flex-direction: column; gap: 0; }
.pain-item {
display: flex; gap: 1.2rem; padding: 1.2rem 0;
border-bottom: 1px solid var(--border);
cursor: none; transition: padding-left .3s var(--ease);
}
.pain-item:hover { padding-left: .5rem; }
.pain-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.pain-title { font-family: var(--F); font-size: .9rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .3rem; }
.pain-desc { font-family: var(--S); font-style: italic; font-weight: 300; font-size: .88rem; color: var(--muted); line-height: 1.7; }
/* ═══════════════════════════════════════════════
SECTION 2 — CORE PRINCIPLES
═══════════════════════════════════════════════ */
#principles { background: var(--bg2); }
.principles-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 4vh; }
.principle-card {
background: var(--card); padding: 2rem 1.8rem;
position: relative; overflow: hidden; cursor: none;
transition: background .35s;
}
.principle-card:hover { background: #1c2a1f; }
.principle-card::before {
content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
background: var(--green); transform: scaleX(0); transform-origin: left;
transition: transform .5s var(--ease);
}
.principle-card:hover::before { transform: scaleX(1); }
.pc-num { font-family: var(--M); font-size: .55rem; letter-spacing: .25em; color: var(--green); opacity: .6; margin-bottom: 1rem; }
.pc-icon { font-size: 1.4rem; margin-bottom: .8rem; display: block; }
.pc-title { font-family: var(--F); font-size: 1rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .6rem; }
.pc-desc { font-family: var(--S); font-style: italic; font-weight: 300; font-size: .88rem; color: var(--muted); line-height: 1.7; }
.pc-example {
margin-top: 1rem; background: rgba(134,239,172,.04);
border: 1px solid rgba(134,239,172,.1); padding: .8rem;
font-family: var(--M); font-size: .6rem; letter-spacing: .04em;
color: var(--green); line-height: 1.6;
}
.pc-example::before { content: '// Example'; display: block; color: var(--dim); margin-bottom: .3rem; font-style: italic; }
/* ═══════════════════════════════════════════════
SECTION 3 — PROMPT TEMPLATES
═══════════════════════════════════════════════ */
#templates { background: var(--bg); }
.template-filters { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 3vh; overflow-x: auto; }
.tf-btn {
font-family: var(--M); font-size: .56rem; letter-spacing: .18em;
text-transform: uppercase; padding: .7rem 1.4rem; cursor: none;
color: var(--dim); background: transparent; border: none;
border-bottom: 2px solid transparent; margin-bottom: -1px;
white-space: nowrap; transition: color .25s, border-color .25s;
}
.tf-btn.active { color: var(--green); border-bottom-color: var(--green); }
.tf-btn:hover:not(.active) { color: var(--muted); }
.templates-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.template-card {
background: var(--card); border: 1px solid var(--border);
position: relative; overflow: hidden; cursor: none;
transition: border-color .35s;
display: none;
}
.template-card.visible { display: flex; flex-direction: column; }
.template-card:hover { border-color: var(--border2); }
.tc-header { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tc-title { font-family: var(--F); font-size: .88rem; font-weight: 800; letter-spacing: -.01em; }
.tc-badge {
font-family: var(--M); font-size: .44rem; letter-spacing: .2em;
text-transform: uppercase; padding: .25rem .6rem; border-radius: 100px;
white-space: nowrap; flex-shrink: 0;
}
.badge-arch { background: rgba(147,197,253,.1); color: var(--blue); border: 1px solid rgba(147,197,253,.2); }
.badge-debug { background: rgba(252,165,165,.1); color: var(--red); border: 1px solid rgba(252,165,165,.2); }
.badge-review { background: rgba(252,211,77,.1); color: var(--amber);border: 1px solid rgba(252,211,77,.2); }
.badge-feature { background: rgba(134,239,172,.1); color: var(--green);border: 1px solid rgba(134,239,172,.2); }
.badge-refactor{ background: rgba(217,249,157,.1); color: var(--lime); border: 1px solid rgba(217,249,157,.2); }
.badge-test { background: rgba(196,181,253,.1); color: #c4b5fd; border: 1px solid rgba(196,181,253,.2); }
.tc-prompt {
padding: 1.2rem 1.5rem; flex: 1;
font-family: var(--M); font-size: .64rem; line-height: 1.75;
color: #8aab90; white-space: pre-wrap; background: #060e08;
}
.tc-prompt .var { color: var(--green); }
.tc-prompt .note { color: var(--dim); font-style: italic; }
.tc-prompt .key { color: var(--lime); }
.tc-prompt .val { color: var(--amber); }
.tc-footer { padding: .8rem 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.tc-why { font-family: var(--S); font-size: .78rem; font-style: italic; color: var(--dim); }
.copy-prompt-btn {
font-family: var(--M); font-size: .52rem; letter-spacing: .18em;
text-transform: uppercase; padding: .4rem .9rem;
border: 1px solid var(--border2); color: var(--muted);
background: transparent; cursor: none;
transition: all .25s; display: flex; align-items: center; gap: .4rem;
}
.copy-prompt-btn:hover { background: var(--green); border-color: var(--green); color: var(--bg); }
.copy-prompt-btn.done { background: var(--green3); border-color: var(--green3); color: var(--bg); }
/* ═══════════════════════════════════════════════
SECTION 4 — ANTI-PATTERNS
═══════════════════════════════════════════════ */
#antipatterns { background: var(--bg2); }
.ap-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 4vh; }
.ap-card {
background: var(--card); padding: 1.8rem 2rem; position: relative; overflow: hidden;
cursor: none; transition: background .35s;
}
.ap-card:hover { background: #1c2014; }
.ap-label {
font-family: var(--M); font-size: .5rem; letter-spacing: .25em; text-transform: uppercase;
padding: .2rem .6rem; border-radius: 100px; width: fit-content; margin-bottom: 1rem;
border: 1px solid rgba(252,165,165,.2); color: var(--red); background: rgba(252,165,165,.06);
}
.ap-title { font-family: var(--F); font-size: .95rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .6rem; }
.bad-prompt { font-family: var(--M); font-size: .62rem; line-height: 1.6; color: rgba(252,165,165,.7); background: rgba(252,165,165,.04); border: 1px solid rgba(252,165,165,.1); padding: .7rem .9rem; margin-bottom: .8rem; }
.fix-label { font-family: var(--M); font-size: .48rem; letter-spacing: .25em; text-transform: uppercase; color: var(--green); margin-bottom: .4rem; }
.fix-desc { font-family: var(--S); font-style: italic; font-weight: 300; font-size: .88rem; color: var(--muted); line-height: 1.7; }
/* ═══════════════════════════════════════════════
SECTION 5 — THE CHECKLIST
═══════════════════════════════════════════════ */
#checklist { background: var(--bg); }
.checklist-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 5vw; align-items: start; margin-top: 4vh; }
.checklist-group { margin-bottom: 2rem; }
.cg-title {
font-family: var(--F); font-size: .8rem; font-weight: 800; letter-spacing: .02em;
border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin-bottom: 0;
display: flex; align-items: center; gap: .6rem;
}
.cg-icon { font-size: .9rem; }
.check-items { display: flex; flex-direction: column; gap: 0; }
.check-item {
display: flex; gap: .9rem; padding: .7rem 0;
border-bottom: 1px solid var(--border);
cursor: none; transition: background .2s;
padding-left: .3rem;
}
.check-item:hover { background: rgba(134,239,172,.02); }
.check-box {
width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem;
border: 1px solid var(--border2); cursor: none;
display: flex; align-items: center; justify-content: center;
transition: all .25s; position: relative;
}
.check-box.checked { background: var(--green3); border-color: var(--green3); }
.check-box.checked::after { content: '✓'; font-size: .6rem; color: var(--bg); font-weight: 700; }
.check-text { font-family: var(--M); font-size: .62rem; line-height: 1.6; letter-spacing: .04em; color: var(--muted); }
.check-item.checked-item .check-text { color: var(--dim); text-decoration: line-through; }
/* Progress */
.checklist-progress { margin-top: 1.5rem; padding: 1.5rem; background: var(--card); border: 1px solid var(--border); }
.cp-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.cp-label { font-family: var(--M); font-size: .55rem; letter-spacing: .2em; color: var(--muted); }
.cp-count { font-family: var(--F); font-size: 1.6rem; font-weight: 900; color: var(--green); }
.cp-track { height: 4px; background: rgba(255,255,255,.06); border-radius: 100px; overflow: hidden; }
.cp-fill { height: 100%; background: var(--green3); border-radius: 100px; transition: width .5s var(--ease); box-shadow: 0 0 8px rgba(34,197,94,.4); }
/* Score ring */
.score-ring-wrap { text-align: center; padding: 2rem; background: var(--card); border: 1px solid var(--border); margin-top: 1rem; }
.score-ring-label { font-family: var(--M); font-size: .52rem; letter-spacing: .25em; text-transform: uppercase; color: var(--dim); margin-bottom: 1.2rem; }
.score-ring-num { font-family: var(--F); font-size: 3.5rem; font-weight: 900; color: var(--green); line-height: 1; }
.score-ring-sub { font-family: var(--M); font-size: .52rem; letter-spacing: .2em; color: var(--dim); margin-top: .3rem; }
.score-message { margin-top: 1.2rem; font-family: var(--S); font-style: italic; font-size: .85rem; color: var(--muted); line-height: 1.6; }
/* ═══════════════════════════════════════════════
SECTION 6 — WORKFLOW
═══════════════════════════════════════════════ */
#workflow { background: var(--bg2); }
.workflow-steps { display: flex; flex-direction: column; gap: 0; margin-top: 4vh; }
.ws-item {
display: grid; grid-template-columns: 80px 1fr;
gap: 0; border-bottom: 1px solid var(--border);
cursor: none; transition: background .3s;
}
.ws-item:hover { background: rgba(134,239,172,.02); }
.ws-num-wrap {
padding: 2rem 0; display: flex; flex-direction: column;
align-items: center; gap: .5rem; border-right: 1px solid var(--border);
}
.ws-num { font-family: var(--F); font-size: 2.5rem; font-weight: 900; letter-spacing: -.03em; color: rgba(134,239,172,.15); }
.ws-connector { flex: 1; width: 1px; background: var(--border); }
.ws-item:last-child .ws-connector { display: none; }
.ws-content { padding: 2rem 2.5rem; }
.ws-phase { font-family: var(--M); font-size: .52rem; letter-spacing: .3em; text-transform: uppercase; color: var(--green); margin-bottom: .6rem; }
.ws-title { font-family: var(--F); font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .5rem; }
.ws-desc { font-family: var(--S); font-style: italic; font-weight: 300; font-size: .92rem; color: var(--muted); line-height: 1.75; margin-bottom: 1rem; }
.ws-prompt { background: #060e08; border: 1px solid rgba(134,239,172,.1); padding: .9rem 1.1rem; font-family: var(--M); font-size: .62rem; line-height: 1.65; color: #7a9c80; }
.ws-prompt .wsp-label { font-size: .48rem; letter-spacing: .3em; text-transform: uppercase; color: var(--green); display: block; margin-bottom: .4rem; opacity: .7; }
/* ═══════════════════════════════════════════════
SECTION 7 — QUICK REFERENCE TABLE
═══════════════════════════════════════════════ */
#reference { background: var(--bg); }
.ref-table { width: 100%; border-collapse: collapse; margin-top: 4vh; }
.ref-table th {
font-family: var(--M); font-size: .52rem; letter-spacing: .25em;
text-transform: uppercase; color: var(--dim); text-align: left;
padding: .8rem 1rem; border-bottom: 2px solid var(--border2);
background: var(--bg2);
}
.ref-table td {
font-family: var(--M); font-size: .62rem; letter-spacing: .04em;
padding: .9rem 1rem; border-bottom: 1px solid var(--border);
vertical-align: top; line-height: 1.6;
}
.ref-table tr { cursor: none; transition: background .2s; }
.ref-table tr:hover td { background: rgba(134,239,172,.02); }
.td-task { font-weight: 500; color: var(--text); }
.td-keyword { color: var(--green); }
.td-avoid { color: var(--red); }
.td-level { }
.level-badge {
font-size: .46rem; letter-spacing: .15em; text-transform: uppercase;
padding: .18rem .5rem; border-radius: 100px;
}
.lvl-e { background: rgba(134,239,172,.1); color: var(--green); border: 1px solid rgba(134,239,172,.2); }
.lvl-m { background: rgba(252,211,77,.1); color: var(--amber); border: 1px solid rgba(252,211,77,.2); }
.lvl-a { background: rgba(252,165,165,.1); color: var(--red); border: 1px solid rgba(252,165,165,.2); }
/* ═══════════════════════════════════════════════
SECTION 8 — RESOURCES / CTA
═══════════════════════════════════════════════ */
#cta {
background: var(--bg2); text-align: center;
padding: 14vh 4vw; position: relative; overflow: hidden;
}
.cta-glow {
position: absolute; top: 0; left: 50%; transform: translateX(-50%);
width: 600px; height: 400px;
background: radial-gradient(ellipse at 50% 0%, rgba(34,197,94,.1) 0%, transparent 65%);
pointer-events: none;
}
.cta-title { font-family: var(--F); font-size: clamp(2.5rem,6vw,7rem); font-weight: 900; letter-spacing: -.03em; line-height: .9; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.cta-title em { font-family: var(--S); font-weight: 300; font-style: italic; color: var(--green); }
.cta-sub { font-family: var(--S); font-style: italic; font-size: 1.1rem; color: var(--muted); max-width: 46ch; margin: 0 auto 2.5rem; line-height: 1.75; position: relative; z-index: 1; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
/* ── Footer ── */
footer {
border-top: 1px solid var(--border); padding: 3vh 4vw;
display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
background: var(--bg);
}
.f-logo { font-family: var(--M); font-size: .7rem; font-weight: 600; color: var(--green); letter-spacing: .06em; }
.f-copy { font-family: var(--M); font-size: .52rem; letter-spacing: .15em; color: var(--dim); }
.f-links { display: flex; gap: 1.5rem; }
.f-lnk { font-family: var(--M); font-size: .52rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); cursor: none; transition: color .25s; }
.f-lnk:hover { color: var(--green); }
/* ── Toast ── */
#toast {
position: fixed; bottom: 3.5vh; right: 3.5vw; z-index: 9990;
background: var(--card); border: 1px solid var(--border2);
border-left: 3px solid var(--green);
padding: .85rem 1.6rem; opacity: 0; transform: translateX(12px);
transition: opacity .35s var(--ease), transform .35s var(--ease);
font-family: var(--M); font-size: .58rem; letter-spacing: .12em; color: var(--green);
pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }
@media(max-width:900px) {
.problem-grid,.principles-grid { grid-template-columns: 1fr; }
.templates-grid,.ap-grid,.checklist-layout { grid-template-columns: 1fr; }
.nav-links { display: none; }
.hero-stats { gap: 1.5rem; }
.ws-item { grid-template-columns: 50px 1fr; }
}
</style>
</head>
<body>
<div id="noise"></div>
<div id="cur"></div>
<div id="curR"></div>
<div id="toast"></div>
<!-- NAV -->
<nav id="nav">
<div class="nav-logo">
<span class="logo-badge">v2.0</span>
vibecoding.guide
</div>
<div class="nav-links">
<a href="#problem" class="nav-lnk">Problem</a>
<a href="#principles" class="nav-lnk">Principles</a>
<a href="#templates" class="nav-lnk">Templates</a>
<a href="#antipatterns" class="nav-lnk">Anti-Patterns</a>
<a href="#checklist" class="nav-lnk">Checklist</a>
<a href="#workflow" class="nav-lnk">Workflow</a>
</div>
<div class="nav-right">
<a href="https://github.com" class="nav-star" onclick="showToast('⭐ Thanks for the star!');return false">⭐ Star on GitHub</a>
</div>
<div class="nav-progress" id="navProg"></div>
</nav>
<!-- HERO -->
<section id="hero">
<div class="hero-bg-grid"></div>
<div class="hero-glow"></div>
<div class="hero-inner">
<div class="hero-kicker">
<div class="kicker-tag">Open Source Guide</div>
<div class="kicker-meta">Updated 2026 <span class="kicker-dot">●</span> 30+ Prompt Templates <span class="kicker-dot">●</span> Free Forever</div>
</div>
<h1 class="hero-title">
Stop <span class="strike">Vibe Coding.</span><br/>
Start Shipping<br/>
<span class="accent">Production Code.</span>
</h1>
<p class="hero-sub">
Most developers use AI like a <strong>magic 8-ball</strong> and wonder why their codebase looks like spaghetti. This guide shows you how to prompt AI models to produce code that is secure, tested, scalable, and ready for production — not just code that works on your machine.
</p>
<div class="hero-ctas">
<a href="#principles" class="cta-primary">→ Read the Guide</a>
<a href="#templates" class="cta-secondary">↗ Jump to Templates</a>
<a href="#checklist" class="cta-secondary">✓ Pre-Ship Checklist</a>
</div>
<div class="hero-stats">
<div>
<div class="hstat-num">30+</div>
<div class="hstat-label">Prompt Templates</div>
</div>
<div>
<div class="hstat-num">8</div>
<div class="hstat-label">Core Principles</div>
</div>
<div>
<div class="hstat-num">25</div>
<div class="hstat-label">Anti-Patterns</div>
</div>
<div>
<div class="hstat-num">42</div>
<div class="hstat-label">Checklist Items</div>
</div>
</div>
</div>
</section>
<!-- MARQUEE -->
<div class="marquee-strip">
<div class="marquee-track">
<span class="marquee-item">Context is <span>Everything</span></span>
<span class="marquee-item">Specificity beats Brevity <span>✦</span></span>
<span class="marquee-item">Always ask for <span>Tests</span></span>
<span class="marquee-item">Error handling is not <span>Optional</span></span>
<span class="marquee-item">Iterate, don't <span>Regenerate</span></span>
<span class="marquee-item">Review before you <span>Ship</span></span>
<span class="marquee-item">Security is a <span>First-Class Concern</span></span>
<!-- dup -->
<span class="marquee-item">Context is <span>Everything</span></span>
<span class="marquee-item">Specificity beats Brevity <span>✦</span></span>
<span class="marquee-item">Always ask for <span>Tests</span></span>
<span class="marquee-item">Error handling is not <span>Optional</span></span>
<span class="marquee-item">Iterate, don't <span>Regenerate</span></span>
<span class="marquee-item">Review before you <span>Ship</span></span>
<span class="marquee-item">Security is a <span>First-Class Concern</span></span>
</div>
</div>
<!-- SECTION 1: THE PROBLEM -->
<section id="problem">
<div class="sec-label rv"><span class="sec-num">01 /</span> Why Vibe Coding Fails</div>
<h2 class="sec-title rv" style="transition-delay:.06s">The gap between <em>working</em><br/>and <em>production-ready.</em></h2>
<p class="sec-sub rv" style="transition-delay:.1s">AI can write code that passes a demo in 30 seconds. It cannot read your mind about error handling, security requirements, performance budgets, or team conventions — unless you tell it.</p>
<div class="problem-grid">
<div class="rv">
<div class="bad-code-block" style="margin-bottom:1.5rem">
<pre class="code-demo"><span class="err">// Prompt:</span>
<span class="hl">"make a login function"</span>
<span class="err">// What you get:</span>
<span class="kw">async</span> <span class="kw">function</span> login(user, pass) {
<span class="kw">const</span> found = users.find(
u => u.email === user
&& u.password === pass
);
<span class="kw">return</span> found ? <span class="str">'ok'</span> : <span class="str">'fail'</span>;
}
<span class="err">// ✗ Plain text passwords
// ✗ No rate limiting
// ✗ No error types
// ✗ No JWT / session
// ✗ No input validation</span></pre>
</div>
<div class="good-code-block">
<pre class="code-demo"><span class="kw">// Prompt: (see templates →)</span>
<span class="kw">async</span> <span class="kw">function</span> login(
email: string, password: string,
ip: string
): Promise<AuthResult> {
<span class="cm">// Rate limit by IP + email</span>
<span class="kw">await</span> checkRateLimit(ip, email);
<span class="kw">const</span> user = <span class="kw">await</span> db.users
.findByEmail(email);
<span class="kw">if</span> (!user) <span class="kw">throw</span> <span class="kw">new</span> AuthError(
<span class="str">'INVALID_CREDENTIALS'</span>);
<span class="kw">await</span> bcrypt.compare(
password, user.passwordHash);
<span class="kw">return</span> issueJWT(user);
}
<span class="kw">// ✓ Bcrypt hashing
// ✓ Rate limiting
// ✓ Typed errors
// ✓ JWT sessions
// ✓ No info leakage</span></pre>
</div>
</div>
<div class="rv-r">
<div class="pain-list">
<div class="pain-item">
<div class="pain-icon">🔓</div>
<div>
<div class="pain-title">Security holes you won't spot until breach</div>
<div class="pain-desc">AI defaults to the simplest implementation. Without explicit security requirements, you get plain-text passwords, missing CSRF tokens, unvalidated inputs, and SQL injection vectors. Every single time.</div>
</div>
</div>
<div class="pain-item">
<div class="pain-icon">🔥</div>
<div>
<div class="pain-title">Code that fails at scale</div>
<div class="pain-desc">Functions that work for 10 users silently fail at 10,000. AI doesn't know your expected load, your database indices, or your infrastructure constraints unless you provide them explicitly.</div>
</div>
</div>
<div class="pain-item">
<div class="pain-icon">🧟</div>
<div>
<div class="pain-title">Untestable spaghetti architecture</div>
<div class="pain-desc">Vibe coding produces tightly-coupled, side-effectful functions with no clear contracts. You get working code today and an unmaintainable mess in three months.</div>
</div>
</div>
<div class="pain-item">
<div class="pain-icon">❓</div>
<div>
<div class="pain-title">No error handling, no observability</div>
<div class="pain-desc">Production systems fail. AI-generated code defaults to swallowed errors, console.logs, and optimistic assumptions. You find out something broke when a user emails you.</div>
</div>
</div>
<div class="pain-item">
<div class="pain-icon">🌀</div>
<div>
<div class="pain-title">The regeneration doom loop</div>
<div class="pain-desc">"This doesn't look right, regenerate." × 8 cycles. Without a structured approach, you're burning tokens and time on random walks through the solution space.</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- SECTION 2: PRINCIPLES -->
<section id="principles">
<div class="sec-label rv"><span class="sec-num">02 /</span> Core Principles</div>
<h2 class="sec-title rv" style="transition-delay:.06s">Eight rules that separate<br/><em>craft from chaos.</em></h2>
<p class="sec-sub rv" style="transition-delay:.1s">Before reaching for a template, internalize these principles. They apply to every single prompt you write — regardless of model, task, or language.</p>
<div class="principles-grid rv" style="transition-delay:.12s">
<div class="principle-card">
<div class="pc-num">01</div>
<span class="pc-icon">📐</span>
<div class="pc-title">Lead with Context, Not Command</div>
<p class="pc-desc">Tell the AI what the system does, who uses it, what constraints exist, and what already exists — before saying what you want. Context shapes every decision.</p>
<div class="pc-example">You are working on a B2B SaaS app with 50K users. The tech stack is Next.js 14 + Postgres + Prisma. We use zod for validation and never expose raw DB errors to clients.</div>
</div>
<div class="principle-card">
<div class="pc-num">02</div>
<span class="pc-icon">🎯</span>
<div class="pc-title">Specify Non-Functional Requirements</div>
<p class="pc-desc">Performance budget, error handling strategy, logging approach, security posture, accessibility level — AI treats these as optional unless you make them mandatory.</p>
<div class="pc-example">Requirements: p99 <200ms, full error type hierarchy, structured logging (pino), input sanitised via zod, WCAG AA compliant output.</div>
</div>
<div class="principle-card">
<div class="pc-num">03</div>
<span class="pc-icon">🧪</span>
<div class="pc-title">Always Request Tests First</div>
<p class="pc-desc">Ask for tests before the implementation. Tests force the AI to define the contract, handle edge cases, and produce testable code. "Write tests first, then implementation."</p>
<div class="pc-example">Write unit tests for the happy path, error cases, and edge cases first. Then write the implementation that passes those tests.</div>
</div>
<div class="principle-card">
<div class="pc-num">04</div>
<span class="pc-icon">🔍</span>
<div class="pc-title">Ask for Alternatives, Not Just Solutions</div>
<p class="pc-desc">AI's first answer is its most pattern-matched. Ask for 3 approaches with trade-offs before committing. The second or third option is often better for your context.</p>
<div class="pc-example">Give me 3 different approaches to this problem with trade-offs for each. Consider time complexity, maintainability, and our existing codebase conventions.</div>
</div>
<div class="principle-card">
<div class="pc-num">05</div>
<span class="pc-icon">🏗️</span>
<div class="pc-title">Iterate on the Same Code</div>
<p class="pc-desc">Paste the code back. "Here's what you gave me. Now add: error handling, types, logging." Regenerating from scratch loses all the accumulated context and quality.</p>
<div class="pc-example">Here is the code you wrote: [paste]. Now add: (1) full TypeScript types, (2) structured error handling, (3) JSDoc comments for public methods.</div>
</div>
<div class="principle-card">
<div class="pc-num">06</div>
<span class="pc-icon">🛡️</span>
<div class="pc-title">Make Security Explicit</div>
<p class="pc-desc">AI will not add rate limiting, input validation, auth checks, or OWASP protections unless asked. Name the threats. "This endpoint must be protected against X, Y, Z."</p>
<div class="pc-example">This endpoint is public-facing. Protect against: SQL injection, XSS, CSRF, rate limiting (10 req/min per IP), and never expose internal error details.</div>
</div>
<div class="principle-card">
<div class="pc-num">07</div>
<span class="pc-icon">📦</span>
<div class="pc-title">Define the Contract First</div>
<p class="pc-desc">Ask the AI to write the interface, types, or API schema before the implementation. A clear contract prevents scope creep and produces better, more cohesive code.</p>
<div class="pc-example">First define the TypeScript interface and Zod schema. Don't write any implementation yet — just the types and the input/output contract.</div>
</div>
<div class="principle-card">
<div class="pc-num">08</div>
<span class="pc-icon">🔬</span>
<div class="pc-title">Ask for a Review Pass</div>
<p class="pc-desc">After generating code, ask the AI to review its own output for bugs, security issues, and performance problems. It will often catch what it missed the first time.</p>
<div class="pc-example">Now review the code you just wrote. Look for: potential bugs, security vulnerabilities, N+1 query problems, missing error cases, and anything you'd flag in a real code review.</div>
</div>
</div>
</section>
<!-- SECTION 3: TEMPLATES -->
<section id="templates">
<div class="sec-label rv"><span class="sec-num">03 /</span> Prompt Templates</div>
<h2 class="sec-title rv" style="transition-delay:.06s">Copy, adapt, <em>ship.</em></h2>
<p class="sec-sub rv" style="transition-delay:.1s">Fill in the <span style="color:var(--green);font-family:var(--M);font-size:.85em">[BRACKETS]</span> — the structure does the work. Every template is designed to produce production-quality output without extra back-and-forth.</p>
<div class="template-filters rv" style="transition-delay:.08s">
<button class="tf-btn active" onclick="filterTemplates('all',this)">All (12)</button>
<button class="tf-btn" onclick="filterTemplates('feature',this)">Feature</button>
<button class="tf-btn" onclick="filterTemplates('arch',this)">Architecture</button>
<button class="tf-btn" onclick="filterTemplates('debug',this)">Debug</button>
<button class="tf-btn" onclick="filterTemplates('review',this)">Review</button>
<button class="tf-btn" onclick="filterTemplates('refactor',this)">Refactor</button>
<button class="tf-btn" onclick="filterTemplates('test',this)">Tests</button>
</div>
<div class="templates-grid rv" style="transition-delay:.12s" id="templatesGrid">
</div>
</section>
<!-- SECTION 4: ANTI-PATTERNS -->
<section id="antipatterns">
<div class="sec-label rv"><span class="sec-num">04 /</span> Anti-Patterns</div>
<h2 class="sec-title rv" style="transition-delay:.06s">Prompts that <em>guarantee</em><br/>bad code.</h2>
<p class="sec-sub rv" style="transition-delay:.1s">These prompts appear in thousands of codebases right now. Recognise them. Fix them.</p>
<div class="ap-grid rv" style="transition-delay:.1s" id="apGrid"></div>
</section>
<!-- SECTION 5: CHECKLIST -->
<section id="checklist">
<div class="sec-label rv"><span class="sec-num">05 /</span> Pre-Ship Checklist</div>
<h2 class="sec-title rv" style="transition-delay:.06s">42 questions to ask<br/><em>before you merge.</em></h2>
<p class="sec-sub rv" style="transition-delay:.1s">Run every piece of AI-generated code through this checklist before it touches production. Your score is shown in real time.</p>
<div class="checklist-layout">
<div class="rv" id="checklistLeft"></div>
<div class="rv-r">
<div class="checklist-progress">
<div class="cp-row">
<div class="cp-label">Checklist Progress</div>
<div class="cp-count"><span id="checkCount">0</span><span style="font-size:1rem;color:var(--dim)">/42</span></div>
</div>
<div class="cp-track"><div class="cp-fill" id="checkFill" style="width:0%"></div></div>
</div>
<div class="score-ring-wrap">
<div class="score-ring-label">Readiness Score</div>
<div class="score-ring-num" id="scoreNum">0%</div>
<div class="score-ring-sub">PRODUCTION READINESS</div>
<div class="score-message" id="scoreMsg">Complete the checklist to see your score.</div>
</div>
<!-- Ask AI buttons -->
<div style="margin-top:1.5rem;display:flex;flex-direction:column;gap:.6rem">
<div style="font-family:var(--M);font-size:.52rem;letter-spacing:.25em;text-transform:uppercase;color:var(--dim);margin-bottom:.2rem">Quick AI Prompts</div>
<button class="copy-prompt-btn" style="width:100%;justify-content:flex-start" onclick="quickCopy('Review this code for security vulnerabilities: OWASP Top 10, injection attacks, authentication flaws, sensitive data exposure. List every issue found.')">🛡 Copy: Security Review Prompt</button>
<button class="copy-prompt-btn" style="width:100%;justify-content:flex-start" onclick="quickCopy('Review this code for performance issues: N+1 queries, missing indices, memory leaks, unnecessary re-renders, blocking operations. Suggest fixes for each.')">⚡ Copy: Performance Review Prompt</button>
<button class="copy-prompt-btn" style="width:100%;justify-content:flex-start" onclick="quickCopy('Write comprehensive tests for this code: unit tests for each function, integration tests for critical paths, edge cases, error conditions, and boundary values. Use [YOUR_TEST_FRAMEWORK].')">🧪 Copy: Test Generation Prompt</button>
<button class="copy-prompt-btn" style="width:100%;justify-content:flex-start" onclick="quickCopy('Review this code as a senior engineer would in a code review. Look for: readability issues, missing abstractions, violation of SOLID principles, potential bugs, missing documentation, and anything that would get a change request.')">👁 Copy: Code Review Prompt</button>
</div>
</div>
</div>
</section>
<!-- SECTION 6: WORKFLOW -->
<section id="workflow">
<div class="sec-label rv"><span class="sec-num">06 /</span> The Production Workflow</div>
<h2 class="sec-title rv" style="transition-delay:.06s">A repeatable process for<br/><em>every feature.</em></h2>
<p class="sec-sub rv" style="transition-delay:.1s">Use this six-step workflow on every meaningful feature. It takes longer than vibe coding. It takes far less time than debugging vibe code in production at 2am.</p>
<div class="workflow-steps rv" style="transition-delay:.1s" id="workflowSteps"></div>
</section>
<!-- SECTION 7: QUICK REFERENCE -->
<section id="reference">
<div class="sec-label rv"><span class="sec-num">07 /</span> Quick Reference</div>
<h2 class="sec-title rv" style="transition-delay:.06s">The right words for<br/><em>every situation.</em></h2>
<table class="ref-table rv" style="transition-delay:.1s">
<thead>
<tr>
<th>TASK</th>
<th>INCLUDE THESE KEYWORDS</th>
<th>NEVER USE</th>
<th>LEVEL</th>
</tr>
</thead>
<tbody id="refTableBody"></tbody>
</table>
</section>
<!-- CTA -->
<section id="cta">
<div class="cta-glow"></div>
<h2 class="cta-title rv">Ship code you're<br/><em>proud of.</em></h2>
<p class="cta-sub rv" style="transition-delay:.08s">This guide is maintained by the community. Every prompt template has been tested in real production codebases. If you have a pattern that works, open a PR.</p>
<div class="cta-btns rv" style="transition-delay:.16s">
<a href="https://github.com/macchant" class="cta-primary" onclick="showToast('⭐ Thank you! my GitHub link.');return false">⭐ Star on GitHub</a>
<a href="#" class="cta-secondary" onclick="showToast('📋 Full PDF guide copied to clipboard (demo)');return false">↓ Download PDF Guide</a>
<a href="#templates" class="cta-secondary">→ Back to Templates</a>
</div>
</section>
<footer>
<div class="f-logo">◆ vibecoding.guide</div>
<div class="f-copy">Open source. MIT License. Maintained by the community.</div>
<div class="f-links">
<a href="https://github.com/macchant/" class="f-lnk" onclick="showToast('GitHub repository');return false">GitHub</a>
<a href="#" class="f-lnk" onclick="showToast('Twitter / X');return false">Twitter</a>
<a href="#" class="f-lnk" onclick="showToast('Discord community');return false">Discord</a>
</div>
</footer>
<script>
/* ════ CURSOR ════ */
const c1=document.getElementById('cur'),c2=document.getElementById('curR');
let mx=0,my=0,rx=0,ry=0;
document.addEventListener('mousemove',e=>{mx=e.clientX;my=e.clientY});
(function a(){c1.style.left=mx+'px';c1.style.top=my+'px';rx+=(mx-rx)*.12;ry+=(my-ry)*.12;c2.style.left=rx+'px';c2.style.top=ry+'px';requestAnimationFrame(a)})();
document.querySelectorAll('a,button,.check-item,.ws-item,.ap-card,.principle-card,.template-card,.pain-item').forEach(el=>{
el.addEventListener('mouseenter',()=>document.body.classList.add('ch'));
el.addEventListener('mouseleave',()=>document.body.classList.remove('ch'));
});
/* ════ NAV ════ */
const nav=document.getElementById('nav'),navProg=document.getElementById('navProg');
let lastY=0;
window.addEventListener('scroll',()=>{
const st=window.scrollY,dh=document.documentElement.scrollHeight-window.innerHeight;
navProg.style.width=(st/dh*100)+'%';
nav.classList.toggle('hide',st>lastY&&st>300);
lastY=st;
},{passive:true});
/* ════ SMOOTH SCROLL ════ */
document.querySelectorAll('a[href^="#"]').forEach(a=>{
a.addEventListener('click',e=>{const t=document.querySelector(a.getAttribute('href'));if(t){e.preventDefault();t.scrollIntoView({behavior:'smooth'})}});
});
/* ════ REVEAL ════ */
const rObs=new IntersectionObserver(entries=>{
entries.forEach(e=>{if(e.isIntersecting){e.target.classList.add('in');rObs.unobserve(e.target)}});
},{threshold:.08});
document.querySelectorAll('.rv,.rv-l,.rv-r').forEach(el=>rObs.observe(el));
/* ════ TEMPLATE DATA ════ */
const templates = [
{
cat:'feature', badge:'badge-feature', title:'New Feature — Full Context',
why:'Gives the model everything it needs to make good architectural decisions.',
prompt:`<span class="note">// 1. CONTEXT — what exists</span>
I'm working on [DESCRIBE YOUR APP — e.g. "a B2B invoicing SaaS with 10K users"].
Stack: [e.g. Next.js 14, Postgres, Prisma, Zod, tRPC, Tailwind].
Auth: [e.g. NextAuth with JWT sessions].
Patterns we follow: [e.g. repository pattern, service layer, thin controllers].
<span class="note">// 2. THE TASK</span>
Build: [DESCRIBE THE FEATURE — e.g. "a recurring invoice scheduler"].
This must:
- Handle [SPECIFIC BEHAVIOUR — e.g. "monthly, weekly, custom intervals"]
- Integrate with [EXISTING SYSTEM — e.g. "our existing Invoice model"]
- Be accessible to [USER ROLES — e.g. "admin and billing users only"]
<span class="note">// 3. NON-FUNCTIONAL REQUIREMENTS</span>