@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,107 +0,0 @@
1
- # /kb — Knowledge Base (Karpathy LLM Wiki)
2
-
3
- Persistent, compounding knowledge base. Agents maintain it. Users only read it.
4
-
5
- ## How it works
6
-
7
- ```
8
- agent_notes (inbox) → agent reads → agent_kb (wiki)
9
- user drops anything integrates compiled knowledge
10
- ```
11
-
12
- One new note can update 10-15 existing KB pages.
13
- Your questions + answers get filed back as new entries — knowledge compounds.
14
-
15
- ## Session start
16
-
17
- ```ts
18
- import { kbContext } from './lib/kb.ts'
19
- const index = await kbContext(50)
20
- // Shows: [type] slug: summary — token-efficient, no full content loaded
21
- ```
22
-
23
- ## Process inbox notes (periodic — not every session)
24
-
25
- ```ts
26
- import { getInboxNotes, upsertEntry, markNoteProcessed } from './lib/kb.ts'
27
-
28
- const notes = await getInboxNotes(10)
29
- for (const note of notes) {
30
- // Read note.content
31
- // Decide: new KB entry OR update existing one
32
- // Check index first: does a related entry exist?
33
- const existing = await searchKB(extractKeyTerm(note.content))
34
-
35
- if (existing.length) {
36
- // Update existing entry — integrate new info
37
- // If new info contradicts: markStale(existing[0].slug) first
38
- await upsertEntry({ slug: existing[0].slug, ... })
39
- } else {
40
- // Create new entity/concept/source entry
41
- await upsertEntry({ entry_type: 'concept', slug, title, content, summary })
42
- }
43
-
44
- await markNoteProcessed(note.id, 'Integrated into KB as: [slug]')
45
- }
46
- ```
47
-
48
- ## Answer a question + file it back
49
-
50
- ```ts
51
- import { searchKB, getEntry, fileAnswer } from './lib/kb.ts'
52
-
53
- // 1. Read index — find relevant entries
54
- const index = await kbContext()
55
-
56
- // 2. Search for relevant pages
57
- const hits = await searchKB('email deliverability')
58
-
59
- // 3. Load content only for relevant ones
60
- const entry = await getEntry(hits[0].slug)
61
-
62
- // 4. Synthesize answer using entry.content
63
-
64
- // 5. File answer back as KB entry (Karpathy: explorations compound)
65
- await fileAnswer(
66
- 'What affects email deliverability?',
67
- answerText,
68
- ['email-deliverability', 'ses-setup']
69
- )
70
- ```
71
-
72
- ## Mark stale when info contradicts
73
-
74
- ```ts
75
- import { markStale } from './lib/kb.ts'
76
-
77
- // New note says ConvertKit raised prices → mark old pricing entry stale
78
- await markStale('convertkit-pricing')
79
- // Agent will update it next time it processes that entry
80
- ```
81
-
82
- ## Review stale entries
83
-
84
- ```ts
85
- import { getStaleEntries } from './lib/kb.ts'
86
- const stale = await getStaleEntries()
87
- // stale entries show ⚠️ in kbContext output
88
- // Process: load note → update entry → version increments, stale clears
89
- ```
90
-
91
- ## Entry types
92
-
93
- | type | What | Example slug |
94
- |---|---|---|
95
- | `entity` | Person, product, tool, company | `convertkit` `resend-api` `sarah-chen` |
96
- | `concept` | Strategy, pattern, framework | `email-deliverability` `icp-match` |
97
- | `source` | Processed note/article summary | `src-article-2026-04` |
98
- | `synthesis` | Agent cross-reference or analysis | `qa-best-email-tool` |
99
- | `index` | Auto-maintained index page | `index-email-marketing` |
100
-
101
- ## Rules
102
-
103
- - Agents maintain the KB — users never write directly
104
- - Load index first (cheap) → drill into content only when needed
105
- - summary ≤ 2 sentences — what the page is about in plain terms
106
- - related_ids = links to other KB entries (cross-references)
107
- - source_note_ids = which agent_notes this was compiled from
@@ -1,9 +0,0 @@
1
- # /newsletter-writer — Write Newsletter
2
-
3
- 1. `pearl.subscriberStats()` → show audience size first
4
- 2. Ask: subject line, preview text, content or topic to write about
5
- 3. Write in brand voice: 200+ words, greeting, main value, CTA, sign-off
6
- 4. Ask: send now or schedule? (ISO date/time if scheduling)
7
- 5. `pearl.send({ subject, preview_text, body_html, schedule_at })`
8
-
9
- n8n handles delivery via SES or Resend. Audience breakdown: `pearl.audienceBreakdown()`
@@ -1,64 +0,0 @@
1
- ---
2
- description: Save current session state to memory before context fills up
3
- ---
4
-
5
- # /preserve — Preserve Session
6
-
7
- Save session state to CC-Session-Logs/. Run before context gets full — not after.
8
- Uses the same structured format as /compress for consistency.
9
-
10
- ## Steps
11
-
12
- 1. Infer from conversation (don't ask unless genuinely ambiguous):
13
- - What was the goal?
14
- - What did we accomplish?
15
- - What decisions were made?
16
- - What's next?
17
-
18
- 2. Generate topic slug from the work done: `crm-outreach-2026-04` `blog-seo-audit` etc
19
-
20
- 3. Write to `CC-Session-Logs/YYYY-MM-DD-HH-MM-[topic].md`:
21
-
22
- ```markdown
23
- # [topic]
24
- Date: [ISO timestamp]
25
- Agent: [agent that was running]
26
-
27
- ## Goal
28
- [1-2 sentences — what were we doing]
29
-
30
- ## Constraints & Preferences
31
- - [any user preferences stated this session]
32
-
33
- ## Progress
34
- ### Done
35
- - [list every agent action: table written, post published, contact added]
36
- - Include IDs where possible: post_id: 01JXX, contact_id: 01JYY
37
-
38
- ### In Progress
39
- - [anything not finished]
40
-
41
- ## Next Steps
42
- 1. [specific next action]
43
- 2. [second]
44
-
45
- ## Files Changed
46
- - [file path]: [what changed]
47
- ```
48
-
49
- 1. Log to agent_memory AND update memory.md preferences section if user stated any:
50
-
51
- ```ts
52
- await logMemory('session', 'Preserved: [topic]', { file: 'CC-Session-Logs/...' })
53
- ```
54
-
55
- 2. Tell user: "Preserved to [filename]. Safe to run /compact now."
56
-
57
- ## When to run /preserve
58
-
59
- - Context bar approaching 70%
60
- - Before switching to a different task
61
- - After any significant batch of work
62
- - Before ending a session
63
-
64
- Run /compact AFTER /preserve, never before.
@@ -1,67 +0,0 @@
1
- ---
2
- description: Restore context from last session log and agent memory
3
- ---
4
-
5
- # /resume — Resume Last Session
6
-
7
- Reload context at the start of a new session. Run this first.
8
-
9
- ## Steps
10
-
11
- 1. Load agent memory from Turso:
12
-
13
- ```ts
14
- import { sessionContext } from './lib/memory.ts'
15
- const { memory, skills } = await sessionContext()
16
- ```
17
-
18
- 2. Find the most recent session log:
19
-
20
- ```
21
- CC-Session-Logs/
22
- ```
23
-
24
- Read the most recent file (by date in filename).
25
- Load ONLY the Summary section (everything above "---\nRaw Session Log").
26
- Never load the raw log — it wastes tokens.
27
-
28
- 3. If user specifies a topic:
29
-
30
- ```
31
- /resume api-auth-refactor
32
- ```
33
-
34
- Find the log file matching that topic slug.
35
-
36
- 4. Display the restored context:
37
-
38
- ```
39
- ══════════════════════════════════════════════
40
- RESUMING: [topic]
41
- ══════════════════════════════════════════════
42
- LAST SESSION: [date]
43
-
44
- [Summary content]
45
-
46
- RECENT MEMORY:
47
- [last 5 agent_memory entries]
48
-
49
- READY. What would you like to continue?
50
- ```
51
-
52
- 5. If no session logs exist, read memory.md preferences section and agent_memory.
53
-
54
- ## Folder structure
55
-
56
- ```
57
- businesskit-agent/
58
- ├── CC-Session-Logs/ ← session logs live here (gitignored)
59
- │ ├── 2026-04-07-09-00-crm-outreach.md
60
- │ ├── 2026-04-06-14-30-blog-seo-audit.md
61
- │ └── ...
62
- └── memory.md ← preferences (always loaded)
63
- ```
64
-
65
- ## Add CC-Session-Logs/ to .gitignore
66
-
67
- Session logs are local only — they contain session-specific context, not committed.
@@ -1,8 +0,0 @@
1
- # /scheduler — Scheduler Jobs
2
-
3
- 1. `scheduler.hourly()` -> run publish queue for content due now
4
- 2. Show list to user. Confirm before proceeding.
5
- 3. Use `scheduler.daily()` for pipeline health and `scheduler.weekly()` for CEO briefing delivery.
6
- 4. Show: what was published and job status.
7
-
8
- Direct COO methods (advanced): `coo.draftPipeline()`, `coo.schedule('posts', id, new Date('2026-04-01T09:00:00Z'))`
@@ -1,60 +0,0 @@
1
- # /seo — SEO Agent + LLM Visibility
2
-
3
- Audits content in Turso DB and tracks LLM visibility.
4
- For technical SEO (crawlability, Core Web Vitals, schema markup) → use claude-seo.md alongside this agent.
5
-
6
- ## Session start
7
- ```
8
- seoAgent.audit() // find SEO issues across posts, compare, alternative, guides
9
- seoAgent.contentGaps() // missing formats, thin posts, no compare/alternative pages
10
- seoAgent.checkLLMSTxt() // confirm llms.txt is live (app generates it, agent checks it)
11
- ```
12
-
13
- ## Fix content issues
14
- ```
15
- "Fix all missing excerpts"
16
- → for each issue: seoAgent.fixPost(id, { excerpt })
17
-
18
- "Fix titles that are too long"
19
- → seoAgent.fixPost(id, { seo_title: shortenedTitle })
20
-
21
- "Set SEO for the blog collection"
22
- → seoAgent.setCollectionSEO('blog', { seo_title, seo_description })
23
-
24
- "Suggest a slug"
25
- → seoAgent.suggestSlug(title, primaryKeyword)
26
- ```
27
-
28
- ## LLM Visibility (Arvow pattern)
29
- Track whether ChatGPT, Claude, Gemini, Perplexity cite your brand.
30
- ```
31
- "Check my LLM visibility"
32
- → seoAgent.checkLLMVisibility()
33
- → seoAgent.llmVisibilityAdvice(visibility)
34
-
35
- "Update scores after checking manually"
36
- → seoAgent.updateLLMVisibility({ chatgpt: 3, claude: 1, perplexity: 2 })
37
- ```
38
-
39
- Strategy to improve LLM citations:
40
- - Write ultimate guides (3000+ words) — LLMs prefer comprehensive sources
41
- - Add cited statistics with source URLs in posts.sources JSON
42
- - FAQ-format articles rank high for LLM citations
43
- - compare + alternative pages get cited heavily
44
- - Your app generates llms.txt — keep it current with latest products/posts
45
-
46
- ## Content gaps
47
- ```
48
- "What am I missing?"
49
- → seoAgent.contentGaps()
50
- // Returns: missing content types, thin posts, missing compare/alternative tables
51
- ```
52
-
53
- ## Technical SEO (server-side — not agent's job)
54
- These are handled by the live app or via claude-seo.md:
55
- - robots.txt ← app serves it
56
- - llms.txt ← app generates it (agent just checks it's live)
57
- - sitemap.xml ← app generates it
58
- - Core Web Vitals, schema markup, crawlability → install claude-seo.md for this:
59
- git clone https://github.com/AgriciDaniel/claude-seo.git && bash claude-seo/install.sh
60
- then: /seo audit https://yourslug.businesskit.io
@@ -1,51 +0,0 @@
1
- # /social — Agent-First SMM
2
-
3
- Posts, schedules, and analyzes social media via Zernio API.
4
- Reads `social_accounts`, `social_posts`, `connections` tables from user's Turso.
5
-
6
- ## Session start
7
- 1. `socialAgent.socialSummary()` — connected accounts, post counts, drafts
8
- 2. `socialAgent.listAccounts()` — platforms + connection mode per account
9
-
10
- ## Posting
11
- ```
12
- "Post my latest blog post to LinkedIn and X"
13
- → socialAgent.crossPostBlog(postId, title, slug, excerpt)
14
-
15
- "Announce my new course on all platforms"
16
- → socialAgent.announceProduct(productId, title, slug, priceCents)
17
-
18
- "Post this to Twitter: [content]"
19
- → socialAgent.post({ content, platforms: ['twitter'] })
20
-
21
- "Schedule this for Monday 9am"
22
- → socialAgent.post({ content, scheduledFor: '2026-04-07T09:00:00', timezone })
23
-
24
- "Add to queue"
25
- → socialAgent.post({ content, useQueue: true })
26
- ```
27
-
28
- ## Inbox + Analytics
29
- ```
30
- "Show my unread DMs" → socialAgent.getInbox({ status: 'unread' })
31
- "Show my scheduled posts" → socialAgent.getScheduled()
32
- "How are my accounts doing" → socialAgent.getAnalytics(accountId) per account
33
- ```
34
-
35
- ## Connection modes
36
- - `zernio_byok` → posts directly via user's own Zernio key
37
- - `zernio_platform` → free tier, must use dashboard POST /api/social/schedule
38
- - `n8n` → fires n8n webhook
39
-
40
- Platform key (ZERNIO_API_KEY) is never used locally — only through the Worker endpoint.
41
-
42
- ## Credentials needed per platform (optional if Zernio not used)
43
-
44
- | Platform | Credentials required |
45
- |---|---|
46
- | X / Twitter | twitter_api_key, twitter_api_secret, twitter_access_token, twitter_access_secret |
47
- | LinkedIn | linkedin_access_token, linkedin_person_urn |
48
- | Facebook | facebook_page_id, facebook_page_token |
49
- | Instagram | instagram_account_id, instagram_access_token |
50
-
51
- User adds these in: BusinessKit dashboard → Settings → Connections
@@ -1,11 +0,0 @@
1
- # /store-manager — Add Product to Store
2
-
3
- Types: download | meeting | webinar | event | listing | sponsorship | service
4
- (For courses, use `/course-creator`)
5
-
6
- 1. Ask: product type (show list)
7
- 2. Ask required fields per type (ref: .claude/skills/store.md)
8
- 3. Price in dollars → convert to cents ($29 → 2900)
9
- 4. `leo.create({ type, title, price_cents, ...type_fields })`
10
-
11
- After: COPY for description copy | SCOUT for SEO meta
package/.env.example DELETED
@@ -1,2 +0,0 @@
1
- TURSO_URL=libsql://your-db.turso.io
2
- TURSO_TOKEN=your-token
package/.mcp.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "mcpServers": {}
3
- }
package/ABOUT-ME.md DELETED
@@ -1,96 +0,0 @@
1
- # About Me
2
-
3
- > Personal context agents need to represent you accurately.
4
- > CRM agent uses this for outreach tone. Social agent uses this for positioning.
5
- > SEO agent uses this for E-E-A-T signals. CEO uses this for strategy context.
6
-
7
- ---
8
-
9
- ## The one-paragraph version
10
-
11
- <!--
12
- How you'd introduce yourself to a stranger who matters.
13
- Include: what you do, who you help, what makes your approach different.
14
- -->
15
-
16
- [Write your one-paragraph intro here]
17
-
18
- ---
19
-
20
- ## Background that shapes my work
21
-
22
- <!--
23
- Relevant experience, turning points, things that give you credibility.
24
- Not your full CV — just the 3-5 things that explain why you do what you do.
25
- -->
26
-
27
- - [Experience / turning point 1]
28
- - [Experience / turning point 2]
29
- - [Experience / turning point 3]
30
-
31
- ---
32
-
33
- ## What I've built
34
-
35
- <!--
36
- Products, projects, communities, businesses. Include numbers if you have them.
37
- -->
38
-
39
- | What | Details | Status |
40
- |---|---|---|
41
- | [Product/project] | [1 line] | Live / Building / Paused |
42
-
43
- ---
44
-
45
- ## My typical week
46
-
47
- <!--
48
- How you actually spend your time. Agents use this for realistic scheduling.
49
- -->
50
-
51
- - **Making:** [What you create]
52
- - **Selling:** [How you generate revenue]
53
- - **Learning:** [What you're studying/following]
54
- - **Community:** [Who you talk to regularly]
55
-
56
- ---
57
-
58
- ## Credibility signals
59
-
60
- <!--
61
- Things that establish authority. Used by SEO agent for bio, structured data.
62
- Agents don't invent these — they use what you list here.
63
- -->
64
-
65
- - Featured in: [Publications, podcasts, newsletters]
66
- - Trusted by: [Audience size, community size, notable clients]
67
- - Proven results: [Specific outcomes you've helped people achieve]
68
-
69
- ---
70
-
71
- ## Social presence
72
-
73
- <!--
74
- Your handles. Agents use these for cross-posting and for voice consistency.
75
- -->
76
-
77
- | Platform | Handle | Active? | Primary use |
78
- |---|---|---|---|
79
- | Twitter/X | @ | Yes/No | [What you post] |
80
- | LinkedIn | /in/ | Yes/No | [What you post] |
81
- | Instagram | @ | Yes/No | [What you post] |
82
- | YouTube | | Yes/No | [What you post] |
83
- | Newsletter | | Yes/No | [Topic + frequency] |
84
-
85
- ---
86
-
87
- ## What I'm working on right now
88
-
89
- <!--
90
- Current projects, goals for the next 90 days.
91
- CEO agent uses this for weekly briefings and prioritisation.
92
- -->
93
-
94
- - [Current project 1]
95
- - [Current project 2]
96
- - 90-day goal: [What success looks like by then]
package/HEARTBEAT.md DELETED
@@ -1,105 +0,0 @@
1
- # Heartbeat
2
-
3
- > Written by CEO agent each session. Machine-readable — agents parse this in one read.
4
- > No DB calls needed to know current business state. Surface it upfront, not on demand.
5
- > (Nainsi principle: treat the backend as part of the agent's context window.)
6
-
7
- Last updated: —
8
- Updated by: CEO agent
9
-
10
- ---
11
-
12
- ## Revenue snapshot
13
-
14
- ```
15
- 30d_revenue_cents: 0
16
- 7d_revenue_cents: 0
17
- top_product: —
18
- top_product_rev: 0
19
- open_deals: 0
20
- open_deal_value: 0
21
- ```
22
-
23
- ## Audience
24
-
25
- ```
26
- total_subscribers: 0
27
- new_7d: 0
28
- unsubscribed_7d: 0
29
- total_crm_contacts: 0
30
- new_crm_7d: 0
31
- ```
32
-
33
- ## Content pipeline
34
-
35
- ```
36
- posts_published_7d: 0
37
- posts_draft: 0
38
- newsletter_last_sent: —
39
- social_posts_7d: 0
40
- social_accounts_live: 0
41
- ```
42
-
43
- ## Pending approvals
44
-
45
- ```yaml
46
- # Items waiting for owner decision — surface at session start
47
- approvals: []
48
- # - id: xxx
49
- # type: social_post | crm_outreach | newsletter | product_update
50
- # agent: blog-writer
51
- # title: "Draft: 5 email tools compared"
52
- # created: 2026-04-22
53
- ```
54
-
55
- ## Agent status
56
-
57
- ```yaml
58
- agents:
59
- - type: ceo status: idle last_run: — heartbeat: 3600s
60
- - type: blog-writer status: idle last_run: —
61
- - type: social status: idle last_run: —
62
- - type: crm status: idle last_run: —
63
- - type: newsletter status: idle last_run: —
64
- - type: seo status: idle last_run: weekly
65
- - type: scheduler status: idle last_run: daily
66
- ```
67
-
68
- ## Flags
69
-
70
- ```yaml
71
- # Issues requiring attention — cleared when resolved
72
- flags: []
73
- # - level: warn | critical
74
- # message: "SES bounce rate above 5%"
75
- # since: 2026-04-20
76
- ```
77
-
78
- ## This week — CEO recommended priorities
79
-
80
- ```
81
- 1. —
82
- 2. —
83
- 3. —
84
- ```
85
-
86
- ## CEO note
87
-
88
- —
89
-
90
- ---
91
-
92
- <!-- HOW TO UPDATE:
93
- CEO agent runs this query on session start:
94
-
95
- SELECT
96
- (SELECT COALESCE(SUM(amount_cents),0) FROM purchases
97
- WHERE created_at > strftime('%s','now')-2592000) AS rev_30d,
98
- (SELECT COUNT(*) FROM subscribers WHERE is_blocked=0 AND is_unsubscribed=0) AS subscribers,
99
- (SELECT COUNT(*) FROM posts WHERE hidden=0) AS total_posts,
100
- (SELECT COUNT(*) FROM crm_contacts WHERE archived=0) AS contacts,
101
- (SELECT COUNT(*) FROM social_accounts WHERE is_active=1 AND is_connected=1) AS social_live
102
-
103
- Then writes the result back into the code blocks above.
104
- One query. One write. No exploration needed.
105
- -->