mango-lollipop 0.1.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/CLAUDE.md ADDED
@@ -0,0 +1,69 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Mango Lollipop is an AI-powered lifecycle messaging generator for SaaS companies. It runs entirely through Claude Code skills — no hosted services. It analyzes a business, generates a complete AARRR lifecycle messaging matrix, writes full message copy in the user's brand voice, and outputs production-ready deliverables (Excel, HTML dashboard, markdown message files).
8
+
9
+ The authoritative spec is `mango-lollipop-spec.md` at the project root. Always consult it for detailed requirements before implementing.
10
+
11
+ ## Architecture
12
+
13
+ ### Skills-based design
14
+ The core logic lives in Claude Code skills under `skills/`, each with a `SKILL.md`:
15
+ - **start** — Gather business info via dual-path onboarding (fresh vs. existing messaging)
16
+ - **generate-matrix** — Build the AARRR lifecycle matrix from analysis output
17
+ - **generate-messages** — Write full message copy in the brand's voice (batched by 10)
18
+ - **generate-dashboard** — Create HTML dashboard + executive overview
19
+ - **dev-handoff** — Generate developer hand-off documents (intro email + technical event spec)
20
+ - **audit** — Deep analysis for users with existing messaging (maturity scorecard, gap analysis)
21
+ - **iterate** — Conversational refinement of the matrix
22
+
23
+ ### Data flow
24
+ `start` produces `analysis.json` → `generate-matrix` produces `matrix.json` + `matrix.xlsx` → `generate-messages` writes `messages/{STAGE}/{ID}-{slug}.md` → `generate-dashboard` produces `dashboard.html`, `overview.html`
25
+
26
+ ### Key data model (defined in `lib/schema.ts`)
27
+ Messages use the industry-standard trigger/wait/guard/suppression model (not "delay"/"not sent if"). See spec section 2.4 for the `Message`, `Trigger`, `Guard`, `Suppression` interfaces. Transactional messages (TX-*) are always separated from lifecycle messages (AARRR stages: AQ, AC, RV, RT, RF).
28
+
29
+ ### Output structure
30
+ All generated files go to `output/{project-name}/` (gitignored). Messages are organized into stage folders: `TX/`, `AQ/`, `AC/`, `RV/`, `RT/`, `RF/`.
31
+
32
+ ## Tech Stack
33
+
34
+ | Component | Technology |
35
+ |-----------|-----------|
36
+ | CLI framework | Commander.js |
37
+ | Skills runtime | Claude Code |
38
+ | Excel generation | SheetJS (xlsx) |
39
+ | HTML outputs | Vanilla HTML + Tailwind CDN |
40
+ | Data format | JSON + YAML frontmatter in .md |
41
+ | Package manager | npm |
42
+
43
+ No PDF generation, no Puppeteer, no build tools.
44
+
45
+ ## Commands
46
+
47
+ ```bash
48
+ # CLI
49
+ mango-lollipop init [project-name] # Scaffold project directory
50
+ mango-lollipop generate # Run full pipeline (matrix → messages → visuals)
51
+ mango-lollipop audit # Audit existing messaging
52
+ mango-lollipop view # Open dashboard.html in browser
53
+ mango-lollipop export excel|html|messages
54
+ mango-lollipop status # Message counts per stage, channel distribution, tags
55
+
56
+ ```
57
+
58
+ ## Conventions
59
+
60
+ - **One channel per message entry.** Each message targets exactly one channel (`"channel": "email"` or `"channel": "in-app"`). If a logical message needs both, create two entries with sequential IDs.
61
+ - Message IDs follow the pattern `{STAGE}-{NN}` (e.g., `AC-03`, `TX-01`)
62
+ - Wait durations use ISO 8601: `P0D` (instant), `PT5M` (5 min), `P2D` (2 days)
63
+ - Guards use AND logic (all must pass); suppressions use OR logic (any cancels)
64
+ - Tags are freeform strings with category prefixes: `type:`, `source:`, `plan:`, `segment:`, `feature:`, `priority:`
65
+ - Message files use YAML frontmatter + markdown body with channel-specific sections (`## Email`, `## In-App`, etc.)
66
+ - Personalization tokens: `{{first_name}}`, `{{company_name}}`, `{{feature_name}}`
67
+ - Transactional messages are non-negotiable (always generated) and legally distinct from lifecycle messages
68
+ - HTML outputs are self-contained single files (CDN dependencies only)
69
+ - Favor minimal implementations; add complexity only when clearly required
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sasha Kai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,264 @@
1
+ # 🥭🍭 Mango Lollipop
2
+
3
+ AI-powered lifecycle messaging generator for SaaS companies.
4
+
5
+ Mango Lollipop uses Claude Code to analyze your business, generate a complete lifecycle messaging matrix using the AARRR pirate metrics framework, write full message copy in your brand voice, and produce production-ready deliverables -- all from your terminal.
6
+
7
+ It builds on proven industry templates, copywriting frameworks, and lifecycle best practices so you don't have to start from a blank page or reinvent the wheel.
8
+
9
+ ## Philosophy
10
+
11
+ - **Local only** -- runs entirely on your machine through Claude Code. No hosted services, no accounts, no data leaving your terminal.
12
+ - **Production-ready deliverables** -- everything it generates (Excel, HTML, markdown) is ready to hand off to engineering or share with stakeholders. No "demo quality" output.
13
+ - **Some effort required** -- this is a collaborative tool, not a magic button. You review each step, give feedback, and steer the output. The AI does the heavy lifting, but your judgment makes it good.
14
+ - **Step by step** -- each skill runs independently so you can review, iterate, and course-correct before moving on. Rushing through produces mediocre results.
15
+ - **Scalable** -- works for a 5-message onboarding sequence or a 50-message lifecycle system. The framework scales; the effort stays manageable.
16
+ - **Easy, not complex** -- no build tools, no databases, no config files to wrestle with. Install, init, and start talking to Claude Code.
17
+
18
+ ## What You Get
19
+
20
+ - **Excel matrix** -- your lifecycle messaging source of truth (`matrix.xlsx`) with a Welcome sheet, color-coded stages, and 5 data sheets
21
+ - **Interactive dashboard** -- sortable, filterable message matrix with tag sidebar and journey map (`dashboard.html`)
22
+ - **Message previews** -- channel-specific visual previews for email, in-app, SMS, and push (`messages.html`)
23
+ - **Executive overview** -- clean, printable summary for stakeholders (`overview.html`)
24
+ - **Full message copy** -- emails, in-app, push, SMS written in your voice (`messages/`)
25
+ - **Developer hand-off** -- introduction email + technical event spec for your engineering team
26
+ - **Iterative refinement** -- tweak anything conversationally through Claude Code
27
+
28
+ ## Two Paths
29
+
30
+ **Starting fresh?** Mango Lollipop builds your entire messaging system from scratch based on your product, audience, and voice.
31
+
32
+ **Have existing messages?** Paste them in, share your stats, and Mango Lollipop audits what you have, fills gaps, and improves what's not working.
33
+
34
+ ## Quick Start
35
+
36
+ ```bash
37
+ # Install
38
+ npm install -g mango-lollipop
39
+
40
+ # Initialize a project
41
+ mango-lollipop init my-company
42
+
43
+ # Open Claude Code in your project and run the start skill
44
+ /start
45
+ ```
46
+
47
+ ## Typical Workflow
48
+
49
+ Mango Lollipop is designed to be used step by step. Each skill produces output you should review before moving on -- this is how you get good results instead of a wall of AI-generated text you have to untangle later.
50
+
51
+ Stay in Claude Code for the entire workflow. Every step is a slash command.
52
+
53
+ **Step 1: Analyze your business**
54
+ ```
55
+ > /start
56
+ ```
57
+ Paste your website URL and Claude will pull most of the information it needs automatically. It'll ask follow-up questions about your channels, voice, and key features. Review `analysis.json` when it's done -- this is the foundation everything else builds on.
58
+
59
+ **Step 2: Generate the messaging matrix**
60
+ ```
61
+ > /generate-matrix
62
+ ```
63
+ Creates every message with triggers, guards, suppressions, and timing. Open `matrix.xlsx` and review the strategy. Too many messages? Wrong triggers? Use `/iterate` to tweak before moving on.
64
+
65
+ **Step 3: Write the message copy**
66
+ ```
67
+ > /generate-messages
68
+ ```
69
+ Spins up a team of AI copywriters that work in parallel, each writing a batch of 10 messages in your brand voice. Spot-check a few messages in the `messages/` folder when they're done. If the tone is off, tell Claude and it'll adjust.
70
+
71
+ **Step 4: Generate visual deliverables**
72
+ ```
73
+ > /generate-dashboard
74
+ ```
75
+ Creates the interactive dashboard, message previews, and executive overview. Open `dashboard.html` in your browser to explore the full matrix with filters, journey maps, and channel-specific message previews.
76
+
77
+ **Step 5: Hand off to engineering**
78
+ ```
79
+ > /dev-handoff
80
+ ```
81
+ Generates two files: `dev-handoff-email.md` (an introduction email you can customize and send to your engineering team) and `event-spec.html` (the full technical event spec with payloads and code examples). Review both before sharing.
82
+
83
+ At any point, use `/iterate` to go back and change things conversationally, or `/audit` if you have existing messages you want analyzed first.
84
+
85
+ ## Skills Reference
86
+
87
+ All 7 skills run inside Claude Code as slash commands.
88
+
89
+ ### `/start` -- Business Analysis & Onboarding
90
+
91
+ Gathers your product info, voice samples, channel preferences, and event taxonomy. Paste your website URL and Claude extracts most of the details automatically -- you just confirm and fill in the gaps.
92
+
93
+ **Prerequisites:** An initialized project (`mango-lollipop init`)
94
+ **Outputs:** `analysis.json`, updated `mango-lollipop.json`
95
+
96
+ ```
97
+ > /start
98
+ # Paste your website URL, answer a few questions, done
99
+ ```
100
+
101
+ ### `/generate-matrix` -- Build the Lifecycle Matrix
102
+
103
+ Creates the complete AARRR messaging matrix with transactional messages, triggers, guards, and suppressions.
104
+
105
+ **Prerequisites:** `analysis.json` from `/start`
106
+ **Outputs:** `matrix.json`, `matrix.xlsx` (6-sheet workbook with Welcome sheet and color-coded stages)
107
+
108
+ ```
109
+ > /generate-matrix
110
+ # Generates TX-01 through RF-XX with full trigger/guard/suppression logic
111
+ ```
112
+
113
+ ### `/generate-messages` -- Write Message Copy
114
+
115
+ Spins up a parallel team of AI copywriters that write full message copy in your brand voice, batched by 10.
116
+
117
+ **Prerequisites:** `matrix.json` from `/generate-matrix`
118
+ **Outputs:** `messages/{STAGE}/{ID}-{slug}.md` files with YAML frontmatter and channel-specific body sections
119
+
120
+ ```
121
+ > /generate-messages
122
+ # Writes all message copy, 10 messages at a time
123
+ ```
124
+
125
+ ### `/generate-dashboard` -- Create Visual Deliverables
126
+
127
+ Generates the interactive dashboard, message preview viewer, and printable executive overview.
128
+
129
+ **Prerequisites:** `matrix.json`, `analysis.json`, optionally `messages/` directory
130
+ **Outputs:** `dashboard.html`, `messages.html`, `overview.html`
131
+
132
+ ```
133
+ > /generate-dashboard
134
+ # Creates 3 HTML files with journey maps, previews, and stats
135
+ ```
136
+
137
+ ### `/dev-handoff` -- Developer Hand-Off Documents
138
+
139
+ Generates an introduction email from marketing to engineering and a detailed technical event implementation spec.
140
+
141
+ **Prerequisites:** `matrix.json`, `analysis.json`
142
+ **Outputs:** `dev-handoff-email.md`, `event-spec.html`
143
+
144
+ ```
145
+ > /dev-handoff
146
+ # Creates the email draft + interactive technical spec with code examples
147
+ ```
148
+
149
+ ### `/audit` -- Audit Existing Messaging
150
+
151
+ Deep analysis of your current lifecycle messaging with a maturity scorecard, gap analysis, and improvement recommendations.
152
+
153
+ **Prerequisites:** Your existing messages (pasted or described during the session)
154
+ **Outputs:** Audit report with maturity scores and prioritized recommendations
155
+
156
+ ```
157
+ > /audit
158
+ # Paste your existing messages and stats for a full gap analysis
159
+ ```
160
+
161
+ ### `/iterate` -- Conversational Refinement
162
+
163
+ Modify the matrix conversationally -- add, remove, or tweak messages based on feedback.
164
+
165
+ **Prerequisites:** `matrix.json`
166
+ **Outputs:** Updated `matrix.json` and `matrix.xlsx`
167
+
168
+ ```
169
+ > /iterate
170
+ # "Add a win-back email for users who cancelled" or "Change AC-03 to fire after 5 days"
171
+ ```
172
+
173
+ ## Output Files
174
+
175
+ | File | Description |
176
+ |------|-------------|
177
+ | `mango-lollipop.json` | Project configuration and state |
178
+ | `analysis.json` | Business analysis from the start skill |
179
+ | `matrix.json` | Structured messaging matrix (machine-readable) |
180
+ | `matrix.xlsx` | Full lifecycle matrix spreadsheet (Welcome + 5 data sheets, color-coded) |
181
+ | `dashboard.html` | Interactive dashboard with journey map, sortable matrix, tag filtering |
182
+ | `messages.html` | Channel-specific message previews with hash routing and keyboard nav |
183
+ | `overview.html` | Clean, printable executive summary with strategy overview |
184
+ | `messages/{STAGE}/*.md` | Individual message files with YAML frontmatter and full copy per channel |
185
+ | `dev-handoff-email.md` | Introduction email from marketing to engineering |
186
+ | `event-spec.html` | Technical event implementation spec with payloads and code examples |
187
+
188
+ ## AARRR Framework
189
+
190
+ Every message maps to a pirate metrics lifecycle stage:
191
+
192
+ | Stage | Code | Purpose |
193
+ |-------|------|---------|
194
+ | Acquisition | `AQ` | Get users signed up and verified |
195
+ | Activation | `AC` | Drive to the "aha moment" |
196
+ | Revenue | `RV` | Convert free to paid, expand |
197
+ | Retention | `RT` | Keep users engaged and coming back |
198
+ | Referral | `RF` | Turn users into advocates |
199
+
200
+ Transactional messages (`TX`) are separated from lifecycle messages. They're non-negotiable (email verification, password reset, receipts), legally distinct, and always generated.
201
+
202
+ ## Message Model
203
+
204
+ Every message targets exactly **one channel**: `email`, `in-app`, `sms`, or `push`. If a logical message needs to go out on both email and in-app, it becomes two separate entries with sequential IDs.
205
+
206
+ Each message includes:
207
+
208
+ - **Trigger** -- the event that fires the message (e.g., `user.email_verified`, `trial.ending_soon`). Can be an event, a scheduled job, or a behavioral signal.
209
+ - **Wait** -- how long to pause after the trigger before sending. Uses ISO 8601 durations: `P0D` (instant), `PT5M` (5 minutes), `P2D` (2 days).
210
+ - **Guards** -- conditions that must ALL be true for the message to send. Example: "User has not completed onboarding" prevents sending a getting-started guide to someone who already finished it. Guards use AND logic.
211
+ - **Suppressions** -- conditions where ANY one being true cancels the message. Example: "User already used this feature" prevents nagging about a feature they've already discovered. Suppressions use OR logic.
212
+
213
+ This trigger/wait/guard/suppression model gives you precise control over when messages fire, what conditions must hold, and what should cancel them -- without hardcoding logic into your app.
214
+
215
+ ## Project Structure
216
+
217
+ ```
218
+ mango-lollipop/
219
+ ├── bin/ # CLI entry point
220
+ ├── skills/ # Claude Code skills
221
+ │ ├── start/ # Business analysis + onboarding
222
+ │ ├── generate-matrix/ # Matrix generation
223
+ │ ├── generate-messages/ # Message copy writing
224
+ │ ├── generate-dashboard/ # Dashboard + journey maps
225
+ │ ├── audit/ # Existing messaging audit
226
+ │ ├── dev-handoff/ # Developer hand-off documents
227
+ │ └── iterate/ # Conversational refinement
228
+ ├── templates/ # Output templates + event taxonomies
229
+ │ └── events/ # Industry-specific event templates
230
+ ├── lib/ # Shared utilities (schema, excel, html, mermaid)
231
+ └── output/ # Generated project output (gitignored)
232
+ └── {project-name}/
233
+ ├── mango-lollipop.json
234
+ ├── analysis.json
235
+ ├── matrix.json
236
+ ├── matrix.xlsx
237
+ ├── dashboard.html
238
+ ├── messages.html
239
+ ├── overview.html
240
+ ├── dev-handoff-email.md
241
+ ├── event-spec.html
242
+ └── messages/
243
+ ├── TX/
244
+ ├── AQ/
245
+ ├── AC/
246
+ ├── RV/
247
+ ├── RT/
248
+ └── RF/
249
+ ```
250
+
251
+ ## Tech Stack
252
+
253
+ | Component | Technology |
254
+ |-----------|-----------|
255
+ | CLI framework | Commander.js |
256
+ | Skills runtime | Claude Code |
257
+ | Excel generation | xlsx-js-style |
258
+ | HTML outputs | Vanilla HTML + Tailwind CDN + Mermaid.js CDN |
259
+ | Data format | JSON + YAML frontmatter in Markdown |
260
+ | Package manager | npm |
261
+
262
+ ## License
263
+
264
+ [MIT](LICENSE)