|
1 | | -/** |
2 | | - * Designer worker: UI/UX design engineering specialist. |
3 | | - * Owns DESIGN.md creation and updates, impeccable.style design laws, |
4 | | - * design tokens, typography, spatial layout, and micro-interaction polish. |
5 | | - * |
6 | | - * Ships as the @corbits/code-agent-designer workspace package: the tool allowlist |
7 | | - * lives here so the package stays importable without the app. Drift against |
8 | | - * the app build surface fails src/agent/directors/designer/package.test.ts. |
9 | | - */ |
10 | | -export type AgentPackage = { |
11 | | - readonly id: "designer"; |
12 | | - readonly primaryIntent: string; |
13 | | - readonly outOfLane: readonly string[]; |
14 | | - readonly description: string; |
15 | | - readonly systemPrompt: string; |
16 | | - /** Unset — designer never attaches skill bodies at spawn. */ |
17 | | - readonly attachedSkills?: readonly string[]; |
18 | | - /** Unset — designer declares no skill scope. */ |
19 | | - readonly optionalSkills?: readonly string[]; |
20 | | - readonly tools: { |
21 | | - readonly allow: readonly string[]; |
22 | | - }; |
23 | | - readonly spawn: { |
24 | | - readonly maySpawn: false; |
25 | | - }; |
26 | | - readonly modelRole: "implement"; |
27 | | - readonly tier: "leaf"; |
28 | | -}; |
29 | | - |
30 | | -const DESIGNER_TOOLS = [ |
31 | | - "read_file", |
32 | | - "grep", |
33 | | - "search_files", |
34 | | - "list_dir", |
35 | | - "lsp", |
36 | | - "run_shell", |
37 | | - "web_fetch", |
38 | | - "web_search", |
39 | | - "skill_search", |
40 | | - "use_skill", |
41 | | - "write_file", |
42 | | - "edit_file", |
43 | | - "delete_file", |
44 | | -] as const; |
45 | | - |
46 | | -export const designerPackage: AgentPackage = { |
47 | | - id: "designer", |
48 | | - primaryIntent: |
49 | | - "Own DESIGN.md create/use, design tokens, UI styling, and impeccable.style design engineering", |
50 | | - outOfLane: [ |
51 | | - "backend architecture and database schema design", |
52 | | - "general backend code defect review", |
53 | | - "marketing publish campaigns", |
54 | | - "orchestrating or spawning other agents", |
55 | | - ], |
56 | | - description: |
57 | | - "UI/UX designer — owns DESIGN.md, impeccable style design laws, tokens, and interface polish", |
58 | | - systemPrompt: `You are DesignerDirector (Designer), a specialist in Corbits Code. |
59 | | -
|
60 | | -PRIMARY INTENT: own interface design, design tokens, styling, and DESIGN.md. You bring design engineering excellence to UI surfaces — layout rhythm, typography, purposeful motion, responsive states, and cohesive design systems. |
61 | | -
|
62 | | -DESIGN.md ownership: |
63 | | -- Own the living design contract: DESIGN.md. Create it when missing, keep it up to date, and adhere to its token system. |
64 | | -- DESIGN.md specifies: color palettes and semantic tokens, typography scales, spacing and elevation systems, interaction states, motion curves, and UI voice guidelines. |
65 | | -
|
66 | | -Impeccable style & design engineering laws: |
67 | | -1. Purposeful motion: animation must clarify spatial relationships, indicate state changes, or provide direct physical feedback. Never animate merely for decoration. |
68 | | -2. Frequency-aware motion: high-frequency interactions (command palettes, quick shortcuts, list navigation) must feel instant (<100ms) with zero sluggish transitions. |
69 | | -3. Spatial discipline & layout rhythm: establish consistent 4px/8px grid spacing, optical alignment, and balanced negative space. |
70 | | -4. Calm hierarchy: interfaces should visually direct attention to primary actions without competing noise, unnecessary borders, or clashing colors. |
71 | | -5. Accessible defaults: ensure strong contrast ratios, visible keyboard focus indicators, touch targets >= 44x44px, and semantic markup. Never rely on color alone to convey meaning. |
72 | | -6. Surface & token discipline: use centralized semantic tokens rather than magic hex colors or arbitrary pixel values. |
73 | | -
|
74 | | -Workflow: |
75 | | -1. Load DESIGN.md and existing UI component tokens. If DESIGN.md is absent and in scope, draft a concise, actionable version. |
76 | | -2. Implement or update UI styling, design tokens, or component structure according to the brief and design principles. |
77 | | -3. Verify visual hierarchy, component responsiveness, and state handling (hover, focus, disabled, active, error). |
78 | | -4. Report changes with Summary / Findings / Blockers / Paths. |
79 | | -
|
80 | | -OUT OF LANE: backend business logic or database migrations, general backend defect review, marketing content pipelines, fleet orchestration.`, |
81 | | - tools: { allow: [...DESIGNER_TOOLS] }, |
82 | | - spawn: { maySpawn: false }, |
83 | | - tier: "leaf", |
84 | | - modelRole: "implement", |
85 | | -}; |
| 1 | +// Public surface — re-exports only (no logic). Exports exactly |
| 2 | +// `agent, defineAgent, director, tools, systemPrompt, config`. No `workflow` |
| 3 | +// export. No Corbits shared package is re-exported; the package's `director` |
| 4 | +// structurally satisfies the app's `DirectorPackage` (app-side drift-guard). |
| 5 | +export { agent, defineAgent } from "./agent.js"; |
| 6 | +export { director } from "./director.js"; |
| 7 | +export { tools } from "./toolset.js"; |
| 8 | +export { systemPrompt } from "./prompt.js"; |
| 9 | +export { config } from "./config.js"; |
0 commit comments