mango-lollipop 0.1.0 → 0.1.1
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/{skills → .claude/skills}/audit/SKILL.md +10 -3
- package/{skills → .claude/skills}/dev-handoff/SKILL.md +10 -5
- package/{skills → .claude/skills}/generate-dashboard/SKILL.md +12 -7
- package/{skills → .claude/skills}/generate-matrix/SKILL.md +12 -8
- package/{skills → .claude/skills}/generate-messages/SKILL.md +11 -9
- package/{skills → .claude/skills}/iterate/SKILL.md +10 -5
- package/{skills → .claude/skills}/start/SKILL.md +11 -7
- package/CLAUDE.md +2 -1
- package/README.md +11 -8
- package/bin/mango-lollipop.js +60 -6
- package/package.json +2 -2
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Audit
|
|
3
|
+
description: Deep analysis of existing lifecycle messaging with maturity scorecard
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Audit Existing Lifecycle Messaging
|
|
2
7
|
|
|
3
8
|
You are a lifecycle messaging auditor. Your job is to perform a deep analysis of a company's existing messaging system, score its maturity, identify gaps, and provide actionable recommendations for improvement.
|
|
@@ -220,9 +225,9 @@ For each gap, suggest specific messages to fill it:
|
|
|
220
225
|
|
|
221
226
|
## File Output
|
|
222
227
|
|
|
223
|
-
If an `analysis.json` exists in the
|
|
228
|
+
If an `analysis.json` exists in the current directory, update it with audit results in the `existing` field.
|
|
224
229
|
|
|
225
|
-
If running standalone (no existing project), write the audit results to `
|
|
230
|
+
If running standalone (no existing project), write the audit results to `audit-results.json` with this structure:
|
|
226
231
|
|
|
227
232
|
```json
|
|
228
233
|
{
|
|
@@ -245,4 +250,6 @@ If running standalone (no existing project), write the audit results to `{projec
|
|
|
245
250
|
|
|
246
251
|
After presenting the audit, ask: "Would you like me to generate a complete matrix that incorporates your existing messages and fills these gaps? I'll preserve what's working and improve what isn't."
|
|
247
252
|
|
|
248
|
-
If yes, proceed to run
|
|
253
|
+
If yes, proceed to run `/generate-matrix` with the audit data.
|
|
254
|
+
|
|
255
|
+
$ARGUMENTS
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Dev Hand-Off
|
|
3
|
+
description: Generate developer hand-off documents (introduction email + technical event spec)
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Generate Developer Hand-Off Documents
|
|
2
7
|
|
|
3
8
|
You are a technical documentation specialist bridging the gap between lifecycle marketing and engineering. Your job is to extract all product events from the messaging matrix, infer their payload schemas, and produce two deliverables: an introduction email marketing can send to the dev team, and a detailed technical event implementation spec.
|
|
4
9
|
|
|
5
10
|
## Input
|
|
6
11
|
|
|
7
|
-
Read from the
|
|
12
|
+
Read from the current directory:
|
|
8
13
|
1. **`analysis.json`** -- Company info, channels, voice profile, event taxonomy
|
|
9
14
|
2. **`matrix.json`** -- All messages with triggers, guards, suppressions
|
|
10
15
|
|
|
11
|
-
Locate the project output directory by checking the current working directory or `output/*/` subdirectories.
|
|
12
|
-
|
|
13
16
|
---
|
|
14
17
|
|
|
15
18
|
## Step 1: Extract Events
|
|
@@ -167,7 +170,7 @@ The complete technical spec with payload schemas, code examples, and implementat
|
|
|
167
170
|
[Friendly sign-off matching the brand voice]
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
Write to `
|
|
173
|
+
Write to `dev-handoff-email.md`.
|
|
171
174
|
|
|
172
175
|
---
|
|
173
176
|
|
|
@@ -282,7 +285,7 @@ A table of all user profile attributes extracted from guard/suppression expressi
|
|
|
282
285
|
</footer>
|
|
283
286
|
```
|
|
284
287
|
|
|
285
|
-
Write to `
|
|
288
|
+
Write to `event-spec.html`.
|
|
286
289
|
|
|
287
290
|
---
|
|
288
291
|
|
|
@@ -293,3 +296,5 @@ After generating both files:
|
|
|
293
296
|
1. Tell the user: "Your developer hand-off documents are ready."
|
|
294
297
|
2. Summarize: "[N] events extracted, [N critical / N high / N medium / N low]. The email draft is in `dev-handoff-email.md` and the full technical spec is in `event-spec.html`."
|
|
295
298
|
3. Suggest: "Open `event-spec.html` in a browser to review the full spec. Edit `dev-handoff-email.md` to customize the email before sending it to your engineering team."
|
|
299
|
+
|
|
300
|
+
$ARGUMENTS
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Generate Dashboard
|
|
3
|
+
description: Create journey map, interactive dashboard, and executive overview
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Generate Visual Deliverables
|
|
2
7
|
|
|
3
8
|
You are a lifecycle messaging visualization specialist. Your job is to create three visual outputs from the messaging matrix: an interactive HTML dashboard, a message preview viewer, and a printable executive overview.
|
|
4
9
|
|
|
5
10
|
## Input
|
|
6
11
|
|
|
7
|
-
Read from the
|
|
12
|
+
Read from the current directory:
|
|
8
13
|
1. **`analysis.json`** -- Company info, channels, voice profile
|
|
9
14
|
2. **`matrix.json`** -- All messages with triggers, guards, suppressions, channels, tags
|
|
10
15
|
3. **`messages/`** directory -- Individual message files (for preview content in dashboard)
|
|
11
16
|
|
|
12
|
-
Locate the project output directory by checking the current working directory or `output/*/` subdirectories.
|
|
13
|
-
|
|
14
17
|
---
|
|
15
18
|
|
|
16
19
|
## Output A: Interactive Dashboard (`dashboard.html`)
|
|
@@ -75,7 +78,7 @@ Filters across sections use AND logic (stage AND channel AND tag must match).
|
|
|
75
78
|
</footer>
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
Write the output to `
|
|
81
|
+
Write the output to `dashboard.html`.
|
|
79
82
|
|
|
80
83
|
---
|
|
81
84
|
|
|
@@ -107,7 +110,7 @@ Each message renders in a visual template matching its channel:
|
|
|
107
110
|
- If copy hasn't been generated yet, the viewer shows a placeholder with the message's comments and a note to run `generate-messages`.
|
|
108
111
|
- Content is parsed from markdown files: `## Email`, `## In-App`, `## SMS`, `## Push Notification` sections.
|
|
109
112
|
|
|
110
|
-
Write the output to `
|
|
113
|
+
Write the output to `messages.html`.
|
|
111
114
|
|
|
112
115
|
---
|
|
113
116
|
|
|
@@ -171,7 +174,7 @@ Create a clean, printable HTML page designed for sharing with stakeholders.
|
|
|
171
174
|
6. RF messages (growth)
|
|
172
175
|
7. Remaining AC messages
|
|
173
176
|
|
|
174
|
-
Write the output to `
|
|
177
|
+
Write the output to `overview.html`.
|
|
175
178
|
|
|
176
179
|
---
|
|
177
180
|
|
|
@@ -183,7 +186,7 @@ Generate all outputs by running the following commands:
|
|
|
183
186
|
npm run build && node bin/mango-lollipop.js export visuals
|
|
184
187
|
```
|
|
185
188
|
|
|
186
|
-
This creates three files in the project
|
|
189
|
+
This creates three files in the project directory:
|
|
187
190
|
- `dashboard.html` -- Interactive dashboard with filters and sorting
|
|
188
191
|
- `messages.html` -- Channel-specific message previews with hash routing
|
|
189
192
|
- `overview.html` -- Printable executive overview
|
|
@@ -193,3 +196,5 @@ After the command succeeds:
|
|
|
193
196
|
1. Update `mango-lollipop.json` to set `stage: "visuals-generated"`
|
|
194
197
|
2. Tell the user: "Your visual deliverables are ready. Open `dashboard.html` in a browser for the interactive view, click any message to see the full preview in `messages.html`, or share `overview.html` as a printable summary."
|
|
195
198
|
3. Suggest: "You can run `mango-lollipop view` to open the dashboard in your default browser."
|
|
199
|
+
|
|
200
|
+
$ARGUMENTS
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Generate Matrix
|
|
3
|
+
description: Build the AARRR lifecycle matrix from analysis.json
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Generate Lifecycle Matrix
|
|
2
7
|
|
|
3
8
|
You are a lifecycle messaging architect. Your job is to build the complete messaging matrix from a business analysis, producing a structured JSON file that contains every message the business needs -- both transactional and lifecycle.
|
|
4
9
|
|
|
10
|
+
Look for `analysis.json` in the current directory.
|
|
11
|
+
|
|
5
12
|
## CRITICAL RULE: One Channel Per Message
|
|
6
13
|
|
|
7
14
|
**Every message entry must target exactly ONE channel.** Email and in-app are different mediums with different copy, length, and format. Never combine them.
|
|
@@ -16,15 +23,10 @@ This applies to all stages. Sequential IDs are assigned per stage across all cha
|
|
|
16
23
|
|
|
17
24
|
## Input
|
|
18
25
|
|
|
19
|
-
Read `analysis.json` from the
|
|
26
|
+
Read `analysis.json` from the current directory. This file was produced by the `start` skill and contains the company profile, channels, voice, events, tags, and (for PATH B) existing messages.
|
|
20
27
|
|
|
21
28
|
Also read `templates/copywriting-guide.md` for proven sequence patterns. Use the "Applying Patterns to AARRR Stages" section to choose the best pattern for each stage based on the product type. For example, use the Guided Training pattern for activation if the product has a clear step-by-step workflow, or the Progress Milestones pattern if the product has a checklist-style onboarding.
|
|
22
29
|
|
|
23
|
-
Locate the project output directory by:
|
|
24
|
-
1. Checking the current working directory for `analysis.json`
|
|
25
|
-
2. Checking `output/*/analysis.json`
|
|
26
|
-
3. If not found, ask the user where their project directory is
|
|
27
|
-
|
|
28
30
|
---
|
|
29
31
|
|
|
30
32
|
## Step 1: Generate Transactional Messages (TX) -- Always
|
|
@@ -239,7 +241,7 @@ Add any custom tags suggested in `analysis.tags` that are relevant.
|
|
|
239
241
|
|
|
240
242
|
## Output: matrix.json
|
|
241
243
|
|
|
242
|
-
Write `matrix.json` to the
|
|
244
|
+
Write `matrix.json` to the current directory (same directory as `analysis.json`).
|
|
243
245
|
|
|
244
246
|
Structure:
|
|
245
247
|
|
|
@@ -344,7 +346,7 @@ Run the following commands to compile the TypeScript library and generate `matri
|
|
|
344
346
|
npm run build && node bin/mango-lollipop.js export excel
|
|
345
347
|
```
|
|
346
348
|
|
|
347
|
-
This creates a 6-sheet Excel workbook in the project
|
|
349
|
+
This creates a 6-sheet Excel workbook in the project directory alongside `matrix.json`:
|
|
348
350
|
1. **Welcome** — Cover sheet with project info (company, channels, message count) and a guide to each tab
|
|
349
351
|
2. **Transactional Messages** — TX messages with gray row fills
|
|
350
352
|
3. **Lifecycle Matrix** — AARRR messages with stage-colored row fills (green=AQ, blue=AC, yellow=RV, orange=RT, purple=RF)
|
|
@@ -372,3 +374,5 @@ Show a summary table to the user:
|
|
|
372
374
|
| RF | 2 | email, in-app | 2 new |
|
|
373
375
|
|
|
374
376
|
Mention that `matrix.xlsx` was generated and is ready to open.
|
|
377
|
+
|
|
378
|
+
$ARGUMENTS
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Generate Messages
|
|
3
|
+
description: Write full message copy in the brand's voice (batched by 10)
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Generate Message Copy
|
|
2
7
|
|
|
3
8
|
You are a lifecycle messaging copywriter. Your job is to write full, production-ready message copy for every message in the lifecycle matrix, matching the brand's voice exactly and following channel-specific requirements.
|
|
4
9
|
|
|
5
10
|
## Input
|
|
6
11
|
|
|
7
|
-
Read from the
|
|
12
|
+
Read from the current directory:
|
|
8
13
|
1. **`analysis.json`** -- For voice profile, sender personas, company context, and channel preferences
|
|
9
14
|
2. **`matrix.json`** -- For the list of messages to write, with their triggers, guards, channels, and metadata
|
|
10
15
|
3. **`templates/copywriting-guide.md`** -- Reference guide with proven SaaS email patterns, copy rules, anti-patterns, and benchmarks. Read this before writing any copy and apply its principles throughout.
|
|
11
16
|
|
|
12
17
|
The copywriting guide contains real-world sequence patterns (Guided Training, Behavior-Driven Nudging, Progress Milestones, etc.) and rules for structure, subject lines, CTAs, and tone. Follow these closely.
|
|
13
18
|
|
|
14
|
-
Locate the project output directory by:
|
|
15
|
-
1. Checking the current working directory for these files
|
|
16
|
-
2. Checking `output/*/analysis.json`
|
|
17
|
-
3. If not found, ask the user
|
|
18
|
-
|
|
19
19
|
---
|
|
20
20
|
|
|
21
21
|
## Voice Matching Rules
|
|
@@ -125,7 +125,7 @@ Each stage writes to its own directory (`messages/{STAGE}/`) — zero file confl
|
|
|
125
125
|
1. **Prepare** — Read `matrix.json` and group messages by stage. Read `analysis.json` and `templates/copywriting-guide.md` for voice profile and copy rules.
|
|
126
126
|
2. **Spawn team** — Use `TeamCreate` to create a team, then `TaskCreate` for each stage that has messages. Spawn one writer agent per stage using the `Task` tool with `subagent_type: "general-purpose"` and `team_name` set to the team.
|
|
127
127
|
3. **Each agent's task description must include:**
|
|
128
|
-
- The project
|
|
128
|
+
- The project directory path
|
|
129
129
|
- The list of message IDs to write for that stage
|
|
130
130
|
- The full voice profile parameters (tone, formality, emoji usage, sample phrases, sender personas)
|
|
131
131
|
- Channel-specific requirements (from the "Channel-Specific Requirements" section above)
|
|
@@ -178,7 +178,7 @@ For messages with `origin: "improved"`:
|
|
|
178
178
|
|
|
179
179
|
For each message, create a markdown file at:
|
|
180
180
|
```
|
|
181
|
-
|
|
181
|
+
messages/{STAGE}/{ID}-{slug}.md
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
Where:
|
|
@@ -259,4 +259,6 @@ After all messages are generated:
|
|
|
259
259
|
1. Present a final summary: total messages written, broken down by stage and channel
|
|
260
260
|
2. Note any messages that were skipped (e.g., channel not available)
|
|
261
261
|
3. Update `mango-lollipop.json` to set `stage: "messages-generated"`
|
|
262
|
-
4. Tell the user: "All message copy has been generated. Run
|
|
262
|
+
4. Tell the user: "All message copy has been generated. Run `/generate-dashboard` next to create the dashboard and journey map."
|
|
263
|
+
|
|
264
|
+
$ARGUMENTS
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Iterate
|
|
3
|
+
description: Modify the lifecycle matrix conversationally (add, remove, change messages)
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Iterate on Lifecycle Matrix
|
|
2
7
|
|
|
3
8
|
You are a lifecycle messaging architect helping the user refine their messaging matrix through conversation. You apply requested changes to the matrix, regenerate affected files, and show the user exactly what changed.
|
|
@@ -6,14 +11,12 @@ You are a lifecycle messaging architect helping the user refine their messaging
|
|
|
6
11
|
|
|
7
12
|
## Input
|
|
8
13
|
|
|
9
|
-
Read from the
|
|
14
|
+
Read from the current directory:
|
|
10
15
|
1. **`mango-lollipop.json`** -- Project config
|
|
11
16
|
2. **`matrix.json`** -- Current message matrix
|
|
12
17
|
3. **`analysis.json`** -- Business analysis (for voice profile, company context)
|
|
13
18
|
4. **`messages/`** directory -- Existing message files
|
|
14
19
|
|
|
15
|
-
Locate the project output directory by checking the current working directory or `output/*/` subdirectories.
|
|
16
|
-
|
|
17
20
|
---
|
|
18
21
|
|
|
19
22
|
## Supported Modifications
|
|
@@ -226,7 +229,7 @@ After any change that modifies `matrix.json`, regenerate the Excel export to kee
|
|
|
226
229
|
npm run build && node bin/mango-lollipop.js export excel
|
|
227
230
|
```
|
|
228
231
|
|
|
229
|
-
Do NOT regenerate visual files (dashboard.html, overview.html) automatically. Instead, tell the user: "Matrix and message files updated. Run
|
|
232
|
+
Do NOT regenerate visual files (dashboard.html, overview.html) automatically. Instead, tell the user: "Matrix and message files updated. Run `/generate-dashboard` to update the dashboard."
|
|
230
233
|
|
|
231
234
|
---
|
|
232
235
|
|
|
@@ -237,6 +240,8 @@ After applying changes:
|
|
|
237
240
|
2. Run `npm run build && node bin/mango-lollipop.js export excel` to regenerate the Excel file
|
|
238
241
|
3. Show the diff summary
|
|
239
242
|
4. Confirm: "matrix.xlsx has been updated to reflect the latest changes."
|
|
240
|
-
5. If the changes affect the dashboard, suggest running
|
|
243
|
+
5. If the changes affect the dashboard, suggest running `/generate-dashboard`
|
|
241
244
|
6. Remain available for additional changes -- do not close the conversation
|
|
242
245
|
7. Ask: "Anything else you'd like to change?"
|
|
246
|
+
|
|
247
|
+
$ARGUMENTS
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Start
|
|
3
|
+
description: Start a new Mango Lollipop project — analyze your SaaS business for lifecycle messaging
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Analyze Business for Lifecycle Messaging
|
|
2
7
|
|
|
3
8
|
You are a lifecycle marketing strategist analyzing a SaaS business to build a complete lifecycle messaging system. Your job is to gather all the information needed to generate a great messaging matrix using the AARRR pirate metrics framework.
|
|
4
9
|
|
|
5
10
|
Before starting, read `templates/copywriting-guide.md` for the Three-Track Model (Quick Win → Hook → Conversion) and proven sequence patterns from real SaaS companies. Use this knowledge to inform your recommendations and event taxonomy suggestions.
|
|
6
11
|
|
|
12
|
+
All output files go in the current working directory.
|
|
13
|
+
|
|
7
14
|
## Step 0: Determine User Path
|
|
8
15
|
|
|
9
16
|
Ask the user:
|
|
@@ -214,12 +221,7 @@ Record their primary goal. This will drive prioritization in the matrix generati
|
|
|
214
221
|
|
|
215
222
|
## Output: analysis.json
|
|
216
223
|
|
|
217
|
-
After completing all steps, write the analysis to the
|
|
218
|
-
|
|
219
|
-
Determine the project output directory by:
|
|
220
|
-
1. Looking for an existing `mango-lollipop.json` config file in the current working directory or `output/` subdirectories
|
|
221
|
-
2. If none exists, ask the user for the project name and use `output/{project-name}/`
|
|
222
|
-
3. Create the directory structure if it doesn't exist: `output/{project-name}/messages/{TX,AQ,AC,RV,RT,RF}/`
|
|
224
|
+
After completing all steps, write the analysis to `analysis.json` in the current working directory.
|
|
223
225
|
|
|
224
226
|
Write `analysis.json` with this schema:
|
|
225
227
|
|
|
@@ -307,4 +309,6 @@ After writing the file, present a summary to the user:
|
|
|
307
309
|
- For PATH A: Show the number of transactional + lifecycle messages that will be generated, broken down by stage and channel. Ask "Ready to generate?"
|
|
308
310
|
- For PATH B: Show a maturity scorecard (score per AARRR stage 0-5), identified gaps, and the plan (how many messages to keep, improve, and add new). Ask "Ready to generate?"
|
|
309
311
|
|
|
310
|
-
Also update the `mango-lollipop.json` config file
|
|
312
|
+
Also update the `mango-lollipop.json` config file to set `stage: "analyzed"` and `path` to the chosen path.
|
|
313
|
+
|
|
314
|
+
$ARGUMENTS
|
package/CLAUDE.md
CHANGED
|
@@ -11,7 +11,7 @@ The authoritative spec is `mango-lollipop-spec.md` at the project root. Always c
|
|
|
11
11
|
## Architecture
|
|
12
12
|
|
|
13
13
|
### Skills-based design
|
|
14
|
-
The core logic lives in Claude Code skills under
|
|
14
|
+
The core logic lives in Claude Code skills under `.claude/skills/`:
|
|
15
15
|
- **start** — Gather business info via dual-path onboarding (fresh vs. existing messaging)
|
|
16
16
|
- **generate-matrix** — Build the AARRR lifecycle matrix from analysis output
|
|
17
17
|
- **generate-messages** — Write full message copy in the brand's voice (batched by 10)
|
|
@@ -52,6 +52,7 @@ mango-lollipop audit # Audit existing messaging
|
|
|
52
52
|
mango-lollipop view # Open dashboard.html in browser
|
|
53
53
|
mango-lollipop export excel|html|messages
|
|
54
54
|
mango-lollipop status # Message counts per stage, channel distribution, tags
|
|
55
|
+
mango-lollipop update # Update to the latest version from npm
|
|
55
56
|
|
|
56
57
|
```
|
|
57
58
|
|
package/README.md
CHANGED
|
@@ -37,6 +37,9 @@ It builds on proven industry templates, copywriting frameworks, and lifecycle be
|
|
|
37
37
|
# Install
|
|
38
38
|
npm install -g mango-lollipop
|
|
39
39
|
|
|
40
|
+
# Update to the latest version
|
|
41
|
+
mango-lollipop update
|
|
42
|
+
|
|
40
43
|
# Initialize a project
|
|
41
44
|
mango-lollipop init my-company
|
|
42
45
|
|
|
@@ -217,14 +220,14 @@ This trigger/wait/guard/suppression model gives you precise control over when me
|
|
|
217
220
|
```
|
|
218
221
|
mango-lollipop/
|
|
219
222
|
├── bin/ # CLI entry point
|
|
220
|
-
├── skills/
|
|
221
|
-
│ ├── start/
|
|
222
|
-
│ ├── generate-matrix/
|
|
223
|
-
│ ├── generate-messages/
|
|
224
|
-
│ ├── generate-dashboard/
|
|
225
|
-
│ ├── audit/
|
|
226
|
-
│ ├── dev-handoff/
|
|
227
|
-
│ └── iterate/
|
|
223
|
+
├── .claude/skills/ # Claude Code slash commands (skills)
|
|
224
|
+
│ ├── start/SKILL.md # Business analysis + onboarding
|
|
225
|
+
│ ├── generate-matrix/SKILL.md # Matrix generation
|
|
226
|
+
│ ├── generate-messages/SKILL.md # Message copy writing
|
|
227
|
+
│ ├── generate-dashboard/SKILL.md # Dashboard + journey maps
|
|
228
|
+
│ ├── audit/SKILL.md # Existing messaging audit
|
|
229
|
+
│ ├── dev-handoff/SKILL.md # Developer hand-off documents
|
|
230
|
+
│ └── iterate/SKILL.md # Conversational refinement
|
|
228
231
|
├── templates/ # Output templates + event taxonomies
|
|
229
232
|
│ └── events/ # Industry-specific event templates
|
|
230
233
|
├── lib/ # Shared utilities (schema, excel, html, mermaid)
|
package/bin/mango-lollipop.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { Command } from 'commander';
|
|
4
|
-
import {
|
|
4
|
+
import { execSync } from 'child_process';
|
|
5
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'fs';
|
|
5
6
|
import { resolve, join, dirname } from 'path';
|
|
6
7
|
import { fileURLToPath } from 'url';
|
|
7
8
|
import open from 'open';
|
|
@@ -105,7 +106,7 @@ function countBy(arr) {
|
|
|
105
106
|
program
|
|
106
107
|
.name('mango-lollipop')
|
|
107
108
|
.description('AI-powered lifecycle messaging generator')
|
|
108
|
-
.version('
|
|
109
|
+
.version(JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8')).version);
|
|
109
110
|
|
|
110
111
|
// --- init -------------------------------------------------------------------
|
|
111
112
|
|
|
@@ -113,7 +114,7 @@ program
|
|
|
113
114
|
.command('init [name]')
|
|
114
115
|
.description('Initialize a new Mango Lollipop project')
|
|
115
116
|
.action((name = 'my-project') => {
|
|
116
|
-
const dir = resolve(
|
|
117
|
+
const dir = resolve(name);
|
|
117
118
|
mkdirSync(dir, { recursive: true });
|
|
118
119
|
|
|
119
120
|
// Create message folders per stage
|
|
@@ -121,6 +122,22 @@ program
|
|
|
121
122
|
mkdirSync(`${dir}/messages/${stage}`, { recursive: true });
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
// Copy skills, templates, and Claude Code commands from the package
|
|
126
|
+
const pkgRoot = resolve(__dirname, '..');
|
|
127
|
+
const toCopy = [
|
|
128
|
+
['templates', 'templates'],
|
|
129
|
+
['.claude/skills', '.claude/skills'],
|
|
130
|
+
['CLAUDE.md', 'CLAUDE.md'],
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
for (const [src, dest] of toCopy) {
|
|
134
|
+
const srcPath = join(pkgRoot, src);
|
|
135
|
+
const destPath = join(dir, dest);
|
|
136
|
+
if (existsSync(srcPath)) {
|
|
137
|
+
cpSync(srcPath, destPath, { recursive: true });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
124
141
|
// Create initial config
|
|
125
142
|
const config = {
|
|
126
143
|
name,
|
|
@@ -137,9 +154,9 @@ program
|
|
|
137
154
|
|
|
138
155
|
console.log(`Mango Lollipop project "${name}" initialized at ${dir}`);
|
|
139
156
|
console.log();
|
|
140
|
-
console.log('Next step:
|
|
141
|
-
console.log(` cd ${
|
|
142
|
-
console.log('
|
|
157
|
+
console.log('Next step:');
|
|
158
|
+
console.log(` cd ${name}`);
|
|
159
|
+
console.log(' /start');
|
|
143
160
|
});
|
|
144
161
|
|
|
145
162
|
// --- generate ---------------------------------------------------------------
|
|
@@ -380,6 +397,43 @@ program
|
|
|
380
397
|
}
|
|
381
398
|
});
|
|
382
399
|
|
|
400
|
+
// --- update -----------------------------------------------------------------
|
|
401
|
+
|
|
402
|
+
program
|
|
403
|
+
.command('update')
|
|
404
|
+
.description('Update mango-lollipop to the latest version')
|
|
405
|
+
.action(() => {
|
|
406
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
407
|
+
const current = pkg.version;
|
|
408
|
+
|
|
409
|
+
let latest;
|
|
410
|
+
try {
|
|
411
|
+
latest = execSync('npm view mango-lollipop@latest version', { encoding: 'utf-8' }).trim();
|
|
412
|
+
} catch {
|
|
413
|
+
console.log('Could not reach the npm registry. Check your internet connection.');
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (current === latest) {
|
|
418
|
+
console.log(`Already on the latest version (${current}).`);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
console.log(`Current version: ${current}`);
|
|
423
|
+
console.log(`Latest version: ${latest}`);
|
|
424
|
+
console.log();
|
|
425
|
+
console.log('Updating...');
|
|
426
|
+
|
|
427
|
+
try {
|
|
428
|
+
execSync('npm install -g mango-lollipop@latest', { stdio: 'inherit' });
|
|
429
|
+
console.log();
|
|
430
|
+
console.log(`Updated to ${latest}.`);
|
|
431
|
+
} catch {
|
|
432
|
+
console.log('Update failed. Try running manually:');
|
|
433
|
+
console.log(' npm install -g mango-lollipop@latest');
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
|
|
383
437
|
// --- parse ------------------------------------------------------------------
|
|
384
438
|
|
|
385
439
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mango-lollipop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI-powered lifecycle messaging generator for SaaS companies",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"bin/",
|
|
25
25
|
"dist/",
|
|
26
|
-
"skills/",
|
|
26
|
+
".claude/skills/",
|
|
27
27
|
"templates/",
|
|
28
28
|
"lib/",
|
|
29
29
|
"CLAUDE.md"
|