Skip to content

Commit ee6afd0

Browse files
committed
style(agent-designer): strip redundant commentary from extracted package
1 parent e5623c9 commit ee6afd0

7 files changed

Lines changed: 21 additions & 43 deletions

File tree

‎agents/designer/README.md‎

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
## What this is
44

5-
A ready-to-go Corbits agent for the **designer** role (`@corbits/code-agent-designer`)
6-
plus its named component parts so a consumer can recreate or remix it. Designer is
7-
the UI/UX design engineering specialist: it owns DESIGN.md creation and updates,
8-
impeccable.style design laws, design tokens, typography, spatial layout, and
9-
micro-interaction polish.
5+
Ready `@corbits/code-agent-designer` agent + independently importable components:
6+
`agent`, `defineAgent`, `director`, `tools`, `systemPrompt`, `config`.
107

118
## Consume (runLocal)
129

@@ -17,32 +14,22 @@ const run = runLocal(defining(agent), env);
1714

1815
## Consume (deploy runWorkflow / hub / sidecar)
1916

20-
Hand the same `AgentDefinition` (`agent`) to a workflow, hub, or sidecar. The
21-
package never exports a workflow itself — a workflow _consumes_ `agent`.
17+
Hand the same `AgentDefinition` to a workflow — the package never exports a
18+
workflow itself.
2219

2320
## Remix components
2421

2522
```ts
26-
import {
27-
director,
28-
tools,
29-
systemPrompt,
30-
config,
31-
defineAgent,
32-
} from "@corbits/code-agent-designer";
33-
34-
// Swap components at the consumer side.
35-
defineAgent({ director, tools, systemPrompt, config }); // or spread overrides
23+
import { director, tools, systemPrompt, config } from "@corbits/code-agent-designer";
24+
defineAgent({ director, ... }); // or swap tools / systemPrompt / config
3625
```
3726

38-
Each of `agent`, `defineAgent`, `director`, `tools`, `systemPrompt`, `config` is a
39-
named, independently importable part.
27+
Each of `director`, `tools`, `systemPrompt`, and `config` is a named,
28+
independently importable part.
4029

41-
## Byte-stability & single authority
30+
## Single authority
4231

43-
- `systemPrompt.build()` is pure and byte-stable — identical string every call.
44-
- `tools` is content-equal to the app's `REVIEW_TOOLS` surface constant
45-
(`src/agent/directors/tool-sets.ts`); the in-tree drift-guard
46-
(`src/agent/directors/designer/package.test.ts`) enforces they match.
47-
- This package is the single prompt authority for designer; the in-tree
48-
`src/agent/directors/designer/package.ts` is deleted.
32+
`prompt.ts` `systemPrompt.build()` is byte-stable (the raw card, no formatting).
33+
`toolset.ts` `tools` literal equals the `REVIEW_TOOLS` surface constant in
34+
`src/agent/directors/tool-sets.ts`; drift is enforced by the in-tree drift-guard
35+
`src/agent/directors/designer/package.test.ts`.

‎agents/designer/src/agent.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
defineAgent as coreDefineAgent,
33
type AgentDefinition,
44
} from "@intx/agent";
5-
65
import { systemPrompt } from "./prompt.js";
76

87
export const agent: AgentDefinition = defineAgent();
@@ -11,7 +10,7 @@ export function defineAgent(): AgentDefinition {
1110
return coreDefineAgent({
1211
id: "designer",
1312
systemPrompt: systemPrompt.build(),
14-
tools: [],
13+
tools: [], // tool mounting is consumer/app-side; surface enforced by drift-guard
1514
capabilities: [],
1615
inference: { sources: [] },
1716
tags: { fleet: "0.3.36", lane: "designer" },

‎agents/designer/src/config.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
// Designer is a leaf worker: maySpawn false, no allowlist. modelRole is
2-
// "implement" (matches the in-tree card).
31
export const config = {
4-
spawn: {
5-
maySpawn: false,
6-
},
2+
spawn: { maySpawn: false },
73
tier: "leaf",
84
modelRole: "implement",
95
} as const satisfies {
10-
spawn: { maySpawn: boolean; allowlist?: readonly string[] };
6+
spawn: { maySpawn: boolean };
117
tier: string;
128
modelRole: string;
139
};

‎agents/designer/src/director.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export const director = {
1515
description:
1616
"UI/UX designer — owns DESIGN.md, impeccable style design laws, tokens, and interface polish",
1717
systemPrompt: systemPrompt.build(),
18-
tools: { allow: tools },
18+
tools: { allow: [...tools] },
1919
spawn: config.spawn,
20-
modelRole: config.modelRole,
2120
tier: config.tier,
21+
modelRole: config.modelRole,
2222
} as const;

‎agents/designer/src/prompt.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Designer card — the single prompt authority. `build()` is byte-stable.
1+
// Designer card. Byte-stable build, single prompt authority.
22
const CARD = `You are DesignerDirector (Designer), a specialist in Corbits Code.
33
44
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.
@@ -25,7 +25,6 @@ OUT OF LANE: backend business logic or database migrations, general backend defe
2525

2626
export const theme = "designer";
2727

28-
// Byte-stable (see prompt authority test).
2928
export const systemPrompt = {
3029
theme,
3130
build: (): string => CARD,

‎agents/designer/src/toolset.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// BUILD_TOOLS literal (= REVIEW_TOOLS); drift-guarded against REVIEW_TOOLS in
2-
// src/agent/directors/tool-sets.ts.
1+
// BUILD_TOOLS literal (= REVIEW_TOOLS); drift-guarded against REVIEW_TOOLS
2+
// by src/agent/directors/designer/package.test.ts.
33
const BUILD_TOOLS = [
44
"read_file",
55
"grep",

‎src/agent/directors/designer/package.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ describe("designerPackage", () => {
1515
const asDirector: DirectorPackage = director;
1616
expect(asDirector.id).toBe("designer");
1717
expect(DIRECTOR_REGISTRY.designer).toBe(director);
18-
// In-tree card used BUILD_TOOLS; BUILD_TOOLS === REVIEW_TOOLS content, so
19-
// the drift-guard asserts against REVIEW_TOOLS (the brief's surface rule).
2018
expect([...director.tools.allow]).toEqual([...REVIEW_TOOLS]);
2119
expect(new Set(director.tools.allow).size).toBe(
2220
director.tools.allow.length,
@@ -29,7 +27,6 @@ describe("designerPackage", () => {
2927
expect(director.modelRole).toBe(config.modelRole);
3028
expect(director.spawn.maySpawn).toBe(false);
3129
expect(director.tier).toBe("leaf");
32-
// modelRole preserved from the in-tree card (implement, not §5 docs).
3330
expect(director.modelRole).toBe("implement");
3431
});
3532

0 commit comments

Comments
 (0)