@monoes/monomindcli 2.15.5 → 2.15.7

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 (226) hide show
  1. package/dist/src/commands/cleanup-plan.d.ts +57 -0
  2. package/dist/src/commands/cleanup-plan.d.ts.map +1 -0
  3. package/dist/src/commands/cleanup-plan.js +379 -0
  4. package/dist/src/commands/cleanup-plan.js.map +1 -0
  5. package/dist/src/commands/cleanup.d.ts.map +1 -1
  6. package/dist/src/commands/cleanup.js +87 -160
  7. package/dist/src/commands/cleanup.js.map +1 -1
  8. package/dist/src/commands/search-universal.d.ts +8 -0
  9. package/dist/src/commands/search-universal.d.ts.map +1 -1
  10. package/dist/src/commands/search-universal.js +14 -0
  11. package/dist/src/commands/search-universal.js.map +1 -1
  12. package/dist/src/index.d.ts.map +1 -1
  13. package/dist/src/index.js +11 -2
  14. package/dist/src/index.js.map +1 -1
  15. package/dist/src/orgrt/completion-gate.d.ts +40 -0
  16. package/dist/src/orgrt/completion-gate.d.ts.map +1 -1
  17. package/dist/src/orgrt/completion-gate.js +90 -9
  18. package/dist/src/orgrt/completion-gate.js.map +1 -1
  19. package/dist/src/orgrt/daemon.d.ts +4 -0
  20. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  21. package/dist/src/orgrt/daemon.js +15 -2
  22. package/dist/src/orgrt/daemon.js.map +1 -1
  23. package/dist/src/orgrt/decisions.d.ts +24 -1
  24. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  25. package/dist/src/orgrt/decisions.js +171 -11
  26. package/dist/src/orgrt/decisions.js.map +1 -1
  27. package/dist/src/orgrt/idle-deadline.d.ts +10 -0
  28. package/dist/src/orgrt/idle-deadline.d.ts.map +1 -1
  29. package/dist/src/orgrt/idle-deadline.js +8 -0
  30. package/dist/src/orgrt/idle-deadline.js.map +1 -1
  31. package/dist/src/orgrt/mailbox.d.ts +7 -0
  32. package/dist/src/orgrt/mailbox.d.ts.map +1 -1
  33. package/dist/src/orgrt/mailbox.js +14 -0
  34. package/dist/src/orgrt/mailbox.js.map +1 -1
  35. package/dist/src/orgrt/review-packet.d.ts +1 -1
  36. package/dist/src/orgrt/review-packet.d.ts.map +1 -1
  37. package/dist/src/orgrt/review-packet.js +2 -1
  38. package/dist/src/orgrt/review-packet.js.map +1 -1
  39. package/dist/src/orgrt/role-sandbox.d.ts +1 -0
  40. package/dist/src/orgrt/role-sandbox.d.ts.map +1 -1
  41. package/dist/src/orgrt/role-sandbox.js +6 -1
  42. package/dist/src/orgrt/role-sandbox.js.map +1 -1
  43. package/dist/src/orgrt/session.d.ts +3 -0
  44. package/dist/src/orgrt/session.d.ts.map +1 -1
  45. package/dist/src/orgrt/session.js +8 -1
  46. package/dist/src/orgrt/session.js.map +1 -1
  47. package/dist/src/orgrt/task-dag.d.ts +3 -0
  48. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  49. package/dist/src/orgrt/task-dag.js +7 -0
  50. package/dist/src/orgrt/task-dag.js.map +1 -1
  51. package/dist/src/orgrt/types.d.ts +3 -0
  52. package/dist/src/orgrt/types.d.ts.map +1 -1
  53. package/dist/src/orgrt/types.js +6 -2
  54. package/dist/src/orgrt/types.js.map +1 -1
  55. package/dist/src/update/checker.d.ts +3 -1
  56. package/dist/src/update/checker.d.ts.map +1 -1
  57. package/dist/src/update/checker.js +7 -3
  58. package/dist/src/update/checker.js.map +1 -1
  59. package/dist/src/update/index.d.ts +16 -0
  60. package/dist/src/update/index.d.ts.map +1 -1
  61. package/dist/src/update/index.js +37 -1
  62. package/dist/src/update/index.js.map +1 -1
  63. package/dist/src/update/refresh-worker.d.ts +9 -0
  64. package/dist/src/update/refresh-worker.d.ts.map +1 -0
  65. package/dist/src/update/refresh-worker.js +17 -0
  66. package/dist/src/update/refresh-worker.js.map +1 -0
  67. package/dist/src/utils/resource-governor.d.ts +44 -2
  68. package/dist/src/utils/resource-governor.d.ts.map +1 -1
  69. package/dist/src/utils/resource-governor.js +157 -40
  70. package/dist/src/utils/resource-governor.js.map +1 -1
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +4 -4
  73. package/.claude/skills/monodesign/SKILL.md +0 -257
  74. package/.claude/skills/monodesign/adapt.md +0 -53
  75. package/.claude/skills/monodesign/agents/monodesign-asset-producer.md +0 -100
  76. package/.claude/skills/monodesign/agents/monodesign-manual-edit-applier.md +0 -103
  77. package/.claude/skills/monodesign/animate.md +0 -65
  78. package/.claude/skills/monodesign/audit.md +0 -89
  79. package/.claude/skills/monodesign/bolder.md +0 -50
  80. package/.claude/skills/monodesign/clarify.md +0 -64
  81. package/.claude/skills/monodesign/colorize.md +0 -68
  82. package/.claude/skills/monodesign/craft.md +0 -51
  83. package/.claude/skills/monodesign/critique.md +0 -66
  84. package/.claude/skills/monodesign/delight.md +0 -47
  85. package/.claude/skills/monodesign/distill.md +0 -56
  86. package/.claude/skills/monodesign/document.md +0 -83
  87. package/.claude/skills/monodesign/extract.md +0 -74
  88. package/.claude/skills/monodesign/harden.md +0 -65
  89. package/.claude/skills/monodesign/init.md +0 -30
  90. package/.claude/skills/monodesign/layout.md +0 -36
  91. package/.claude/skills/monodesign/live.md +0 -34
  92. package/.claude/skills/monodesign/onboard.md +0 -50
  93. package/.claude/skills/monodesign/optimize.md +0 -64
  94. package/.claude/skills/monodesign/overdrive.md +0 -56
  95. package/.claude/skills/monodesign/polish.md +0 -68
  96. package/.claude/skills/monodesign/quieter.md +0 -57
  97. package/.claude/skills/monodesign/reference/adapt.md +0 -312
  98. package/.claude/skills/monodesign/reference/adapt.native.md +0 -58
  99. package/.claude/skills/monodesign/reference/android.md +0 -40
  100. package/.claude/skills/monodesign/reference/animate.md +0 -203
  101. package/.claude/skills/monodesign/reference/antipatterns-catalog.md +0 -410
  102. package/.claude/skills/monodesign/reference/audit.md +0 -135
  103. package/.claude/skills/monodesign/reference/audit.native.md +0 -139
  104. package/.claude/skills/monodesign/reference/bolder.md +0 -120
  105. package/.claude/skills/monodesign/reference/brand-workflow.md +0 -180
  106. package/.claude/skills/monodesign/reference/brand.md +0 -108
  107. package/.claude/skills/monodesign/reference/clarify.md +0 -288
  108. package/.claude/skills/monodesign/reference/codex.md +0 -105
  109. package/.claude/skills/monodesign/reference/cognitive-load.md +0 -106
  110. package/.claude/skills/monodesign/reference/color-and-contrast.md +0 -105
  111. package/.claude/skills/monodesign/reference/colorize.md +0 -257
  112. package/.claude/skills/monodesign/reference/component-specs.md +0 -260
  113. package/.claude/skills/monodesign/reference/component-states.md +0 -274
  114. package/.claude/skills/monodesign/reference/component-system.md +0 -358
  115. package/.claude/skills/monodesign/reference/copy-formulas.md +0 -160
  116. package/.claude/skills/monodesign/reference/craft.md +0 -123
  117. package/.claude/skills/monodesign/reference/critique.md +0 -780
  118. package/.claude/skills/monodesign/reference/delight.md +0 -302
  119. package/.claude/skills/monodesign/reference/design-principles.md +0 -246
  120. package/.claude/skills/monodesign/reference/distill.md +0 -111
  121. package/.claude/skills/monodesign/reference/document.md +0 -429
  122. package/.claude/skills/monodesign/reference/extract.md +0 -69
  123. package/.claude/skills/monodesign/reference/harden.md +0 -347
  124. package/.claude/skills/monodesign/reference/heuristics-scoring.md +0 -234
  125. package/.claude/skills/monodesign/reference/hooks.md +0 -92
  126. package/.claude/skills/monodesign/reference/image-prompts.md +0 -130
  127. package/.claude/skills/monodesign/reference/init.md +0 -221
  128. package/.claude/skills/monodesign/reference/interaction-design.md +0 -189
  129. package/.claude/skills/monodesign/reference/ios.md +0 -45
  130. package/.claude/skills/monodesign/reference/layout.md +0 -185
  131. package/.claude/skills/monodesign/reference/live.md +0 -710
  132. package/.claude/skills/monodesign/reference/motion-design.md +0 -109
  133. package/.claude/skills/monodesign/reference/onboard.md +0 -234
  134. package/.claude/skills/monodesign/reference/optimize.md +0 -258
  135. package/.claude/skills/monodesign/reference/overdrive.md +0 -130
  136. package/.claude/skills/monodesign/reference/personas.md +0 -179
  137. package/.claude/skills/monodesign/reference/polish.md +0 -241
  138. package/.claude/skills/monodesign/reference/pre-delivery-checklist.md +0 -108
  139. package/.claude/skills/monodesign/reference/product.md +0 -60
  140. package/.claude/skills/monodesign/reference/quieter.md +0 -99
  141. package/.claude/skills/monodesign/reference/responsive-design.md +0 -114
  142. package/.claude/skills/monodesign/reference/shape.md +0 -165
  143. package/.claude/skills/monodesign/reference/spatial-design.md +0 -100
  144. package/.claude/skills/monodesign/reference/teach.md +0 -10
  145. package/.claude/skills/monodesign/reference/token-architecture.md +0 -222
  146. package/.claude/skills/monodesign/reference/typeset.md +0 -301
  147. package/.claude/skills/monodesign/reference/typography.md +0 -159
  148. package/.claude/skills/monodesign/reference/ux-research.md +0 -143
  149. package/.claude/skills/monodesign/reference/ux-rules.md +0 -211
  150. package/.claude/skills/monodesign/reference/ux-writing.md +0 -107
  151. package/.claude/skills/monodesign/scripts/command-metadata.json +0 -94
  152. package/.claude/skills/monodesign/scripts/context-signals.mjs +0 -260
  153. package/.claude/skills/monodesign/scripts/context.mjs +0 -1065
  154. package/.claude/skills/monodesign/scripts/critique-storage.mjs +0 -416
  155. package/.claude/skills/monodesign/scripts/detect-csp.mjs +0 -193
  156. package/.claude/skills/monodesign/scripts/detect.mjs +0 -33
  157. package/.claude/skills/monodesign/scripts/detector/browser/injected/index.mjs +0 -1960
  158. package/.claude/skills/monodesign/scripts/detector/cli/main.mjs +0 -321
  159. package/.claude/skills/monodesign/scripts/detector/design-system.mjs +0 -814
  160. package/.claude/skills/monodesign/scripts/detector/detect-antipatterns-browser.js +0 -5628
  161. package/.claude/skills/monodesign/scripts/detector/detect-antipatterns.mjs +0 -50
  162. package/.claude/skills/monodesign/scripts/detector/engines/browser/detect-url.mjs +0 -259
  163. package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +0 -349
  164. package/.claude/skills/monodesign/scripts/detector/engines/regex/detect-text.mjs +0 -636
  165. package/.claude/skills/monodesign/scripts/detector/engines/static-html/css-cascade.mjs +0 -1016
  166. package/.claude/skills/monodesign/scripts/detector/engines/static-html/detect-html.mjs +0 -253
  167. package/.claude/skills/monodesign/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -198
  168. package/.claude/skills/monodesign/scripts/detector/findings.mjs +0 -12
  169. package/.claude/skills/monodesign/scripts/detector/fix/css-regions.mjs +0 -181
  170. package/.claude/skills/monodesign/scripts/detector/fix/fixers.mjs +0 -373
  171. package/.claude/skills/monodesign/scripts/detector/fix/index.mjs +0 -426
  172. package/.claude/skills/monodesign/scripts/detector/node/file-system.mjs +0 -198
  173. package/.claude/skills/monodesign/scripts/detector/profile/profiler.mjs +0 -166
  174. package/.claude/skills/monodesign/scripts/detector/registry/antipatterns.mjs +0 -563
  175. package/.claude/skills/monodesign/scripts/detector/rules/checks.mjs +0 -3024
  176. package/.claude/skills/monodesign/scripts/detector/shared/color.mjs +0 -124
  177. package/.claude/skills/monodesign/scripts/detector/shared/constants.mjs +0 -101
  178. package/.claude/skills/monodesign/scripts/detector/shared/fonts.mjs +0 -30
  179. package/.claude/skills/monodesign/scripts/detector/shared/inline-ignores.mjs +0 -148
  180. package/.claude/skills/monodesign/scripts/detector/shared/page.mjs +0 -7
  181. package/.claude/skills/monodesign/scripts/hook-admin.mjs +0 -694
  182. package/.claude/skills/monodesign/scripts/hook-before-edit.mjs +0 -516
  183. package/.claude/skills/monodesign/scripts/hook-lib.mjs +0 -1785
  184. package/.claude/skills/monodesign/scripts/hook.mjs +0 -61
  185. package/.claude/skills/monodesign/scripts/lib/design-parser.mjs +0 -809
  186. package/.claude/skills/monodesign/scripts/lib/is-generated.mjs +0 -69
  187. package/.claude/skills/monodesign/scripts/lib/monodesign-config.mjs +0 -640
  188. package/.claude/skills/monodesign/scripts/lib/monodesign-paths.mjs +0 -129
  189. package/.claude/skills/monodesign/scripts/lib/provider.mjs +0 -4
  190. package/.claude/skills/monodesign/scripts/lib/target-args.mjs +0 -42
  191. package/.claude/skills/monodesign/scripts/live/browser-script-parts.mjs +0 -50
  192. package/.claude/skills/monodesign/scripts/live/completion.mjs +0 -19
  193. package/.claude/skills/monodesign/scripts/live/event-validation.mjs +0 -137
  194. package/.claude/skills/monodesign/scripts/live/insert-ui.mjs +0 -458
  195. package/.claude/skills/monodesign/scripts/live/manual-apply.mjs +0 -939
  196. package/.claude/skills/monodesign/scripts/live/manual-edit-routes.mjs +0 -357
  197. package/.claude/skills/monodesign/scripts/live/manual-edits-buffer.mjs +0 -152
  198. package/.claude/skills/monodesign/scripts/live/session-store.mjs +0 -293
  199. package/.claude/skills/monodesign/scripts/live/svelte-component.mjs +0 -826
  200. package/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +0 -279
  201. package/.claude/skills/monodesign/scripts/live/ui-core.mjs +0 -180
  202. package/.claude/skills/monodesign/scripts/live/vocabulary.mjs +0 -36
  203. package/.claude/skills/monodesign/scripts/live-accept.mjs +0 -812
  204. package/.claude/skills/monodesign/scripts/live-browser-dom.js +0 -147
  205. package/.claude/skills/monodesign/scripts/live-browser-session.js +0 -124
  206. package/.claude/skills/monodesign/scripts/live-browser.js +0 -11213
  207. package/.claude/skills/monodesign/scripts/live-commit-manual-edits.mjs +0 -1241
  208. package/.claude/skills/monodesign/scripts/live-complete.mjs +0 -75
  209. package/.claude/skills/monodesign/scripts/live-copy-edit-agent.mjs +0 -683
  210. package/.claude/skills/monodesign/scripts/live-discard-manual-edits.mjs +0 -51
  211. package/.claude/skills/monodesign/scripts/live-inject.mjs +0 -596
  212. package/.claude/skills/monodesign/scripts/live-insert.mjs +0 -272
  213. package/.claude/skills/monodesign/scripts/live-manual-edit-evidence.mjs +0 -363
  214. package/.claude/skills/monodesign/scripts/live-poll.mjs +0 -384
  215. package/.claude/skills/monodesign/scripts/live-resume.mjs +0 -94
  216. package/.claude/skills/monodesign/scripts/live-server.mjs +0 -1210
  217. package/.claude/skills/monodesign/scripts/live-status.mjs +0 -61
  218. package/.claude/skills/monodesign/scripts/live-target.mjs +0 -30
  219. package/.claude/skills/monodesign/scripts/live-wrap.mjs +0 -884
  220. package/.claude/skills/monodesign/scripts/live.mjs +0 -297
  221. package/.claude/skills/monodesign/scripts/modern-screenshot.umd.js +0 -14
  222. package/.claude/skills/monodesign/scripts/palette.mjs +0 -635
  223. package/.claude/skills/monodesign/scripts/pin.mjs +0 -221
  224. package/.claude/skills/monodesign/shape.md +0 -71
  225. package/.claude/skills/monodesign/teach.md +0 -18
  226. package/.claude/skills/monodesign/typeset.md +0 -59
@@ -1,185 +0,0 @@
1
- Space is the most underused design tool. Find the layout's actual problem (monotone spacing, weak hierarchy, identical card grids) and fix the structure, not the surface.
2
-
3
- ---
4
-
5
- ## Register
6
-
7
- Brand: asymmetric compositions, fluid spacing with `clamp()`, intentional grid-breaking for emphasis. Rhythm through contrast: tight groupings paired with generous separations.
8
-
9
- Product: predictable grids, consistent densities, familiar navigation patterns. Responsive behavior is structural (collapse sidebar, responsive table), not fluid typography. Consistency IS an affordance.
10
-
11
- Native (`ios` / `android` / `adaptive`): structure follows the Layout section of [ios.md](ios.md) / [android.md](android.md) (read it first if Setup hasn't already): platform navigation, insets, and touch targets, never the CSS tooling below.
12
-
13
- ---
14
-
15
- ## Two isolated assessments (required)
16
-
17
- Spawn two parallel sub-agents whenever a sub-agent/Task tool is exposed: one for the layout assessment, one for the mechanical pre-scan. If the harness needs explicit user permission for sub-agents, stop and ask before proceeding. Isolation is the point: detector output anchors visual judgment toward what the scan can see, so neither sub-agent gets the other's output. Each assessment runs in its own sub-agent; running either one in this context when a sub-agent tool exists is not permitted, even when it is faster; the fallback below is only for sessions with no sub-agent tool. Give each a self-contained prompt (target files, register, documented spacing scale when present, and its instructions below); do not assume it can read this file.
18
-
19
- **Sub-agent A (layout assessment)**: give it the full [Assess Current Layout](#assess-current-layout) checklist below, verbatim, in its prompt. It works through every item and returns per-item findings citing file, selector, or value.
20
-
21
- **Sub-agent B (mechanical pre-scan)**: run the bundled detector scoped to layout:
22
-
23
- ```bash
24
- node .claude/skills/monodesign/scripts/detect.mjs --json --scope layout [target files or dirs]
25
- ```
26
-
27
- A missing `node` on PATH is not permission to skip: hunt for a runtime (`command -v node`, nvm or Homebrew paths, the harness's own bundled node) and run it by full path. If none exists, halt the scan and report that Node must be installed (the parent relays this to the user); do **not** substitute grep for the detector or proceed unscanned. The detector abstains on arbitrary Tailwind spacing (`gap-[13px]`, `p-[7px]`) and ad-hoc `z-index` stacks, so when the project documents a spacing scale, also grep `gap-\[`, `p[trblxy]?-\[`, `m[trblxy]?-\[`, `z-\[` and judge those hits against it. Return the findings JSON plus the grep verdicts.
28
-
29
- **If no sub-agent tool is exposed (or the user declined)**: run both yourself, assessment first, pre-scan second, so the deterministic findings can't anchor the visual judgment. Keep that order even when the scan feels quicker to start with.
30
-
31
- **Synthesize** once both are done: merge into a single findings list, noting where they agree and what each caught alone. Fix every finding, or list it as a deliberate exception for the user to accept. A clean scan is a floor, not a verdict: a monotone grid with uniform spacing passes every detector rule, which is exactly what the assessment exists to catch. State in your final summary which path ran (parallel sub-agents or single-context fallback).
32
-
33
- ---
34
-
35
- ## Assess Current Layout
36
-
37
- This checklist is sub-agent A's brief (on the fallback path, work through it yourself before the pre-scan). Analyze what's weak about the current spatial design:
38
-
39
- 1. **Spacing**:
40
- - Is spacing consistent or arbitrary? (Random padding/margin values)
41
- - Is all spacing the same? (Equal padding everywhere = no rhythm)
42
- - Are related elements grouped tightly, with generous space between groups?
43
-
44
- 2. **Visual hierarchy**:
45
- - Apply the squint test: blur your (metaphorical) eyes. Can you still identify the most important element, second most important, and clear groupings?
46
- - Is hierarchy achieved effectively? (Space and weight alone can be enough; is the current approach working?)
47
- - Does whitespace guide the eye to what matters?
48
-
49
- 3. **Grid & structure**:
50
- - Is there a clear underlying structure, or does the layout feel random?
51
- - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly)
52
-
53
- 4. **Rhythm & variety**:
54
- - Does the layout have visual rhythm? (Alternating tight/generous spacing)
55
- - Is every section structured the same way? (Monotonous repetition)
56
- - Are there intentional moments of surprise or emphasis?
57
-
58
- 5. **Density**:
59
- - Is the layout too cramped? (Not enough breathing room)
60
- - Is the layout too sparse? (Excessive whitespace without purpose)
61
- - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
62
-
63
- **CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material; use it with intention.
64
-
65
- ## Plan Layout Improvements
66
-
67
- Create a systematic plan:
68
-
69
- - **Spacing system**: Use a consistent scale (a framework's built-in scale like Tailwind's, rem-based tokens, or a custom system). The specific values matter less than consistency.
70
- - **Hierarchy strategy**: How will space communicate importance?
71
- - **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
72
- - **Rhythm**: Where should spacing be tight vs generous?
73
-
74
- ## Improve Layout Systematically
75
-
76
- ### Establish a Spacing System
77
-
78
- - Use a consistent spacing scale (framework scales like Tailwind, rem-based tokens, or a custom scale all work). What matters is that values come from a defined set, not arbitrary numbers.
79
- - Prefer a 4pt base scale (4, 8, 12, 16, 24, 32, 48, 64, 96px) over 8pt; 8pt is too coarse and you'll frequently need 12px between 8 and 16.
80
- - Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8`
81
- - Use `gap` for sibling spacing instead of margins; eliminates margin collapse hacks
82
- - Apply `clamp()` for fluid spacing that breathes on larger screens
83
-
84
- ### Create Visual Rhythm
85
-
86
- - **Tight grouping** for related elements (8-12px between siblings)
87
- - **Generous separation** between distinct sections (48-96px)
88
- - **Varied spacing** within sections (not every row needs the same gap)
89
- - **Asymmetric compositions**: a deliberate choice when the content invites it (not a default to chase).
90
-
91
- ### Choose the Right Layout Tool
92
-
93
- - **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals.
94
- - **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
95
- - Use named grid areas (`grid-template-areas`) for complex page layouts; redefine at breakpoints.
96
- - Use **container queries** for components, viewport queries for page layouts. A card in a narrow sidebar can stay compact while the same card in a main content area expands automatically:
97
-
98
- ```css
99
- .card-container { container-type: inline-size; }
100
- .card { display: grid; gap: var(--space-md); }
101
- @container (min-width: 400px) {
102
- .card { grid-template-columns: 120px 1fr; }
103
- }
104
- ```
105
-
106
- ### Break Card Grid Monotony
107
-
108
- - Don't default to card grids for everything; spacing and alignment create visual grouping naturally
109
- - Use cards only when content is truly distinct and actionable. Never nest cards inside cards
110
- - Vary card sizes, span columns, or mix cards with non-card content to break repetition
111
-
112
- ### Strengthen Visual Hierarchy
113
-
114
- - Use the fewest dimensions needed for clear hierarchy. Space alone can be enough; generous whitespace around an element draws the eye. Some of the most polished designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient.
115
- - The best hierarchy combines 2–3 dimensions at once. A heading that's larger, bolder, AND has more space above it reads as primary without trying:
116
-
117
- | Tool | Strong Hierarchy | Weak Hierarchy |
118
- |------|------------------|----------------|
119
- | **Size** | 3:1 ratio or more | <2:1 ratio |
120
- | **Weight** | Bold vs Regular | Medium vs Regular |
121
- | **Color** | High contrast | Similar tones |
122
- | **Position** | Top/left (primary) | Bottom/right |
123
- | **Space** | Surrounded by white space | Crowded |
124
-
125
- - Be aware of reading flow: in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation).
126
- - Create clear content groupings through proximity and separation.
127
-
128
- ### Manage Depth & Elevation
129
-
130
- - Build a consistent shadow scale (sm → md → lg → xl); shadows should be subtle
131
- - Use elevation to reinforce hierarchy, not as decoration
132
-
133
- ### Optical Adjustments
134
-
135
- - If an icon looks visually off-center despite being geometrically centered, nudge it. But only if you're confident it actually looks wrong. Don't adjust speculatively.
136
- - Text at `margin-left: 0` looks slightly indented because of letterform whitespace; a negative margin (`-0.05em`) optically aligns it. Geometrically centered glyphs often look off-center (play icons need to shift right, arrows shift toward their direction).
137
- - Touch targets must be 44×44px minimum even when the visual element is smaller. Expand the hit area with padding or a pseudo-element:
138
-
139
- ```css
140
- .icon-button { width: 24px; height: 24px; position: relative; }
141
- .icon-button::before {
142
- content: ''; position: absolute; inset: -10px;
143
- }
144
- ```
145
-
146
- **NEVER**:
147
- - Use arbitrary spacing values outside your scale
148
- - Make all spacing equal (variety creates hierarchy)
149
- - Wrap everything in cards (not everything needs a container)
150
- - Nest cards inside cards (use spacing and dividers for hierarchy within)
151
- - Use identical card grids everywhere (icon + heading + text, repeated)
152
- - Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work, but it should display actual data, not decorative numbers.
153
-
154
- ## Verify Layout Improvements
155
-
156
- - **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
157
- - **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
158
- - **Hierarchy**: Is the most important content obvious within 2 seconds?
159
- - **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
160
- - **Consistency**: Is the spacing system applied uniformly?
161
- - **Responsiveness**: Does the layout adapt gracefully across screen sizes?
162
-
163
- Answer each item above by citing the file, selector, or value that satisfies it; never a bare yes. Then re-run the pre-scan and fix until the count of unresolved items and unaccepted findings is zero.
164
-
165
- When the rhythm and hierarchy land, hand off to `/monodesign polish` for the final pass.
166
-
167
- ## Live-mode signature params
168
-
169
- Each variant MUST declare a `density` param. Drive all spacing tokens in the variant's scoped CSS through `calc(var(--p-density, 1) * <base>)`: paddings, gaps, column widths. Users slide from airy to packed and see layout re-breathe with no regeneration.
170
-
171
- ```json
172
- {"id":"density","kind":"range","min":0.6,"max":1.4,"step":0.05,"default":1,"label":"Density"}
173
- ```
174
-
175
- For variants whose topology genuinely changes (stacked vs. side-by-side, grid vs. bento), use a `steps` param whose scoped CSS branches via `:scope[data-p-structure="X"]`. One structure param + one density param is a powerful combo; resist adding a third.
176
-
177
- ```json
178
- {"id":"structure","kind":"steps","default":"grid","label":"Structure","options":[
179
- {"value":"stacked","label":"Stacked"},
180
- {"value":"grid","label":"Grid"},
181
- {"value":"bento","label":"Bento"}
182
- ]}
183
- ```
184
-
185
- See `reference/live.md` for the full params contract.