Skip to content

Commit f53ab52

Browse files
committed
feat: implement async loop mode, milestone tracking, and referral system
1 parent 6468d55 commit f53ab52

34 files changed

Lines changed: 2064 additions & 37 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ node packages/cli/dist/index.js --help
1919

2020
```
2121
packages/cli/src/
22-
commands/ ← one file per command (init, track, ship, pulse, loop, auth, celebrate, telemetry, radar, keywords, timing, coach)
23-
analytics/ ← telemetry, benchmarks, dna, oracle, churn, autoLoop, predictor, competitorRadar, keywordFinder, marketTiming, patterns, peers, coach
22+
commands/ ← one file per command (init, track, ship, pulse, loop, auth, celebrate, telemetry, radar, keywords, timing, coach, revenue, remind, aliases)
23+
analytics/ ← telemetry, benchmarks, dna, oracle, churn, autoLoop, predictor, competitorRadar, keywordFinder, marketTiming, patterns, peers, coach, score
2424
templates/ ← project template scaffolds (saas, api, mobile, cli, newsletter, agency, open-source, marketplace, ai-wrapper)
2525
ai/prompts/ ← system prompts
2626
ai/client.ts ← generateStructured() wrapper (with cache + resolveAuth)
2727
storage/local.ts ← all .loopkit/ file I/O
28-
storage/sync.ts ← CLI → Convex push (loop logs + ship logs + radar + timing)
28+
storage/sync.ts ← CLI → Convex push (loop logs + ship logs + radar + timing + milestone + win)
2929
storage/cache.ts ← AI result cache (hash-based, 7-day TTL)
3030
ui/theme.ts ← terminal colors/UI helpers
31+
cron/ ← cron job installer for Friday reminder
32+
notifications/ ← terminal notification system (macOS/Linux/Windows)
3133
3234
packages/shared/src/index.ts ← ALL Zod schemas (single source of truth)
3335
@@ -98,7 +100,7 @@ const result = await generateStructured({
98100
- Team collaboration
99101
- Mobile app / VS Code extension
100102
- Zapier/Make integrations
101-
- Any 14th command beyond the current 13 (init/track/ship/pulse/loop/auth/celebrate/telemetry/radar/keywords/timing/coach/revenue)
103+
- Any 16th command beyond the current 15 (init/track/ship/pulse/loop/auth/celebrate/telemetry/radar/keywords/timing/coach/revenue/remind/aliases)
102104
- New npm deps that duplicate existing functionality
103105

104106
## Approved Extensions (user-approved, April 2026)
@@ -109,6 +111,7 @@ const result = await generateStructured({
109111
| **Proof Card** | `ui/proof-card.ts` | Shareable weekly card, clipboard auto-copy |
110112
| **Daily Standup** | `loopkit track --stand` | Flag on existing `track` command |
111113
| **Revenue Tracker** | `loopkit revenue` (13th command) | Structured MRR records, switching-cost feature |
114+
| **Growth Loops** | Milestone system, Friday reminder, validation, aliases, async loop, referral, public wins | Habit-forming infrastructure for retention and growth (Phase 13) |
112115

113116
---
114117

CLAUDE.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,39 @@ src/
9595
│ ├── keywords.ts # loopkit keywords
9696
│ ├── timing.ts # loopkit timing
9797
│ ├── coach.ts # loopkit coach
98-
│ └── revenue.ts # loopkit revenue
98+
│ ├── revenue.ts # loopkit revenue
99+
│ ├── remind.ts # loopkit remind:friday (cron-triggered)
100+
│ └── aliases.ts # loopkit aliases (shell shortcuts)
99101
├── analytics/
100102
│ ├── telemetry.ts # Opt-in usage collection (on/off/export/delete)
101103
│ ├── dna.ts # Shipping DNA profile (founder pattern detection)
102104
│ ├── benchmarks.ts # Smart percentile rankings vs baseline
103105
│ ├── oracle.ts # Snooze completion probability oracle
104106
│ ├── churn.ts # Churn Guardian: declining score, skipped loops, override rate
105107
│ ├── autoLoop.ts # Auto-Loop: missed Sunday detection + auto-draft
106-
│ └── predictor.ts # Success Predictor: revenue probability heuristic
108+
│ ├── predictor.ts # Success Predictor: revenue probability heuristic
109+
│ ├── score.ts # LoopKit Score™ calculation
110+
│ └── patterns.ts # Pattern detection for coaching moments
107111
├── ai/
108112
│ ├── client.ts # generateStructured() wrapper (resolveAuth + cache)
109113
│ └── prompts/
110114
│ ├── init.ts # System prompt + few-shot examples
111115
│ ├── ship.ts # Launch copy system prompt
112116
│ ├── pulse.ts # Clustering system prompt
113117
│ ├── loop.ts # Weekly synthesis system prompt
114-
│ └── unstuck.ts # Micro-task generation prompt
118+
│ ├── unstuck.ts # Micro-task generation prompt
119+
│ └── validation.ts # Devil's advocate validation prompt
115120
├── storage/
116121
│ ├── local.ts # All .loopkit/ file operations
117-
│ ├── sync.ts # CLI → Convex sync for loop/ship/radar/timing
122+
│ ├── sync.ts # CLI → Convex sync for loop/ship/radar/timing/milestone/win
118123
│ └── cache.ts # AI result cache (hash-based, 7-day TTL)
124+
├── cron/
125+
│ └── installer.ts # Cron job installer for Friday reminder
126+
├── notifications/
127+
│ └── terminal.ts # Terminal notification system (macOS/Linux/Windows)
119128
└── ui/
120-
└── theme.ts # Colors, scoreBar, box, header helpers
129+
├── theme.ts # Colors, scoreBar, box, header helpers
130+
└── proof-card.ts # Proof card generation and clipboard copy
121131
```
122132

123133
### Critical: Local Storage Layout
@@ -171,6 +181,8 @@ src/
171181
| `churn.ts` | `detectChurnRisk()`, `renderChurnWarning()` — declining score, skipped loops, overrides |
172182
| `autoLoop.ts` | `checkMissedSunday()`, `saveAutoLoopDraft()` — Monday auto-draft generation |
173183
| `predictor.ts` | `predictSuccess()`, `renderPrediction()` — 8-week revenue probability heuristic |
184+
| `score.ts` | `computeLoopKitScore()`, `renderLoopKitScore()` — LoopKit Score™ calculation |
185+
| `patterns.ts` | `detectPatterns()`, coaching moment detection |
174186
| `cache.ts` | `getCachedResult()`, `setCachedResult()` — hash-based AI result reuse, 7-day TTL |
175187

176188
### AI Usage Pattern
@@ -220,7 +232,10 @@ Schemas defined:
220232
- `PulseClusterSchema` — AI clustering output
221233
- `LoopSynthesisSchema` — week win + one thing + BIP post + founder note
222234
- `LoopLogSchema` — weekly proof metrics (`previousScore`, `currentScore`, `scoreDelta`, `weeksActive`, `decisionsMade`, `feedbackResponses`, `feedbackActedOn`)
223-
- `ConfigSchema` — user config
235+
- `ConfigSchema` — user config (includes `aliasesInstalled`, `referralShown`, `referralCode`)
236+
- `ValidationQuestionsSchema` — devil's advocate validation output (3 questions + encouragement)
237+
- `RevenueEntrySchema` — MRR tracking records
238+
- `StandupLogSchema` — daily standup logs
224239
- Helpers: `slugify()`, `getWeekNumber()`, `formatDate()`
225240

226241
---
@@ -341,6 +356,7 @@ When adding a new AI feature:
341356
| 10 — Analytics Phase 1 | ✅ Done | Telemetry, Shipping DNA, Benchmarks CLI, Snooze Oracle |
342357
| 11 — Analytics Phase 2 | ✅ Done | CSRF, resolveAuth, AI cache, git hook opt, Archetypes, Churn, Auto-Loop, Predictor |
343358
| 12 — Growth Features | ✅ Done | LoopKit Score, Proof Card, Daily Standup, Revenue Tracker |
359+
| 13 — Growth Loops | ✅ Done | Milestone system, Friday reminder, validation mode, shell aliases, async loop, referral system, public wins |
344360

345361
---
346362

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ These commands support the loop, but they are not the product's center of gravit
3939
| `loopkit timing` | Market timing signal — is your space heating up? |
4040
| `loopkit coach` | AI coaching based on your shipping patterns |
4141
| `loopkit revenue` | Track structured MRR/ARR records |
42+
| `loopkit celebrate` | ASCII confetti + shareable proof card |
43+
| `loopkit aliases` | Manage shell aliases for faster commands |
4244
| `loopkit init --template <id>` | Pre-fill & AI-personalize tasks with 9 project templates |
4345

4446
## Quick Start
@@ -83,6 +85,9 @@ Five questions. AI scoring. A brief that stings when it should.
8385
- Riskiest assumption named explicitly
8486
- One async validation action you can do tonight
8587
- **Sunday Reminder**: Provides a helpful hint to set a recurring calendar event or cron job to close your week
88+
- **Friday Reminder**: `--cron` flag installs a cron job that reminds you to ship every Friday at 4 PM
89+
- **Validation Mode**: `--validate` flag runs a devil's advocate AI to stress-test your brief before building
90+
- **Shell Aliases**: Prompted on first run to install shortcuts (lk, lks, lkl, lkt) for faster commands
8691

8792
### `loopkit track` — zero-overhead task management
8893

@@ -93,6 +98,7 @@ Five questions. AI scoring. A brief that stings when it should.
9398
- Cut tasks archived to `cut.md` — never silently deleted
9499
- Shipping score: tasks completed / tasks planned
95100
- **Daily Standup**: `loopkit track --stand` prompts for your #1 focus today and logs it to track daily momentum
101+
- **Almost There Nudge**: When shipping score is 50-70% with 2 tasks left, suggests completing them to hit 80%
96102

97103
### `loopkit ship` — never stare at a blank tweet again
98104

@@ -125,8 +131,39 @@ Five questions. AI scoring. A brief that stings when it should.
125131
- Context-aware upgrade prompts at week 4 or 8
126132
- Override rate tracked — warns if you're overriding AI > 50% of the time
127133
- Generates a build-in-public post (280-char checked)
134+
- **Async Mode**: `--async` flag allows running loop any day within a 7-day window without breaking streak
135+
- **Milestone System**: Detects and celebrates key moments (first week, month 1, first revenue, streak breaks, pricing signals)
136+
- **Referral Prompt**: At streak ≥4, prompts to share LoopKit with friends for 1-month free credit
128137
- One decision. One post. Week done.
129138

139+
### `loopkit celebrate` — celebrate your wins
140+
141+
- ASCII confetti burst for visual celebration
142+
- Displays your shipping score, streak, and rank title
143+
- **LoopKit Score™** breakdown
144+
- Revenue display if MRR > 0
145+
- Shareable proof card auto-copies to clipboard
146+
- **Public Wins**: `--share` flag posts your win to the public feed at loopkit.dev/wins for accountability and discovery
147+
148+
### `loopkit aliases` — faster commands
149+
150+
- Installs shell shortcuts for common commands (lk, lks, lkl, lkt)
151+
- Supports zsh, bash, and fish shells
152+
- Prompted on first run after `loopkit init`
153+
- Remove with `loopkit aliases --remove`
154+
155+
## Growth & Retention Features
156+
157+
LoopKit includes several features designed to build habits and drive retention:
158+
159+
- **Milestone System**: Automatically detects and celebrates 5 key moments (first week, month 1, first revenue, streak breaks, pricing signals) with encouraging messages
160+
- **Friday Reminder**: Cron job (`loopkit init --cron`) reminds you to ship every Friday at 4 PM with terminal notifications
161+
- **Async Loop Mode**: `--async` flag allows flexible scheduling without breaking your streak
162+
- **Almost There Nudge**: Encourages completion when you're at 50-70% shipping score with 2 tasks remaining
163+
- **Referral System**: Share your referral link (at streak ≥4) to earn 1-month free credits
164+
- **Public Wins Feed**: Share your wins to the community for accountability and discovery
165+
- **Validation Mode**: `--validate` flag runs a devil's advocate AI to stress-test your brief before building
166+
130167
## Pricing
131168

132169
| Tier | Price | Includes |

docs/QUICK_START.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ loopkit init my-project
2222

2323
Answer 5 questions. Be specific. The AI will give you the first value fast: one uncomfortable truth, a scored bet, and a validation action you can do tonight.
2424

25+
**Optional flags:**
26+
- `--cron` — Install a Friday reminder cron job (4 PM)
27+
- `--validate` — Run devil's advocate AI to stress-test your brief
28+
2529
**Tip:** If your ICP score is < 7, narrow your target customer. "Freelance designers in Berlin" beats "creative professionals."
2630

2731
---
@@ -86,6 +90,8 @@ loopkit loop
8690

8791
Review your week. LoopKit shows what moved forward, proof this week (score delta, weeks active, decisions made, feedback acted on), and the AI's recommendation for next week. Share your build-in-public post.
8892

93+
**Optional flag:** `--async` — Run loop any day within a 7-day window without breaking your streak
94+
8995
**Do this every Sunday.** This is the habit that separates founders who ship from founders who don't.
9096

9197
---
@@ -116,11 +122,14 @@ Review your week. LoopKit shows what moved forward, proof this week (score delta
116122
```bash
117123
# Define
118124
loopkit init my-project
125+
loopkit init --cron # Install Friday reminder cron
126+
loopkit init --validate # Run devil's advocate validation
119127

120128
# Develop
121129
loopkit track # View board
122130
loopkit track --add "Task title" # Add task
123131
loopkit track --project other-project # Switch project
132+
loopkit track --stand # Daily standup (60s)
124133

125134
# Deliver
126135
loopkit ship # Generate launch copy
@@ -132,6 +141,11 @@ loopkit pulse # View clusters
132141

133142
# Iterate
134143
loopkit loop # Weekly synthesis
144+
loopkit loop --async # Run any day within 7-day window
145+
146+
# Celebrate
147+
loopkit celebrate # Show shipping score + confetti
148+
loopkit celebrate --share # Post win to public feed
135149

136150
# Auth
137151
loopkit auth # Log in
@@ -146,8 +160,13 @@ loopkit timing --category "saas" # Check timing for a specific category
146160
loopkit telemetry on # Opt-in to anonymous usage data
147161
loopkit telemetry off # Opt-out
148162
loopkit telemetry status # Check current status
163+
164+
# Utilities
165+
loopkit aliases # Manage shell shortcuts
166+
loopkit aliases --remove # Remove shell shortcuts
167+
loopkit revenue # Track MRR milestones
149168
```
150169

151170
---
152171

153-
*Last updated: April 2026 · v0.1.0 (Sharp v1 refinement: fast init, uncomfortable truth, proof loops, Sunday reward, upgrade-intent probes · IE-7 through IE-17 shipped)*
172+
*Last updated: April 2026 · v0.1.0 (Sharp v1 refinement: fast init, uncomfortable truth, proof loops, Sunday reward, upgrade-intent probes · IE-7 through IE-17 shipped · Phase 13 growth loops: milestones, Friday reminder, validation, aliases, async loop, referral, public wins)*

0 commit comments

Comments
 (0)