specialist-agent 1.4.0 → 1.5.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 +12 -12
- package/agents/starter-lite.md +1 -1
- package/agents/starter.md +1 -1
- package/agents/tester-lite.md +1 -1
- package/agents/tester.md +5 -5
- package/cli/index.mjs +80 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,10 +41,10 @@ Specialist Agent is a collection of **AI agents**, **skills**, and **architectur
|
|
|
41
41
|
|
|
42
42
|
| Pack | Stack |
|
|
43
43
|
|------|-------|
|
|
44
|
-
| **Vue 3** | Vue 3 + TypeScript + Pinia + TanStack Vue Query |
|
|
45
|
-
| **React** | React 18 + TypeScript + Zustand + TanStack React Query |
|
|
46
44
|
| **Next.js** | Next.js 14+ (App Router) + TypeScript + Zustand + Server Components |
|
|
45
|
+
| **React** | React 18 + TypeScript + Zustand + TanStack React Query |
|
|
47
46
|
| **SvelteKit** | SvelteKit 2 + TypeScript + Svelte stores + load functions |
|
|
47
|
+
| **Vue 3** | Vue 3 + TypeScript + Pinia + TanStack Vue Query |
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
@@ -82,7 +82,7 @@ The wizard will:
|
|
|
82
82
|
claude
|
|
83
83
|
|
|
84
84
|
# Create a new project from scratch
|
|
85
|
-
"Use @starter to create a task-manager app with
|
|
85
|
+
"Use @starter to create a task-manager app with React + Express + PostgreSQL"
|
|
86
86
|
|
|
87
87
|
# Build a feature inside an existing project
|
|
88
88
|
"Use @builder to create an orders module with CRUD for GET/POST/PATCH/DELETE /v2/orders"
|
|
@@ -115,7 +115,7 @@ claude
|
|
|
115
115
|
|
|
116
116
|
| Agent | What it does |
|
|
117
117
|
|-------|--------------|
|
|
118
|
-
| **@builder** | Create modules, components, services,
|
|
118
|
+
| **@builder** | Create modules, components, services, state logic, and tests |
|
|
119
119
|
| **@reviewer** | Review PRs, explore modules, check performance |
|
|
120
120
|
| **@doctor** | Investigate bugs by tracing through architecture layers |
|
|
121
121
|
|
|
@@ -128,7 +128,7 @@ claude
|
|
|
128
128
|
|
|
129
129
|
```bash
|
|
130
130
|
# Start a new full-stack project
|
|
131
|
-
"Use @starter to create an e-commerce app with
|
|
131
|
+
"Use @starter to create an e-commerce app with Next.js + Fastify + PostgreSQL"
|
|
132
132
|
|
|
133
133
|
# Explore an unfamiliar codebase
|
|
134
134
|
"Use @explorer to assess this project — I just joined the team"
|
|
@@ -143,7 +143,7 @@ claude
|
|
|
143
143
|
"Use @doctor to investigate the 500 error on login"
|
|
144
144
|
|
|
145
145
|
# Migrate legacy code (6 phases with approval gates)
|
|
146
|
-
"Use @migrator to migrate the billing module
|
|
146
|
+
"Use @migrator to migrate the billing module to the target architecture"
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
---
|
|
@@ -157,10 +157,10 @@ Quick shortcuts you invoke with `/skill-name` in Claude Code.
|
|
|
157
157
|
| Skill | What it does |
|
|
158
158
|
|-------|--------------|
|
|
159
159
|
| `/dev-create-module [name]` | Full module scaffold (delegates to agents) |
|
|
160
|
-
| `/dev-create-component [name]` | Component
|
|
160
|
+
| `/dev-create-component [name]` | Component from framework-specific template |
|
|
161
161
|
| `/dev-create-service [resource]` | Types + contracts + adapter + service |
|
|
162
|
-
| `/dev-create-composable
|
|
163
|
-
| `/dev-create-test [file]` | Tests for adapter, composable, or component |
|
|
162
|
+
| `/dev-create-hook` or `/dev-create-composable` | Hook/composable/store with server state integration |
|
|
163
|
+
| `/dev-create-test [file]` | Tests for adapter, hook/composable, or component |
|
|
164
164
|
| `/dev-generate-types [endpoint]` | Types + contracts + adapter from endpoint/JSON |
|
|
165
165
|
|
|
166
166
|
### Quality
|
|
@@ -175,7 +175,7 @@ Quick shortcuts you invoke with `/skill-name` in Claude Code.
|
|
|
175
175
|
|
|
176
176
|
| Skill | What it does |
|
|
177
177
|
|-------|--------------|
|
|
178
|
-
| `/migration-migrate-component [file]` |
|
|
178
|
+
| `/migration-migrate-component [file]` | Migrate component to target architecture |
|
|
179
179
|
| `/migration-migrate-module [path]` | Full module migration (6 phases) |
|
|
180
180
|
|
|
181
181
|
### Documentation
|
|
@@ -198,10 +198,10 @@ Each pack adapts the orchestration layer:
|
|
|
198
198
|
|
|
199
199
|
| Pack | Orchestration | Client State | File Extension |
|
|
200
200
|
|------|---------------|--------------|----------------|
|
|
201
|
-
| Vue 3 | Composables + Vue Query | Pinia | `.vue` |
|
|
202
|
-
| React | Hooks + React Query | Zustand | `.tsx` |
|
|
203
201
|
| Next.js | Hooks + Server Actions | Zustand | `.tsx` |
|
|
202
|
+
| React | Hooks + React Query | Zustand | `.tsx` |
|
|
204
203
|
| SvelteKit | Stores + load functions | Svelte stores | `.svelte` |
|
|
204
|
+
| Vue 3 | Composables + Vue Query | Pinia | `.vue` |
|
|
205
205
|
|
|
206
206
|
> Full guide: `docs/ARCHITECTURE.md` — the source of truth that all agents read.
|
|
207
207
|
|
package/agents/starter-lite.md
CHANGED
|
@@ -14,7 +14,7 @@ Create new projects from scratch. Ask the user about their stack, then scaffold
|
|
|
14
14
|
|
|
15
15
|
### 1. Ask Requirements
|
|
16
16
|
- **Project name** (kebab-case)
|
|
17
|
-
- **Frontend framework**: Vue 3
|
|
17
|
+
- **Frontend framework**: Based on your project's framework (Vue 3, React, Next.js, SvelteKit, or Other)
|
|
18
18
|
- **Frontend extras**: Router, state management, server state, testing, linting, CSS framework
|
|
19
19
|
- **Backend**: None | Node (Express/Fastify) | Python (FastAPI/Django) | Go (Gin/Fiber) | Java (Spring Boot)
|
|
20
20
|
- **Database**: None | PostgreSQL | MySQL | MongoDB | SQLite
|
package/agents/starter.md
CHANGED
|
@@ -16,7 +16,7 @@ Create new projects from scratch. Ask the user about their desired stack, then s
|
|
|
16
16
|
Ask the user:
|
|
17
17
|
|
|
18
18
|
1. **Project name** — kebab-case (e.g. `my-ecommerce-app`)
|
|
19
|
-
2. **Frontend framework** —
|
|
19
|
+
2. **Frontend framework** — Based on your project's framework (Vue 3, React, Next.js, SvelteKit, or Other)
|
|
20
20
|
3. **Frontend extras** — Which additions?
|
|
21
21
|
- Router (default: yes)
|
|
22
22
|
- State management: Pinia / Zustand / None (default: yes)
|
package/agents/tester-lite.md
CHANGED
|
@@ -26,7 +26,7 @@ Design and implement comprehensive testing strategies.
|
|
|
26
26
|
2. Determine type:
|
|
27
27
|
- Pure functions: direct I/O, no mocks
|
|
28
28
|
- Services: mock HTTP, test request/response
|
|
29
|
-
- Composables: mock services, test reactivity
|
|
29
|
+
- Hooks/Composables: mock services, test reactivity
|
|
30
30
|
- Components: render, test interactions
|
|
31
31
|
3. Write: happy path + edge cases + error cases
|
|
32
32
|
4. Use AAA: Arrange → Act → Assert
|
package/agents/tester.md
CHANGED
|
@@ -23,12 +23,12 @@ Read `docs/ARCHITECTURE.md` if it exists, then scan the project for existing tes
|
|
|
23
23
|
|
|
24
24
|
### Workflow
|
|
25
25
|
1. Analyze project structure:
|
|
26
|
-
- Identify all testable layers (services, adapters, composables, components, API routes)
|
|
26
|
+
- Identify all testable layers (services, adapters, hooks/composables, components, API routes)
|
|
27
27
|
- Check existing test coverage
|
|
28
28
|
- Identify test gaps and high-risk untested code
|
|
29
29
|
2. Design testing pyramid:
|
|
30
30
|
- **Unit tests** (70%): pure functions, adapters, utilities, validators
|
|
31
|
-
- **Integration tests** (20%): composables + services, API endpoints, database queries
|
|
31
|
+
- **Integration tests** (20%): hooks/composables + services, API endpoints, database queries
|
|
32
32
|
- **E2E tests** (10%): critical user flows (login, checkout, CRUD operations)
|
|
33
33
|
3. Define testing conventions:
|
|
34
34
|
- File naming: `[OriginalName].spec.ts` or `[OriginalName].test.ts`
|
|
@@ -62,7 +62,7 @@ Read `docs/ARCHITECTURE.md` if it exists, then scan the project for existing tes
|
|
|
62
62
|
2. Determine test type:
|
|
63
63
|
- **Pure functions** (adapters, utils): direct input/output testing, no mocks needed
|
|
64
64
|
- **Services** (HTTP calls): mock HTTP client, test request building and response handling
|
|
65
|
-
- **Composables**: mock services, test reactive behavior and state transitions
|
|
65
|
+
- **Hooks/Composables**: mock services, test reactive behavior and state transitions
|
|
66
66
|
- **Components**: render with test-utils, test user interactions and rendered output
|
|
67
67
|
- **API routes**: supertest/integration test with test database
|
|
68
68
|
3. Create test file:
|
|
@@ -83,8 +83,8 @@ Read `docs/ARCHITECTURE.md` if it exists, then scan the project for existing tes
|
|
|
83
83
|
```
|
|
84
84
|
Pure functions (adapters, utils): No mocks — test directly
|
|
85
85
|
Services (HTTP): Mock axios/fetch, verify URL + params
|
|
86
|
-
Composables (with service):
|
|
87
|
-
Components (with composable):
|
|
86
|
+
Hooks/Composables (with service): Mock service module, test reactive state
|
|
87
|
+
Components (with hook/composable): Mock hook/composable return values, test UI
|
|
88
88
|
API routes (with database): Test database or mock repository layer
|
|
89
89
|
```
|
|
90
90
|
|
package/cli/index.mjs
CHANGED
|
@@ -23,6 +23,28 @@ function copyDir(src, dest) {
|
|
|
23
23
|
return countFiles(dest)
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
function copyNewOnly(src, dest) {
|
|
27
|
+
if (!existsSync(src)) return 0
|
|
28
|
+
let count = 0
|
|
29
|
+
for (const entry of readdirSync(src, { withFileTypes: true })) {
|
|
30
|
+
const srcPath = join(src, entry.name)
|
|
31
|
+
const destPath = join(dest, entry.name)
|
|
32
|
+
if (entry.isDirectory()) {
|
|
33
|
+
mkdirSync(destPath, { recursive: true })
|
|
34
|
+
count += copyNewOnly(srcPath, destPath)
|
|
35
|
+
} else if (entry.name.endsWith('.md') && !existsSync(destPath)) {
|
|
36
|
+
cpSync(srcPath, destPath)
|
|
37
|
+
count++
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return count
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function detectExistingAgents(agentsDir) {
|
|
44
|
+
if (!existsSync(agentsDir)) return []
|
|
45
|
+
return readdirSync(agentsDir).filter(f => f.endsWith('.md'))
|
|
46
|
+
}
|
|
47
|
+
|
|
26
48
|
function countFiles(dir) {
|
|
27
49
|
if (!existsSync(dir)) return 0
|
|
28
50
|
let count = 0
|
|
@@ -141,6 +163,7 @@ if (args.includes('--help') || args.includes('-h')) {
|
|
|
141
163
|
console.log(' Options:')
|
|
142
164
|
console.log(` -h, --help ${DIM}Show this help message${NC}`)
|
|
143
165
|
console.log(` -v, --version ${DIM}Show version number${NC}`)
|
|
166
|
+
console.log(` -f, --force ${DIM}Overwrite existing agents without asking${NC}`)
|
|
144
167
|
console.log()
|
|
145
168
|
console.log(` ${DIM}Run the setup wizard to install AI agents for Claude Code.${NC}`)
|
|
146
169
|
console.log(` ${DIM}Can be executed from any directory (creates package.json if needed).${NC}`)
|
|
@@ -154,6 +177,8 @@ if (args.includes('--version') || args.includes('-v')) {
|
|
|
154
177
|
process.exit(0)
|
|
155
178
|
}
|
|
156
179
|
|
|
180
|
+
const forceMode = args.includes('--force') || args.includes('-f')
|
|
181
|
+
|
|
157
182
|
// ── Main ─────────────────────────────────────────────
|
|
158
183
|
|
|
159
184
|
async function main() {
|
|
@@ -259,45 +284,70 @@ async function main() {
|
|
|
259
284
|
|
|
260
285
|
// 4. Specialist agents
|
|
261
286
|
const installSpecialists = await clack.confirm({
|
|
262
|
-
message:
|
|
287
|
+
message: `Install specialist agents? ${DIM}(@finance, @cloud, @security, @designer, @data, @devops, @tester, @explorer)${NC}`,
|
|
263
288
|
initialValue: true,
|
|
264
289
|
})
|
|
265
290
|
|
|
266
291
|
if (clack.isCancel(installSpecialists)) handleCancel()
|
|
267
292
|
|
|
268
|
-
// 5.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
293
|
+
// 5. Install scope
|
|
294
|
+
const installScope = await clack.select({
|
|
295
|
+
message: 'Where to install agents?',
|
|
296
|
+
options: [
|
|
297
|
+
{ value: 'project', label: 'This project only', hint: '.claude/agents/' },
|
|
298
|
+
{ value: 'global', label: 'Globally', hint: '~/.claude/agents — available in all projects' },
|
|
299
|
+
],
|
|
300
|
+
})
|
|
275
301
|
|
|
276
|
-
|
|
277
|
-
}
|
|
302
|
+
if (clack.isCancel(installScope)) handleCancel()
|
|
278
303
|
|
|
279
304
|
// ── Install files ──────────────────────────────────
|
|
280
305
|
|
|
281
|
-
const s = clack.spinner()
|
|
282
|
-
s.start('Installing agents and skills...')
|
|
283
|
-
|
|
284
306
|
const packDir = join(ROOT, 'packs', framework)
|
|
285
307
|
const agentsSource = mode === 'lite' ? join(packDir, 'agents-lite') : join(packDir, 'agents')
|
|
286
308
|
const skillsSource = join(packDir, 'skills')
|
|
287
309
|
const archSource = join(packDir, 'ARCHITECTURE.md')
|
|
288
310
|
const claudeSource = join(packDir, 'CLAUDE.md')
|
|
289
311
|
|
|
290
|
-
|
|
291
|
-
const agentsDest =
|
|
312
|
+
const installGlobal = installScope === 'global'
|
|
313
|
+
const agentsDest = installGlobal
|
|
314
|
+
? join(homedir(), '.claude', 'agents')
|
|
315
|
+
: join(cwd, '.claude', 'agents')
|
|
292
316
|
mkdirSync(agentsDest, { recursive: true })
|
|
293
|
-
|
|
317
|
+
|
|
318
|
+
// Detect existing agents
|
|
319
|
+
const agentsLabel = installGlobal ? '~/.claude/agents/' : '.claude/agents/'
|
|
320
|
+
const existingAgents = detectExistingAgents(agentsDest)
|
|
321
|
+
let shouldOverwrite = forceMode
|
|
322
|
+
|
|
323
|
+
if (existingAgents.length > 0 && !forceMode) {
|
|
324
|
+
clack.log.warn(`Existing agents detected in ${agentsLabel} (${existingAgents.length} files)`)
|
|
325
|
+
const overwriteChoice = await clack.confirm({
|
|
326
|
+
message: 'Overwrite existing agent files?',
|
|
327
|
+
initialValue: false,
|
|
328
|
+
})
|
|
329
|
+
if (clack.isCancel(overwriteChoice)) handleCancel()
|
|
330
|
+
shouldOverwrite = overwriteChoice
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const s = clack.spinner()
|
|
334
|
+
if (existingAgents.length > 0 && !shouldOverwrite) {
|
|
335
|
+
s.start('Installing new agents and skills (preserving existing)...')
|
|
336
|
+
} else {
|
|
337
|
+
s.start('Installing agents and skills...')
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Install pack agents
|
|
341
|
+
const agentCount = shouldOverwrite
|
|
342
|
+
? copyDir(agentsSource, agentsDest)
|
|
343
|
+
: copyNewOnly(agentsSource, agentsDest)
|
|
294
344
|
|
|
295
345
|
// Install starter agent
|
|
296
346
|
if (installStarter) {
|
|
297
347
|
const starterFile = mode === 'lite' ? 'starter-lite.md' : 'starter.md'
|
|
298
348
|
const starterSource = join(ROOT, 'agents', starterFile)
|
|
299
349
|
const starterDest = join(agentsDest, 'starter.md')
|
|
300
|
-
if (existsSync(starterSource)) {
|
|
350
|
+
if (existsSync(starterSource) && (shouldOverwrite || !existsSync(starterDest))) {
|
|
301
351
|
cpSync(starterSource, starterDest)
|
|
302
352
|
}
|
|
303
353
|
}
|
|
@@ -309,46 +359,18 @@ async function main() {
|
|
|
309
359
|
const suffix = mode === 'lite' ? '-lite.md' : '.md'
|
|
310
360
|
const source = join(ROOT, 'agents', `${name}${suffix}`)
|
|
311
361
|
const dest = join(agentsDest, `${name}.md`)
|
|
312
|
-
if (existsSync(source)) {
|
|
362
|
+
if (existsSync(source) && (shouldOverwrite || !existsSync(dest))) {
|
|
313
363
|
cpSync(source, dest)
|
|
314
364
|
}
|
|
315
365
|
}
|
|
316
366
|
}
|
|
317
367
|
|
|
318
|
-
// Install agents globally
|
|
319
|
-
let globalAgentCount = 0
|
|
320
|
-
if (installGlobal) {
|
|
321
|
-
const globalAgentsDest = join(homedir(), '.claude', 'agents')
|
|
322
|
-
mkdirSync(globalAgentsDest, { recursive: true })
|
|
323
|
-
|
|
324
|
-
if (installStarter) {
|
|
325
|
-
const starterFile = mode === 'lite' ? 'starter-lite.md' : 'starter.md'
|
|
326
|
-
const starterSource = join(ROOT, 'agents', starterFile)
|
|
327
|
-
const starterGlobalDest = join(globalAgentsDest, 'starter.md')
|
|
328
|
-
if (existsSync(starterSource)) {
|
|
329
|
-
cpSync(starterSource, starterGlobalDest)
|
|
330
|
-
globalAgentCount++
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
if (installSpecialists) {
|
|
335
|
-
const specialistNames = ['explorer', 'finance', 'cloud', 'security', 'designer', 'data', 'devops', 'tester']
|
|
336
|
-
for (const name of specialistNames) {
|
|
337
|
-
const suffix = mode === 'lite' ? '-lite.md' : '.md'
|
|
338
|
-
const source = join(ROOT, 'agents', `${name}${suffix}`)
|
|
339
|
-
const dest = join(globalAgentsDest, `${name}.md`)
|
|
340
|
-
if (existsSync(source)) {
|
|
341
|
-
cpSync(source, dest)
|
|
342
|
-
globalAgentCount++
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
368
|
// Install skills
|
|
349
369
|
const skillsDest = join(cwd, '.claude', 'skills')
|
|
350
370
|
mkdirSync(skillsDest, { recursive: true })
|
|
351
|
-
const skillCount =
|
|
371
|
+
const skillCount = shouldOverwrite
|
|
372
|
+
? copyDir(skillsSource, skillsDest)
|
|
373
|
+
: copyNewOnly(skillsSource, skillsDest)
|
|
352
374
|
|
|
353
375
|
// Install ARCHITECTURE.md
|
|
354
376
|
const archDest = join(cwd, 'docs', 'ARCHITECTURE.md')
|
|
@@ -380,9 +402,16 @@ async function main() {
|
|
|
380
402
|
if (archInstalled) summaryLines.push('\u2713 docs/ARCHITECTURE.md')
|
|
381
403
|
if (claudeInstalled) summaryLines.push('\u2713 CLAUDE.md')
|
|
382
404
|
|
|
383
|
-
|
|
405
|
+
const scopeLabel = installGlobal ? 'Global' : 'Project'
|
|
406
|
+
clack.note(summaryLines.join('\n'), `${packLabel} \u00b7 ${mode === 'full' ? 'Full' : 'Lite'} \u00b7 ${scopeLabel}`)
|
|
384
407
|
|
|
385
|
-
|
|
408
|
+
if (installGlobal) {
|
|
409
|
+
clack.log.info(`${DIM}Agents installed to ~/.claude/agents/ (available in all projects)${NC}`)
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if (existingAgents.length > 0 && !shouldOverwrite) {
|
|
413
|
+
clack.log.info(`${DIM}${existingAgents.length} existing agent(s) preserved. Use --force to overwrite.${NC}`)
|
|
414
|
+
}
|
|
386
415
|
|
|
387
416
|
// Getting started
|
|
388
417
|
const installedSkills = existsSync(skillsDest)
|