@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,1617 @@
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>Concepts &amp; Glossary</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>Concepts &amp; Glossary</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="#how-to-read-this-guide">How to read this guide</a></li><li class="toc-2"><a href="#pipeline-concepts">Pipeline concepts</a></li><li class="toc-3"><a href="#phase">Phase</a></li><li class="toc-3"><a href="#planning-vs-build-regime">Planning vs. build regime</a></li><li class="toc-3"><a href="#dependencies-hard-gate">dependencies (hard gate)</a></li><li class="toc-3"><a href="#reads-soft-reference">reads (soft reference)</a></li><li class="toc-3"><a href="#conditional-if-needed">Conditional / if-needed</a></li><li class="toc-3"><a href="#stateless-step">Stateless step</a></li><li class="toc-3"><a href="#create-vs-update-mode">CREATE vs. UPDATE mode</a></li><li class="toc-3"><a href="#methodology-preset">Methodology preset</a></li><li class="toc-3"><a href="#depth-15">Depth (1–5)</a></li><li class="toc-3"><a href="#overlay">Overlay</a></li><li class="toc-2"><a href="#observability-concepts">Observability concepts</a></li><li class="toc-3"><a href="#ledger">Ledger</a></li><li class="toc-3"><a href="#event">Event</a></li><li class="toc-3"><a href="#adapter">Adapter</a></li><li class="toc-3"><a href="#lens-ai">Lens (A–I)</a></li><li class="toc-3"><a href="#finding">Finding</a></li><li class="toc-3"><a href="#audit-verdict">Audit verdict</a></li><li class="toc-3"><a href="#fix-threshold">fix_threshold</a></li><li class="toc-3"><a href="#--fix-flow">--fix flow</a></li><li class="toc-3"><a href="#stall-signal">Stall signal</a></li><li class="toc-3"><a href="#phase-boundary-audit">Phase-boundary audit</a></li><li class="toc-3"><a href="#doc-conformance-channel">doc-conformance channel</a></li><li class="toc-2"><a href="#knowledge-concepts">Knowledge concepts</a></li><li class="toc-3"><a href="#knowledge-entry">Knowledge entry</a></li><li class="toc-3"><a href="#volatility-tier">Volatility tier</a></li><li class="toc-3"><a href="#knowledge-gap-signal">Knowledge-gap signal</a></li><li class="toc-2"><a href="#review-concepts">Review concepts</a></li><li class="toc-3"><a href="#channel">Channel</a></li><li class="toc-3"><a href="#compensating-pass">Compensating pass</a></li><li class="toc-3"><a href="#reconcile">Reconcile</a></li><li class="toc-3"><a href="#finding-key">finding_key</a></li><li class="toc-3"><a href="#mmr-verdict">MMR verdict</a></li><li class="toc-2"><a href="#multi-agent-concepts">Multi-agent concepts</a></li><li class="toc-3"><a href="#worktree">Worktree</a></li><li class="toc-3"><a href="#worktree-identity">Worktree identity</a></li><li class="toc-3"><a href="#ledger-harvest">Ledger harvest</a></li><li class="toc-3"><a href="#teardown">Teardown</a></li><li class="toc-2"><a href="#see-also">See also</a></li></ul></nav></aside>
1092
+ <main class="content"><h2 id="how-to-read-this-guide">How to read this guide</h2>
1093
+ <p>Scaffold's other guides each go deep on one system; this one is the <strong>map of the
1094
+ vocabulary</strong> they share. Every term below gets a short definition and a link to
1095
+ the guide that owns the full story. When two guides use the same word slightly
1096
+ differently (a "verdict" in MMR vs. in the audit engine; a "lens" that lives in
1097
+ the audit but reasons about the knowledge base), this guide is where the seam is
1098
+ named.</p>
1099
+ <p>Terms cluster into four families:</p>
1100
+ <ul>
1101
+ <li><strong>Pipeline</strong> — how an idea becomes a build-ready spec.</li>
1102
+ <li><strong>Observability</strong> — the durable record of what the build actually did.</li>
1103
+ <li><strong>Review</strong> — how independent models gate changes.</li>
1104
+ <li><strong>Multi-agent</strong> — how parallel worktrees coordinate without stepping on each other.</li>
1105
+ </ul>
1106
+ <div class="filter-table"><input type="text" class="filter-input" placeholder="Filter…" aria-label="Filter table rows" disabled>
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
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
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+
1189
+
1190
+
1191
+
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
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
+ <table><thead><tr><th>Term</th><th>Cluster</th><th>See also</th></tr></thead><tbody><tr><td>Phase</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Planning vs. build regime</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td><code>dependencies</code> (hard gate)</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td><code>reads</code> (soft reference)</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Conditional / <code>if-needed</code></td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Stateless step</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>CREATE vs. UPDATE mode</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Methodology preset</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Depth (1–5)</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Overlay</td><td>Pipeline</td><td><a href="../pipeline/index.md">pipeline</a></td></tr><tr><td>Ledger</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Event</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Adapter</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Lens (A–I)</td><td>Observability</td><td><a href="../observability/index.md">observability</a> · <a href="../knowledge-freshness/index.md">knowledge-freshness</a></td></tr><tr><td>Finding</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Audit verdict</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td><code>fix_threshold</code></td><td>Observability · Review</td><td><a href="../observability/index.md">observability</a> · <a href="../mmr/index.md">mmr</a></td></tr><tr><td><code>--fix</code> flow</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Stall signal</td><td>Observability</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Phase-boundary audit</td><td>Observability · Pipeline</td><td><a href="../observability/index.md">observability</a> · <a href="../pipeline/index.md">pipeline</a></td></tr><tr><td><code>doc-conformance</code> channel</td><td>Observability · Review</td><td><a href="../observability/index.md">observability</a> · <a href="../mmr/index.md">mmr</a></td></tr><tr><td>Knowledge entry</td><td>Knowledge</td><td><a href="../knowledge-freshness/index.md">knowledge-freshness</a> · <a href="../knowledge/index.md">knowledge</a></td></tr><tr><td>Volatility tier</td><td>Knowledge</td><td><a href="../knowledge-freshness/index.md">knowledge-freshness</a></td></tr><tr><td>Knowledge-gap signal</td><td>Knowledge</td><td><a href="../knowledge-freshness/index.md">knowledge-freshness</a></td></tr><tr><td>Channel</td><td>Review</td><td><a href="../mmr/index.md">mmr</a> · <a href="../review-workflow/index.md">review-workflow</a></td></tr><tr><td>Compensating pass</td><td>Review</td><td><a href="../mmr/index.md">mmr</a></td></tr><tr><td>Reconcile</td><td>Review</td><td><a href="../mmr/index.md">mmr</a></td></tr><tr><td><code>finding_key</code></td><td>Review</td><td><a href="../mmr/index.md">mmr</a></td></tr><tr><td>MMR verdict</td><td>Review</td><td><a href="../mmr/index.md">mmr</a></td></tr><tr><td>Worktree</td><td>Multi-agent</td><td><a href="../multi-agent/index.md">multi-agent</a> · <a href="../observability/index.md">observability</a></td></tr><tr><td>Worktree identity</td><td>Multi-agent</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Ledger harvest</td><td>Multi-agent</td><td><a href="../observability/index.md">observability</a></td></tr><tr><td>Teardown</td><td>Multi-agent</td><td><a href="../observability/index.md">observability</a></td></tr></tbody></table></div>
1282
+ <h2 id="pipeline-concepts">Pipeline concepts</h2>
1283
+ <p>These describe the meta-prompt pipeline that turns an idea into a frozen,
1284
+ build-ready spec. Full treatment: <a href="../pipeline/index.md">the pipeline guide</a>.</p>
1285
+ <h3 id="phase">Phase</h3>
1286
+ <p>One of the <strong>16 ordered stages</strong> the pipeline divides into, numbered 0 (vision)
1287
+ through 15 (build). The phase list, slugs, numbers, and display names are defined
1288
+ exactly once, in the <code>PHASES</code> constant
1289
+ <span class="fp" data-path="src/types/frontmatter.ts:6">src/types/frontmatter.ts:6</span>; every doc, skill, and command resolves
1290
+ against it. Steps within a phase run in <code>order</code> sequence (phase N occupies the
1291
+ N00–N99 band). See <a href="../pipeline/index.md#the-16-phases-at-a-glance">the pipeline guide</a>.</p>
1292
+ <h3 id="planning-vs-build-regime">Planning vs. build regime</h3>
1293
+ <p>The pipeline splits into two regimes. <strong>Planning</strong> (phases 0–14) is <em>stateful</em>
1294
+ and <em>sequential</em> — each step produces a durable artifact and is run roughly once,
1295
+ in dependency order, working toward a frozen spec. <strong>Build</strong> (phase 15) is
1296
+ <em>stateless</em> and <em>on-demand</em> — the execution loops you run repeatedly while
1297
+ actually writing code. See <a href="../pipeline/index.md#the-mental-model">the pipeline guide</a>.</p>
1298
+ <h3 id="dependencies-hard-gate"><code>dependencies</code> (hard gate)</h3>
1299
+ <p>A step's frontmatter <code>dependencies</code> <span class="fp" data-path="src/types/frontmatter.ts:114">src/types/frontmatter.ts:114</span> are
1300
+ <strong>hard gates</strong>: <code>scaffold run</code> refuses a step until each dependency is
1301
+ <code>completed</code>, <code>skipped</code>, or disabled by the resolved pipeline/overlay (a disabled
1302
+ dep counts as satisfied). Contrast <code>reads</code>. See
1303
+ <a href="../pipeline/index.md#why-a-step-is-blocked">Why a step is blocked</a>.</p>
1304
+ <h3 id="reads-soft-reference"><code>reads</code> (soft reference)</h3>
1305
+ <p>A step's <code>reads</code> <span class="fp" data-path="src/types/frontmatter.ts:122">src/types/frontmatter.ts:122</span> are <strong>soft references</strong> — a
1306
+ step uses an upstream artifact if it's present, but a missing read never blocks
1307
+ execution (the assembler silently skips it). The
1308
+ <a href="../pipeline/index.md#why-a-step-is-blocked">pipeline guide</a> explains why
1309
+ <code>reads ≠ dependencies</code> is a common trip-up.</p>
1310
+ <h3 id="conditional-if-needed">Conditional / <code>if-needed</code></h3>
1311
+ <p>A step marked <code>conditional: 'if-needed'</code> <span class="fp" data-path="src/types/frontmatter.ts:118">src/types/frontmatter.ts:118</span> is
1312
+ enabled but only <em>applies</em> to certain project shapes (e.g. <code>database-schema</code>
1313
+ runs only if your project has a database layer). Conditional steps that don't
1314
+ apply count as "satisfied" for dependency purposes. See
1315
+ <a href="../pipeline/index.md#conditional-if-needed-steps">Conditional steps</a>.</p>
1316
+ <h3 id="stateless-step">Stateless step</h3>
1317
+ <p>A phase-15 build step with <code>stateless: true</code> <span class="fp" data-path="src/types/frontmatter.ts:126">src/types/frontmatter.ts:126</span>
1318
+ — it carries no completion state and can be run over and over (the agent loops,
1319
+ resume commands, <code>quick-task</code>, <code>new-enhancement</code>). The pipeline never tracks or
1320
+ gates these. See <a href="../pipeline/index.md#the-mental-model">the pipeline guide</a>.</p>
1321
+ <h3 id="create-vs-update-mode">CREATE vs. UPDATE mode</h3>
1322
+ <p>Every document-creating prompt detects whether its output file already exists. On
1323
+ first run it's <strong>CREATE mode</strong>; on a re-run it's <strong>UPDATE mode</strong>, which preserves
1324
+ human/team customizations and changes only what genuinely needs to change. This
1325
+ is what makes planning phases safe to iterate. See
1326
+ <a href="../pipeline/index.md#create-vs-update-mode">CREATE vs UPDATE mode</a>.</p>
1327
+ <h3 id="methodology-preset">Methodology preset</h3>
1328
+ <p><em>Which</em> steps are enabled. Three presets ship — <code>mvp</code>, <code>custom</code> (balanced), and
1329
+ <code>deep</code> (the schema default and most thorough). Presets are layered with
1330
+ <strong>overlays</strong>. See <a href="../pipeline/index.md#methodology-depth">Methodology &#x26; depth</a>.</p>
1331
+ <h3 id="depth-15">Depth (1–5)</h3>
1332
+ <p><em>How thorough</em> each enabled step's output is, on a 1–5 scale from Minimal to
1333
+ Exhaustive (depth 3 is the recommended default). Orthogonal to the preset:
1334
+ the preset picks the steps, depth dials each one's detail. At depth 4–5 some
1335
+ review/validation steps add external- or multi-model dispatch. See
1336
+ <a href="../pipeline/index.md#depth-15">Depth</a>.</p>
1337
+ <h3 id="overlay">Overlay</h3>
1338
+ <p>A preset layer (<code>content/methodology/*-overlay.yml</code>) applied on top of a
1339
+ preset. Overlays are either <strong>project-type</strong> (keyed by <code>project-type</code>, e.g.
1340
+ web-app, mobile, CLI, library) or <strong>structural</strong> (e.g. <code>multi-service</code>, which
1341
+ has no <code>project-type</code> and is activated by the presence of <code>services[]</code> in
1342
+ config). Most overlays only <strong>inject domain knowledge</strong> into existing steps; a
1343
+ few <strong>enable whole step families</strong> (game, multi-service). See
1344
+ <a href="../pipeline/index.md#project-type-playbooks">Project-type playbooks</a>.</p>
1345
+ <h2 id="observability-concepts">Observability concepts</h2>
1346
+ <p>These describe Build Observability — the durable record of what the build did,
1347
+ and the audit that checks it against the planning docs. Full treatment:
1348
+ <a href="../observability/index.md">the build observability guide</a>.</p>
1349
+ <h3 id="ledger">Ledger</h3>
1350
+ <p>The append-only <code>.scaffold/activity.jsonl</code> file where every durable observation
1351
+ lands as one JSON object per line. Writes are lock-guarded so parallel worktrees
1352
+ never corrupt it, each event is capped at 4 KiB, and secrets and home paths are
1353
+ redacted on the way in and out. See <a href="../observability/index.md#the-ledger">The ledger</a>.</p>
1354
+ <h3 id="event">Event</h3>
1355
+ <p>One typed entry in the ledger, written via <code>scaffold observe event &#x3C;type> …</code>.
1356
+ There are <strong>nine event types</strong> <span class="fp" data-path="src/observability/engine/types.ts:9">src/observability/engine/types.ts:9</span>
1357
+ (<code>task_claimed</code>, <code>task_completed</code>, <code>decision_recorded</code>, <code>blocker_hit</code>,
1358
+ <code>blocker_resolved</code>, <code>pr_opened</code>, <code>progress_heartbeat</code>, <code>finding_acknowledged</code>,
1359
+ <code>knowledge_gap_signal</code>), each with its own payload allow-list. See
1360
+ <a href="../observability/index.md#the-nine-event-types">The nine event types</a>.</p>
1361
+ <h3 id="adapter">Adapter</h3>
1362
+ <p>A component that <em>synthesizes</em> events from the surrounding tools (git, GitHub,
1363
+ MMR jobs, pipeline state, test runs) so the timeline reflects more than what
1364
+ agents chose to record. Eight adapters exist
1365
+ <span class="fp" data-path="src/observability/engine/types.ts:69">src/observability/engine/types.ts:69</span>; five emit replay events, three are
1366
+ availability probes. See <a href="../observability/index.md#adapters">Adapters</a>.</p>
1367
+ <h3 id="lens-ai">Lens (A–I)</h3>
1368
+ <p>An independent audit check function inside <code>scaffold observe audit</code>. The suite
1369
+ runs <strong>nine lenses, A through I</strong> — TDD coverage, AC coverage, coding-standards
1370
+ drift, tech-stack drift, design-system drift, scope, decisions, cross-doc
1371
+ consistency, and knowledge gaps. Lenses A–G run under <code>--scope code</code>, H and I
1372
+ under <code>--scope docs</code>. See
1373
+ <a href="../observability/index.md#the-nine-lens-audit">The nine-lens audit</a>. <strong>Lens I</strong>
1374
+ (<code>I-knowledge-gaps</code>) lives in the audit but reasons about the knowledge base —
1375
+ its full behavior is in <a href="../knowledge-freshness/index.md#lens-i-gap-detection-suppression">the knowledge-freshness guide</a>.</p>
1376
+ <h3 id="finding">Finding</h3>
1377
+ <p>A single issue a lens reports, carrying a severity (<code>P0</code>–<code>P3</code>), a title, a
1378
+ source doc, and an optional fix hint. Findings can be <code>open</code>, <code>acknowledged</code>
1379
+ (silenced via <code>scaffold observe ack</code>), or <code>skipped</code> (a lens whose required
1380
+ adapter was missing). See
1381
+ <a href="../observability/index.md#the-nine-lens-audit">The nine-lens audit</a>.</p>
1382
+ <h3 id="audit-verdict">Audit verdict</h3>
1383
+ <p>The overall result of an audit run. The engine computes exactly <strong>three</strong>
1384
+ verdicts <span class="fp" data-path="src/observability/engine/types.ts:6">src/observability/engine/types.ts:6</span>: <code>pass</code> (no blocking
1385
+ findings, no skipped lenses), <code>degraded-pass</code> (no blocking findings but ≥1 lens
1386
+ skipped), and <code>blocked</code> (≥1 open finding at or above <code>fix_threshold</code>). Note
1387
+ this is <strong>not</strong> the same set as MMR's four verdicts — see <a href="#mmr-verdict">MMR verdict</a>.
1388
+ See <a href="../observability/index.md#verdict-taxonomy">Verdict taxonomy</a>.</p>
1389
+ <h3 id="fix-threshold"><code>fix_threshold</code></h3>
1390
+ <p>The severity cutoff that decides which findings count as <em>blocking</em>. A finding
1391
+ blocks when its status is <code>open</code> and its severity is at or above the threshold
1392
+ (default <strong>P2</strong>). The threshold never hides findings — it only decides which
1393
+ ones drive a <code>blocked</code> verdict. The same name and default govern the MMR gate.
1394
+ See <a href="../observability/index.md#verdict-taxonomy"><code>fix_threshold</code></a> and the
1395
+ <a href="../mmr/index.md#the-gate-the-four-verdicts">MMR gate</a>.</p>
1396
+ <h3 id="--fix-flow"><code>--fix</code> flow</h3>
1397
+ <p><code>scaffold observe audit --fix</code> doesn't just report blocking findings — it
1398
+ dispatches an agent to fix each one, verifies the fix with a single-lens
1399
+ re-audit, and writes a post-fix report, all under abort-safe stashing. See
1400
+ <a href="../observability/index.md#the---fix-flow">The --fix flow</a>.</p>
1401
+ <h3 id="stall-signal">Stall signal</h3>
1402
+ <p>A staleness alert raised on the "Needs Attention" surface when
1403
+ <code>scaffold observe progress</code> runs — e.g. a claimed task with no recent activity,
1404
+ a PR that hasn't merged, an unaddressed blocker. Six signals are defined; five
1405
+ fire today. Thresholds are configurable under <code>stall:</code> in
1406
+ <code>.scaffold/observability.yaml</code>. See
1407
+ <a href="../observability/index.md#stall-detection-the-six-signals">Stall detection</a>.</p>
1408
+ <h3 id="phase-boundary-audit">Phase-boundary audit</h3>
1409
+ <p>A non-gating cross-document audit that fires automatically when a planning
1410
+ document at a phase boundary is marked complete. It runs only the <code>H-cross-doc</code>
1411
+ lens at <code>scope=docs</code>, prints a one-line summary, and never blocks the state
1412
+ transition. The six boundary steps are <code>user-stories</code>, <code>tech-stack</code>,
1413
+ <code>coding-standards</code>, <code>design-system</code>, <code>implementation-plan</code>, and
1414
+ <code>implementation-playbook</code>. See
1415
+ <a href="../observability/index.md#phase-boundary-triggers">Phase-boundary triggers</a> and
1416
+ the <a href="../pipeline/index.md#phase-boundary-audits">pipeline view</a>.</p>
1417
+ <h3 id="doc-conformance-channel"><code>doc-conformance</code> channel</h3>
1418
+ <p>The seam where the audit plugs into multi-model review: a built-in MMR channel
1419
+ that runs <code>scaffold observe audit --output-mode=mmr-findings</code> and emits findings
1420
+ in MMR's <code>Finding</code> shape. Disabled by default; enable with
1421
+ <code>--channels=doc-conformance</code>. See
1422
+ <a href="../observability/index.md#mmr-doc-conformance-channel">MMR doc-conformance channel</a>
1423
+ and the <a href="../mmr/index.md#channel-architecture">MMR channel architecture</a>.</p>
1424
+ <h2 id="knowledge-concepts">Knowledge concepts</h2>
1425
+ <p>These describe the knowledge base and how it stays current. Full treatment:
1426
+ <a href="../knowledge-freshness/index.md">the knowledge-freshness guide</a> and
1427
+ <a href="../knowledge/index.md">the knowledge guide</a>.</p>
1428
+ <h3 id="knowledge-entry">Knowledge entry</h3>
1429
+ <p>A domain-expertise document under <code>content/knowledge/&#x3C;category>/&#x3C;slug>.md</code>,
1430
+ injected into prompts during assembly. Each declares a <code>name</code>, <code>volatility</code>
1431
+ tier, and a list of <code>sources</code>. See
1432
+ <a href="../knowledge/index.md">the knowledge guide</a> and
1433
+ <a href="../knowledge-freshness/index.md#adding-a-new-entry-to-the-kb">Adding a new entry</a>.</p>
1434
+ <h3 id="volatility-tier">Volatility tier</h3>
1435
+ <p>How often an entry is expected to drift, on a three-tier scale — <code>fast-moving</code>,
1436
+ <code>evolving</code> (default), <code>stable</code> — which sets the daily cron's re-audit cadence
1437
+ (14 / 60 / 180 days). See
1438
+ <a href="../knowledge-freshness/index.md#cadence-model">the cadence model</a>.</p>
1439
+ <h3 id="knowledge-gap-signal">Knowledge-gap signal</h3>
1440
+ <p>A <code>knowledge_gap_signal</code> ledger event emitted when an agent hits a topic the KB
1441
+ doesn't cover. <strong>Lens I</strong> aggregates these over a rolling 90-day window into
1442
+ P1/P2 findings, suppressing any topic an entry already covers. This is where the
1443
+ observability and knowledge-freshness systems meet. See
1444
+ <a href="../knowledge-freshness/index.md#how-a-gap-closes">How a gap closes</a>.</p>
1445
+ <h2 id="review-concepts">Review concepts</h2>
1446
+ <p>These describe Multi-Model Review (MMR). Full treatment:
1447
+ <a href="../mmr/index.md">the MMR guide</a> and
1448
+ <a href="../review-workflow/index.md">the review-workflow guide</a>.</p>
1449
+ <h3 id="channel">Channel</h3>
1450
+ <p>One independent AI reviewer in an MMR run — a separate subprocess given the same
1451
+ prompt and run in isolation. The built-in channels are <code>codex</code>, <code>gemini</code>,
1452
+ <code>claude</code>, <code>grok</code>, and the opt-in <code>doc-conformance</code>; the <code>scaffold run</code> wrappers
1453
+ add a Superpowers code-reviewer <em>agent</em> channel. A channel is pure config data,
1454
+ not per-channel code. See <a href="../mmr/index.md#channel-architecture">Channel architecture</a>.</p>
1455
+ <h3 id="compensating-pass">Compensating pass</h3>
1456
+ <p>When a channel is degraded (not installed, auth-failed, timed out), MMR runs a
1457
+ <code>claude -p</code> pass focused on that channel's strength area, labeled e.g.
1458
+ <code>[compensating: Grok-equivalent]</code>. These findings are single-source and
1459
+ low-confidence. See <a href="../mmr/index.md#degraded-mode-compensation-auth">Degraded mode</a>.</p>
1460
+ <h3 id="reconcile">Reconcile</h3>
1461
+ <p>The step that groups every channel's findings by a stable key, de-duplicates
1462
+ them, and scores each group for agreement and confidence — producing the single
1463
+ list and verdict. Agreement <em>between</em> channels raises confidence; disagreement
1464
+ surfaces ambiguity. <code>mmr reconcile</code> also folds an external agent channel's
1465
+ findings into an existing job. See
1466
+ <a href="../mmr/index.md#findings-reconciliation-verdicts">Findings, reconciliation &#x26; verdicts</a>.</p>
1467
+ <h3 id="finding-key"><code>finding_key</code></h3>
1468
+ <p>The stable identity MMR computes for a finding so the same issue can be tracked
1469
+ across rounds and acknowledgments. Line numbers are stripped from the location
1470
+ and severity is excluded, so the same issue at P1 vs. P2 collapses to one key;
1471
+ a character-5-gram shingle backs a fuzzy match for re-worded findings. See
1472
+ <a href="../mmr/index.md#stable-identity-finding-key">Stable identity</a>.</p>
1473
+ <h3 id="mmr-verdict">MMR verdict</h3>
1474
+ <p>The gate result of a review. MMR computes <strong>four</strong> verdicts: <code>pass</code>,
1475
+ <code>degraded-pass</code>, <code>blocked</code>, and <code>needs-user-decision</code> (no channel completed).
1476
+ Proceed only on <code>pass</code> or <code>degraded-pass</code>.</p>
1477
+ <div class="callout callout-warning"><p><strong>Two verdict vocabularies — don't conflate them.</strong> The MMR review gate has
1478
+ <em>four</em> verdicts (the fourth, <code>needs-user-decision</code>, fires when no channel
1479
+ completes). The Build Observability audit engine emits only <em>three</em> —
1480
+ <code>needs-user-decision</code> is <strong>not</strong> an audit-engine verdict. See
1481
+ <a href="../mmr/index.md#the-gate-the-four-verdicts">the MMR gate</a> and
1482
+ <a href="../observability/index.md#verdict-taxonomy">the audit verdict taxonomy</a>.</p></div>
1483
+ <h2 id="multi-agent-concepts">Multi-agent concepts</h2>
1484
+ <p>These describe how parallel agents share a repo without colliding. Full
1485
+ treatment: <a href="../multi-agent/index.md">the multi-agent guide</a>, with the durable
1486
+ record covered in <a href="../observability/index.md">the observability guide</a>.</p>
1487
+ <h3 id="worktree">Worktree</h3>
1488
+ <p>An isolated git working tree used for parallel agent execution, so multiple
1489
+ agents (and humans) can build different parts of a project at once without
1490
+ sharing a checkout. Each worktree has its own ledger. See
1491
+ <a href="../multi-agent/index.md">the multi-agent guide</a>.</p>
1492
+ <h3 id="worktree-identity">Worktree identity</h3>
1493
+ <p>The stable per-worktree identity recorded in <code>.scaffold/identity.json</code> on first
1494
+ write — a <code>worktree_id</code> (UUID), a <code>worktree_label</code>, and <code>created_at</code>. It's what
1495
+ lets the harvester tell one worktree's events from another's, and what stamps
1496
+ every event's <code>worktree_id</code>. See
1497
+ <a href="../observability/index.md#worktree-identity">Worktree identity</a>.</p>
1498
+ <h3 id="ledger-harvest">Ledger harvest</h3>
1499
+ <p>Copying a worktree's local ledger into the primary repo's archive <em>before</em> the
1500
+ worktree is removed, so the build's reasoning survives teardown.
1501
+ <code>harvest --recover</code> separately rotates already-harvested stale entries from
1502
+ <code>.scaffold/activity-archive/active/</code> into the monthly <code>YYYY-MM.jsonl</code> archives
1503
+ when their worktree is no longer live — it does <strong>not</strong> rescue an unharvested
1504
+ ledger; that ledger is lost once the worktree is removed. See
1505
+ <a href="../observability/index.md#harvest-recover-teardown">Harvest, recover &#x26; teardown</a>.</p>
1506
+ <h3 id="teardown">Teardown</h3>
1507
+ <p>Removing a finished worktree the safe way — <code>scripts/teardown-agent-worktree.sh</code>
1508
+ harvests the ledger first, then runs <code>git worktree remove</code>, then deletes the
1509
+ workspace branch. Harvesting before removal is what closes the
1510
+ decisions-die-at-teardown gap. See
1511
+ <a href="../observability/index.md#harvest-recover-teardown">Harvest, recover &#x26; teardown</a>.</p>
1512
+ <h2 id="see-also">See also</h2>
1513
+ <ul>
1514
+ <li><a href="../pipeline/index.md">The Scaffold Pipeline</a> — phases, dependencies, presets, depth.</li>
1515
+ <li><a href="../observability/index.md">Build Observability</a> — ledger, events, the nine lenses, verdicts, <code>--fix</code>.</li>
1516
+ <li><a href="../knowledge-freshness/index.md">Knowledge Freshness</a> — volatility tiers, gap signals, Lens I.</li>
1517
+ <li><a href="../mmr/index.md">MMR Reference</a> — channels, reconciliation, the four verdicts.</li>
1518
+ <li><a href="../multi-agent/index.md">Multi-agent</a> — worktrees and parallel execution.</li>
1519
+ <li><a href="../review-workflow/index.md">Review workflow</a> — running reviews end to end.</li>
1520
+ <li><a href="../cli/index.md">CLI reference</a> — the full command surface.</li>
1521
+ </ul></main>
1522
+ </div>
1523
+ <script>(function(){
1524
+ var LS_KEY = 'guide-theme';
1525
+ function applyTheme(t) {
1526
+ document.documentElement.setAttribute('data-theme', t);
1527
+ }
1528
+
1529
+ document.addEventListener('DOMContentLoaded', function() {
1530
+ // ─── Theme toggle ────────────────────────────────────────────────────────
1531
+ document.querySelectorAll('[data-action="theme"]').forEach(function(btn) {
1532
+ btn.addEventListener('click', function() {
1533
+ var current = document.documentElement.getAttribute('data-theme');
1534
+ var next = current === 'dark' ? 'light' : 'dark';
1535
+ applyTheme(next);
1536
+ try { localStorage.setItem(LS_KEY, next); } catch(e) {}
1537
+ });
1538
+ });
1539
+
1540
+ // ─── Mobile nav ──────────────────────────────────────────────────────────
1541
+ document.querySelectorAll('[data-action="nav"]').forEach(function(btn) {
1542
+ btn.addEventListener('click', function() {
1543
+ var rail = document.querySelector('.rail');
1544
+ if (rail) rail.classList.toggle('open');
1545
+ });
1546
+ });
1547
+
1548
+ // ─── Copy buttons ─────────────────────────────────────────────────────────
1549
+ document.querySelectorAll('pre').forEach(function(pre) {
1550
+ if (!pre.parentNode) return;
1551
+ var wrapper = document.createElement('div');
1552
+ wrapper.className = 'code';
1553
+ pre.parentNode.insertBefore(wrapper, pre);
1554
+ wrapper.appendChild(pre);
1555
+ var btn = document.createElement('button');
1556
+ btn.className = 'copy-btn';
1557
+ btn.textContent = 'Copy';
1558
+ btn.addEventListener('click', function() {
1559
+ var text = pre.textContent || '';
1560
+ if (navigator.clipboard && navigator.clipboard.writeText) {
1561
+ navigator.clipboard.writeText(text).then(function() {
1562
+ btn.textContent = 'Copied';
1563
+ setTimeout(function() { btn.textContent = 'Copy'; }, 1200);
1564
+ }, function() {
1565
+ btn.textContent = 'Copy';
1566
+ });
1567
+ }
1568
+ });
1569
+ wrapper.insertBefore(btn, pre);
1570
+ });
1571
+
1572
+ // ─── Tabs ─────────────────────────────────────────────────────────────────
1573
+ document.querySelectorAll('.tabs').forEach(function(group) {
1574
+ group.querySelectorAll('.tab-btn').forEach(function(btn) {
1575
+ btn.addEventListener('click', function() {
1576
+ var idx = btn.getAttribute('data-tab');
1577
+ group.querySelectorAll('.tab-btn').forEach(function(b) {
1578
+ b.classList.toggle('active', b === btn);
1579
+ });
1580
+ group.querySelectorAll('.tabpane').forEach(function(pane) {
1581
+ pane.classList.toggle('active', pane.getAttribute('data-tab') === idx);
1582
+ });
1583
+ });
1584
+ });
1585
+ });
1586
+
1587
+ // ─── Filter tables ────────────────────────────────────────────────────────
1588
+ document.querySelectorAll('.filter-input').forEach(function(input) {
1589
+ input.addEventListener('input', function() {
1590
+ var q = input.value.toLowerCase();
1591
+ var container = input.closest('.filter-table');
1592
+ if (!container) return;
1593
+ container.querySelectorAll('tbody tr').forEach(function(row) {
1594
+ var text = (row.textContent || '').toLowerCase();
1595
+ row.style.display = text.includes(q) ? '' : 'none';
1596
+ });
1597
+ });
1598
+ });
1599
+
1600
+ // ─── Scrollspy ────────────────────────────────────────────────────────────
1601
+ if (typeof IntersectionObserver === 'undefined') return;
1602
+ var headings = document.querySelectorAll('h2[id],h3[id]');
1603
+ if (!headings.length) return;
1604
+ var observer = new IntersectionObserver(function(entries) {
1605
+ entries.forEach(function(entry) {
1606
+ if (!entry.isIntersecting) return;
1607
+ var id = entry.target.getAttribute('id');
1608
+ document.querySelectorAll('.toc a').forEach(function(a) {
1609
+ a.classList.toggle('active', a.getAttribute('href') === '#' + id);
1610
+ });
1611
+ });
1612
+ }, { rootMargin: '0px 0px -70% 0px', threshold: 0 });
1613
+ headings.forEach(function(h) { observer.observe(h); });
1614
+ });
1615
+ })();</script>
1616
+ </body>
1617
+ </html>