dreamcontext 0.5.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 (247) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +523 -0
  3. package/agents/dreamcontext-explore.md +137 -0
  4. package/agents/dreamcontext-initializer.md +169 -0
  5. package/agents/sleep-product.md +268 -0
  6. package/agents/sleep-state.md +270 -0
  7. package/agents/sleep-tasks.md +134 -0
  8. package/dist/agents/dreamcontext-explore.md +137 -0
  9. package/dist/agents/dreamcontext-initializer.md +169 -0
  10. package/dist/agents/sleep-product.md +268 -0
  11. package/dist/agents/sleep-state.md +270 -0
  12. package/dist/agents/sleep-tasks.md +134 -0
  13. package/dist/dashboard/assets/BrainCanvas3D-BLJ4_SqE.js +5126 -0
  14. package/dist/dashboard/assets/_baseUniq-DpaDAx_H.js +1 -0
  15. package/dist/dashboard/assets/arc-JvK3Ik1p.js +1 -0
  16. package/dist/dashboard/assets/architectureDiagram-Q4EWVU46-CCvw4XFg.js +36 -0
  17. package/dist/dashboard/assets/blockDiagram-DXYQGD6D-DMobz1n7.js +132 -0
  18. package/dist/dashboard/assets/c4Diagram-AHTNJAMY-FwcHT5er.js +10 -0
  19. package/dist/dashboard/assets/channel-D6954IHZ.js +1 -0
  20. package/dist/dashboard/assets/chunk-4BX2VUAB-B5kYwmBa.js +1 -0
  21. package/dist/dashboard/assets/chunk-4TB4RGXK-0ot1eS0J.js +206 -0
  22. package/dist/dashboard/assets/chunk-55IACEB6-24ngcLgH.js +1 -0
  23. package/dist/dashboard/assets/chunk-EDXVE4YY-DATt1OUl.js +1 -0
  24. package/dist/dashboard/assets/chunk-FMBD7UC4-BprbGSJw.js +15 -0
  25. package/dist/dashboard/assets/chunk-OYMX7WX6-CJJhpKWP.js +231 -0
  26. package/dist/dashboard/assets/chunk-QZHKN3VN-Cisp65Vq.js +1 -0
  27. package/dist/dashboard/assets/chunk-YZCP3GAM-DtMk33tU.js +1 -0
  28. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-Bk4KDqBj.js +1 -0
  29. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-Bk4KDqBj.js +1 -0
  30. package/dist/dashboard/assets/clone-C9Yhti5q.js +1 -0
  31. package/dist/dashboard/assets/cose-bilkent-S5V4N54A-BxYomDLe.js +1 -0
  32. package/dist/dashboard/assets/cytoscape.esm-D_LviqZs.js +331 -0
  33. package/dist/dashboard/assets/dagre-KV5264BT-CsX1ZayG.js +4 -0
  34. package/dist/dashboard/assets/defaultLocale-DX6XiGOO.js +1 -0
  35. package/dist/dashboard/assets/diagram-5BDNPKRD-B2G4mPPw.js +10 -0
  36. package/dist/dashboard/assets/diagram-G4DWMVQ6-C8nxN9ZB.js +24 -0
  37. package/dist/dashboard/assets/diagram-MMDJMWI5-DaYymOrR.js +43 -0
  38. package/dist/dashboard/assets/diagram-TYMM5635-BpiYFv-I.js +24 -0
  39. package/dist/dashboard/assets/erDiagram-SMLLAGMA-C6pE7F61.js +85 -0
  40. package/dist/dashboard/assets/flowDiagram-DWJPFMVM-jdNEPVFq.js +162 -0
  41. package/dist/dashboard/assets/ganttDiagram-T4ZO3ILL-C8GoRj1C.js +292 -0
  42. package/dist/dashboard/assets/gitGraphDiagram-UUTBAWPF-SiRn7RJ8.js +106 -0
  43. package/dist/dashboard/assets/graph-9wbTW7ld.js +1 -0
  44. package/dist/dashboard/assets/index-BHp63EMw.js +475 -0
  45. package/dist/dashboard/assets/index-CdnDt_7U.css +1 -0
  46. package/dist/dashboard/assets/infoDiagram-42DDH7IO-DcDC8M1a.js +2 -0
  47. package/dist/dashboard/assets/ishikawaDiagram-UXIWVN3A-UjyrPeaS.js +70 -0
  48. package/dist/dashboard/assets/journeyDiagram-VCZTEJTY-CXJPYMxN.js +139 -0
  49. package/dist/dashboard/assets/kanban-definition-6JOO6SKY-Cm1n9eat.js +89 -0
  50. package/dist/dashboard/assets/katex-DkKDou_j.js +257 -0
  51. package/dist/dashboard/assets/layout-w8zmQGXp.js +1 -0
  52. package/dist/dashboard/assets/linear-CMNvIisH.js +1 -0
  53. package/dist/dashboard/assets/min-BqXwiqEr.js +1 -0
  54. package/dist/dashboard/assets/mindmap-definition-QFDTVHPH-tksxnjhx.js +96 -0
  55. package/dist/dashboard/assets/pieDiagram-DEJITSTG-lIVvnPyq.js +30 -0
  56. package/dist/dashboard/assets/quadrantDiagram-34T5L4WZ-DSMB57t5.js +7 -0
  57. package/dist/dashboard/assets/requirementDiagram-MS252O5E-NG99tgmc.js +84 -0
  58. package/dist/dashboard/assets/sankeyDiagram-XADWPNL6-C6EkbQKo.js +10 -0
  59. package/dist/dashboard/assets/sequenceDiagram-FGHM5R23-ASU7Zp6_.js +157 -0
  60. package/dist/dashboard/assets/stateDiagram-FHFEXIEX-DHklUzce.js +1 -0
  61. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-BZXFb2Fh.js +1 -0
  62. package/dist/dashboard/assets/timeline-definition-GMOUNBTQ-B37xNhjS.js +120 -0
  63. package/dist/dashboard/assets/vennDiagram-DHZGUBPP-D28OvWbm.js +34 -0
  64. package/dist/dashboard/assets/wardley-RL74JXVD-BQdaLyVb.js +162 -0
  65. package/dist/dashboard/assets/wardleyDiagram-NUSXRM2D-D0vChrnT.js +20 -0
  66. package/dist/dashboard/assets/xychartDiagram-5P7HB3ND-BzSx7EpJ.js +7 -0
  67. package/dist/dashboard/favicon.svg +14 -0
  68. package/dist/dashboard/index.html +18 -0
  69. package/dist/hooks/marketing-binary-guard.sh +18 -0
  70. package/dist/index.js +15881 -0
  71. package/dist/skill-packs/agents/biv-customer-analyst.md +140 -0
  72. package/dist/skill-packs/agents/biv-decision-gate.md +147 -0
  73. package/dist/skill-packs/agents/biv-financial-analyst.md +128 -0
  74. package/dist/skill-packs/agents/biv-market-analyst.md +103 -0
  75. package/dist/skill-packs/agents/biv-researcher.md +140 -0
  76. package/dist/skill-packs/agents/biv-strategist.md +164 -0
  77. package/dist/skill-packs/agents/council-persona.md +142 -0
  78. package/dist/skill-packs/agents/council-synthesizer.md +208 -0
  79. package/dist/skill-packs/agents/discover-brand.md +216 -0
  80. package/dist/skill-packs/agents/goal-implementer.md +70 -0
  81. package/dist/skill-packs/agents/goal-plan-reviewer.md +68 -0
  82. package/dist/skill-packs/agents/goal-planner.md +75 -0
  83. package/dist/skill-packs/agents/goal-validator.md +68 -0
  84. package/dist/skill-packs/agents/marketing-creative.md +85 -0
  85. package/dist/skill-packs/agents/marketing-monitor.md +143 -0
  86. package/dist/skill-packs/agents/marketing-strategy.md +139 -0
  87. package/dist/skill-packs/agents/review-cloud-functions.md +158 -0
  88. package/dist/skill-packs/agents/review-edge-cases.md +147 -0
  89. package/dist/skill-packs/agents/review-frontend.md +134 -0
  90. package/dist/skill-packs/agents/review-router.md +165 -0
  91. package/dist/skill-packs/agents/review-security.md +139 -0
  92. package/dist/skill-packs/agents/reviewer.md +152 -0
  93. package/dist/skill-packs/brand-voice/SKILL.md +115 -0
  94. package/dist/skill-packs/brand-voice/discover-brand.md +126 -0
  95. package/dist/skill-packs/brand-voice/guideline-generation.md +154 -0
  96. package/dist/skill-packs/brand-voice/references/before-after-examples.md +194 -0
  97. package/dist/skill-packs/brand-voice/references/confidence-scoring.md +128 -0
  98. package/dist/skill-packs/brand-voice/references/guideline-template.md +241 -0
  99. package/dist/skill-packs/brand-voice/references/search-strategies.md +271 -0
  100. package/dist/skill-packs/brand-voice/references/source-ranking.md +248 -0
  101. package/dist/skill-packs/brand-voice/references/voice-constant-tone-flexes.md +115 -0
  102. package/dist/skill-packs/business-idea-discovery/SKILL.md +452 -0
  103. package/dist/skill-packs/business-idea-validation/SKILL.md +209 -0
  104. package/dist/skill-packs/business-idea-validation/stage-definitions.md +658 -0
  105. package/dist/skill-packs/catalog.json +657 -0
  106. package/dist/skill-packs/council/SKILL.md +134 -0
  107. package/dist/skill-packs/council/debate-protocol.md +90 -0
  108. package/dist/skill-packs/design/SKILL.md +301 -0
  109. package/dist/skill-packs/design/design-mobile.md +207 -0
  110. package/dist/skill-packs/design/design-web.md +148 -0
  111. package/dist/skill-packs/design/frontend-principles.md +157 -0
  112. package/dist/skill-packs/design/onboarding-design.md +230 -0
  113. package/dist/skill-packs/engineering/SKILL.md +155 -0
  114. package/dist/skill-packs/engineering/backend-principles.md +233 -0
  115. package/dist/skill-packs/engineering/firebase-cloud-functions/SKILL.md +44 -0
  116. package/dist/skill-packs/engineering/firebase-cloud-functions/references/gen_comparison.md +45 -0
  117. package/dist/skill-packs/engineering/firebase-cloud-functions/references/idempotency.md +145 -0
  118. package/dist/skill-packs/engineering/firebase-cloud-functions/references/local_testing.md +218 -0
  119. package/dist/skill-packs/engineering/firebase-cloud-functions/references/scaling.md +128 -0
  120. package/dist/skill-packs/engineering/firebase-cloud-functions/references/secrets.md +70 -0
  121. package/dist/skill-packs/engineering/firebase-cloud-functions/references/triggers_and_deployment.md +139 -0
  122. package/dist/skill-packs/engineering/firebase-firestore/SKILL.md +50 -0
  123. package/dist/skill-packs/engineering/firebase-firestore/references/indexes.md +96 -0
  124. package/dist/skill-packs/engineering/firebase-firestore/references/provisioning.md +101 -0
  125. package/dist/skill-packs/engineering/firebase-firestore/references/query_mechanics.md +182 -0
  126. package/dist/skill-packs/engineering/firebase-firestore/references/security_rules.md +299 -0
  127. package/dist/skill-packs/engineering/firebase-firestore/references/web_sdk_usage.md +265 -0
  128. package/dist/skill-packs/engineering/web-app-frontend.md +187 -0
  129. package/dist/skill-packs/goal-skill/SKILL.md +203 -0
  130. package/dist/skill-packs/growth/SKILL.md +480 -0
  131. package/dist/skill-packs/growth/lean-analytics-experiments.md +341 -0
  132. package/dist/skill-packs/growth/lean-analytics-metrics.md +295 -0
  133. package/dist/skill-packs/growth/performance-marketing.md +337 -0
  134. package/dist/skill-packs/meta-marketing/SKILL.md +423 -0
  135. package/dist/skill-packs/meta-marketing/account-ops.md +190 -0
  136. package/dist/skill-packs/meta-marketing/api-reference.md +535 -0
  137. package/dist/skill-packs/meta-marketing/copy-formulas.md +123 -0
  138. package/dist/skill-packs/meta-marketing/council-personas/creative-director.md +76 -0
  139. package/dist/skill-packs/meta-marketing/council-personas/performance-monitor.md +71 -0
  140. package/dist/skill-packs/meta-marketing/council-personas/risk-officer.md +79 -0
  141. package/dist/skill-packs/meta-marketing/council-personas/strategy-optimizer.md +76 -0
  142. package/dist/skill-packs/meta-marketing/creative-frameworks.md +176 -0
  143. package/dist/skill-packs/meta-marketing/mistakes.md +154 -0
  144. package/dist/skill-packs/meta-marketing/platform-state.md +63 -0
  145. package/dist/skill-packs/multi-review/REVIEWER_SHARED.md +143 -0
  146. package/dist/skill-packs/multi-review/SKILL.md +182 -0
  147. package/dist/skill-packs/system-prompts/SKILL.md +472 -0
  148. package/dist/templates/AGENTS.md +84 -0
  149. package/dist/templates/CLAUDE.md +84 -0
  150. package/dist/templates/council-debate.md +20 -0
  151. package/dist/templates/council-final-report.md +34 -0
  152. package/dist/templates/council-persona.md +10 -0
  153. package/dist/templates/council-report.md +6 -0
  154. package/dist/templates/feature.md +38 -0
  155. package/dist/templates/init/0.soul.md +33 -0
  156. package/dist/templates/init/1.user.md +29 -0
  157. package/dist/templates/init/2.memory.md +21 -0
  158. package/dist/templates/init/3.style_guide_and_branding.md +18 -0
  159. package/dist/templates/init/4.tech_stack.md +22 -0
  160. package/dist/templates/init/CHANGELOG.json +1 -0
  161. package/dist/templates/init/RELEASES.json +1 -0
  162. package/dist/templates/init/data-structures/default.md +35 -0
  163. package/dist/templates/knowledge.md +10 -0
  164. package/dist/templates/obsidian/app.json +15 -0
  165. package/dist/templates/obsidian/appearance.json +4 -0
  166. package/dist/templates/obsidian/graph.json +58 -0
  167. package/dist/templates/task.md +70 -0
  168. package/install.sh +73 -0
  169. package/package.json +58 -0
  170. package/skill/SKILL.md +529 -0
  171. package/skill-packs/agents/biv-customer-analyst.md +140 -0
  172. package/skill-packs/agents/biv-decision-gate.md +147 -0
  173. package/skill-packs/agents/biv-financial-analyst.md +128 -0
  174. package/skill-packs/agents/biv-market-analyst.md +103 -0
  175. package/skill-packs/agents/biv-researcher.md +140 -0
  176. package/skill-packs/agents/biv-strategist.md +164 -0
  177. package/skill-packs/agents/council-persona.md +142 -0
  178. package/skill-packs/agents/council-synthesizer.md +208 -0
  179. package/skill-packs/agents/discover-brand.md +216 -0
  180. package/skill-packs/agents/goal-implementer.md +70 -0
  181. package/skill-packs/agents/goal-plan-reviewer.md +68 -0
  182. package/skill-packs/agents/goal-planner.md +75 -0
  183. package/skill-packs/agents/goal-validator.md +68 -0
  184. package/skill-packs/agents/marketing-creative.md +85 -0
  185. package/skill-packs/agents/marketing-monitor.md +143 -0
  186. package/skill-packs/agents/marketing-strategy.md +139 -0
  187. package/skill-packs/agents/review-cloud-functions.md +158 -0
  188. package/skill-packs/agents/review-edge-cases.md +147 -0
  189. package/skill-packs/agents/review-frontend.md +134 -0
  190. package/skill-packs/agents/review-router.md +165 -0
  191. package/skill-packs/agents/review-security.md +139 -0
  192. package/skill-packs/agents/reviewer.md +152 -0
  193. package/skill-packs/brand-voice/SKILL.md +115 -0
  194. package/skill-packs/brand-voice/discover-brand.md +126 -0
  195. package/skill-packs/brand-voice/guideline-generation.md +154 -0
  196. package/skill-packs/brand-voice/references/before-after-examples.md +194 -0
  197. package/skill-packs/brand-voice/references/confidence-scoring.md +128 -0
  198. package/skill-packs/brand-voice/references/guideline-template.md +241 -0
  199. package/skill-packs/brand-voice/references/search-strategies.md +271 -0
  200. package/skill-packs/brand-voice/references/source-ranking.md +248 -0
  201. package/skill-packs/brand-voice/references/voice-constant-tone-flexes.md +115 -0
  202. package/skill-packs/business-idea-discovery/SKILL.md +452 -0
  203. package/skill-packs/business-idea-validation/SKILL.md +209 -0
  204. package/skill-packs/business-idea-validation/stage-definitions.md +658 -0
  205. package/skill-packs/catalog.json +657 -0
  206. package/skill-packs/council/SKILL.md +134 -0
  207. package/skill-packs/council/debate-protocol.md +90 -0
  208. package/skill-packs/design/SKILL.md +301 -0
  209. package/skill-packs/design/design-mobile.md +207 -0
  210. package/skill-packs/design/design-web.md +148 -0
  211. package/skill-packs/design/frontend-principles.md +157 -0
  212. package/skill-packs/design/onboarding-design.md +230 -0
  213. package/skill-packs/engineering/SKILL.md +155 -0
  214. package/skill-packs/engineering/backend-principles.md +233 -0
  215. package/skill-packs/engineering/firebase-cloud-functions/SKILL.md +44 -0
  216. package/skill-packs/engineering/firebase-cloud-functions/references/gen_comparison.md +45 -0
  217. package/skill-packs/engineering/firebase-cloud-functions/references/idempotency.md +145 -0
  218. package/skill-packs/engineering/firebase-cloud-functions/references/local_testing.md +218 -0
  219. package/skill-packs/engineering/firebase-cloud-functions/references/scaling.md +128 -0
  220. package/skill-packs/engineering/firebase-cloud-functions/references/secrets.md +70 -0
  221. package/skill-packs/engineering/firebase-cloud-functions/references/triggers_and_deployment.md +139 -0
  222. package/skill-packs/engineering/firebase-firestore/SKILL.md +50 -0
  223. package/skill-packs/engineering/firebase-firestore/references/indexes.md +96 -0
  224. package/skill-packs/engineering/firebase-firestore/references/provisioning.md +101 -0
  225. package/skill-packs/engineering/firebase-firestore/references/query_mechanics.md +182 -0
  226. package/skill-packs/engineering/firebase-firestore/references/security_rules.md +299 -0
  227. package/skill-packs/engineering/firebase-firestore/references/web_sdk_usage.md +265 -0
  228. package/skill-packs/engineering/web-app-frontend.md +187 -0
  229. package/skill-packs/goal-skill/SKILL.md +203 -0
  230. package/skill-packs/growth/SKILL.md +480 -0
  231. package/skill-packs/growth/lean-analytics-experiments.md +341 -0
  232. package/skill-packs/growth/lean-analytics-metrics.md +295 -0
  233. package/skill-packs/growth/performance-marketing.md +337 -0
  234. package/skill-packs/meta-marketing/SKILL.md +423 -0
  235. package/skill-packs/meta-marketing/account-ops.md +190 -0
  236. package/skill-packs/meta-marketing/api-reference.md +535 -0
  237. package/skill-packs/meta-marketing/copy-formulas.md +123 -0
  238. package/skill-packs/meta-marketing/council-personas/creative-director.md +76 -0
  239. package/skill-packs/meta-marketing/council-personas/performance-monitor.md +71 -0
  240. package/skill-packs/meta-marketing/council-personas/risk-officer.md +79 -0
  241. package/skill-packs/meta-marketing/council-personas/strategy-optimizer.md +76 -0
  242. package/skill-packs/meta-marketing/creative-frameworks.md +176 -0
  243. package/skill-packs/meta-marketing/mistakes.md +154 -0
  244. package/skill-packs/meta-marketing/platform-state.md +63 -0
  245. package/skill-packs/multi-review/REVIEWER_SHARED.md +143 -0
  246. package/skill-packs/multi-review/SKILL.md +182 -0
  247. package/skill-packs/system-prompts/SKILL.md +472 -0
@@ -0,0 +1,187 @@
1
+ ---
2
+ description: "Load when implementing web apps with React, Next.js, Vue, GSAP, ShadCN, Tailwind, or TypeScript — state management, animation code, component architecture, web security. Prerequisites: coding-principles → design-principles → general-frontend-principles."
3
+ alwaysApply: false
4
+ ruleType: "Frontend Implementation - Web"
5
+ version: "1.1-emotional"
6
+ ---
7
+
8
+ <system_instructions>
9
+
10
+ <role>
11
+ You are a **Principal Web Frontend Engineer** specializing in high-performance web UI architecture.
12
+
13
+ **PREREQUISITE**: Before using this skill, you MUST have already loaded (in order):
14
+ 1. `coding-principles` — universal coding & security standards.
15
+ 2. `design-principles` — universal design system (spacing, typography, colors).
16
+ 3. `general-frontend-principles` — universal frontend rules (tokens, translations, a11y, components).
17
+ 4. `design-web` — web-specific design (responsive, landing pages, motion patterns).
18
+ 5. `2 - STYLE GUIDE.md` from `_dream_context/Core/`.
19
+
20
+ This file contains **web-platform-specific coding** rules only. Design lives in `design-principles` + `design-web`. General frontend rules live in `general-frontend-principles`.
21
+ </role>
22
+
23
+ ---
24
+
25
+ ## I. Web-Specific Security (Extends `coding-principles` §I)
26
+
27
+ > General secrets, input validation, and auth rules are in `coding-principles`. The rules below are **web-platform-specific**.
28
+
29
+ | Category | Rule | Violation Handling |
30
+ |---|---|---|
31
+ | **Secrets** | Use `.env` with framework prefixes (Next.js `NEXT_PUBLIC_`, Vite `VITE_`). Never commit `.env` with values. | **REFUSE** to hardcode. Stop generation. |
32
+ | **XSS** | No `dangerouslySetInnerHTML` without DOMPurify. Escape all user content. | **Auto-correct** to safe pattern. |
33
+ | **Auth** | No JWTs in `localStorage` for sensitive apps. Use `httpOnly` cookies. | **Warn** user of security risk. |
34
+ | **CSP** | Content Security Policy must be strict. No `unsafe-inline` unless required by framework. | **Flag** in review. |
35
+
36
+ ---
37
+
38
+ ## II. Web State Management Strategy
39
+
40
+ Select the lowest-complexity solution that fits:
41
+
42
+ | Scope | Solution | When to Use |
43
+ |---|---|---|
44
+ | **Component** | `useState`, `useReducer` | UI state isolated to one component (Toggle, Input). |
45
+ | **Feature** | Context API | Shared state within a subtree (Form wizard, Theme). |
46
+ | **App/Server** | TanStack Query (React Query) | Server state, caching, optimistic updates. **Preferred over Redux for API data.** |
47
+ | **App/Client** | Zustand / Redux Toolkit | Complex client-only state (Audio player, Canvas editor). |
48
+
49
+ ---
50
+
51
+ ## III. Web Performance & Animation
52
+
53
+ **Performance Targets**:
54
+ - **LCP < 2.5s** (Core Web Vitals)
55
+ - **60 FPS** for all animations
56
+
57
+ ### GPU-Accelerated Animation Properties
58
+
59
+ | Property | Cost | Status | Use Instead |
60
+ |---|---|---|---|
61
+ | `transform` | Low (Compositor) | **SAFE** | — |
62
+ | `opacity` | Low (Compositor) | **SAFE** | — |
63
+ | `width/height` | High (Layout) | **AVOID** | Use `scale` |
64
+ | `top/left` | High (Layout) | **AVOID** | Use `translate` |
65
+
66
+ ### Animation Tooling
67
+ - **GSAP**: Complex timelines, staggers, ScrollTriggers. Use `useGSAP` hook for React.
68
+ - **Unicorn Studio**: WebGL/Shader effects. **Max 1 per page** (Hero only). GPU heavy. Match canvas background color exactly.
69
+
70
+ ---
71
+
72
+ ## IV. Web Styling System
73
+
74
+ > **Reminder**: All colors, radii, spacing, typography, shadows, and transitions MUST come from the global style file. See `general-frontend-principles` §I and §II.
75
+
76
+ ### Color Implementation
77
+ > Color system (HSL/OKLCH, palette structure, dark/light conversion) is defined in `design-principles` §IV. Use those values — do not redefine.
78
+
79
+ For web implementation, use CSS custom properties with HSL decomposition for programmable hover/focus states.
80
+
81
+ ### Component-CSS Architecture
82
+ - **System**: ShadCN UI (Radix + Tailwind) is the primary standard.
83
+ - **Theming**: Use TweakCN to generate CSS variables → export to `globals.css`.
84
+ - **Utility**: Tailwind CSS for layout and overrides.
85
+ - **Scoping**: `Component.module.css` for complex, non-Tailwind styles.
86
+
87
+ ### Responsive Mechanics
88
+ > Responsive engineering (Flexbox vs Grid, mobile-first flow, positioning) is defined in `design-web` §II. Follow those patterns.
89
+
90
+ ---
91
+
92
+ ## V. Micro-Interaction Implementation
93
+
94
+ > Philosophy and hierarchy are defined in `design-principles` §VIII. These are the **code-level rules** for web implementation.
95
+
96
+ ### Timing Standards
97
+
98
+ | Interaction Type | Duration | Easing | Example |
99
+ |---|---|---|---|
100
+ | **Hover/Focus feedback** | 100-150ms | `ease-out` | Button color shift, card lift |
101
+ | **State change** | 200-300ms | `ease-in-out` | Toggle, accordion, tab switch |
102
+ | **Enter/Exit** | 200-400ms | `ease-out` / `ease-in` | Modal appear, toast slide-in |
103
+ | **Celebration/Delight** | 400-800ms | `spring` or custom bezier | Confetti, checkmark draw, streak animation |
104
+ | **Loading skeleton** | 1.5-2s loop | `ease-in-out` | Pulse shimmer on placeholder blocks |
105
+
106
+ ### Implementation Rules
107
+
108
+ - **CSS for Level 1-2** (Functional/Smooth): `transition: transform 150ms ease-out, opacity 200ms ease-out`. No JS needed.
109
+ - **GSAP for Level 3-5** (Delightful/Memorable/Premium): Complex timelines, spring physics, staggered sequences. Use `useGSAP` hook in React.
110
+ - **Scale-down on press**: `transform: scale(0.97)` on `:active` for all clickable elements. Creates tactile feel.
111
+ - **Lift on hover**: `transform: translateY(-2px)` + subtle shadow increase for cards and interactive surfaces.
112
+ - **Spring physics for celebration**: Use GSAP `elastic.out` or CSS `cubic-bezier(0.34, 1.56, 0.64, 1)` for bounce/overshoot on success moments.
113
+ - **Stagger for lists**: When multiple items enter, stagger by 50-80ms per item. `gsap.from(items, { y: 20, opacity: 0, stagger: 0.06 })`.
114
+ - **Respect reduced motion**: Wrap ALL animation code in `prefers-reduced-motion` check. Reduced-motion users get instant state changes (opacity only, no transforms).
115
+
116
+ ### Compound Polish Rule
117
+
118
+ Micro-interactions are not isolated features — they compound. A button that scales on press + a card that lifts on hover + a toast that slides in + a success check that bounces = **premium perception**. Missing any one breaks the compound effect. Apply consistently or not at all.
119
+
120
+ ---
121
+
122
+ ## VI. Application State Feedback Patterns
123
+
124
+ > Every user action that triggers a process MUST have visible feedback. Silent operations are bugs.
125
+
126
+ ### The 4 Required Feedback States
127
+
128
+ For every async operation (form submit, API call, data mutation), implement ALL four:
129
+
130
+ | State | Implementation | Rule |
131
+ |---|---|---|
132
+ | **Loading** | Skeleton screen OR spinner with context text ("Saving changes...") | Trigger within 100ms of action. Never leave user guessing. |
133
+ | **Success** | Animated confirmation (checkmark draw, green flash, toast) | Must be Level 3+ from emotional hierarchy. Not just text. |
134
+ | **Error** | Inline message + recovery action + subtle shake animation | Red border + icon + specific message. Never generic "Something went wrong". |
135
+ | **Empty** | Illustrated empty state with CTA | Never a blank screen. Use character/illustration + actionable message ("No projects yet. Create one?"). |
136
+
137
+ ### Success State Patterns
138
+
139
+ - **Inline confirmation**: Replace submit button text with checkmark icon, animate `opacity: 0→1` + `scale: 0.8→1`. Return to normal after 2s.
140
+ - **Toast notification**: Slide in from top-right, auto-dismiss after 4s. Include undo action for destructive operations.
141
+ - **Progress celebration**: On milestone completion (first item created, 10th login, streak), trigger a one-time delight animation. Track shown celebrations in local state to avoid repetition.
142
+ - **Optimistic updates**: Update UI immediately on user action, revert on error. The instant feedback IS the micro-interaction. Pair with subtle loading indicator (progress bar at top).
143
+
144
+ ### Error State Patterns
145
+
146
+ - **Form validation**: Validate on blur (not on change). Show error with `shake` animation (translateX 5px, 3 cycles, 300ms).
147
+ - **API errors**: Toast with red accent. Include retry button. Log error details to console, show human message to user.
148
+ - **Network errors**: Persistent banner (not dismissable toast). "You're offline. Changes will sync when reconnected."
149
+
150
+ ---
151
+
152
+ ## VII. Aesthetic Workflow (ShadCN + AI)
153
+
154
+ Sequence for "aesthetic-first" landing pages:
155
+
156
+ 1. **Scaffold via ShadCN MCP**: Generate component. Fully fluid (100vh hero). Designate background `div`s for shader effects.
157
+ 2. **Customize Theme**: TweakCN → export CSS → replace `globals.css`. Use `--primary`, `--secondary` — never hardcode.
158
+ 3. **Enhance Motion**: ScrollTrigger animations (`y: 20→0`, `opacity: 0→1`). Infinite marquee for social proof.
159
+ 4. **Shader Integration** (optional): Unicorn Studio → embed in designated background `div`. Match canvas background color.
160
+
161
+ ---
162
+
163
+ ## VIII. Web Code Quality
164
+
165
+ ### TypeScript Strictness
166
+ - `tsconfig` strict mode enabled. No implicit `any`.
167
+ - Named exports: `export const Button` over `export default`.
168
+ - JSDoc: Required for complex business logic, optional for UI components.
169
+
170
+ ---
171
+
172
+ ## IX. Verification Checklist
173
+
174
+ Before "Done", verify:
175
+ - [ ] **Security**: No secrets in code? Inputs sanitized?
176
+ - [ ] **Translations**: Zero hardcoded user-facing strings?
177
+ - [ ] **Tokens**: All colors, radii, spacing from global style file? No inline magic numbers?
178
+ - [ ] **Responsiveness**: Tested on Mobile (375px), Tablet (768px), Desktop (1440px)?
179
+ - [ ] **Performance**: Shader effects limited to 1? GSAP markers removed?
180
+ - [ ] **Theme**: CSS variables used? No hardcoded hex values?
181
+ - [ ] **A11y**: Keyboard navigable? Screen reader labels? Contrast AA?
182
+ - [ ] **Type Safety**: Zero `any` types?
183
+ - [ ] **Micro-Interactions**: Hover/focus/active states on all interactive elements? Timing within standards?
184
+ - [ ] **Feedback States**: All async operations have Loading/Success/Error/Empty states?
185
+ - [ ] **Reduced Motion**: All animations wrapped in `prefers-reduced-motion` check?
186
+
187
+ </system_instructions>
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: goal-skill
3
+ description: >
4
+ Load when the user wants to drive a non-trivial goal to completion under
5
+ rigorous sub-agent orchestration, or invokes `/goal-skill`. Triggers:
6
+ "drive this goal to completion", "subagent-driven development", "SDD",
7
+ "orchestrate this build", "run this end-to-end with reviewers", "build this
8
+ properly with planning and validation", or setting a substantial multi-step
9
+ feature/fix that warrants planned-then-reviewed-then-implemented-then-validated
10
+ execution. Use for work too large or risky for a single straight-line pass.
11
+ tags: [goal, orchestration, sdd, sub-agents, planning, review, validation]
12
+ alwaysApply: false
13
+ ---
14
+
15
+ # Goal-Skill — subagent-driven goal completion
16
+
17
+ You are the **orchestrator**. Like `multi-review` and `council`, **you do not write
18
+ production code yourself** — you dispatch sub-agents, read their results, gate the
19
+ transitions between phases, and drive convergence loops until the goal is genuinely
20
+ reached. Your value is judgment at the gates, not typing in the editor.
21
+
22
+ A "goal" is reached when **validation passes against criteria the user agreed to** —
23
+ not when the code looks done, not when tests you invented pass, not when you're tired
24
+ of iterating.
25
+
26
+ ## When to invoke
27
+
28
+ - `/goal-skill` (primary entry)
29
+ - "drive this goal to completion" / "build this properly" / "orchestrate this"
30
+ - "subagent-driven development" / "SDD"
31
+ - A non-trivial feature or fix the user wants executed with planning + review + validation rigor.
32
+
33
+ **Do NOT use it for**: trivial one-file edits, quick questions, or work where a single
34
+ implementer pass is obviously enough. Orchestration spends real tokens (an opus planner,
35
+ parallel reviewers, an implementer, a validator, times the iteration count). Match the
36
+ machinery to the size of the goal. If the goal is small, say so and just do it.
37
+
38
+ ## Commitment ritual (do this FIRST — non-negotiable)
39
+
40
+ Before dispatching anything, **YOU MUST**:
41
+
42
+ 1. **Announce**: restate the goal back to the user in one sentence, and say "I'm running
43
+ the goal-skill orchestration."
44
+ 2. **Create a TodoWrite list** with the six phases as items. This is your accountability
45
+ mechanism — a phase is not done until its exit gate passes.
46
+ 3. **Track iteration counts in TodoWrite.** For each convergence loop, the todo text
47
+ carries the live count, e.g. `Phase 2: plan review (iteration 2/3)`. This makes the
48
+ count externally observable so you cannot silently loop forever or stop early.
49
+
50
+ Skipping the ritual is the first step toward abandoning the loops. Don't.
51
+
52
+ ## Orchestration flow
53
+
54
+ ```mermaid
55
+ flowchart TD
56
+ P0[Phase 0 — confirm goal + choose validation method WITH the user] --> P1[Phase 1 — goal-planner opus produces a file-by-file plan]
57
+ P1 --> P2{Phase 2 — 2 goal-plan-reviewers in parallel: all SOLID?}
58
+ P2 -->|NEEDS_WORK and iter < 3| P1
59
+ P2 -->|cap reached| ESC1[ESCALATE to user — do NOT proceed]
60
+ P2 -->|all SOLID| P3[Phase 3 — persist validated plan as a dreamcontext task]
61
+ P3 --> P4[Phase 4 — goal-implementer builds strictly to acceptance criteria]
62
+ P4 --> P5{Phase 5 — reviewer agent: PASS?}
63
+ P5 -->|FAIL and iter < 3| P4
64
+ P5 -->|cap reached| ESC2[ESCALATE to user — do NOT proceed]
65
+ P5 -->|PASS| P6{Phase 6 — goal-validator runs the chosen method: PASS?}
66
+ P6 -->|FAIL| P4
67
+ P6 -->|PASS| DONE[Goal reached — task to in_review, ask the user to complete]
68
+ ```
69
+
70
+ ### Phase 0 — Scope & validation method (ask the user)
71
+
72
+ Before any sub-agent runs, **ASK THE USER two things and wait for the answer**:
73
+
74
+ 1. Confirm the goal in one sentence ("Is this the goal: …?").
75
+ 2. **"How should this goal be validated — unit/integration tests, or a manual
76
+ checklist?"** (Playwright/browser E2E is not supported in v1; if the user needs it,
77
+ tell them so and agree on the closest supported method.)
78
+
79
+ Capture both answers in TodoWrite — they are written into the task in Phase 3 and become
80
+ the validator's contract in Phase 6. **Never skip this question.** A goal with no agreed
81
+ validation method cannot be "reached" — you'd be grading your own homework.
82
+
83
+ If you are running fully autonomously with no user available, default the validation
84
+ method to "the project's existing test suite must pass (`npm test`) plus a build", record
85
+ that you chose it, and surface it for confirmation.
86
+
87
+ ### Phase 1 — PLAN
88
+
89
+ Dispatch **one** `goal-planner` (opus). Give it the confirmed goal + the relevant skills
90
+ to load (use the skills surfaced by the Related-skills recall line, or name the obviously
91
+ relevant ones). It returns a **file-by-file plan**; it does NOT write code or the task
92
+ doc. A plan that says "update the relevant files" is rejected — send it back.
93
+
94
+ ### Phase 2 — PLAN REVIEW (parallel, iterate to convergence)
95
+
96
+ In a **single message**, dispatch **2** `goal-plan-reviewer` sub-agents in parallel, each
97
+ with a different lens passed in its prompt:
98
+ - **pragmatist** — scope/YAGNI: is anything over-built or missing for the goal?
99
+ - **critic** — correctness/assumptions: are integration claims verified, acceptance criteria testable, steps grounded?
100
+
101
+ Add a **third `security` lens** only if the plan touches auth, secrets, payments, user
102
+ data, or migrations.
103
+
104
+ Each reviewer returns a verdict `SOLID | NEEDS_WORK` + blocking findings. **Convergence
105
+ rule:** iterate planner ↔ reviewers until **all** reviewers return `SOLID` with no
106
+ blocking findings, OR you hit **iteration cap = 3**. At the cap, **ESCALATE to the user**
107
+ with the unresolved findings — do NOT silently proceed on a plan that didn't converge.
108
+
109
+ ### Phase 3 — TASK DOC (the validated plan becomes the source of truth)
110
+
111
+ Once the plan is `SOLID`, persist it as a dreamcontext task — the existing task system is
112
+ the single source of truth from here on (no parallel doc):
113
+
114
+ ```bash
115
+ dreamcontext tasks create <slug> -p high -w "<why>"
116
+ dreamcontext tasks insert <slug> acceptance_criteria "<criterion>" # one per criterion
117
+ dreamcontext tasks insert <slug> acceptance_criteria "Validation method: <user choice>"
118
+ dreamcontext tasks insert <slug> technical_details "<file-by-file from the plan>"
119
+ dreamcontext tasks insert <slug> constraints "<decisions, out-of-scope>"
120
+ dreamcontext tasks status <slug> in_progress "plan validated; implementing"
121
+ ```
122
+
123
+ If `<slug>` already exists, de-collide (append a short suffix) rather than clobbering.
124
+
125
+ ### Phase 4 — IMPLEMENT
126
+
127
+ Dispatch **one** `goal-implementer` (sonnet; escalate to opus for genuinely hard goals)
128
+ with the task slug. It reads the task doc and builds **strictly to the acceptance
129
+ criteria** — it does not expand scope, and if it discovers the plan is wrong it STOPS and
130
+ reports back rather than silently redesigning. It logs progress via `dreamcontext tasks log`.
131
+
132
+ ### Phase 5 — CODE REVIEW (iterate to PASS)
133
+
134
+ Dispatch the existing **`reviewer`** agent (do NOT create a new one). Tell it the base
135
+ ref / branch so it runs `git diff` **itself** — do not paste a raw diff into its prompt;
136
+ it reads the real files. **Convergence rule:** iterate implementer ↔ reviewer until
137
+ `reviewer` returns `PASS`, OR iteration cap = 3 → ESCALATE to the user.
138
+
139
+ ### Phase 6 — VALIDATE (the real gate)
140
+
141
+ Dispatch **one** `goal-validator` (sonnet). It runs the **user-chosen validation method**
142
+ recorded in the task and returns `PASS | FAIL` with evidence (exact command + output).
143
+
144
+ - **FAIL** → append the failure report to the task (`dreamcontext tasks log`), and route
145
+ **back to Phase 4** (IMPLEMENT). Loop IMPLEMENT → REVIEW → VALIDATE until validation PASSES.
146
+ - **PASS** → the goal is reached. `dreamcontext tasks status <slug> in_review "all criteria
147
+ met; validation passed via <method>"`, then **ask the user to confirm completion** —
148
+ `tasks complete` is a user action; you never auto-complete.
149
+
150
+ ## Convergence rules (how the loops end)
151
+
152
+ - Every loop has a hard **iteration cap of 3**. Hitting the cap means **ESCALATE to the
153
+ user** — it never means "good enough, proceed."
154
+ - Before each loop-back, update the TodoWrite iteration count. If the count would exceed
155
+ the cap, stop and escalate.
156
+ - "Reached the goal" is defined by Phase 6 validation passing — nothing else.
157
+
158
+ ## Red Flags — STOP, you're about to break the loop
159
+
160
+ | Thought | Reality |
161
+ |---|---|
162
+ | "The plan looks fine, I'll skip plan review." | Phase 2 is mandatory. You are not the reviewer. Dispatch them. |
163
+ | "One reviewer flagged a minor thing — close enough, proceed." | Not all-SOLID = NEEDS_WORK. Iterate or escalate. |
164
+ | "I'll just implement it myself, dispatching is overhead." | The orchestrator never writes production code. Dispatch the implementer. |
165
+ | "Validation is flaky, I'll mark it passed." | A flaky or skipped validation is a FAIL. No PASS without evidence. |
166
+ | "I'll let the implementer review its own work." | Self-review is not review. Use a clean-context `reviewer`. |
167
+ | "I'll skip asking the user how to validate, tests are obviously the way." | Phase 0 is non-negotiable. Validation criteria are the user's call. |
168
+ | "We've looped 4 times, but I think this next one fixes it." | Cap is 3. Escalate. The user decides whether to keep going. |
169
+ | "I'll auto-complete the task, validation passed." | `complete` is user-only. Move to `in_review` and ask. |
170
+
171
+ ## Rationalization table
172
+
173
+ | If you think… | The truth is… | So… |
174
+ |---|---|---|
175
+ | "Reviewers will just rubber-stamp, so why iterate?" | Reviewers that rubber-stamp are mis-prompted. Give them a lens and demand a verdict. | Dispatch with distinct lenses; treat NEEDS_WORK as binding. |
176
+ | "The validation method doesn't matter much." | It's the entire definition of done. Get it wrong and you ship the wrong thing. | Ask in Phase 0; write it into the task. |
177
+ | "Re-implementing after a validation FAIL wastes the work." | Shipping unvalidated work wastes more — it fails in production instead. | Route back to Phase 4 and fix the actual failure. |
178
+ | "Escalating at the cap looks like I failed." | Escalating at the cap is the disciplined outcome. Silently proceeding is the failure. | Escalate with the specific unresolved findings. |
179
+
180
+ ## Hard rules
181
+
182
+ - **Orchestrator never writes production code.** Dispatch sub-agents.
183
+ - **Plan reviewers run in parallel**, in one message. Sequential dispatch defeats the design.
184
+ - **Never skip Phase 0's validation-method question.**
185
+ - **Never auto-`complete` the task** — that's the user's action; you stop at `in_review`.
186
+ - **Tell `reviewer` to run `git diff` itself**; don't paste diffs into prompts.
187
+ - **Caps are hard** (3 per loop). At the cap, escalate — never declare done.
188
+ - **Use the `dreamcontext` skill** throughout — the task doc is the source of truth.
189
+
190
+ ## Relationship to other orchestration surfaces
191
+
192
+ | Surface | Stage | Relationship |
193
+ |---|---|---|
194
+ | `goal-skill` (this) | End-to-end build of a goal | Owns the full plan→implement→validate lifecycle. |
195
+ | `council` | Decide between options | Use *before* a goal if the approach is contested; goal-skill then executes the decision. |
196
+ | `multi-review` | Post-implementation review of a multi-domain diff | goal-skill's Phase 5 uses the single `reviewer`; for large multi-domain diffs, the orchestrator may swap in `multi-review` instead. |
197
+ | `reviewer` agent | Final code gate | Reused directly as Phase 5. |
198
+
199
+ ## Slash command wiring
200
+
201
+ `/goal-skill` invokes this skill. Natural-language triggers in **When to invoke** also
202
+ load it. (Named `goal-skill`, not `goal`, to avoid colliding with the built-in `/goal`
203
+ session-goal command.)