@businesskit/agent 1.0.3 → 1.0.5

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.
Files changed (130) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.cursor-plugin/plugin.json +25 -0
  3. package/.cursorrules +10 -0
  4. package/.superconsole-plugin/plugin.json +32 -0
  5. package/AGENTS.md +94 -63
  6. package/CLAUDE.md +11 -65
  7. package/GEMINI.md +11 -34
  8. package/README.md +106 -153
  9. package/assets/logo.svg +3 -0
  10. package/bin/businesskit.js +11 -17
  11. package/commands/add-contact.md +47 -0
  12. package/commands/add-inventory-from-invoice.md +80 -0
  13. package/commands/adjust-stock.md +46 -0
  14. package/commands/capabilities.md +33 -0
  15. package/commands/check-stock.md +43 -0
  16. package/commands/create-component.md +109 -0
  17. package/commands/create-invoice.md +69 -0
  18. package/commands/create-new-bill.md +65 -0
  19. package/commands/create-page.md +96 -0
  20. package/commands/list-components.md +41 -0
  21. package/commands/list-content.md +46 -0
  22. package/commands/list-pages.md +45 -0
  23. package/commands/publish-page.md +64 -0
  24. package/commands/send-invoice.md +42 -0
  25. package/commands/seo-audit.md +36 -0
  26. package/commands/update-contact.md +46 -0
  27. package/commands/update-content.md +47 -0
  28. package/commands/update-page.md +55 -0
  29. package/commands/update-price.md +47 -0
  30. package/commands/write-blog.md +52 -0
  31. package/commands/write-docs.md +84 -0
  32. package/commands/write-guide.md +46 -0
  33. package/commands/write-newsletter.md +46 -0
  34. package/mcp_config.json +8 -0
  35. package/package.json +34 -23
  36. package/plugin.json +32 -0
  37. package/scripts/generate-schema.ts +244 -0
  38. package/scripts/setup.sh +134 -0
  39. package/scripts/setup.ts +92 -0
  40. package/server.json +21 -0
  41. package/skills/README.md +19 -27
  42. package/skills/billing/SKILL.md +64 -0
  43. package/skills/brand/SKILL.md +30 -86
  44. package/skills/copywriting/SKILL.md +1 -1
  45. package/skills/crm/SKILL.md +38 -0
  46. package/skills/docs-cms/SKILL.md +53 -0
  47. package/skills/docs-cms/references/how-to.md +383 -0
  48. package/skills/inbox/SKILL.md +49 -0
  49. package/skills/inventory/SKILL.md +69 -0
  50. package/skills/pages/SKILL.md +169 -0
  51. package/skills/pages/references/sections-catalog.json +950 -0
  52. package/skills/social/SKILL.md +1 -1
  53. package/templates/antigravity.json +8 -0
  54. package/templates/claude-code.mcp.json +8 -0
  55. package/templates/cursor.mcp.json +8 -0
  56. package/templates/vscode.mcp.json +9 -0
  57. package/.claude/commands/analytics.md +0 -7
  58. package/.claude/commands/blog-writer.md +0 -9
  59. package/.claude/commands/cbo.md +0 -7
  60. package/.claude/commands/ceo.md +0 -10
  61. package/.claude/commands/cmo.md +0 -7
  62. package/.claude/commands/compress.md +0 -73
  63. package/.claude/commands/coo.md +0 -11
  64. package/.claude/commands/copywriter.md +0 -15
  65. package/.claude/commands/course-creator.md +0 -9
  66. package/.claude/commands/crm.md +0 -591
  67. package/.claude/commands/deep.md +0 -50
  68. package/.claude/commands/docs-writer.md +0 -8
  69. package/.claude/commands/forms-builder.md +0 -10
  70. package/.claude/commands/jobs-manager.md +0 -8
  71. package/.claude/commands/kb.md +0 -107
  72. package/.claude/commands/newsletter-writer.md +0 -9
  73. package/.claude/commands/preserve.md +0 -64
  74. package/.claude/commands/resume.md +0 -67
  75. package/.claude/commands/scheduler.md +0 -8
  76. package/.claude/commands/seo.md +0 -60
  77. package/.claude/commands/social.md +0 -51
  78. package/.claude/commands/store-manager.md +0 -11
  79. package/.env.example +0 -2
  80. package/.mcp.json +0 -3
  81. package/ABOUT-ME.md +0 -96
  82. package/HEARTBEAT.md +0 -105
  83. package/PLAN.md +0 -384
  84. package/PRD-Agent-Composition.md +0 -149
  85. package/PRD-Agent-Harness.md +0 -316
  86. package/REFERENCE.md +0 -124
  87. package/SOUL.md +0 -148
  88. package/SYSTEM.md +0 -71
  89. package/agents/_base.ts +0 -63
  90. package/agents/creators/blog-writer.ts +0 -347
  91. package/agents/creators/copywriter.ts +0 -89
  92. package/agents/creators/course-creator.ts +0 -106
  93. package/agents/creators/crm-agent.ts +0 -479
  94. package/agents/creators/docs-writer.ts +0 -77
  95. package/agents/creators/forms-builder.ts +0 -90
  96. package/agents/creators/jobs-manager.ts +0 -82
  97. package/agents/creators/newsletter-writer.ts +0 -91
  98. package/agents/creators/store-manager.ts +0 -138
  99. package/agents/csuite/cbo.ts +0 -109
  100. package/agents/csuite/ceo.ts +0 -121
  101. package/agents/csuite/cmo.ts +0 -109
  102. package/agents/csuite/coo.ts +0 -115
  103. package/agents/growth/analytics-agent.ts +0 -52
  104. package/agents/growth/scheduler.ts +0 -68
  105. package/agents/growth/seo-agent.ts +0 -282
  106. package/agents/growth/social-agent.ts +0 -346
  107. package/brand-voice.md +0 -127
  108. package/cli.ts +0 -125
  109. package/context/brand.md +0 -80
  110. package/context/business.md +0 -66
  111. package/ingest.md +0 -110
  112. package/lib/analytics.ts +0 -81
  113. package/lib/db.adapter.ts +0 -30
  114. package/lib/db.ts +0 -16
  115. package/lib/id.ts +0 -15
  116. package/lib/kb.ts +0 -337
  117. package/lib/memory.ts +0 -219
  118. package/lib/pattern-detector.ts +0 -169
  119. package/lib/profile.ts +0 -119
  120. package/lib/slug.ts +0 -30
  121. package/setup.ts +0 -127
  122. package/skills/agents/SKILL.md +0 -56
  123. package/skills/analytics/SKILL.md +0 -52
  124. package/skills/blog-writer/SKILL.md +0 -452
  125. package/skills/ceo/SKILL.md +0 -25
  126. package/skills/cmo/SKILL.md +0 -8
  127. package/skills/schema/SKILL.md +0 -45
  128. package/skills/store/SKILL.md +0 -62
  129. package/tsconfig.json +0 -13
  130. package/working-style.md +0 -87
@@ -1,346 +0,0 @@
1
- /**
2
- * Social Agent — Agent-First SMM
3
- *
4
- * All posting goes through Zernio API (https://zernio.com/api/v1).
5
- * Reads from social_accounts, social_posts, social_post_platforms in Turso.
6
- * Writes social_posts rows, then calls Zernio to schedule/publish.
7
- *
8
- * Three modes (from social.ts):
9
- * zernio_byok → user's own Zernio key from connections table
10
- * zernio_platform → BusinessKit platform key via POST /api/social/schedule
11
- * direct → n8n webhook fallback
12
- *
13
- * Agent reads mode from social_accounts.connection_mode and routes accordingly.
14
- * Platform key (ZERNIO_API_KEY) is NEVER used here — that's the Worker's job.
15
- */
16
-
17
- import { BaseAgent, db, ulid, now, iso } from '../_base.ts'
18
-
19
- const ZERNIO_BASE = 'https://zernio.com/api/v1'
20
-
21
- export type SocialPlatform =
22
- | 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok'
23
- | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads'
24
- | 'googlebusiness' | 'telegram' | 'snapchat'
25
-
26
- export interface PostInput {
27
- content: string
28
- platforms?: SocialPlatform[] // omit = all connected accounts
29
- scheduledFor?: string // ISO: '2026-04-01T09:00:00'
30
- timezone?: string // default: 'UTC'
31
- publishNow?: boolean
32
- useQueue?: boolean // use Zernio's recurring queue
33
- mediaItems?: Array<{ url: string; type: 'image' | 'video' | 'document' }>
34
- sourceId?: string // FK to posts.id / products.id for cross-post
35
- sourceType?: 'blog_crosspost' | 'product_launch' | 'manual'
36
- }
37
-
38
- export interface PostResult {
39
- ok: boolean
40
- post_id?: string // local social_posts.id
41
- zernio_post_id?: string // Zernio's post ID
42
- platforms: string[]
43
- status: string
44
- error?: string
45
- }
46
-
47
- export class SocialAgent extends BaseAgent {
48
- readonly name = 'Social Agent'
49
- readonly title = 'Social Agent'
50
-
51
- // ── Read state from DB ──────────────────────────────────────────────────────
52
-
53
- async listAccounts(activeOnly = true) {
54
- await this.init()
55
- let sql = 'SELECT * FROM social_accounts WHERE profile_id=?'
56
- const args: unknown[] = [this.profileId]
57
- if (activeOnly) { sql += ' AND is_active=1 AND is_connected=1' }
58
- const { rows } = await db.execute({ sql, args })
59
- return rows
60
- }
61
-
62
- async listPosts(opts: { status?: string; limit?: number } = {}) {
63
- await this.init()
64
- let sql = 'SELECT * FROM social_posts WHERE profile_id=? AND hidden=0'
65
- const args: unknown[] = [this.profileId]
66
- if (opts.status) { sql += ' AND status=?'; args.push(opts.status) }
67
- sql += ` ORDER BY created_at DESC LIMIT ${opts.limit ?? 20}`
68
- const { rows } = await db.execute({ sql, args })
69
- return rows
70
- }
71
-
72
- async getDrafts() { return this.listPosts({ status: 'draft' }) }
73
- async getScheduled() { return this.listPosts({ status: 'scheduled' }) }
74
-
75
- async getAnalytics(accountId: string) {
76
- const { rows: [r] } = await db.execute({
77
- sql: 'SELECT * FROM social_analytics WHERE account_id=? LIMIT 1',
78
- args: [accountId],
79
- })
80
- return r ?? null
81
- }
82
-
83
- async getInbox(opts: { status?: string; type?: string; limit?: number } = {}) {
84
- await this.init()
85
- let sql = 'SELECT * FROM social_inbox WHERE profile_id=?'
86
- const args: unknown[] = [this.profileId]
87
- if (opts.status) { sql += ' AND status=?'; args.push(opts.status) }
88
- if (opts.type) { sql += ' AND type=?'; args.push(opts.type) }
89
- sql += ` ORDER BY received_at DESC LIMIT ${opts.limit ?? 50}`
90
- const { rows } = await db.execute({ sql, args })
91
- return rows
92
- }
93
-
94
- // ── Core: create + schedule a post ─────────────────────────────────────────
95
-
96
- async post(input: PostInput): Promise<PostResult> {
97
- await this.init()
98
-
99
- // 1. Determine which accounts to post to
100
- const accounts = await this.listAccounts()
101
- if (!accounts.length) {
102
- return { ok: false, platforms: [], status: 'no_accounts',
103
- error: 'No connected social accounts. Connect platforms in BusinessKit → Settings → Social.' }
104
- }
105
-
106
- const targets = input.platforms
107
- ? accounts.filter(a => input.platforms!.includes(a.platform as SocialPlatform))
108
- : accounts
109
-
110
- if (!targets.length) {
111
- return { ok: false, platforms: [], status: 'no_matching_accounts',
112
- error: `No accounts connected for: ${input.platforms?.join(', ')}` }
113
- }
114
-
115
- // 2. Resolve Zernio key (BYOK only — platform key goes via /api/social/schedule)
116
- const zernioKey = await this.resolveZernioKey()
117
-
118
- // 3. Determine connection mode
119
- const mode = targets[0].connection_mode as string
120
-
121
- if (mode === 'zernio_byok' && zernioKey) {
122
- return this.postViaZernio(input, targets, zernioKey, 'byok')
123
- }
124
-
125
- if (mode === 'zernio_platform') {
126
- // Needs session token — only works in-app (Phase 2)
127
- return {
128
- ok: false, platforms: [], status: 'requires_session',
129
- error: 'Platform key posting requires authentication. Use /api/social/schedule from the dashboard.',
130
- }
131
- }
132
-
133
- if (mode === 'n8n' || this.ctx.credentials.n8n_webhook_url) {
134
- return this.postViaN8n(input, targets)
135
- }
136
-
137
- return { ok: false, platforms: [], status: 'no_method',
138
- error: 'No Zernio key or n8n webhook configured.' }
139
- }
140
-
141
- // ── Zernio posting (BYOK) ───────────────────────────────────────────────────
142
-
143
- private async postViaZernio(
144
- input: PostInput,
145
- accounts: typeof Object[],
146
- apiKey: string,
147
- scheduledVia: 'byok' | 'platform'
148
- ): Promise<PostResult> {
149
- const platforms = accounts.map((a: any) => ({
150
- platform: a.platform,
151
- accountId: a.zernio_account_id,
152
- }))
153
-
154
- const payload: Record<string, unknown> = {
155
- content: input.content,
156
- platforms,
157
- }
158
-
159
- if (input.publishNow) payload.publishNow = true
160
- if (input.useQueue) payload.useQueue = true
161
- if (input.scheduledFor) payload.scheduledFor = input.scheduledFor
162
- if (input.timezone) payload.timezone = input.timezone ?? 'UTC'
163
- if (input.mediaItems?.length) payload.mediaItems = input.mediaItems
164
-
165
- let zernioRes: { id?: string; status?: string } = {}
166
- let ok = false
167
- let error: string | undefined
168
-
169
- try {
170
- const res = await fetch(`${ZERNIO_BASE}/posts`, {
171
- method: 'POST',
172
- headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
173
- body: JSON.stringify(payload),
174
- })
175
- if (res.ok) {
176
- zernioRes = await res.json() as typeof zernioRes
177
- ok = true
178
- } else {
179
- const errBody = await res.text()
180
- error = `Zernio ${res.status}: ${errBody}`
181
- }
182
- } catch (e) {
183
- error = String(e)
184
- }
185
-
186
- // Write to social_posts regardless — draft if failed
187
- const postId = ulid()
188
- const ts = now()
189
- const month = new Date().toISOString().slice(0, 7)
190
- const status = ok
191
- ? (input.publishNow ? 'published' : input.scheduledFor ? 'scheduled' : 'queued')
192
- : 'failed'
193
-
194
- await db.execute({
195
- sql: `INSERT INTO social_posts
196
- (id,profile_id,content,status,scheduled_for,timezone,publish_now,use_queue,
197
- source,source_id,zernio_post_id,scheduled_via,platform_schedule_month,
198
- ai_generated,error,created_at,updated_at)
199
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,0,?,?,?)`,
200
- args: [
201
- postId, this.profileId, input.content, status,
202
- input.scheduledFor ?? null, input.timezone ?? 'UTC',
203
- input.publishNow ? 1 : 0, input.useQueue ? 1 : 0,
204
- input.sourceType ?? 'manual', input.sourceId ?? null,
205
- zernioRes.id ?? null, scheduledVia, month,
206
- error ?? null, ts, ts,
207
- ],
208
- })
209
-
210
- // Write per-platform rows
211
- if (ok && zernioRes.id) {
212
- const stmts = (accounts as any[]).map(a => ({
213
- sql: `INSERT INTO social_post_platforms
214
- (id,post_id,profile_id,account_id,platform,zernio_account_id,zernio_post_id,
215
- status,created_at,updated_at)
216
- VALUES (?,?,?,?,?,?,?,?,?,?)`,
217
- args: [
218
- ulid(), postId, this.profileId, a.id, a.platform,
219
- a.zernio_account_id, zernioRes.id, status, ts, ts,
220
- ],
221
- }))
222
- await db.batch(stmts)
223
- }
224
-
225
- await this.logProgress(ok, input.content.slice(0, 60), (accounts as any[]).map(a => a.platform))
226
-
227
- return {
228
- ok,
229
- post_id: postId,
230
- zernio_post_id: zernioRes.id,
231
- platforms: (accounts as any[]).map(a => a.platform),
232
- status,
233
- error,
234
- }
235
- }
236
-
237
- // ── n8n fallback ────────────────────────────────────────────────────────────
238
-
239
- private async postViaN8n(input: PostInput, accounts: typeof Object[]): Promise<PostResult> {
240
- const { n8n_webhook_url } = this.ctx.credentials
241
- if (!n8n_webhook_url) {
242
- return { ok: false, platforms: [], status: 'no_n8n', error: 'No n8n webhook URL in credentials.' }
243
- }
244
-
245
- try {
246
- const res = await fetch(n8n_webhook_url, {
247
- method: 'POST',
248
- headers: { 'Content-Type': 'application/json' },
249
- body: JSON.stringify({
250
- event: 'social_post',
251
- profile_id: this.profileId,
252
- business: this.ctx.profile.title,
253
- content: input.content,
254
- platforms: (accounts as any[]).map(a => a.platform),
255
- scheduled_for: input.scheduledFor ?? null,
256
- publish_now: input.publishNow ?? false,
257
- source_id: input.sourceId ?? null,
258
- timestamp: iso(),
259
- }),
260
- })
261
- return {
262
- ok: res.ok,
263
- platforms: (accounts as any[]).map(a => a.platform),
264
- status: res.ok ? 'sent_to_n8n' : 'n8n_error',
265
- error: res.ok ? undefined : `n8n returned ${res.status}`,
266
- }
267
- } catch (e) {
268
- return { ok: false, platforms: [], status: 'n8n_error', error: String(e) }
269
- }
270
- }
271
-
272
- // ── Convenience: cross-post from content ────────────────────────────────────
273
-
274
- async crossPostBlog(postId: string, title: string, slug: string, excerpt?: string) {
275
- const url = `https://${this.ctx.profile.slug}.businesskit.io/blog/${slug}`
276
- const content = excerpt ? `${title}\n\n${excerpt}\n\n${url}` : `${title}\n\n${url}`
277
- return this.post({ content, sourceId: postId, sourceType: 'blog_crosspost' })
278
- }
279
-
280
- async announceProduct(productId: string, title: string, slug: string, priceCents: number) {
281
- const url = `https://${this.ctx.profile.slug}.businesskit.io/store/${slug}`
282
- const price = `$${(priceCents / 100).toFixed(2)}`
283
- const content = `New: ${title} — ${price}\n\n${url}`
284
- return this.post({ content, sourceId: productId, sourceType: 'product_launch' })
285
- }
286
-
287
- // ── Queue management ────────────────────────────────────────────────────────
288
-
289
- async listQueueSlots(accountId?: string) {
290
- await this.init()
291
- let sql = 'SELECT * FROM social_queue WHERE profile_id=?'
292
- const args: unknown[] = [this.profileId]
293
- if (accountId) { sql += ' AND account_id=?'; args.push(accountId) }
294
- sql += ' ORDER BY day_of_week ASC, time_of_day ASC'
295
- const { rows } = await db.execute({ sql, args })
296
- return rows
297
- }
298
-
299
- // ── Analytics summary ───────────────────────────────────────────────────────
300
-
301
- async socialSummary() {
302
- await this.init()
303
- const accounts = await this.listAccounts()
304
- const { rows: [counts] } = await db.execute({
305
- sql: `SELECT
306
- COUNT(*) total,
307
- SUM(CASE WHEN status='published' THEN 1 ELSE 0 END) published,
308
- SUM(CASE WHEN status='scheduled' THEN 1 ELSE 0 END) scheduled,
309
- SUM(CASE WHEN status='draft' THEN 1 ELSE 0 END) drafts
310
- FROM social_posts WHERE profile_id=? AND hidden=0`,
311
- args: [this.profileId],
312
- })
313
- return { accounts: accounts.length, posts: counts }
314
- }
315
-
316
- // ── Helpers ─────────────────────────────────────────────────────────────────
317
-
318
- private async resolveZernioKey(): Promise<string | null> {
319
- try {
320
- const { rows: [r] } = await db.execute({
321
- sql: `SELECT client_id FROM connections
322
- WHERE profile_id=? AND service='zernio' AND is_active=1 AND client_id IS NOT NULL
323
- LIMIT 1`,
324
- args: [this.profileId],
325
- })
326
- return (r?.client_id as string) ?? null
327
- } catch {
328
- return null
329
- }
330
- }
331
-
332
- private async logProgress(ok: boolean, preview: string, platforms: string[]) {
333
- try {
334
- const { logMemory } = await import('../../lib/memory.ts')
335
- await logMemory(
336
- 'social',
337
- ok
338
- ? `Posted "${preview.slice(0, 80)}..." to ${platforms.join(', ')}`
339
- : `Failed to post "${preview.slice(0, 80)}..."`,
340
- { platforms, ok }
341
- )
342
- } catch { /* memory_log optional until provisioned */ }
343
- }
344
- }
345
-
346
- export const socialAgent = new SocialAgent()
package/brand-voice.md DELETED
@@ -1,127 +0,0 @@
1
- # Brand Voice
2
-
3
- > This is the agent's writing bible. Fill it in once, update when your voice evolves.
4
- > Agents load this before writing any content — blog, social, email, copy.
5
-
6
- ---
7
-
8
- ## Voice in three words
9
-
10
- <!--
11
- Pick three adjectives. Then prove each one with an example of what it sounds like.
12
- Bad: "Professional, friendly, innovative"
13
- Good: "Direct, generous, human"
14
- -->
15
-
16
- [Word 1]: [What it means in practice]
17
- [Word 2]: [What it means in practice]
18
- [Word 3]: [What it means in practice]
19
-
20
- ## How I actually write
21
-
22
- <!--
23
- Paste 2-3 real examples of your best writing — a tweet, a paragraph, an email.
24
- This is the most important part. Agents learn more from examples than descriptions.
25
- -->
26
-
27
- ### Example 1 — Short form (tweet / LinkedIn post)
28
-
29
- [Paste a real post you wrote that you're proud of]
30
-
31
- ### Example 2 — Medium form (email / newsletter intro)
32
-
33
- [Paste a real paragraph or intro]
34
-
35
- ### Example 3 — Long form (blog post intro or section)
36
-
37
- [Optional — paste if you write long form]
38
-
39
- ---
40
-
41
- ## What I sound like vs what I don't
42
-
43
- | I sound like this | Not like this |
44
- |---|---|
45
- | "Here's what worked for me" | "In today's digital landscape..." |
46
- | Short sentences. Direct. | Long, hedge-y sentences with qualifiers |
47
- | Specific numbers and examples | Vague generalities |
48
- | First person, conversational | Corporate third person |
49
- | [Add your own] | [Add your own] |
50
-
51
- ---
52
-
53
- ## Topics I own
54
-
55
- <!--
56
- What subjects do you have genuine authority on?
57
- Agents use this to stay in your lane and not write outside your expertise.
58
- -->
59
-
60
- - [Topic 1]
61
- - [Topic 2]
62
- - [Topic 3]
63
-
64
- ## Topics I avoid
65
-
66
- <!--
67
- Things you don't cover. Agents won't write about these.
68
- -->
69
-
70
- - [Topic to avoid]
71
-
72
- ---
73
-
74
- ## Audience
75
-
76
- <!--
77
- Who reads your content? Be specific.
78
- Bad: "entrepreneurs and marketers"
79
- Good: "solo creators who make $50-200k/year, mostly from courses and newsletters,
80
- who are tired of doing everything themselves but can't afford a team"
81
- -->
82
-
83
- **Primary reader:** [Describe them specifically]
84
-
85
- **What they're struggling with:** [The main problem]
86
-
87
- **What they want:** [The transformation they're after]
88
-
89
- **What they already know:** [Don't over-explain this]
90
-
91
- ---
92
-
93
- ## Platform-specific rules
94
-
95
- <!--
96
- How your voice shifts per platform. Keep it brief.
97
- -->
98
-
99
- **Twitter/X:** [e.g. punchy, no threads unless the idea earns it]
100
- **LinkedIn:** [e.g. slightly more professional, lead with the lesson]
101
- **Newsletter:** [e.g. personal, like writing to one person]
102
- **Blog:** [e.g. practical, skimmable, always has a TL;DR]
103
- **Instagram:** [e.g. visual-first, caption is secondary]
104
-
105
- ---
106
-
107
- ## Phrases I use
108
-
109
- <!--
110
- Things you actually say. Agents use these to match your voice.
111
- -->
112
-
113
- - [Phrase you use]
114
- - [Phrase you use]
115
-
116
- ## Phrases to avoid
117
-
118
- <!--
119
- Things that sound like AI slop or that you never say.
120
- -->
121
-
122
- - "In today's fast-paced world..."
123
- - "It's important to note that..."
124
- - "Dive deep"
125
- - "Unlock your potential"
126
- - "Leverage" (unless you mean actual leverage)
127
- - [Add your own]
package/cli.ts DELETED
@@ -1,125 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * cli.ts — BusinessKit Agent CLI
4
- *
5
- * Usage: npx businesskit-agent <agent> [command] [...args]
6
- *
7
- * Examples:
8
- * npx businesskit-agent ceo
9
- * npx businesskit-agent blog-writer create "My Post Title"
10
- * npx businesskit-agent scheduler hourly
11
- * npx businesskit-agent analytics-agent snapshot
12
- */
13
-
14
- import 'dotenv/config'
15
-
16
- const [, , agentName, command, ...args] = process.argv
17
-
18
- const AGENTS: Record<string, string> = {
19
- 'ceo': 'csuite/ceo',
20
- 'cmo': 'csuite/cmo',
21
- 'coo': 'csuite/coo',
22
- 'cbo': 'csuite/cbo',
23
- 'blog-writer': 'creators/blog-writer',
24
- 'newsletter-writer': 'creators/newsletter-writer',
25
- 'copywriter': 'creators/copywriter',
26
- 'course-creator': 'creators/course-creator',
27
- 'store-manager': 'creators/store-manager',
28
- 'jobs-manager': 'creators/jobs-manager',
29
- 'forms-builder': 'creators/forms-builder',
30
- 'docs-writer': 'creators/docs-writer',
31
- 'crm': 'creators/crm-agent',
32
- 'crm-agent': 'creators/crm-agent',
33
- 'analytics-agent': 'growth/analytics-agent',
34
- 'seo-agent': 'growth/seo-agent',
35
- 'social-agent': 'growth/social-agent',
36
- 'scheduler': 'growth/scheduler',
37
- }
38
-
39
- if (!agentName || agentName === 'help') {
40
- printHelp()
41
- process.exit(0)
42
- }
43
-
44
- const path = AGENTS[agentName.toLowerCase()]
45
- if (!path) {
46
- console.error(`\nUnknown agent: "${agentName}"`)
47
- console.error('Run: npx businesskit-agent help\n')
48
- process.exit(1)
49
- }
50
-
51
- const mod = await import(`./agents/${path}.ts`)
52
- const exportKey = Object.keys(mod).find(k => typeof mod[k] === 'object' && mod[k] !== null)
53
- const agent = exportKey ? mod[exportKey] : null
54
-
55
- if (!agent) {
56
- console.error(`Could not load agent: ${agentName}`)
57
- process.exit(1)
58
- }
59
-
60
- const cmd = command ?? defaultCommand(agentName)
61
-
62
- if (typeof agent[cmd] !== 'function') {
63
- console.error(`\nAgent "${agentName}" has no command "${cmd}"`)
64
- const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(agent))
65
- .filter(m => m !== 'constructor' && !m.startsWith('_') && typeof agent[m] === 'function')
66
- console.error(`Available: ${methods.join(', ')}\n`)
67
- process.exit(1)
68
- }
69
-
70
- try {
71
- const result = await agent[cmd](...args)
72
- if (result !== undefined) console.log(JSON.stringify(result, null, 2))
73
- } catch (e) {
74
- console.error('\nError:', e instanceof Error ? e.message : e)
75
- process.exit(1)
76
- }
77
-
78
- function defaultCommand(name: string): string {
79
- const defaults: Record<string, string> = {
80
- 'ceo': 'weeklyBriefing',
81
- 'cmo': 'contentCalendar',
82
- 'coo': 'draftPipeline',
83
- 'cbo': 'revenueReport',
84
- 'analytics-agent': 'snapshot',
85
- 'seo-agent': 'audit',
86
- 'scheduler': 'daily',
87
- }
88
- return defaults[name] ?? 'list'
89
- }
90
-
91
- function printHelp() {
92
- console.log(`
93
- BusinessKit Agent CLI
94
-
95
- Usage: npx businesskit-agent <agent> [command] [args]
96
-
97
- C-Suite:
98
- ceo Weekly briefing (revenue, traffic, priorities)
99
- cmo Content calendar + growth strategy
100
- coo Draft pipeline + publish queue
101
- cbo Revenue report + pricing audit
102
-
103
- Creators:
104
- blog-writer List posts or create new (create "Title")
105
- newsletter-writer Subscriber stats or send newsletter
106
- copywriter List pages or create new
107
- course-creator List courses
108
- store-manager List products by type
109
- jobs-manager List job listings
110
- forms-builder List forms
111
- docs-writer List articles
112
- crm CRM contacts and pipeline
113
-
114
- Growth:
115
- analytics-agent Full analytics snapshot
116
- seo-agent SEO audit across all content
117
- social-agent Post content to social via n8n
118
- scheduler Run publish queue (hourly|daily|weekly)
119
-
120
- Setup:
121
- npx tsx setup.ts Verify Turso connection
122
-
123
- Requires TURSO_URL + TURSO_TOKEN in .env
124
- `)
125
- }
package/context/brand.md DELETED
@@ -1,80 +0,0 @@
1
- # Brand Context
2
-
3
- > Fill this in once. Agents read it on every session.
4
- > The more specific you are, the better the output.
5
-
6
- ---
7
-
8
- ## Business overview
9
- <!-- What does your business do? Who is your customer? What problem do you solve?
10
- Example:
11
- I run an online education business helping freelance designers charge premium rates.
12
- My customers are designers with 1-3 years experience who are stuck charging low rates.
13
- -->
14
-
15
- [Your business overview here]
16
-
17
- ## Brand voice
18
- <!-- How do you sound? Pick 3-5 adjectives and explain what they mean in practice.
19
- Example:
20
- - Direct: I say what I mean. No fluff. Get to the point.
21
- - Warm: I talk like a friend, not a corporation. Contractions are fine.
22
- - Authoritative: I've done this. I cite real numbers and real experience.
23
- - No hype: I don't use words like "amazing", "incredible", "game-changing"
24
- -->
25
-
26
- [Your brand voice here]
27
-
28
- ## What we never say
29
- <!-- Words, phrases, or tones to avoid.
30
- Example:
31
- - Never say "delve" or "dive deep"
32
- - Never use corporate jargon (synergy, leverage, utilize)
33
- - Never start with "Great question!"
34
- - Never use passive voice
35
- - Never sign off with "Cheers" — use "Best,"
36
- -->
37
-
38
- [Your avoid list here]
39
-
40
- ## Target audience
41
- <!-- Who reads your content? Be specific.
42
- Example:
43
- Freelance designers, 25-35, primarily based in US/UK/AU.
44
- They are good at their craft but struggle with pricing, sales, and business.
45
- They follow people like Paul Jarvis, Nathan Barry, and Justin Welsh.
46
- -->
47
-
48
- [Your audience here]
49
-
50
- ## Core topics we write about
51
- <!-- What are your 5-7 main content pillars?
52
- Example:
53
- 1. Pricing strategy for creatives
54
- 2. Client communication
55
- 3. Building a portfolio that converts
56
- 4. Freelance business operations
57
- 5. Personal branding for designers
58
- -->
59
-
60
- [Your content pillars here]
61
-
62
- ## Products and services
63
- <!-- What do you sell? Include prices if relevant.
64
- Example:
65
- - Email Marketing Masterclass — $197 online course
66
- - 1:1 Strategy Call — $250/hour
67
- - Monthly coaching membership — $49/month
68
- -->
69
-
70
- [Your products here]
71
-
72
- ## Social presence
73
- <!-- Where are you active? What performs well?
74
- Example:
75
- - LinkedIn: 8,200 followers, long-form posts perform best
76
- - X/Twitter: 2,100 followers, threads and hot takes
77
- - Newsletter: 1,400 subscribers, weekly, 42% open rate
78
- -->
79
-
80
- [Your social presence here]