@soleri/cli 1.9.0 → 1.10.0
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/README.md +4 -0
- package/dist/commands/agent.d.ts +8 -0
- package/dist/commands/agent.js +150 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/create.js +30 -4
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/install-knowledge.js +65 -3
- package/dist/commands/install-knowledge.js.map +1 -1
- package/dist/commands/install.d.ts +2 -0
- package/dist/commands/install.js +80 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/pack.d.ts +10 -0
- package/dist/commands/pack.js +512 -0
- package/dist/commands/pack.js.map +1 -0
- package/dist/commands/skills.d.ts +8 -0
- package/dist/commands/skills.js +167 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.js +74 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/hook-packs/installer.d.ts +0 -7
- package/dist/hook-packs/installer.js +1 -14
- package/dist/hook-packs/installer.js.map +1 -1
- package/dist/hook-packs/installer.ts +1 -18
- package/dist/hook-packs/registry.d.ts +2 -1
- package/dist/hook-packs/registry.ts +1 -1
- package/dist/main.js +40 -1
- package/dist/main.js.map +1 -1
- package/dist/prompts/archetypes.d.ts +1 -0
- package/dist/prompts/archetypes.js +177 -62
- package/dist/prompts/archetypes.js.map +1 -1
- package/dist/prompts/create-wizard.js +98 -49
- package/dist/prompts/create-wizard.js.map +1 -1
- package/dist/prompts/playbook.d.ts +8 -7
- package/dist/prompts/playbook.js +201 -15
- package/dist/prompts/playbook.js.map +1 -1
- package/dist/utils/checks.d.ts +0 -1
- package/dist/utils/checks.js +1 -1
- package/dist/utils/checks.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/archetypes.test.ts +84 -0
- package/src/__tests__/doctor.test.ts +2 -2
- package/src/__tests__/wizard-e2e.mjs +508 -0
- package/src/commands/agent.ts +181 -0
- package/src/commands/create.ts +146 -104
- package/src/commands/install-knowledge.ts +75 -4
- package/src/commands/install.ts +101 -0
- package/src/commands/pack.ts +585 -0
- package/src/commands/skills.ts +191 -0
- package/src/commands/uninstall.ts +93 -0
- package/src/hook-packs/installer.ts +1 -18
- package/src/hook-packs/registry.ts +1 -1
- package/src/main.ts +42 -1
- package/src/prompts/archetypes.ts +193 -62
- package/src/prompts/create-wizard.ts +114 -58
- package/src/prompts/playbook.ts +207 -21
- package/src/utils/checks.ts +1 -1
- package/code-reviewer/.claude/hookify.focus-ring-required.local.md +0 -21
- package/code-reviewer/.claude/hookify.no-ai-attribution.local.md +0 -18
- package/code-reviewer/.claude/hookify.no-any-types.local.md +0 -18
- package/code-reviewer/.claude/hookify.no-console-log.local.md +0 -21
- package/code-reviewer/.claude/hookify.no-important.local.md +0 -18
- package/code-reviewer/.claude/hookify.no-inline-styles.local.md +0 -21
- package/code-reviewer/.claude/hookify.semantic-html.local.md +0 -18
- package/code-reviewer/.claude/hookify.ux-touch-targets.local.md +0 -18
- package/code-reviewer/.mcp.json +0 -11
- package/code-reviewer/README.md +0 -346
- package/code-reviewer/package-lock.json +0 -4484
- package/code-reviewer/package.json +0 -45
- package/code-reviewer/scripts/copy-assets.js +0 -15
- package/code-reviewer/scripts/setup.sh +0 -130
- package/code-reviewer/skills/brainstorming/SKILL.md +0 -170
- package/code-reviewer/skills/code-patrol/SKILL.md +0 -176
- package/code-reviewer/skills/context-resume/SKILL.md +0 -143
- package/code-reviewer/skills/executing-plans/SKILL.md +0 -201
- package/code-reviewer/skills/fix-and-learn/SKILL.md +0 -164
- package/code-reviewer/skills/health-check/SKILL.md +0 -225
- package/code-reviewer/skills/second-opinion/SKILL.md +0 -142
- package/code-reviewer/skills/systematic-debugging/SKILL.md +0 -230
- package/code-reviewer/skills/verification-before-completion/SKILL.md +0 -170
- package/code-reviewer/skills/writing-plans/SKILL.md +0 -207
- package/code-reviewer/src/__tests__/facades.test.ts +0 -598
- package/code-reviewer/src/activation/activate.ts +0 -125
- package/code-reviewer/src/activation/claude-md-content.ts +0 -217
- package/code-reviewer/src/activation/inject-claude-md.ts +0 -113
- package/code-reviewer/src/extensions/index.ts +0 -47
- package/code-reviewer/src/extensions/ops/example.ts +0 -28
- package/code-reviewer/src/identity/persona.ts +0 -62
- package/code-reviewer/src/index.ts +0 -278
- package/code-reviewer/src/intelligence/data/architecture.json +0 -5
- package/code-reviewer/src/intelligence/data/code-review.json +0 -5
- package/code-reviewer/tsconfig.json +0 -30
- package/code-reviewer/vitest.config.ts +0 -23
|
@@ -9,23 +9,19 @@ export const ARCHETYPES = [
|
|
|
9
9
|
value: 'code-reviewer',
|
|
10
10
|
label: 'Code Reviewer',
|
|
11
11
|
hint: 'Catches bugs, enforces patterns, reviews PRs before merge',
|
|
12
|
+
tier: 'free',
|
|
12
13
|
defaults: {
|
|
13
14
|
role: 'Catches bugs, enforces code patterns, and reviews pull requests before merge',
|
|
14
15
|
description: 'This agent reviews code for quality issues, anti-patterns, naming conventions, test coverage gaps, and architectural violations. It provides actionable feedback with concrete fix suggestions.',
|
|
15
16
|
domains: ['code-review', 'architecture'],
|
|
16
17
|
principles: [
|
|
17
18
|
'Actionable feedback only',
|
|
19
|
+
'Readable over clever',
|
|
20
|
+
'Small PR scope',
|
|
18
21
|
'Respect existing patterns',
|
|
19
|
-
'Simplicity over cleverness',
|
|
20
|
-
],
|
|
21
|
-
skills: [
|
|
22
|
-
'writing-plans',
|
|
23
|
-
'executing-plans',
|
|
24
|
-
'code-patrol',
|
|
25
|
-
'fix-and-learn',
|
|
26
|
-
'second-opinion',
|
|
27
22
|
],
|
|
28
|
-
|
|
23
|
+
skills: ['code-patrol', 'fix-and-learn', 'second-opinion'],
|
|
24
|
+
tone: 'mentor',
|
|
29
25
|
greetingTemplate: (name) => `Hello! I'm ${name}. Drop a PR link or paste code — I'll review it for bugs, patterns, and quality.`,
|
|
30
26
|
},
|
|
31
27
|
},
|
|
@@ -33,6 +29,7 @@ export const ARCHETYPES = [
|
|
|
33
29
|
value: 'security-auditor',
|
|
34
30
|
label: 'Security Auditor',
|
|
35
31
|
hint: 'OWASP Top 10, dependency scanning, secrets detection',
|
|
32
|
+
tier: 'free',
|
|
36
33
|
defaults: {
|
|
37
34
|
role: 'Identifies vulnerabilities and enforces secure coding practices',
|
|
38
35
|
description: 'This agent scans code for security issues including OWASP Top 10, dependency vulnerabilities, secrets exposure, injection risks, and insecure configurations. It provides remediation guidance with severity ratings.',
|
|
@@ -42,14 +39,9 @@ export const ARCHETYPES = [
|
|
|
42
39
|
'Fail closed, not open',
|
|
43
40
|
'Zero trust by default',
|
|
44
41
|
'Least privilege always',
|
|
42
|
+
'Defense in depth',
|
|
45
43
|
],
|
|
46
|
-
skills: [
|
|
47
|
-
'writing-plans',
|
|
48
|
-
'executing-plans',
|
|
49
|
-
'code-patrol',
|
|
50
|
-
'fix-and-learn',
|
|
51
|
-
'vault-navigator',
|
|
52
|
-
],
|
|
44
|
+
skills: ['code-patrol', 'fix-and-learn', 'vault-navigator'],
|
|
53
45
|
tone: 'precise',
|
|
54
46
|
greetingTemplate: (name) => `Hello! I'm ${name}. I help identify vulnerabilities and enforce secure coding practices across your codebase.`,
|
|
55
47
|
},
|
|
@@ -58,24 +50,19 @@ export const ARCHETYPES = [
|
|
|
58
50
|
value: 'api-architect',
|
|
59
51
|
label: 'API Architect',
|
|
60
52
|
hint: 'REST/GraphQL design, contract validation, versioning',
|
|
53
|
+
tier: 'free',
|
|
61
54
|
defaults: {
|
|
62
55
|
role: 'Designs and validates APIs for consistency, usability, and correctness',
|
|
63
56
|
description: 'This agent reviews API designs for RESTful conventions, GraphQL best practices, versioning strategy, error handling, pagination patterns, and contract consistency. It catches breaking changes before they ship.',
|
|
64
57
|
domains: ['api-design', 'architecture'],
|
|
65
58
|
principles: [
|
|
66
|
-
'
|
|
59
|
+
'Backward compatibility by default',
|
|
60
|
+
'Consumer-driven contracts',
|
|
67
61
|
'Design for the consumer, not the implementer',
|
|
68
|
-
'Respect existing patterns',
|
|
69
62
|
'Every migration must be reversible',
|
|
70
63
|
],
|
|
71
|
-
skills: [
|
|
72
|
-
|
|
73
|
-
'executing-plans',
|
|
74
|
-
'vault-navigator',
|
|
75
|
-
'vault-capture',
|
|
76
|
-
'second-opinion',
|
|
77
|
-
],
|
|
78
|
-
tone: 'mentor',
|
|
64
|
+
skills: ['vault-navigator', 'vault-capture', 'second-opinion'],
|
|
65
|
+
tone: 'pragmatic',
|
|
79
66
|
greetingTemplate: (name) => `Hello! I'm ${name}. Share your API design or schema — I'll review it for consistency, usability, and best practices.`,
|
|
80
67
|
},
|
|
81
68
|
},
|
|
@@ -83,24 +70,19 @@ export const ARCHETYPES = [
|
|
|
83
70
|
value: 'test-engineer',
|
|
84
71
|
label: 'Test Engineer',
|
|
85
72
|
hint: 'Test generation, coverage analysis, TDD workflow',
|
|
73
|
+
tier: 'free',
|
|
86
74
|
defaults: {
|
|
87
75
|
role: 'Generates tests, analyzes coverage, and enforces test-driven development',
|
|
88
76
|
description: 'This agent helps write comprehensive test suites, identifies coverage gaps, suggests edge cases, and guides TDD workflows. It supports unit, integration, and end-to-end testing strategies.',
|
|
89
77
|
domains: ['testing', 'code-review'],
|
|
90
78
|
principles: [
|
|
91
79
|
'Test everything that can break',
|
|
80
|
+
'Deterministic tests only',
|
|
81
|
+
'Test at boundaries, not internals',
|
|
92
82
|
'Simplicity over cleverness',
|
|
93
|
-
'Actionable feedback only',
|
|
94
|
-
'Respect existing patterns',
|
|
95
|
-
],
|
|
96
|
-
skills: [
|
|
97
|
-
'writing-plans',
|
|
98
|
-
'executing-plans',
|
|
99
|
-
'test-driven-development',
|
|
100
|
-
'fix-and-learn',
|
|
101
|
-
'code-patrol',
|
|
102
83
|
],
|
|
103
|
-
|
|
84
|
+
skills: ['test-driven-development', 'fix-and-learn', 'code-patrol'],
|
|
85
|
+
tone: 'mentor',
|
|
104
86
|
greetingTemplate: (name) => `Hello! I'm ${name}. Point me at code that needs tests — I'll generate comprehensive suites and identify coverage gaps.`,
|
|
105
87
|
},
|
|
106
88
|
},
|
|
@@ -108,23 +90,18 @@ export const ARCHETYPES = [
|
|
|
108
90
|
value: 'devops-pilot',
|
|
109
91
|
label: 'DevOps Pilot',
|
|
110
92
|
hint: 'CI/CD pipelines, infrastructure, deployment automation',
|
|
93
|
+
tier: 'free',
|
|
111
94
|
defaults: {
|
|
112
95
|
role: 'Manages CI/CD pipelines, infrastructure, and deployment automation',
|
|
113
96
|
description: 'This agent helps design and maintain CI/CD pipelines, Docker configurations, infrastructure as code, monitoring setup, and deployment strategies. It follows reliability engineering best practices.',
|
|
114
97
|
domains: ['devops', 'architecture'],
|
|
115
98
|
principles: [
|
|
116
99
|
'Automate everything repeatable',
|
|
117
|
-
'
|
|
100
|
+
'Infrastructure as code',
|
|
101
|
+
'Blast radius awareness',
|
|
118
102
|
'Observability built in from day one',
|
|
119
|
-
'Convention over configuration',
|
|
120
|
-
],
|
|
121
|
-
skills: [
|
|
122
|
-
'writing-plans',
|
|
123
|
-
'executing-plans',
|
|
124
|
-
'vault-navigator',
|
|
125
|
-
'fix-and-learn',
|
|
126
|
-
'knowledge-harvest',
|
|
127
103
|
],
|
|
104
|
+
skills: ['vault-navigator', 'fix-and-learn', 'knowledge-harvest'],
|
|
128
105
|
tone: 'pragmatic',
|
|
129
106
|
greetingTemplate: (name) => `Hello! I'm ${name}. I help with CI/CD, infrastructure, and deployment — describe your setup or issue.`,
|
|
130
107
|
},
|
|
@@ -133,23 +110,18 @@ export const ARCHETYPES = [
|
|
|
133
110
|
value: 'database-architect',
|
|
134
111
|
label: 'Database Architect',
|
|
135
112
|
hint: 'Schema design, migrations, query optimization',
|
|
113
|
+
tier: 'free',
|
|
136
114
|
defaults: {
|
|
137
115
|
role: 'Designs database schemas, manages migrations, and optimizes queries',
|
|
138
116
|
description: 'This agent reviews database designs for normalization, indexing strategy, migration safety, query performance, and data integrity. It supports SQL and NoSQL patterns.',
|
|
139
117
|
domains: ['database', 'performance'],
|
|
140
118
|
principles: [
|
|
119
|
+
'Schema evolution over breaking changes',
|
|
120
|
+
'Query performance first',
|
|
141
121
|
'Every migration must be reversible',
|
|
142
122
|
'Convention over configuration',
|
|
143
|
-
'Test everything that can break',
|
|
144
|
-
'Simplicity over cleverness',
|
|
145
|
-
],
|
|
146
|
-
skills: [
|
|
147
|
-
'writing-plans',
|
|
148
|
-
'executing-plans',
|
|
149
|
-
'vault-navigator',
|
|
150
|
-
'vault-capture',
|
|
151
|
-
'knowledge-harvest',
|
|
152
123
|
],
|
|
124
|
+
skills: ['vault-navigator', 'vault-capture', 'knowledge-harvest'],
|
|
153
125
|
tone: 'precise',
|
|
154
126
|
greetingTemplate: (name) => `Hello! I'm ${name}. Share your schema, migration, or query — I'll review it for correctness and performance.`,
|
|
155
127
|
},
|
|
@@ -158,26 +130,169 @@ export const ARCHETYPES = [
|
|
|
158
130
|
value: 'full-stack',
|
|
159
131
|
label: 'Full-Stack Assistant',
|
|
160
132
|
hint: 'General-purpose dev helper across the entire stack',
|
|
133
|
+
tier: 'free',
|
|
161
134
|
defaults: {
|
|
162
135
|
role: 'A general-purpose development assistant across the full stack',
|
|
163
136
|
description: 'This agent helps with frontend, backend, database, testing, and deployment tasks. It provides balanced guidance across the entire stack without deep specialization in any single area.',
|
|
164
137
|
domains: ['code-review', 'testing', 'architecture'],
|
|
165
138
|
principles: [
|
|
166
139
|
'Simplicity over cleverness',
|
|
140
|
+
'Progressive enhancement',
|
|
167
141
|
'Test everything that can break',
|
|
168
142
|
'Respect existing patterns',
|
|
169
143
|
],
|
|
170
|
-
skills: [
|
|
171
|
-
'writing-plans',
|
|
172
|
-
'executing-plans',
|
|
173
|
-
'test-driven-development',
|
|
174
|
-
'code-patrol',
|
|
175
|
-
'fix-and-learn',
|
|
176
|
-
'vault-navigator',
|
|
177
|
-
],
|
|
144
|
+
skills: ['test-driven-development', 'code-patrol', 'fix-and-learn', 'vault-navigator'],
|
|
178
145
|
tone: 'mentor',
|
|
179
146
|
greetingTemplate: (name) => `Hello! I'm ${name}. I help across the full stack — frontend, backend, testing, deployment. What are you working on?`,
|
|
180
147
|
},
|
|
181
148
|
},
|
|
149
|
+
{
|
|
150
|
+
value: 'accessibility-guardian',
|
|
151
|
+
label: 'Accessibility Guardian',
|
|
152
|
+
hint: 'WCAG compliance, semantic HTML, keyboard navigation audits',
|
|
153
|
+
tier: 'free',
|
|
154
|
+
defaults: {
|
|
155
|
+
role: 'Audits code for WCAG compliance and accessibility best practices',
|
|
156
|
+
description: 'This agent reviews components and pages for accessibility issues including WCAG 2.1 violations, missing ARIA labels, keyboard navigation gaps, color contrast failures, and semantic HTML problems. It provides fix suggestions with severity ratings.',
|
|
157
|
+
domains: ['accessibility', 'code-review'],
|
|
158
|
+
principles: [
|
|
159
|
+
'WCAG compliance is non-negotiable',
|
|
160
|
+
'Semantic HTML before ARIA',
|
|
161
|
+
'Keyboard navigation for every interaction',
|
|
162
|
+
'Actionable feedback only',
|
|
163
|
+
],
|
|
164
|
+
skills: ['code-patrol', 'second-opinion'],
|
|
165
|
+
tone: 'precise',
|
|
166
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I audit your code for accessibility — WCAG compliance, keyboard navigation, screen reader support, and more.`,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
value: 'documentation-writer',
|
|
171
|
+
label: 'Documentation Writer',
|
|
172
|
+
hint: 'Technical docs, API references, example-driven guides',
|
|
173
|
+
tier: 'free',
|
|
174
|
+
defaults: {
|
|
175
|
+
role: 'Creates and maintains clear, example-driven technical documentation',
|
|
176
|
+
description: 'This agent helps write and maintain technical documentation including API references, getting-started guides, architecture docs, and changelogs. It follows docs-as-code practices and ensures every concept has a working example.',
|
|
177
|
+
domains: ['documentation', 'developer-experience'],
|
|
178
|
+
principles: [
|
|
179
|
+
'Clarity over completeness',
|
|
180
|
+
'Every concept needs an example',
|
|
181
|
+
'Docs rot faster than code — keep current',
|
|
182
|
+
'Design for the consumer, not the implementer',
|
|
183
|
+
],
|
|
184
|
+
skills: ['knowledge-harvest', 'vault-navigator'],
|
|
185
|
+
tone: 'mentor',
|
|
186
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I help write and maintain clear, example-driven documentation. What needs documenting?`,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
// ─── Premium Archetypes ──────────────────────────────────────────
|
|
190
|
+
{
|
|
191
|
+
value: 'design-system-architect',
|
|
192
|
+
label: 'Design System Architect',
|
|
193
|
+
hint: 'Tokens, component APIs, accessibility, atomic design hierarchy',
|
|
194
|
+
tier: 'premium',
|
|
195
|
+
defaults: {
|
|
196
|
+
role: 'Designs and enforces design systems with semantic tokens, component APIs, and accessibility baselines',
|
|
197
|
+
description: 'This agent architects design systems end-to-end: semantic token hierarchies, component variant APIs, atomic design classification, spacing and typography scales, color contrast enforcement, and cross-platform consistency. It bridges design and engineering with a token-first methodology.',
|
|
198
|
+
domains: ['architecture', 'accessibility', 'code-review', 'design-tokens', 'frontend'],
|
|
199
|
+
principles: [
|
|
200
|
+
'Semantic tokens over primitives',
|
|
201
|
+
'Component variant enum over boolean props',
|
|
202
|
+
'Atomic design classification for component hierarchy',
|
|
203
|
+
'Token enforcement: blocked then forbidden then preferred',
|
|
204
|
+
'Respect existing design system patterns',
|
|
205
|
+
'Every component needs accessibility baseline',
|
|
206
|
+
],
|
|
207
|
+
skills: ['code-patrol', 'vault-navigator', 'vault-capture', 'knowledge-harvest'],
|
|
208
|
+
tone: 'precise',
|
|
209
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I architect design systems — tokens, component APIs, accessibility, and cross-platform consistency. Show me your system or describe what you need.`,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: 'frontend-craftsman',
|
|
214
|
+
label: 'Frontend Craftsman',
|
|
215
|
+
hint: 'Stack-aware implementation, UX patterns, performance budgets, accessibility',
|
|
216
|
+
tier: 'premium',
|
|
217
|
+
defaults: {
|
|
218
|
+
role: 'Builds production-grade frontends with stack-specific expertise, UX-informed structure, and performance discipline',
|
|
219
|
+
description: 'This agent combines deep stack knowledge (React, Next.js, Vue, Svelte, Flutter, SwiftUI) with UX design principles, performance budgets, and accessibility-first development. It provides implementation guidance tailored to your specific framework and UI patterns.',
|
|
220
|
+
domains: ['code-review', 'testing', 'performance', 'accessibility', 'frontend'],
|
|
221
|
+
principles: [
|
|
222
|
+
'Stack-aware implementation over generic advice',
|
|
223
|
+
'UX patterns inform code structure',
|
|
224
|
+
'Performance budget before feature scope',
|
|
225
|
+
'Accessible by default, not bolted on after',
|
|
226
|
+
'Convention over configuration',
|
|
227
|
+
],
|
|
228
|
+
skills: ['test-driven-development', 'code-patrol', 'fix-and-learn', 'vault-navigator'],
|
|
229
|
+
tone: 'mentor',
|
|
230
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I build production-grade frontends with stack-specific expertise, performance discipline, and accessibility built in. What are you working on?`,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
value: 'ux-intelligence',
|
|
235
|
+
label: 'UX Intelligence Agent',
|
|
236
|
+
hint: 'User behavior, conversion optimization, inclusive design, ethical patterns',
|
|
237
|
+
tier: 'premium',
|
|
238
|
+
defaults: {
|
|
239
|
+
role: 'Applies user behavior research to design decisions for conversion, accessibility, and ethical UX',
|
|
240
|
+
description: 'This agent brings UX research intelligence to every design decision: onboarding flows, form optimization, navigation patterns, data entry, search UX, touch targets, animation, performance perception, and AI interaction patterns. It measures conversion impact and ensures inclusive, ethical design.',
|
|
241
|
+
domains: ['accessibility', 'performance', 'testing', 'frontend', 'ux-design'],
|
|
242
|
+
principles: [
|
|
243
|
+
'User behavior drives design decisions',
|
|
244
|
+
'Accessibility is not a feature, it is a baseline',
|
|
245
|
+
'Measure conversion impact of every UX change',
|
|
246
|
+
'Progressive disclosure over information overload',
|
|
247
|
+
'Design for the consumer, not the implementer',
|
|
248
|
+
],
|
|
249
|
+
skills: ['vault-navigator', 'vault-capture', 'second-opinion', 'knowledge-harvest'],
|
|
250
|
+
tone: 'mentor',
|
|
251
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I help make UX decisions backed by user behavior research — onboarding, forms, navigation, accessibility, and conversion optimization.`,
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
value: 'knowledge-curator',
|
|
256
|
+
label: 'Knowledge Curator',
|
|
257
|
+
hint: 'Vault lifecycle, cross-project patterns, domain vocabulary, knowledge architecture',
|
|
258
|
+
tier: 'premium',
|
|
259
|
+
defaults: {
|
|
260
|
+
role: 'Manages knowledge capture, curation, and cross-project pattern extraction for organizational learning',
|
|
261
|
+
description: 'This agent manages the full knowledge lifecycle: capturing patterns at the moment of discovery, curating vault entries for quality and consistency, extracting cross-project patterns, maintaining domain vocabulary, and ensuring knowledge is searchable and actionable.',
|
|
262
|
+
domains: ['documentation', 'architecture', 'code-review', 'knowledge-management'],
|
|
263
|
+
principles: [
|
|
264
|
+
'Knowledge-gather before execute, always',
|
|
265
|
+
'Vault is the single source of truth',
|
|
266
|
+
'Capture lessons at the moment of discovery',
|
|
267
|
+
'Cross-project patterns beat project-local fixes',
|
|
268
|
+
'Domain vocabulary must be explicit and extensible',
|
|
269
|
+
],
|
|
270
|
+
skills: ['vault-navigator', 'vault-capture', 'knowledge-harvest', 'brain-debrief'],
|
|
271
|
+
tone: 'precise',
|
|
272
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I manage knowledge — capturing patterns, curating quality, and extracting insights across projects. What knowledge needs attention?`,
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
value: 'architecture-sentinel',
|
|
277
|
+
label: 'Architecture Sentinel',
|
|
278
|
+
hint: 'Governance gates, protocol enforcement, reversible migrations, graceful degradation',
|
|
279
|
+
tier: 'premium',
|
|
280
|
+
defaults: {
|
|
281
|
+
role: 'Enforces architectural governance with checkpoint gates, protocol enforcement, and data-driven decision making',
|
|
282
|
+
description: 'This agent guards architectural integrity through two-gate approval (plan then execute), checkpoint-based protocol enforcement, data-driven architecture decisions, reversible migration strategies, and graceful degradation patterns. It ensures systems fail closed and degrade gracefully.',
|
|
283
|
+
domains: ['architecture', 'security', 'code-review', 'testing', 'governance'],
|
|
284
|
+
principles: [
|
|
285
|
+
'Two-gate approval: plan then execute, never skip',
|
|
286
|
+
'Protocol enforcement via checkpoint gates',
|
|
287
|
+
'Data-driven architecture: logic in config, not code',
|
|
288
|
+
'Every migration must be reversible',
|
|
289
|
+
'Fail closed, not open',
|
|
290
|
+
'Graceful degradation over hard failures',
|
|
291
|
+
],
|
|
292
|
+
skills: ['code-patrol', 'vault-navigator', 'second-opinion', 'knowledge-harvest'],
|
|
293
|
+
tone: 'precise',
|
|
294
|
+
greetingTemplate: (name) => `Hello! I'm ${name}. I enforce architectural governance — approval gates, protocol checkpoints, reversible migrations, and graceful degradation. What needs review?`,
|
|
295
|
+
},
|
|
296
|
+
},
|
|
182
297
|
];
|
|
183
298
|
//# sourceMappingURL=archetypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archetypes.js","sourceRoot":"","sources":["../../src/prompts/archetypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"archetypes.js","sourceRoot":"","sources":["../../src/prompts/archetypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC;QACE,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,2DAA2D;QACjE,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE;YACR,IAAI,EAAE,8EAA8E;YACpF,WAAW,EACT,iMAAiM;YACnM,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;YACxC,UAAU,EAAE;gBACV,0BAA0B;gBAC1B,sBAAsB;gBACtB,gBAAgB;gBAChB,2BAA2B;aAC5B;YACD,MAAM,EAAE,CAAC,aA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AS;YACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CACzB,cAAc,IAAI,uIAAuI;SAC5J;KACF;IACD;QACE,KAAK,EAAE,uBAAuB;QAC9B,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,qFAAqF;QAC3F,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE;YACR,IAAI,EAAE,gHAAgH;YACtH,WAAW,EACT,gSAAgS;YAClS,OAAO,EAAE,CAAC,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC;YAC7E,UAAU,EAAE;gBACV,kDAAkD;gBAClD,2CAA2C;gBAC3C,qDAAqD;gBACrD,oCAAoC;gBACpC,uBAAuB;gBACvB,yCAAyC;aAC1C;YACD,MAAM,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;YACjF,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CACzB,cAAc,IAAI,kJAAkJ;SACvK;KACF;CACF,CAAC"}
|
|
@@ -34,16 +34,33 @@ export async function runCreateWizard(initialName) {
|
|
|
34
34
|
hint: "I'll guide you through defining your own agent type",
|
|
35
35
|
},
|
|
36
36
|
];
|
|
37
|
-
const
|
|
38
|
-
message: 'What kind of agent are you building?',
|
|
37
|
+
const archetypeValues = await p.multiselect({
|
|
38
|
+
message: 'What kind of agent are you building? (select one or more)',
|
|
39
39
|
options: archetypeChoices,
|
|
40
|
+
required: false,
|
|
40
41
|
});
|
|
41
|
-
if (p.isCancel(
|
|
42
|
+
if (p.isCancel(archetypeValues))
|
|
42
43
|
return null;
|
|
43
|
-
const
|
|
44
|
-
const isCustom =
|
|
44
|
+
const selectedValues = archetypeValues;
|
|
45
|
+
const isCustom = selectedValues.includes('_custom') || selectedValues.length === 0;
|
|
46
|
+
const selectedArchetypes = ARCHETYPES.filter((a) => selectedValues.includes(a.value));
|
|
47
|
+
// Merge defaults from all selected archetypes
|
|
48
|
+
function mergeDefaults(archetypes) {
|
|
49
|
+
if (archetypes.length === 0)
|
|
50
|
+
return null;
|
|
51
|
+
const domains = [...new Set(archetypes.flatMap((a) => a.defaults.domains))];
|
|
52
|
+
const principles = [...new Set(archetypes.flatMap((a) => a.defaults.principles))];
|
|
53
|
+
const skills = [...new Set(archetypes.flatMap((a) => a.defaults.skills))];
|
|
54
|
+
const tones = [...new Set(archetypes.map((a) => a.defaults.tone))];
|
|
55
|
+
return { domains, principles, skills, tones };
|
|
56
|
+
}
|
|
57
|
+
const merged = mergeDefaults(selectedArchetypes);
|
|
45
58
|
// ─── Step 2: Display name ─────────────────────────────────
|
|
46
|
-
const nameDefault =
|
|
59
|
+
const nameDefault = selectedArchetypes.length === 1
|
|
60
|
+
? selectedArchetypes[0].label
|
|
61
|
+
: selectedArchetypes.length > 1
|
|
62
|
+
? selectedArchetypes.map((a) => a.label).join(' + ')
|
|
63
|
+
: undefined;
|
|
47
64
|
const name = (await p.text({
|
|
48
65
|
message: 'Display name',
|
|
49
66
|
placeholder: nameDefault ?? 'My Agent',
|
|
@@ -55,42 +72,35 @@ export async function runCreateWizard(initialName) {
|
|
|
55
72
|
}));
|
|
56
73
|
if (p.isCancel(name))
|
|
57
74
|
return null;
|
|
58
|
-
// ─── Step 3: Agent ID (auto-derived
|
|
59
|
-
const
|
|
60
|
-
const id = (await p.text({
|
|
61
|
-
message: 'Agent ID (auto-generated, press Enter to accept)',
|
|
62
|
-
placeholder: autoId,
|
|
63
|
-
initialValue: autoId,
|
|
64
|
-
validate: (v = '') => {
|
|
65
|
-
if (!/^[a-z][a-z0-9-]*$/.test(v))
|
|
66
|
-
return 'Must be kebab-case (e.g., "my-agent")';
|
|
67
|
-
},
|
|
68
|
-
}));
|
|
69
|
-
if (p.isCancel(id))
|
|
70
|
-
return null;
|
|
75
|
+
// ─── Step 3: Agent ID (auto-derived from name) ─────────────
|
|
76
|
+
const id = slugify(name);
|
|
71
77
|
// ─── Step 4: Role ─────────────────────────────────────────
|
|
72
78
|
let role;
|
|
73
|
-
if (isCustom) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
if (isCustom || selectedArchetypes.length > 1) {
|
|
80
|
+
if (isCustom) {
|
|
81
|
+
p.note([
|
|
82
|
+
CUSTOM_ROLE_GUIDANCE.instruction,
|
|
83
|
+
'',
|
|
84
|
+
'Examples:',
|
|
85
|
+
...CUSTOM_ROLE_GUIDANCE.examples.map((e) => ` "${e}"`),
|
|
86
|
+
].join('\n'), '\u2726 Custom Agent Playbook');
|
|
87
|
+
}
|
|
88
|
+
const rolePrompt = (await p.text({
|
|
89
|
+
message: selectedArchetypes.length > 1
|
|
90
|
+
? 'Combined role (describe what this multi-purpose agent does)'
|
|
91
|
+
: 'What does your agent do? (one sentence)',
|
|
82
92
|
placeholder: 'Validates GraphQL schemas against federation rules',
|
|
83
93
|
validate: (v) => {
|
|
84
94
|
if (!v || v.length > 100)
|
|
85
95
|
return 'Required (max 100 chars)';
|
|
86
96
|
},
|
|
87
97
|
}));
|
|
88
|
-
if (p.isCancel(
|
|
98
|
+
if (p.isCancel(rolePrompt))
|
|
89
99
|
return null;
|
|
90
|
-
role =
|
|
100
|
+
role = rolePrompt;
|
|
91
101
|
}
|
|
92
102
|
else {
|
|
93
|
-
const prefilledRole =
|
|
103
|
+
const prefilledRole = selectedArchetypes[0].defaults.role;
|
|
94
104
|
const editedRole = (await p.text({
|
|
95
105
|
message: 'Role (pre-filled, press Enter to accept)',
|
|
96
106
|
initialValue: prefilledRole,
|
|
@@ -105,27 +115,31 @@ export async function runCreateWizard(initialName) {
|
|
|
105
115
|
}
|
|
106
116
|
// ─── Step 5: Description ──────────────────────────────────
|
|
107
117
|
let description;
|
|
108
|
-
if (isCustom) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
if (isCustom || selectedArchetypes.length > 1) {
|
|
119
|
+
if (isCustom) {
|
|
120
|
+
p.note([
|
|
121
|
+
CUSTOM_DESCRIPTION_GUIDANCE.instruction,
|
|
122
|
+
'',
|
|
123
|
+
'Example:',
|
|
124
|
+
...CUSTOM_DESCRIPTION_GUIDANCE.examples.map((e) => ` "${e}"`),
|
|
125
|
+
].join('\n'), '\u2726 Description');
|
|
126
|
+
}
|
|
127
|
+
const descPrompt = (await p.text({
|
|
128
|
+
message: selectedArchetypes.length > 1
|
|
129
|
+
? 'Combined description (what does this multi-purpose agent do?)'
|
|
130
|
+
: 'Describe your agent in detail',
|
|
117
131
|
placeholder: 'This agent helps developers with...',
|
|
118
132
|
validate: (v) => {
|
|
119
133
|
if (!v || v.length < 10 || v.length > 500)
|
|
120
134
|
return 'Required (10-500 chars)';
|
|
121
135
|
},
|
|
122
136
|
}));
|
|
123
|
-
if (p.isCancel(
|
|
137
|
+
if (p.isCancel(descPrompt))
|
|
124
138
|
return null;
|
|
125
|
-
description =
|
|
139
|
+
description = descPrompt;
|
|
126
140
|
}
|
|
127
141
|
else {
|
|
128
|
-
const prefilledDesc =
|
|
142
|
+
const prefilledDesc = selectedArchetypes[0].defaults.description;
|
|
129
143
|
const editedDesc = (await p.text({
|
|
130
144
|
message: 'Description (pre-filled, press Enter to accept)',
|
|
131
145
|
initialValue: prefilledDesc,
|
|
@@ -139,7 +153,7 @@ export async function runCreateWizard(initialName) {
|
|
|
139
153
|
description = editedDesc;
|
|
140
154
|
}
|
|
141
155
|
// ─── Step 6: Domains (multiselect) ────────────────────────
|
|
142
|
-
const preselectedDomains = new Set(
|
|
156
|
+
const preselectedDomains = new Set(merged?.domains ?? []);
|
|
143
157
|
const domainChoices = [
|
|
144
158
|
...DOMAIN_OPTIONS.map((d) => ({
|
|
145
159
|
value: d.value,
|
|
@@ -192,7 +206,7 @@ export async function runCreateWizard(initialName) {
|
|
|
192
206
|
return null;
|
|
193
207
|
}
|
|
194
208
|
// ─── Step 7: Principles (multiselect) ─────────────────────
|
|
195
|
-
const preselectedPrinciples = new Set(
|
|
209
|
+
const preselectedPrinciples = new Set(merged?.principles ?? []);
|
|
196
210
|
// Flatten categories into a single options list with group labels
|
|
197
211
|
const principleChoices = PRINCIPLE_CATEGORIES.flatMap((cat) => cat.options.map((o) => ({
|
|
198
212
|
value: o.value,
|
|
@@ -243,7 +257,17 @@ export async function runCreateWizard(initialName) {
|
|
|
243
257
|
return null;
|
|
244
258
|
}
|
|
245
259
|
// ─── Step 8: Communication tone ───────────────────────────
|
|
246
|
-
|
|
260
|
+
let defaultTone;
|
|
261
|
+
if (merged && merged.tones.length === 1) {
|
|
262
|
+
defaultTone = merged.tones[0];
|
|
263
|
+
}
|
|
264
|
+
else if (merged && merged.tones.length > 1) {
|
|
265
|
+
p.note(`Selected archetypes use different tones: ${merged.tones.join(', ')}`, 'Tone Conflict');
|
|
266
|
+
defaultTone = 'pragmatic';
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
defaultTone = 'pragmatic';
|
|
270
|
+
}
|
|
247
271
|
const tone = await p.select({
|
|
248
272
|
message: 'Communication tone',
|
|
249
273
|
options: TONE_OPTIONS.map((t) => ({
|
|
@@ -256,7 +280,7 @@ export async function runCreateWizard(initialName) {
|
|
|
256
280
|
if (p.isCancel(tone))
|
|
257
281
|
return null;
|
|
258
282
|
// ─── Step 9: Skills (multiselect) ─────────────────────────
|
|
259
|
-
const preselectedSkills = new Set(
|
|
283
|
+
const preselectedSkills = new Set(merged?.skills ?? []);
|
|
260
284
|
p.note(`Always included: ${CORE_SKILLS.join(', ')}`, 'Core Skills');
|
|
261
285
|
const skillChoices = SKILL_CATEGORIES.flatMap((cat) => cat.options.map((o) => ({
|
|
262
286
|
value: o.value,
|
|
@@ -273,8 +297,8 @@ export async function runCreateWizard(initialName) {
|
|
|
273
297
|
return null;
|
|
274
298
|
const selectedSkills = [...CORE_SKILLS, ...skillSelection];
|
|
275
299
|
// ─── Step 10: Greeting (auto or custom) ───────────────────
|
|
276
|
-
const autoGreeting =
|
|
277
|
-
?
|
|
300
|
+
const autoGreeting = selectedArchetypes.length === 1
|
|
301
|
+
? selectedArchetypes[0].defaults.greetingTemplate(name)
|
|
278
302
|
: `Hello! I'm ${name}. I ${role[0].toLowerCase()}${role.slice(1)}.`;
|
|
279
303
|
const greetingChoice = await p.select({
|
|
280
304
|
message: 'Greeting message',
|
|
@@ -329,6 +353,30 @@ export async function runCreateWizard(initialName) {
|
|
|
329
353
|
}));
|
|
330
354
|
if (p.isCancel(outputDir))
|
|
331
355
|
return null;
|
|
356
|
+
// ─── Step 12: Setup target ────────────────────────────────
|
|
357
|
+
const setupTarget = await p.select({
|
|
358
|
+
message: 'Setup target',
|
|
359
|
+
options: [
|
|
360
|
+
{
|
|
361
|
+
value: 'claude',
|
|
362
|
+
label: 'Claude Code',
|
|
363
|
+
hint: 'Generate/setup Claude integrations (default)',
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
value: 'codex',
|
|
367
|
+
label: 'Codex',
|
|
368
|
+
hint: 'Generate/setup Codex integrations',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
value: 'both',
|
|
372
|
+
label: 'Both',
|
|
373
|
+
hint: 'Generate/setup for Claude Code and Codex',
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
initialValue: 'claude',
|
|
377
|
+
});
|
|
378
|
+
if (p.isCancel(setupTarget))
|
|
379
|
+
return null;
|
|
332
380
|
return {
|
|
333
381
|
id,
|
|
334
382
|
name,
|
|
@@ -340,6 +388,7 @@ export async function runCreateWizard(initialName) {
|
|
|
340
388
|
greeting,
|
|
341
389
|
outputDir,
|
|
342
390
|
skills: selectedSkills,
|
|
391
|
+
setupTarget: setupTarget,
|
|
343
392
|
};
|
|
344
393
|
}
|
|
345
394
|
//# sourceMappingURL=create-wizard.js.map
|