engrm 0.1.0 → 0.2.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.
Files changed (98) hide show
  1. package/README.md +214 -73
  2. package/bin/build.mjs +97 -0
  3. package/bin/engrm.mjs +13 -0
  4. package/dist/cli.js +2712 -0
  5. package/dist/hooks/elicitation-result.js +1786 -0
  6. package/dist/hooks/post-tool-use.js +2357 -0
  7. package/dist/hooks/pre-compact.js +1321 -0
  8. package/dist/hooks/sentinel.js +1168 -0
  9. package/dist/hooks/session-start.js +1473 -0
  10. package/dist/hooks/stop.js +1834 -0
  11. package/dist/server.js +16628 -0
  12. package/package.json +29 -4
  13. package/packs/api-best-practices.json +182 -0
  14. package/packs/nextjs-patterns.json +68 -0
  15. package/packs/node-security.json +68 -0
  16. package/packs/python-django.json +68 -0
  17. package/packs/react-gotchas.json +182 -0
  18. package/packs/typescript-patterns.json +67 -0
  19. package/packs/web-security.json +182 -0
  20. package/.mcp.json +0 -9
  21. package/AUTH-DESIGN.md +0 -436
  22. package/BRIEF.md +0 -197
  23. package/CLAUDE.md +0 -44
  24. package/COMPETITIVE.md +0 -174
  25. package/CONTEXT-OPTIMIZATION.md +0 -305
  26. package/INFRASTRUCTURE.md +0 -252
  27. package/MARKET.md +0 -230
  28. package/PLAN.md +0 -278
  29. package/SENTINEL.md +0 -293
  30. package/SERVER-API-PLAN.md +0 -553
  31. package/SPEC.md +0 -843
  32. package/SWOT.md +0 -148
  33. package/SYNC-ARCHITECTURE.md +0 -294
  34. package/VIBE-CODER-STRATEGY.md +0 -250
  35. package/bun.lock +0 -375
  36. package/hooks/post-tool-use.ts +0 -144
  37. package/hooks/session-start.ts +0 -64
  38. package/hooks/stop.ts +0 -131
  39. package/mem-page.html +0 -1305
  40. package/src/capture/dedup.test.ts +0 -103
  41. package/src/capture/dedup.ts +0 -76
  42. package/src/capture/extractor.test.ts +0 -245
  43. package/src/capture/extractor.ts +0 -330
  44. package/src/capture/quality.test.ts +0 -168
  45. package/src/capture/quality.ts +0 -104
  46. package/src/capture/retrospective.test.ts +0 -115
  47. package/src/capture/retrospective.ts +0 -121
  48. package/src/capture/scanner.test.ts +0 -131
  49. package/src/capture/scanner.ts +0 -100
  50. package/src/capture/scrubber.test.ts +0 -144
  51. package/src/capture/scrubber.ts +0 -181
  52. package/src/cli.ts +0 -517
  53. package/src/config.ts +0 -238
  54. package/src/context/inject.test.ts +0 -940
  55. package/src/context/inject.ts +0 -382
  56. package/src/embeddings/backfill.ts +0 -50
  57. package/src/embeddings/embedder.test.ts +0 -76
  58. package/src/embeddings/embedder.ts +0 -139
  59. package/src/lifecycle/aging.test.ts +0 -103
  60. package/src/lifecycle/aging.ts +0 -36
  61. package/src/lifecycle/compaction.test.ts +0 -264
  62. package/src/lifecycle/compaction.ts +0 -190
  63. package/src/lifecycle/purge.test.ts +0 -100
  64. package/src/lifecycle/purge.ts +0 -37
  65. package/src/lifecycle/scheduler.test.ts +0 -120
  66. package/src/lifecycle/scheduler.ts +0 -101
  67. package/src/provisioning/browser-auth.ts +0 -172
  68. package/src/provisioning/provision.test.ts +0 -198
  69. package/src/provisioning/provision.ts +0 -94
  70. package/src/register.test.ts +0 -167
  71. package/src/register.ts +0 -178
  72. package/src/server.ts +0 -436
  73. package/src/storage/migrations.test.ts +0 -244
  74. package/src/storage/migrations.ts +0 -261
  75. package/src/storage/outbox.test.ts +0 -229
  76. package/src/storage/outbox.ts +0 -131
  77. package/src/storage/projects.test.ts +0 -137
  78. package/src/storage/projects.ts +0 -184
  79. package/src/storage/sqlite.test.ts +0 -798
  80. package/src/storage/sqlite.ts +0 -934
  81. package/src/storage/vec.test.ts +0 -198
  82. package/src/sync/auth.test.ts +0 -76
  83. package/src/sync/auth.ts +0 -68
  84. package/src/sync/client.ts +0 -183
  85. package/src/sync/engine.test.ts +0 -94
  86. package/src/sync/engine.ts +0 -127
  87. package/src/sync/pull.test.ts +0 -279
  88. package/src/sync/pull.ts +0 -170
  89. package/src/sync/push.test.ts +0 -117
  90. package/src/sync/push.ts +0 -230
  91. package/src/tools/get.ts +0 -34
  92. package/src/tools/pin.ts +0 -47
  93. package/src/tools/save.test.ts +0 -301
  94. package/src/tools/save.ts +0 -231
  95. package/src/tools/search.test.ts +0 -69
  96. package/src/tools/search.ts +0 -181
  97. package/src/tools/timeline.ts +0 -64
  98. package/tsconfig.json +0 -22
@@ -1,250 +0,0 @@
1
- # Engrm — Vibe Coder's Companion Strategy
2
-
3
- ## Market Reality (March 2026)
4
-
5
- ### The Vibe Coding Explosion
6
-
7
- "Vibe coding" — using AI to generate code without fully understanding it — has gone mainstream. r/vibecoding has 89K members. A vibe coding platform advertised at the Super Bowl. 95% of developers now use AI tools weekly, and a growing segment can't code without them.
8
-
9
- These users are underserved. Every AI coding memory tool targets experienced developers. Nobody is building the safety net for the millions who are learning to code through AI.
10
-
11
- ### Competitive Landscape
12
-
13
- #### AI Agent Memory (Direct Competitors)
14
-
15
- | Product | Pricing | GitHub Stars | Funding | Key Weakness |
16
- |---|---|---|---|---|
17
- | **Mem0** | Free → $19/mo → $249/mo | 41K | $24M | SaaS-only, massive pricing gap ($19→$249), no code-specific features |
18
- | **Zep** | $25/mo → $475/mo | — | $2.3M (YC) | Enterprise-only positioning, complex credit system |
19
- | **Letta (MemGPT)** | Beta (free) | — | $10M | No pricing yet, academic-first, not shipping |
20
- | **LangMem** | Open source | — | — | Bundled with LangSmith ($39/seat), not standalone |
21
-
22
- #### Claude Code Memory Plugins (All Free, All Local-Only)
23
-
24
- | Plugin | Approach | Limitation |
25
- |---|---|---|
26
- | **claude-mem** | Auto-capture + ChromaDB | Single device, no team, no sync, AGPL |
27
- | **MemCP** | MCP server, token reduction | Local only, no quality filtering |
28
- | **Memory Anchor** | 5-layer cognitive model | Complex, no sync, niche |
29
- | **memory-mcp** | Persistent + git snapshots | No search, no team sharing |
30
-
31
- #### Code Review / Quality Tools
32
-
33
- | Product | Pricing | What It Does | Key Weakness |
34
- |---|---|---|---|
35
- | **CodeRabbit** | $24/seat/mo | PR-level AI review | Post-commit only, no memory |
36
- | **Qodo** | $30/seat/mo | Test generation + PR review | Post-commit only, no learning |
37
- | **Greptile** | $30/seat/mo | Codebase-aware review | Post-commit only, no persistence |
38
- | **Ellipsis** | $20/seat/mo | Automated code review | Post-commit only, no context |
39
-
40
- ### The Gap Nobody Fills
41
-
42
- **No product combines all of these:**
43
-
44
- 1. ✅ Cross-device sync (not local-only)
45
- 2. ✅ Team shared memory (not single-user)
46
- 3. ✅ Offline-first (works without internet)
47
- 4. ✅ Pre-execution code audit (not post-PR)
48
- 5. ✅ Quality-filtered capture (not "save everything")
49
- 6. ✅ Pre-loaded knowledge for beginners
50
- 7. ✅ Risk scoring and decision audit
51
- 8. ✅ Pattern recurrence detection
52
- 9. ✅ Agent-agnostic (MCP standard)
53
- 10. ✅ Self-hosted option
54
-
55
- Engrm already has 1-5 and 9-10 built. Items 6-8 are content and lightweight code additions.
56
-
57
- ### The Vibe Coder Opportunity
58
-
59
- | Segment | Size (est.) | Needs | Willingness to Pay |
60
- |---|---|---|---|
61
- | Experienced devs | ~5M AI coding users | Context persistence, team sharing | Medium ($10-20/mo) |
62
- | **Vibe coders** | ~10-15M and growing fast | Safety net, learning, guardrails | High ($10-15/mo, because they need it more) |
63
- | Teams | ~2M team seats | Shared knowledge, standards | High ($12-25/seat) |
64
-
65
- The vibe coder segment is 2-3x the experienced dev segment and growing faster. They have higher churn risk (frustration → quit) but also higher retention if you become indispensable (they literally can't code without you).
66
-
67
- ---
68
-
69
- ## Influencer & Launch Strategy
70
-
71
- ### Tier 1: Credibility Builders (Reach: Senior Devs)
72
-
73
- | Who | Platform | Audience | Why |
74
- |---|---|---|---|
75
- | **Boris Cherny** (Claude Code creator) | X/Twitter | Claude Code ecosystem | A nod from Boris = instant legitimacy |
76
- | **swyx / Latent Space** | Podcast + X | 200K+ subs, AI engineers | Top 10 US tech podcast, shapes tooling narrative |
77
- | **ThePrimeagen** | YouTube 524K + Twitch | Advanced devs | Built his own AI agent "99"; credibility with seniors |
78
- | **Theo Browne (t3dotgg)** | YouTube 512K + X | TypeScript/full-stack | Honest tool reviews, massive TS community influence |
79
- | **Peter Steinberger (steipete)** | X/Blog | Senior engineers | iOS legend, now agentic engineering; blog is "required reading" |
80
-
81
- ### Tier 2: Amplifiers (Reach: Working Devs + Vibe Coders)
82
-
83
- | Who | Platform | Audience | Why |
84
- |---|---|---|---|
85
- | **Sabrina Ramonov** | YouTube 164K + Substack | AI automation, vibe coders | Forbes 30u30, Claude Code tutorials, exactly our demographic |
86
- | **Nick Saraev** | YouTube 264K | AI automation, business | 4-hour Claude Code masterclass; audience builds real things |
87
- | **Fireship** | YouTube 4.1M | Broad developer | "100 seconds of Engrm" = millions of eyeballs |
88
- | **Jack Herrington** | YouTube 184K | React/frontend | Professional devs using AI in production |
89
- | **Matt Pocock / AI Hero** | X + Newsletter | TypeScript | AI Hero newsletter is a new channel into this space |
90
-
91
- ### Tier 3: Community Amplifiers
92
-
93
- | Who | Platform | Audience | Why |
94
- |---|---|---|---|
95
- | **Indy Dev Dan** | YouTube | Claude Code builders | Hands-on tutorials, accessible, likely to review |
96
- | **AI Labs Channel** | YouTube | AI tool users | 34-63K views on Claude Code workflow videos |
97
- | **Traversy Media** | YouTube 2.4M | Beginners | Gateway to the "learning to code with AI" audience |
98
- | **Pragmatic Engineer** (Gergely Orosz) | Newsletter + Podcast | Senior engineers | Already covered "Building Claude Code with Boris Cherny" |
99
-
100
- ### Launch Communities (Ranked by Impact)
101
-
102
- 1. **Hacker News (Show HN)** — Dev tools regularly hit front page. Technical positioning: "offline-first team memory layer with hybrid search." Time for 9-10am ET.
103
- 2. **r/ClaudeAI + r/ClaudeCode** — 4,200+ weekly contributors. They already discuss hooks and MCP. Engrm solves their #1 pain (lost context).
104
- 3. **r/vibecoding** — 89K members. Frame as "never lose your project context again."
105
- 4. **Product Hunt** — Dev tools consistently hit #1. Kilo Code went from PH launch → 500K downloads → $8M funding.
106
- 5. **X/Twitter build-in-public** — Claude Code has 75% share of voice among coding agent influencers on X.
107
-
108
- ### Outreach Sequence
109
-
110
- **Week 1-2 (Credibility):** Show HN + r/ClaudeAI + r/ClaudeCode + X thread
111
- **Week 3-4 (Amplification):** Product Hunt + Indy Dev Dan + AI Labs + r/vibecoding
112
- **Month 2 (Scale):** Sabrina Ramonov + Nick Saraev tutorials + Latent Space pitch
113
- **Month 3+ (Mainstream):** Theo + ThePrimeagen reviews + Fireship pitch
114
-
115
- ---
116
-
117
- ## Phased Build Plan
118
-
119
- ### Phase A: Foundation Polish (Weeks 1-2)
120
- **Goal:** Ship what we have, well. Make the free tier genuinely useful.
121
-
122
- | Task | Effort | Description |
123
- |---|---|---|
124
- | Starter Packs v1 | 3 days | Curate 3 packs (Web Security 101, React Gotchas, API Best Practices). 50 pre-loaded observations each as JSON seed files. `engrm init --pack=web-security` |
125
- | `engrm status` polish | 1 day | Show security findings, session summaries, confidence indicators |
126
- | Dashboard: Decision Log page | 2 days | New page at /decisions — chronological decisions with context |
127
- | Dashboard: Security Findings page | 1 day | Expand existing findings display into dedicated page with severity filters |
128
- | Website: /pricing page | 2 days | Pricing table with Free/Solo/Pro/Team tiers |
129
- | Website: /docs quickstart | 2 days | 5-minute setup guide with GIFs |
130
- | README + Show HN draft | 1 day | Compelling GitHub README and HN submission |
131
-
132
- **Website changes:**
133
- - New pages: `/pricing`, `/docs`, `/decisions` (dashboard)
134
- - Update `/` landing: add "Vibe Coder's Companion" messaging alongside existing dev positioning
135
- - Add testimonial/demo section showing starter packs + Sentinel preview
136
-
137
- ### Phase B: Vibe Coder Features (Weeks 3-6)
138
- **Goal:** The features that make vibe coders unable to live without Engrm.
139
-
140
- | Task | Effort | Description |
141
- |---|---|---|
142
- | Pattern Recurrence Detector | 3 days | Post-save hook: search existing bugfixes by semantic similarity. If >0.85 match from different session, auto-create pattern observation + surface warning |
143
- | Session Risk Score | 2 days | Calculate per-session: security findings, decisions without rationale, files modified without tests, unresolved bugfixes. Traffic light (green/amber/red) |
144
- | Danger Dashboard | 3 days | New dashboard panel: sessions by risk level, trend over time, clickable drill-down |
145
- | Cross-Project Search | 1 day | Config option `search.scope: "all"` → search all projects in namespace. Context injection includes cross-project matches |
146
- | Dependency Monitor | 3 days | PostToolUse hook detects `npm install`, `pip install` etc. Auto-creates observation. Dashboard shows dependencies added per session |
147
- | Starter Pack Marketplace | 3 days | `/packs` page on website. Community-submitted packs reviewed and published. `engrm install-pack <name>` CLI command |
148
-
149
- **Website changes:**
150
- - New dashboard pages: `/risk` (danger dashboard), `/dependencies`
151
- - Update dashboard home: add risk score badge per session, dependency count
152
- - New page: `/packs` (starter pack browse + install instructions)
153
-
154
- ### Phase C: Sentinel MVP (Weeks 7-10)
155
- **Goal:** Pre-execution code audit — the feature nobody else has.
156
-
157
- | Task | Effort | Description |
158
- |---|---|---|
159
- | Sentinel core engine | 5 days | PreToolUse hook intercepts Write/Edit. Builds diff context. Routes to configurable LLM provider. Returns PASS/WARN/BLOCK |
160
- | Built-in rule packs | 3 days | Ship 5 default standard sets: Security (SQL injection, XSS, eval), Auth (token storage, password hashing), API (rate limiting, input validation), React (hooks rules, state management), Database (parameterized queries, connection pooling) |
161
- | Sentinel config UI | 2 days | Dashboard page: enable/disable, choose mode (advisory/blocking), select rule packs, add custom standards |
162
- | Sentinel findings feed | 2 days | Dashboard page: real-time feed of WARN/BLOCK events, groupable by standard, exportable |
163
- | Sentinel pricing gate | 1 day | Free: not available. Pro ($15/mo): advisory only, 100 audits/day. Team ($25/seat): full blocking + shared standards |
164
- | LLM provider support | 3 days | OpenAI, Anthropic, xAI (Grok), Mistral, Ollama, custom OpenAI-compatible (e.g., local vLLM) |
165
-
166
- **Website changes:**
167
- - New page: `/sentinel` (product page with demo, pricing, comparison to CodeRabbit/Qodo)
168
- - Update `/pricing`: add Sentinel tiers
169
- - Dashboard: `/sentinel/config`, `/sentinel/feed`
170
-
171
- ### Phase D: Intelligence Layer (Weeks 11-14)
172
- **Goal:** The features that make Engrm smarter the more you use it.
173
-
174
- | Task | Effort | Description |
175
- |---|---|---|
176
- | Code Confidence Score | 3 days | Per-project metric: discovery/change ratio, bugfix frequency, test coverage signal, decision documentation rate. Dashboard gauge |
177
- | Session Replay | 4 days | Dashboard timeline view: discoveries → decisions → changes → outcomes. Highlight learning moments and self-corrections |
178
- | "You Solved This Before" | 2 days | Cross-project semantic search on errors. When bugfix saved, auto-search other projects. Surface in context injection |
179
- | Decision Conflict Detection | 2 days | When new decision saved, search for contradicting decisions in same project. Flag in dashboard |
180
- | Weekly Digest Email | 3 days | Opt-in email: observations this week, risk score, recurring patterns, Sentinel blocks. Drives dashboard re-engagement |
181
-
182
- **Website changes:**
183
- - Dashboard: `/replay` (session timeline), `/confidence` (project scores)
184
- - Email templates for weekly digest
185
- - Settings page: notification preferences
186
-
187
- ### Phase E: Community & Scale (Weeks 15-20)
188
- **Goal:** Network effects and community-driven growth.
189
-
190
- | Task | Effort | Description |
191
- |---|---|---|
192
- | Anonymous Insight Aggregation | 5 days | Opt-in: anonymise observations, aggregate patterns across users. "87% of projects using Stripe also verify webhook signatures — yours doesn't" |
193
- | Community Pack Submissions | 3 days | GitHub PR workflow for submitting starter packs. Review + publish pipeline |
194
- | Team Onboarding Mode | 2 days | New team member gets "Top 20 things to know about this codebase" auto-generated from team observations |
195
- | Public API | 3 days | REST API for external integrations (CI/CD pipelines, Slack bots, custom dashboards) |
196
- | Multi-Agent Support | 3 days | Extend beyond Claude Code: Cline, Aider, OpenClaw via MCP |
197
-
198
- **Website changes:**
199
- - New pages: `/community` (pack submissions, leaderboard), `/api` (docs)
200
- - Update landing: "Works with Claude Code, Cline, OpenClaw" badges
201
-
202
- ---
203
-
204
- ## Timeline Summary
205
-
206
- ```
207
- Week 1-2: Phase A — Foundation Polish + Launch Prep
208
- Week 2: 🚀 Show HN + Reddit Launch
209
- Week 3-4: Phase B — Vibe Coder Features
210
- Week 4: 🚀 Product Hunt Launch
211
- Week 5-6: Phase B continued + Influencer Outreach Begins
212
- Week 7-10: Phase C — Sentinel MVP
213
- Week 10: 🚀 Sentinel Launch (Blog + YouTube demos)
214
- Week 11-14: Phase D — Intelligence Layer
215
- Week 15-20: Phase E — Community & Scale
216
- ```
217
-
218
- **Milestone targets:**
219
-
220
- | Week | Free Users | Paid Users | MRR |
221
- |---|---|---|---|
222
- | 2 (HN/Reddit launch) | 500 | 15 | $200 |
223
- | 4 (Product Hunt) | 3,000 | 120 | $1,600 |
224
- | 10 (Sentinel launch) | 10,000 | 400 | $5,200 |
225
- | 14 (Intelligence layer) | 20,000 | 800 | $10,400 |
226
- | 20 (Community) | 30,000 | 1,200 | $15,600 |
227
-
228
- ---
229
-
230
- ## Pricing (Revised with Sentinel)
231
-
232
- | Tier | Price | Observations | Devices | Sentinel | Target |
233
- |---|---|---|---|---|---|
234
- | **Free** | $0 | 10K | 2 | — | Try it, get hooked |
235
- | **Solo** | $9/mo | 50K | Unlimited | — | Multi-machine devs |
236
- | **Pro** | $15/mo | Unlimited | Unlimited | Advisory (100/day) | Vibe coders who need guardrails |
237
- | **Team** | $25/seat/mo | Unlimited | Unlimited | Full blocking + shared standards | Teams enforcing quality |
238
- | **Enterprise** | Custom | Unlimited | Unlimited | Custom + self-hosted | Compliance, SSO, SLA |
239
-
240
- **Key insight:** Pro at $15/mo is the vibe coder tier. It's cheaper than CodeRabbit ($24) and does more (persistent memory + pre-execution audit vs post-PR review). The pitch: "For less than a CodeRabbit seat, get memory that makes your AI smarter AND guardrails that catch mistakes before they happen."
241
-
242
- ---
243
-
244
- ## The Two-Sentence Pitch
245
-
246
- **For devs:** "Engrm gives your AI coding agent persistent memory across sessions, devices, and teammates — so it never forgets what it learned."
247
-
248
- **For vibe coders:** "Engrm is the experienced developer watching over your shoulder — it remembers every mistake, warns you before you repeat them, and blocks dangerous code before it's written."
249
-
250
- Same product. Two audiences. One subscription.