@dataimago/css 0.1.0-alpha.2 → 0.1.0-alpha.20

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.
@@ -0,0 +1,327 @@
1
+ // @dataimago/css@0.1.0-alpha.20 dist/quarto/dataimago-light.scss · sha256:042fa6f08f6042f38c8014ce106859ce69d2531da3601e90be98270e3a6053ef · generated from tokens; do not edit · restore: npx -p @dataimago/css@0.1.0-alpha.20 dataimago-sync
2
+ // dataimago light theme for Quarto 1.8 — generated from the design tokens (tools/formats/quarto.mjs).
3
+ // Bootstrap Sass variables are compile-time sRGB; runtime colours come from the custom properties below.
4
+
5
+ /*-- scss:defaults --*/
6
+ $body-bg: #ededeb !default;
7
+ $body-color: #14140f !default;
8
+ $headings-color: #14140f !default;
9
+ $navbar-bg: #ededeb !default;
10
+ $link-color: #434739 !default;
11
+ $link-hover-color: #363a2e !default;
12
+ $code-color: #1f618d !default;
13
+ $code-bg: #faf2e3 !default;
14
+ $border-color: #888785 !default;
15
+ $font-family-sans-serif: Noto Sans, Fira Sans, system-ui, sans-serif !default;
16
+ $font-family-monospace: JetBrains Mono, SF Mono, Monaco, Inconsolata, monospace !default;
17
+ $headings-font-family: Josefin Sans, system-ui, sans-serif !default;
18
+ $headings-font-weight: 500 !default;
19
+ $h2-font-size: 1.875rem !default;
20
+
21
+ /*-- scss:rules --*/
22
+ // ── Design tokens (contract custom properties) ───────────────────────
23
+ :root {
24
+ --color-palette-ink-50: #f5f5f4;
25
+ --color-palette-ink-100: #e7e5e4;
26
+ --color-palette-ink-200: #d6d3d1;
27
+ --color-palette-ink-300: #a8a29e;
28
+ --color-palette-ink-400: #78716c;
29
+ --color-palette-ink-500: #57534e;
30
+ --color-palette-ink-600: #44403c;
31
+ --color-palette-ink-700: #292524;
32
+ --color-palette-ink-800: #1c1917;
33
+ --color-palette-ink-900: #0c0a09;
34
+ --color-palette-stone-50: #f7f7f6;
35
+ --color-palette-stone-100: #ededeb;
36
+ --color-palette-stone-200: #dcdcda;
37
+ --color-palette-stone-300: #c1c1bf;
38
+ --color-palette-stone-400: #a0a0a0;
39
+ --color-palette-stone-500: #7c7c7c;
40
+ --color-palette-stone-600: #5e5e5c;
41
+ --color-palette-stone-700: #424240;
42
+ --color-palette-stone-800: #292927;
43
+ --color-palette-stone-900: #14140f;
44
+ --color-palette-forest-50: #f0f1ed;
45
+ --color-palette-forest-100: #dde0d4;
46
+ --color-palette-forest-200: #bdc4ad;
47
+ --color-palette-forest-300: #98a384;
48
+ --color-palette-forest-400: #7e8a6b;
49
+ --color-palette-forest-500: #5e6749;
50
+ --color-palette-forest-600: #4d5640;
51
+ --color-palette-forest-700: #434739;
52
+ --color-palette-forest-800: #363a2e;
53
+ --color-palette-forest-900: #1f2218;
54
+ --color-palette-paper-50: #fefdfb;
55
+ --color-palette-paper-100: #fdf9f2;
56
+ --color-palette-paper-200: #faf2e3;
57
+ --color-palette-paper-300: #f5e8cf;
58
+ --color-palette-paper-400: #edd9b3;
59
+ --color-palette-paper-500: #e0c088;
60
+ --color-palette-copper-50: #fdf4ee;
61
+ --color-palette-copper-100: #fbe5d1;
62
+ --color-palette-copper-200: #f6c79c;
63
+ --color-palette-copper-300: #f0a467;
64
+ --color-palette-copper-400: #ea8441;
65
+ --color-palette-copper-500: #d46820;
66
+ --color-palette-copper-600: #b55017;
67
+ --color-palette-copper-700: #913d15;
68
+ --color-palette-copper-800: #753318;
69
+ --color-palette-copper-900: #612b16;
70
+ --color-palette-accent-50: #f0f8fc;
71
+ --color-palette-accent-300: #3498DB;
72
+ --color-palette-accent-400: #2980B9;
73
+ --color-palette-accent-500: #1f618d;
74
+ --color-palette-accent-600: #154d6f;
75
+ --color-palette-accent-700: #0f3a52;
76
+ --color-palette-presentation-blue-50: #f0f8fc;
77
+ --color-palette-presentation-blue-500: #3498DB;
78
+ --color-palette-presentation-blue-600: #2980B9;
79
+ --color-palette-presentation-blue-700: #1f618d;
80
+ --color-functional-success: #27AE60;
81
+ --color-functional-warning: #F39C12;
82
+ --color-functional-error: #E74C3C;
83
+ --color-functional-info: #3498DB;
84
+ --transition-quick: 0.15s ease;
85
+ --transition-standard: 0.25s ease-in-out;
86
+ --transition-smooth: 0.35s ease;
87
+ --transition-logo: 0.3s;
88
+ --font-family-sans: Noto Sans, Fira Sans, system-ui, sans-serif;
89
+ --font-family-mono: JetBrains Mono, SF Mono, Monaco, Inconsolata, monospace;
90
+ --font-family-display: var(--font-family-display-editorial);
91
+ --font-family-display-editorial: Josefin Sans, system-ui, sans-serif;
92
+ --font-family-display-documentation: Noto Sans, system-ui, sans-serif;
93
+ --font-family-brand: Futura, system-ui, sans-serif;
94
+ --font-family-math: Noto Sans Math, Noto Sans, system-ui, sans-serif;
95
+ --font-size-micro: 0.75rem;
96
+ --font-size-small: 0.875rem;
97
+ --font-size-base: 1rem;
98
+ --font-size-readable: 1.125rem;
99
+ --font-size-emphasis: 1.25rem;
100
+ --font-size-heading-small: 1.5rem;
101
+ --font-size-heading-medium: 1.875rem;
102
+ --font-size-heading-large: 2.25rem;
103
+ --font-size-heading-xl: 3rem;
104
+ --font-weight-extralight: 200;
105
+ --font-weight-light: 300;
106
+ --font-weight-normal: 400;
107
+ --font-weight-medium: 500;
108
+ --font-weight-semibold: 600;
109
+ --font-weight-bold: 700;
110
+ --font-weight-heading-h1: var(--font-weight-medium);
111
+ --font-weight-heading-h2: var(--font-weight-medium);
112
+ --font-weight-heading-h3: var(--font-weight-normal);
113
+ --font-weight-heading-h4: var(--font-weight-light);
114
+ --font-weight-heading-h5: var(--font-weight-light);
115
+ --font-weight-heading-h6: var(--font-weight-light);
116
+ --font-weight-heading-subtitle: var(--font-weight-semibold);
117
+ --font-style-normal: normal;
118
+ --font-style-italic: italic;
119
+ --font-style-oblique: oblique;
120
+ --font-lineHeight-tight: 1.25;
121
+ --font-lineHeight-normal: 1.5;
122
+ --font-lineHeight-relaxed: 1.625;
123
+ --font-feature-settings-display: "lnum";
124
+ --font-feature-settings-body: "normal";
125
+ --spacing-xs: 0.25rem;
126
+ --spacing-sm: 0.5rem;
127
+ --spacing-md: 1rem;
128
+ --spacing-lg: 1.5rem;
129
+ --spacing-xl: 2rem;
130
+ --spacing-2xl: 3rem;
131
+ --spacing-3xl: 4rem;
132
+ --radius-sm: 0.25rem;
133
+ --radius-md: 0.5rem;
134
+ --radius-lg: 0.75rem;
135
+ --radius-xl: 1rem;
136
+ --radius-full: 9999px;
137
+ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
138
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
139
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
140
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
141
+ --color-dataviz-okabe-ito-orange: #E69F00;
142
+ --color-dataviz-okabe-ito-sky-blue: #56B4E9;
143
+ --color-dataviz-okabe-ito-bluish-green: #009E73;
144
+ --color-dataviz-okabe-ito-yellow: #F0E442;
145
+ --color-dataviz-okabe-ito-blue: #0072B2;
146
+ --color-dataviz-okabe-ito-vermillion: #D55E00;
147
+ --color-dataviz-okabe-ito-reddish-purple: #CC79A7;
148
+ --color-dataviz-categorical-1: #E69F00;
149
+ --color-dataviz-categorical-2: #56B4E9;
150
+ --color-dataviz-categorical-3: #009E73;
151
+ --color-dataviz-categorical-4: #F0E442;
152
+ --color-dataviz-categorical-5: #0072B2;
153
+ --color-dataviz-categorical-6: #D55E00;
154
+ --color-dataviz-categorical-7: #CC79A7;
155
+ }
156
+
157
+ :root, [data-bs-theme="light"] {
158
+ --color-surface-page: #ededeb;
159
+ --color-surface-page: color(display-p3 0.9294 0.9294 0.9223);
160
+ --color-surface-page-scrolled: #ededeb;
161
+ --color-surface-page-scrolled: color(display-p3 0.9294 0.9294 0.9223);
162
+ --color-surface-elevated: #f7f7f6;
163
+ --color-surface-elevated: color(display-p3 0.9686 0.9686 0.9651);
164
+ --color-surface-sunken: #faf2e3;
165
+ --color-surface-sunken: color(display-p3 0.9749 0.9501 0.8963);
166
+ --color-surface-navbar: #ededeb;
167
+ --color-surface-navbar: color(display-p3 0.9294 0.9294 0.9223);
168
+ --color-surface-navbar-scrolled: #ededeb;
169
+ --color-surface-navbar-scrolled: color(display-p3 0.9294 0.9294 0.9223);
170
+ --color-surface-code: #faf2e3;
171
+ --color-surface-code: color(display-p3 0.9749 0.9501 0.8963);
172
+ --color-border-subtle: rgba(12, 10, 9, 0.45);
173
+ --color-border-subtle: color(display-p3 0.0457 0.0395 0.0358 / 0.45);
174
+ --color-border-moderate: rgba(12, 10, 9, 0.60);
175
+ --color-border-moderate: color(display-p3 0.0457 0.0395 0.0358 / 0.60);
176
+ --color-border-strong: rgba(12, 10, 9, 0.75);
177
+ --color-border-strong: color(display-p3 0.0457 0.0395 0.0358 / 0.75);
178
+ --color-border-card: rgba(12, 10, 9, 0.60);
179
+ --color-border-card: color(display-p3 0.0457 0.0395 0.0358 / 0.60);
180
+ --color-border-code: #d6d3d1;
181
+ --color-border-code: color(display-p3 0.8371 0.8278 0.8205);
182
+ --color-content-primary: #14140f;
183
+ --color-content-primary: color(display-p3 0.0784 0.0784 0.0608);
184
+ --color-content-secondary: #6a6a6a;
185
+ --color-content-secondary: color(display-p3 0.4157 0.4157 0.4157);
186
+ --color-content-muted: #706964;
187
+ --color-content-muted: color(display-p3 0.4345 0.4127 0.3945);
188
+ --color-content-inverse: #fdf9f2;
189
+ --color-content-inverse: color(display-p3 0.9894 0.977 0.9518);
190
+ --color-interactive-primary: #434739;
191
+ --color-interactive-primary: color(display-p3 0.2656 0.2779 0.2287);
192
+ --color-interactive-hover: #363a2e;
193
+ --color-interactive-hover: color(display-p3 0.2146 0.2269 0.1848);
194
+ --color-interactive-accent: #1f618d;
195
+ --color-interactive-accent: color(display-p3 0.198 0.375 0.5385);
196
+ --color-interactive-focus: #434739;
197
+ --color-interactive-focus: color(display-p3 0.2656 0.2779 0.2287);
198
+ --color-presentation-accent: #3498db;
199
+ --color-presentation-accent: color(display-p3 0.3208 0.588 0.8369);
200
+ --color-presentation-accent-hover: #2980b9;
201
+ --color-presentation-accent-hover: color(display-p3 0.2638 0.495 0.7068);
202
+ --color-vertical-accent-dissertation: #b87333;
203
+ --color-vertical-accent-dissertation: color(display-p3 0.7242 0.4389 0.1259);
204
+ --color-vertical-accent-rpkg: #3b82f6;
205
+ --color-vertical-accent-rpkg: color(display-p3 0.3047 0.5035 0.9338);
206
+ --color-vertical-accent-SGPc: #5a6310;
207
+ --color-vertical-accent-SGPc: color(display-p3 0.3595 0.3871 0.1309);
208
+ --color-brand-mark-red: #cc0000;
209
+ --color-brand-mark-red: color(display-p3 0.7331 0.1519 0.1019);
210
+ --contrast-high: rgb(20, 20, 16);
211
+ --contrast-readable: rgb(20, 20, 16);
212
+ --contrast-medium: #7c7c7c;
213
+ --contrast-subtle: #7c7c7c;
214
+ --shadow-subtle: 0 1px 2px 0 rgb(20 20 16 / 0.05);
215
+ --shadow-moderate: 0 4px 6px -1px rgb(20 20 16 / 0.1);
216
+ --shadow-prominent: 0 10px 15px -3px rgb(20 20 16 / 0.1);
217
+ --border-subtle: rgba(20, 20, 16, 0.47);
218
+ --border-moderate: rgba(20, 20, 16, 0.63);
219
+ --border-focus: #3498DB;
220
+ --navigation-hover-background: rgba(20, 20, 16, 0.05);
221
+ --navigation-active-background: rgba(20, 20, 16, 0.1);
222
+ --color-dataviz-okabe-ito-black: #000000;
223
+ --color-dataviz-categorical-8: #000000;
224
+ --color-dataviz-uncertainty-outer: #D6D6D6;
225
+ --color-dataviz-uncertainty-union: #9E9E9E;
226
+ --color-dataviz-uncertainty-inner: #333333;
227
+ }
228
+
229
+ // ── Quarto chrome → tokens ──────────────────────────────────────────────
230
+ body {
231
+ background-color: var(--color-surface-page);
232
+ color: var(--color-content-primary);
233
+ }
234
+
235
+ h1, h2, h3, h4, h5, h6, .title {
236
+ color: var(--color-content-primary);
237
+ }
238
+
239
+ // Links in running text are underlined: interactive.primary is about 1.9:1
240
+ // against body text in light mode, so colour cannot be the only cue (WCAG 1.4.1).
241
+ main.content :is(p, li, dd, td, blockquote, figcaption, .callout-body) a {
242
+ color: var(--color-interactive-primary);
243
+ text-decoration: underline;
244
+ text-underline-offset: 0.15em;
245
+ }
246
+
247
+ main.content :is(p, li, dd, td, blockquote, figcaption, .callout-body) a:hover {
248
+ color: var(--color-interactive-hover);
249
+ }
250
+
251
+ // Navigation and the outline stay plain.
252
+ #TOC a, nav a, .sidebar a, .navbar a, a.footnote-ref, a.anchorjs-link {
253
+ text-decoration: none;
254
+ }
255
+
256
+ :not(pre) > code {
257
+ color: var(--color-interactive-accent);
258
+ background-color: var(--color-surface-code);
259
+ }
260
+
261
+ pre, div.sourceCode {
262
+ background-color: var(--color-surface-code);
263
+ border: 1px solid var(--color-border-code);
264
+ }
265
+
266
+ // Quarto themes its popups as [data-theme~="quarto"] at compile time ($body-bg);
267
+ // match that specificity so the runtime token wins.
268
+ .tippy-box, .tippy-box[data-theme~="quarto"] {
269
+ background-color: var(--color-surface-elevated);
270
+ color: var(--color-content-primary);
271
+ border: 1px solid var(--color-border-subtle);
272
+ }
273
+
274
+ .tippy-box[data-theme~="quarto"] > .tippy-backdrop {
275
+ background-color: var(--color-surface-elevated);
276
+ }
277
+
278
+ .callout {
279
+ background-color: var(--color-surface-elevated);
280
+ border-color: var(--color-border-subtle);
281
+ }
282
+
283
+ .column-margin, .margin-aside, figcaption {
284
+ color: var(--color-content-secondary);
285
+ }
286
+
287
+ // Elevated cards carry an edge: in dark mode surface.elevated is about 1.06:1
288
+ // against surface.page, so a card without one disappears.
289
+ .di-elevated, div.abstract {
290
+ background-color: var(--color-surface-elevated);
291
+ border: 1px solid var(--color-border-subtle);
292
+ border-radius: var(--radius-md);
293
+ padding: var(--spacing-md);
294
+ }
295
+
296
+ // ===== THEME TOGGLE STYLING =====
297
+ // Light theme - show moon icon (switch to dark)
298
+
299
+ .quarto-color-scheme-toggle .bi::before {
300
+ display: inline-block !important;
301
+ height: 1rem !important;
302
+ width: 1rem !important;
303
+ content: "" !important;
304
+ vertical-align: -0.125em !important;
305
+ background-repeat: no-repeat !important;
306
+ background-size: 1rem 1rem !important;
307
+ background-color: transparent !important;
308
+ background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2383838F" class="bi bi-moon" viewBox="0 0 16 16"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/></svg>') !important;
309
+ transition: background-image 0.25s ease;
310
+ }
311
+
312
+ .quarto-color-scheme-toggle:hover .bi::before {
313
+ background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23000000" class="bi bi-moon" viewBox="0 0 16 16"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/></svg>') !important;
314
+ transition: background-image 0.25s ease;
315
+ }
316
+
317
+ @media (prefers-reduced-motion: no-preference) {
318
+ html {
319
+ scroll-behavior: smooth;
320
+ }
321
+ }
322
+
323
+ @media (prefers-reduced-motion: reduce) {
324
+ .quarto-color-scheme-toggle .bi::before {
325
+ transition: none !important;
326
+ }
327
+ }
@@ -1,12 +1,21 @@
1
1
  // @dataimago/css Tailwind preset — Generated from @dataimago/tokens
2
- // Source files: packages/tokens/src/colors.json, packages/tokens/src/typography.json
2
+ // Source files:
3
+ // packages/tokens/src/colors.json (palette + functional colors)
4
+ // packages/tokens/src/typography.json (font family, size, weight)
5
+ // packages/tokens/src/spacing.json (spacing, radius, shadow simple scales)
6
+ // packages/tokens/src/effects.json (theme-aware shadow, transition)
3
7
  // Regenerated by packages/css/build.mjs on every release.
4
8
  //
5
- // Iteration-1 (2026-04-30) brought: stone+forest palette anchor, paper as
6
- // renamed cream (with deprecated cream alias preserved through 0.2.x),
7
- // editorial/documentation display family split, font.size scale, math family.
8
- // See wiki/decisions/{josefin-weight-floor,display-family-split,h1-weight-medium,
9
- // display-lining-figures,font-trim-deferred}.md for the governance.
9
+ // Iteration-1 (2026-04-30): stone+forest palette anchor, paper-as-renamed-cream
10
+ // (with deprecated cream alias through 0.2.x), editorial/documentation display
11
+ // family split, font.size scale, math family. See wiki/decisions/{josefin-weight-floor,
12
+ // display-family-split, h1-weight-medium, display-lining-figures, font-trim-deferred}.md.
13
+ //
14
+ // Stage 2.3 (2026-05-04): Tailwind preset extended to spacing/borderRadius/
15
+ // boxShadow/transitionDuration so consumers can write `p-md`, `rounded-lg`,
16
+ // `shadow-subtle`, `duration-quick` Tailwind classes throughout instead of
17
+ // reaching for inline `var(--*)` references. theme.extend merges with Tailwind
18
+ // defaults at colliding keys (e.g. `rounded-md` becomes the dataimago value).
10
19
 
11
20
  /** @type {import('tailwindcss').Config} */
12
21
  module.exports = {
@@ -71,10 +80,12 @@ module.exports = {
71
80
  "900": "#612b16"
72
81
  },
73
82
  "accent": {
74
- "50": "#fdf2f2",
75
- "500": "#b54a27",
76
- "600": "#9a3e20",
77
- "700": "#7d321a"
83
+ "50": "#f0f8fc",
84
+ "300": "#3498DB",
85
+ "400": "#2980B9",
86
+ "500": "#1f618d",
87
+ "600": "#154d6f",
88
+ "700": "#0f3a52"
78
89
  },
79
90
  "presentation-blue": {
80
91
  "50": "#f0f8fc",
@@ -148,6 +159,42 @@ module.exports = {
148
159
  "heading-medium": "1.875rem",
149
160
  "heading-large": "2.25rem",
150
161
  "heading-xl": "3rem"
162
+ },
163
+ spacing: {
164
+ "xs": "0.25rem",
165
+ "sm": "0.5rem",
166
+ "md": "1rem",
167
+ "lg": "1.5rem",
168
+ "xl": "2rem",
169
+ "2xl": "3rem",
170
+ "3xl": "4rem"
171
+ },
172
+ borderRadius: {
173
+ "sm": "0.25rem",
174
+ "md": "0.5rem",
175
+ "lg": "0.75rem",
176
+ "xl": "1rem",
177
+ "full": "9999px"
178
+ },
179
+ boxShadow: {
180
+ "sm": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
181
+ "md": "0 4px 6px -1px rgb(0 0 0 / 0.1)",
182
+ "lg": "0 10px 15px -3px rgb(0 0 0 / 0.1)",
183
+ "xl": "0 20px 25px -5px rgb(0 0 0 / 0.1)",
184
+ "subtle": "var(--shadow-subtle, 0 1px 2px 0 rgb(20 20 16 / 0.05))",
185
+ "moderate": "var(--shadow-moderate, 0 4px 6px -1px rgb(20 20 16 / 0.1))",
186
+ "prominent": "var(--shadow-prominent, 0 10px 15px -3px rgb(20 20 16 / 0.1))"
187
+ },
188
+ transitionDuration: {
189
+ "quick": "0.15s",
190
+ "standard": "0.25s",
191
+ "smooth": "0.35s",
192
+ "logo": "0.3s"
193
+ },
194
+ transitionTimingFunction: {
195
+ "quick": "ease",
196
+ "standard": "ease-in-out",
197
+ "smooth": "ease"
151
198
  }
152
199
  }
153
200
  }
@@ -0,0 +1,236 @@
1
+ <!-- @dataimago/css@0.1.0-alpha.20 dist/templates/KNOWLEDGE-explorer.md · sha256:907c08638ed56813d453227759e29de08350465885d11f0efe94ec7ba8c42a50 · generated from tokens; do not edit · restore: npx -p @dataimago/css@0.1.0-alpha.20 dataimago-sync -->
2
+ # {{PROJECT_NAME}} — Knowledge Base Operating Manual
3
+
4
+ **Domain:** {{DOMAIN_NAME}}
5
+ **Type:** explorer
6
+ **Explorer dimension:** {{EXPLORER_DIMENSION}}
7
+ **Generated:** {{GENERATED_DATE}}
8
+ **Framework:** [dataimago-design]({{FRAMEWORK_WIKI_URL}}/wiki/index.md)
9
+
10
+ This file is the operating manual for the **{{PROJECT_NAME}}** knowledge base — an AI-maintained wiki that documents the dimensions, attributes, datasets, and data quality considerations that make this application trustworthy and navigable. Read it at the start of every knowledge-work session.
11
+
12
+ ---
13
+
14
+ ## Role
15
+
16
+ You are the wiki maintainer for **{{PROJECT_NAME}}**'s knowledge base — an `explorer`-type domain wiki organized around the `{{EXPLORER_DIMENSION}}` dimension. This application has no thesis to advance; it makes a dataset navigable. Your job is to ensure that every piece of data the application presents is accurately documented — what it means, where it came from, what its limitations are.
17
+
18
+ Your job is to:
19
+ - Document new attributes as they are added to the application
20
+ - Summarize source datasets and their quality characteristics
21
+ - Answer queries about data provenance, coverage, and interpretation
22
+ - File answers as `wiki/analyses/` pages so knowledge compounds
23
+ - Lint the wiki for gaps in attribute documentation and stale dataset information
24
+
25
+ You never modify files in `raw/`. You own everything in `wiki/`.
26
+
27
+ The framework layer (how this application is built) is documented in the dataimago-design wiki (see `dataimago-framework.json` for the URL). Data and content questions belong here; build and architecture questions belong there.
28
+
29
+ ---
30
+
31
+ ## Session Start Protocol
32
+
33
+ At the start of every knowledge-work session:
34
+ 1. Read this file (KNOWLEDGE.md)
35
+ 2. Read `wiki/index.md` to orient to the current knowledge base state
36
+ 3. Read the last 5 entries of `wiki/log.md` to understand recent activity
37
+ 4. Check `wiki/attributes/` for any attributes flagged as needing documentation updates
38
+ 5. Read the framework wiki index (URL in `dataimago-framework.json`) for framework context (optional unless architecture is relevant)
39
+ 6. Ask the user: ingest new data, document an attribute, answer a query, or something else?
40
+
41
+ ---
42
+
43
+ ## Directory Structure
44
+
45
+ ```
46
+ wiki/
47
+ ├── index.md ← Master catalog of all wiki pages
48
+ ├── overview.md ← High-level synthesis: what data this application holds and why
49
+ ├── glossary.md ← Canonical terminology for this domain
50
+ ├── log.md ← Append-only activity record
51
+ ├── dimensions/ ← The organizing axes of the explorer (geography, time, etc.)
52
+ ├── attributes/ ← Each measurable property: meaning, source, coverage, caveats
53
+ ├── datasets/ ← Data sources: provenance, update cadence, coverage gaps
54
+ ├── sources/ ← Authoritative sources for datasets and attribute definitions
55
+ ├── personas/ ← Who uses the explorer and what they discover with it
56
+ └── analyses/ ← Patterns, comparisons, and insights surfaced from the data
57
+
58
+ raw/
59
+ ├── papers/ ← Academic sources, methodology documents
60
+ ├── conversations/ ← AI dialogues, decisions, notes
61
+ ├── data/ ← Raw dataset files, exports from R
62
+ └── references/ ← External data portals, API specs, codebooks
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Entity Types
68
+
69
+ | Type | Location | Page purpose |
70
+ |---|---|---|
71
+ | **Dimension** | `wiki/dimensions/` | The organizing axes: what they cover, how entities are identified, edge cases |
72
+ | **Attribute** | `wiki/attributes/` | Each measurable property: precise definition, source, geographic/temporal coverage, caveats |
73
+ | **Dataset** | `wiki/datasets/` | A data source: provenance, update cadence, coverage gaps, known issues, R dataset name |
74
+ | **Source** | `wiki/sources/` | An authoritative reference for an attribute definition or dataset methodology |
75
+ | **Persona** | `wiki/personas/` | A user type: what they're trying to discover, what attributes they care about |
76
+ | **Analysis** | `wiki/analyses/` | Patterns found, comparisons made, insights derived from the data |
77
+
78
+ ---
79
+
80
+ ## The Attribute Page — Core Knowledge Atom
81
+
82
+ The `wiki/attributes/` directory is the most important part of this wiki. Every attribute the application exposes must have a page that documents:
83
+
84
+ ```markdown
85
+ ---
86
+ title: <attribute human name>
87
+ type: attribute
88
+ attribute_id: <the parameter name used in R functions and API endpoints>
89
+ created: YYYY-MM-DD
90
+ updated: YYYY-MM-DD
91
+ dataset: <wiki/datasets/dataset-name.md>
92
+ sources:
93
+ - <authoritative source for the attribute definition>
94
+ tags: []
95
+ ---
96
+
97
+ One-line description of what this attribute measures.
98
+
99
+ ## Definition
100
+ Precise definition — not just a label. What exactly is being measured? What is the unit?
101
+ What is the reference period (for point-in-time attributes)?
102
+
103
+ ## Data Source
104
+ - Dataset: [[dataset-name]]
105
+ - R dataset object: `{{PROJECT_NAME}}::dataset_name`
106
+ - R retrieval function: `get_entity_profile(entity_id, attributes = "{{ATTRIBUTE_ID}}")`
107
+
108
+ ## Coverage
109
+ - Entities covered: (e.g., "193 UN member states", "47 European countries")
110
+ - Temporal coverage: (e.g., "2000–2023 annually", "2022 only")
111
+ - Known gaps: (e.g., "Missing for small island nations with population < 50,000")
112
+
113
+ ## Data Quality
114
+ - Source reliability: (official statistics / derived / estimated / self-reported)
115
+ - Known issues: (e.g., "Pre-2010 figures use different methodology")
116
+ - Comparability caveats: (e.g., "Purchasing power adjustments vary by source year")
117
+
118
+ ## Interpretation
119
+ For non-specialist audiences: what does a high/low value on this attribute mean?
120
+ What should users NOT conclude from this attribute?
121
+
122
+ ## Related Attributes
123
+ - [[attribute-name]] — (relationship, e.g., "often inversely correlated")
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Workflows
129
+
130
+ ### Ingest a New Dataset
131
+
132
+ 1. Read the raw data file from `raw/data/` and any codebook from `raw/references/`
133
+ 2. Create a `wiki/datasets/` page documenting provenance, coverage, and update cadence
134
+ 3. Create a `wiki/attributes/` page for each attribute the dataset provides
135
+ 4. Update `wiki/dimensions/` if the dataset covers new entities or extends temporal range
136
+ 5. Update `wiki/glossary.md` with any new technical terms
137
+ 6. Update `wiki/index.md` and append to `wiki/log.md`
138
+
139
+ ### Document a New Attribute
140
+
141
+ 1. Identify the authoritative source for the attribute's definition
142
+ 2. Create a `wiki/attributes/` page following the template above
143
+ 3. Verify the R retrieval function returns correct data for the attribute
144
+ 4. Add the attribute to the relevant `wiki/datasets/` page
145
+ 5. Update `wiki/index.md` and append to `wiki/log.md`
146
+
147
+ ### Ingest a Paper or Reference
148
+
149
+ 1. Read from `raw/papers/`
150
+ 2. Determine: does this define an attribute? challenge a dataset's methodology? describe a dimension?
151
+ 3. Create a `wiki/sources/` page summarizing the key claims
152
+ 4. Link to the affected `wiki/attributes/` or `wiki/datasets/` pages
153
+ 5. Update `wiki/glossary.md` and append to `wiki/log.md`
154
+
155
+ ### Query
156
+
157
+ 1. Read `wiki/index.md` to identify relevant pages (typically `wiki/attributes/` and `wiki/datasets/`)
158
+ 2. Read those pages
159
+ 3. Synthesize a clear answer with citations
160
+ 4. Ask: "Should I file this as an analysis?" If yes, save to `wiki/analyses/`
161
+ 5. Append to `wiki/log.md`
162
+
163
+ ### Lint
164
+
165
+ 1. Check every attribute in `wiki/attributes/` has: definition, coverage, data quality, interpretation
166
+ 2. Check every dataset in `wiki/datasets/` has: provenance, update cadence, known gaps
167
+ 3. Check for attributes used in the application but not documented in the wiki
168
+ 4. Check for stale dataset entries (coverage dates that should have been updated)
169
+ 5. Report findings and propose fixes
170
+ 6. Append to `wiki/log.md`
171
+
172
+ ---
173
+
174
+ ## Log Format
175
+
176
+ ```
177
+ ## [YYYY-MM-DD] <action> | <title>
178
+
179
+ **Action:** <description>
180
+ Pages created: ...
181
+ Pages updated: ...
182
+ Key additions: ...
183
+ ```
184
+
185
+ ---
186
+
187
+ ## Terminology Discipline
188
+
189
+ - Check `wiki/glossary.md` before using any domain term
190
+ - Attribute IDs (used in R functions and API endpoints) must be consistent: `{{ATTRIBUTE_ID}}` form
191
+ - Entity identifiers must be consistent: `{{EXPLORER_DIMENSION}}` → [describe ID format, e.g., ISO 3166-1 alpha-3 for countries]
192
+ - Key terms for this domain: [populated by domain expert — add canonical terms here as the wiki develops]
193
+
194
+ ---
195
+
196
+ ## R Functions in This Application
197
+
198
+ The following R functions are the retrieval backbone of {{PROJECT_NAME}}:
199
+
200
+ {{EXPORTED_FUNCTIONS}}
201
+
202
+ **Standard explorer function pattern:**
203
+ - Every attribute is retrievable via `get_entity_profile(entity_id, attributes = "attribute_id")`
204
+ - Every attribute is comparable via `compare_entities(entity_ids, "attribute_id")`
205
+ - Discovery: `get_attributes()` returns all attributes with their wiki descriptions
206
+ - Discovery: `get_entities()` returns all entities with their available attributes
207
+
208
+ ---
209
+
210
+ ## Data Quality Standards
211
+
212
+ This application makes claims about the world. Every attribute must meet these standards before it can be displayed to users:
213
+
214
+ 1. **Defined** — A `wiki/attributes/` page exists with a precise definition
215
+ 2. **Sourced** — The data source is documented in a `wiki/datasets/` page
216
+ 3. **Bounded** — Coverage (entities and time period) is documented
217
+ 4. **Caveated** — Known quality issues and comparability limits are documented
218
+ 5. **Interpreted** — A plain-language interpretation is available for non-specialist users
219
+
220
+ Attributes that fail any of these standards should be marked `status: draft` in their frontmatter and excluded from the production data explorer until the standard is met.
221
+
222
+ ---
223
+
224
+ ## Connection to the Framework Layer
225
+
226
+ This wiki documents **what data** this application holds and **what it means**. The dataimago-design wiki documents **how** the application is built. The connection:
227
+
228
+ ```
229
+ wiki/attributes/greeting.md
230
+ → documents HelloWorld::Hello_World dataset
231
+ → retrieved via get_entity_profile(entity_id)
232
+ → exposed at GET /entity/{id}?attributes=greeting
233
+ → documented in dataimago-design/wiki/patterns/rest-api-from-r.md
234
+ ```
235
+
236
+ Do not duplicate framework documentation here. Reference it.