Skip to content

Commit 61e153b

Browse files
committed
feat(agent-artist): extract artist director as a versioned package
1 parent 4f3aaa6 commit 61e153b

7 files changed

Lines changed: 97 additions & 9 deletions

File tree

‎agents/artist/package.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@corbits/agent-artist",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"license": "SEE LICENSE IN LICENSE.md",
7+
"exports": {
8+
".": {
9+
"types": "./src/index.ts",
10+
"default": "./src/index.ts"
11+
}
12+
}
13+
}
Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,49 @@
1-
import type { DirectorPackage } from "../types.js";
2-
import { BUILD_TOOLS } from "../tool-sets.js";
3-
41
/**
52
* Artist worker: visual asset specialist.
63
* Hand-crafts SVGs, visual diagrams (Mermaid, ASCII art), and structured
74
* generative graphic prompts for image generation models.
5+
*
6+
* Ships as the @corbits/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.
89
*/
9-
export const artistPackage: DirectorPackage = {
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 = {
1047
id: "artist",
1148
primaryIntent:
1249
"Author hand-crafted SVGs, visual diagrams, and generative graphic prompts",
@@ -17,10 +54,6 @@ export const artistPackage: DirectorPackage = {
1754
],
1855
description:
1956
"Visual asset specialist — SVGs, visual diagrams, and generative graphic prompts",
20-
tools: { allow: BUILD_TOOLS },
21-
spawn: { maySpawn: false },
22-
tier: "leaf",
23-
modelRole: "implement",
2457
systemPrompt: `You are ArtistDirector (Artist), a specialist in Corbits Code.
2558
2659
PRIMARY INTENT: create visual assets — clean vector SVGs, technical and architectural diagrams, and structured generative image prompts.
@@ -49,4 +82,8 @@ Workflow:
4982
4. Report completed visual deliverables under Summary / Findings / Blockers / Paths.
5083
5184
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",
5289
};

‎bun.lock‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"tar": "^7.5.1"
8787
},
8888
"dependencies": {
89+
"@corbits/agent-artist": "workspace:*",
8990
"@corbits/codex-provider": "0.1.1",
9091
"@corbits/oauth-core": "0.2.0",
9192
"@corbits/openai-responses": "0.2.1",
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { describe, expect, test } from "bun:test";
2+
3+
import { artistPackage } from "@corbits/agent-artist";
4+
import { PRODUCT_WRITE_TOOLS, READ_TOOLS } from "../tool-sets.js";
5+
import { DIRECTOR_REGISTRY } from "../registry.js";
6+
import type { DirectorPackage } from "../types.js";
7+
8+
describe("artistPackage", () => {
9+
test("workspace package satisfies the director contract and feeds the registry", () => {
10+
const asDirector: DirectorPackage = artistPackage;
11+
expect(asDirector.id).toBe("artist");
12+
expect(DIRECTOR_REGISTRY.artist).toBe(artistPackage);
13+
expect([...artistPackage.tools.allow]).toEqual([
14+
...READ_TOOLS,
15+
...PRODUCT_WRITE_TOOLS,
16+
]);
17+
});
18+
19+
test("extracted copy stays visual-scoped and non-spawning", () => {
20+
expect(artistPackage.tools.allow).toContain("write_file");
21+
expect(artistPackage.tools.allow).toContain("edit_file");
22+
expect(artistPackage.tools.allow).toContain("delete_file");
23+
expect(artistPackage.tools.allow).not.toContain("spawn_agent");
24+
expect(artistPackage.tools.allow).not.toContain("ask_operator");
25+
expect(artistPackage.spawn.maySpawn).toBe(false);
26+
expect(artistPackage.tier).toBe("leaf");
27+
expect(artistPackage.modelRole).toBe("implement");
28+
});
29+
});

‎src/agent/directors/registry.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AgentProfile, CapabilityFilter } from "../profile-types.js";
2-
import { artistPackage } from "./artist/package.js";
2+
import { artistPackage } from "@corbits/agent-artist";
33
import { coderPackage } from "./coder/package.js";
44
import { designerPackage } from "./designer/package.js";
55
import { dispatchPackage } from "./dispatch/package.js";

‎tsconfig.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"composite": false,
66
"baseUrl": ".",
77
"paths": {
8+
"@corbits/agent-artist": ["./agents/artist/src/index.ts"],
89
"@corbits/provider-opencode-go": ["./packages/opencode-go/src/index.ts"],
910
"@corbits/first-class-providers": [
1011
"./packages/first-class-providers/src/index.ts"

0 commit comments

Comments
 (0)