specialist-agent 1.0.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/LICENSE +21 -0
- package/README.md +346 -0
- package/agents/cloud-lite.md +44 -0
- package/agents/cloud.md +122 -0
- package/agents/data-lite.md +44 -0
- package/agents/data.md +136 -0
- package/agents/designer-lite.md +44 -0
- package/agents/designer.md +126 -0
- package/agents/devops-lite.md +44 -0
- package/agents/devops.md +131 -0
- package/agents/finance-lite.md +43 -0
- package/agents/finance.md +108 -0
- package/agents/security-lite.md +43 -0
- package/agents/security.md +123 -0
- package/agents/starter-lite.md +49 -0
- package/agents/starter.md +200 -0
- package/agents/tester-lite.md +48 -0
- package/agents/tester.md +142 -0
- package/cli/index.mjs +232 -0
- package/package.json +45 -0
- package/packs/nextjs/ARCHITECTURE.md +1033 -0
- package/packs/nextjs/CLAUDE.md +70 -0
- package/packs/nextjs/agents/builder.md +145 -0
- package/packs/nextjs/agents/doctor.md +152 -0
- package/packs/nextjs/agents/migrator.md +203 -0
- package/packs/nextjs/agents/reviewer.md +141 -0
- package/packs/nextjs/agents-lite/builder.md +51 -0
- package/packs/nextjs/agents-lite/doctor.md +51 -0
- package/packs/nextjs/agents-lite/migrator.md +52 -0
- package/packs/nextjs/agents-lite/reviewer.md +51 -0
- package/packs/nextjs/skills/dev-create-component/SKILL.md +82 -0
- package/packs/nextjs/skills/dev-create-hook/SKILL.md +90 -0
- package/packs/nextjs/skills/dev-create-module/SKILL.md +63 -0
- package/packs/nextjs/skills/dev-create-service/SKILL.md +35 -0
- package/packs/nextjs/skills/dev-create-test/SKILL.md +106 -0
- package/packs/nextjs/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/nextjs/skills/docs-onboard/SKILL.md +55 -0
- package/packs/nextjs/skills/migration-migrate-component/SKILL.md +58 -0
- package/packs/nextjs/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/nextjs/skills/review-check-architecture/SKILL.md +101 -0
- package/packs/nextjs/skills/review-fix-violations/SKILL.md +48 -0
- package/packs/nextjs/skills/review-review/SKILL.md +46 -0
- package/packs/react/ARCHITECTURE.md +991 -0
- package/packs/react/CLAUDE.md +66 -0
- package/packs/react/agents/builder.md +74 -0
- package/packs/react/agents/doctor.md +100 -0
- package/packs/react/agents/migrator.md +114 -0
- package/packs/react/agents/reviewer.md +116 -0
- package/packs/react/agents-lite/builder.md +42 -0
- package/packs/react/agents-lite/doctor.md +41 -0
- package/packs/react/agents-lite/migrator.md +51 -0
- package/packs/react/agents-lite/reviewer.md +47 -0
- package/packs/react/skills/dev-create-component/SKILL.md +53 -0
- package/packs/react/skills/dev-create-hook/SKILL.md +78 -0
- package/packs/react/skills/dev-create-module/SKILL.md +51 -0
- package/packs/react/skills/dev-create-service/SKILL.md +34 -0
- package/packs/react/skills/dev-create-test/SKILL.md +92 -0
- package/packs/react/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/react/skills/docs-onboard/SKILL.md +42 -0
- package/packs/react/skills/migration-migrate-component/SKILL.md +44 -0
- package/packs/react/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/react/skills/review-check-architecture/SKILL.md +73 -0
- package/packs/react/skills/review-fix-violations/SKILL.md +45 -0
- package/packs/react/skills/review-review/SKILL.md +43 -0
- package/packs/svelte/ARCHITECTURE.md +975 -0
- package/packs/svelte/CLAUDE.md +66 -0
- package/packs/svelte/agents/builder.md +80 -0
- package/packs/svelte/agents/doctor.md +100 -0
- package/packs/svelte/agents/migrator.md +128 -0
- package/packs/svelte/agents/reviewer.md +104 -0
- package/packs/svelte/agents-lite/builder.md +43 -0
- package/packs/svelte/agents-lite/doctor.md +44 -0
- package/packs/svelte/agents-lite/migrator.md +59 -0
- package/packs/svelte/agents-lite/reviewer.md +48 -0
- package/packs/svelte/skills/dev-create-component/SKILL.md +77 -0
- package/packs/svelte/skills/dev-create-module/SKILL.md +59 -0
- package/packs/svelte/skills/dev-create-service/SKILL.md +35 -0
- package/packs/svelte/skills/dev-create-store/SKILL.md +94 -0
- package/packs/svelte/skills/dev-create-test/SKILL.md +98 -0
- package/packs/svelte/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/svelte/skills/docs-onboard/SKILL.md +47 -0
- package/packs/svelte/skills/migration-migrate-component/SKILL.md +51 -0
- package/packs/svelte/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/svelte/skills/review-check-architecture/SKILL.md +79 -0
- package/packs/svelte/skills/review-fix-violations/SKILL.md +47 -0
- package/packs/svelte/skills/review-review/SKILL.md +44 -0
- package/packs/vue/ARCHITECTURE.md +798 -0
- package/packs/vue/CLAUDE.md +66 -0
- package/packs/vue/agents/builder.md +73 -0
- package/packs/vue/agents/doctor.md +82 -0
- package/packs/vue/agents/migrator.md +101 -0
- package/packs/vue/agents/reviewer.md +92 -0
- package/packs/vue/agents-lite/builder.md +42 -0
- package/packs/vue/agents-lite/doctor.md +40 -0
- package/packs/vue/agents-lite/migrator.md +50 -0
- package/packs/vue/agents-lite/reviewer.md +46 -0
- package/packs/vue/skills/dev-create-component/SKILL.md +58 -0
- package/packs/vue/skills/dev-create-composable/SKILL.md +31 -0
- package/packs/vue/skills/dev-create-module/SKILL.md +50 -0
- package/packs/vue/skills/dev-create-service/SKILL.md +34 -0
- package/packs/vue/skills/dev-create-test/SKILL.md +62 -0
- package/packs/vue/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/vue/skills/docs-onboard/SKILL.md +42 -0
- package/packs/vue/skills/migration-migrate-component/SKILL.md +41 -0
- package/packs/vue/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/vue/skills/review-check-architecture/SKILL.md +73 -0
- package/packs/vue/skills/review-fix-violations/SKILL.md +42 -0
- package/packs/vue/skills/review-review/SKILL.md +42 -0
package/cli/index.mjs
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createInterface } from 'readline'
|
|
4
|
+
import { existsSync, mkdirSync, cpSync, readdirSync, readFileSync } from 'fs'
|
|
5
|
+
import { join, dirname, resolve } from 'path'
|
|
6
|
+
import { fileURLToPath } from 'url'
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
9
|
+
const __dirname = dirname(__filename)
|
|
10
|
+
const ROOT = resolve(__dirname, '..')
|
|
11
|
+
|
|
12
|
+
const GREEN = '\x1b[32m'
|
|
13
|
+
const BLUE = '\x1b[34m'
|
|
14
|
+
const YELLOW = '\x1b[33m'
|
|
15
|
+
const BOLD = '\x1b[1m'
|
|
16
|
+
const DIM = '\x1b[2m'
|
|
17
|
+
const NC = '\x1b[0m'
|
|
18
|
+
|
|
19
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout })
|
|
20
|
+
|
|
21
|
+
function ask(question, options) {
|
|
22
|
+
return new Promise((resolve) => {
|
|
23
|
+
if (options) {
|
|
24
|
+
console.log()
|
|
25
|
+
options.forEach((opt, i) => {
|
|
26
|
+
console.log(` ${BOLD}${i + 1}${NC}) ${opt.label}${opt.hint ? ` ${DIM}${opt.hint}${NC}` : ''}`)
|
|
27
|
+
})
|
|
28
|
+
console.log()
|
|
29
|
+
}
|
|
30
|
+
rl.question(`${BLUE}${question}${NC} `, (answer) => {
|
|
31
|
+
if (options) {
|
|
32
|
+
const idx = parseInt(answer, 10) - 1
|
|
33
|
+
resolve(idx >= 0 && idx < options.length ? options[idx].value : options[0].value)
|
|
34
|
+
} else {
|
|
35
|
+
resolve(answer.trim())
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function copyDir(src, dest) {
|
|
42
|
+
if (!existsSync(src)) return 0
|
|
43
|
+
cpSync(src, dest, { recursive: true })
|
|
44
|
+
return countFiles(dest)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function countFiles(dir) {
|
|
48
|
+
if (!existsSync(dir)) return 0
|
|
49
|
+
let count = 0
|
|
50
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
51
|
+
if (entry.isDirectory()) count += countFiles(join(dir, entry.name))
|
|
52
|
+
else if (entry.name.endsWith('.md')) count++
|
|
53
|
+
}
|
|
54
|
+
return count
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getAgentNames(dir) {
|
|
58
|
+
if (!existsSync(dir)) return []
|
|
59
|
+
return readdirSync(dir)
|
|
60
|
+
.filter(f => f.endsWith('.md'))
|
|
61
|
+
.map(f => {
|
|
62
|
+
const content = readFileSync(join(dir, f), 'utf-8')
|
|
63
|
+
const match = content.match(/^name:\s*(.+)$/m)
|
|
64
|
+
return match ? match[1].trim() : f.replace('.md', '')
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function main() {
|
|
69
|
+
console.log()
|
|
70
|
+
console.log(`${BOLD}${BLUE} ╔══════════════════════════════════════╗${NC}`)
|
|
71
|
+
console.log(`${BOLD}${BLUE} ║ Specialist Agent — Setup Wizard ║${NC}`)
|
|
72
|
+
console.log(`${BOLD}${BLUE} ╚══════════════════════════════════════╝${NC}`)
|
|
73
|
+
console.log()
|
|
74
|
+
console.log(` ${DIM}AI agents for Claude Code — any framework, any stack${NC}`)
|
|
75
|
+
console.log()
|
|
76
|
+
|
|
77
|
+
// Check we're in a project
|
|
78
|
+
const cwd = process.cwd()
|
|
79
|
+
if (!existsSync(join(cwd, 'package.json'))) {
|
|
80
|
+
console.log(`${YELLOW} ⚠ No package.json found in current directory.${NC}`)
|
|
81
|
+
console.log(` Run this command from the root of your project.`)
|
|
82
|
+
console.log()
|
|
83
|
+
rl.close()
|
|
84
|
+
process.exit(1)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 1. Framework
|
|
88
|
+
const packs = readdirSync(join(ROOT, 'packs'), { withFileTypes: true })
|
|
89
|
+
.filter(d => d.isDirectory())
|
|
90
|
+
.map(d => d.name)
|
|
91
|
+
|
|
92
|
+
const packLabels = { vue: 'Vue 3', react: 'React', nextjs: 'Next.js', svelte: 'SvelteKit' }
|
|
93
|
+
|
|
94
|
+
const packOptions = packs.map(p => ({
|
|
95
|
+
label: packLabels[p] || p.charAt(0).toUpperCase() + p.slice(1),
|
|
96
|
+
value: p,
|
|
97
|
+
hint: ''
|
|
98
|
+
}))
|
|
99
|
+
|
|
100
|
+
const framework = await ask('Which framework?', packOptions)
|
|
101
|
+
|
|
102
|
+
// 2. Mode
|
|
103
|
+
const mode = await ask('Agent mode?', [
|
|
104
|
+
{ label: 'Full', value: 'full', hint: '(Sonnet/Opus — detailed output, validation)' },
|
|
105
|
+
{ label: 'Lite', value: 'lite', hint: '(Haiku — lower cost, faster)' },
|
|
106
|
+
])
|
|
107
|
+
|
|
108
|
+
// 3. Starter agent
|
|
109
|
+
const installStarter = await ask('Install @starter agent? (creates projects from scratch)', [
|
|
110
|
+
{ label: 'Yes', value: true, hint: '(recommended)' },
|
|
111
|
+
{ label: 'No', value: false, hint: '' },
|
|
112
|
+
])
|
|
113
|
+
|
|
114
|
+
// 4. Specialist agents
|
|
115
|
+
const installSpecialists = await ask('Install specialist agents? (@finance, @cloud, @security, @designer, @data, @devops, @tester)', [
|
|
116
|
+
{ label: 'Yes', value: true, hint: '(recommended)' },
|
|
117
|
+
{ label: 'No', value: false, hint: '' },
|
|
118
|
+
])
|
|
119
|
+
|
|
120
|
+
console.log()
|
|
121
|
+
console.log(`${BLUE} ─────────────────────────────────────${NC}`)
|
|
122
|
+
console.log(` ${BOLD}Installing Specialist Agent${NC}`)
|
|
123
|
+
console.log(` ${DIM}Pack: ${framework} | Mode: ${mode} | Starter: ${installStarter ? 'yes' : 'no'} | Specialists: ${installSpecialists ? 'yes' : 'no'}${NC}`)
|
|
124
|
+
console.log(`${BLUE} ─────────────────────────────────────${NC}`)
|
|
125
|
+
console.log()
|
|
126
|
+
|
|
127
|
+
const packDir = join(ROOT, 'packs', framework)
|
|
128
|
+
const agentsSource = mode === 'lite' ? join(packDir, 'agents-lite') : join(packDir, 'agents')
|
|
129
|
+
const skillsSource = join(packDir, 'skills')
|
|
130
|
+
const archSource = join(packDir, 'ARCHITECTURE.md')
|
|
131
|
+
const claudeSource = join(packDir, 'CLAUDE.md')
|
|
132
|
+
|
|
133
|
+
// Install agents
|
|
134
|
+
const agentsDest = join(cwd, '.claude', 'agents')
|
|
135
|
+
mkdirSync(agentsDest, { recursive: true })
|
|
136
|
+
const agentCount = copyDir(agentsSource, agentsDest)
|
|
137
|
+
const agentNames = getAgentNames(agentsDest)
|
|
138
|
+
|
|
139
|
+
agentNames.forEach(name => {
|
|
140
|
+
console.log(` ${GREEN}✅${NC} @${name}`)
|
|
141
|
+
})
|
|
142
|
+
console.log(` ${GREEN}${agentCount} agents installed${NC}`)
|
|
143
|
+
|
|
144
|
+
// Install starter agent
|
|
145
|
+
if (installStarter) {
|
|
146
|
+
const starterFile = mode === 'lite' ? 'starter-lite.md' : 'starter.md'
|
|
147
|
+
const starterSource = join(ROOT, 'agents', starterFile)
|
|
148
|
+
const starterDest = join(agentsDest, 'starter.md')
|
|
149
|
+
|
|
150
|
+
if (existsSync(starterSource)) {
|
|
151
|
+
cpSync(starterSource, starterDest)
|
|
152
|
+
console.log(` ${GREEN}✅${NC} @starter`)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Install specialist agents
|
|
157
|
+
if (installSpecialists) {
|
|
158
|
+
const specialistNames = ['finance', 'cloud', 'security', 'designer', 'data', 'devops', 'tester']
|
|
159
|
+
for (const name of specialistNames) {
|
|
160
|
+
const suffix = mode === 'lite' ? `-lite.md` : '.md'
|
|
161
|
+
const source = join(ROOT, 'agents', `${name}${suffix}`)
|
|
162
|
+
const dest = join(agentsDest, `${name}.md`)
|
|
163
|
+
|
|
164
|
+
if (existsSync(source)) {
|
|
165
|
+
cpSync(source, dest)
|
|
166
|
+
console.log(` ${GREEN}✅${NC} @${name}`)
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Install skills
|
|
172
|
+
console.log()
|
|
173
|
+
const skillsDest = join(cwd, '.claude', 'skills')
|
|
174
|
+
mkdirSync(skillsDest, { recursive: true })
|
|
175
|
+
const skillCount = copyDir(skillsSource, skillsDest)
|
|
176
|
+
console.log(` ${GREEN}${skillCount} skills installed${NC}`)
|
|
177
|
+
|
|
178
|
+
// Install ARCHITECTURE.md
|
|
179
|
+
console.log()
|
|
180
|
+
const archDest = join(cwd, 'docs', 'ARCHITECTURE.md')
|
|
181
|
+
if (!existsSync(archDest)) {
|
|
182
|
+
mkdirSync(dirname(archDest), { recursive: true })
|
|
183
|
+
cpSync(archSource, archDest)
|
|
184
|
+
console.log(` ${GREEN}✅${NC} docs/ARCHITECTURE.md`)
|
|
185
|
+
} else {
|
|
186
|
+
console.log(` ${YELLOW}⚠${NC} docs/ARCHITECTURE.md already exists (not overwritten)`)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Install CLAUDE.md
|
|
190
|
+
const claudeDest = join(cwd, 'CLAUDE.md')
|
|
191
|
+
if (!existsSync(claudeDest)) {
|
|
192
|
+
cpSync(claudeSource, claudeDest)
|
|
193
|
+
console.log(` ${GREEN}✅${NC} CLAUDE.md`)
|
|
194
|
+
} else {
|
|
195
|
+
console.log(` ${YELLOW}⚠${NC} CLAUDE.md already exists (not overwritten)`)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Done
|
|
199
|
+
console.log()
|
|
200
|
+
console.log(`${GREEN} ══════════════════════════════════════${NC}`)
|
|
201
|
+
console.log(`${GREEN} 🎉 Specialist Agent installed successfully!${NC}`)
|
|
202
|
+
console.log(`${GREEN} ══════════════════════════════════════${NC}`)
|
|
203
|
+
console.log()
|
|
204
|
+
|
|
205
|
+
if (mode === 'lite') {
|
|
206
|
+
console.log(` ${YELLOW}Lite mode: agents run on Haiku model (lower cost, faster).${NC}`)
|
|
207
|
+
console.log(` ${YELLOW}To switch to Full agents: npx specialist-agent init${NC}`)
|
|
208
|
+
console.log()
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
console.log(` Open Claude Code and try:`)
|
|
212
|
+
console.log()
|
|
213
|
+
console.log(` claude`)
|
|
214
|
+
console.log(` /agents ${DIM}# list agents${NC}`)
|
|
215
|
+
console.log(` /dev-create-module marketplace ${DIM}# scaffold a module${NC}`)
|
|
216
|
+
console.log(` /review-check-architecture ${DIM}# validate architecture${NC}`)
|
|
217
|
+
console.log()
|
|
218
|
+
console.log(` Or just ask:`)
|
|
219
|
+
console.log()
|
|
220
|
+
console.log(` ${DIM}"Use @builder to create the products module with CRUD"${NC}`)
|
|
221
|
+
console.log(` ${DIM}"Use @reviewer to explore src/modules/auth/"${NC}`)
|
|
222
|
+
console.log(` ${DIM}"Use @doctor to investigate the dashboard error"${NC}`)
|
|
223
|
+
console.log()
|
|
224
|
+
|
|
225
|
+
rl.close()
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
main().catch((err) => {
|
|
229
|
+
console.error(err)
|
|
230
|
+
rl.close()
|
|
231
|
+
process.exit(1)
|
|
232
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "specialist-agent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "AI agents for Claude Code — any framework, any stack",
|
|
6
|
+
"bin": {
|
|
7
|
+
"specialist-agent": "cli/index.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"cli",
|
|
11
|
+
"agents",
|
|
12
|
+
"packs",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"prepare": "husky",
|
|
18
|
+
"docs:dev": "vitepress dev docs",
|
|
19
|
+
"docs:build": "vitepress build docs",
|
|
20
|
+
"docs:preview": "vitepress preview docs"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@commitlint/cli": "^20.4.2",
|
|
24
|
+
"@commitlint/config-conventional": "^20.4.2",
|
|
25
|
+
"husky": "^9.1.7",
|
|
26
|
+
"mermaid": "^11.12.3",
|
|
27
|
+
"vitepress": "^1.6.3",
|
|
28
|
+
"vitepress-plugin-mermaid": "^2.0.17"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"claude-code",
|
|
32
|
+
"ai-agents",
|
|
33
|
+
"vue",
|
|
34
|
+
"react",
|
|
35
|
+
"nextjs",
|
|
36
|
+
"svelte",
|
|
37
|
+
"developer-tools",
|
|
38
|
+
"code-generation"
|
|
39
|
+
],
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "https://github.com/HerbertJulio/specialist-agent"
|
|
44
|
+
}
|
|
45
|
+
}
|