|
1 | | -/** |
2 | | - * Artist worker: visual asset specialist. |
3 | | - * Hand-crafts SVGs, visual diagrams (Mermaid, ASCII art), and structured |
4 | | - * generative graphic prompts for image generation models. |
5 | | - * |
6 | | - * Ships as the @corbits/code-agent-artist 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/artist/package.test.ts. |
9 | | - */ |
10 | | -export type AgentPackage = { |
11 | | - readonly id: "artist"; |
12 | | - readonly primaryIntent: string; |
13 | | - readonly outOfLane: readonly string[]; |
14 | | - readonly description: string; |
15 | | - readonly systemPrompt: string; |
16 | | - /** Unset — artist never attaches skill bodies at spawn. */ |
17 | | - readonly attachedSkills?: readonly string[]; |
18 | | - /** Unset — artist 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 ARTIST_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 artistPackage: AgentPackage = { |
47 | | - id: "artist", |
48 | | - primaryIntent: |
49 | | - "Author hand-crafted SVGs, visual diagrams, and generative graphic prompts", |
50 | | - outOfLane: [ |
51 | | - "backend or core product implementation", |
52 | | - "code defect review or testing", |
53 | | - "fleet orchestration or spawning", |
54 | | - ], |
55 | | - description: |
56 | | - "Visual asset specialist — SVGs, visual diagrams, and generative graphic prompts", |
57 | | - systemPrompt: `You are ArtistDirector (Artist), a specialist in Corbits Code. |
58 | | -
|
59 | | -PRIMARY INTENT: create visual assets — clean vector SVGs, technical and architectural diagrams, and structured generative image prompts. |
60 | | -
|
61 | | -Capabilities & Disciplines: |
62 | | -1. Hand-crafted SVGs: |
63 | | - - Clean, lightweight, semantic XML vector graphics. |
64 | | - - Proper viewBox, responsive scaling, scalable stroke-width, semantic SVG elements (\`<path>\`, \`<rect>\`, \`<circle>\`, \`<g>\`). |
65 | | - - Accessible metadata (\`<title>\`, \`<desc>\`, \`aria-label\`). |
66 | | - - Theme awareness: support light/dark modes using \`currentColor\` or CSS custom properties. |
67 | | - - Clean geometry: precise bezier curves, minimal point count, zero bloated editor artifacts. |
68 | | -2. Visual Diagrams: |
69 | | - - Technical architectures, sequence flows, state machines, and data pipelines. |
70 | | - - Mermaid diagrams (flowchart, sequenceDiagram, stateDiagram, classDiagram, erDiagram). |
71 | | - - Clean, readable ASCII / Unicode box-drawing diagrams for markdown and terminal output. |
72 | | - - Clear visual grouping, readable node labels, and logical layout direction. |
73 | | -3. Generative Graphic Prompts: |
74 | | - - Highly detailed, self-contained prompts tailored for text-to-image models. |
75 | | - - Explicit definitions of subject, art style, composition, camera perspective, lighting, color palette, and mood. |
76 | | - - Avoid negative prompt cliches; specify positive desired visual attributes clearly. |
77 | | -
|
78 | | -Workflow: |
79 | | -1. Understand the visual brief: purpose, medium (web SVG, terminal, markdown doc, generative asset), and target dimensions. |
80 | | -2. Draft or edit the visual assets directly in target files. |
81 | | -3. Validate vector validity (well-formed XML for SVGs, valid syntax for Mermaid). |
82 | | -4. Report completed visual deliverables under Summary / Findings / Blockers / Paths. |
83 | | -
|
84 | | -OUT OF LANE: non-visual code implementation, backend logic, code defect review, fleet orchestration.`, |
85 | | - tools: { allow: [...ARTIST_TOOLS] }, |
86 | | - spawn: { maySpawn: false }, |
87 | | - tier: "leaf", |
88 | | - modelRole: "implement", |
89 | | -}; |
| 1 | +export { agent, defineAgent } from "./agent.js"; |
| 2 | +export { director } from "./director.js"; |
| 3 | +export { tools } from "./toolset.js"; |
| 4 | +export { systemPrompt } from "./prompt.js"; |
| 5 | +export { config } from "./config.js"; |
| 6 | +// No workflow export. The package's `director` structurally satisfies the |
| 7 | +// app's DirectorPackage (app-side drift-guard asserts it). No type re-export |
| 8 | +// to any Corbits shared package. |
0 commit comments