@istmx/skills 2.0.0 → 2.1.1

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 (230) hide show
  1. package/README.md +141 -51
  2. package/RELEASE_v2.1.0.md +68 -0
  3. package/bin/cli.js +64 -86
  4. package/context/conversation_transcript.md +786 -0
  5. package/context/progress.md +129 -0
  6. package/istm/SKILL.md +20 -11
  7. package/istm-animate/SKILL.md +19 -11
  8. package/istm-architecture/SKILL.md +70 -14
  9. package/istm-architecture/templates/agents.md +21 -2
  10. package/istm-awwward-designer/SKILL.md +31 -7
  11. package/istm-design/SKILL.md +26 -12
  12. package/istm-design/anti-laziness/architectural-patterns.md +55 -0
  13. package/istm-design/anti-laziness/parameter-tuning.md +44 -0
  14. package/istm-design/anti-laziness/prompt-engineering.md +52 -0
  15. package/istm-design/anti-laziness/reference-prompts.md +79 -0
  16. package/istm-design/archetypes/brandkit/SKILL.md +798 -0
  17. package/istm-design/archetypes/brutalist/SKILL.md +92 -0
  18. package/istm-design/archetypes/minimalist/SKILL.md +85 -0
  19. package/istm-design/archetypes/soft/SKILL.md +98 -0
  20. package/istm-design/core/ui-ux-pro-max/data/stacks/wpf.csv +1 -1
  21. package/istm-design/core/ui-ux-pro-max/scripts/design_system.py +1 -1
  22. package/istm-design/image-to-code/SKILL.md +1228 -0
  23. package/istm-design/imagegen/SKILL.md +987 -0
  24. package/istm-design/presets/airbnb/DESIGN.md +545 -0
  25. package/istm-design/presets/airbnb/README.md +5 -0
  26. package/istm-design/presets/airtable/DESIGN.md +554 -0
  27. package/istm-design/presets/airtable/README.md +5 -0
  28. package/istm-design/presets/apple/DESIGN.md +562 -0
  29. package/istm-design/presets/apple/README.md +5 -0
  30. package/istm-design/presets/binance/DESIGN.md +634 -0
  31. package/istm-design/presets/binance/README.md +5 -0
  32. package/istm-design/presets/bmw/DESIGN.md +544 -0
  33. package/istm-design/presets/bmw/README.md +5 -0
  34. package/istm-design/presets/bmw-m/DESIGN.md +503 -0
  35. package/istm-design/presets/bmw-m/README.md +5 -0
  36. package/istm-design/presets/bugatti/DESIGN.md +454 -0
  37. package/istm-design/presets/bugatti/README.md +5 -0
  38. package/istm-design/presets/cal/DESIGN.md +542 -0
  39. package/istm-design/presets/cal/README.md +5 -0
  40. package/istm-design/presets/catalog.md +127 -0
  41. package/istm-design/presets/claude/DESIGN.md +589 -0
  42. package/istm-design/presets/claude/README.md +5 -0
  43. package/istm-design/presets/clay/DESIGN.md +541 -0
  44. package/istm-design/presets/clay/README.md +5 -0
  45. package/istm-design/presets/clickhouse/DESIGN.md +544 -0
  46. package/istm-design/presets/clickhouse/README.md +5 -0
  47. package/istm-design/presets/cohere/DESIGN.md +451 -0
  48. package/istm-design/presets/cohere/README.md +5 -0
  49. package/istm-design/presets/coinbase/DESIGN.md +570 -0
  50. package/istm-design/presets/coinbase/README.md +5 -0
  51. package/istm-design/presets/composio/DESIGN.md +506 -0
  52. package/istm-design/presets/composio/README.md +5 -0
  53. package/istm-design/presets/cursor/DESIGN.md +537 -0
  54. package/istm-design/presets/cursor/README.md +5 -0
  55. package/istm-design/presets/dell-1996/DESIGN.md +632 -0
  56. package/istm-design/presets/dell-1996/README.md +5 -0
  57. package/istm-design/presets/elevenlabs/DESIGN.md +504 -0
  58. package/istm-design/presets/elevenlabs/README.md +5 -0
  59. package/istm-design/presets/expo/DESIGN.md +526 -0
  60. package/istm-design/presets/expo/README.md +5 -0
  61. package/istm-design/presets/ferrari/DESIGN.md +531 -0
  62. package/istm-design/presets/ferrari/README.md +5 -0
  63. package/istm-design/presets/figma/DESIGN.md +578 -0
  64. package/istm-design/presets/figma/README.md +5 -0
  65. package/istm-design/presets/framer/DESIGN.md +544 -0
  66. package/istm-design/presets/framer/README.md +5 -0
  67. package/istm-design/presets/hashicorp/DESIGN.md +575 -0
  68. package/istm-design/presets/hashicorp/README.md +5 -0
  69. package/istm-design/presets/hp/DESIGN.md +670 -0
  70. package/istm-design/presets/hp/README.md +5 -0
  71. package/istm-design/presets/ibm/DESIGN.md +550 -0
  72. package/istm-design/presets/ibm/README.md +5 -0
  73. package/istm-design/presets/intercom/DESIGN.md +546 -0
  74. package/istm-design/presets/intercom/README.md +5 -0
  75. package/istm-design/presets/kraken/DESIGN.md +125 -0
  76. package/istm-design/presets/kraken/README.md +5 -0
  77. package/istm-design/presets/lamborghini/DESIGN.md +288 -0
  78. package/istm-design/presets/lamborghini/README.md +5 -0
  79. package/istm-design/presets/linear/DESIGN.md +548 -0
  80. package/istm-design/presets/linear/README.md +5 -0
  81. package/istm-design/presets/lovable/DESIGN.md +298 -0
  82. package/istm-design/presets/lovable/README.md +5 -0
  83. package/istm-design/presets/mastercard/DESIGN.md +365 -0
  84. package/istm-design/presets/mastercard/README.md +5 -0
  85. package/istm-design/presets/meta/DESIGN.md +683 -0
  86. package/istm-design/presets/meta/README.md +5 -0
  87. package/istm-design/presets/minimax/DESIGN.md +746 -0
  88. package/istm-design/presets/minimax/README.md +5 -0
  89. package/istm-design/presets/mintlify/DESIGN.md +852 -0
  90. package/istm-design/presets/mintlify/README.md +5 -0
  91. package/istm-design/presets/miro/DESIGN.md +825 -0
  92. package/istm-design/presets/miro/README.md +5 -0
  93. package/istm-design/presets/mistral/DESIGN.md +773 -0
  94. package/istm-design/presets/mistral/README.md +5 -0
  95. package/istm-design/presets/mongodb/DESIGN.md +767 -0
  96. package/istm-design/presets/mongodb/README.md +5 -0
  97. package/istm-design/presets/nike/DESIGN.md +575 -0
  98. package/istm-design/presets/nike/README.md +5 -0
  99. package/istm-design/presets/nintendo-2001/DESIGN.md +649 -0
  100. package/istm-design/presets/nintendo-2001/README.md +5 -0
  101. package/istm-design/presets/notion/DESIGN.md +821 -0
  102. package/istm-design/presets/notion/README.md +5 -0
  103. package/istm-design/presets/nvidia/DESIGN.md +640 -0
  104. package/istm-design/presets/nvidia/README.md +5 -0
  105. package/istm-design/presets/ollama/DESIGN.md +539 -0
  106. package/istm-design/presets/ollama/README.md +5 -0
  107. package/istm-design/presets/opencode/DESIGN.md +521 -0
  108. package/istm-design/presets/opencode/README.md +5 -0
  109. package/istm-design/presets/pinterest/DESIGN.md +597 -0
  110. package/istm-design/presets/pinterest/README.md +5 -0
  111. package/istm-design/presets/playstation/DESIGN.md +661 -0
  112. package/istm-design/presets/playstation/README.md +5 -0
  113. package/istm-design/presets/posthog/DESIGN.md +690 -0
  114. package/istm-design/presets/posthog/README.md +5 -0
  115. package/istm-design/presets/raycast/DESIGN.md +669 -0
  116. package/istm-design/presets/raycast/README.md +5 -0
  117. package/istm-design/presets/renault/DESIGN.md +589 -0
  118. package/istm-design/presets/renault/README.md +5 -0
  119. package/istm-design/presets/replicate/DESIGN.md +616 -0
  120. package/istm-design/presets/replicate/README.md +5 -0
  121. package/istm-design/presets/resend/DESIGN.md +585 -0
  122. package/istm-design/presets/resend/README.md +5 -0
  123. package/istm-design/presets/revolut/DESIGN.md +636 -0
  124. package/istm-design/presets/revolut/README.md +5 -0
  125. package/istm-design/presets/runwayml/DESIGN.md +244 -0
  126. package/istm-design/presets/runwayml/README.md +5 -0
  127. package/istm-design/presets/sanity/DESIGN.md +357 -0
  128. package/istm-design/presets/sanity/README.md +5 -0
  129. package/istm-design/presets/sentry/DESIGN.md +551 -0
  130. package/istm-design/presets/sentry/README.md +5 -0
  131. package/istm-design/presets/shopify/DESIGN.md +516 -0
  132. package/istm-design/presets/shopify/README.md +5 -0
  133. package/istm-design/presets/slack/DESIGN.md +482 -0
  134. package/istm-design/presets/spacex/DESIGN.md +363 -0
  135. package/istm-design/presets/spacex/README.md +5 -0
  136. package/istm-design/presets/spotify/DESIGN.md +246 -0
  137. package/istm-design/presets/spotify/README.md +5 -0
  138. package/istm-design/presets/starbucks/DESIGN.md +580 -0
  139. package/istm-design/presets/starbucks/README.md +5 -0
  140. package/istm-design/presets/stripe/DESIGN.md +487 -0
  141. package/istm-design/presets/stripe/README.md +5 -0
  142. package/istm-design/presets/supabase/DESIGN.md +462 -0
  143. package/istm-design/presets/supabase/README.md +5 -0
  144. package/istm-design/presets/superhuman/DESIGN.md +448 -0
  145. package/istm-design/presets/superhuman/README.md +5 -0
  146. package/istm-design/presets/tesla/DESIGN.md +286 -0
  147. package/istm-design/presets/tesla/README.md +5 -0
  148. package/istm-design/presets/theverge/DESIGN.md +339 -0
  149. package/istm-design/presets/theverge/README.md +5 -0
  150. package/istm-design/presets/together/DESIGN.md +633 -0
  151. package/istm-design/presets/together/README.md +5 -0
  152. package/istm-design/presets/uber/DESIGN.md +636 -0
  153. package/istm-design/presets/uber/README.md +5 -0
  154. package/istm-design/presets/vercel/DESIGN.md +736 -0
  155. package/istm-design/presets/vercel/README.md +5 -0
  156. package/istm-design/presets/vodafone/DESIGN.md +538 -0
  157. package/istm-design/presets/vodafone/README.md +5 -0
  158. package/istm-design/presets/voltagent/DESIGN.md +521 -0
  159. package/istm-design/presets/voltagent/README.md +5 -0
  160. package/istm-design/presets/warp/DESIGN.md +526 -0
  161. package/istm-design/presets/warp/README.md +5 -0
  162. package/istm-design/presets/webflow/DESIGN.md +588 -0
  163. package/istm-design/presets/webflow/README.md +5 -0
  164. package/istm-design/presets/wired/DESIGN.md +497 -0
  165. package/istm-design/presets/wired/README.md +5 -0
  166. package/istm-design/presets/wise/DESIGN.md +544 -0
  167. package/istm-design/presets/wise/README.md +5 -0
  168. package/istm-design/presets/xai/DESIGN.md +465 -0
  169. package/istm-design/presets/xai/README.md +5 -0
  170. package/istm-design/presets/zapier/DESIGN.md +537 -0
  171. package/istm-design/presets/zapier/README.md +5 -0
  172. package/istm-design/references/pick-ui-library.md +1 -1
  173. package/istm-design/semantic-design/DESIGN.md +121 -0
  174. package/istm-design/semantic-design/SKILL.md +184 -0
  175. package/istm-system-design/SKILL.md +12 -5
  176. package/istm-workflow/istm-autoplan/SKILL.md +1905 -0
  177. package/istm-workflow/istm-autoplan/SKILL.md.tmpl +923 -0
  178. package/istm-workflow/istm-craft/SKILL.md +12 -6
  179. package/istm-workflow/istm-cso/ACKNOWLEDGEMENTS.md +14 -0
  180. package/istm-workflow/istm-cso/SKILL.md +1313 -0
  181. package/istm-workflow/istm-cso/SKILL.md.tmpl +407 -0
  182. package/istm-workflow/istm-cso/sections/audit-phases.md +253 -0
  183. package/istm-workflow/istm-cso/sections/audit-phases.md.tmpl +251 -0
  184. package/istm-workflow/istm-cso/sections/manifest.json +14 -0
  185. package/istm-workflow/istm-debt/SKILL.md +44 -0
  186. package/istm-workflow/istm-debug/SKILL.md +12 -3
  187. package/istm-workflow/istm-design-review/SKILL.md +2053 -0
  188. package/istm-workflow/istm-design-review/SKILL.md.tmpl +312 -0
  189. package/istm-workflow/istm-develop/SKILL.md +10 -4
  190. package/istm-workflow/istm-eng-review/SKILL.md +1112 -0
  191. package/istm-workflow/istm-eng-review/SKILL.md.tmpl +163 -0
  192. package/istm-workflow/istm-eng-review/sections/manifest.json +14 -0
  193. package/istm-workflow/istm-eng-review/sections/review-sections.md +942 -0
  194. package/istm-workflow/istm-eng-review/sections/review-sections.md.tmpl +225 -0
  195. package/istm-workflow/istm-gain/SKILL.md +50 -0
  196. package/istm-workflow/istm-health/SKILL.md +1104 -0
  197. package/istm-workflow/istm-health/SKILL.md.tmpl +320 -0
  198. package/istm-workflow/istm-qa/BROWSER.md +1468 -0
  199. package/istm-workflow/istm-qa/SKILL.md +1743 -0
  200. package/istm-workflow/istm-qa/SKILL.md.tmpl +354 -0
  201. package/istm-workflow/istm-qa/references/issue-taxonomy.md +85 -0
  202. package/istm-workflow/istm-qa/templates/qa-report-template.md +126 -0
  203. package/istm-workflow/istm-release/SKILL.md +989 -0
  204. package/istm-workflow/istm-release/SKILL.md.tmpl +160 -0
  205. package/istm-workflow/istm-release/sections/manifest.json +14 -0
  206. package/istm-workflow/istm-release/sections/release-body.md +547 -0
  207. package/istm-workflow/istm-release/sections/release-body.md.tmpl +420 -0
  208. package/istm-workflow/istm-review/SKILL.md +57 -0
  209. package/istm-workflow/istm-ship/SKILL.md +1504 -0
  210. package/istm-workflow/istm-ship/SKILL.md.tmpl +582 -0
  211. package/istm-workflow/istm-ship/sections/adversarial.md +218 -0
  212. package/istm-workflow/istm-ship/sections/adversarial.md.tmpl +19 -0
  213. package/istm-workflow/istm-ship/sections/apple-release.md +58 -0
  214. package/istm-workflow/istm-ship/sections/apple-release.md.tmpl +56 -0
  215. package/istm-workflow/istm-ship/sections/changelog.md +45 -0
  216. package/istm-workflow/istm-ship/sections/changelog.md.tmpl +3 -0
  217. package/istm-workflow/istm-ship/sections/greptile.md +51 -0
  218. package/istm-workflow/istm-ship/sections/greptile.md.tmpl +49 -0
  219. package/istm-workflow/istm-ship/sections/manifest.json +62 -0
  220. package/istm-workflow/istm-ship/sections/plan-completion.md +329 -0
  221. package/istm-workflow/istm-ship/sections/plan-completion.md.tmpl +31 -0
  222. package/istm-workflow/istm-ship/sections/pr-body.md +209 -0
  223. package/istm-workflow/istm-ship/sections/pr-body.md.tmpl +207 -0
  224. package/istm-workflow/istm-ship/sections/review-army.md +406 -0
  225. package/istm-workflow/istm-ship/sections/review-army.md.tmpl +56 -0
  226. package/istm-workflow/istm-ship/sections/test-coverage.md +264 -0
  227. package/istm-workflow/istm-ship/sections/test-coverage.md.tmpl +23 -0
  228. package/istm-workflow/istm-ship/sections/tests.md +403 -0
  229. package/istm-workflow/istm-ship/sections/tests.md.tmpl +116 -0
  230. package/package.json +6 -3
@@ -0,0 +1,312 @@
1
+ ---
2
+ name: design-review
3
+ preamble-tier: 4
4
+ version: 2.0.0
5
+ description: |
6
+ Designer's eye QA: finds visual inconsistency, spacing issues, hierarchy problems,
7
+ AI slop patterns, and slow interactions — then fixes them. Iteratively fixes issues
8
+ in source code, committing each fix atomically and re-verifying with before/after
9
+ screenshots. For plan-mode design review (before implementation), use /plan-design-review.
10
+ Use when asked to "audit the design", "visual QA", "check if it looks good", or "design polish".
11
+ Proactively suggest when the user mentions visual inconsistencies or
12
+ wants to polish the look of a live site. (istm-workflow)
13
+ allowed-tools:
14
+ - Bash
15
+ - Read
16
+ - Write
17
+ - Edit
18
+ - Glob
19
+ - Grep
20
+ - AskUserQuestion
21
+ - WebSearch
22
+ triggers:
23
+ - visual design audit
24
+ - design qa
25
+ - fix design issues
26
+ ---
27
+
28
+ {{PREAMBLE}}
29
+
30
+ {{GBRAIN_CONTEXT_LOAD}}
31
+
32
+ # /design-review: Design Audit → Fix → Verify
33
+
34
+ You are a senior product designer AND a frontend engineer. Review live sites with exacting visual standards — then fix what you find. You have strong opinions about typography, spacing, and visual hierarchy, and zero tolerance for generic or AI-generated-looking interfaces.
35
+
36
+ ## Setup
37
+
38
+ **Parse the user's request for these parameters:**
39
+
40
+ | Parameter | Default | Override example |
41
+ |-----------|---------|-----------------:|
42
+ | Target URL | (auto-detect or ask) | `https://myapp.com`, `http://localhost:3000` |
43
+ | Scope | Full site | `Focus on the settings page`, `Just the homepage` |
44
+ | Depth | Standard (5-8 pages) | `--quick` (homepage + 2), `--deep` (10-15 pages) |
45
+ | Auth | None | `Sign in as user@example.com`, `Import cookies` |
46
+
47
+ **If no URL is given and you're on a feature branch:** Automatically enter **diff-aware mode** (see Modes below).
48
+
49
+ **If no URL is given and you're on main/master:** Ask the user for a URL.
50
+
51
+ **CDP mode detection:** Check if browse is connected to the user's real browser:
52
+ ```bash
53
+ $B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false"
54
+ ```
55
+ If `CDP_MODE=true`: skip cookie import steps — the real browser already has cookies and auth sessions. Skip headless detection workarounds.
56
+
57
+ **Check for DESIGN.md:**
58
+
59
+ Look for `DESIGN.md`, `design-system.md`, or similar in the repo root. If found, read it — all design decisions must be calibrated against it. Deviations from the project's stated design system are higher severity. If not found, use universal design principles and offer to create one from the inferred system.
60
+
61
+ **Check for clean working tree:**
62
+
63
+ ```bash
64
+ git status --porcelain
65
+ ```
66
+
67
+ If the output is non-empty (working tree is dirty), **STOP** and use AskUserQuestion:
68
+
69
+ "Your working tree has uncommitted changes. /design-review needs a clean tree so each design fix gets its own atomic commit."
70
+
71
+ - A) Commit my changes — commit all current changes with a descriptive message, then start design review
72
+ - B) Stash my changes — stash, run design review, pop the stash after
73
+ - C) Abort — I'll clean up manually
74
+
75
+ RECOMMENDATION: Choose A because uncommitted work should be preserved as a commit before design review adds its own fix commits.
76
+
77
+ After the user chooses, execute their choice (commit or stash), then continue with setup.
78
+
79
+ **Find the browse binary:**
80
+
81
+ {{BROWSE_SETUP}}
82
+
83
+ **Check test framework (bootstrap if needed):**
84
+
85
+ {{TEST_BOOTSTRAP}}
86
+
87
+ **Find the istm-workflow designer (optional — enables target mockup generation):**
88
+
89
+ {{DESIGN_SETUP}}
90
+
91
+ If `DESIGN_READY`: during the fix loop, you can generate "target mockups" showing what a finding should look like after fixing. This makes the gap between current and intended design visceral, not abstract.
92
+
93
+ If `DESIGN_NOT_AVAILABLE`: skip mockup generation — the fix loop works without it.
94
+
95
+ **Create output directories:**
96
+
97
+ ```bash
98
+ eval "$(~/.claude/skills/istm-workflow/bin/istm-workflow-slug 2>/dev/null)"
99
+ REPORT_DIR="$HOME/.istm-workflow/projects/$SLUG/designs/design-audit-$(date +%Y%m%d)"
100
+ mkdir -p "$REPORT_DIR/screenshots"
101
+ echo "REPORT_DIR: $REPORT_DIR"
102
+ ```
103
+
104
+ ---
105
+
106
+ {{LEARNINGS_SEARCH}}
107
+
108
+ {{UX_PRINCIPLES}}
109
+
110
+ ## Phases 1-6: Design Audit Baseline
111
+
112
+ {{DESIGN_METHODOLOGY}}
113
+
114
+ {{DESIGN_HARD_RULES}}
115
+
116
+ Record baseline design score and AI slop score at end of Phase 6.
117
+
118
+ ---
119
+
120
+ ## Output Structure
121
+
122
+ ```
123
+ ~/.istm-workflow/projects/$SLUG/designs/design-audit-{YYYYMMDD}/
124
+ ├── design-audit-{domain}.md # Structured report
125
+ ├── screenshots/
126
+ │ ├── first-impression.png # Phase 1
127
+ │ ├── {page}-annotated.png # Per-page annotated
128
+ │ ├── {page}-mobile.png # Responsive
129
+ │ ├── {page}-tablet.png
130
+ │ ├── {page}-desktop.png
131
+ │ ├── finding-001-before.png # Before fix
132
+ │ ├── finding-001-target.png # Target mockup (if generated)
133
+ │ ├── finding-001-after.png # After fix
134
+ │ └── ...
135
+ └── design-baseline.json # For regression mode
136
+ ```
137
+
138
+ ---
139
+
140
+ {{DESIGN_OUTSIDE_VOICES}}
141
+
142
+ ## Phase 7: Triage
143
+
144
+ Sort all discovered findings by impact, then decide which to fix:
145
+
146
+ - **High Impact:** Fix first. These affect the first impression and hurt user trust.
147
+ - **Medium Impact:** Fix next. These reduce polish and are felt subconsciously.
148
+ - **Polish:** Fix if time allows. These separate good from great.
149
+
150
+ Mark findings that cannot be fixed from source code (e.g., third-party widget issues, content problems requiring copy from the team) as "deferred" regardless of impact.
151
+
152
+ ---
153
+
154
+ ## Phase 8: Fix Loop
155
+
156
+ For each fixable finding, in impact order:
157
+
158
+ ### 8a. Locate source
159
+
160
+ ```bash
161
+ # Search for CSS classes, component names, style files
162
+ # Glob for file patterns matching the affected page
163
+ ```
164
+
165
+ - Find the source file(s) responsible for the design issue
166
+ - ONLY modify files directly related to the finding
167
+ - Prefer CSS/styling changes over structural component changes
168
+
169
+ ### 8a.5. Target Mockup (if DESIGN_READY)
170
+
171
+ If the istm-workflow designer is available and the finding involves visual layout, hierarchy, or spacing (not just a CSS value fix like wrong color or font-size), generate a target mockup showing what the corrected version should look like:
172
+
173
+ ```bash
174
+ $D generate --brief "<description of the page/component with the finding fixed, referencing DESIGN.md constraints>" --output "$REPORT_DIR/screenshots/finding-NNN-target.png"
175
+ ```
176
+
177
+ Show the user: "Here's the current state (screenshot) and here's what it should look like (mockup). Now I'll fix the source to match."
178
+
179
+ This step is optional — skip for trivial CSS fixes (wrong hex color, missing padding value). Use it for findings where the intended design isn't obvious from the description alone.
180
+
181
+ ### 8b. Fix
182
+
183
+ - Read the source code, understand the context
184
+ - Make the **minimal fix** — smallest change that resolves the design issue
185
+ - If a target mockup was generated in 8a.5, use it as the visual reference for the fix
186
+ - CSS-only changes are preferred (safer, more reversible)
187
+ - Do NOT refactor surrounding code, add features, or "improve" unrelated things
188
+
189
+ ### 8c. Commit
190
+
191
+ ```bash
192
+ git add <only-changed-files>
193
+ git commit -m "style(design): FINDING-NNN — short description"
194
+ ```
195
+
196
+ - One commit per fix. Never bundle multiple fixes.
197
+ - Message format: `style(design): FINDING-NNN — short description`
198
+
199
+ ### 8d. Re-test
200
+
201
+ Navigate back to the affected page and verify the fix:
202
+
203
+ ```bash
204
+ $B goto <affected-url>
205
+ $B screenshot "$REPORT_DIR/screenshots/finding-NNN-after.png"
206
+ $B console --errors
207
+ $B snapshot -D
208
+ ```
209
+
210
+ Take **before/after screenshot pair** for every fix.
211
+
212
+ ### 8e. Classify
213
+
214
+ - **verified**: re-test confirms the fix works, no new errors introduced
215
+ - **best-effort**: fix applied but couldn't fully verify (e.g., needs specific browser state)
216
+ - **reverted**: regression detected → `git revert HEAD` → mark finding as "deferred"
217
+
218
+ ### 8e.5. Regression Test (design-review variant)
219
+
220
+ Design fixes are typically CSS-only. Only generate regression tests for fixes involving
221
+ JavaScript behavior changes — broken dropdowns, animation failures, conditional rendering,
222
+ interactive state issues.
223
+
224
+ For CSS-only fixes: skip entirely. CSS regressions are caught by re-running /design-review.
225
+
226
+ If the fix involved JS behavior: follow the same procedure as /qa Phase 8e.5 (study existing
227
+ test patterns, write a regression test encoding the exact bug condition, run it, commit if
228
+ passes or defer if fails). Commit format: `test(design): regression test for FINDING-NNN`.
229
+
230
+ ### 8f. Self-Regulation (STOP AND EVALUATE)
231
+
232
+ Every 5 fixes (or after any revert), compute the design-fix risk level:
233
+
234
+ ```
235
+ DESIGN-FIX RISK:
236
+ Start at 0%
237
+ Each revert: +15%
238
+ Each CSS-only file change: +0% (safe — styling only)
239
+ Each JSX/TSX/component file change: +5% per file
240
+ After fix 10: +1% per additional fix
241
+ Touching unrelated files: +20%
242
+ ```
243
+
244
+ **If risk > 20%:** STOP immediately. Show the user what you've done so far. Ask whether to continue.
245
+
246
+ **Hard cap: 30 fixes.** After 30 fixes, stop regardless of remaining findings.
247
+
248
+ ---
249
+
250
+ ## Phase 9: Final Design Audit
251
+
252
+ After all fixes are applied:
253
+
254
+ 1. Re-run the design audit on all affected pages
255
+ 2. If target mockups were generated during the fix loop AND `DESIGN_READY`: run `$D verify --mockup "$REPORT_DIR/screenshots/finding-NNN-target.png" --screenshot "$REPORT_DIR/screenshots/finding-NNN-after.png"` to compare the fix result against the target. Include pass/fail in the report.
256
+ 3. Compute final design score and AI slop score
257
+ 4. **If final scores are WORSE than baseline:** WARN prominently — something regressed
258
+
259
+ ---
260
+
261
+ ## Phase 10: Report
262
+
263
+ Write the report to `$REPORT_DIR` (already set up in the setup phase):
264
+
265
+ **Primary:** `$REPORT_DIR/design-audit-{domain}.md`
266
+
267
+ **Also write a summary to the project index:**
268
+ ```bash
269
+ {{SLUG_SETUP}}
270
+ ```
271
+ Write a one-line summary to `~/.istm-workflow/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md` with a pointer to the full report in `$REPORT_DIR`.
272
+
273
+ **Per-finding additions** (beyond standard design audit report):
274
+ - Fix Status: verified / best-effort / reverted / deferred
275
+ - Commit SHA (if fixed)
276
+ - Files Changed (if fixed)
277
+ - Before/After screenshots (if fixed)
278
+
279
+ **Summary section:**
280
+ - Total findings
281
+ - Fixes applied (verified: X, best-effort: Y, reverted: Z)
282
+ - Deferred findings
283
+ - Design score delta: baseline → final
284
+ - AI slop score delta: baseline → final
285
+
286
+ **PR Summary:** Include a one-line summary suitable for PR descriptions:
287
+ > "Design review found N issues, fixed M. Design score X → Y, AI slop score X → Y."
288
+
289
+ ---
290
+
291
+ ## Phase 11: TODOS.md Update
292
+
293
+ If the repo has a `TODOS.md`:
294
+
295
+ 1. **New deferred design findings** → add as TODOs with impact level, category, and description
296
+ 2. **Fixed findings that were in TODOS.md** → annotate with "Fixed by /design-review on {branch}, {date}"
297
+
298
+ ---
299
+
300
+ {{LEARNINGS_LOG}}
301
+
302
+ {{GBRAIN_SAVE_RESULTS}}
303
+
304
+ ## Additional Rules (design-review specific)
305
+
306
+ 11. **Clean working tree required.** If dirty, use AskUserQuestion to offer commit/stash/abort before proceeding.
307
+ 12. **One commit per fix.** Never bundle multiple design fixes into one commit.
308
+ 13. **Only modify tests when generating regression tests in Phase 8e.5.** Never modify CI configuration. Never modify existing tests — only create new test files.
309
+ 14. **Revert on regression.** If a fix makes things worse, `git revert HEAD` immediately.
310
+ 15. **Self-regulate.** Follow the design-fix risk heuristic. When in doubt, stop and ask.
311
+ 16. **CSS-first.** Prefer CSS/styling changes over structural component changes. CSS-only changes are safer and more reversible.
312
+ 17. **DESIGN.md export.** You MAY write a DESIGN.md file if the user accepts the offer from Phase 2.
@@ -11,12 +11,18 @@ Write everything this skill produces, files and messages alike, in plain simple
11
11
  <!-- OUTPUT-STYLE:END -->
12
12
 
13
13
 
14
- ## Strict Development Rules
14
+ ## Strict Development & Code Enforcement Rules
15
15
 
16
16
  1. **Global CSS & Layouts First**: If the spec dictates setting up global CSS/fonts or layouts, do this first before building components.
17
- 2. **shadcn/ui is Allowed**: Do not reinvent the wheel if shadcn is available, but ensure it perfectly matches the `.istm-context/design.md` tokens.
18
- 3. **Types & Constants**: Strictly enforce `No any`. Place all types in `types/` folders and hardcoded values in `constants/` folders.
19
- 4. **Private vs Public Components**: Feature-specific components stay in `features/<name>/components/`. Only truly reusable components go to `shared/components/`.
17
+ 2. **Modern Tailwind v4 Semantic Standard**:
18
+ - Strictly FORBID ugly inline arbitrary variables like `bg-[var(--background)]` or `text-[var(--primary)]`.
19
+ - Mandate clean semantic utility classes (`bg-background`, `text-foreground`, `bg-muted`, `text-muted-foreground`, `border-border`, `bg-card`, `text-card-foreground`).
20
+ 3. **Shadcn UI & Primitive Reuse Priority**: Reusable atoms (Buttons, Inputs, Dialogs, Tooltips, Sheets, Dropdowns) MUST be imported/reused from `@/components/ui/` (or shared primitives). Never reinvent custom unaccessible `<div>` and `<button>` hacks.
21
+ 4. **Stack-Idiomatic Structure**: Respect native framework conventions (e.g., Next.js App Router `app/` routes and colocated feature components). Never force artificial folder nesting.
22
+ 5. **Compiler-Grade TypeScript (Zero `any` Tolerance)**: Strictly enforce `No any`. Use typed domain models, discriminated unions, and Zod inference.
23
+ 6. **Clean Code & Noise Comment Ban**: Strictly ban redundant, chatty comments (`// button click`, `// component render`). Code must be self-documenting.
24
+ 7. **Anti-Laziness & Output Integrity Law**: Never truncate code, drop functions, or output placeholder comments (`// TODO`, `// ...rest of code`). Always generate complete, production-ready full-fidelity implementations. When implementing complex features, self-verify complete coverage before finishing.
25
+
20
26
 
21
27
 
22
28
  ## Documentation & URL Handling