opencastle 0.31.6 → 0.32.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 (210) hide show
  1. package/LICENSE +93 -21
  2. package/README.md +9 -3
  3. package/bin/cli.mjs +15 -0
  4. package/dist/cli/agents.d.ts.map +1 -1
  5. package/dist/cli/agents.js +19 -5
  6. package/dist/cli/agents.js.map +1 -1
  7. package/dist/cli/artifacts-cli.d.ts +3 -0
  8. package/dist/cli/artifacts-cli.d.ts.map +1 -0
  9. package/dist/cli/artifacts-cli.js +36 -0
  10. package/dist/cli/artifacts-cli.js.map +1 -0
  11. package/dist/cli/baselines.d.ts.map +1 -1
  12. package/dist/cli/baselines.js +11 -0
  13. package/dist/cli/baselines.js.map +1 -1
  14. package/dist/cli/convoy/artifacts.d.ts +25 -0
  15. package/dist/cli/convoy/artifacts.d.ts.map +1 -0
  16. package/dist/cli/convoy/artifacts.js +129 -0
  17. package/dist/cli/convoy/artifacts.js.map +1 -0
  18. package/dist/cli/convoy/artifacts.test.d.ts +2 -0
  19. package/dist/cli/convoy/artifacts.test.d.ts.map +1 -0
  20. package/dist/cli/convoy/artifacts.test.js +169 -0
  21. package/dist/cli/convoy/artifacts.test.js.map +1 -0
  22. package/dist/cli/convoy/compaction.d.ts +23 -0
  23. package/dist/cli/convoy/compaction.d.ts.map +1 -0
  24. package/dist/cli/convoy/compaction.js +117 -0
  25. package/dist/cli/convoy/compaction.js.map +1 -0
  26. package/dist/cli/convoy/compaction.test.d.ts +2 -0
  27. package/dist/cli/convoy/compaction.test.d.ts.map +1 -0
  28. package/dist/cli/convoy/compaction.test.js +205 -0
  29. package/dist/cli/convoy/compaction.test.js.map +1 -0
  30. package/dist/cli/convoy/contracts.d.ts +22 -0
  31. package/dist/cli/convoy/contracts.d.ts.map +1 -0
  32. package/dist/cli/convoy/contracts.js +254 -0
  33. package/dist/cli/convoy/contracts.js.map +1 -0
  34. package/dist/cli/convoy/contracts.test.d.ts +2 -0
  35. package/dist/cli/convoy/contracts.test.d.ts.map +1 -0
  36. package/dist/cli/convoy/contracts.test.js +239 -0
  37. package/dist/cli/convoy/contracts.test.js.map +1 -0
  38. package/dist/cli/convoy/dag-analysis.d.ts +40 -0
  39. package/dist/cli/convoy/dag-analysis.d.ts.map +1 -0
  40. package/dist/cli/convoy/dag-analysis.js +282 -0
  41. package/dist/cli/convoy/dag-analysis.js.map +1 -0
  42. package/dist/cli/convoy/dag-analysis.test.d.ts +2 -0
  43. package/dist/cli/convoy/dag-analysis.test.d.ts.map +1 -0
  44. package/dist/cli/convoy/dag-analysis.test.js +289 -0
  45. package/dist/cli/convoy/dag-analysis.test.js.map +1 -0
  46. package/dist/cli/convoy/effort-scaling.d.ts +20 -0
  47. package/dist/cli/convoy/effort-scaling.d.ts.map +1 -0
  48. package/dist/cli/convoy/effort-scaling.js +82 -0
  49. package/dist/cli/convoy/effort-scaling.js.map +1 -0
  50. package/dist/cli/convoy/effort-scaling.test.d.ts +2 -0
  51. package/dist/cli/convoy/effort-scaling.test.d.ts.map +1 -0
  52. package/dist/cli/convoy/effort-scaling.test.js +120 -0
  53. package/dist/cli/convoy/effort-scaling.test.js.map +1 -0
  54. package/dist/cli/convoy/engine.d.ts.map +1 -1
  55. package/dist/cli/convoy/engine.js +298 -11
  56. package/dist/cli/convoy/engine.js.map +1 -1
  57. package/dist/cli/convoy/engine.test.js +155 -18
  58. package/dist/cli/convoy/engine.test.js.map +1 -1
  59. package/dist/cli/convoy/event-schemas.d.ts.map +1 -1
  60. package/dist/cli/convoy/event-schemas.js +55 -0
  61. package/dist/cli/convoy/event-schemas.js.map +1 -1
  62. package/dist/cli/convoy/isolation.d.ts +27 -0
  63. package/dist/cli/convoy/isolation.d.ts.map +1 -0
  64. package/dist/cli/convoy/isolation.js +120 -0
  65. package/dist/cli/convoy/isolation.js.map +1 -0
  66. package/dist/cli/convoy/isolation.test.d.ts +2 -0
  67. package/dist/cli/convoy/isolation.test.d.ts.map +1 -0
  68. package/dist/cli/convoy/isolation.test.js +105 -0
  69. package/dist/cli/convoy/isolation.test.js.map +1 -0
  70. package/dist/cli/convoy/review-stages.d.ts +9 -0
  71. package/dist/cli/convoy/review-stages.d.ts.map +1 -0
  72. package/dist/cli/convoy/review-stages.js +134 -0
  73. package/dist/cli/convoy/review-stages.js.map +1 -0
  74. package/dist/cli/convoy/review-stages.test.d.ts +2 -0
  75. package/dist/cli/convoy/review-stages.test.d.ts.map +1 -0
  76. package/dist/cli/convoy/review-stages.test.js +197 -0
  77. package/dist/cli/convoy/review-stages.test.js.map +1 -0
  78. package/dist/cli/convoy/skill-refinement.d.ts +39 -0
  79. package/dist/cli/convoy/skill-refinement.d.ts.map +1 -0
  80. package/dist/cli/convoy/skill-refinement.js +239 -0
  81. package/dist/cli/convoy/skill-refinement.js.map +1 -0
  82. package/dist/cli/convoy/skill-refinement.test.d.ts +2 -0
  83. package/dist/cli/convoy/skill-refinement.test.d.ts.map +1 -0
  84. package/dist/cli/convoy/skill-refinement.test.js +230 -0
  85. package/dist/cli/convoy/skill-refinement.test.js.map +1 -0
  86. package/dist/cli/convoy/spec-builder.d.ts +1 -0
  87. package/dist/cli/convoy/spec-builder.d.ts.map +1 -1
  88. package/dist/cli/convoy/spec-builder.js +11 -0
  89. package/dist/cli/convoy/spec-builder.js.map +1 -1
  90. package/dist/cli/convoy/spec-builder.test.js +54 -0
  91. package/dist/cli/convoy/spec-builder.test.js.map +1 -1
  92. package/dist/cli/convoy/store.d.ts +3 -2
  93. package/dist/cli/convoy/store.d.ts.map +1 -1
  94. package/dist/cli/convoy/store.js +20 -2
  95. package/dist/cli/convoy/store.js.map +1 -1
  96. package/dist/cli/convoy/store.test.js +15 -15
  97. package/dist/cli/convoy/store.test.js.map +1 -1
  98. package/dist/cli/convoy/tdd-gate.d.ts +15 -0
  99. package/dist/cli/convoy/tdd-gate.d.ts.map +1 -0
  100. package/dist/cli/convoy/tdd-gate.js +119 -0
  101. package/dist/cli/convoy/tdd-gate.js.map +1 -0
  102. package/dist/cli/convoy/tdd-gate.test.d.ts +2 -0
  103. package/dist/cli/convoy/tdd-gate.test.d.ts.map +1 -0
  104. package/dist/cli/convoy/tdd-gate.test.js +227 -0
  105. package/dist/cli/convoy/tdd-gate.test.js.map +1 -0
  106. package/dist/cli/convoy/types.d.ts +91 -0
  107. package/dist/cli/convoy/types.d.ts.map +1 -1
  108. package/dist/cli/convoy/types.js +8 -0
  109. package/dist/cli/convoy/types.js.map +1 -1
  110. package/dist/cli/dashboard.d.ts.map +1 -1
  111. package/dist/cli/dashboard.js +54 -0
  112. package/dist/cli/dashboard.js.map +1 -1
  113. package/dist/cli/insights.d.ts +3 -0
  114. package/dist/cli/insights.d.ts.map +1 -0
  115. package/dist/cli/insights.js +94 -0
  116. package/dist/cli/insights.js.map +1 -0
  117. package/dist/cli/lesson.d.ts.map +1 -1
  118. package/dist/cli/lesson.js +7 -0
  119. package/dist/cli/lesson.js.map +1 -1
  120. package/dist/cli/log.d.ts.map +1 -1
  121. package/dist/cli/log.js +7 -0
  122. package/dist/cli/log.js.map +1 -1
  123. package/dist/cli/package-config.d.ts +12 -0
  124. package/dist/cli/package-config.d.ts.map +1 -0
  125. package/dist/cli/package-config.js +37 -0
  126. package/dist/cli/package-config.js.map +1 -0
  127. package/dist/cli/package.d.ts +23 -0
  128. package/dist/cli/package.d.ts.map +1 -0
  129. package/dist/cli/package.js +285 -0
  130. package/dist/cli/package.js.map +1 -0
  131. package/dist/cli/package.test.d.ts +2 -0
  132. package/dist/cli/package.test.d.ts.map +1 -0
  133. package/dist/cli/package.test.js +236 -0
  134. package/dist/cli/package.test.js.map +1 -0
  135. package/dist/cli/pipeline.d.ts +6 -0
  136. package/dist/cli/pipeline.d.ts.map +1 -1
  137. package/dist/cli/pipeline.js +15 -2
  138. package/dist/cli/pipeline.js.map +1 -1
  139. package/dist/cli/run/schema.d.ts.map +1 -1
  140. package/dist/cli/run/schema.js +32 -0
  141. package/dist/cli/run/schema.js.map +1 -1
  142. package/dist/cli/run/schema.test.js +51 -0
  143. package/dist/cli/run/schema.test.js.map +1 -1
  144. package/dist/cli/run.d.ts.map +1 -1
  145. package/dist/cli/run.js +10 -1
  146. package/dist/cli/run.js.map +1 -1
  147. package/dist/cli/skills.d.ts +3 -0
  148. package/dist/cli/skills.d.ts.map +1 -0
  149. package/dist/cli/skills.js +107 -0
  150. package/dist/cli/skills.js.map +1 -0
  151. package/dist/cli/types.d.ts +4 -1
  152. package/dist/cli/types.d.ts.map +1 -1
  153. package/dist/cli/update.js +2 -2
  154. package/package.json +3 -2
  155. package/src/cli/agents.ts +20 -5
  156. package/src/cli/artifacts-cli.ts +41 -0
  157. package/src/cli/baselines.ts +12 -0
  158. package/src/cli/convoy/artifacts.test.ts +201 -0
  159. package/src/cli/convoy/artifacts.ts +186 -0
  160. package/src/cli/convoy/compaction.test.ts +245 -0
  161. package/src/cli/convoy/compaction.ts +164 -0
  162. package/src/cli/convoy/contracts.test.ts +279 -0
  163. package/src/cli/convoy/contracts.ts +280 -0
  164. package/src/cli/convoy/dag-analysis.test.ts +349 -0
  165. package/src/cli/convoy/dag-analysis.ts +371 -0
  166. package/src/cli/convoy/effort-scaling.test.ts +140 -0
  167. package/src/cli/convoy/effort-scaling.ts +90 -0
  168. package/src/cli/convoy/engine.test.ts +175 -18
  169. package/src/cli/convoy/engine.ts +315 -12
  170. package/src/cli/convoy/event-schemas.ts +55 -0
  171. package/src/cli/convoy/isolation.test.ts +137 -0
  172. package/src/cli/convoy/isolation.ts +165 -0
  173. package/src/cli/convoy/review-stages.test.ts +235 -0
  174. package/src/cli/convoy/review-stages.ts +166 -0
  175. package/src/cli/convoy/skill-refinement.test.ts +277 -0
  176. package/src/cli/convoy/skill-refinement.ts +306 -0
  177. package/src/cli/convoy/spec-builder.test.ts +61 -0
  178. package/src/cli/convoy/spec-builder.ts +9 -0
  179. package/src/cli/convoy/store.test.ts +15 -15
  180. package/src/cli/convoy/store.ts +26 -4
  181. package/src/cli/convoy/tdd-gate.test.ts +281 -0
  182. package/src/cli/convoy/tdd-gate.ts +154 -0
  183. package/src/cli/convoy/types.ts +51 -0
  184. package/src/cli/dashboard.ts +55 -0
  185. package/src/cli/insights.ts +99 -0
  186. package/src/cli/lesson.ts +8 -0
  187. package/src/cli/log.ts +8 -0
  188. package/src/cli/package-config.ts +48 -0
  189. package/src/cli/package.test.ts +276 -0
  190. package/src/cli/package.ts +329 -0
  191. package/src/cli/pipeline.ts +21 -2
  192. package/src/cli/run/schema.test.ts +58 -0
  193. package/src/cli/run/schema.ts +33 -0
  194. package/src/cli/run.ts +14 -1
  195. package/src/cli/skills.ts +121 -0
  196. package/src/cli/types.ts +4 -1
  197. package/src/cli/update.ts +2 -2
  198. package/src/dashboard/dist/_astro/{index.Je1YjU_y.css → index.BRDFmNzR.css} +1 -1
  199. package/src/dashboard/dist/index.html +163 -2
  200. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  201. package/src/dashboard/src/pages/index.astro +162 -1
  202. package/src/dashboard/src/styles/dashboard.css +85 -0
  203. package/src/orchestrator/agents/developer.agent.md +8 -0
  204. package/src/orchestrator/agents/ui-ux-expert.agent.md +7 -0
  205. package/src/orchestrator/prompts/assess-complexity.prompt.md +13 -0
  206. package/src/orchestrator/prompts/brainstorm.prompt.md +18 -0
  207. package/src/orchestrator/prompts/generate-convoy.prompt.md +61 -0
  208. package/src/orchestrator/skills/decomposition/SKILL.md +35 -0
  209. package/src/orchestrator/skills/frontend-design/SKILL.md +27 -1
  210. package/src/orchestrator/skills/project-consistency/SKILL.md +350 -0
@@ -0,0 +1,350 @@
1
+ ---
2
+ name: project-consistency
3
+ description: "Enforce cross-agent consistency in multi-page/multi-component projects. Covers visual design, code patterns, content style, and structural conventions. Essential for convoy parallel execution where multiple agents build different parts of the same app."
4
+ ---
5
+
6
+ # Project Consistency
7
+
8
+ When multiple agents build different pages or sections in parallel, each makes independent decisions about colors, fonts, component APIs, content tone, and page structure. Without coordination, the result looks like it was built by five different teams — because it was.
9
+
10
+ **The fix is architectural, not aspirational.** Consistency cannot be "hoped for" after parallel work is done. It must be engineered as shared inputs before parallel work begins.
11
+
12
+ ## The Foundation-First Principle
13
+
14
+ ```
15
+ ❌ Wrong: [agent A] ─┐ → inconsistent output
16
+ [agent B] ─┤→ build pages in parallel → inconsistent output
17
+ [agent C] ─┘ → inconsistent output
18
+
19
+ ✅ Right: [foundation task] → shared artifacts → [agent A] ─┐
20
+ [agent B] ─┤→ consistent output
21
+ [agent C] ─┘
22
+ ```
23
+
24
+ **Phase 1 (sequential):** One task creates all shared artifacts — design tokens, layout component, UI library, style guide.
25
+ **Phase 2 (parallel):** Every page task imports from Phase 1 output. No new values, no recreated components.
26
+
27
+ ### The 4 Consistency Dimensions
28
+
29
+ | Dimension | What drifts without a contract | Artifact that enforces it |
30
+ |-----------|-------------------------------|--------------------------|
31
+ | **Visual** | Color palettes, font choices, spacing units | Design tokens file |
32
+ | **Code** | Component APIs, naming conventions, import paths | UI component library |
33
+ | **Content** | Tone, terminology, heading hierarchy | Style guide brief |
34
+ | **Structural** | Page layout, navigation, responsive breakpoints | Shared layout component |
35
+
36
+ ---
37
+
38
+ ## Foundation Phase Artifacts
39
+
40
+ A foundation task must produce four things. All subsequent tasks depend on its completion.
41
+
42
+ ### a. Design Tokens File
43
+
44
+ A single CSS custom properties file — the system's single source of truth. No agent may introduce a color, size, or timing value outside this file.
45
+
46
+ **Path:** `src/styles/tokens.css` (or equivalent for your framework)
47
+
48
+ ```css
49
+ /* Palette — name for intent, not appearance */
50
+ :root {
51
+ --color-ink: #1a1614; /* primary text */
52
+ --color-paper: #f5f0e8; /* page background */
53
+ --color-accent: #c8e630; /* the memorable one — use sparingly */
54
+ --color-muted: #9b9083; /* secondary text, labels */
55
+ --color-surface: #eae3d8; /* card backgrounds, elevated surfaces */
56
+ --color-border: rgba(26,22,20,.08);
57
+
58
+ /* Typography scale — fluid with clamp(), modular ratio 1.25 */
59
+ --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.875rem);
60
+ --text-sm: clamp(0.875rem, 0.83rem + 0.22vw, 1rem);
61
+ --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
62
+ --text-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.563rem);
63
+ --text-xl: clamp(1.563rem, 1.35rem + 1.06vw, 2rem);
64
+ --text-2xl: clamp(1.953rem, 1.6rem + 1.77vw, 2.75rem);
65
+ --text-hero: clamp(2.441rem, 1.8rem + 3.2vw, 4.5rem);
66
+
67
+ /* Font families */
68
+ --font-display: 'Playfair Display', 'Georgia', serif;
69
+ --font-body: 'Source Serif 4', 'Georgia', serif;
70
+ --font-mono: 'JetBrains Mono', 'Courier New', monospace;
71
+
72
+ /* Spacing — 4px base, geometric progression */
73
+ --space-1: 0.25rem; --space-2: 0.5rem;
74
+ --space-3: 0.75rem; --space-4: 1rem;
75
+ --space-6: 1.5rem; --space-8: 2rem;
76
+ --space-12: 3rem; --space-16: 4rem;
77
+ --space-24: 6rem; --space-32: 8rem;
78
+
79
+ /* Borders & radius */
80
+ --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; --radius-full: 9999px;
81
+ --border-width: 1px; --border-width-thick: 2px;
82
+
83
+ /* Elevation */
84
+ --shadow-sm: 0 1px 4px rgba(26,22,20,.06);
85
+ --shadow-md: 0 4px 16px rgba(26,22,20,.08);
86
+ --shadow-lg: 0 12px 48px rgba(26,22,20,.12);
87
+
88
+ /* Motion — intentional easing, not browser defaults */
89
+ --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
90
+ --ease-in-out-back: cubic-bezier(0.68, -0.6, 0.32, 1.6);
91
+ --duration-fast: 150ms;
92
+ --duration-normal: 300ms;
93
+ --duration-slow: 600ms;
94
+
95
+ /* Layout */
96
+ --container-sm: 640px;
97
+ --container-md: 768px;
98
+ --container-lg: 1024px;
99
+ --container-xl: 1280px;
100
+ --container-pad: var(--space-6);
101
+ }
102
+ ```
103
+
104
+ > **Rule:** If a value isn't a token, it doesn't belong in a component stylesheet. Period.
105
+
106
+ ### b. Shared Layout Component
107
+
108
+ Wraps every page. Provides the header, navigation, footer, and responsive container. Every page agent imports this — never creates its own.
109
+
110
+ **Path:** `src/components/Layout.tsx` (React) or `src/layouts/Layout.astro` (Astro)
111
+
112
+ ```tsx
113
+ // Layout.tsx — simplified contract; foundation task provides the full implementation
114
+ interface LayoutProps {
115
+ title: string;
116
+ description?: string;
117
+ children: React.ReactNode;
118
+ }
119
+
120
+ export function Layout({ title, description, children }: LayoutProps) {
121
+ return (
122
+ <>
123
+ <Head title={title} description={description} />
124
+ <div className="site">
125
+ <SiteHeader /> {/* navigation — from tokens and style guide */}
126
+ <main className="site__main">{children}</main>
127
+ <SiteFooter />
128
+ </div>
129
+ </>
130
+ );
131
+ }
132
+ ```
133
+
134
+ The layout must handle:
135
+ - Responsive container (`max-width: var(--container-xl)`, centered, padded)
136
+ - Site header with navigation (labels defined in style guide brief)
137
+ - Site footer
138
+ - Consistent page padding using spacing tokens
139
+ - Document head (meta tags, fonts, canonical URL)
140
+
141
+ ### c. UI Component Library
142
+
143
+ Shared primitives that every page agent imports. Each component uses only design tokens — zero hardcoded values.
144
+
145
+ **Path:** `src/components/ui/`
146
+
147
+ Minimum required components:
148
+
149
+ | Component | Purpose | Key variants |
150
+ |-----------|---------|--------------|
151
+ | `Button` | Primary CTA and actions | `primary`, `secondary`, `ghost` |
152
+ | `Card` | Content containers | `default`, `bordered`, `elevated` |
153
+ | `Heading` | h1–h6 with token-based sizing | via `level` prop |
154
+ | `Text` | Body copy with consistent sizing | `sm`, `base`, `lg` |
155
+ | `Link` | Anchor with consistent hover treatment | `default`, `subtle` |
156
+ | `Section` | Vertical spacing wrapper | `sm`, `md`, `lg`, `xl` |
157
+ | `Container` | Responsive width constraint | `sm`, `md`, `lg`, `xl` |
158
+ | `Grid` | Consistent column layout | via `cols` prop |
159
+
160
+ Component API rules (defined once, followed by all):
161
+ - Props use camelCase
162
+ - Variant selection via `variant` prop (string union)
163
+ - Size selection via `size` prop (string union)
164
+ - All components accept `className` for one-off overrides
165
+ - No inline `style` props in library components
166
+
167
+ ### d. Style Guide Brief
168
+
169
+ Defined inline in the foundation task prompt (not a separate file). Page task prompts must quote it verbatim.
170
+
171
+ Required fields:
172
+ - **Aesthetic direction:** 2–3 words (`warm editorial`, `cold brutalist`, `soft playful`)
173
+ - **Typography pairing:** display font + body font + mono (if used)
174
+ - **Content tone:** formal/casual, active/passive, sentence length preference
175
+ - **Navigation labels:** exact labels for every nav link (prevents terminology drift)
176
+ - **Page structure pattern:** the default sequence (e.g., `hero → intro → features → CTA → footer`)
177
+ - **Terminology glossary:** any project-specific terms that could be said multiple ways (pick one)
178
+
179
+ ---
180
+
181
+ ## Consistency Rules for Page Agents
182
+
183
+ Every agent building a page in a multi-agent convoy MUST follow these rules. Non-negotiable.
184
+
185
+ ### Visual
186
+ - Import tokens from the tokens file. **Never introduce a new color value, font size, or spacing value.**
187
+ - If a value you need doesn't exist as a token, stop and flag it — don't invent an inline value and move on.
188
+ - Use CSS custom properties exclusively. No raw hex, no raw `px` values in stylesheets.
189
+
190
+ ### Code
191
+ - Import `Layout` from the shared layout path. Do not create a page-local layout wrapper.
192
+ - Import `Button`, `Card`, `Heading`, etc. from the UI library path. Do not recreate them.
193
+ - Follow the naming conventions: PascalCase components, camelCase props, kebab-case CSS classes.
194
+ - Co-locate component files (component, styles, tests) — do not scatter across `pages/`, `styles/`, and `components/`.
195
+
196
+ ### Content
197
+ - Match the tone from the style guide brief exactly. If the brief says "conversational and direct," don't write formal passive-voice copy.
198
+ - Use the terminology glossary. If the brief says "projects" (not "work" or "portfolio"), use "projects" everywhere.
199
+ - Follow the heading hierarchy pattern. If H1 is the page title and H2 introduces sections, don't invent new patterns.
200
+
201
+ ### Structural
202
+ - Every page uses the shared Layout component — no exceptions.
203
+ - Follow the page structure pattern from the style guide brief (`hero → content → CTA`, etc.).
204
+ - Navigation labels must match the style guide brief exactly — no paraphrasing.
205
+ - Responsive breakpoints come from the tokens file (`--container-sm/md/lg/xl`). Define no new breakpoints.
206
+
207
+ ---
208
+
209
+ ## Convoy Integration Pattern
210
+
211
+ ```
212
+ Phase 1: foundation-setup (1 task, blocks Phase 2)
213
+ ├── Agent: UI-UX Expert or Developer
214
+ ├── Creates: tokens.css, Layout component, UI component library
215
+ ├── Defines: style guide brief (aesthetic, tone, nav labels, terminology)
216
+ └── Output: all paths documented for Phase 2 task prompts
217
+
218
+ Phase 2: page-building (N tasks, all parallel)
219
+ ├── home-page
220
+ ├── about-page
221
+ ├── projects-page
222
+ ├── contact-page
223
+ └── [every task prompt contains the 5 mandatory references below]
224
+ ```
225
+
226
+ ### 5 Mandatory References in Every Page Task Prompt
227
+
228
+ ```
229
+ 1. Design tokens: `[path to tokens.css]` — use ONLY these tokens. No new values.
230
+ 2. Layout: `[path to Layout]` — wrap all page content in this component.
231
+ 3. UI components: `[path to src/components/ui/]` — import; do not recreate.
232
+ 4. Aesthetic: [2-3 word direction from foundation]
233
+ 5. Content tone: [tone description from foundation]
234
+ ```
235
+
236
+ These are **inputs** to the task, not suggestions.
237
+
238
+ ---
239
+
240
+ ## Prompt Template: Foundation Task
241
+
242
+ Copy and fill in. This prompt goes to a single agent before parallel work begins.
243
+
244
+ ````markdown
245
+ ## Foundation Setup
246
+
247
+ Create the design system foundation for [project description].
248
+
249
+ ### Aesthetic Direction
250
+ [2-3 word aesthetic] — [one sentence: what this feels like and who it's for]
251
+
252
+ ### Design Tokens
253
+ Create `[path]/tokens.css` with CSS custom properties for:
254
+ - Colors: name for intent (ink, paper, accent, muted, surface, border)
255
+ - Typography: [display font] + [body font], fluid clamp() scale (xs → hero)
256
+ - Spacing: 4px base, geometric progression (space-1 through space-32)
257
+ - Motion: custom easing curves + duration tokens (fast/normal/slow)
258
+ - Shadows (sm/md/lg), border radius (sm/md/lg/full), breakpoints (sm/md/lg/xl)
259
+
260
+ ### Shared Layout
261
+ Create `[path]/Layout.[tsx|astro|vue]` with:
262
+ - Responsive container (max-width centered, padded with --container-pad)
263
+ - Site header with navigation: [list nav labels exactly]
264
+ - Site footer with [footer content]
265
+ - Document head (title, description, fonts)
266
+
267
+ ### UI Component Library
268
+ Create these components in `[path]/ui/`:
269
+ Button (primary/secondary/ghost), Card (default/bordered/elevated),
270
+ Heading (h1–h6 via level prop), Text (sm/base/lg), Link,
271
+ Section (vertical spacer), Container (width constraint), Grid
272
+
273
+ Rules: all components use only token variables — zero hardcoded values.
274
+ Consistent prop API: variant, size, className on every component.
275
+
276
+ ### Style Guide Brief
277
+ - Tone: [formal/casual, active/passive, sentence length]
278
+ - Terminology: [key terms — e.g., "projects" not "work", "clients" not "customers"]
279
+ - Page structure: [hero → intro → features → CTA]
280
+
281
+ ### Acceptance Criteria
282
+ - [ ] All design values use CSS custom properties — zero hardcoded hex/px in components
283
+ - [ ] Layout renders correctly at 320px (mobile), 768px (tablet), 1280px (desktop)
284
+ - [ ] All UI components import tokens from the tokens file — no new values
285
+ - [ ] Typography uses clamp() for fluid sizing throughout
286
+ - [ ] Fonts are loaded efficiently (subset, display=swap)
287
+ - [ ] At least one distinctive design detail beyond generic defaults
288
+ ````
289
+
290
+ ---
291
+
292
+ ## Prompt Template: Page Task
293
+
294
+ Copy and fill in for each parallel page task.
295
+
296
+ ````markdown
297
+ ## Build [Page Name] Page
298
+
299
+ [One paragraph: page purpose, target audience, primary user action]
300
+
301
+ ### Foundation References (MANDATORY — do not deviate)
302
+ - **Design tokens:** `[path]/tokens.css` — use ONLY these variables. No new color/font/spacing values.
303
+ - **Layout component:** `[path]/Layout.[tsx|astro|vue]` — wrap all page content in this.
304
+ - **UI components:** `[path]/ui/` — use Button, Card, Heading, Section, Container. Do not recreate them.
305
+ - **Aesthetic:** [2-3 word direction]
306
+ - **Tone:** [tone from style guide brief]
307
+ - **Terminology:** [key terms from style guide brief]
308
+
309
+ ### Page Content
310
+ [Specific sections, copy direction, media requirements]
311
+
312
+ ### Page Structure
313
+ Follow the established pattern: [hero → intro → features → CTA] (from foundation brief)
314
+
315
+ ### Acceptance Criteria
316
+ - [ ] Page uses the shared Layout component
317
+ - [ ] All styling uses design tokens — zero hardcoded values
318
+ - [ ] Shared UI components imported and used (not recreated)
319
+ - [ ] Content tone and terminology match the style guide brief
320
+ - [ ] Responsive at 320px, 768px, 1280px
321
+ - [ ] [page-specific criteria]
322
+ ````
323
+
324
+ ---
325
+
326
+ ## Anti-Patterns
327
+
328
+ These will produce an inconsistent result regardless of individual page quality.
329
+
330
+ | Anti-pattern | Consequence | Fix |
331
+ |-------------|-------------|-----|
332
+ | Each agent picks fonts/colors | Every page feels like a different site | Foundation task creates tokens first |
333
+ | Page-local `styles/global.css` files | Conflicting resets and overrides | One shared tokens file, imported once |
334
+ | Copy-pasting `Button` between pages | API drift, visual divergence | Import from shared library |
335
+ | Inline `style={{ color: '#3b4f' }}` | Bypasses the token contract entirely | CSS class with token variable |
336
+ | Skipping foundation "for a simple site" | Still inconsistent — just smaller | Foundation takes 1 task, saves N fixes |
337
+ | Different terminology per page | Confuses users ("projects" vs "portfolio") | Terminology glossary in style guide brief |
338
+ | Foundation and page tasks run in parallel | Page tasks start before artifacts exist | Foundation phase must fully complete first |
339
+
340
+ ---
341
+
342
+ ## When to Load This Skill
343
+
344
+ Load this skill when:
345
+ - A convoy plan includes 2+ pages or UI sections built by different agents
346
+ - The `generate-convoy` prompt describes a multi-page application
347
+ - A decomposition produces parallel page-building tasks
348
+ - A Developer or UI-UX Expert agent is working on a page within a multi-agent build
349
+
350
+ The **decomposition** skill should reference this skill in multi-page task plans. The **generate-convoy** prompt template should embed the foundation-first pattern.