@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.
- package/content/guides/AUTHORING.md +143 -0
- package/content/guides/cli/index.html +1502 -0
- package/content/guides/cli/index.md +206 -0
- package/content/guides/concepts/index.html +1617 -0
- package/content/guides/concepts/index.md +347 -0
- package/content/guides/dashboard/index.html +1560 -0
- package/content/guides/dashboard/index.md +264 -0
- package/content/guides/index.html +1 -1
- package/content/guides/install/.diagrams/diagram-0.svg +1 -0
- package/content/guides/install/.diagrams/manifest.json +3 -0
- package/content/guides/install/index.html +1300 -0
- package/content/guides/install/index.md +186 -0
- package/content/guides/knowledge/.diagrams/diagram-0.svg +1 -0
- package/content/guides/knowledge/.diagrams/manifest.json +3 -0
- package/content/guides/knowledge/index.html +1412 -0
- package/content/guides/knowledge/index.md +209 -0
- package/content/guides/knowledge-freshness/.diagrams/diagram-0.svg +1 -0
- package/content/guides/knowledge-freshness/.diagrams/manifest.json +3 -0
- package/content/guides/knowledge-freshness/index.html +2442 -0
- package/content/guides/knowledge-freshness/index.md +893 -0
- package/content/guides/mmr/index.html +35 -17
- package/content/guides/mmr/index.md +39 -16
- package/content/guides/multi-agent/.diagrams/diagram-0.svg +1 -0
- package/content/guides/multi-agent/.diagrams/manifest.json +3 -0
- package/content/guides/multi-agent/index.html +1362 -0
- package/content/guides/multi-agent/index.md +243 -0
- package/content/guides/observability/.diagrams/diagram-0.svg +1 -0
- package/content/guides/observability/.diagrams/diagram-1.svg +1 -0
- package/content/guides/observability/.diagrams/diagram-2.svg +1 -0
- package/content/guides/observability/.diagrams/diagram-3.svg +1 -0
- package/content/guides/observability/.diagrams/manifest.json +6 -0
- package/content/guides/observability/index.html +2904 -0
- package/content/guides/observability/index.md +1097 -0
- package/content/guides/pipeline/.diagrams/diagram-0.svg +1 -0
- package/content/guides/pipeline/.diagrams/diagram-1.svg +1 -0
- package/content/guides/pipeline/.diagrams/manifest.json +4 -0
- package/content/guides/pipeline/index.html +1632 -0
- package/content/guides/pipeline/index.md +387 -0
- package/content/guides/review-workflow/.diagrams/diagram-0.svg +1 -0
- package/content/guides/review-workflow/.diagrams/diagram-1.svg +1 -0
- package/content/guides/review-workflow/.diagrams/manifest.json +4 -0
- package/content/guides/review-workflow/index.html +1437 -0
- package/content/guides/review-workflow/index.md +248 -0
- package/dist/guides/build.d.ts.map +1 -1
- package/dist/guides/build.js +7 -2
- package/dist/guides/build.js.map +1 -1
- package/dist/guides/build.test.js +8 -0
- package/dist/guides/build.test.js.map +1 -1
- package/dist/guides/directives-cite.test.d.ts +2 -0
- package/dist/guides/directives-cite.test.d.ts.map +1 -0
- package/dist/guides/directives-cite.test.js +26 -0
- package/dist/guides/directives-cite.test.js.map +1 -0
- package/dist/guides/directives.d.ts +1 -0
- package/dist/guides/directives.d.ts.map +1 -1
- package/dist/guides/directives.js +24 -0
- package/dist/guides/directives.js.map +1 -1
- package/dist/guides/links.d.ts +14 -0
- package/dist/guides/links.d.ts.map +1 -0
- package/dist/guides/links.js +56 -0
- package/dist/guides/links.js.map +1 -0
- package/dist/guides/links.test.d.ts +2 -0
- package/dist/guides/links.test.d.ts.map +1 -0
- package/dist/guides/links.test.js +72 -0
- package/dist/guides/links.test.js.map +1 -0
- package/dist/guides/render.d.ts +1 -0
- package/dist/guides/render.d.ts.map +1 -1
- package/dist/guides/render.js +1 -1
- package/dist/guides/render.js.map +1 -1
- package/dist/guides/sanitize.d.ts.map +1 -1
- package/dist/guides/sanitize.js +1 -0
- package/dist/guides/sanitize.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1412 @@
|
|
|
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>Knowledge Base</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>Knowledge Base</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-knowledge-base-is">What the knowledge base is</a></li><li class="toc-2"><a href="#how-entries-are-injected-during-assembly">How entries are injected during assembly</a></li><li class="toc-3"><a href="#deep-guidance-vs-summary-the-dual-channel-split">Deep Guidance vs. Summary (the dual-channel split)</a></li><li class="toc-3"><a href="#the-gap-signal-tail">The gap-signal tail</a></li><li class="toc-2"><a href="#browsing-and-overriding-entries">Browsing and overriding entries</a></li><li class="toc-3"><a href="#--knowledge-root-a-separate-resolver">--knowledge-root (a separate resolver)</a></li><li class="toc-2"><a href="#authoring-a-new-entry">Authoring a new entry</a></li><li class="toc-3"><a href="#frontmatter-fields">Frontmatter fields</a></li><li class="toc-2"><a href="#see-also">See also</a></li></ul></nav></aside>
|
|
1092
|
+
<main class="content"><h2 id="what-the-knowledge-base-is">What the knowledge base is</h2>
|
|
1093
|
+
<p>The knowledge base (KB) is a curated library of domain-expertise entries under
|
|
1094
|
+
<code>content/knowledge/</code>, organized into category directories (<code>backend</code>, <code>core</code>,
|
|
1095
|
+
<code>web-app</code>, <code>web3</code>, <code>ml</code>, …). Each entry is a single Markdown file with
|
|
1096
|
+
YAML frontmatter and a body. During prompt assembly, the entries a pipeline step
|
|
1097
|
+
declares are spliced into that step's <strong>Knowledge Base</strong> section so the agent
|
|
1098
|
+
running the step gets the relevant expertise inline — no web lookup, no
|
|
1099
|
+
guessing.</p>
|
|
1100
|
+
<p>The KB is <strong>orthogonal to the pipeline</strong>: a step references entries by <code>name</code>,
|
|
1101
|
+
and the same entry can be reused by many steps. Entries are versioned as a set
|
|
1102
|
+
via <code>content/knowledge/VERSION</code> (bumped on merge by the freshness workflow).</p>
|
|
1103
|
+
<div class="callout callout-note"><p><strong>Scope of this guide.</strong> This guide covers <em>authoring</em>, <em>injection</em>, and
|
|
1104
|
+
<em>overriding</em> entries. The freshness lifecycle — volatility cadence, the daily
|
|
1105
|
+
audit cron, the five PR gates, Lens-I gap detection, and the source
|
|
1106
|
+
allowlist — lives in the
|
|
1107
|
+
<a href="../knowledge-freshness/index.md">Knowledge Freshness guide</a>, along with the
|
|
1108
|
+
live entry/category counts (see its KB inventory section). Counts and tiers are
|
|
1109
|
+
<strong>not</strong> restated here.</p></div>
|
|
1110
|
+
<h2 id="how-entries-are-injected-during-assembly">How entries are injected during assembly</h2>
|
|
1111
|
+
<p>When <code>scaffold run <step></code> assembles a prompt, it builds a merged name→path
|
|
1112
|
+
index of every entry, loads the names the step declares, and renders each into
|
|
1113
|
+
the step's Knowledge Base section.</p>
|
|
1114
|
+
<figure class="mermaid"><svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 830.078px; background-color: transparent;" viewBox="0 0 830.078125 566.5999755859375" role="graphics-document document">#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#000000;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#552222;}#my-svg .error-text{fill:#552222;stroke:#552222;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#666;stroke:#666;}#my-svg .marker.cross{stroke:#666;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#000000;}#my-svg .cluster-label text{fill:#333;}#my-svg .cluster-label span{color:#333;}#my-svg .cluster-label span p{background-color:transparent;}#my-svg .label text,#my-svg span{fill:#000000;color:#000000;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#eee;stroke:#999;stroke-width:1px;}#my-svg .rough-node .label text,#my-svg .node .label text,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .rough-node .label,#my-svg .node .label,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .root .anchor path{fill:#666!important;stroke-width:0;stroke:#666;}#my-svg .arrowheadPath{fill:#333333;}#my-svg .edgePath .path{stroke:#666;stroke-width:1px;}#my-svg .flowchart-link{stroke:#666;fill:none;}#my-svg .edgeLabel{background-color:white;text-align:center;}#my-svg .edgeLabel p{background-color:white;}#my-svg .edgeLabel rect{opacity:0.5;background-color:white;fill:white;}#my-svg .labelBkg{background-color:rgba(255, 255, 255, 0.5);}#my-svg .cluster rect{fill:hsl(0, 0%, 98.9215686275%);stroke:#707070;stroke-width:1px;}#my-svg .cluster text{fill:#333;}#my-svg .cluster span{color:#333;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(-160, 0%, 93.3333333333%);border:1px solid #707070;border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#000000;}#my-svg rect.text{fill:none;stroke-width:0;}#my-svg .icon-shape,#my-svg .image-shape{background-color:white;text-align:center;}#my-svg .icon-shape p,#my-svg .image-shape p{background-color:white;padding:2px;}#my-svg .icon-shape .label rect,#my-svg .image-shape .label rect{opacity:0.5;background-color:white;fill:white;}#my-svg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#my-svg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#my-svg .node .neo-node{stroke:#999;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node path{stroke:url(#my-svg-gradient);stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#999;filter:none;}#my-svg [data-look="neo"].node circle{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}<g><marker id="my-svg_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker><marker id="my-svg_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker><marker id="my-svg_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"></path></marker><marker id="my-svg_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"></polygon></marker><marker id="my-svg_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></circle></marker><marker id="my-svg_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></circle></marker><marker id="my-svg_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"></circle></marker><marker id="my-svg_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"></circle></marker><marker id="my-svg_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"></path></marker><marker id="my-svg_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"></path></marker><marker id="my-svg_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"></path></marker><marker id="my-svg_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"></path></marker><g class="root"><g class="clusters"></g><g class="edgePaths"><path d="M129.453,92.2L129.453,96.367C129.453,100.533,129.453,108.867,156.34,117.64C183.227,126.413,237.002,135.626,263.889,140.232L290.776,144.839" id="my-svg-L_STEP_SELECT_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" marker-end="url(#my-svg_flowchart-v2-pointEnd)"></path><path d="M418.375,92.2L418.375,96.367C418.375,100.533,418.375,108.867,418.375,116.533C418.375,124.2,418.375,131.2,418.375,134.7L418.375,138.2" id="my-svg-L_OVERLAY_SELECT_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" marker-end="url(#my-svg_flowchart-v2-pointEnd)"></path><path d="M418.375,191.2L418.375,195.367C418.375,199.533,418.375,207.867,418.375,215.533C418.375,223.2,418.375,230.2,418.375,233.7L418.375,237.2" id="my-svg-L_SELECT_RENDER_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" marker-end="url(#my-svg_flowchart-v2-pointEnd)"></path><path d="M703.961,92.2L703.961,96.367C703.961,100.533,703.961,108.867,677.63,117.597C651.298,126.328,598.635,135.456,572.304,140.02L545.972,144.584" id="my-svg-L_INDEX_SELECT_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" marker-end="url(#my-svg_flowchart-v2-pointEnd)"></path><path d="M418.375,325.4L418.375,329.567C418.375,333.733,418.375,342.067,418.375,349.733C418.375,357.4,418.375,364.4,418.375,367.9L418.375,371.4" id="my-svg-L_RENDER_TAIL_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" marker-end="url(#my-svg_flowchart-v2-pointEnd)"></path><path d="M418.375,442L418.375,446.167C418.375,450.333,418.375,458.667,418.375,466.333C418.375,474,418.375,481,418.375,484.5L418.375,488" id="my-svg-L_TAIL_OUT_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" marker-end="url(#my-svg_flowchart-v2-pointEnd)"></path></g><g class="edgeLabels"><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><text y="-10.1" text-anchor="middle"><tspan class="text-outer-tspan row" x="0" y="-0.1em" text-anchor="middle"></tspan></text></g></g><g><rect class="background" style="stroke: none"></rect></g><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><text y="-10.1" text-anchor="middle"><tspan class="text-outer-tspan row" x="0" y="-0.1em" text-anchor="middle"></tspan></text></g></g><g><rect class="background" style="stroke: none"></rect></g><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><text y="-10.1" text-anchor="middle"><tspan class="text-outer-tspan row" x="0" y="-0.1em" text-anchor="middle"></tspan></text></g></g><g><rect class="background" style="stroke: none"></rect></g><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><text y="-10.1" text-anchor="middle"><tspan class="text-outer-tspan row" x="0" y="-0.1em" text-anchor="middle"></tspan></text></g></g><g><rect class="background" style="stroke: none"></rect></g><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><text y="-10.1" text-anchor="middle"><tspan class="text-outer-tspan row" x="0" y="-0.1em" text-anchor="middle"></tspan></text></g></g><g><rect class="background" style="stroke: none"></rect></g><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><text y="-10.1" text-anchor="middle"><tspan class="text-outer-tspan row" x="0" y="-0.1em" text-anchor="middle"></tspan></text></g></g><g><rect class="background" style="stroke: none"></rect></g></g><g class="nodes"><g class="node default" id="my-svg-flowchart-STEP-0" transform="translate(129.453125, 50.099998474121094)"><rect class="basic label-container" style="" x="-121.453125" y="-42.099998474121094" width="242.90625" height="84.19999694824219"></rect><g class="label" style="" transform="translate(0, -27.099998474121094)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">pipeline</tspan><tspan class="text-inner-tspan"> step</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em"><tspan class="text-inner-tspan">frontmatter:</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="2.1em"><tspan class="text-inner-tspan">knowledge-base:</tspan><tspan class="text-inner-tspan"> [names]</tspan></tspan></text></g></g></g><g class="node default" id="my-svg-flowchart-SELECT-1" transform="translate(418.375, 166.6999969482422)"><rect class="basic label-container" style="" x="-123.65625" y="-24.5" width="247.3125" height="49"></rect><g class="label" style="" transform="translate(0, -9.5)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">loadEntries(index,</tspan><tspan class="text-inner-tspan"> names)</tspan></tspan></text></g></g></g><g class="node default" id="my-svg-flowchart-OVERLAY-2" transform="translate(418.375, 50.099998474121094)"><rect class="basic label-container" style="" x="-117.46875" y="-42.099998474121094" width="234.9375" height="84.19999694824219"></rect><g class="label" style="" transform="translate(0, -27.099998474121094)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">resolved</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em"><tspan class="text-inner-tspan">overlay.knowledge[step]</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="2.1em"><tspan class="text-inner-tspan">(or</tspan><tspan class="text-inner-tspan"> step</tspan><tspan class="text-inner-tspan"> frontmatter)</tspan></tspan></text></g></g></g><g class="node default" id="my-svg-flowchart-RENDER-5" transform="translate(418.375, 283.2999954223633)"><rect class="basic label-container" style="" x="-129.078125" y="-42.099998474121094" width="258.15625" height="84.19999694824219"></rect><g class="label" style="" transform="translate(0, -27.099998474121094)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">buildKnowledgeBaseSection</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em"><tspan class="text-inner-tspan">##</tspan><tspan class="text-inner-tspan"> name:</tspan><tspan class="text-inner-tspan"> description</tspan><tspan class="text-inner-tspan"> +</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="2.1em"><tspan class="text-inner-tspan">body</tspan></tspan></text></g></g></g><g class="node default" id="my-svg-flowchart-INDEX-6" transform="translate(703.9609375, 50.099998474121094)"><rect class="basic label-container" style="" x="-118.1171875" y="-42.099998474121094" width="236.234375" height="84.19999694824219"></rect><g class="label" style="" transform="translate(0, -27.099998474121094)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">buildIndexWithOverrides</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em"><tspan class="text-inner-tspan">global</tspan><tspan class="text-inner-tspan"> +</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="2.1em"><tspan class="text-inner-tspan">.scaffold/knowledge</tspan></tspan></text></g></g></g><g class="node default" id="my-svg-flowchart-TAIL-9" transform="translate(418.375, 408.6999931335449)"><rect class="basic label-container" style="" x="-101.4140625" y="-33.29999923706055" width="202.828125" height="66.5999984741211"></rect><g class="label" style="" transform="translate(0, -18.299999237060547)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">renderGapSignalTail</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em"><tspan class="text-inner-tspan">(unless</tspan><tspan class="text-inner-tspan"> QUIET)</tspan></tspan></text></g></g></g><g class="node default" id="my-svg-flowchart-OUT-11" transform="translate(418.375, 525.299991607666)"><rect class="basic label-container" style="" x="-119.25" y="-33.29999923706055" width="238.5" height="66.5999984741211"></rect><g class="label" style="" transform="translate(0, -18.299999237060547)"><rect></rect><g><rect class="background" style="stroke: none"></rect><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em"><tspan class="text-inner-tspan">Knowledge</tspan><tspan class="text-inner-tspan"> Base</tspan><tspan class="text-inner-tspan"> section</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em"><tspan class="text-inner-tspan">in</tspan><tspan class="text-inner-tspan"> the</tspan><tspan class="text-inner-tspan"> assembled</tspan><tspan class="text-inner-tspan"> prompt</tspan></tspan></text></g></g></g></g></g></g><defs></defs><defs></defs></svg></figure>
|
|
1115
|
+
<p>The injection runs in three stages:</p>
|
|
1116
|
+
<ol>
|
|
1117
|
+
<li><strong>Index.</strong> <code>buildIndexWithOverrides(projectRoot, globalKnowledgeDir)</code> walks
|
|
1118
|
+
the global KB and the project-local override dir, returning a map of
|
|
1119
|
+
entry <code>name</code> → file path (<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:217">src/core/assembly/knowledge-loader.ts:217</span>).
|
|
1120
|
+
The global dir is resolved by <code>getPackageKnowledgeDir</code>, which prefers a
|
|
1121
|
+
repo-local <code>content/knowledge</code> and otherwise falls back to the package's
|
|
1122
|
+
bundled copy (<span class="fp" data-path="src/utils/fs.ts:55">src/utils/fs.ts:55</span>).</li>
|
|
1123
|
+
<li><strong>Select + load.</strong> <code>scaffold run</code> reads the entry names from the pipeline
|
|
1124
|
+
overlay (if set) or the step's <code>knowledge-base</code> frontmatter, then calls
|
|
1125
|
+
<code>loadEntries</code> (<span class="fp" data-path="src/cli/commands/run.ts:370-374">src/cli/commands/run.ts:370-374</span>). A name that isn't in
|
|
1126
|
+
the index becomes a non-fatal <code>FRONTMATTER_KB_ENTRY_MISSING</code> warning rather
|
|
1127
|
+
than an error.</li>
|
|
1128
|
+
<li><strong>Render.</strong> <code>buildKnowledgeBaseSection</code> emits one <code>## <name>: <description></code>
|
|
1129
|
+
block per entry followed by the entry content (<span class="fp" data-path="src/core/assembly/engine.ts:174-185">src/core/assembly/engine.ts:174-185</span>).</li>
|
|
1130
|
+
</ol>
|
|
1131
|
+
<h3 id="deep-guidance-vs-summary-the-dual-channel-split">Deep Guidance vs. Summary (the dual-channel split)</h3>
|
|
1132
|
+
<p>An entry body may contain a <code>## Summary</code> section and a <code>## Deep Guidance</code>
|
|
1133
|
+
section. For runtime CLI assembly, <code>loadEntries</code> injects <strong>only</strong> the Deep
|
|
1134
|
+
Guidance — <code>extractDeepGuidance</code> finds the <code>## Deep Guidance</code> heading and
|
|
1135
|
+
returns everything after it, falling back to the full body when the heading is
|
|
1136
|
+
absent (<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:156">src/core/assembly/knowledge-loader.ts:156</span>). The loader stores
|
|
1137
|
+
<code>deepOnly ?? fullBody</code> as the entry content
|
|
1138
|
+
(<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:315">src/core/assembly/knowledge-loader.ts:315</span>). This avoids re-stating
|
|
1139
|
+
guidance the command prompt already shows the user. The <code>scaffold build</code>
|
|
1140
|
+
path (self-contained generated commands) instead uses <code>loadFullEntries</code>, which
|
|
1141
|
+
keeps the complete body since no runtime assembly is available downstream.</p>
|
|
1142
|
+
<h3 id="the-gap-signal-tail">The gap-signal tail</h3>
|
|
1143
|
+
<p>After the entry bodies, assembly appends a <strong>gap-signal tail</strong> that tells the
|
|
1144
|
+
agent to emit a <code>knowledge_gap_signal</code> observability event if it searches the
|
|
1145
|
+
section and finds nothing useful (<span class="fp" data-path="src/core/assembly/engine.ts:183">src/core/assembly/engine.ts:183</span>). The
|
|
1146
|
+
template lives in <code>renderGapSignalTail</code>, which returns the empty string when
|
|
1147
|
+
<code>SCAFFOLD_GAP_SIGNAL_QUIET=1</code> so tests and CI stay deterministic
|
|
1148
|
+
(<span class="fp" data-path="src/core/assembly/gap-signal-tail.ts:45">src/core/assembly/gap-signal-tail.ts:45</span>). Those signals feed Lens I —
|
|
1149
|
+
see the <a href="../knowledge-freshness/index.md">Knowledge Freshness guide</a>{mode=advisory}
|
|
1150
|
+
for what happens to them.</p>
|
|
1151
|
+
<h2 id="browsing-and-overriding-entries">Browsing and overriding entries</h2>
|
|
1152
|
+
<p>The KB resolves in two layers. <strong>Global</strong> entries ship with Scaffold under
|
|
1153
|
+
<code>content/knowledge/</code>. <strong>Local</strong> overrides live under a project's
|
|
1154
|
+
<code>.scaffold/knowledge/</code> directory (<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:225">src/core/assembly/knowledge-loader.ts:225</span>).
|
|
1155
|
+
When both define the same <code>name</code>, the <strong>local override wins</strong> — the merge layers
|
|
1156
|
+
local on top of global (<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:265">src/core/assembly/knowledge-loader.ts:265</span>).</p>
|
|
1157
|
+
<p>Use the <code>scaffold knowledge</code> subcommands to inspect and manage the effective set:</p>
|
|
1158
|
+
<div class="filter-table"><input type="text" class="filter-input" placeholder="Filter…" aria-label="Filter table rows" disabled>
|
|
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
|
+
<table><thead><tr><th>Command</th><th>What it does</th><th>Source</th></tr></thead><tbody><tr><td><code>scaffold knowledge list</code></td><td>List every entry — global plus local overrides — with a <code>global</code> / <code>local override</code> source label and description. <code>--format json</code> for machine output.</td><td><span class="fp" data-path="src/cli/commands/knowledge.ts:45">src/cli/commands/knowledge.ts:45</span></td></tr><tr><td><code>scaffold knowledge show <name></code></td><td>Print the <em>effective</em> content of an entry (the local override if present, else the global entry), prefixed with its source path.</td><td><span class="fp" data-path="src/cli/commands/knowledge.ts:109">src/cli/commands/knowledge.ts:109</span></td></tr><tr><td><code>scaffold knowledge reset <name></code></td><td>Remove a local override, reverting to the global entry. Refuses to delete a dirty override unless <code>--auto</code> is passed.</td><td><span class="fp" data-path="src/cli/commands/knowledge.ts:167">src/cli/commands/knowledge.ts:167</span></td></tr><tr><td><code>scaffold knowledge update <target> [instructions..]</code></td><td>Assemble a knowledge-update prompt for one entry or every entry in a pipeline step (<code>--step</code>). Unlike the other subcommands, it resolves targets from the <strong>global</strong> KB index and reads step lists from <strong>base step frontmatter</strong> — not local-only overrides or pipeline overlays.</td><td><span class="fp" data-path="src/cli/commands/knowledge.ts:251">src/cli/commands/knowledge.ts:251</span></td></tr></tbody></table></div>
|
|
1189
|
+
<p>To author a local override, create <code>.scaffold/knowledge/<category>/<name>.md</code>
|
|
1190
|
+
with the same <code>name:</code> as the global entry you want to replace, using the same
|
|
1191
|
+
frontmatter shape described below. A duplicate <code>name</code> <em>within</em> the local dir
|
|
1192
|
+
emits a <code>warn: duplicate knowledge override name</code> to stderr and the last file
|
|
1193
|
+
wins.</p>
|
|
1194
|
+
<h3 id="--knowledge-root-a-separate-resolver"><code>--knowledge-root</code> (a separate resolver)</h3>
|
|
1195
|
+
<p>The <code>scaffold knowledge</code> commands resolve the global dir via
|
|
1196
|
+
<code>getPackageKnowledgeDir</code> and the local dir via <code>.scaffold/knowledge/</code>. The
|
|
1197
|
+
<code>--knowledge-root</code> flag is a <strong>different</strong> mechanism: it belongs to the
|
|
1198
|
+
observability audit's Lens-I suppression, which needs to locate a KB to know
|
|
1199
|
+
which gap topics are already covered. It does <strong>not</strong> redirect prompt assembly
|
|
1200
|
+
or the <code>scaffold knowledge</code> subcommands. Its three-tier resolution
|
|
1201
|
+
(CLI flag → yaml → auto-detect) is documented in the
|
|
1202
|
+
<a href="../knowledge-freshness/index.md">Knowledge Freshness guide</a>{mode=advisory}.</p>
|
|
1203
|
+
<h2 id="authoring-a-new-entry">Authoring a new entry</h2>
|
|
1204
|
+
<ol>
|
|
1205
|
+
<li><strong>Pick a category directory</strong> under <code>content/knowledge/<category>/</code>. Prefer
|
|
1206
|
+
an existing category; a brand-new category is a larger change.</li>
|
|
1207
|
+
<li><strong>Name the file after the slug.</strong> The basename should match the <code>name:</code>
|
|
1208
|
+
field (e.g. <code>backend-api-design.md</code> ↔ <code>name: backend-api-design</code>). The index
|
|
1209
|
+
keys on the frontmatter <code>name</code>, not the filename
|
|
1210
|
+
(<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:198">src/core/assembly/knowledge-loader.ts:198</span>), but keeping them aligned
|
|
1211
|
+
prevents confusion and keeps freshness/suppression matching predictable.</li>
|
|
1212
|
+
<li><strong>Write the frontmatter</strong> (fields below).</li>
|
|
1213
|
+
<li><strong>Structure the body</strong> with an optional intro paragraph, then <code>## Summary</code>
|
|
1214
|
+
and <code>## Deep Guidance</code>. The Deep Guidance section is what gets injected into
|
|
1215
|
+
runtime prompts.</li>
|
|
1216
|
+
<li><strong>Wire it into a step</strong> by adding the <code>name</code> to that pipeline step's
|
|
1217
|
+
<code>knowledge-base:</code> frontmatter list (or a pipeline overlay).</li>
|
|
1218
|
+
<li><strong>Validate</strong>: <code>make validate-knowledge</code> runs the frontmatter validator over
|
|
1219
|
+
every entry (<span class="fp" data-path="src/cli/commands/validate-knowledge.ts:20">src/cli/commands/validate-knowledge.ts:20</span>).</li>
|
|
1220
|
+
</ol>
|
|
1221
|
+
<h3 id="frontmatter-fields">Frontmatter fields</h3>
|
|
1222
|
+
<p>The frontmatter is YAML between <code>---</code> fences. The runtime loader coerces these
|
|
1223
|
+
fields (<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:65">src/core/assembly/knowledge-loader.ts:65</span>); the freshness
|
|
1224
|
+
validator enforces them as a Zod schema (<span class="fp" data-path="src/validation/knowledge-frontmatter-validator.ts:42-50">src/validation/knowledge-frontmatter-validator.ts:42-50</span>).
|
|
1225
|
+
Only <code>name</code> is strictly required for an entry to be indexed at all
|
|
1226
|
+
(<span class="fp" data-path="src/core/assembly/knowledge-loader.ts:102">src/core/assembly/knowledge-loader.ts:102</span>).</p>
|
|
1227
|
+
<div class="filter-table"><input type="text" class="filter-input" placeholder="Filter…" aria-label="Filter table rows" disabled>
|
|
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
|
+
<table><thead><tr><th>Field</th><th>Required</th><th>Shape</th><th>Notes</th></tr></thead><tbody><tr><td><code>name</code></td><td>yes</td><td><code>/^[a-z][a-z0-9-]*$/</code> (must start with a letter)</td><td>The index key. Steps reference entries by this. An entry with no <code>name</code> is silently dropped from the index.</td></tr><tr><td><code>description</code></td><td>yes</td><td>string</td><td>Rendered into the <code>## <name>: <description></code> heading at injection. The validator warns past ~200 chars but does not fail.</td></tr><tr><td><code>topics</code></td><td>no</td><td>string[] (default <code>[]</code>)</td><td>Free-form tags carried as discovery and audit metadata. They are parsed and stored on the entry but do <strong>not</strong> drive selection — injection is always by explicit <code>name</code> (see above).</td></tr><tr><td><code>volatility</code></td><td>no</td><td><code>stable|evolving|fast-moving</code> (default <code>evolving</code>)</td><td>Drives the freshness cadence — see the freshness guide.</td></tr><tr><td><code>last-reviewed</code></td><td>no</td><td><code>YYYY-MM-DD</code> or <code>null</code></td><td>ISO date; unquoted dates are coerced to strings. Audited entries advance this on a <code>current</code>/drift verdict.</td></tr><tr><td><code>version-pin</code></td><td>no</td><td>string or <code>null</code></td><td>Pins the entry to an edition (e.g. <code>"OWASP Top 10 2021"</code>).</td></tr><tr><td><code>sources</code></td><td>no</td><td>object[] (default <code>[]</code>)</td><td>Each: <code>url</code> (SSRF-checked), optional <code>anchor</code> (must start with <code>#</code>), <code>retrieved</code> (ISO date), <code>hash</code> (sha256). An entry with no <code>sources</code> is skipped by the freshness cron.</td></tr></tbody></table></div>
|
|
1281
|
+
<p>A minimal entry:</p>
|
|
1282
|
+
<pre><code class="language-markdown">---
|
|
1283
|
+
name: retry-with-jitter
|
|
1284
|
+
description: Exponential backoff with full jitter for resilient client retries
|
|
1285
|
+
topics: [resilience, networking, retries]
|
|
1286
|
+
volatility: stable
|
|
1287
|
+
last-reviewed: null
|
|
1288
|
+
version-pin: null
|
|
1289
|
+
sources:
|
|
1290
|
+
- url: https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/
|
|
1291
|
+
---
|
|
1292
|
+
|
|
1293
|
+
One-paragraph framing of why this matters.
|
|
1294
|
+
|
|
1295
|
+
## Summary
|
|
1296
|
+
|
|
1297
|
+
A short overview that may overlap with the command prompt's own text.
|
|
1298
|
+
|
|
1299
|
+
## Deep Guidance
|
|
1300
|
+
|
|
1301
|
+
The supplementary expertise that gets injected into runtime prompts. This is
|
|
1302
|
+
the section assembly keeps for CLI prompts (see the dual-channel split above).
|
|
1303
|
+
</code></pre>
|
|
1304
|
+
<div class="callout callout-tip"><p><strong>Want the freshness cron to keep it current?</strong> Add at least one <code>sources[]</code>
|
|
1305
|
+
entry and pick a <code>volatility</code> tier. Entries without sources are still injected
|
|
1306
|
+
into prompts, but the daily audit skips them. The cadence model, source
|
|
1307
|
+
allowlist, and audit verdicts are all in the
|
|
1308
|
+
<a href="../knowledge-freshness/index.md">Knowledge Freshness guide</a>.</p></div>
|
|
1309
|
+
<h2 id="see-also">See also</h2>
|
|
1310
|
+
<ul>
|
|
1311
|
+
<li><a href="../knowledge-freshness/index.md">Knowledge Freshness</a>{mode=advisory} —
|
|
1312
|
+
volatility cadence, the audit cron, the five PR gates, Lens-I gap detection,
|
|
1313
|
+
the source allowlist, and the live KB inventory.</li>
|
|
1314
|
+
<li><a href="../observability/index.md">Build Observability</a>{mode=advisory} — the audit
|
|
1315
|
+
engine that hosts Lens I and reads <code>knowledge_gap_signal</code> events.</li>
|
|
1316
|
+
</ul></main>
|
|
1317
|
+
</div>
|
|
1318
|
+
<script>(function(){
|
|
1319
|
+
var LS_KEY = 'guide-theme';
|
|
1320
|
+
function applyTheme(t) {
|
|
1321
|
+
document.documentElement.setAttribute('data-theme', t);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
1325
|
+
// ─── Theme toggle ────────────────────────────────────────────────────────
|
|
1326
|
+
document.querySelectorAll('[data-action="theme"]').forEach(function(btn) {
|
|
1327
|
+
btn.addEventListener('click', function() {
|
|
1328
|
+
var current = document.documentElement.getAttribute('data-theme');
|
|
1329
|
+
var next = current === 'dark' ? 'light' : 'dark';
|
|
1330
|
+
applyTheme(next);
|
|
1331
|
+
try { localStorage.setItem(LS_KEY, next); } catch(e) {}
|
|
1332
|
+
});
|
|
1333
|
+
});
|
|
1334
|
+
|
|
1335
|
+
// ─── Mobile nav ──────────────────────────────────────────────────────────
|
|
1336
|
+
document.querySelectorAll('[data-action="nav"]').forEach(function(btn) {
|
|
1337
|
+
btn.addEventListener('click', function() {
|
|
1338
|
+
var rail = document.querySelector('.rail');
|
|
1339
|
+
if (rail) rail.classList.toggle('open');
|
|
1340
|
+
});
|
|
1341
|
+
});
|
|
1342
|
+
|
|
1343
|
+
// ─── Copy buttons ─────────────────────────────────────────────────────────
|
|
1344
|
+
document.querySelectorAll('pre').forEach(function(pre) {
|
|
1345
|
+
if (!pre.parentNode) return;
|
|
1346
|
+
var wrapper = document.createElement('div');
|
|
1347
|
+
wrapper.className = 'code';
|
|
1348
|
+
pre.parentNode.insertBefore(wrapper, pre);
|
|
1349
|
+
wrapper.appendChild(pre);
|
|
1350
|
+
var btn = document.createElement('button');
|
|
1351
|
+
btn.className = 'copy-btn';
|
|
1352
|
+
btn.textContent = 'Copy';
|
|
1353
|
+
btn.addEventListener('click', function() {
|
|
1354
|
+
var text = pre.textContent || '';
|
|
1355
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
1356
|
+
navigator.clipboard.writeText(text).then(function() {
|
|
1357
|
+
btn.textContent = 'Copied';
|
|
1358
|
+
setTimeout(function() { btn.textContent = 'Copy'; }, 1200);
|
|
1359
|
+
}, function() {
|
|
1360
|
+
btn.textContent = 'Copy';
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
});
|
|
1364
|
+
wrapper.insertBefore(btn, pre);
|
|
1365
|
+
});
|
|
1366
|
+
|
|
1367
|
+
// ─── Tabs ─────────────────────────────────────────────────────────────────
|
|
1368
|
+
document.querySelectorAll('.tabs').forEach(function(group) {
|
|
1369
|
+
group.querySelectorAll('.tab-btn').forEach(function(btn) {
|
|
1370
|
+
btn.addEventListener('click', function() {
|
|
1371
|
+
var idx = btn.getAttribute('data-tab');
|
|
1372
|
+
group.querySelectorAll('.tab-btn').forEach(function(b) {
|
|
1373
|
+
b.classList.toggle('active', b === btn);
|
|
1374
|
+
});
|
|
1375
|
+
group.querySelectorAll('.tabpane').forEach(function(pane) {
|
|
1376
|
+
pane.classList.toggle('active', pane.getAttribute('data-tab') === idx);
|
|
1377
|
+
});
|
|
1378
|
+
});
|
|
1379
|
+
});
|
|
1380
|
+
});
|
|
1381
|
+
|
|
1382
|
+
// ─── Filter tables ────────────────────────────────────────────────────────
|
|
1383
|
+
document.querySelectorAll('.filter-input').forEach(function(input) {
|
|
1384
|
+
input.addEventListener('input', function() {
|
|
1385
|
+
var q = input.value.toLowerCase();
|
|
1386
|
+
var container = input.closest('.filter-table');
|
|
1387
|
+
if (!container) return;
|
|
1388
|
+
container.querySelectorAll('tbody tr').forEach(function(row) {
|
|
1389
|
+
var text = (row.textContent || '').toLowerCase();
|
|
1390
|
+
row.style.display = text.includes(q) ? '' : 'none';
|
|
1391
|
+
});
|
|
1392
|
+
});
|
|
1393
|
+
});
|
|
1394
|
+
|
|
1395
|
+
// ─── Scrollspy ────────────────────────────────────────────────────────────
|
|
1396
|
+
if (typeof IntersectionObserver === 'undefined') return;
|
|
1397
|
+
var headings = document.querySelectorAll('h2[id],h3[id]');
|
|
1398
|
+
if (!headings.length) return;
|
|
1399
|
+
var observer = new IntersectionObserver(function(entries) {
|
|
1400
|
+
entries.forEach(function(entry) {
|
|
1401
|
+
if (!entry.isIntersecting) return;
|
|
1402
|
+
var id = entry.target.getAttribute('id');
|
|
1403
|
+
document.querySelectorAll('.toc a').forEach(function(a) {
|
|
1404
|
+
a.classList.toggle('active', a.getAttribute('href') === '#' + id);
|
|
1405
|
+
});
|
|
1406
|
+
});
|
|
1407
|
+
}, { rootMargin: '0px 0px -70% 0px', threshold: 0 });
|
|
1408
|
+
headings.forEach(function(h) { observer.observe(h); });
|
|
1409
|
+
});
|
|
1410
|
+
})();</script>
|
|
1411
|
+
</body>
|
|
1412
|
+
</html>
|