opencastle 0.31.6 → 0.31.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +93 -21
- package/README.md +5 -3
- package/dist/cli/convoy/engine.d.ts.map +1 -1
- package/dist/cli/convoy/engine.js +18 -5
- package/dist/cli/convoy/engine.js.map +1 -1
- package/dist/cli/dashboard.d.ts.map +1 -1
- package/dist/cli/dashboard.js +54 -0
- package/dist/cli/dashboard.js.map +1 -1
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +10 -1
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/update.js +2 -2
- package/package.json +2 -2
- package/src/cli/convoy/engine.ts +14 -5
- package/src/cli/dashboard.ts +55 -0
- package/src/cli/run.ts +14 -1
- package/src/cli/update.ts +2 -2
- package/src/dashboard/dist/_astro/{index.Je1YjU_y.css → index.BRDFmNzR.css} +1 -1
- package/src/dashboard/dist/index.html +163 -2
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/dashboard/src/pages/index.astro +162 -1
- package/src/dashboard/src/styles/dashboard.css +85 -0
- package/src/orchestrator/agents/developer.agent.md +8 -0
- package/src/orchestrator/agents/ui-ux-expert.agent.md +7 -0
- package/src/orchestrator/prompts/brainstorm.prompt.md +18 -0
- package/src/orchestrator/prompts/generate-convoy.prompt.md +42 -0
- package/src/orchestrator/skills/decomposition/SKILL.md +35 -0
- package/src/orchestrator/skills/frontend-design/SKILL.md +27 -1
- package/src/orchestrator/skills/project-consistency/SKILL.md +350 -0
|
@@ -2735,3 +2735,88 @@ body {
|
|
|
2735
2735
|
max-width: 180px;
|
|
2736
2736
|
}
|
|
2737
2737
|
}
|
|
2738
|
+
|
|
2739
|
+
/* Waiting for convoy banner */
|
|
2740
|
+
.waiting-banner {
|
|
2741
|
+
text-align: center;
|
|
2742
|
+
padding: 3rem 2rem;
|
|
2743
|
+
margin-bottom: 2rem;
|
|
2744
|
+
border-radius: var(--radius-lg, 12px);
|
|
2745
|
+
background: var(--bg-surface, #1e1e2e);
|
|
2746
|
+
border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
|
|
2747
|
+
}
|
|
2748
|
+
.waiting-banner__content {
|
|
2749
|
+
display: flex;
|
|
2750
|
+
flex-direction: column;
|
|
2751
|
+
align-items: center;
|
|
2752
|
+
gap: 0.75rem;
|
|
2753
|
+
}
|
|
2754
|
+
.waiting-banner__spinner {
|
|
2755
|
+
width: 32px;
|
|
2756
|
+
height: 32px;
|
|
2757
|
+
border: 3px solid var(--border-subtle, rgba(255,255,255,0.1));
|
|
2758
|
+
border-top-color: var(--accent, #60a5fa);
|
|
2759
|
+
border-radius: 50%;
|
|
2760
|
+
animation: spin 1s linear infinite;
|
|
2761
|
+
}
|
|
2762
|
+
@keyframes spin {
|
|
2763
|
+
to { transform: rotate(360deg); }
|
|
2764
|
+
}
|
|
2765
|
+
.waiting-banner__title {
|
|
2766
|
+
font-size: 1.25rem;
|
|
2767
|
+
font-weight: 600;
|
|
2768
|
+
margin: 0;
|
|
2769
|
+
color: var(--text-primary, #e2e8f0);
|
|
2770
|
+
}
|
|
2771
|
+
.waiting-banner__subtitle {
|
|
2772
|
+
font-size: 0.875rem;
|
|
2773
|
+
color: var(--text-muted, #94a3b8);
|
|
2774
|
+
margin: 0;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
/* Pipeline chain navigation */
|
|
2778
|
+
.pipeline-chain-nav {
|
|
2779
|
+
display: flex;
|
|
2780
|
+
align-items: center;
|
|
2781
|
+
gap: 0.5rem;
|
|
2782
|
+
padding: 0.5rem 0;
|
|
2783
|
+
margin-bottom: 0.5rem;
|
|
2784
|
+
flex-wrap: wrap;
|
|
2785
|
+
}
|
|
2786
|
+
.pipeline-chain__label {
|
|
2787
|
+
font-size: 0.75rem;
|
|
2788
|
+
font-weight: 600;
|
|
2789
|
+
text-transform: uppercase;
|
|
2790
|
+
letter-spacing: 0.05em;
|
|
2791
|
+
color: var(--text-muted, #94a3b8);
|
|
2792
|
+
margin-right: 0.25rem;
|
|
2793
|
+
}
|
|
2794
|
+
.pipeline-chain__item {
|
|
2795
|
+
display: inline-flex;
|
|
2796
|
+
align-items: center;
|
|
2797
|
+
gap: 0.375rem;
|
|
2798
|
+
padding: 0.25rem 0.625rem;
|
|
2799
|
+
font-size: 0.8125rem;
|
|
2800
|
+
border-radius: var(--radius-sm, 6px);
|
|
2801
|
+
border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
|
|
2802
|
+
background: var(--bg-surface, #1e1e2e);
|
|
2803
|
+
color: var(--text-secondary, #cbd5e1);
|
|
2804
|
+
cursor: pointer;
|
|
2805
|
+
transition: border-color 0.15s, background 0.15s;
|
|
2806
|
+
}
|
|
2807
|
+
.pipeline-chain__item:hover {
|
|
2808
|
+
border-color: var(--border-hover, rgba(255,255,255,0.15));
|
|
2809
|
+
background: var(--bg-hover, rgba(255,255,255,0.04));
|
|
2810
|
+
}
|
|
2811
|
+
.pipeline-chain__item--active {
|
|
2812
|
+
border-color: var(--accent, #60a5fa);
|
|
2813
|
+
background: rgba(96, 165, 250, 0.08);
|
|
2814
|
+
color: var(--text-primary, #e2e8f0);
|
|
2815
|
+
}
|
|
2816
|
+
.pipeline-chain__dot {
|
|
2817
|
+
display: inline-block;
|
|
2818
|
+
width: 8px;
|
|
2819
|
+
height: 8px;
|
|
2820
|
+
border-radius: 50%;
|
|
2821
|
+
flex-shrink: 0;
|
|
2822
|
+
}
|
|
@@ -33,6 +33,14 @@ After code changes, always run lint, test, and build for affected projects.
|
|
|
33
33
|
- Co-locate component files (component, styles, tests) in the same directory
|
|
34
34
|
- Place shared components in the UI library, queries in the data layer
|
|
35
35
|
|
|
36
|
+
### Multi-Page Convoy Consistency
|
|
37
|
+
|
|
38
|
+
When working on a page task within a multi-agent convoy:
|
|
39
|
+
- **Import** design tokens, layout component, and UI components from the foundation — do not recreate them
|
|
40
|
+
- **Follow** the aesthetic direction and content tone specified in your task prompt's Foundation References
|
|
41
|
+
- If a needed design token is missing, flag it in your output — never add inline values as workarounds
|
|
42
|
+
- Load the **project-consistency** skill for the full consistency contract
|
|
43
|
+
|
|
36
44
|
## Done When
|
|
37
45
|
|
|
38
46
|
- All acceptance criteria from the tracker issue are met
|
|
@@ -32,6 +32,13 @@ Resolve all skills (slots and direct) via [skill-matrix.json](.opencastle/agents
|
|
|
32
32
|
- Use `clsx` for conditional class composition
|
|
33
33
|
- Export all components from the UI library's index
|
|
34
34
|
|
|
35
|
+
### Multi-Page Convoy Consistency
|
|
36
|
+
|
|
37
|
+
When working on a page task within a multi-agent convoy:
|
|
38
|
+
- **If you are the foundation task:** create comprehensive design tokens, shared layout, and UI component library. Your choices become the project contract — be explicit and decisive.
|
|
39
|
+
- **If you are a page task:** consume the foundation. Import tokens, layout, and UI components — do not recreate them. No new design values.
|
|
40
|
+
- Load the **project-consistency** skill for full guidance on foundation artifacts and page task rules.
|
|
41
|
+
|
|
35
42
|
## Done When
|
|
36
43
|
|
|
37
44
|
- Components render correctly at all project-defined responsive breakpoints
|
|
@@ -73,6 +73,18 @@ Draw a clear boundary:
|
|
|
73
73
|
- **Out of scope:** What it explicitly will NOT do (and why)
|
|
74
74
|
- **Deferred:** What could be done later as a follow-up
|
|
75
75
|
|
|
76
|
+
#### Design Direction (for multi-page projects)
|
|
77
|
+
|
|
78
|
+
If the request involves building 2+ pages or UI sections, define the design direction during brainstorming — not during implementation:
|
|
79
|
+
|
|
80
|
+
- **Aesthetic direction:** 2-3 words (e.g., "warm editorial", "clean minimal", "brutalist edge")
|
|
81
|
+
- **Typography pairing:** display font + body font (avoid generic defaults like Inter/Roboto)
|
|
82
|
+
- **Color intent:** dominant purpose, accent purpose, mood
|
|
83
|
+
- **Content tone:** formal/casual, active/passive, target audience voice
|
|
84
|
+
- **Key terminology:** terms that could be said multiple ways — pick one (e.g., "projects" not "portfolio")
|
|
85
|
+
|
|
86
|
+
Include this in the Brainstorm Report so the planning phase can inject it into convoy foundation tasks.
|
|
87
|
+
|
|
76
88
|
### 6. Output
|
|
77
89
|
|
|
78
90
|
Summarize the brainstorm as a **Brainstorm Report** — this becomes the input for the planning/decomposition phase:
|
|
@@ -98,6 +110,12 @@ Summarize the brainstorm as a **Brainstorm Report** — this becomes the input f
|
|
|
98
110
|
|
|
99
111
|
### Open Questions
|
|
100
112
|
- [Any unresolved questions for the user]
|
|
113
|
+
|
|
114
|
+
### Design Direction (if multi-page)
|
|
115
|
+
- **Aesthetic:** [direction]
|
|
116
|
+
- **Typography:** [display font] + [body font]
|
|
117
|
+
- **Tone:** [description]
|
|
118
|
+
- **Key terms:** [glossary]
|
|
101
119
|
```
|
|
102
120
|
|
|
103
121
|
## When to Skip Brainstorming
|
|
@@ -93,6 +93,39 @@ For each workstream, break it down into the smallest meaningful unit. Follow the
|
|
|
93
93
|
5. **Appropriate agent** — pick the agent whose speciality matches the task (e.g. `testing-expert` for tests, `database-engineer` for migrations).
|
|
94
94
|
6. **Realistic timeouts** — `30m` for most tasks; `1h` for large refactors; `10m` for small docs or config.
|
|
95
95
|
|
|
96
|
+
### 2.5 Foundation Phase for Multi-Page Projects
|
|
97
|
+
|
|
98
|
+
When the goal involves building **2 or more pages, views, or UI sections**, apply the Foundation-First Pattern to prevent consistency drift across parallel agents:
|
|
99
|
+
|
|
100
|
+
1. **Create a foundation task** (`id: foundation-setup`) as the FIRST task. This task:
|
|
101
|
+
- Creates a **design tokens file** (CSS custom properties for colors, typography, spacing, motion, shadows, breakpoints)
|
|
102
|
+
- Creates a **shared layout component** (page container with header, footer, navigation)
|
|
103
|
+
- Creates a **UI component library** (Button, Card, Heading, Text, Section, Container, Grid)
|
|
104
|
+
- Establishes the **style guide** (aesthetic direction, content tone, terminology, navigation labels)
|
|
105
|
+
- Agent: `ui-ux-expert` or `developer`
|
|
106
|
+
|
|
107
|
+
2. **All page tasks must `depends_on: [foundation-setup]`** — they cannot run until the foundation is in place.
|
|
108
|
+
|
|
109
|
+
3. **Every page task prompt must include Foundation References** — these 5 mandatory lines constrain the agent to `use` existing artifacts instead of `creating` new ones:
|
|
110
|
+
```
|
|
111
|
+
### Foundation References (MANDATORY)
|
|
112
|
+
- Design tokens: `[path to tokens file]` — use ONLY these variables. No new color/font/spacing values.
|
|
113
|
+
- Layout: `[path to Layout component]` — wrap all content in this layout.
|
|
114
|
+
- UI components: `[path to ui/ directory]` — import shared components. Do not recreate Button/Card/etc.
|
|
115
|
+
- Aesthetic: [2-3 word direction from foundation]
|
|
116
|
+
- Tone: [content tone from foundation]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
4. **The foundation prompt itself** should specify:
|
|
120
|
+
- The aesthetic direction (2-3 words + elaboration)
|
|
121
|
+
- The typography pairing (display + body font)
|
|
122
|
+
- The color palette intent (dominant, accent, muted)
|
|
123
|
+
- The navigation labels (exact text for every nav link)
|
|
124
|
+
- The content tone (formal/casual, active/passive)
|
|
125
|
+
- Terminology choices (e.g., "projects" not "portfolio")
|
|
126
|
+
|
|
127
|
+
> **Why:** Without this pattern, parallel agents independently choose fonts, colors, component APIs, and content tone. The result looks like it was built by different teams — because it was. Foundation-first makes consistency structural, not aspirational.
|
|
128
|
+
|
|
96
129
|
### 3. Define the Dependency Graph (DAG)
|
|
97
130
|
|
|
98
131
|
- Tasks with no dependencies run first (in parallel up to `concurrency`).
|
|
@@ -127,6 +160,12 @@ Each task `prompt` must be a **complete, standalone instruction**. Include:
|
|
|
127
160
|
>
|
|
128
161
|
> **Strong prompt:** "Write unit tests for `libs/auth/src/server.ts` covering token refresh, expiry edge cases, and invalid signatures. Place tests in `libs/auth/src/__tests__/server.test.ts`. Follow the existing test conventions. Achieve ≥ 95% coverage for `server.ts`. Run the project's test command with coverage and fix any failures."
|
|
129
162
|
|
|
163
|
+
> **Multi-page prompt pattern:** For page tasks in a multi-page project, always include the Foundation References block (from Step 2.5). The foundation task creates the design system; page tasks consume it.
|
|
164
|
+
>
|
|
165
|
+
> **Strong page prompt:** "Build the About page at `app/about/page.tsx`. **Foundation References:** Design tokens: `src/styles/tokens.css` — use ONLY these variables. Layout: `src/components/Layout.tsx` — wrap content in this layout. UI components: `src/components/ui/` — use Heading, Text, Section. Aesthetic: warm editorial. Tone: conversational and authentic. Include a bio section, skills grid (use Card from UI lib), and a timeline of experience. Responsive at 320px, 768px, 1280px."
|
|
166
|
+
>
|
|
167
|
+
> **Weak page prompt:** "Build the About page with a bio and skills section." — No foundation references, agent will create its own styles.
|
|
168
|
+
|
|
130
169
|
### 6. Validate Before Outputting
|
|
131
170
|
|
|
132
171
|
- [ ] Every task has a unique `id`
|
|
@@ -141,6 +180,9 @@ Each task `prompt` must be a **complete, standalone instruction**. Include:
|
|
|
141
180
|
- [ ] **File list completeness**: Every file mentioned in a task's prompt that the agent will create or modify MUST appear in that task's `files` list. Don't omit utility files, sub-components, or config files if the prompt instructs the agent to create them.
|
|
142
181
|
- [ ] **Prompt instruction accuracy**: Don't include instructions that contradict the dependency graph. If a task depends on another task (via `depends_on`), the depended task's outputs will exist when this task runs — don't add `@ts-expect-error` comments, stub files, or "if not found" fallbacks for files produced by dependencies.
|
|
143
182
|
- [ ] **Content research rule compliance**: If a prompt concerns real people, places, or organisations, it includes a research instruction telling the agent to search the internet first.
|
|
183
|
+
- [ ] **Foundation phase present**: If the plan involves 2+ pages or UI sections, a `foundation-setup` task exists with no dependencies, and all page tasks depend on it
|
|
184
|
+
- [ ] **Foundation references in page prompts**: Every page-building task prompt includes the 5 mandatory Foundation References (design tokens path, layout path, UI component path, aesthetic direction, content tone)
|
|
185
|
+
- [ ] **No token duplication**: Page task prompts do NOT instruct agents to create new design tokens, layout components, or shared UI primitives — only to import and use existing ones from the foundation
|
|
144
186
|
|
|
145
187
|
### 7. Output
|
|
146
188
|
|
|
@@ -121,3 +121,38 @@ Phase 4 (background): Validation — Security audit + Tests + Docs (parallel)
|
|
|
121
121
|
Phase 5 (sub-agent): QA gate — verify all phases, run builds, self-review
|
|
122
122
|
Phase 6 (sub-agent): Panel review — load panel-majority-vote skill for high-stakes validation
|
|
123
123
|
```
|
|
124
|
+
|
|
125
|
+
## Foundation-First Decomposition
|
|
126
|
+
|
|
127
|
+
When decomposing a multi-page or multi-component project, always apply the Foundation-First Pattern to maintain cross-agent consistency:
|
|
128
|
+
|
|
129
|
+
### When to apply
|
|
130
|
+
|
|
131
|
+
- Goal involves 2+ pages, views, or UI sections
|
|
132
|
+
- Multiple agents (same or different phase) will produce visual output
|
|
133
|
+
- The project doesn't have an existing design system
|
|
134
|
+
|
|
135
|
+
### Phase structure
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Phase 1: foundation-setup
|
|
139
|
+
├── Creates: design tokens, layout, UI component library
|
|
140
|
+
├── Defines: style guide brief (aesthetic, tone, terminology)
|
|
141
|
+
└── All visual tasks → depends_on: [foundation-setup]
|
|
142
|
+
|
|
143
|
+
Phase 2+: page tasks (parallel)
|
|
144
|
+
├── Each prompt includes 5 Foundation References
|
|
145
|
+
└── Agents consume tokens — never create new values
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Partition rules for foundation
|
|
149
|
+
|
|
150
|
+
- Foundation task owns: `src/styles/`, `src/components/Layout.*`, `src/components/ui/`
|
|
151
|
+
- Page tasks own: their specific page file + page-specific components only
|
|
152
|
+
- No page task may list a foundation-owned path in its `files[]`
|
|
153
|
+
|
|
154
|
+
### Common mistake
|
|
155
|
+
|
|
156
|
+
Decomposing pages as independent Phase 1 tasks (no foundation). This produces partition-clean, dependency-valid specs that fail aesthetically — each agent invents its own design. Always add the foundation task as the root of the DAG for visual work.
|
|
157
|
+
|
|
158
|
+
> Load the **project-consistency** skill for the full Foundation Phase pattern, prompt templates, and anti-patterns.
|
|
@@ -192,4 +192,30 @@ Run this checklist before delivering any frontend work. Every item is a gate —
|
|
|
192
192
|
- [ ] No hardcoded widths that break at unexpected viewports
|
|
193
193
|
- [ ] Images and decorative elements have proper `alt` text or `aria-hidden`
|
|
194
194
|
- [ ] Focus indicators are visible and styled to match the aesthetic
|
|
195
|
-
- [ ] Performance: no layout thrashing from scroll-triggered animations without `will-change`
|
|
195
|
+
- [ ] Performance: no layout thrashing from scroll-triggered animations without `will-change`
|
|
196
|
+
## Convoy-Aware Design
|
|
197
|
+
|
|
198
|
+
When building as part of a multi-agent convoy (multiple pages or sections built in parallel), additional rules apply:
|
|
199
|
+
|
|
200
|
+
### If you ARE the foundation task agent
|
|
201
|
+
|
|
202
|
+
You are establishing the design system for the entire project. Your output is the source of truth that all other agents will consume. Focus on:
|
|
203
|
+
|
|
204
|
+
1. **Design tokens file** — comprehensive CSS custom properties covering all visual dimensions
|
|
205
|
+
2. **Layout component** — shared page container used by every page
|
|
206
|
+
3. **UI component library** — shared primitives (Button, Card, Heading, etc.)
|
|
207
|
+
4. **Style guide brief** — aesthetic direction, content tone, terminology, nav labels
|
|
208
|
+
|
|
209
|
+
Make explicit, decisive choices. Ambiguity in the foundation cascades into inconsistency across pages.
|
|
210
|
+
|
|
211
|
+
### If you are a page task agent (consuming the foundation)
|
|
212
|
+
|
|
213
|
+
You are NOT making design decisions — you are executing within an established system.
|
|
214
|
+
|
|
215
|
+
- **Import** design tokens. **Do not** create new color values, font sizes, or spacing units.
|
|
216
|
+
- **Import** the Layout component. **Do not** create a page-local layout wrapper.
|
|
217
|
+
- **Import** UI components (Button, Card, etc.). **Do not** recreate them.
|
|
218
|
+
- **Follow** the aesthetic direction and content tone from the foundation.
|
|
219
|
+
- If a token you need doesn't exist, flag it in your output — NEVER add an inline value as a workaround.
|
|
220
|
+
|
|
221
|
+
> Load the **project-consistency** skill for the full Foundation Phase pattern and prompt templates.
|
|
@@ -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.
|