@compilr-dev/sdk 0.17.14 → 0.17.16
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/dist/project-types/configs.js +21 -9
- package/dist/project-types/types.d.ts +13 -0
- package/dist/team/role-aliases.js +4 -2
- package/dist/team/team-agent.d.ts +15 -1
- package/dist/team/team-agent.js +43 -0
- package/dist/team/team.d.ts +12 -0
- package/dist/team/team.js +37 -0
- package/dist/team/tool-config.d.ts +1 -1
- package/dist/team/tool-config.js +24 -0
- package/dist/team/types.d.ts +4 -4
- package/dist/team/types.js +61 -1
- package/package.json +1 -1
|
@@ -50,11 +50,11 @@ export const softwareConfig = {
|
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
52
|
suggestedAgents: [
|
|
53
|
-
{ role: '
|
|
54
|
-
{ role: '
|
|
53
|
+
{ role: 'dev', label: 'Developer', description: 'Writes and debugs code' },
|
|
54
|
+
{ role: 'arch', label: 'Architect', description: 'System design and technical decisions' },
|
|
55
55
|
{ role: 'qa', label: 'QA', description: 'Testing and quality assurance' },
|
|
56
56
|
{ role: 'pm', label: 'PM', description: 'Project planning and coordination' },
|
|
57
|
-
{ role: 'security', label: 'Security', description: 'Security review and hardening' },
|
|
57
|
+
{ role: 'security', label: 'Security Auditor', description: 'Security review and hardening' },
|
|
58
58
|
],
|
|
59
59
|
documentTemplates: [
|
|
60
60
|
{ type: 'prd', label: 'PRD', description: 'Product Requirements Document' },
|
|
@@ -485,13 +485,20 @@ export const contentConfig = {
|
|
|
485
485
|
role: 'strategist',
|
|
486
486
|
label: 'Content Strategist',
|
|
487
487
|
description: 'Planning, ideation, calendar, repurposing',
|
|
488
|
+
systemPromptAddition: 'You own the content STRATEGY — audience, pillars, editorial calendar, channel mix, and repurposing. Turn goals into a publishable plan and brief the copywriter and visual director. Think in campaigns and cadence, not one-off posts.',
|
|
488
489
|
},
|
|
489
490
|
{
|
|
490
491
|
role: 'writer',
|
|
491
492
|
label: 'Copywriter',
|
|
492
493
|
description: 'Headlines, captions, CTAs, long-form copy',
|
|
494
|
+
systemPromptAddition: 'You write the COPY — headlines, hooks, captions, CTAs, and long-form. Match the brand voice, write for the channel, and make every line earn attention. Hand visuals to the Visual Director.',
|
|
495
|
+
},
|
|
496
|
+
// Canonical `visual` role (Visual Director) — carries its own canvas-first prompt.
|
|
497
|
+
{
|
|
498
|
+
role: 'visual',
|
|
499
|
+
label: 'Visual Director',
|
|
500
|
+
description: 'Infographics, carousels, visual briefs',
|
|
493
501
|
},
|
|
494
|
-
{ role: 'designer', label: 'Visual Director', description: 'Visual briefs from Brand Model' },
|
|
495
502
|
{
|
|
496
503
|
role: 'editor',
|
|
497
504
|
label: 'Editor',
|
|
@@ -601,7 +608,7 @@ export const techDocsConfig = {
|
|
|
601
608
|
],
|
|
602
609
|
suggestedAgents: [
|
|
603
610
|
{
|
|
604
|
-
role: '
|
|
611
|
+
role: 'docs',
|
|
605
612
|
label: 'Technical Writer',
|
|
606
613
|
description: 'Clear technical writing and documentation',
|
|
607
614
|
},
|
|
@@ -711,9 +718,10 @@ export const courseConfig = {
|
|
|
711
718
|
description: 'Curriculum design, sequencing, pedagogy',
|
|
712
719
|
},
|
|
713
720
|
{
|
|
714
|
-
role: '
|
|
721
|
+
role: 'writer',
|
|
715
722
|
label: 'Content Designer',
|
|
716
723
|
description: 'Lesson planning, exercises, assessments',
|
|
724
|
+
systemPromptAddition: 'You are the INSTRUCTIONAL DESIGNER — turn learning objectives into lessons, activities, and assessments with clear scaffolding and pacing. Align every piece to an objective.',
|
|
717
725
|
},
|
|
718
726
|
{ role: 'reviewer', label: 'Reviewer', description: 'Pedagogical quality, balance, coverage' },
|
|
719
727
|
],
|
|
@@ -820,21 +828,25 @@ export const bookConfig = {
|
|
|
820
828
|
},
|
|
821
829
|
{ id: 'review', label: 'Review', description: 'Structural review', completionCheck: 'manual' },
|
|
822
830
|
],
|
|
831
|
+
// Three writer-based specialists — distinct prompts, distinct display names.
|
|
823
832
|
suggestedAgents: [
|
|
824
833
|
{
|
|
825
|
-
role: '
|
|
834
|
+
role: 'writer',
|
|
826
835
|
label: 'Plotter',
|
|
827
836
|
description: 'Story architecture, beats, pacing, plot threads',
|
|
837
|
+
systemPromptAddition: 'You own STRUCTURE — premise, arc, beats, pacing, and stakes across the whole book. Keep the throughline coherent and flag sagging middles. You outline; you do not prose scenes.',
|
|
828
838
|
},
|
|
829
839
|
{
|
|
830
|
-
role: '
|
|
840
|
+
role: 'writer',
|
|
831
841
|
label: 'Character Dev',
|
|
832
842
|
description: 'Characters, arcs, relationships, voice',
|
|
843
|
+
systemPromptAddition: 'You own CHARACTER — motivation, voice, arcs, and relationships. Keep each character consistent and growing, and ensure their voices are distinct.',
|
|
833
844
|
},
|
|
834
845
|
{
|
|
835
|
-
role: '
|
|
846
|
+
role: 'writer',
|
|
836
847
|
label: 'Scene Writer',
|
|
837
848
|
description: 'Scene construction, setting, POV, transitions',
|
|
849
|
+
systemPromptAddition: 'You write SCENES — prose that shows, with sensory detail, subtext, and momentum. Enter late, leave early; every scene turns on a change.',
|
|
838
850
|
},
|
|
839
851
|
],
|
|
840
852
|
documentTemplates: [
|
|
@@ -23,11 +23,24 @@ export interface ProjectPhase {
|
|
|
23
23
|
* A suggested agent role for this project type.
|
|
24
24
|
*/
|
|
25
25
|
export interface SuggestedAgent {
|
|
26
|
+
/** BASE canonical role the specialist runs on (dev, writer, strategist, …). */
|
|
26
27
|
role: string;
|
|
28
|
+
/** Display name — becomes the created agent's displayName (not the generic role name). */
|
|
27
29
|
label: string;
|
|
28
30
|
description: string;
|
|
29
31
|
/** Auto-add on project creation? */
|
|
30
32
|
autoAdd?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Specialist prompt appended to the base role's prompt — makes an advertised
|
|
35
|
+
* specialist real (e.g. a "Plotter" on the `writer` role). Optional: when
|
|
36
|
+
* absent, the agent is a plain base-role agent that just carries `label` as
|
|
37
|
+
* its display name. See specialized-team-agents-spec §4.
|
|
38
|
+
*/
|
|
39
|
+
systemPromptAddition?: string;
|
|
40
|
+
/** Optional tool-profile override when the base role's profile lacks a need. */
|
|
41
|
+
toolProfile?: string;
|
|
42
|
+
/** Optional extra skills to enable for this specialist. */
|
|
43
|
+
skills?: string[];
|
|
31
44
|
}
|
|
32
45
|
/**
|
|
33
46
|
* A document template available for this project type.
|
|
@@ -31,8 +31,10 @@ export const ROLE_NAME_ALIASES = {
|
|
|
31
31
|
developer: 'dev',
|
|
32
32
|
architect: 'arch',
|
|
33
33
|
'technical-writer': 'docs',
|
|
34
|
-
|
|
35
|
-
designer: '
|
|
34
|
+
// 'security' is now a canonical role (Security Auditor) — passthrough handles it.
|
|
35
|
+
designer: 'visual',
|
|
36
|
+
'art-director': 'visual',
|
|
37
|
+
'visual-director': 'visual',
|
|
36
38
|
'character-dev': 'writer',
|
|
37
39
|
'content-designer': 'writer',
|
|
38
40
|
plotter: 'writer',
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Optional tool filtering
|
|
9
9
|
*/
|
|
10
10
|
import type { Agent, AgentConfig, ContextManager } from '@compilr-dev/agents';
|
|
11
|
-
import type { TeamAgentConfig, SerializedTeamAgent, MascotExpression, AgentRole } from './types.js';
|
|
11
|
+
import type { TeamAgentConfig, SerializedTeamAgent, MascotExpression, AgentRole, ToolProfile } from './types.js';
|
|
12
12
|
import type { ModelTier } from '../models/index.js';
|
|
13
13
|
import type { ProviderType } from '../config.js';
|
|
14
14
|
import type { SharedContextManager } from './shared-context.js';
|
|
@@ -186,6 +186,20 @@ export declare class TeamAgent {
|
|
|
186
186
|
* @param modelTier - Optional model tier override (defaults to role's default tier)
|
|
187
187
|
*/
|
|
188
188
|
static fromRole(role: AgentRole, id?: string, modelTier?: ModelTier): TeamAgent;
|
|
189
|
+
/**
|
|
190
|
+
* Create a specialized TeamAgent from a BASE role plus overrides — used for the
|
|
191
|
+
* project wizard's "specialist" agents (e.g. a Copywriter on the `writer` role, a
|
|
192
|
+
* Plotter on `writer`). Runs the base role's behavior with an appended specialist
|
|
193
|
+
* prompt and a custom display name (the wizard label), without needing a new
|
|
194
|
+
* first-class AgentRole. See specialized-team-agents-spec §4.
|
|
195
|
+
*/
|
|
196
|
+
static fromSpecialist(baseRole: AgentRole, opts: {
|
|
197
|
+
id?: string;
|
|
198
|
+
displayName?: string;
|
|
199
|
+
systemPromptAddition?: string;
|
|
200
|
+
toolProfile?: ToolProfile;
|
|
201
|
+
modelTier?: ModelTier;
|
|
202
|
+
}): TeamAgent;
|
|
189
203
|
/**
|
|
190
204
|
* Create a TeamAgent from a custom agent definition
|
|
191
205
|
*/
|
package/dist/team/team-agent.js
CHANGED
|
@@ -479,6 +479,49 @@ export class TeamAgent {
|
|
|
479
479
|
modelTier: modelTier ?? metadata.defaultModelTier,
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Create a specialized TeamAgent from a BASE role plus overrides — used for the
|
|
484
|
+
* project wizard's "specialist" agents (e.g. a Copywriter on the `writer` role, a
|
|
485
|
+
* Plotter on `writer`). Runs the base role's behavior with an appended specialist
|
|
486
|
+
* prompt and a custom display name (the wizard label), without needing a new
|
|
487
|
+
* first-class AgentRole. See specialized-team-agents-spec §4.
|
|
488
|
+
*/
|
|
489
|
+
static fromSpecialist(baseRole, opts) {
|
|
490
|
+
const metadata = ROLE_METADATA[baseRole];
|
|
491
|
+
const profile = opts.toolProfile ?? metadata.defaultToolProfile;
|
|
492
|
+
const toolFilter = profile ? getToolsForProfile(profile) : undefined;
|
|
493
|
+
// Base role prompt + the specialist addition (specialization on top of role).
|
|
494
|
+
let systemPromptAddition = metadata.defaultSystemPromptAddition ?? '';
|
|
495
|
+
if (opts.systemPromptAddition?.trim()) {
|
|
496
|
+
systemPromptAddition = systemPromptAddition
|
|
497
|
+
? `${systemPromptAddition}\n\n${opts.systemPromptAddition.trim()}`
|
|
498
|
+
: opts.systemPromptAddition.trim();
|
|
499
|
+
}
|
|
500
|
+
if (profile && profile !== 'full') {
|
|
501
|
+
const toolAwareness = generateToolAwarenessPrompt({ profile });
|
|
502
|
+
systemPromptAddition = systemPromptAddition
|
|
503
|
+
? `${systemPromptAddition}\n\n${toolAwareness}`
|
|
504
|
+
: toolAwareness;
|
|
505
|
+
}
|
|
506
|
+
// Specialists always get collaboration guidance (never the coordinator path).
|
|
507
|
+
const specialistGuidance = generateSpecialistGuidance(baseRole);
|
|
508
|
+
systemPromptAddition = systemPromptAddition
|
|
509
|
+
? `${systemPromptAddition}\n\n${specialistGuidance}`
|
|
510
|
+
: specialistGuidance;
|
|
511
|
+
return new TeamAgent({
|
|
512
|
+
id: opts.id ?? baseRole,
|
|
513
|
+
displayName: opts.displayName ?? metadata.displayName,
|
|
514
|
+
mascot: metadata.mascot,
|
|
515
|
+
role: baseRole,
|
|
516
|
+
description: metadata.description,
|
|
517
|
+
systemPromptAddition: systemPromptAddition || undefined,
|
|
518
|
+
useMinimalSystemPrompt: metadata.useMinimalSystemPrompt,
|
|
519
|
+
noTools: metadata.noTools,
|
|
520
|
+
toolFilter,
|
|
521
|
+
toolProfile: profile,
|
|
522
|
+
modelTier: opts.modelTier ?? metadata.defaultModelTier,
|
|
523
|
+
});
|
|
524
|
+
}
|
|
482
525
|
/**
|
|
483
526
|
* Create a TeamAgent from a custom agent definition
|
|
484
527
|
*/
|
package/dist/team/team.d.ts
CHANGED
|
@@ -173,6 +173,18 @@ export declare class AgentTeam {
|
|
|
173
173
|
* @param modelTier - Optional model tier override (defaults to role's default tier)
|
|
174
174
|
*/
|
|
175
175
|
addAgentFromRole(role: AgentRole, id?: string, modelTier?: ModelTier): Promise<TeamAgent>;
|
|
176
|
+
/**
|
|
177
|
+
* Add a SPECIALIST agent — a base role with a custom display name and an
|
|
178
|
+
* appended specialist prompt (project-wizard specialists, e.g. Copywriter on
|
|
179
|
+
* `writer`, Plotter on `writer`). See specialized-team-agents-spec §4.
|
|
180
|
+
*/
|
|
181
|
+
addSpecialistAgent(baseRole: AgentRole, opts: {
|
|
182
|
+
id?: string;
|
|
183
|
+
displayName?: string;
|
|
184
|
+
systemPromptAddition?: string;
|
|
185
|
+
toolProfile?: import('./tool-config.js').ToolProfile;
|
|
186
|
+
modelTier?: ModelTier;
|
|
187
|
+
}): Promise<TeamAgent>;
|
|
176
188
|
/**
|
|
177
189
|
* Add a custom agent from a CustomAgentDefinition
|
|
178
190
|
*/
|
package/dist/team/team.js
CHANGED
|
@@ -239,6 +239,43 @@ export class AgentTeam {
|
|
|
239
239
|
this.emit({ type: 'agent:added', agentId });
|
|
240
240
|
return teamAgent;
|
|
241
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Add a SPECIALIST agent — a base role with a custom display name and an
|
|
244
|
+
* appended specialist prompt (project-wizard specialists, e.g. Copywriter on
|
|
245
|
+
* `writer`, Plotter on `writer`). See specialized-team-agents-spec §4.
|
|
246
|
+
*/
|
|
247
|
+
async addSpecialistAgent(baseRole, opts) {
|
|
248
|
+
// Default the id to a slug of the display name so same-base-role specialists
|
|
249
|
+
// (three writers: Plotter/Character Dev/Scene Writer) get distinct ids.
|
|
250
|
+
const slug = opts.displayName
|
|
251
|
+
? opts.displayName
|
|
252
|
+
.toLowerCase()
|
|
253
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
254
|
+
.replace(/^-+|-+$/g, '')
|
|
255
|
+
: '';
|
|
256
|
+
let agentId = opts.id ?? (slug || baseRole);
|
|
257
|
+
if (this._sessionRegistry) {
|
|
258
|
+
const globalIds = this._sessionRegistry.getGlobalAgentIds();
|
|
259
|
+
const localIds = Array.from(this.agents.keys());
|
|
260
|
+
const resolved = resolveAgentIdCollision(agentId, localIds, globalIds);
|
|
261
|
+
if (resolved.wasCollision) {
|
|
262
|
+
const originalId = agentId;
|
|
263
|
+
agentId = resolved.id;
|
|
264
|
+
this.emit({ type: 'agent:collision', originalId, agentId: resolved.id });
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (this.agents.has(agentId)) {
|
|
268
|
+
throw new Error(`Agent '${agentId}' already exists in team`);
|
|
269
|
+
}
|
|
270
|
+
const teamAgent = TeamAgent.fromSpecialist(baseRole, { ...opts, id: agentId });
|
|
271
|
+
this.agents.set(agentId, teamAgent);
|
|
272
|
+
await teamAgent.initialize(this.agentFactory, this._sharedContext);
|
|
273
|
+
this._sharedContext.addAgent(agentId);
|
|
274
|
+
this.updateTeamRoster();
|
|
275
|
+
this.updatedAt = new Date();
|
|
276
|
+
this.emit({ type: 'agent:added', agentId });
|
|
277
|
+
return teamAgent;
|
|
278
|
+
}
|
|
242
279
|
/**
|
|
243
280
|
* Add a custom agent from a CustomAgentDefinition
|
|
244
281
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Tool names are defined as string constants below. These cover all tools
|
|
8
8
|
* from @compilr-dev/agents, @compilr-dev/agents-coding, and platform tools.
|
|
9
9
|
*/
|
|
10
|
-
export type ToolProfile = 'full' | 'read-only' | 'developer' | 'security' | 'docs' | 'devops' | 'qa' | 'architect' | 'planner' | 'analyst' | 'custom';
|
|
10
|
+
export type ToolProfile = 'full' | 'read-only' | 'developer' | 'security' | 'docs' | 'devops' | 'qa' | 'architect' | 'planner' | 'analyst' | 'designer' | 'custom';
|
|
11
11
|
export interface ToolConfig {
|
|
12
12
|
/** Tool profile (predefined set) */
|
|
13
13
|
profile: ToolProfile;
|
package/dist/team/tool-config.js
CHANGED
|
@@ -670,6 +670,25 @@ export const TOOL_PROFILES = {
|
|
|
670
670
|
'web',
|
|
671
671
|
'factory_models',
|
|
672
672
|
],
|
|
673
|
+
// Designer - visual canvas authoring (canvas/artifacts/documents), reads code
|
|
674
|
+
// but does not edit source files.
|
|
675
|
+
designer: [
|
|
676
|
+
'file_read',
|
|
677
|
+
'interaction',
|
|
678
|
+
'handoff',
|
|
679
|
+
'consult',
|
|
680
|
+
'guide',
|
|
681
|
+
'subagents',
|
|
682
|
+
'meta',
|
|
683
|
+
'project',
|
|
684
|
+
'search',
|
|
685
|
+
'documents',
|
|
686
|
+
'canvas',
|
|
687
|
+
'artifacts',
|
|
688
|
+
'anchors',
|
|
689
|
+
'web',
|
|
690
|
+
'factory_models',
|
|
691
|
+
],
|
|
673
692
|
// Custom - user selected (groups specified in customGroups)
|
|
674
693
|
custom: [],
|
|
675
694
|
};
|
|
@@ -724,6 +743,11 @@ export const PROFILE_INFO = {
|
|
|
724
743
|
description: 'Requirements gathering - user stories, documents, business analysis',
|
|
725
744
|
isReadOnly: true,
|
|
726
745
|
},
|
|
746
|
+
designer: {
|
|
747
|
+
label: 'Visual Designer',
|
|
748
|
+
description: 'Create visual canvases, infographics, and decks - reads code, no source edits',
|
|
749
|
+
isReadOnly: true,
|
|
750
|
+
},
|
|
727
751
|
custom: {
|
|
728
752
|
label: 'Custom',
|
|
729
753
|
description: 'Select tool groups manually',
|
package/dist/team/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { AgentConfig, AgentState } from '@compilr-dev/agents';
|
|
7
7
|
import type { ModelTier } from '../models/index.js';
|
|
8
|
-
export type ToolProfile = 'full' | 'read-only' | 'developer' | 'security' | 'docs' | 'devops' | 'qa' | 'architect' | 'planner' | 'analyst' | 'custom';
|
|
8
|
+
export type ToolProfile = 'full' | 'read-only' | 'developer' | 'security' | 'docs' | 'devops' | 'qa' | 'architect' | 'planner' | 'analyst' | 'designer' | 'custom';
|
|
9
9
|
/**
|
|
10
10
|
* Information about a background agent session.
|
|
11
11
|
* Used by /bg overlay to display status.
|
|
@@ -29,11 +29,11 @@ export interface BackgroundSessionInfo {
|
|
|
29
29
|
/**
|
|
30
30
|
* Mascot expressions for visual differentiation of agents
|
|
31
31
|
*/
|
|
32
|
-
export type MascotExpression = '[•_•]' | '[◈_◈]' | '[▣_▣]' | '[◉_◉]' | '[▲_▲]' | '[◆_◆]' | '[○_○]' | '[◇_◇]' | '[◎_◎]' | '[⊘_⊘]' | '[✎_✎]' | '[◒_◒]' | '[◔_◔]' | '[◓_◓]' | '[◕_◕]' | '[□_□]';
|
|
32
|
+
export type MascotExpression = '[•_•]' | '[◈_◈]' | '[▣_▣]' | '[◉_◉]' | '[▲_▲]' | '[◆_◆]' | '[○_○]' | '[◇_◇]' | '[◎_◎]' | '[⊘_⊘]' | '[✎_✎]' | '[◒_◒]' | '[◔_◔]' | '[◓_◓]' | '[◕_◕]' | '[◐_◐]' | '[⊗_⊗]' | '[□_□]';
|
|
33
33
|
/**
|
|
34
34
|
* Predefined agent roles with default configurations
|
|
35
35
|
*/
|
|
36
|
-
export type AgentRole = 'default' | 'pm' | 'arch' | 'qa' | 'dev' | 'ops' | 'docs' | 'ba' | 'researcher' | 'reviewer' | 'editor' | 'writer' | 'analyst' | 'strategist' | 'instructor' | 'custom';
|
|
36
|
+
export type AgentRole = 'default' | 'pm' | 'arch' | 'qa' | 'dev' | 'ops' | 'docs' | 'ba' | 'researcher' | 'reviewer' | 'editor' | 'writer' | 'analyst' | 'strategist' | 'instructor' | 'visual' | 'security' | 'custom';
|
|
37
37
|
/**
|
|
38
38
|
* Role groups for UI display (Workshop, team overlay).
|
|
39
39
|
* Groups roles by domain — used for visual categorization.
|
|
@@ -42,7 +42,7 @@ export declare const ROLE_GROUPS: Record<string, AgentRole[]>;
|
|
|
42
42
|
/**
|
|
43
43
|
* List of predefined role IDs (for validation against custom agent IDs)
|
|
44
44
|
*/
|
|
45
|
-
export declare const PREDEFINED_ROLE_IDS: readonly ["default", "pm", "arch", "qa", "dev", "ops", "docs", "ba", "researcher", "reviewer", "editor", "writer", "analyst", "strategist", "instructor"];
|
|
45
|
+
export declare const PREDEFINED_ROLE_IDS: readonly ["default", "pm", "arch", "qa", "dev", "ops", "docs", "ba", "researcher", "reviewer", "editor", "writer", "analyst", "strategist", "instructor", "visual", "security"];
|
|
46
46
|
/**
|
|
47
47
|
* Role metadata for predefined roles
|
|
48
48
|
*/
|
package/dist/team/types.js
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* Groups roles by domain — used for visual categorization.
|
|
9
9
|
*/
|
|
10
10
|
export const ROLE_GROUPS = {
|
|
11
|
-
Software: ['dev', 'arch', 'qa', 'pm', 'ops'],
|
|
11
|
+
Software: ['dev', 'arch', 'qa', 'pm', 'ops', 'security'],
|
|
12
12
|
'Writing & Analysis': ['writer', 'editor', 'reviewer', 'researcher', 'analyst', 'docs', 'ba'],
|
|
13
|
+
Design: ['visual'],
|
|
13
14
|
'Business & Education': ['strategist', 'instructor'],
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
@@ -31,6 +32,8 @@ export const PREDEFINED_ROLE_IDS = [
|
|
|
31
32
|
'analyst',
|
|
32
33
|
'strategist',
|
|
33
34
|
'instructor',
|
|
35
|
+
'visual',
|
|
36
|
+
'security',
|
|
34
37
|
];
|
|
35
38
|
/**
|
|
36
39
|
* Role expertise keywords for team awareness
|
|
@@ -70,6 +73,8 @@ export const ROLE_EXPERTISE = {
|
|
|
70
73
|
analyst: ['market research', 'data analysis', 'competitive intelligence', 'trends'],
|
|
71
74
|
strategist: ['business strategy', 'vision', 'go-to-market', 'planning'],
|
|
72
75
|
instructor: ['curriculum design', 'lesson planning', 'assessment', 'pedagogy'],
|
|
76
|
+
visual: ['infographics', 'carousels', 'boards', 'data-viz', 'visual hierarchy'],
|
|
77
|
+
security: ['security review', 'OWASP', 'vulnerabilities', 'dependency risk', 'threat modeling'],
|
|
73
78
|
custom: [], // User-defined
|
|
74
79
|
};
|
|
75
80
|
/**
|
|
@@ -901,6 +906,51 @@ You are the **Instructor** in this multi-agent team. You specialize in education
|
|
|
901
906
|
defaultToolProfile: 'docs', // Read + write educational content
|
|
902
907
|
defaultModelTier: 'balanced',
|
|
903
908
|
},
|
|
909
|
+
visual: {
|
|
910
|
+
displayName: 'Visual Director',
|
|
911
|
+
mascot: '[◐_◐]',
|
|
912
|
+
description: 'Visual canvases — infographics, carousels, boards',
|
|
913
|
+
defaultToolProfile: 'designer',
|
|
914
|
+
defaultModelTier: 'balanced',
|
|
915
|
+
defaultSystemPromptAddition: `# ROLE: VISUAL DIRECTOR
|
|
916
|
+
|
|
917
|
+
You are the **Visual Director**. Your PRIMARY deliverable is a **visual canvas**, not prose.
|
|
918
|
+
|
|
919
|
+
## How you work
|
|
920
|
+
- When a request can be answered visually — a stat, a comparison, a process, an announcement, a summary, a pitch, a layout — you produce a CANVAS, not a text reply.
|
|
921
|
+
- Pick the type deliberately: **infographic** (one composition), **carousel** (a sequence / deck), **board** (spatial mind-map / UI sketch). Then follow the matching craft skill (infographic / carousel / board) for the design rules.
|
|
922
|
+
- Author with \`canvas_write\` / \`canvas_edit\` incrementally (small calls). Theme with \`var(--canvas-*)\`; set an explicit \`var(--canvas-bg)\` (except boards — keep those transparent); add 2–4 bound Tweaks.
|
|
923
|
+
- You MAY add a one-line framing note, but the ARTIFACT is the canvas.
|
|
924
|
+
|
|
925
|
+
## Collaboration
|
|
926
|
+
- Take copy, data, and structure from the writer / strategist / researcher and turn it into visuals. You are the team's eyes: turn text into something worth looking at.
|
|
927
|
+
|
|
928
|
+
## Guardrail
|
|
929
|
+
- Canvas is your DEFAULT, not your cage. If the user explicitly asks for text, a document, or prose, honor that — don't force a canvas where words are wanted.`,
|
|
930
|
+
},
|
|
931
|
+
security: {
|
|
932
|
+
displayName: 'Security Auditor',
|
|
933
|
+
mascot: '[⊗_⊗]',
|
|
934
|
+
description: 'Security review — vulnerabilities, dependencies, unsafe patterns',
|
|
935
|
+
defaultToolProfile: 'security',
|
|
936
|
+
defaultModelTier: 'balanced',
|
|
937
|
+
defaultSystemPromptAddition: `# ROLE: SECURITY AUDITOR
|
|
938
|
+
|
|
939
|
+
You are the **Security Auditor**. You review code, config, and dependencies for vulnerabilities and unsafe patterns — you do NOT ship features or edit code.
|
|
940
|
+
|
|
941
|
+
## Focus
|
|
942
|
+
- OWASP Top 10: injection, broken authn/authz, secrets in code, SSRF, path traversal, unsafe deserialization, insecure defaults.
|
|
943
|
+
- Dependencies: known-vuln packages, supply-chain risk, over-broad permissions.
|
|
944
|
+
- Input validation, output encoding, least privilege, safe defaults.
|
|
945
|
+
|
|
946
|
+
## How you work
|
|
947
|
+
- READ code / config / dependencies (you have read + search + dependency tools; you have NO edit tools — that is intentional).
|
|
948
|
+
- Use the \`security-review\` / \`code-review\` skills for structured passes.
|
|
949
|
+
- Report findings with **SEVERITY**, \`file:line\`, and a concrete fix. Rank by exploitability × impact; surface the top risks first. Hand off remediation to the developer.
|
|
950
|
+
|
|
951
|
+
## Boundary
|
|
952
|
+
- Advisory only — you flag and recommend; you do not apply the fix.`,
|
|
953
|
+
},
|
|
904
954
|
custom: {
|
|
905
955
|
displayName: 'Custom Agent',
|
|
906
956
|
mascot: '[□_□]',
|
|
@@ -986,4 +1036,14 @@ export const ROLE_COPY = {
|
|
|
986
1036
|
bestFor: "you're teaching something and need it structured for learners.",
|
|
987
1037
|
pairsWith: ['reviewer', 'writer'],
|
|
988
1038
|
},
|
|
1039
|
+
visual: {
|
|
1040
|
+
tagline: 'Turns ideas and copy into visual canvases — infographics, decks, boards.',
|
|
1041
|
+
bestFor: 'you want something SHOWN, not written — a one-pager, a carousel, a mind-map.',
|
|
1042
|
+
pairsWith: ['writer', 'strategist'],
|
|
1043
|
+
},
|
|
1044
|
+
security: {
|
|
1045
|
+
tagline: 'Audits code and dependencies for vulnerabilities — advisory, no edits.',
|
|
1046
|
+
bestFor: 'you want a security pass — OWASP risks, dependency vulns, unsafe patterns.',
|
|
1047
|
+
pairsWith: ['dev', 'arch'],
|
|
1048
|
+
},
|
|
989
1049
|
};
|