@jaimevalasek/aioson 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/README.md +19 -2
  2. package/docs/pt/README.md +62 -2
  3. package/docs/pt/advisor-spec.md +5 -5
  4. package/docs/pt/agentes-customizados.md +670 -0
  5. package/docs/pt/agentes.md +111 -13
  6. package/docs/pt/automacao-squads.md +407 -0
  7. package/docs/pt/cenarios.md +3 -3
  8. package/docs/pt/clientes-ai.md +62 -0
  9. package/docs/pt/comandos-cli.md +167 -17
  10. package/docs/pt/deyvin.md +115 -0
  11. package/docs/pt/genome-3.0-spec.md +11 -11
  12. package/docs/pt/inicio-rapido.md +45 -0
  13. package/docs/pt/memoria-contexto.md +255 -0
  14. package/docs/pt/output-strategy-delivery.md +655 -0
  15. package/docs/pt/profiler-system.md +17 -17
  16. package/docs/pt/runtime-observability.md +5 -1
  17. package/docs/pt/skills.md +175 -0
  18. package/docs/pt/{squad-genoma.md → squad-genome.md} +81 -75
  19. package/docs/testing/genome-2.0-rollout.md +1 -1
  20. package/package.json +3 -3
  21. package/src/agents.js +21 -5
  22. package/src/backup-provider.js +303 -0
  23. package/src/cli.js +178 -2
  24. package/src/commands/agents.js +22 -4
  25. package/src/commands/backup.js +533 -0
  26. package/src/commands/cloud.js +17 -17
  27. package/src/commands/context-pack.js +45 -0
  28. package/src/commands/implementation-plan.js +340 -0
  29. package/src/commands/learning.js +134 -0
  30. package/src/commands/live.js +1583 -0
  31. package/src/commands/runtime.js +833 -2
  32. package/src/commands/scan-project.js +288 -24
  33. package/src/commands/setup-context.js +23 -0
  34. package/src/commands/skill.js +558 -0
  35. package/src/commands/squad-agent-create.js +788 -0
  36. package/src/commands/squad-doctor.js +51 -1
  37. package/src/commands/squad-investigate.js +261 -0
  38. package/src/commands/squad-learning.js +209 -0
  39. package/src/commands/squad-pipeline.js +247 -1
  40. package/src/commands/squad-plan.js +329 -0
  41. package/src/commands/squad-status.js +1 -1
  42. package/src/commands/squad-validate.js +57 -1
  43. package/src/commands/test-agents.js +6 -1
  44. package/src/commands/workflow-next.js +8 -1
  45. package/src/commands/workflow-status.js +250 -0
  46. package/src/constants.js +80 -16
  47. package/src/context-memory.js +837 -0
  48. package/src/context-writer.js +2 -0
  49. package/src/delivery-runner.js +319 -0
  50. package/src/genome-files.js +1 -1
  51. package/src/genome-format.js +1 -1
  52. package/src/i18n/messages/en.js +206 -7
  53. package/src/i18n/messages/es.js +123 -6
  54. package/src/i18n/messages/fr.js +122 -5
  55. package/src/i18n/messages/pt-BR.js +205 -12
  56. package/src/installer.js +30 -2
  57. package/src/lib/genomes/compat.js +1 -1
  58. package/src/runtime-store.js +780 -42
  59. package/src/session-handoff.js +77 -0
  60. package/template/.aioson/agents/analyst.md +36 -9
  61. package/template/.aioson/agents/architect.md +20 -5
  62. package/template/.aioson/agents/dev.md +135 -15
  63. package/template/.aioson/agents/deyvin.md +166 -0
  64. package/template/.aioson/agents/discovery-design-doc.md +25 -1
  65. package/template/.aioson/agents/{genoma.md → genome.md} +20 -20
  66. package/template/.aioson/agents/orache.md +371 -0
  67. package/template/.aioson/agents/orchestrator.md +37 -2
  68. package/template/.aioson/agents/pair.md +5 -0
  69. package/template/.aioson/agents/pm.md +17 -5
  70. package/template/.aioson/agents/product.md +58 -22
  71. package/template/.aioson/agents/profiler-enricher.md +1 -1
  72. package/template/.aioson/agents/profiler-forge.md +9 -9
  73. package/template/.aioson/agents/profiler-researcher.md +1 -1
  74. package/template/.aioson/agents/qa.md +17 -5
  75. package/template/.aioson/agents/setup.md +81 -5
  76. package/template/.aioson/agents/squad.md +675 -28
  77. package/template/.aioson/agents/ux-ui.md +277 -34
  78. package/template/.aioson/config.md +175 -0
  79. package/template/.aioson/context/spec.md.template +17 -0
  80. package/template/.aioson/genomes/.gitkeep +0 -0
  81. package/template/.aioson/installed-skills/.gitkeep +0 -0
  82. package/template/.aioson/locales/en/agents/analyst.md +26 -4
  83. package/template/.aioson/locales/en/agents/architect.md +10 -0
  84. package/template/.aioson/locales/en/agents/dev.md +89 -4
  85. package/template/.aioson/locales/en/agents/deyvin.md +129 -0
  86. package/template/.aioson/locales/en/agents/{genoma.md → genome.md} +14 -14
  87. package/template/.aioson/locales/en/agents/orchestrator.md +36 -2
  88. package/template/.aioson/locales/en/agents/pair.md +5 -0
  89. package/template/.aioson/locales/en/agents/pm.md +7 -0
  90. package/template/.aioson/locales/en/agents/product.md +35 -17
  91. package/template/.aioson/locales/en/agents/qa.md +7 -0
  92. package/template/.aioson/locales/en/agents/setup.md +51 -5
  93. package/template/.aioson/locales/en/agents/squad.md +203 -15
  94. package/template/.aioson/locales/en/agents/ux-ui.md +375 -35
  95. package/template/.aioson/locales/es/agents/analyst.md +16 -4
  96. package/template/.aioson/locales/es/agents/architect.md +10 -0
  97. package/template/.aioson/locales/es/agents/dev.md +70 -2
  98. package/template/.aioson/locales/es/agents/deyvin.md +89 -0
  99. package/template/.aioson/locales/es/agents/{genoma.md → genome.md} +13 -13
  100. package/template/.aioson/locales/es/agents/orache.md +103 -0
  101. package/template/.aioson/locales/es/agents/orchestrator.md +36 -2
  102. package/template/.aioson/locales/es/agents/pair.md +5 -0
  103. package/template/.aioson/locales/es/agents/pm.md +7 -0
  104. package/template/.aioson/locales/es/agents/product.md +13 -3
  105. package/template/.aioson/locales/es/agents/qa.md +7 -0
  106. package/template/.aioson/locales/es/agents/setup.md +28 -5
  107. package/template/.aioson/locales/es/agents/squad.md +221 -15
  108. package/template/.aioson/locales/es/agents/ux-ui.md +26 -25
  109. package/template/.aioson/locales/fr/agents/analyst.md +16 -4
  110. package/template/.aioson/locales/fr/agents/architect.md +10 -0
  111. package/template/.aioson/locales/fr/agents/dev.md +70 -2
  112. package/template/.aioson/locales/fr/agents/deyvin.md +89 -0
  113. package/template/.aioson/locales/fr/agents/{genoma.md → genome.md} +7 -7
  114. package/template/.aioson/locales/fr/agents/orache.md +104 -0
  115. package/template/.aioson/locales/fr/agents/orchestrator.md +36 -2
  116. package/template/.aioson/locales/fr/agents/pair.md +5 -0
  117. package/template/.aioson/locales/fr/agents/pm.md +7 -0
  118. package/template/.aioson/locales/fr/agents/product.md +13 -3
  119. package/template/.aioson/locales/fr/agents/qa.md +7 -0
  120. package/template/.aioson/locales/fr/agents/setup.md +28 -5
  121. package/template/.aioson/locales/fr/agents/squad.md +216 -10
  122. package/template/.aioson/locales/fr/agents/ux-ui.md +26 -25
  123. package/template/.aioson/locales/pt-BR/agents/analyst.md +26 -4
  124. package/template/.aioson/locales/pt-BR/agents/architect.md +10 -0
  125. package/template/.aioson/locales/pt-BR/agents/dev.md +93 -4
  126. package/template/.aioson/locales/pt-BR/agents/deyvin.md +129 -0
  127. package/template/.aioson/locales/pt-BR/agents/{genoma.md → genome.md} +49 -49
  128. package/template/.aioson/locales/pt-BR/agents/orache.md +137 -0
  129. package/template/.aioson/locales/pt-BR/agents/orchestrator.md +36 -2
  130. package/template/.aioson/locales/pt-BR/agents/pair.md +5 -0
  131. package/template/.aioson/locales/pt-BR/agents/pm.md +7 -0
  132. package/template/.aioson/locales/pt-BR/agents/product.md +35 -17
  133. package/template/.aioson/locales/pt-BR/agents/qa.md +7 -0
  134. package/template/.aioson/locales/pt-BR/agents/setup.md +51 -5
  135. package/template/.aioson/locales/pt-BR/agents/squad.md +486 -47
  136. package/template/.aioson/locales/pt-BR/agents/ux-ui.md +361 -22
  137. package/template/.aioson/my-agents/.gitkeep +0 -0
  138. package/template/.aioson/rules/.gitkeep +0 -0
  139. package/template/.aioson/rules/squad/.gitkeep +0 -0
  140. package/template/.aioson/rules/squad/README.md +50 -0
  141. package/template/.aioson/schemas/genome-meta.schema.json +1 -1
  142. package/template/.aioson/schemas/genome.schema.json +1 -1
  143. package/template/.aioson/schemas/squad-blueprint.schema.json +11 -0
  144. package/template/.aioson/schemas/squad-manifest.schema.json +257 -1
  145. package/template/.aioson/skills/design/cognitive-core-ui/SKILL.md +157 -0
  146. package/template/.aioson/skills/design/cognitive-core-ui/references/components.md +407 -0
  147. package/template/.aioson/skills/design/cognitive-core-ui/references/dashboards.md +172 -0
  148. package/template/.aioson/skills/design/cognitive-core-ui/references/design-tokens.md +490 -0
  149. package/template/.aioson/skills/design/cognitive-core-ui/references/motion.md +237 -0
  150. package/template/.aioson/skills/design/cognitive-core-ui/references/patterns.md +289 -0
  151. package/template/.aioson/skills/design/cognitive-core-ui/references/websites.md +350 -0
  152. package/template/.aioson/skills/design/interface-design/SKILL.md +47 -0
  153. package/template/.aioson/skills/design/interface-design/references/components-and-states.md +105 -0
  154. package/template/.aioson/skills/design/interface-design/references/design-directions.md +101 -0
  155. package/template/.aioson/skills/design/interface-design/references/handoff-and-quality.md +71 -0
  156. package/template/.aioson/skills/design/interface-design/references/intent-and-domain.md +74 -0
  157. package/template/.aioson/skills/design/interface-design/references/tokens-and-depth.md +173 -0
  158. package/template/.aioson/skills/design/premium-command-center-ui/SKILL.md +62 -0
  159. package/template/.aioson/skills/design/premium-command-center-ui/references/operations.md +74 -0
  160. package/template/.aioson/skills/design/premium-command-center-ui/references/patterns.md +116 -0
  161. package/template/.aioson/skills/design/premium-command-center-ui/references/validation.md +47 -0
  162. package/template/.aioson/skills/design/premium-command-center-ui/references/visual-system.md +215 -0
  163. package/template/.aioson/skills/design-system/SKILL.md +92 -0
  164. package/template/.aioson/skills/design-system/cognitive-core-ui.skill +0 -0
  165. package/template/.aioson/skills/design-system/components/SKILL.md +274 -0
  166. package/template/.aioson/skills/design-system/components/SKILL.md:Zone.Identifier +0 -0
  167. package/template/.aioson/skills/design-system/dashboards/SKILL.md +184 -0
  168. package/template/.aioson/skills/design-system/dashboards/SKILL.md:Zone.Identifier +0 -0
  169. package/template/.aioson/skills/design-system/foundations/SKILL.md +250 -0
  170. package/template/.aioson/skills/design-system/foundations/SKILL.md:Zone.Identifier +0 -0
  171. package/template/.aioson/skills/design-system/motion/SKILL.md +197 -0
  172. package/template/.aioson/skills/design-system/motion/SKILL.md:Zone.Identifier +0 -0
  173. package/template/.aioson/skills/design-system/patterns/SKILL.md +231 -0
  174. package/template/.aioson/skills/design-system/patterns/SKILL.md:Zone.Identifier +0 -0
  175. package/template/.aioson/skills/squad/SKILL.md +58 -0
  176. package/template/.aioson/skills/squad/domains/.gitkeep +0 -0
  177. package/template/.aioson/skills/squad/formats/.gitkeep +0 -0
  178. package/template/.aioson/skills/squad/patterns/.gitkeep +0 -0
  179. package/template/.aioson/skills/squad/references/.gitkeep +0 -0
  180. package/template/.aioson/tasks/implementation-plan.md +288 -0
  181. package/template/.aioson/tasks/squad-create.md +1 -1
  182. package/template/.aioson/tasks/squad-execution-plan.md +279 -0
  183. package/template/.aioson/tasks/squad-export.md +1 -1
  184. package/template/.aioson/tasks/squad-investigate.md +44 -0
  185. package/template/.aioson/tasks/squad-learning-review.md +44 -0
  186. package/template/.aioson/tasks/squad-output-config.md +177 -0
  187. package/template/.aioson/tasks/squad-validate.md +1 -1
  188. package/template/.claude/commands/aioson/agent/deyvin.md +5 -0
  189. package/template/.claude/commands/aioson/agent/discovery-design-doc.md +5 -0
  190. package/template/.claude/commands/aioson/agent/genome.md +5 -0
  191. package/template/.claude/commands/aioson/agent/product.md +5 -0
  192. package/template/.claude/commands/aioson/agent/profiler-enricher.md +5 -0
  193. package/template/.claude/commands/aioson/agent/profiler-forge.md +5 -0
  194. package/template/.claude/commands/aioson/agent/profiler-researcher.md +5 -0
  195. package/template/.claude/commands/aioson/agent/squad.md +5 -0
  196. package/template/.gemini/GEMINI.md +2 -0
  197. package/template/.gemini/commands/aios-deyvin.toml +6 -0
  198. package/template/.gemini/commands/aios-pair.toml +6 -0
  199. package/template/AGENTS.md +34 -6
  200. package/template/CLAUDE.md +31 -4
  201. package/template/OPENCODE.md +6 -2
  202. package/template/squad-searches/.gitkeep +0 -0
  203. package/template/.aioson/skills/static/interface-design.md +0 -372
  204. package/template/.aioson/skills/static/premium-command-center-ui.md +0 -190
  205. /package/template/.aioson/{genomas → docs}/.gitkeep +0 -0
  206. /package/template/.claude/commands/aioson/{analyst.md → agent/analyst.md} +0 -0
  207. /package/template/.claude/commands/aioson/{architect.md → agent/architect.md} +0 -0
  208. /package/template/.claude/commands/aioson/{dev.md → agent/dev.md} +0 -0
  209. /package/template/.claude/commands/aioson/{orchestrator.md → agent/orchestrator.md} +0 -0
  210. /package/template/.claude/commands/aioson/{pm.md → agent/pm.md} +0 -0
  211. /package/template/.claude/commands/aioson/{qa.md → agent/qa.md} +0 -0
  212. /package/template/.claude/commands/aioson/{setup.md → agent/setup.md} +0 -0
  213. /package/template/.claude/commands/aioson/{ux-ui.md → agent/ux-ui.md} +0 -0
@@ -0,0 +1,407 @@
1
+ # Components — Cognitive Core UI
2
+
3
+ Read after `design-tokens.md`. All components use CSS variables and adapt to dark/light theme automatically.
4
+
5
+ Code examples use JSX inline style notation as **design specifications** — read property-value pairs as spec, then adapt syntax to the active stack (HTML, Vue, Blade, etc.). The shorthand `TT` means `{ transition: 'var(--transition-theme)' }`.
6
+
7
+ ---
8
+
9
+ ## 1. Top Navigation Bar
10
+
11
+ ```
12
+ ┌──────────────────────────────────────────────────────┐
13
+ │ [Logo] AppName Link Link Link [☀] [Badge] │
14
+ │ SUBTITLE │
15
+ └──────────────────────────────────────────────────────┘
16
+ ```
17
+
18
+ - Background: `var(--bg-void)`, `position: sticky`, `top: 0`, `z-index: var(--z-sticky)`
19
+ - Border-bottom: `1px solid var(--border-subtle)`
20
+ - Logo: `36px` square, `background: var(--accent-dim)`, `border: 1px solid var(--accent)`, `border-radius: var(--radius-md)`, icon in `var(--accent)`
21
+ - Brand name: `font-family: var(--font-mono)`, `--weight-bold`, `--text-base`, `--text-heading`, `letter-spacing: var(--tracking-wide)`
22
+ - Subtitle: mono, `--text-xs`, `--text-muted`, uppercase, `--tracking-widest`
23
+ - Nav links: `--text-base`. Active: `var(--text-accent)`. Inactive: `var(--text-secondary)`
24
+ - Theme toggle: `36px` button, `var(--bg-surface)`, `1px solid var(--border-subtle)` — only include when the product supports theme switching
25
+
26
+ ---
27
+
28
+ ## 2. Stat Card
29
+
30
+ Large numeric readout with mono label. Used in stat rows at the top of pages.
31
+
32
+ ```jsx
33
+ <div style={{
34
+ background: 'var(--bg-surface)', border: '1px solid var(--border-subtle)',
35
+ borderRadius: 'var(--radius-lg)', padding: 'var(--space-4) var(--space-5)',
36
+ minWidth: 140, flex: 1, ...TT,
37
+ }}>
38
+ <div style={{ fontFamily: 'var(--font-mono)', fontSize: 'var(--text-xs)', color: 'var(--text-muted)',
39
+ letterSpacing: 'var(--tracking-widest)', textTransform: 'uppercase', fontWeight: 600,
40
+ marginBottom: 'var(--space-1)' }}>LABEL</div>
41
+ <div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>
42
+ <span style={{ fontFamily: 'var(--font-display)', fontSize: 'var(--text-4xl)', fontWeight: 700,
43
+ color: 'var(--text-heading)', lineHeight: 1, fontVariantNumeric: 'tabular-nums' }}>42</span>
44
+ <span style={{ fontSize: 'var(--text-lg)', color: 'var(--text-muted)' }}>/100</span>
45
+ </div>
46
+ <div style={{ fontSize: 'var(--text-sm)', color: 'var(--text-muted)', marginTop: 'var(--space-1)' }}>
47
+ subtitle text
48
+ </div>
49
+ </div>
50
+ ```
51
+
52
+ Accent variant: replace stat number `color` with `var(--semantic-green)`, `var(--semantic-red)`, or `var(--semantic-amber)`.
53
+
54
+ ---
55
+
56
+ ## 3. Card (base)
57
+
58
+ The fundamental container. Everything lives in cards.
59
+
60
+ ```jsx
61
+ const cardStyle = {
62
+ background: 'var(--bg-surface)',
63
+ border: '1px solid var(--border-subtle)',
64
+ borderRadius: 'var(--radius-lg)',
65
+ padding: 'var(--space-5)',
66
+ transition: 'var(--transition-theme), border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease',
67
+ };
68
+ // Hover: borderColor → var(--border-medium), boxShadow → var(--shadow-glow), transform → translateY(-1px)
69
+ ```
70
+
71
+ ---
72
+
73
+ ## 4. Info Card (icon + title + description + quote)
74
+
75
+ Used in grids for features, capabilities, items.
76
+
77
+ ```
78
+ ┌─────────────────────────────────┐
79
+ │ 📈 [icon] Badge text │ ← header row
80
+ │ Card Title │ ← accent color
81
+ │ Description text that explains │ ← secondary color
82
+ │ ┃ "Optional quote text" │ ← muted, left border
83
+ └─────────────────────────────────┘
84
+ ```
85
+
86
+ - Header: `display: flex; justify-content: space-between`. Icon left, badge right (mono, `--text-xs`, muted).
87
+ - Title: `--text-lg`, `--weight-semibold`, `color: var(--text-accent)`
88
+ - Description: `--text-base`, `--text-secondary`, `line-height: 1.5`
89
+ - Quote: italic, `--text-muted`, `border-left: 2px solid var(--accent-dim)`, `padding-left: var(--space-3)`
90
+
91
+ ---
92
+
93
+ ## 5. Profile Header
94
+
95
+ Entity header with avatar, name, role, badges, and stat cards.
96
+
97
+ ```
98
+ ┌──────────────────────────────────────────────────────────┐
99
+ │ [Avatar 96px] BIG NAME [Badge] [Badge] │
100
+ │ ID: XXX Role (italic, accent) │
101
+ │ ✦ TAGLINE (mono, xs, muted) │
102
+ │ │
103
+ │ ┌─StatCard─┐ ┌─StatCard─┐ ┌─StatCard─┐ │
104
+ └──────────────────────────────────────────────────────────┘
105
+ ```
106
+
107
+ - Avatar: `96px`, `border-radius: var(--radius-lg)`, `border: 2px solid var(--border-subtle)`
108
+ - Name: `--text-3xl`, `--weight-black`, `--tracking-tight`, `--text-heading`
109
+ - Role: `color: var(--text-accent)`, `font-style: italic`, `--text-lg`
110
+ - Tagline: mono, `--text-xs`, `--text-muted`, `--tracking-widest`, uppercase
111
+ - ID: mono, `--text-xs`, muted, absolute positioned below avatar
112
+ - Stat cards: same as component 2, `min-width: 130px`
113
+
114
+ ---
115
+
116
+ ## 6. Badge / Chip
117
+
118
+ Three variants — all use mono font, uppercase, `letter-spacing: var(--tracking-wider)`, `font-size: var(--text-xs)`.
119
+
120
+ **Accent badge** (active states, primary tags):
121
+ ```jsx
122
+ { background: 'var(--accent-dim)', color: 'var(--accent)', border: '1px solid var(--border-accent)',
123
+ fontFamily: 'var(--font-mono)', fontSize: 'var(--text-xs)', fontWeight: 600,
124
+ letterSpacing: 'var(--tracking-wider)', textTransform: 'uppercase',
125
+ padding: '2px 10px', borderRadius: 'var(--radius-sm)' }
126
+ ```
127
+
128
+ **Outline badge** (neutral tags):
129
+ ```jsx
130
+ { background: 'transparent', color: 'var(--text-secondary)', border: '1px solid var(--border-medium)',
131
+ /* same font styles as accent */ }
132
+ ```
133
+
134
+ **Semantic badges** (status — swap vars):
135
+ - Success: `background: var(--semantic-green-dim)`, `color: var(--semantic-green)`, `border: 1px solid rgba(22,199,132,0.3)`
136
+ - Danger: `var(--semantic-red-dim)`, `var(--semantic-red)`, red border
137
+ - Warning: `var(--semantic-amber-dim)`, `var(--semantic-amber)`, amber border
138
+ - Info: `var(--semantic-blue-dim)`, `var(--semantic-blue)`, blue border
139
+
140
+ Status dot: `width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; margin-right: 5px`
141
+
142
+ ---
143
+
144
+ ## 7. Tab Navigation
145
+
146
+ ```jsx
147
+ <div style={{ display: 'flex', gap: 2, borderBottom: '1px solid var(--border-subtle)',
148
+ padding: '0 var(--space-6)', overflowX: 'auto', ...TT }}>
149
+ <button style={{
150
+ fontFamily: 'var(--font-body)', fontSize: 'var(--text-base)',
151
+ color: isActive ? 'var(--text-accent)' : 'var(--text-secondary)',
152
+ background: 'none', border: 'none',
153
+ padding: 'var(--space-3) var(--space-4)',
154
+ borderBottom: `2px solid ${isActive ? 'var(--accent)' : 'transparent'}`,
155
+ cursor: 'pointer', display: 'flex', alignItems: 'center', gap: 'var(--space-2)',
156
+ transition: 'color 150ms ease, border-color 150ms ease',
157
+ }}>
158
+ <span>icon</span> Label
159
+ </button>
160
+ </div>
161
+ ```
162
+
163
+ Hover (non-active): `background: var(--bg-elevated)`, `border-radius: var(--radius-md) var(--radius-md) 0 0`
164
+
165
+ ---
166
+
167
+ ## 8. Sidebar Tree
168
+
169
+ ```
170
+ ┌──────────────────┐
171
+ │ SECTION LABEL │ ← mono, xs, muted, uppercase, tracking-widest
172
+ │ ⊞ Item Active │ ← bg-elevated, border-left: 3px solid var(--accent), text-heading
173
+ │ 📊 Item │ ← text-secondary, transparent bg
174
+ │ 💬 Item │
175
+ │ │
176
+ │ SECTION LABEL │
177
+ │ ○ Category │ ← text-muted (inactive)
178
+ │ ● Category (on) │ ← text-accent (active)
179
+ └──────────────────┘
180
+ ```
181
+
182
+ Width: `200–220px`. Items: `padding: var(--space-2) var(--space-3)`, `border-radius: var(--radius-md)`.
183
+ Active item: `background: var(--bg-elevated)`, `border-left: 3px solid var(--accent)`.
184
+ Hover: `background: var(--bg-elevated)`, `color: var(--text-primary)`.
185
+
186
+ ---
187
+
188
+ ## 9. Section Header
189
+
190
+ ```jsx
191
+ <div style={{ display: 'flex', alignItems: 'center', gap: 'var(--space-3)',
192
+ padding: 'var(--space-6) 0 var(--space-4)' }}>
193
+ <span style={{ color: 'var(--accent)', fontSize: 'var(--text-lg)' }}>⚡</span>
194
+ <h2 style={{ fontFamily: 'var(--font-display)', fontSize: 'var(--text-xl)',
195
+ fontWeight: 700, color: 'var(--text-heading)', margin: 0 }}>Title</h2>
196
+ </div>
197
+ ```
198
+
199
+ ---
200
+
201
+ ## 10. Progress Bar
202
+
203
+ ```jsx
204
+ <div style={{ height: 5, background: 'var(--bg-elevated)',
205
+ borderRadius: 'var(--radius-full)', overflow: 'hidden' }}>
206
+ <div style={{ height: '100%', borderRadius: 'var(--radius-full)',
207
+ background: color, width: `${pct}%`,
208
+ transition: 'width 300ms cubic-bezier(0.16, 1, 0.3, 1)' }} />
209
+ </div>
210
+ ```
211
+
212
+ Colors: `var(--accent)`, `var(--semantic-green)`, `var(--semantic-red)`, `var(--semantic-amber)`, `var(--semantic-purple)`.
213
+
214
+ ---
215
+
216
+ ## 11. Mode Panel (accent feature box)
217
+
218
+ Centered panel with radial glow — for "operating mode", featured status, or a primary CTA.
219
+
220
+ ```
221
+ ┌─────────── border-accent ──────────┐
222
+ │ ◆ BADGE PILL │
223
+ │ [Icon 56px] │ ← accent border + glow shadow
224
+ │ MONO LABEL │
225
+ │ Large Title │
226
+ │ "Subtitle italic" │
227
+ │ radial-gradient glow behind │
228
+ └────────────────────────────────────┘
229
+ ```
230
+
231
+ - Border: `1px solid var(--border-accent)`, `border-radius: var(--radius-xl)`
232
+ - Background: `var(--bg-surface)` with `radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 70%)`
233
+ - Icon: `56px`, circular, `background: var(--accent-dim)`, `border: 1px solid var(--accent)`, `color: var(--accent)`
234
+
235
+ ---
236
+
237
+ ## 12. DNA Panel (sliders + tags)
238
+
239
+ Combined panel with labeled progress metrics and a tag group. The "personality" card of any entity.
240
+
241
+ ```
242
+ ┌─────────────────────────────────────────┐
243
+ │ ✦ PANEL TITLE │
244
+ │ │
245
+ │ LABEL ████████████████░░░░ 72% │
246
+ │ LABEL ██████████░░░░░░░░░ 58% │
247
+ │ LABEL █████████████░░░░░░ 85% │
248
+ │ │
249
+ │ [Badge] [Badge] [Badge] [Badge] │
250
+ └─────────────────────────────────────────┘
251
+ ```
252
+
253
+ Each metric row: `display: flex; align-items: center; gap: var(--space-3)`.
254
+ Label: `min-width: 80px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted)`.
255
+ Bar: `flex: 1` (use Progress Bar component).
256
+ Value: mono, `--text-sm`, `--text-secondary`, `min-width: 40px; text-align: right`.
257
+ Tags: flex-wrap, `gap: var(--space-2)` (use Badge/Chip component).
258
+
259
+ ---
260
+
261
+ ## 13. Data Table
262
+
263
+ ```
264
+ ┌────────────────────────────────────────────────────┐
265
+ │ NAME ▲ CATEGORY STOCK STATUS PRICE │ ← mono header
266
+ ├────────────────────────────────────────────────────┤
267
+ │ Product Name Laptops 23 [●OK] R$12k │
268
+ │ Product Name Phones 5 [●Crit] R$8k │
269
+ └────────────────────────────────────────────────────┘
270
+ ```
271
+
272
+ **Premium table CSS (preferred — surfaced rows with hover):**
273
+
274
+ ```css
275
+ table {
276
+ width: 100%;
277
+ border-collapse: separate;
278
+ border-spacing: 0 8px;
279
+ }
280
+
281
+ thead th {
282
+ padding: 0 16px 8px;
283
+ font-family: var(--font-mono);
284
+ font-size: var(--text-xs);
285
+ letter-spacing: var(--tracking-widest);
286
+ text-transform: uppercase;
287
+ color: var(--text-muted);
288
+ text-align: left;
289
+ font-weight: 600;
290
+ }
291
+
292
+ tbody td {
293
+ padding: 14px 16px;
294
+ background: var(--bg-surface);
295
+ border-top: 1px solid var(--border-subtle);
296
+ border-bottom: 1px solid var(--border-subtle);
297
+ color: var(--text-primary);
298
+ font-size: var(--text-base);
299
+ transition: var(--transition-theme);
300
+ font-variant-numeric: tabular-nums;
301
+ }
302
+
303
+ tbody td:first-child {
304
+ border-left: 1px solid var(--border-subtle);
305
+ border-top-left-radius: var(--radius-lg);
306
+ border-bottom-left-radius: var(--radius-lg);
307
+ }
308
+
309
+ tbody td:last-child {
310
+ border-right: 1px solid var(--border-subtle);
311
+ border-top-right-radius: var(--radius-lg);
312
+ border-bottom-right-radius: var(--radius-lg);
313
+ }
314
+
315
+ tbody tr:hover td {
316
+ background: var(--bg-elevated);
317
+ border-color: var(--border-medium);
318
+ }
319
+ ```
320
+
321
+ **Rules:**
322
+ - Never use `border-collapse: collapse` with `tr` backgrounds in this visual system — hover fills look like hard painted rectangles.
323
+ - If the existing stack forces `collapse`, style `td` cells as the surface, not `tr`.
324
+ - In brownfield: check if the table should stay a table or become a list-detail surface before rewriting.
325
+
326
+ **Failure signs to fix:**
327
+ - Serif fallback or typography mismatch inside the table only → font scope bug
328
+ - Row hover painting a hard rectangle → use `border-collapse: separate` + `td` surfaces
329
+ - Status chips squeezed between columns → widen the lane or reduce chip padding
330
+ - Numbers misaligned → add `font-variant-numeric: tabular-nums`
331
+
332
+ ---
333
+
334
+ ## 14. Form Elements
335
+
336
+ **Input:**
337
+ ```jsx
338
+ { background: 'var(--bg-surface)', border: '1px solid var(--border-medium)',
339
+ borderRadius: 'var(--radius-md)', padding: 'var(--space-2) var(--space-3)',
340
+ color: 'var(--text-primary)', fontSize: 'var(--text-base)',
341
+ fontFamily: 'var(--font-body)', outline: 'none', ...TT }
342
+ // Focus: borderColor → var(--border-accent-strong), boxShadow → 0 0 0 3px var(--accent-glow)
343
+ ```
344
+
345
+ **Label:** mono label style (xs, muted, uppercase, tracking-widest). Place above input with `margin-bottom: var(--space-1)`.
346
+
347
+ **Button primary:**
348
+ ```jsx
349
+ { background: 'var(--accent)', color: 'var(--text-inverse)', border: 'none',
350
+ borderRadius: 'var(--radius-md)', padding: 'var(--space-2) var(--space-5)',
351
+ fontFamily: 'var(--font-mono)', fontSize: 'var(--text-sm)', fontWeight: 600,
352
+ letterSpacing: 'var(--tracking-wider)', textTransform: 'uppercase', cursor: 'pointer',
353
+ transition: 'background 150ms ease' }
354
+ // Hover: background → var(--accent-hover)
355
+ ```
356
+
357
+ **Button secondary:**
358
+ ```jsx
359
+ { background: 'transparent', color: 'var(--text-secondary)',
360
+ border: '1px solid var(--border-medium)',
361
+ /* rest same as primary */
362
+ }
363
+ // Hover: borderColor → var(--border-accent), color → var(--text-accent)
364
+ ```
365
+
366
+ ---
367
+
368
+ ## 15. Modal / Detail Overlay
369
+
370
+ ```
371
+ ┌─────────────── backdrop (rgba, z-modal) ───────────────┐
372
+ │ │
373
+ │ ┌─ Card max-w: 700px ─────────────────────────┐ │
374
+ │ │ HEADER: title + close button │ │
375
+ │ │ ───────────────────────── │ │
376
+ │ │ BODY: stat cards, progress, badges, etc. │ │
377
+ │ └─────────────────────────────────────────────┘ │
378
+ │ │
379
+ └──────────────────────────────────────────────────────────┘
380
+ ```
381
+
382
+ - Backdrop: `rgba(0,0,0,0.6)`, centered flex, `z-index: var(--z-modal)`
383
+ - Content card: `var(--bg-base)`, `border: 1px solid var(--border-subtle)`, `border-radius: var(--radius-xl)`, `max-width: 700px`
384
+ - Header: flex, space-between, `padding: var(--space-5) var(--space-6)`, `border-bottom: 1px solid var(--border-subtle)`
385
+ - Body: `padding: var(--space-6)` — reuse stat cards, progress bars, badges, section headers
386
+ - Animation: `scaleIn 300ms cubic-bezier(0.16, 1, 0.3, 1)` (see motion.md)
387
+
388
+ ---
389
+
390
+ ## 16. Theme Toggle
391
+
392
+ ```jsx
393
+ <button
394
+ onClick={() => setTheme(t => t === 'dark' ? 'light' : 'dark')}
395
+ style={{
396
+ width: 36, height: 36, borderRadius: 'var(--radius-md)',
397
+ border: '1px solid var(--border-subtle)', background: 'var(--bg-surface)',
398
+ color: 'var(--text-secondary)', cursor: 'pointer',
399
+ display: 'flex', alignItems: 'center', justifyContent: 'center',
400
+ fontSize: '1rem', ...TT,
401
+ }}
402
+ >
403
+ {theme === 'dark' ? '☀' : '☾'}
404
+ </button>
405
+ ```
406
+
407
+ Hover: `borderColor → var(--border-accent)`, `color → var(--accent)`.
@@ -0,0 +1,172 @@
1
+ # Dashboard Presets — Cognitive Core UI
2
+
3
+ Read after `design-tokens.md`, `components.md`, and `patterns.md`.
4
+
5
+ These presets help choose a fitting operational composition instead of defaulting to random card grids.
6
+
7
+ ---
8
+
9
+ ## How to choose
10
+
11
+ 1. Start from the product's **main operational pressure**, not from a visual trope.
12
+ 2. Pick **one dominant preset** per screen.
13
+ 3. Mix small traits from another preset only when the primary composition is already clear.
14
+
15
+ ---
16
+
17
+ ## Preset 1: Inventory Operations Board
18
+
19
+ **Best for:** stock control, inventory movement, replenishment monitoring, product catalog operations, supply dashboards.
20
+
21
+ **Default theme:** Dark.
22
+
23
+ **Layout composition:**
24
+ ```
25
+ TOP BAR: Logo + product name + compact status badge + account/actions
26
+ STATS ROW: 3-4 high-signal cards only
27
+ SUBNAV: Dashboard | Products | Movements (or equivalent)
28
+ MAIN GRID:
29
+ LEFT RAIL (220-260px): monitoring blocks, quick filters, credential/mode card
30
+ CENTER (flex: 1): stock radar / urgent items / operational summary
31
+ RIGHT RAIL (320-380px): recent movements / alerts / short activity feed
32
+ ```
33
+
34
+ **Why it works:**
35
+ - One central operational story above the fold
36
+ - Urgent items visible without a product-wall overload
37
+ - Movement history stays contextual, not dominant
38
+ - Left rail gives monitoring without stealing the main stage
39
+
40
+ **Rules:**
41
+ - Do not render the full product catalog above the fold. Show 2–4 urgent cards in the central radar.
42
+ - Use color semantics sparingly: green = stable, amber = low, red = zero/critical.
43
+ - Prefer operational labels: `Baixo estoque`, `Zerados`, `Saude do estoque`, `Movimentacao recente`.
44
+ - Keep the focal block calm. Do not turn it into a second dashboard shell inside the dashboard.
45
+ - For tables: treat each row as an intentional operational lane — aligned numbers, consistent padding, enough breathing room around status chips.
46
+
47
+ ---
48
+
49
+ ## Preset 2: Premium Control Center
50
+
51
+ **Best for:** AI systems, orchestration panels, intelligence products, multi-module operational platforms, command centers.
52
+
53
+ **Default theme:** Dark.
54
+
55
+ **Layout composition:**
56
+ ```
57
+ TOP BAR: Logo + system subtitle + nav + status badge
58
+ STATS ROW: 4 stat cards
59
+ SECONDARY NAV: domain tabs
60
+ MAIN GRID:
61
+ PRIMARY PANEL: single large analysis/control surface
62
+ SUPPORT PANEL: mode/status block
63
+ LOWER PANELS: grouped operational cards or capabilities
64
+ ```
65
+
66
+ **Guardrail:**
67
+ - Use only when the product genuinely needs command-center semantics.
68
+ - DNA panels, mode panels, and labeled capability cards are optional, not default.
69
+ - Do not use for inventory just because the product is dark and premium.
70
+
71
+ ---
72
+
73
+ ## Preset 3: Admin Analytics
74
+
75
+ **Best for:** analytics, SaaS admin, revenue tracking, performance reporting dashboards.
76
+
77
+ **Default theme:** Dark or Light.
78
+
79
+ **Layout composition:**
80
+ ```
81
+ TOP BAR
82
+ STATS ROW
83
+ FILTER / DATE BAR
84
+ MAIN:
85
+ Chart panel (full width or 2/3)
86
+ Ranked list or summary panel (1/3)
87
+ Table or report panel (full width below)
88
+ ```
89
+
90
+ **Guardrail:**
91
+ - Let charts and tables do the work.
92
+ - Do not overload with decorative status cards.
93
+
94
+ ---
95
+
96
+ ## Preset 4: Ops Cockpit
97
+
98
+ **Best for:** system monitoring, logistics control, incident response, infra operations, real-time dashboards.
99
+
100
+ **Default theme:** Dark.
101
+
102
+ **Layout composition:**
103
+ ```
104
+ TOP BAR
105
+ STATUS ROW (alert counts + system health)
106
+ MAIN GRID:
107
+ Alert feed (primary, left/center)
108
+ System status cluster (grouped service cards)
109
+ Quick stats / context rail (right)
110
+ ```
111
+
112
+ **Guardrail:**
113
+ - Alerts must be scannable first. Status color must carry meaning, not atmosphere.
114
+
115
+ ---
116
+
117
+ ## Preset 5: CRM / Contact Manager
118
+
119
+ **Best for:** CRM, support tools, people directories, account management, talent pipelines.
120
+
121
+ **Default theme:** Light or Dark.
122
+
123
+ **Layout composition:**
124
+ ```
125
+ TOP BAR
126
+ TAB BAR (with filter badges)
127
+ LIST-DETAIL SPLIT:
128
+ Entity list (340px, scrollable)
129
+ Active profile/detail view (flex: 1)
130
+ → Profile Header (compact) + Stat Cards + Tab sub-nav + Content
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Operational Table Guardrails
136
+
137
+ Dashboards often have tables. This is where otherwise-good boards lose quality.
138
+
139
+ ### Goals
140
+ - Rows scannable in under 1 second
141
+ - Same premium density as the rest of the board
142
+ - Avoid the feeling of "spreadsheet leftovers pasted into a polished shell"
143
+
144
+ ### Rules
145
+ 1. Use `font-variant-numeric: tabular-nums` for quantities, prices, thresholds, and derived values.
146
+ 2. Keep status, quantity, and actions visually separated — they should not collapse into one dense block.
147
+ 3. Status chips must sit comfortably inside row rhythm. If they crowd neighboring columns, widen the lane.
148
+ 4. Action buttons in tables should read as a grouped control cluster, not as independent floating pills.
149
+ 5. Row hover must feel like a surface state, not a hard painted rectangle.
150
+ 6. `border-collapse: separate` + `td` surfaces = premium. `border-collapse: collapse` + `tr` backgrounds = amateur.
151
+
152
+ ### Failure signs
153
+ - Serif fallback inside the table only → font scope bug in `td`
154
+ - Row hover painting a hard rectangle → wrong collapse mode or `tr` background
155
+ - Status chips squeezed → widen the column or reduce chip padding
156
+ - Numbers misaligned → missing `font-variant-numeric: tabular-nums`
157
+ - Page opens with a large hero-like block → reduce stat row height, tighten typography
158
+ - Cards feel puffy and over-padded → reduce `padding`, `border-radius`, and grid gap
159
+ - Layout reads like a polished demo instead of an operational surface → density is part of the identity
160
+
161
+ ---
162
+
163
+ ## Inventory Mapping Guide
164
+
165
+ | Inventory concept | UI treatment |
166
+ |---|---|
167
+ | Low stock | Urgent card in stock radar |
168
+ | Zero stock | Critical card in stock radar (semantic-red) |
169
+ | Recent entry/exit | Right-rail activity list |
170
+ | Valuation / total items | Top stat row |
171
+ | Category / supplier monitoring | Left rail blocks or filters |
172
+ | Replenishment threshold | Progress bar + limit helper |