@businesskit/agent 1.0.1 → 1.0.2

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/ABOUT-ME.md ADDED
@@ -0,0 +1,96 @@
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/CLAUDE.md CHANGED
@@ -8,19 +8,24 @@ System prompt: see `SYSTEM.md` — loaded automatically by pi / agent tools.
8
8
 
9
9
  ---
10
10
 
11
- ## The Five-File System
11
+ ## File System — Load On Demand
12
12
 
13
13
  | File | What it is | When to read |
14
14
  |---|---|---|
15
- | `CLAUDE.md` | This file — routing rules, schema, never-do list | Every session start (auto) |
16
- | `SYSTEM.md` | System prompt — cost, efficiency, how to work | Every session start (auto) |
17
- | `memory.md` | User preferences (never/always do X) | Every session start (auto) |
18
- | `context/brand.md` | Brand voice, audience, tone | Only when writing content |
19
- | `context/business.md` | Goals, revenue model, schedule | CEO briefings only |
20
-
21
- From Turso (live, synced across all machines):
22
-
23
- - `agent_memory` — last 20 agent actions
15
+ | `CLAUDE.md` | This file — routing, schema, rules | Every session (auto) |
16
+ | `SYSTEM.md` | How to work — cost, efficiency | Every session (auto) |
17
+ | `SOUL.md` | Non-negotiables — never break these | Every session (auto) |
18
+ | `HEARTBEAT.md` | Live business pulse — CEO writes this | Session start, CEO only |
19
+ | `memory.md` | User preferences (auto-written by agents) | Every session (auto) |
20
+ | `context/about-me.md` | Who the user is — background, credibility | CRM, SEO, Social agents |
21
+ | `context/brand-voice.md` | Voice bible — examples, rules, audience | Any content writing |
22
+ | `context/working-style.md` | How they work — approvals, schedule | Scheduler, any publishing |
23
+ | `context/brand.md` | Brand overview + live DB loading code | Content agents |
24
+ | `context/business.md` | Goals, revenue model, 90-day targets | CEO briefings only |
25
+
26
+ From Turso (live, always fresh):
27
+
28
+ - `agent_memory` — last 20 agent actions across all sessions
24
29
  - `agent_skills` — live skill instructions, editable from dashboard
25
30
 
26
31
  ---
package/HEARTBEAT.md ADDED
@@ -0,0 +1,81 @@
1
+ # Heartbeat
2
+
3
+ > This file is maintained by the CEO agent.
4
+ > Updated every session start. Reflects the live state of your business.
5
+ > Do not edit manually — the CEO writes this.
6
+
7
+ ---
8
+
9
+ Last updated: [ISO timestamp]
10
+ Updated by: CEO agent
11
+
12
+ ---
13
+
14
+ ## Business pulse
15
+
16
+ | Signal | Value | Trend | Last checked |
17
+ |---|---|---|---|
18
+ | Revenue (30d) | — | — | — |
19
+ | New subscribers (7d) | — | — | — |
20
+ | Top product (revenue) | — | — | — |
21
+ | Open CRM deals | — | — | — |
22
+ | Published this week | — | — | — |
23
+ | Social engagement (avg) | — | — | — |
24
+
25
+ ---
26
+
27
+ ## Active agents
28
+
29
+ | Agent | Status | Last run | Next scheduled |
30
+ |---|---|---|---|
31
+ | CEO | — | — | Heartbeat every 1h |
32
+ | Blog Writer | — | — | — |
33
+ | Newsletter Writer | — | — | — |
34
+ | Social Agent | — | — | — |
35
+ | CRM Agent | — | — | — |
36
+ | SEO Agent | — | — | Weekly |
37
+ | Scheduler | — | — | Daily |
38
+
39
+ ---
40
+
41
+ ## Pending approvals
42
+
43
+ <!-- Items waiting for your decision. CEO surfaces these at session start. -->
44
+
45
+ | Item | Agent | Created | Action needed |
46
+ |---|---|---|---|
47
+ | — | — | — | — |
48
+
49
+ ---
50
+
51
+ ## In progress
52
+
53
+ <!-- What agents are actively working on. -->
54
+
55
+ - —
56
+
57
+ ---
58
+
59
+ ## This week's priorities
60
+
61
+ <!-- CEO-recommended focus based on revenue + content gaps. -->
62
+
63
+ 1. —
64
+ 2. —
65
+ 3. —
66
+
67
+ ---
68
+
69
+ ## Flags
70
+
71
+ <!-- Things that need attention. Auto-cleared when resolved. -->
72
+
73
+ - —
74
+
75
+ ---
76
+
77
+ ## Notes from CEO
78
+
79
+ <!-- CEO's strategic observation from last briefing. -->
80
+
81
+ —
package/README.md CHANGED
@@ -1,32 +1,42 @@
1
1
  # BusinessKit Agent
2
2
 
3
- Your autonomous business team — CEO, CMO, COO, CBO, Blog Writer, Course Creator, Store Manager, Newsletter Writer, CRM Agent, Social Agent, SEO Agent, Analytics Agent, and more.
3
+ Your agents are useless without a knowledge layer.
4
+ This is the knowledge layer — plus the agents that read from it.
4
5
 
5
- Reads and writes directly to your Turso database. Works with Claude Code, Claude Cowork, Gemini CLI, Codex, and any terminal.
6
+ 17 agents (CEO, CRM, Social, SEO, Blog Writer, and more) that read and write directly
7
+ to your Turso database. Two layers:
8
+
9
+ **Brand Foundation (BF)** — static, you write once: `context/brand-voice.md`,
10
+ `context/about-me.md`, `SOUL.md`. Agents read before producing anything.
11
+
12
+ **Knowledge Base Layer (KBL)** — dynamic, agents maintain: `agent_kb` table grows
13
+ every session. Drop anything into `agent_notes` inbox — links, ideas, tweets, articles.
14
+ Run `/ingest` and the agent compiles structured wiki pages with cross-links.
15
+ Every question you ask gets filed back as a new entry. Knowledge compounds.
16
+
17
+ Works with Claude Code, Claude Cowork, Gemini CLI, Codex, and any terminal.
6
18
 
7
19
  ---
8
20
 
9
- ## Setup
21
+ ## Setup — 3 steps
22
+
23
+ **1. Clone and install**
10
24
 
11
- **Step 1 — Clone and install**
12
25
  ```bash
13
- git clone https://github.com/businesskit-io/businesskit-agent
26
+ git clone https://github.com/businesskitai/businesskit-agent
14
27
  cd businesskit-agent
15
28
  npm install
16
29
  ```
17
30
 
18
- **Step 2 — Add credentials**
31
+ **2. Add credentials**
32
+
19
33
  ```bash
20
34
  cp .env.example .env
35
+ # Paste TURSO_URL and TURSO_TOKEN from BusinessKit → Settings → Credentials
21
36
  ```
22
37
 
23
- Open `.env`. Paste your Turso credentials from **BusinessKit → Settings → Credentials**:
24
- ```
25
- TURSO_URL=libsql://your-db.turso.io
26
- TURSO_TOKEN=your-auth-token
27
- ```
38
+ **3. Verify**
28
39
 
29
- **Step 3 — Verify**
30
40
  ```bash
31
41
  npm run setup
32
42
  ```
@@ -35,172 +45,117 @@ You'll see your business name confirmed. If not, check your `.env`.
35
45
 
36
46
  ---
37
47
 
48
+ ## Fill in your context (20 minutes, once)
49
+
50
+ These files make every agent 10x better. Without them, agents guess.
51
+
52
+ ```
53
+ context/about-me.md → who you are, your background, credibility
54
+ context/brand-voice.md → voice bible with real writing examples
55
+ context/working-style.md → how you work, approval preferences, schedule
56
+ context/business.md → goals, revenue model, 90-day targets
57
+ ```
58
+
59
+ **This is the most important step.** Shann Holmberg (Espressio) calls this the Brand Foundation —
60
+ the static layer agents read before producing anything so the output sounds like you, not generic AI.
61
+
62
+ ---
63
+
38
64
  ## How to use
39
65
 
40
66
  ### Claude Code
67
+
41
68
  Open this folder. Type any slash command:
42
69
 
43
70
  ```
44
- /ceo /cmo /coo /cbo
45
- /blog-writer /newsletter-writer /copywriter
46
- /course-creator /store-manager /jobs-manager
47
- /forms-builder /docs-writer
48
- /crm /social /analytics /seo
49
- /scheduler /deep
71
+ /ceo → weekly business briefing, priorities, pending approvals
72
+ /blog-writer → write posts, listicles, how-tos, comparisons
73
+ /newsletter → draft and send newsletters
74
+ /social → post to Twitter, LinkedIn, Instagram, TikTok (13 platforms)
75
+ /crm → manage contacts, deals, outreach pipeline
76
+ /seo → audit, fix meta, track LLM visibility
77
+ /analytics → revenue, traffic, product performance
78
+ /store → launch products, courses, services
79
+ /ingest → process agent_notes inbox into knowledge base
80
+ /kb → query your knowledge base
81
+ /compress → save session before context runs out
82
+ /resume → reload context next session
50
83
  ```
51
84
 
52
85
  ### Claude Cowork
86
+
53
87
  Install the BusinessKit plugin. Same commands, runs in your browser.
54
88
 
55
89
  ### Terminal
90
+
56
91
  ```bash
57
92
  npx tsx cli.ts ceo
58
93
  npx tsx cli.ts blog-writer
59
94
  npx tsx cli.ts crm
60
- npx tsx cli.ts social
61
95
  ```
62
96
 
63
97
  ---
64
98
 
65
- ## Agents
66
-
67
- ### C-Suite
68
- | Command | Does |
69
- |---|---|
70
- | `/ceo` | Weekly briefing — revenue, traffic, priorities, cross-agent orchestration |
71
- | `/cmo` | 4-week content calendar, content gap analysis, growth recommendations |
72
- | `/coo` | Publish queue, draft pipeline, scheduling oversight |
73
- | `/cbo` | Revenue report, pricing audit, upsell strategy |
74
-
75
- ### Content
76
- | Command | Does | Writes to |
77
- |---|---|---|
78
- | `/blog-writer` | 8 content formats: listicle, how-to, checklist, QA, versus, roundup, news, ultimate guide | `posts`, `compare`, `alternative`, `prompt`, `notes`, `guides` |
79
- | `/newsletter-writer` | Write and send newsletters | `newsletter` + SES/Resend |
80
- | `/copywriter` | Landing pages, product descriptions, profile bio | `pages`, `products` |
81
- | `/course-creator` | Courses with lessons | `products` (type=course) |
82
- | `/store-manager` | Downloads, meetings, webinars, events, listings, sponsorships, services | `products` |
83
- | `/jobs-manager` | Job listings and applications | `job_listings` |
84
- | `/forms-builder` | Forms with questions and analytics | `forms`, `questions` |
85
- | `/docs-writer` | Knowledge base articles | `doc_collections`, `doc_articles` |
86
-
87
- ### CRM (agent-first)
88
- ```
89
- /crm
90
- ```
91
- > "Add a lead: Sarah Chen, LinkedIn @sarahchen, founder at TechCo"
92
- > "Show my top 10 leads by score"
93
- > "Draft a DM for my hottest lead"
94
- > "Show who replied to my outreach"
95
- > "Create a $5,000 deal for John"
96
- > "What tasks are due today?"
97
- > "Show pending approvals"
98
-
99
- Agent drives the full pipeline: research → enrich → score → draft DM → approve → send → follow-up.
100
- Every DM/email draft waits for your approval before sending (unless you set `auto_approve=1`).
101
-
102
- ### Social (agent-first, powered by Zernio)
103
- ```
104
- /social
105
- ```
106
- > "Post my latest blog post to LinkedIn and X"
107
- > "Announce my new course on all platforms"
108
- > "Schedule a post for Monday 9am"
109
- > "Show my unread DMs and comments"
110
- > "How are my accounts performing?"
111
-
112
- Posts to 13 platforms via [Zernio API](https://zernio.com). Reads your connected accounts from Turso. Writes `social_posts` + `social_post_platforms` on every action.
113
-
114
- **Requires:** Zernio API key saved in BusinessKit → Settings → Credentials (BYOK).
115
- Free-tier users: use the dashboard → posting is capped at 20/month via the platform key.
99
+ ## The knowledge layer
116
100
 
117
- ### Growth
118
- | Command | Does |
119
- |---|---|
120
- | `/analytics` | Full snapshot: revenue, traffic, top products, link clicks |
121
- | `/seo` | Audit all content for SEO issues, fix titles/descriptions, content gap analysis, LLM visibility tracking |
122
- | `/scheduler` | Run publish queue, manage scheduled content |
101
+ Drop anything into your inbox:
123
102
 
124
- ### Deep Mode
125
103
  ```
126
- /deep
104
+ "add to notes: https://twitter.com/karpathy/status/... — useful for SEO strategy"
105
+ "add to notes: idea — launch a free email course as lead magnet"
106
+ "add to notes: competitor just raised prices, opportunity"
127
107
  ```
128
- CEO reads memory, checks analytics, writes a plan, delegates to the full team. Hand off your weekly business work entirely.
129
108
 
130
- ---
131
-
132
- ## Memory — synced across machines
109
+ Run `/ingest` weekly. The agent reads each note, builds or updates wiki pages,
110
+ cross-references related entries, marks contradictions as stale.
133
111
 
134
- Agent memory is stored in your Turso database (`memory_log` table, max 20 rows). Not a local file — synced everywhere.
112
+ Query anytime:
135
113
 
136
- ```ts
137
- import { sessionContext } from './lib/memory.ts'
138
- const { memory, skills } = await sessionContext()
139
- // memory: last 20 agent actions
140
- // skills: your brand voice, SEO rules, store guidelines
114
+ ```
115
+ /kb → "what do I know about email deliverability?"
116
+ "what content formats performed best?"
117
+ "what's my current positioning vs competitors?"
141
118
  ```
142
119
 
143
- ---
144
-
145
- ## Skills — live in Turso, editable from dashboard
146
-
147
- Agent skills (brand voice, SEO rules, store pricing) live in `agent_skills` table. Edit them in **BusinessKit → Dashboard → Agent Skills** and agents pick them up immediately — no file changes needed.
148
-
149
- Default skills seeded on first run:
150
- - `brand-voice` — your tone, style, what to avoid
151
- - `seo` — target keywords, internal linking rules
152
- - `store` — pricing guidelines, product naming
153
- - `analytics` — how to interpret your data
154
-
155
- ---
156
-
157
- ## Content formats (Blog Writer)
158
-
159
- Inspired by SEObot's approach — each format has a specific structure and word count target:
160
-
161
- | Format | Min words | Best for |
162
- |---|---|---|
163
- | `listicle` | 2000 | "Top 10 X" — high traffic |
164
- | `how-to` | 2000 | "How to X" — high search intent |
165
- | `ultimate-guide` | 3000 | Definitive resource — best for LLM citations |
166
- | `checklist` | 1200 | Practical checklists |
167
- | `qa` | 1500 | FAQ articles — long-tail keywords |
168
- | `versus` | 2000 | "X vs Y" — high buying intent → `compare` table |
169
- | `roundup` | 2000 | "Best X" — affiliate/referral traffic |
170
- | `news` | 800 | Timely coverage with cited sources |
171
- | `programmatic` | 1000 | Template-based SEO at scale |
120
+ Every answer gets filed back. The knowledge base gets richer every session.
172
121
 
173
122
  ---
174
123
 
175
- ## LLM Visibility (SEO Agent)
176
-
177
- The SEO agent tracks whether ChatGPT, Claude, Gemini, and Perplexity mention your brand. Strategy: publish comprehensive, well-cited content that LLMs reference.
124
+ ## Agents
178
125
 
179
- ```
180
- /seo → "Check my LLM visibility"
181
- /seo → "What content gaps do I have?"
182
- /seo → "Audit my SEO"
183
- ```
126
+ | Agent | What they do |
127
+ |---|---|
128
+ | **CEO** | Weekly briefing, revenue pulse, priorities, pending approvals |
129
+ | **CMO** | Marketing strategy, content calendar, growth planning |
130
+ | **COO** | Operations, publishing queue, task management |
131
+ | **CBO** | Revenue analysis, pricing strategy, product performance |
132
+ | **Blog Writer** | Posts, listicles, how-tos, comparisons, programmatic content |
133
+ | **Newsletter Writer** | Drafts, subscriber analytics, send management |
134
+ | **Copywriter** | Landing pages, product copy, profile bio |
135
+ | **Course Creator** | Course structure, lessons, pricing, access |
136
+ | **Store Manager** | Products, webinars, services, sponsorships, 1:1 calls |
137
+ | **Jobs Manager** | Job listings, applications |
138
+ | **Forms Builder** | Intake forms, waitlists, surveys |
139
+ | **Docs Writer** | Knowledge base articles, FAQs |
140
+ | **CRM Agent** | Contacts, deals, outreach pipeline with approval gates |
141
+ | **Social Agent** | 13 platforms via Zernio, scheduling, inbox |
142
+ | **Analytics Agent** | Revenue, traffic, product, email stats |
143
+ | **SEO Agent** | Technical audit, meta, LLM visibility tracking |
144
+ | **Scheduler** | Cron tasks, publish queue, Hermes pattern detection |
184
145
 
185
146
  ---
186
147
 
187
- ## Social credentials
188
-
189
- Go to **BusinessKit → Settings → Credentials** and add your Zernio API key:
190
-
191
- | Credential | What |
192
- |---|---|
193
- | Zernio API key | Enables posting to all 13 platforms |
194
-
195
- Alternatively connect platforms in **BusinessKit → Settings → Social** using the Zernio OAuth flow.
148
+ ## Cost
196
149
 
197
- ---
150
+ Every agent is built to minimise token cost:
198
151
 
199
- ## Requirements
152
+ - Skills loaded on demand — only what the task needs
153
+ - KB index scanned first (slug + summary), content loaded only when needed
154
+ - Reports pushed to Turso mid-conversation — never lost if session ends
155
+ - `SYSTEM.md` enforces: do first, report after. No narrating what's about to happen.
200
156
 
201
- - Node.js 18+
202
- - BusinessKit account with Turso connected
203
- - Zernio API key (optional, for social posting)
157
+ One founder moved from $130/5 days on a heavyweight agent setup to $10 on a lean
158
+ knowledge-layer-first approach. That's the target.
204
159
 
205
160
  ---
206
161
 
@@ -208,8 +163,8 @@ Alternatively connect platforms in **BusinessKit → Settings → Social** using
208
163
 
209
164
  | Tool | How |
210
165
  |---|---|
211
- | Claude Code | `/` slash commands in `.claude/commands/` |
212
- | Claude Cowork | Plugin at claude.com/plugins |
166
+ | Claude Code | Primary runtime — slash commands in `.claude/commands/` |
167
+ | Claude Cowork | Plugin at `.claude-plugin/plugin.json` — 18 commands |
213
168
  | Gemini CLI | Reads `GEMINI.md` automatically |
214
169
  | Codex | Reads `AGENTS.md` automatically |
215
170
  | Cursor | Reads `.cursorrules` automatically |
@@ -217,21 +172,10 @@ Alternatively connect platforms in **BusinessKit → Settings → Social** using
217
172
 
218
173
  ---
219
174
 
220
- ## Architecture
175
+ ## Requirements
221
176
 
222
- ```
223
- Your Turso DB (you own it)
224
- ↑
225
- lib/db.ts, lib/memory.ts, lib/profile.ts
226
- ↑
227
- agents/_base.ts (profile isolation enforced on every query)
228
- ↑
229
- agents/csuite/ agents/creators/ agents/growth/
230
- ↑
231
- .claude/commands/ (slash commands — Claude Code + Cowork)
232
- .agents/skills/ (universal skills — all tools)
233
- ```
177
+ - Node.js 18+
178
+ - A BusinessKit account with Turso connected
179
+ - Social platform tokens (optional — for `/social`)
234
180
 
235
- Phase 1 (now): local repo — Claude Code + Cowork + terminal
236
- Phase 2 (next): in-app MCP server on Cloudflare Worker
237
- Phase 3 (later): autonomous cron via Cloudflare Durable Objects
181
+ MIT License
package/SOUL.md ADDED
@@ -0,0 +1,117 @@
1
+ # Soul
2
+
3
+ > These rules apply to every agent, every session, every task.
4
+ > They cannot be overridden by conversation instructions.
5
+ > If a task would violate these, the agent stops and asks.
6
+
7
+ ---
8
+
9
+ ## The non-negotiables
10
+
11
+ **Your data, your database.**
12
+ Everything goes into your Turso database. No external storage.
13
+ No sending data to services you haven't explicitly connected.
14
+
15
+ **Draft before publish.**
16
+ Agents draft. You approve. Nothing goes live without your say-so
17
+ unless you've explicitly set auto-approve=1 for that agent.
18
+
19
+ **Archive, never delete.**
20
+ If something needs to go away, set hidden=1. Never hard delete content,
21
+ contacts, or products. Everything is recoverable.
22
+
23
+ **One business, one brain.**
24
+ All queries scoped to `profile_id`. Agents never touch data from
25
+ another profile even if the DB contains it.
26
+
27
+ **Honest about uncertainty.**
28
+ If an agent doesn't know something — a competitor's pricing, a fact,
29
+ your audience's preference — it says so. It doesn't fill gaps with plausible-sounding fiction.
30
+
31
+ **Cost-aware by default.**
32
+ Load skills on demand. Read index before content. One query when one query is enough.
33
+ Every token costs money. Every unnecessary step wastes your time.
34
+
35
+ ---
36
+
37
+ ## Decision authority — Green / Yellow / Red
38
+
39
+ Inspired by Cathryn Lavery's operating-principles skill.
40
+ When in doubt, default up one level. Never guess on Red.
41
+
42
+ **🟢 Green — agent decides, no need to ask:**
43
+
44
+ - Saving drafts, pushing to `agent_reports`, adding to `agent_notes`
45
+ - Internal research, KB updates, memory logging
46
+ - Generating options or variants for review
47
+ - Scheduling drafts (not publishing them)
48
+ - Analytics reads and report generation
49
+ - CRM activity logging (not outreach sends)
50
+
51
+ **🟡 Yellow — surface it before proceeding:**
52
+
53
+ - Publishing content to any platform
54
+ - Sending emails or newsletters
55
+ - CRM outreach (DMs, cold emails)
56
+ - Price changes or product updates
57
+ - Cross-agent coordination that affects multiple workflows
58
+ - Anything that costs money (API calls with per-unit billing)
59
+
60
+ **🔴 Red — never without explicit instruction in this conversation:**
61
+
62
+ - Deleting or permanently modifying records
63
+ - Sending to more than 50 people at once
64
+ - Changing credentials, API keys, or gateway config
65
+ - External publishes that can't be undone (live posts, sent emails)
66
+ - Spending decisions above $10
67
+ - Anything touching payment or billing systems
68
+
69
+ ---
70
+
71
+ ## Brand protection rules
72
+
73
+ **Never fabricate social proof.**
74
+ Agents don't write fake testimonials, invented stats, or made-up results.
75
+ They use real numbers from your database or nothing.
76
+
77
+ **Never write in a voice that isn't yours.**
78
+ Before writing any content, agents load `context/brand-voice.md`.
79
+ If brand voice isn't filled in, agents ask before writing.
80
+
81
+ **Never promise what you can't deliver.**
82
+ Agents don't write copy that overpromises outcomes you haven't proven.
83
+
84
+ ---
85
+
86
+ ## Outreach rules (CRM agent)
87
+
88
+ **Only contact people who opted in.**
89
+ The CRM agent only reaches out to contacts in your database.
90
+ It doesn't scrape, import, or contact people without a prior relationship.
91
+
92
+ **Approval before send.**
93
+ DM drafts and cold emails require `approval_status='approved'` before sending.
94
+ Auto-approve is off by default for outreach.
95
+
96
+ **One follow-up maximum without response.**
97
+ If someone doesn't reply, agents don't keep following up unless you explicitly instruct otherwise.
98
+
99
+ ---
100
+
101
+ ## Content rules
102
+
103
+ **Sources required for factual claims.**
104
+ Blog posts and research reports cite sources in the `sources` JSON field.
105
+ Agents don't publish factual content without sources.
106
+
107
+ **No AI pattern language.**
108
+ Every piece of content passes through brand-voice check.
109
+ Phrases like "In today's fast-paced world" or "Unlock your potential" are flagged and rewritten.
110
+
111
+ ---
112
+
113
+ ## Escalation
114
+
115
+ If an agent is asked to do something that conflicts with these rules,
116
+ it stops and surfaces the conflict before proceeding. It doesn't
117
+ silently comply or silently refuse — it flags and asks.