@zigrivers/scaffold 3.29.0 → 3.30.0

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 (72) hide show
  1. package/content/guides/AUTHORING.md +143 -0
  2. package/content/guides/cli/index.html +1502 -0
  3. package/content/guides/cli/index.md +206 -0
  4. package/content/guides/concepts/index.html +1617 -0
  5. package/content/guides/concepts/index.md +347 -0
  6. package/content/guides/dashboard/index.html +1560 -0
  7. package/content/guides/dashboard/index.md +264 -0
  8. package/content/guides/index.html +1 -1
  9. package/content/guides/install/.diagrams/diagram-0.svg +1 -0
  10. package/content/guides/install/.diagrams/manifest.json +3 -0
  11. package/content/guides/install/index.html +1300 -0
  12. package/content/guides/install/index.md +186 -0
  13. package/content/guides/knowledge/.diagrams/diagram-0.svg +1 -0
  14. package/content/guides/knowledge/.diagrams/manifest.json +3 -0
  15. package/content/guides/knowledge/index.html +1412 -0
  16. package/content/guides/knowledge/index.md +209 -0
  17. package/content/guides/knowledge-freshness/.diagrams/diagram-0.svg +1 -0
  18. package/content/guides/knowledge-freshness/.diagrams/manifest.json +3 -0
  19. package/content/guides/knowledge-freshness/index.html +2442 -0
  20. package/content/guides/knowledge-freshness/index.md +893 -0
  21. package/content/guides/mmr/index.html +35 -17
  22. package/content/guides/mmr/index.md +39 -16
  23. package/content/guides/multi-agent/.diagrams/diagram-0.svg +1 -0
  24. package/content/guides/multi-agent/.diagrams/manifest.json +3 -0
  25. package/content/guides/multi-agent/index.html +1362 -0
  26. package/content/guides/multi-agent/index.md +243 -0
  27. package/content/guides/observability/.diagrams/diagram-0.svg +1 -0
  28. package/content/guides/observability/.diagrams/diagram-1.svg +1 -0
  29. package/content/guides/observability/.diagrams/diagram-2.svg +1 -0
  30. package/content/guides/observability/.diagrams/diagram-3.svg +1 -0
  31. package/content/guides/observability/.diagrams/manifest.json +6 -0
  32. package/content/guides/observability/index.html +2904 -0
  33. package/content/guides/observability/index.md +1097 -0
  34. package/content/guides/pipeline/.diagrams/diagram-0.svg +1 -0
  35. package/content/guides/pipeline/.diagrams/diagram-1.svg +1 -0
  36. package/content/guides/pipeline/.diagrams/manifest.json +4 -0
  37. package/content/guides/pipeline/index.html +1632 -0
  38. package/content/guides/pipeline/index.md +387 -0
  39. package/content/guides/review-workflow/.diagrams/diagram-0.svg +1 -0
  40. package/content/guides/review-workflow/.diagrams/diagram-1.svg +1 -0
  41. package/content/guides/review-workflow/.diagrams/manifest.json +4 -0
  42. package/content/guides/review-workflow/index.html +1437 -0
  43. package/content/guides/review-workflow/index.md +248 -0
  44. package/dist/guides/build.d.ts.map +1 -1
  45. package/dist/guides/build.js +7 -2
  46. package/dist/guides/build.js.map +1 -1
  47. package/dist/guides/build.test.js +8 -0
  48. package/dist/guides/build.test.js.map +1 -1
  49. package/dist/guides/directives-cite.test.d.ts +2 -0
  50. package/dist/guides/directives-cite.test.d.ts.map +1 -0
  51. package/dist/guides/directives-cite.test.js +26 -0
  52. package/dist/guides/directives-cite.test.js.map +1 -0
  53. package/dist/guides/directives.d.ts +1 -0
  54. package/dist/guides/directives.d.ts.map +1 -1
  55. package/dist/guides/directives.js +24 -0
  56. package/dist/guides/directives.js.map +1 -1
  57. package/dist/guides/links.d.ts +14 -0
  58. package/dist/guides/links.d.ts.map +1 -0
  59. package/dist/guides/links.js +56 -0
  60. package/dist/guides/links.js.map +1 -0
  61. package/dist/guides/links.test.d.ts +2 -0
  62. package/dist/guides/links.test.d.ts.map +1 -0
  63. package/dist/guides/links.test.js +72 -0
  64. package/dist/guides/links.test.js.map +1 -0
  65. package/dist/guides/render.d.ts +1 -0
  66. package/dist/guides/render.d.ts.map +1 -1
  67. package/dist/guides/render.js +1 -1
  68. package/dist/guides/render.js.map +1 -1
  69. package/dist/guides/sanitize.d.ts.map +1 -1
  70. package/dist/guides/sanitize.js +1 -0
  71. package/dist/guides/sanitize.js.map +1 -1
  72. package/package.json +1 -1
@@ -0,0 +1,1560 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-chrome-version="1">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Dashboard &amp; Design System</title>
7
+ <!-- scaffold:chrome v1 -->
8
+ <style>/* Scaffold Dashboard Theme
9
+ * All CSS for the generated pipeline dashboard.
10
+ * Embedded into HTML by scripts/generate-dashboard.sh.
11
+ * Design system reference: docs/design-system.md
12
+ *
13
+ * Aesthetic: "Precision Industrial" — Swiss-typographic control room.
14
+ * Deep navy dark mode with indigo accents, clean cool-white light mode.
15
+ */
16
+
17
+ /* ─── Design Tokens (Light Mode) ──────────────── */
18
+ :root {
19
+ /* Surface */
20
+ --bg: #f5f6fa;
21
+ --bg-card: #ffffff;
22
+ --bg-hover: #eef0f6;
23
+ --bg-inset: #e8eaf2;
24
+
25
+ /* Text */
26
+ --text: #1a1d2e;
27
+ --text-muted: #6b7294;
28
+ --text-faint: #9ba1c0;
29
+
30
+ /* Borders & Structure */
31
+ --border: #dde0ed;
32
+ --border-light: #eceef5;
33
+ --radius: 10px;
34
+ --radius-sm: 6px;
35
+
36
+ /* Accent */
37
+ --accent: #4f46e5;
38
+ --accent-hover: #4338ca;
39
+ --accent-glow: rgba(79, 70, 229, 0.10);
40
+
41
+ /* Semantic: Status */
42
+ --green: #059669;
43
+ --green-bg: #ecfdf5;
44
+ --green-border: #a7f3d0;
45
+ --blue: #2563eb;
46
+ --blue-bg: #eff6ff;
47
+ --blue-border: #bfdbfe;
48
+ --yellow: #d97706;
49
+ --yellow-bg: #fffbeb;
50
+ --yellow-border:#fde68a;
51
+ --gray: #9ca3af;
52
+ --gray-bg: #f3f4f6;
53
+ --gray-border: #e5e7eb;
54
+
55
+ /* Semantic: Next Banner */
56
+ --next-bg: #eef2ff;
57
+ --next-border: #4f46e5;
58
+ --next-glow: rgba(79, 70, 229, 0.06);
59
+
60
+ /* Semantic: Progress */
61
+ --progress-bg: #e5e7eb;
62
+ --progress-h: 10px;
63
+
64
+ /* Depth */
65
+ --shadow-sm: 0 1px 2px rgba(30, 34, 60, 0.04);
66
+ --shadow: 0 1px 3px rgba(30, 34, 60, 0.07), 0 1px 2px rgba(30, 34, 60, 0.04);
67
+ --shadow-md: 0 4px 12px rgba(30, 34, 60, 0.08), 0 1px 3px rgba(30, 34, 60, 0.05);
68
+ --shadow-lg: 0 8px 24px rgba(30, 34, 60, 0.10), 0 2px 6px rgba(30, 34, 60, 0.04);
69
+
70
+ /* Spacing scale (4px base) */
71
+ --sp-1: 4px;
72
+ --sp-2: 8px;
73
+ --sp-3: 12px;
74
+ --sp-4: 16px;
75
+ --sp-5: 20px;
76
+ --sp-6: 24px;
77
+ --sp-8: 32px;
78
+ --sp-10: 40px;
79
+
80
+ /* Typography */
81
+ --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
82
+ --font-mono: "SF Mono", "Cascadia Code", "Fira Code", "JetBrains Mono", Menlo, Consolas, monospace;
83
+ --text-xs: 0.75rem;
84
+ --text-sm: 0.8125rem;
85
+ --text-base: 0.9375rem;
86
+ --text-lg: 1.125rem;
87
+ --text-xl: 1.375rem;
88
+ --text-2xl: 1.75rem;
89
+ --lh-tight: 1.25;
90
+ --lh-normal: 1.5;
91
+ --lh-relaxed: 1.625;
92
+ --ls-tight: -0.01em;
93
+ --ls-wide: 0.025em;
94
+ --fw-normal: 400;
95
+ --fw-medium: 500;
96
+ --fw-semi: 600;
97
+ --fw-bold: 700;
98
+
99
+ /* Layout */
100
+ --max-w: 960px;
101
+ --page-pad: 24px;
102
+ }
103
+
104
+ /* ─── Design Tokens (Dark Mode) ───────────────── */
105
+ [data-theme="dark"] {
106
+ /* Surface */
107
+ --bg: #0f1117;
108
+ --bg-card: #1a1d2e;
109
+ --bg-hover: #252940;
110
+ --bg-inset: #141724;
111
+
112
+ /* Text */
113
+ --text: #e2e5f0;
114
+ --text-muted: #7c82a8;
115
+ --text-faint: #555c80;
116
+
117
+ /* Borders & Structure */
118
+ --border: #2a2f45;
119
+ --border-light: #21253a;
120
+
121
+ /* Accent */
122
+ --accent: #818cf8;
123
+ --accent-hover: #a5b4fc;
124
+ --accent-glow: rgba(129, 140, 248, 0.12);
125
+
126
+ /* Semantic: Status */
127
+ --green: #34d399;
128
+ --green-bg: rgba(6, 78, 59, 0.25);
129
+ --green-border: rgba(52, 211, 153, 0.25);
130
+ --blue: #60a5fa;
131
+ --blue-bg: rgba(30, 58, 95, 0.30);
132
+ --blue-border: rgba(96, 165, 250, 0.25);
133
+ --yellow: #fbbf24;
134
+ --yellow-bg: rgba(120, 53, 15, 0.25);
135
+ --yellow-border:rgba(251, 191, 36, 0.20);
136
+ --gray: #6b7294;
137
+ --gray-bg: #252940;
138
+ --gray-border: #363c58;
139
+
140
+ /* Semantic: Next Banner */
141
+ --next-bg: rgba(30, 27, 75, 0.50);
142
+ --next-border: #818cf8;
143
+ --next-glow: rgba(129, 140, 248, 0.08);
144
+
145
+ /* Semantic: Progress */
146
+ --progress-bg: #1f2337;
147
+
148
+ /* Depth */
149
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.20);
150
+ --shadow: 0 1px 3px rgba(0, 0, 0, 0.30), 0 1px 2px rgba(0, 0, 0, 0.15);
151
+ --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.20);
152
+ --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.40), 0 2px 6px rgba(0, 0, 0, 0.20);
153
+ }
154
+
155
+ /* ─── Theme Toggle ───────────────────────────── */
156
+ .theme-toggle {
157
+ background: var(--bg-inset);
158
+ border: 1px solid var(--border);
159
+ border-radius: var(--radius-sm);
160
+ padding: var(--sp-1) var(--sp-2);
161
+ cursor: pointer;
162
+ font-size: var(--text-base);
163
+ line-height: 1;
164
+ color: var(--text-muted);
165
+ transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
166
+ display: flex;
167
+ align-items: center;
168
+ margin-left: auto;
169
+ }
170
+
171
+ .theme-toggle:hover {
172
+ border-color: var(--accent);
173
+ color: var(--accent);
174
+ background: var(--accent-glow);
175
+ }
176
+
177
+ /* ─── Base ────────────────────────────────────── */
178
+ *, *::before, *::after {
179
+ margin: 0;
180
+ padding: 0;
181
+ box-sizing: border-box;
182
+ }
183
+
184
+ body {
185
+ font-family: var(--font-sans);
186
+ font-size: var(--text-base);
187
+ line-height: var(--lh-normal);
188
+ color: var(--text);
189
+ background: var(--bg);
190
+ -webkit-font-smoothing: antialiased;
191
+ -moz-osx-font-smoothing: grayscale;
192
+ }
193
+
194
+ /* ─── Layout ──────────────────────────────────── */
195
+ .wrap {
196
+ max-width: var(--max-w);
197
+ margin: 0 auto;
198
+ padding: var(--sp-8) var(--page-pad);
199
+ }
200
+
201
+ /* ─── Header ──────────────────────────────────── */
202
+ .header {
203
+ display: flex;
204
+ align-items: baseline;
205
+ gap: var(--sp-3);
206
+ margin-bottom: var(--sp-2);
207
+ flex-wrap: wrap;
208
+ }
209
+
210
+ h1 {
211
+ font-size: var(--text-2xl);
212
+ font-weight: var(--fw-bold);
213
+ letter-spacing: var(--ls-tight);
214
+ line-height: var(--lh-tight);
215
+ }
216
+
217
+ h2 {
218
+ font-size: var(--text-lg);
219
+ font-weight: var(--fw-semi);
220
+ letter-spacing: var(--ls-tight);
221
+ line-height: var(--lh-tight);
222
+ margin-bottom: var(--sp-3);
223
+ }
224
+
225
+ .header-meta {
226
+ font-size: var(--text-xs);
227
+ color: var(--text-faint);
228
+ margin-bottom: var(--sp-6);
229
+ letter-spacing: var(--ls-wide);
230
+ text-transform: uppercase;
231
+ }
232
+
233
+ /* ─── Badge ───────────────────────────────────── */
234
+ .badge {
235
+ display: inline-block;
236
+ padding: 2px var(--sp-2);
237
+ border-radius: 99px;
238
+ font-size: var(--text-xs);
239
+ font-weight: var(--fw-semi);
240
+ letter-spacing: var(--ls-wide);
241
+ background: var(--accent);
242
+ color: #fff;
243
+ text-transform: uppercase;
244
+ }
245
+
246
+ .badge-optional {
247
+ background: var(--yellow-bg);
248
+ color: var(--yellow);
249
+ border: 1px solid var(--yellow-border);
250
+ }
251
+
252
+ /* ─── Progress Bar ────────────────────────────── */
253
+ .progress-bar {
254
+ width: 100%;
255
+ height: var(--progress-h);
256
+ background: var(--progress-bg);
257
+ border-radius: 99px;
258
+ overflow: hidden;
259
+ margin-bottom: var(--sp-6);
260
+ display: flex;
261
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
262
+ }
263
+
264
+ .progress-bar .seg-done {
265
+ background: linear-gradient(135deg, var(--green), #10b981);
266
+ box-shadow: 0 0 8px rgba(5, 150, 105, 0.3);
267
+ }
268
+
269
+ .progress-bar .seg-likely {
270
+ background: linear-gradient(135deg, var(--blue), #3b82f6);
271
+ box-shadow: 0 0 8px rgba(37, 99, 235, 0.25);
272
+ }
273
+
274
+ .progress-bar .seg-skip {
275
+ background: var(--gray);
276
+ opacity: 0.7;
277
+ }
278
+
279
+ /* ─── Summary Cards ───────────────────────────── */
280
+ .cards {
281
+ display: grid;
282
+ grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
283
+ gap: var(--sp-3);
284
+ margin-bottom: var(--sp-6);
285
+ }
286
+
287
+ .card {
288
+ background: var(--bg-card);
289
+ border: 1px solid var(--border);
290
+ border-radius: var(--radius);
291
+ padding: var(--sp-4) var(--sp-5);
292
+ box-shadow: var(--shadow);
293
+ transition: box-shadow 0.15s ease, transform 0.15s ease;
294
+ }
295
+
296
+ .card:hover {
297
+ box-shadow: var(--shadow-md);
298
+ transform: translateY(-1px);
299
+ }
300
+
301
+ .card-num {
302
+ font-size: var(--text-2xl);
303
+ font-weight: var(--fw-bold);
304
+ font-family: var(--font-mono);
305
+ letter-spacing: var(--ls-tight);
306
+ line-height: 1;
307
+ }
308
+
309
+ .card-lbl {
310
+ font-size: var(--text-xs);
311
+ color: var(--text-muted);
312
+ margin-top: var(--sp-1);
313
+ letter-spacing: var(--ls-wide);
314
+ text-transform: uppercase;
315
+ font-weight: var(--fw-medium);
316
+ }
317
+
318
+ /* ─── What's Next Banner ──────────────────────── */
319
+ .next-banner {
320
+ background: var(--next-bg);
321
+ border: 1px solid var(--next-border);
322
+ border-left: 4px solid var(--next-border);
323
+ border-radius: var(--radius);
324
+ padding: var(--sp-5) var(--sp-6);
325
+ margin-bottom: var(--sp-6);
326
+ box-shadow: 0 0 0 1px var(--next-glow), var(--shadow);
327
+ position: relative;
328
+ overflow: hidden;
329
+ }
330
+
331
+ .next-banner::before {
332
+ content: "";
333
+ position: absolute;
334
+ top: 0;
335
+ left: 0;
336
+ width: 4px;
337
+ height: 100%;
338
+ background: var(--next-border);
339
+ animation: pulse-border 2.5s ease-in-out infinite;
340
+ }
341
+
342
+ @keyframes pulse-border {
343
+ 0%, 100% { opacity: 1; }
344
+ 50% { opacity: 0.5; }
345
+ }
346
+
347
+ .next-banner h2 {
348
+ color: var(--accent);
349
+ margin-bottom: var(--sp-1);
350
+ font-size: var(--text-base);
351
+ font-weight: var(--fw-semi);
352
+ letter-spacing: var(--ls-wide);
353
+ text-transform: uppercase;
354
+ }
355
+
356
+ .next-banner p {
357
+ color: var(--text);
358
+ font-size: var(--text-base);
359
+ }
360
+
361
+ .next-cmd {
362
+ font-family: var(--font-mono);
363
+ background: var(--bg-card);
364
+ padding: var(--sp-1) var(--sp-3);
365
+ border-radius: var(--radius-sm);
366
+ font-size: var(--text-sm);
367
+ display: inline-flex;
368
+ align-items: center;
369
+ gap: var(--sp-2);
370
+ margin-top: var(--sp-3);
371
+ border: 1px solid var(--border);
372
+ }
373
+
374
+ /* ─── Phase Headers (Collapsible) ─────────────── */
375
+ .phase {
376
+ margin-bottom: var(--sp-6);
377
+ }
378
+
379
+ .phase-hdr {
380
+ display: flex;
381
+ align-items: center;
382
+ gap: var(--sp-2);
383
+ cursor: pointer;
384
+ padding: var(--sp-2) 0;
385
+ user-select: none;
386
+ border-bottom: 2px solid var(--border);
387
+ margin-bottom: var(--sp-3);
388
+ transition: border-color 0.15s ease;
389
+ }
390
+
391
+ .phase-hdr:hover {
392
+ border-bottom-color: var(--accent);
393
+ }
394
+
395
+ .phase-hdr:hover h2 {
396
+ color: var(--accent);
397
+ }
398
+
399
+ .phase-hdr h2 {
400
+ transition: color 0.15s ease;
401
+ }
402
+
403
+ .phase-hdr .arr {
404
+ transition: transform 0.2s ease;
405
+ font-size: var(--text-xs);
406
+ color: var(--text-muted);
407
+ }
408
+
409
+ .phase-hdr.closed .arr {
410
+ transform: rotate(-90deg);
411
+ }
412
+
413
+ .phase-cnt {
414
+ font-size: var(--text-xs);
415
+ font-family: var(--font-mono);
416
+ color: var(--text-faint);
417
+ margin-left: auto;
418
+ letter-spacing: var(--ls-wide);
419
+ }
420
+
421
+ /* ─── Prompt List ─────────────────────────────── */
422
+ .plist {
423
+ display: flex;
424
+ flex-direction: column;
425
+ gap: var(--sp-2);
426
+ }
427
+
428
+ /* ─── Prompt Cards ────────────────────────────── */
429
+ .pcard {
430
+ background: var(--bg-card);
431
+ border: 1px solid var(--border);
432
+ border-radius: var(--radius);
433
+ padding: var(--sp-3) var(--sp-4);
434
+ box-shadow: var(--shadow-sm);
435
+ display: grid;
436
+ grid-template-columns: auto 1fr auto;
437
+ gap: var(--sp-2) var(--sp-3);
438
+ align-items: start;
439
+ transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
440
+ }
441
+
442
+ .pcard:hover {
443
+ box-shadow: var(--shadow);
444
+ transform: translateY(-1px);
445
+ border-color: var(--accent-glow);
446
+ }
447
+
448
+ /* ─── Status Badges ──────────────────────────── */
449
+ .status-badge {
450
+ display: inline-flex;
451
+ align-items: center;
452
+ gap: var(--sp-1);
453
+ font-size: var(--text-xs);
454
+ font-weight: var(--fw-medium);
455
+ padding: 2px var(--sp-2);
456
+ border-radius: 99px;
457
+ white-space: nowrap;
458
+ flex-shrink: 0;
459
+ letter-spacing: var(--ls-wide);
460
+ line-height: var(--lh-tight);
461
+ }
462
+
463
+ .st-completed {
464
+ background: var(--green-bg);
465
+ color: var(--green);
466
+ border: 1px solid var(--green-border);
467
+ }
468
+
469
+ .st-likely-completed {
470
+ background: var(--blue-bg);
471
+ color: var(--blue);
472
+ border: 1px solid var(--blue-border);
473
+ }
474
+
475
+ .st-skipped {
476
+ background: var(--gray-bg);
477
+ color: var(--gray);
478
+ border: 1px solid var(--gray-border);
479
+ }
480
+
481
+ .st-pending {
482
+ background: var(--bg-inset);
483
+ color: var(--text-faint);
484
+ border: 1px solid var(--border);
485
+ }
486
+
487
+ /* ─── Status Legend ──────────────────────────── */
488
+ .status-legend {
489
+ display: flex;
490
+ flex-wrap: wrap;
491
+ gap: var(--sp-2);
492
+ margin-bottom: var(--sp-4);
493
+ padding: var(--sp-2) 0;
494
+ }
495
+
496
+ .status-legend .status-badge {
497
+ cursor: default;
498
+ }
499
+
500
+ /* ─── Prompt Card Inner ───────────────────────── */
501
+ .pinfo {
502
+ min-width: 0;
503
+ }
504
+
505
+ .pname {
506
+ font-weight: var(--fw-semi);
507
+ font-size: var(--text-base);
508
+ }
509
+
510
+ .pstep {
511
+ font-size: var(--text-xs);
512
+ font-family: var(--font-mono);
513
+ color: var(--text-faint);
514
+ letter-spacing: var(--ls-wide);
515
+ }
516
+
517
+ .pdesc {
518
+ font-size: var(--text-sm);
519
+ color: var(--text-muted);
520
+ margin-top: 2px;
521
+ line-height: var(--lh-relaxed);
522
+ }
523
+
524
+ .pdesc-long {
525
+ font-size: var(--text-xs);
526
+ color: var(--text-faint);
527
+ margin-top: 2px;
528
+ }
529
+
530
+ .pdeps {
531
+ font-size: var(--text-xs);
532
+ color: var(--yellow);
533
+ margin-top: var(--sp-1);
534
+ font-weight: var(--fw-medium);
535
+ }
536
+
537
+ /* ─── Copy Command Button ─────────────────────── */
538
+ .pcmd {
539
+ font-family: var(--font-mono);
540
+ font-size: var(--text-xs);
541
+ background: var(--bg-inset);
542
+ padding: 3px var(--sp-2);
543
+ border-radius: var(--radius-sm);
544
+ cursor: pointer;
545
+ border: 1px solid var(--border);
546
+ white-space: nowrap;
547
+ align-self: center;
548
+ color: var(--text-muted);
549
+ transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
550
+ letter-spacing: var(--ls-wide);
551
+ }
552
+
553
+ .pcmd:hover {
554
+ border-color: var(--accent);
555
+ color: var(--accent);
556
+ background: var(--accent-glow);
557
+ }
558
+
559
+ .pcmd.copied {
560
+ border-color: var(--green);
561
+ color: var(--green);
562
+ background: var(--green-bg);
563
+ }
564
+
565
+ /* ─── Prompt Modal ────────────────────────────── */
566
+ .modal-overlay {
567
+ position: fixed;
568
+ inset: 0;
569
+ background: rgba(0, 0, 0, 0.6);
570
+ display: flex;
571
+ align-items: center;
572
+ justify-content: center;
573
+ z-index: 1000;
574
+ padding: var(--sp-4);
575
+ }
576
+
577
+ .modal {
578
+ background: var(--bg-card);
579
+ border: 1px solid var(--border);
580
+ border-radius: var(--radius);
581
+ box-shadow: var(--shadow-lg);
582
+ max-width: 720px;
583
+ width: 100%;
584
+ max-height: 85vh;
585
+ display: flex;
586
+ flex-direction: column;
587
+ }
588
+
589
+ .modal-header {
590
+ display: flex;
591
+ align-items: center;
592
+ gap: var(--sp-3);
593
+ padding: var(--sp-4) var(--sp-5);
594
+ border-bottom: 1px solid var(--border);
595
+ flex-shrink: 0;
596
+ }
597
+
598
+ .modal-header h3 {
599
+ font-size: var(--text-lg);
600
+ font-weight: var(--fw-semi);
601
+ flex: 1;
602
+ min-width: 0;
603
+ }
604
+
605
+ .modal-close {
606
+ background: var(--bg-inset);
607
+ border: 1px solid var(--border);
608
+ border-radius: var(--radius-sm);
609
+ padding: var(--sp-1) var(--sp-2);
610
+ cursor: pointer;
611
+ font-size: var(--text-base);
612
+ color: var(--text-muted);
613
+ line-height: 1;
614
+ transition: border-color 0.15s ease, color 0.15s ease;
615
+ }
616
+
617
+ .modal-close:hover {
618
+ border-color: var(--accent);
619
+ color: var(--accent);
620
+ }
621
+
622
+ .modal-body {
623
+ padding: var(--sp-5);
624
+ overflow-y: auto;
625
+ flex: 1;
626
+ }
627
+
628
+ .modal-body pre {
629
+ font-family: var(--font-mono);
630
+ font-size: var(--text-sm);
631
+ line-height: var(--lh-relaxed);
632
+ white-space: pre-wrap;
633
+ word-break: break-word;
634
+ color: var(--text);
635
+ }
636
+
637
+ .modal-body pre .md-heading {
638
+ font-weight: var(--fw-bold);
639
+ color: var(--accent);
640
+ }
641
+
642
+ .modal-body pre .md-code {
643
+ background: var(--bg-inset);
644
+ padding: 1px 4px;
645
+ border-radius: 3px;
646
+ font-size: var(--text-xs);
647
+ }
648
+
649
+ .modal-footer {
650
+ display: flex;
651
+ gap: var(--sp-2);
652
+ padding: var(--sp-3) var(--sp-5);
653
+ border-top: 1px solid var(--border);
654
+ flex-shrink: 0;
655
+ }
656
+
657
+ .modal-copy-btn {
658
+ background: var(--accent);
659
+ color: #fff;
660
+ border: none;
661
+ border-radius: var(--radius-sm);
662
+ padding: var(--sp-2) var(--sp-4);
663
+ font-size: var(--text-sm);
664
+ font-weight: var(--fw-medium);
665
+ cursor: pointer;
666
+ transition: background 0.15s ease;
667
+ }
668
+
669
+ .modal-copy-btn:hover {
670
+ background: var(--accent-hover);
671
+ }
672
+
673
+ .modal-copy-btn.copied {
674
+ background: var(--green);
675
+ }
676
+
677
+ /* ─── Beads Task Section ─────────────────────── */
678
+ .beads-section {
679
+ margin-top: var(--sp-8);
680
+ margin-bottom: var(--sp-6);
681
+ }
682
+
683
+ .beads-filters {
684
+ display: flex;
685
+ gap: var(--sp-2);
686
+ margin-bottom: var(--sp-3);
687
+ }
688
+
689
+ .beads-filter {
690
+ background: var(--bg-inset);
691
+ border: 1px solid var(--border);
692
+ border-radius: 99px;
693
+ padding: var(--sp-1) var(--sp-3);
694
+ font-size: var(--text-xs);
695
+ font-weight: var(--fw-medium);
696
+ color: var(--text-muted);
697
+ cursor: pointer;
698
+ transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
699
+ letter-spacing: var(--ls-wide);
700
+ }
701
+
702
+ .beads-filter:hover {
703
+ border-color: var(--accent);
704
+ color: var(--accent);
705
+ }
706
+
707
+ .beads-filter.active {
708
+ background: var(--accent);
709
+ color: #fff;
710
+ border-color: var(--accent);
711
+ }
712
+
713
+ /* ─── Beads Status Badges ────────────────────── */
714
+ .st-bead-open {
715
+ background: var(--accent-glow);
716
+ color: var(--accent);
717
+ border: 1px solid var(--accent);
718
+ }
719
+
720
+ .st-bead-progress {
721
+ background: var(--blue-bg);
722
+ color: var(--blue);
723
+ border: 1px solid var(--blue-border);
724
+ }
725
+
726
+ .st-bead-blocked {
727
+ background: var(--yellow-bg);
728
+ color: var(--yellow);
729
+ border: 1px solid var(--yellow-border);
730
+ }
731
+
732
+ .st-bead-deferred {
733
+ background: var(--gray-bg);
734
+ color: var(--gray);
735
+ border: 1px solid var(--gray-border);
736
+ }
737
+
738
+ .st-bead-closed {
739
+ background: var(--green-bg);
740
+ color: var(--green);
741
+ border: 1px solid var(--green-border);
742
+ }
743
+
744
+ /* ─── Beads Filter Separator ─────────────────── */
745
+ .beads-filter-sep {
746
+ width: 1px;
747
+ background: var(--border);
748
+ align-self: stretch;
749
+ margin: 0 var(--sp-1);
750
+ }
751
+
752
+ /* ─── Beads Priority Filter ──────────────────── */
753
+ .beads-prio-filter {
754
+ background: var(--bg-inset);
755
+ border: 1px solid var(--border);
756
+ border-radius: 99px;
757
+ padding: var(--sp-1) var(--sp-3);
758
+ font-size: var(--text-xs);
759
+ font-weight: var(--fw-medium);
760
+ color: var(--text-muted);
761
+ cursor: pointer;
762
+ transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
763
+ letter-spacing: var(--ls-wide);
764
+ }
765
+
766
+ .beads-prio-filter:hover {
767
+ border-color: var(--accent);
768
+ color: var(--accent);
769
+ }
770
+
771
+ .beads-prio-filter.active {
772
+ background: var(--accent);
773
+ color: #fff;
774
+ border-color: var(--accent);
775
+ }
776
+
777
+ /* ─── Beads Task Detail Modal ────────────────── */
778
+ .bead-meta-grid {
779
+ display: grid;
780
+ grid-template-columns: 1fr 1fr;
781
+ gap: var(--sp-3);
782
+ padding: var(--sp-4) 0;
783
+ border-bottom: 1px solid var(--border-light);
784
+ }
785
+
786
+ .bead-meta-item {
787
+ display: flex;
788
+ flex-direction: column;
789
+ gap: 2px;
790
+ }
791
+
792
+ .bead-meta-label {
793
+ font-size: var(--text-xs);
794
+ color: var(--text-faint);
795
+ text-transform: uppercase;
796
+ letter-spacing: var(--ls-wide);
797
+ font-weight: var(--fw-medium);
798
+ }
799
+
800
+ .bead-meta-value {
801
+ font-size: var(--text-sm);
802
+ font-weight: var(--fw-medium);
803
+ color: var(--text);
804
+ }
805
+
806
+ .bead-description {
807
+ padding: var(--sp-4) 0;
808
+ border-bottom: 1px solid var(--border-light);
809
+ white-space: pre-wrap;
810
+ font-size: var(--text-sm);
811
+ line-height: var(--lh-relaxed);
812
+ color: var(--text-muted);
813
+ }
814
+
815
+ .bead-deps {
816
+ padding: var(--sp-4) 0;
817
+ border-bottom: 1px solid var(--border-light);
818
+ }
819
+
820
+ .bead-dep-group {
821
+ display: flex;
822
+ flex-wrap: wrap;
823
+ align-items: center;
824
+ gap: var(--sp-2);
825
+ margin-bottom: var(--sp-2);
826
+ }
827
+
828
+ .bead-dep-group:last-child {
829
+ margin-bottom: 0;
830
+ }
831
+
832
+ .bead-dep-label {
833
+ font-size: var(--text-xs);
834
+ color: var(--text-faint);
835
+ text-transform: uppercase;
836
+ letter-spacing: var(--ls-wide);
837
+ font-weight: var(--fw-medium);
838
+ min-width: 80px;
839
+ }
840
+
841
+ .bead-dep-link {
842
+ display: inline-block;
843
+ font-family: var(--font-mono);
844
+ font-size: var(--text-xs);
845
+ padding: 2px var(--sp-2);
846
+ border-radius: 99px;
847
+ background: var(--accent-glow);
848
+ color: var(--accent);
849
+ border: 1px solid var(--accent);
850
+ cursor: pointer;
851
+ transition: background 0.15s ease, color 0.15s ease;
852
+ text-decoration: none;
853
+ }
854
+
855
+ .bead-dep-link:hover {
856
+ background: var(--accent);
857
+ color: #fff;
858
+ }
859
+
860
+ .bead-timestamps {
861
+ display: flex;
862
+ flex-wrap: wrap;
863
+ gap: var(--sp-4);
864
+ padding: var(--sp-4) 0;
865
+ }
866
+
867
+ .bead-ts-item {
868
+ display: flex;
869
+ flex-direction: column;
870
+ gap: 2px;
871
+ }
872
+
873
+ .bead-ts-label {
874
+ font-size: var(--text-xs);
875
+ color: var(--text-faint);
876
+ text-transform: uppercase;
877
+ letter-spacing: var(--ls-wide);
878
+ font-weight: var(--fw-medium);
879
+ }
880
+
881
+ .bead-ts-value {
882
+ font-size: var(--text-sm);
883
+ color: var(--text-muted);
884
+ }
885
+
886
+ .bead-ts-value[title] {
887
+ border-bottom: 1px dotted var(--text-faint);
888
+ cursor: help;
889
+ }
890
+
891
+ /* ─── Standalone Commands Section ─────────────── */
892
+ .ongoing {
893
+ margin-top: var(--sp-10);
894
+ }
895
+
896
+ .ongoing h2 {
897
+ letter-spacing: var(--ls-wide);
898
+ text-transform: uppercase;
899
+ font-size: var(--text-sm);
900
+ color: var(--text-muted);
901
+ margin-bottom: var(--sp-4);
902
+ border-bottom: 2px solid var(--border);
903
+ padding-bottom: var(--sp-2);
904
+ }
905
+
906
+ /* ─── Footer ──────────────────────────────────── */
907
+ .footer {
908
+ text-align: center;
909
+ font-size: var(--text-xs);
910
+ color: var(--text-faint);
911
+ margin-top: var(--sp-10);
912
+ padding-top: var(--sp-4);
913
+ border-top: 1px solid var(--border-light);
914
+ letter-spacing: var(--ls-wide);
915
+ }
916
+
917
+ /* ─── Utilities ───────────────────────────────── */
918
+ .hidden {
919
+ display: none;
920
+ }
921
+
922
+ /* Build-observability severity + verdict tokens (Plan 4) */
923
+ :root {
924
+ --sev-p0: #dc2626; /* red 600 */
925
+ --sev-p1: #ea580c; /* orange 600 */
926
+ --sev-p2: #ca8a04; /* yellow 600 */
927
+ --sev-p3: #2563eb; /* blue 600 */
928
+ --sev-pass: #16a34a; /* green 600 */
929
+ }
930
+ [data-theme="dark"] {
931
+ --sev-p0: #f87171;
932
+ --sev-p1: #fb923c;
933
+ --sev-p2: #facc15;
934
+ --sev-p3: #60a5fa;
935
+ --sev-pass: #4ade80;
936
+ }
937
+
938
+ /* Build-observability panel layout */
939
+ .panel {
940
+ background: var(--bg-card);
941
+ border: 1px solid var(--border);
942
+ border-radius: var(--radius);
943
+ padding: var(--sp-4) var(--sp-6);
944
+ margin-bottom: var(--sp-6);
945
+ }
946
+ .panel > header {
947
+ display: flex;
948
+ align-items: center;
949
+ gap: var(--sp-3);
950
+ margin-bottom: var(--sp-4);
951
+ flex-wrap: wrap;
952
+ }
953
+ .panel > header h2 {
954
+ margin: 0;
955
+ font-size: var(--text-base);
956
+ font-weight: var(--fw-semi);
957
+ }
958
+ .panel .meta {
959
+ color: var(--text-muted);
960
+ font-size: var(--text-sm);
961
+ }
962
+ .grid { display: grid; gap: var(--sp-4); }
963
+ .grid-2 { grid-template-columns: repeat(2, 1fr); }
964
+ @media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
965
+
966
+ /* Finding filters */
967
+ .finding-filters {
968
+ display: flex;
969
+ gap: var(--sp-2);
970
+ flex-wrap: wrap;
971
+ margin-bottom: var(--sp-4);
972
+ }
973
+ .finding-filters button {
974
+ padding: var(--sp-1) var(--sp-3);
975
+ border: 1px solid var(--border);
976
+ border-radius: var(--radius-sm);
977
+ background: var(--bg-inset);
978
+ color: var(--text);
979
+ font-size: var(--text-sm);
980
+ cursor: pointer;
981
+ }
982
+ .finding-filters button:hover,
983
+ .finding-filters button.active {
984
+ background: var(--accent);
985
+ border-color: var(--accent);
986
+ color: #fff;
987
+ }
988
+
989
+ /* Findings list */
990
+ .findings {
991
+ list-style: none;
992
+ padding: 0;
993
+ margin: 0;
994
+ display: flex;
995
+ flex-direction: column;
996
+ gap: var(--sp-3);
997
+ }
998
+ .finding {
999
+ background: var(--bg-inset);
1000
+ border: 1px solid var(--border-light);
1001
+ border-radius: var(--radius-sm);
1002
+ padding: var(--sp-3) var(--sp-4);
1003
+ }
1004
+ .finding header {
1005
+ display: flex;
1006
+ align-items: center;
1007
+ gap: var(--sp-2);
1008
+ flex-wrap: wrap;
1009
+ margin-bottom: var(--sp-2);
1010
+ }
1011
+ .finding-id {
1012
+ font-family: var(--font-mono, monospace);
1013
+ font-size: var(--text-xs);
1014
+ color: var(--text-muted);
1015
+ background: var(--bg-card);
1016
+ border: 1px solid var(--border);
1017
+ border-radius: 4px;
1018
+ padding: 1px var(--sp-1);
1019
+ }
1020
+ .finding .lens {
1021
+ font-size: var(--text-xs);
1022
+ color: var(--text-muted);
1023
+ }
1024
+ .finding .title {
1025
+ font-size: var(--text-sm);
1026
+ font-weight: var(--fw-semi);
1027
+ flex: 1;
1028
+ }
1029
+ .finding p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
1030
+ .empty { color: var(--text-muted); font-size: var(--text-sm); text-align: center; padding: var(--sp-4); }
1031
+
1032
+ /* ── Mermaid diagrams ─────────────────────────────────────────────────────────
1033
+ The build renders mermaid to inline SVG via mmdc, then sanitizeSvg() +
1034
+ rehype-sanitize strip the SVG's own <script>, <foreignObject>, AND <style>
1035
+ for security. Stripping <style> means the diagram arrives unstyled (nodes
1036
+ default to a black fill). These theme-token rules restyle the SVG so nodes,
1037
+ edges, arrowheads, and labels render correctly — and follow light/dark mode.
1038
+ Authors must render with htmlLabels:false (the generator forces this) so node
1039
+ labels are native <text>/<tspan> rather than stripped <foreignObject> HTML. */
1040
+ figure.mermaid { margin: var(--sp-5) 0; text-align: center; }
1041
+ figure.mermaid svg { max-width: 100%; height: auto; }
1042
+ /* Node shapes */
1043
+ figure.mermaid svg .node rect,
1044
+ figure.mermaid svg .node circle,
1045
+ figure.mermaid svg .node ellipse,
1046
+ figure.mermaid svg .node polygon,
1047
+ figure.mermaid svg .node path {
1048
+ fill: var(--bg-inset);
1049
+ stroke: var(--border);
1050
+ stroke-width: 1px;
1051
+ }
1052
+ /* Background helper rects mermaid emits behind labels */
1053
+ figure.mermaid svg .node .label-container { fill: var(--bg-inset); stroke: var(--border); }
1054
+ figure.mermaid svg rect.background { fill: none; stroke: none; }
1055
+ /* Labels (rendered as <text>/<tspan> when htmlLabels:false) */
1056
+ figure.mermaid svg .nodeLabel,
1057
+ figure.mermaid svg .node text,
1058
+ figure.mermaid svg text.nodeLabel,
1059
+ figure.mermaid svg .label text,
1060
+ figure.mermaid svg span.nodeLabel {
1061
+ fill: var(--text);
1062
+ color: var(--text);
1063
+ font-family: var(--font-sans);
1064
+ }
1065
+ /* Edges: thin strokes, not filled blobs */
1066
+ figure.mermaid svg .edgePath path,
1067
+ figure.mermaid svg path.flowchart-link,
1068
+ figure.mermaid svg .flowchart-link {
1069
+ fill: none;
1070
+ stroke: var(--text-faint);
1071
+ stroke-width: 1.5px;
1072
+ }
1073
+ /* Arrowheads */
1074
+ figure.mermaid svg marker path,
1075
+ figure.mermaid svg .marker {
1076
+ fill: var(--text-faint);
1077
+ stroke: var(--text-faint);
1078
+ }
1079
+ figure.mermaid svg .edgeLabel,
1080
+ figure.mermaid svg .edgeLabel text { fill: var(--text-muted); color: var(--text-muted); }
1081
+ </style>
1082
+ <script>(function(){try{var t=localStorage.getItem('guide-theme');if(!t&&window.matchMedia&&matchMedia('(prefers-color-scheme: dark)').matches)t='dark';if(t)document.documentElement.setAttribute('data-theme',t);}catch(e){}})();</script>
1083
+ </head>
1084
+ <body>
1085
+ <header class="topbar">
1086
+ <button data-action="nav" class="nav-toggle" aria-label="Toggle navigation">☰</button>
1087
+ <h1>Dashboard &amp; Design System</h1>
1088
+ <button data-action="theme" class="theme-toggle" aria-label="Toggle theme">◐</button>
1089
+ </header>
1090
+ <div class="layout">
1091
+ <aside class="rail"><nav class="toc" aria-label="Table of contents"><ul><li class="toc-2"><a href="#what-the-dashboard-is">What the dashboard is</a></li><li class="toc-2"><a href="#reading-the-dashboard">Reading the dashboard</a></li><li class="toc-3"><a href="#the-build-observability-panels">The Build-Observability panels</a></li><li class="toc-3"><a href="#filters-and-modals-the-inline-js">Filters and modals (the inline JS)</a></li><li class="toc-2"><a href="#the-design-token-system">The design-token system</a></li><li class="toc-3"><a href="#colors-light-dark-parity">Colors — light + dark parity</a></li><li class="toc-3"><a href="#spacing-the---sp--scale">Spacing — the --sp-* scale</a></li><li class="toc-3"><a href="#typography-radius-layout">Typography, radius &amp; layout</a></li><li class="toc-2"><a href="#customizing-the-dashboard-safely">Customizing the dashboard safely</a></li><li class="toc-2"><a href="#visual-testing">Visual testing</a></li></ul></nav></aside>
1092
+ <main class="content"><h2 id="what-the-dashboard-is">What the dashboard is</h2>
1093
+ <p>Each dashboard is a single, self-contained HTML file that visualizes where a
1094
+ Scaffold build stands: which pipeline steps are done and what to run next.
1095
+ Everything is inlined (CSS, JS, data); there are no CDN fonts, stylesheets, or
1096
+ scripts, so the file works offline and renders identically wherever you open it.</p>
1097
+ <div class="callout callout-warning"><p><strong>Two different producers — this guide documents the bash generator.</strong> Scaffold
1098
+ has two distinct dashboard surfaces that do <strong>not</strong> share markup, CSS, or
1099
+ features:</p><ul>
1100
+ <li><strong><code>scaffold dashboard</code></strong> (the user-facing CLI) renders HTML from
1101
+ <code>src/dashboard/template.ts</code> + <code>generator.ts</code>. It has its own inline <code>&#x3C;style></code>
1102
+ block (classes like <code>.container</code>, <code>.phase-header</code>, <code>.summary-cards</code>), a
1103
+ <strong>Decision Log</strong> section, and standalone-command cards. It does <strong>not</strong> read
1104
+ <code>lib/dashboard-theme.css</code>, has <strong>no</strong> Beads task section, and does <strong>not</strong>
1105
+ inject the Build-Observability panels. The CLI writes the HTML to a temp file
1106
+ (or <code>--output &#x3C;path></code>) and opens it via <code>open</code> / <code>xdg-open</code> / <code>start</code>
1107
+ (<span class="fp" data-path="src/cli/commands/dashboard.ts:64-66">src/cli/commands/dashboard.ts:64-66</span>).</li>
1108
+ <li><strong><code>scripts/generate-dashboard.sh</code></strong> is the visual-test fixture that
1109
+ <code>make dashboard-test</code> runs. It embeds <code>lib/dashboard-theme.css</code>, renders a
1110
+ Beads task section, and injects the two Build-Observability panels. Its
1111
+ classes (<code>.phase-hdr</code>, <code>.pcard</code>, <code>.beads-section</code>) and design tokens are
1112
+ exclusive to this surface.</li>
1113
+ </ul><p>The rest of this guide documents the <strong><code>scripts/generate-dashboard.sh</code></strong>
1114
+ surface — the one used for visual verification and the one that carries the
1115
+ <code>lib/dashboard-theme.css</code> token system. The panels, classes, design tokens, and
1116
+ inline JS described below belong to that generator, <strong>not</strong> to the
1117
+ <code>scaffold dashboard</code> CLI command.</p></div>
1118
+ <h2 id="reading-the-dashboard">Reading the dashboard</h2>
1119
+ <p>The page is built top-to-bottom by the inline renderer in the generator. From
1120
+ the header down:</p>
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+ <table><thead><tr><th>Region</th><th>Classes</th><th>What it shows</th></tr></thead><tbody><tr><td>Header</td><td><code>.header</code>, <code>.header-meta</code>, <code>.theme-toggle</code></td><td>Title, profile badge, project name + timestamp, light/dark toggle</td></tr><tr><td>Status legend</td><td><code>.status-legend</code></td><td>The four pipeline status badges (Done / Likely Done / Skipped / Pending)</td></tr><tr><td>Progress bar</td><td><code>.progress-bar</code>, <code>.seg-done</code>, <code>.seg-likely</code>, <code>.seg-skip</code></td><td>Proportional completion rail</td></tr><tr><td>Summary cards</td><td><code>.cards</code>, <code>.card</code>, <code>.card-num</code></td><td>Counts: completed, likely, skipped, pending, total, Beads-open</td></tr><tr><td>What's Next</td><td><code>.next-banner</code>, <code>.next-cmd</code></td><td>The recommended next command, with a copy button</td></tr><tr><td>Phases</td><td><code>.phase</code>, <code>.phase-hdr</code>, <code>.pcard</code></td><td>Collapsible phase sections, one prompt card per step</td></tr><tr><td>Beads Tasks</td><td><code>.beads-section</code>, <code>.beads-filters</code> (container), <code>.beads-filter</code> (buttons)</td><td>Filterable task list (status + priority), cards open a detail modal</td></tr><tr><td>Build Progress / Audit</td><td><code>#build-progress</code>, <code>#build-audit</code></td><td>The two Build-Observability panels (only when populated)</td></tr></tbody></table>
1172
+ <p>The header, legend, progress bar, summary cards, and What's Next banner are all
1173
+ emitted in sequence by the renderer (<span class="fp" data-path="scripts/generate-dashboard.sh:505-544">scripts/generate-dashboard.sh:505-544</span>).</p>
1174
+ <h3 id="the-build-observability-panels">The Build-Observability panels</h3>
1175
+ <p>After the pipeline content, the generator shells out to Build Observability and
1176
+ splices its HTML fragments into the page between named HTML comment markers
1177
+ (<code>&#x3C;!-- observe:progress --></code> … <code>&#x3C;!-- /observe:progress --></code> and the audit pair),
1178
+ preferring a local <code>dist/index.js</code> build and falling back to a global <code>scaffold</code>
1179
+ binary (<span class="fp" data-path="scripts/generate-dashboard.sh:872-887">scripts/generate-dashboard.sh:872-887</span>):</p>
1180
+ <pre><code class="language-bash">scaffold observe progress --render=dashboard-fragment # → #build-progress panel
1181
+ scaffold observe audit --render=dashboard-fragment-audit # → #build-audit panel
1182
+ </code></pre>
1183
+ <p>Each renders as a <code>&#x3C;section class="panel"></code> — <code>#build-progress</code> for the live
1184
+ timeline and <code>#build-audit</code> (carrying <code>data-verdict</code> and <code>data-threshold</code>) for
1185
+ audit findings. If neither a local build nor a global <code>scaffold</code> is available the
1186
+ markers stay empty and the panels simply don't appear. See the
1187
+ <a href="../observability/index.md">Build Observability guide</a>{mode=advisory} for what
1188
+ those panels report.</p>
1189
+ <h3 id="filters-and-modals-the-inline-js">Filters and modals (the inline JS)</h3>
1190
+ <p>The dashboard is interactive without any framework — a handful of vanilla
1191
+ functions are inlined at the foot of the generated HTML:</p>
1192
+ <ul>
1193
+ <li><strong>Collapse a phase</strong> — clicking a <code>.phase-hdr</code> calls <code>togglePhase()</code>, which
1194
+ toggles <code>.closed</code> on the header (rotating its arrow) and <code>.hidden</code> on the next
1195
+ sibling list (<span class="fp" data-path="scripts/generate-dashboard.sh:825-828">scripts/generate-dashboard.sh:825-828</span>).</li>
1196
+ <li><strong>Copy a command</strong> — clicking a <code>.pcmd</code> calls <code>copyCmd()</code>, which writes the
1197
+ <code>data-cmd</code> value to the clipboard and flashes the <code>.copied</code> state for 1.5 s
1198
+ (<span class="fp" data-path="scripts/generate-dashboard.sh:829-838">scripts/generate-dashboard.sh:829-838</span>).</li>
1199
+ <li><strong>Filter Beads</strong> — <code>filterBeads()</code> switches the active status filter and
1200
+ <code>filterBeadsPrio()</code> toggles priority filters; cards carry <code>data-bead-status</code>
1201
+ and <code>data-bead-priority</code> so the filters can show/hide them
1202
+ (<span class="fp" data-path="scripts/generate-dashboard.sh:733-741">scripts/generate-dashboard.sh:733-741</span>).</li>
1203
+ <li><strong>Beads task detail modal</strong> — <code>openBeadModal(id)</code> builds a <code>.modal-overlay</code>
1204
+ detail view for a Beads task (status, priority, deps, timestamps); close via
1205
+ the X, Escape, or a backdrop click
1206
+ (<span class="fp" data-path="scripts/generate-dashboard.sh:756-816">scripts/generate-dashboard.sh:756-816</span>).</li>
1207
+ <li><strong>Prompt detail modal</strong> — clicking a prompt card calls <code>openModal(slug)</code>,
1208
+ which renders the full prompt content for that pipeline step in the same
1209
+ <code>.modal-overlay</code> shell (<span class="fp" data-path="scripts/generate-dashboard.sh:693-710">scripts/generate-dashboard.sh:693-710</span>).</li>
1210
+ <li><strong>Audit finding filters</strong> — on load, <code>initAuditFilters()</code> finds the
1211
+ <code>#build-audit</code> section, reads its <code>data-threshold</code>, and wires the
1212
+ <code>[data-filter]</code> buttons to show/hide <code>.finding</code> rows by severity rank
1213
+ (<span class="fp" data-path="scripts/generate-dashboard.sh:839-863">scripts/generate-dashboard.sh:839-863</span>).</li>
1214
+ </ul>
1215
+ <h2 id="the-design-token-system">The design-token system</h2>
1216
+ <p><code>lib/dashboard-theme.css</code> defines a shared set of CSS custom properties for
1217
+ colors, spacing, sizes, and radii. Component styles should prefer these tokens
1218
+ via <code>var(--token)</code> — that is what keeps light and dark mode in lockstep and the
1219
+ surface coherent. The contract is "prefer tokens," not "tokens only": the file
1220
+ still contains some component-level raw values (e.g. <code>#fff</code>, gradient stop hex
1221
+ colors, <code>rgba(...)</code>, and a few one-off pixel values like <code>99px</code>, <code>720px</code>, and
1222
+ <code>130px</code>). Promote a raw value to a token when it needs light/dark parity or
1223
+ reuse; leave genuinely one-off structural values inline rather than minting a
1224
+ single-use token.</p>
1225
+ <h3 id="colors-light-dark-parity">Colors — light + dark parity</h3>
1226
+ <p>The light palette is declared on <code>:root</code> (<span class="fp" data-path="lib/dashboard-theme.css:11-35">lib/dashboard-theme.css:11-35</span>),
1227
+ and every color token has a matching override under <code>[data-theme="dark"]</code>
1228
+ (<span class="fp" data-path="lib/dashboard-theme.css:98-120">lib/dashboard-theme.css:98-120</span>). Dark mode is not a filter — backgrounds
1229
+ go dramatically darker, text lightens but stays slightly warm, and accents shift
1230
+ lighter for contrast on dark surfaces.</p>
1231
+ <div class="filter-table"><input type="text" class="filter-input" placeholder="Filter…" aria-label="Filter table rows" disabled>
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+ <table><thead><tr><th>token</th><th>light</th><th>dark</th><th>role</th></tr></thead><tbody><tr><td><code>--bg</code></td><td><code>#f5f6fa</code></td><td><code>#0f1117</code></td><td>Page background</td></tr><tr><td><code>--bg-card</code></td><td><code>#ffffff</code></td><td><code>#1a1d2e</code></td><td>Card / panel surface</td></tr><tr><td><code>--bg-inset</code></td><td><code>#e8eaf2</code></td><td><code>#141724</code></td><td>Recessed elements (copy buttons, inputs)</td></tr><tr><td><code>--text</code></td><td><code>#1a1d2e</code></td><td><code>#e2e5f0</code></td><td>Primary text</td></tr><tr><td><code>--text-muted</code></td><td><code>#6b7294</code></td><td><code>#7c82a8</code></td><td>Secondary text</td></tr><tr><td><code>--border</code></td><td><code>#dde0ed</code></td><td><code>#2a2f45</code></td><td>Default borders</td></tr><tr><td><code>--accent</code></td><td><code>#4f46e5</code></td><td><code>#818cf8</code></td><td>Primary interactive color</td></tr><tr><td><code>--green</code></td><td><code>#059669</code></td><td><code>#34d399</code></td><td>Completed status</td></tr><tr><td><code>--blue</code></td><td><code>#2563eb</code></td><td><code>#60a5fa</code></td><td>Likely-completed status</td></tr><tr><td><code>--yellow</code></td><td><code>#d97706</code></td><td><code>#fbbf24</code></td><td>Warnings / blocked</td></tr><tr><td><code>--gray</code></td><td><code>#9ca3af</code></td><td><code>#6b7294</code></td><td>Skipped status</td></tr></tbody></table></div>
1309
+ <p>Each status color (<code>--green</code>, <code>--blue</code>, <code>--yellow</code>, <code>--gray</code>) also has <code>-bg</code> and
1310
+ <code>-border</code> companions used by badges and status dots, so a status reads correctly
1311
+ on both card and inset surfaces.</p>
1312
+ <div class="callout callout-note"><p>The table above is a high-level subset of the most visible status and surface
1313
+ tokens — not the complete set. <code>lib/dashboard-theme.css</code> (and
1314
+ <code>docs/design-system.md</code> §2) also define many component-specific semantic tokens
1315
+ such as <code>--bg-hover</code>, <code>--text-faint</code>, the <code>--next-*</code>, <code>--progress-*</code>,
1316
+ <code>--shadow-*</code>, <code>--accent-hover</code> / <code>--accent-glow</code>, and <code>--border-light</code>. Consult
1317
+ the CSS file and §2 for the full system.</p></div>
1318
+ <h3 id="spacing-the---sp--scale">Spacing — the <code>--sp-*</code> scale</h3>
1319
+ <p>All spacing comes from an 8-step scale on a 4px base
1320
+ (<span class="fp" data-path="lib/dashboard-theme.css:63-71">lib/dashboard-theme.css:63-71</span>). There are no ad-hoc margins or paddings;
1321
+ layout is composed entirely from these:</p>
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+ <table><thead><tr><th>token</th><th>value</th><th>typical use</th></tr></thead><tbody><tr><td><code>--sp-1</code></td><td><code>4px</code></td><td>minimal gaps (dot margin)</td></tr><tr><td><code>--sp-2</code></td><td><code>8px</code></td><td>tight gaps (badge padding)</td></tr><tr><td><code>--sp-3</code></td><td><code>12px</code></td><td>card gap, prompt-card padding</td></tr><tr><td><code>--sp-4</code></td><td><code>16px</code></td><td>card inner padding, section gap</td></tr><tr><td><code>--sp-5</code></td><td><code>20px</code></td><td>banner padding</td></tr><tr><td><code>--sp-6</code></td><td><code>24px</code></td><td>section margin, page side padding</td></tr><tr><td><code>--sp-8</code></td><td><code>32px</code></td><td>page top/bottom padding</td></tr><tr><td><code>--sp-10</code></td><td><code>40px</code></td><td>major section separation, footer</td></tr></tbody></table>
1373
+ <h3 id="typography-radius-layout">Typography, radius &#x26; layout</h3>
1374
+ <p>The font stacks are system-only (no web fonts): <code>--font-sans</code> for body and
1375
+ headings, <code>--font-mono</code> for commands, counts, and step numbers
1376
+ (<span class="fp" data-path="lib/dashboard-theme.css:74-75">lib/dashboard-theme.css:74-75</span>). Sizes run on a <code>--text-xs</code> … <code>--text-2xl</code>
1377
+ scale (<span class="fp" data-path="lib/dashboard-theme.css:76-81">lib/dashboard-theme.css:76-81</span>), paired with <code>--lh-*</code> line heights,
1378
+ <code>--fw-*</code> weights, and <code>--ls-*</code> letter-spacing tokens. Surfaces use <code>--radius</code>
1379
+ (10px) for cards/panels and <code>--radius-sm</code> (6px) for buttons and code blocks
1380
+ (<span class="fp" data-path="lib/dashboard-theme.css:26">lib/dashboard-theme.css:26</span>); content is centered within <code>--max-w</code> (960px)
1381
+ (<span class="fp" data-path="lib/dashboard-theme.css:93">lib/dashboard-theme.css:93</span>). Depth comes from a four-step shadow scale,
1382
+ with <code>--shadow-lg</code> reserved for modals and overlays
1383
+ (<span class="fp" data-path="lib/dashboard-theme.css:61">lib/dashboard-theme.css:61</span>).</p>
1384
+ <h2 id="customizing-the-dashboard-safely">Customizing the dashboard safely</h2>
1385
+ <p>The dashboard's coherence is enforced by convention, not by a build step — so the
1386
+ rules in <code>docs/design-system.md</code> are load-bearing (with the §6.1 caveat noted
1387
+ below). Follow the add-a-token / add-a-component flow and stay inside the token
1388
+ system.</p>
1389
+ <div class="callout callout-warning"><p><strong>Two rules that are never optional.</strong> (1) <strong>Prefer tokens for anything that
1390
+ needs light/dark parity</strong> — never hardcode a color, theme-dependent value, or
1391
+ font name in a component style; if you need a value that doesn't exist, add a
1392
+ <em>token</em> first. (Purely structural one-offs may stay inline — see the token
1393
+ section above.) (2) <strong>Always ship both modes</strong> —
1394
+ every new color token needs a <code>:root</code> value <em>and</em> a <code>[data-theme="dark"]</code>
1395
+ override, and every change must be checked in light <em>and</em> dark. Skipping the dark
1396
+ override leaves the token undefined in dark mode and breaks the surface.</p></div>
1397
+ <p>To add a token: declare it on <code>:root</code> in the light section of
1398
+ <code>lib/dashboard-theme.css</code>, add the dark override under <code>[data-theme="dark"]</code>,
1399
+ then reference it as <code>var(--token)</code>. Note that <code>docs/design-system.md</code> §6.1 is
1400
+ stale here — it still says to add the dark override to a
1401
+ <code>@media (prefers-color-scheme: dark)</code> block, but no such block exists in
1402
+ <code>lib/dashboard-theme.css</code>; the dark tokens live only under the <code>[data-theme="dark"]</code>
1403
+ attribute selector. Follow the code, not §6.1. To add a component: add its styles to the right section of the
1404
+ theme file, reuse existing tokens (add new ones first if needed), wire its markup
1405
+ into the generator JS, and document it in §3. New components should reuse
1406
+ established patterns — for example, collapsible sections reuse the same
1407
+ <code>.phase-hdr</code> + <code>togglePhase()</code> mechanism as pipeline phases, and detail views
1408
+ reuse <code>.modal-overlay</code>.</p>
1409
+ <p>Also avoid: <code>!important</code> (restructure selectors instead), any second theme
1410
+ mechanism (the <code>[data-theme]</code> toggle is the only one), and external resource
1411
+ references — the generated HTML must stay self-contained. Dark mode is driven by
1412
+ the inline bootstrap that reads <code>localStorage.getItem('scaffold-theme')</code>, falling
1413
+ back to <code>prefers-color-scheme</code> on first visit
1414
+ (<span class="fp" data-path="scripts/generate-dashboard.sh:438">scripts/generate-dashboard.sh:438</span>), and the <code>.theme-toggle</code> button flips
1415
+ the <code>[data-theme]</code> attribute and persists the choice via
1416
+ <code>localStorage.setItem('scaffold-theme', …)</code>
1417
+ (<span class="fp" data-path="scripts/generate-dashboard.sh:817-823">scripts/generate-dashboard.sh:817-823</span>).</p>
1418
+ <h2 id="visual-testing">Visual testing</h2>
1419
+ <p>Reference guides are verified manually with a screenshot, and the dashboard
1420
+ itself is verified the same way: after any change to
1421
+ <code>scripts/generate-dashboard.sh</code>, <code>lib/dashboard-theme.css</code>, or a dashboard test,
1422
+ render it and look at it in a browser. There is no pixel-diff gate — a human (or
1423
+ an agent driving Playwright MCP) confirms the rendering.</p>
1424
+ <pre><code class="language-bash">make dashboard-test # writes tests/screenshots/dashboard-test.html
1425
+ </code></pre>
1426
+ <p>Then drive Playwright MCP over the generated file: <code>browser_navigate</code> to its
1427
+ <code>file://</code> path, <code>browser_resize</code> to 1280×800 then 375×812, take a
1428
+ <code>browser_take_screenshot</code> at each. For dark mode, don't rely on emulating
1429
+ <code>prefers-color-scheme</code> after the page has loaded — the inline bootstrap reads it
1430
+ only once, so the page stays on whatever <code>[data-theme]</code> is already set. Instead,
1431
+ either set <code>localStorage('scaffold-theme', 'dark')</code> and reload, or click the
1432
+ <code>.theme-toggle</code> button; then confirm
1433
+ <code>document.documentElement.dataset.theme === 'dark'</code> <strong>before</strong> capturing the
1434
+ dark screenshots (and clear/set the key back for light shots). Also exercise the
1435
+ interactive bits (expand/collapse a phase, a Beads filter, a modal), and
1436
+ <code>browser_snapshot</code> to sanity-check accessibility.</p>
1437
+ <p>The minimum coverage for any dashboard change is desktop + mobile in both light
1438
+ and dark mode, plus the interactive elements, compared against the committed
1439
+ baselines.</p>
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+ <table><thead><tr><th>Path</th><th>Role</th></tr></thead><tbody><tr><td><code>tests/screenshots/dashboard-test.html</code></td><td>Generated test fixture (from <code>make dashboard-test</code>)</td></tr><tr><td><code>tests/screenshots/baseline/</code></td><td>Committed baselines</td></tr><tr><td><code>tests/screenshots/current/</code></td><td>New screenshots (gitignored); name <code>{feature}_{viewport}_{state}.png</code></td></tr></tbody></table>
1462
+ <p>Update a baseline only for an intentional visual change — copy the new shot from
1463
+ <code>current/</code> to <code>baseline/</code> and commit it. Full workflow and naming live in
1464
+ <code>docs/tdd-standards.md</code> §7 and the design rules in <code>docs/design-system.md</code>.</p></main>
1465
+ </div>
1466
+ <script>(function(){
1467
+ var LS_KEY = 'guide-theme';
1468
+ function applyTheme(t) {
1469
+ document.documentElement.setAttribute('data-theme', t);
1470
+ }
1471
+
1472
+ document.addEventListener('DOMContentLoaded', function() {
1473
+ // ─── Theme toggle ────────────────────────────────────────────────────────
1474
+ document.querySelectorAll('[data-action="theme"]').forEach(function(btn) {
1475
+ btn.addEventListener('click', function() {
1476
+ var current = document.documentElement.getAttribute('data-theme');
1477
+ var next = current === 'dark' ? 'light' : 'dark';
1478
+ applyTheme(next);
1479
+ try { localStorage.setItem(LS_KEY, next); } catch(e) {}
1480
+ });
1481
+ });
1482
+
1483
+ // ─── Mobile nav ──────────────────────────────────────────────────────────
1484
+ document.querySelectorAll('[data-action="nav"]').forEach(function(btn) {
1485
+ btn.addEventListener('click', function() {
1486
+ var rail = document.querySelector('.rail');
1487
+ if (rail) rail.classList.toggle('open');
1488
+ });
1489
+ });
1490
+
1491
+ // ─── Copy buttons ─────────────────────────────────────────────────────────
1492
+ document.querySelectorAll('pre').forEach(function(pre) {
1493
+ if (!pre.parentNode) return;
1494
+ var wrapper = document.createElement('div');
1495
+ wrapper.className = 'code';
1496
+ pre.parentNode.insertBefore(wrapper, pre);
1497
+ wrapper.appendChild(pre);
1498
+ var btn = document.createElement('button');
1499
+ btn.className = 'copy-btn';
1500
+ btn.textContent = 'Copy';
1501
+ btn.addEventListener('click', function() {
1502
+ var text = pre.textContent || '';
1503
+ if (navigator.clipboard && navigator.clipboard.writeText) {
1504
+ navigator.clipboard.writeText(text).then(function() {
1505
+ btn.textContent = 'Copied';
1506
+ setTimeout(function() { btn.textContent = 'Copy'; }, 1200);
1507
+ }, function() {
1508
+ btn.textContent = 'Copy';
1509
+ });
1510
+ }
1511
+ });
1512
+ wrapper.insertBefore(btn, pre);
1513
+ });
1514
+
1515
+ // ─── Tabs ─────────────────────────────────────────────────────────────────
1516
+ document.querySelectorAll('.tabs').forEach(function(group) {
1517
+ group.querySelectorAll('.tab-btn').forEach(function(btn) {
1518
+ btn.addEventListener('click', function() {
1519
+ var idx = btn.getAttribute('data-tab');
1520
+ group.querySelectorAll('.tab-btn').forEach(function(b) {
1521
+ b.classList.toggle('active', b === btn);
1522
+ });
1523
+ group.querySelectorAll('.tabpane').forEach(function(pane) {
1524
+ pane.classList.toggle('active', pane.getAttribute('data-tab') === idx);
1525
+ });
1526
+ });
1527
+ });
1528
+ });
1529
+
1530
+ // ─── Filter tables ────────────────────────────────────────────────────────
1531
+ document.querySelectorAll('.filter-input').forEach(function(input) {
1532
+ input.addEventListener('input', function() {
1533
+ var q = input.value.toLowerCase();
1534
+ var container = input.closest('.filter-table');
1535
+ if (!container) return;
1536
+ container.querySelectorAll('tbody tr').forEach(function(row) {
1537
+ var text = (row.textContent || '').toLowerCase();
1538
+ row.style.display = text.includes(q) ? '' : 'none';
1539
+ });
1540
+ });
1541
+ });
1542
+
1543
+ // ─── Scrollspy ────────────────────────────────────────────────────────────
1544
+ if (typeof IntersectionObserver === 'undefined') return;
1545
+ var headings = document.querySelectorAll('h2[id],h3[id]');
1546
+ if (!headings.length) return;
1547
+ var observer = new IntersectionObserver(function(entries) {
1548
+ entries.forEach(function(entry) {
1549
+ if (!entry.isIntersecting) return;
1550
+ var id = entry.target.getAttribute('id');
1551
+ document.querySelectorAll('.toc a').forEach(function(a) {
1552
+ a.classList.toggle('active', a.getAttribute('href') === '#' + id);
1553
+ });
1554
+ });
1555
+ }, { rootMargin: '0px 0px -70% 0px', threshold: 0 });
1556
+ headings.forEach(function(h) { observer.observe(h); });
1557
+ });
1558
+ })();</script>
1559
+ </body>
1560
+ </html>