@lucianfialho/build-in-public-mcp 0.3.0 → 0.3.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.
@@ -0,0 +1,273 @@
1
+ # Build in Public - Tweet Now
2
+
3
+ Post to Twitter immediately or get AI-generated suggestions based on your coding session.
4
+
5
+ ## Usage
6
+
7
+ ### Post immediately with custom message:
8
+ ```
9
+ /bp Your custom message here
10
+ ```
11
+
12
+ ### Get AI suggestions from session:
13
+ ```
14
+ /bp
15
+ ```
16
+
17
+ ### Retrospective analysis (analyze entire session):
18
+ ```
19
+ /bp retro
20
+ ```
21
+
22
+ ## Your Task
23
+
24
+ **Step 1: Check the command mode**
25
+
26
+ Look at the command arguments:
27
+ - If user provided `retro` → **RETRO MODE** (analyze entire session)
28
+ - If user provided other text → **CUSTOM MESSAGE** (post directly)
29
+ - If no arguments → **SUGGESTION MODE** (generate from current context)
30
+
31
+ **Step 2a: If RETRO MODE** (`/bp retro`)
32
+
33
+ This is the MOST IMPORTANT mode - analyze the ENTIRE session and extract insights!
34
+
35
+ 1. **Analyze the full conversation** (from the start of this session):
36
+ - Read through ALL messages, tool uses, code changes, and discussions
37
+ - Extract what was accomplished (achievements)
38
+ - Identify what was learned (learnings)
39
+ - Note challenges solved (challenges)
40
+ - Detect technologies/tools used
41
+ - Find interesting moments or breakthroughs
42
+
43
+ 2. **Build comprehensive context object**:
44
+ ```javascript
45
+ {
46
+ sessionId: "<current-session-id>",
47
+ startTime: "<session-start-time>",
48
+ filesModified: ["file1.ts", "file2.py", ...],
49
+ commandsRun: [{command: "npm run build", description: "..."}],
50
+ toolsUsed: ["Edit", "Write", "Bash", ...],
51
+ userMessages: ["key user requests/questions"],
52
+ commits: [], // if any git commits detected
53
+ achievements: [
54
+ "Implemented AI-powered tweet suggestion engine",
55
+ "Created hybrid manual/auto posting system",
56
+ "Built v0.3.0 with context tracking"
57
+ ],
58
+ challenges: [
59
+ "Fixed OAuth 403 errors by regenerating tokens",
60
+ "Debugged TypeScript duplicate interface errors"
61
+ ],
62
+ learnings: [
63
+ "MCP servers use STDIO transport for local communication",
64
+ "Twitter API requires OAuth 1.0a tokens regenerated after permission changes"
65
+ ],
66
+ shouldTweet: true,
67
+ customMessage: null
68
+ }
69
+ ```
70
+
71
+ 3. **Save context**: Call `mcp__bip__save_context` with the comprehensive context
72
+
73
+ 4. **Generate suggestions**: Call `mcp__bip__suggest`
74
+
75
+ 5. **Present to user**:
76
+ - Show what you extracted (achievements, learnings, challenges)
77
+ - Show the AI-generated tweet suggestions
78
+ - Ask user which one to post or if they want to customize
79
+
80
+ 6. **Post the chosen tweet**
81
+
82
+ **Step 2b: If custom message provided**
83
+
84
+ 1. Call `mcp__bip__tweet` with the user's message
85
+ 2. Report success with the tweet URL
86
+ 3. Done!
87
+
88
+ **Step 2c: If NO message provided (suggestion mode)**
89
+
90
+ 1. Call `mcp__bip__get_context` to retrieve session context
91
+ 2. Call `mcp__bip__suggest` to generate tweet suggestions
92
+ 3. If suggestions exist:
93
+ - Present them to the user in a clear, numbered list
94
+ - Show confidence level and reason for each
95
+ - Ask user to choose one OR provide a custom message
96
+ - Wait for user response
97
+ 4. If user chooses a suggestion:
98
+ - Call `mcp__bip__tweet` with the chosen suggestion's message
99
+ 5. If user provides custom message:
100
+ - Call `mcp__bip__tweet` with their custom message
101
+ 6. Report success with tweet URL
102
+
103
+ **Important Notes:**
104
+
105
+ - Always authenticate before posting (check if `mcp__bip__tweet` returns auth error)
106
+ - If not authenticated, guide user to run `/bp setup` first
107
+ - Keep tweet messages under 280 characters
108
+ - Be conversational and helpful
109
+ - If no context exists, explain that and offer to post a custom message
110
+
111
+ ## Example Flows
112
+
113
+ ### Example 1: Retro Mode (The Meta Example!)
114
+ ```
115
+ User: /bp retro
116
+ Claude: *analyzes entire session*
117
+
118
+ 📊 Session Analysis Complete!
119
+
120
+ **Achievements:**
121
+ ✅ Implemented v0.3.0 with AI-powered tweet suggestions
122
+ ✅ Created suggestion engine with 4 different strategies
123
+ ✅ Built hybrid manual/automatic posting system
124
+ ✅ Integrated hooks for automatic context tracking
125
+ ✅ Successfully posted first tweet via MCP
126
+
127
+ **Challenges Solved:**
128
+ 🎯 Fixed OAuth 403 errors by regenerating access tokens
129
+ 🎯 Debugged TypeScript duplicate interface definitions
130
+ 🎯 Unified storage location from ~/.claude to ~/.build-in-public
131
+
132
+ **Key Learnings:**
133
+ 💡 MCP servers use STDIO transport for local communication
134
+ 💡 Twitter OAuth 1.0a tokens need regeneration after permission changes
135
+ 💡 Environment variables take precedence over auth.json files
136
+
137
+ *saves context and generates suggestions*
138
+
139
+ Based on your session, here are tweet suggestions:
140
+
141
+ 1. [90% confidence] achievement
142
+ "Just built a build-in-public tool... using Claude to build it 🤯
143
+
144
+ Shipped v0.3.0 with:
145
+ ✅ AI-powered tweet suggestions
146
+ ✅ Auto context tracking
147
+ ✅ Hybrid manual/auto posting
148
+
149
+ Meta level: Maximum 🚀 #BuildInPublic #AI"
150
+
151
+ 2. [85% confidence] learning
152
+ "💡 TIL: Building developer tools is wild when your dev tool
153
+ helps you build the dev tool.
154
+
155
+ Also learned MCP servers + hooks = perfect combo for
156
+ context-aware automation. #BuildInPublic"
157
+
158
+ 3. [80% confidence] session
159
+ "Wrapped up a meta coding session! 🛠️
160
+
161
+ Modified 10+ files, implemented AI suggestion engine,
162
+ fixed OAuth issues, and shipped v0.3.0.
163
+
164
+ Building in public while building the build-in-public tool 😄"
165
+
166
+ Which one would you like to post? (1-3, or provide your own)
167
+
168
+ User: 1
169
+ Claude: *posts tweet*
170
+ ✅ Tweet posted successfully!
171
+ https://twitter.com/lucian_fialho/status/...
172
+ ```
173
+
174
+ ### Example 2: Custom Message
175
+ ```
176
+ User: /bp Just shipped authentication! 🔐 #BuildInPublic
177
+ Claude: *calls mcp__bip__tweet*
178
+ Claude: ✅ Tweet posted successfully!
179
+ https://twitter.com/lucian_fialho/status/123456789
180
+ ```
181
+
182
+ ### Example 3: AI Suggestions (from current context)
183
+ ```
184
+ User: /bp
185
+ Claude: *calls mcp__bip__get_context*
186
+ Claude: *calls mcp__bip__suggest*
187
+ Claude: Based on your session, here are some tweet suggestions:
188
+
189
+ 1. [85% confidence] commit
190
+ Recent git commit detected
191
+
192
+ "Just committed: 'Add OAuth login system'
193
+ Modified 5 files. +247/-12 lines. #BuildInPublic #Coding"
194
+
195
+ 2. [75% confidence] achievement
196
+ 3 achievements logged
197
+
198
+ "✅ Progress update:
199
+ 1. Implemented OAuth 2.0 flow
200
+ 2. Added token refresh logic
201
+ 3. Tested with Google provider
202
+ #BuildInPublic"
203
+
204
+ 3. [70% confidence] learning
205
+ Learning moment captured
206
+
207
+ "💡 TIL (Today I Learned):
208
+ OAuth refresh tokens need secure storage and rotation.
209
+ Learned the hard way! #BuildInPublic #Learning"
210
+
211
+ Which one would you like to post? (1-3, or provide your own message)
212
+
213
+ User: 1
214
+ Claude: *calls mcp__bip__tweet with suggestion 1's message*
215
+ Claude: ✅ Tweet posted successfully!
216
+ https://twitter.com/lucian_fialho/status/123456789
217
+ ```
218
+
219
+ ### Example 4: No Context Yet
220
+ ```
221
+ User: /bp
222
+ Claude: *calls mcp__bip__get_context*
223
+ Claude: ⚠️ No session context found yet.
224
+
225
+ I haven't captured any coding activity in this session yet.
226
+ You can either:
227
+
228
+ 1. Start coding and try /bp again later
229
+ 2. Provide a custom message now: /bp Your message here
230
+
231
+ What would you like to do?
232
+ ```
233
+
234
+ ## Setup Command
235
+
236
+ If user runs `/bp setup`, guide them through authentication:
237
+
238
+ 1. Explain they need Twitter API credentials
239
+ 2. Call `mcp__bip__setup_auth` to start OAuth flow
240
+ 3. Guide them through the PIN-based authentication
241
+ 4. Confirm success
242
+
243
+ ## Advanced Features
244
+
245
+ If the session context has:
246
+ - **Multiple commits**: Suggest creating a thread instead (use `mcp__bip__thread`)
247
+ - **Challenges logged**: Include them in the suggestions
248
+ - **Learnings captured**: Highlight TIL moments
249
+
250
+ ## Important Notes for Retro Mode
251
+
252
+ **RETRO MODE is the power feature!** When user says `/bp retro`:
253
+
254
+ 1. **Be thorough**: Read the ENTIRE conversation from start to finish
255
+ 2. **Extract intelligently**: Don't just list files - understand what was ACCOMPLISHED
256
+ 3. **Be specific**: "Implemented OAuth authentication" is better than "Modified auth files"
257
+ 4. **Capture the meta**: If they're building a tool about X while doing X, highlight that!
258
+ 5. **Include numbers**: "Modified 10 files, fixed 3 bugs, shipped v0.3.0"
259
+ 6. **Emotion matters**: Include excitement, frustration overcome, aha moments
260
+ 7. **Tech stack**: Mention tools/frameworks used (TypeScript, MCP, Twitter API, etc.)
261
+
262
+ **Context Quality Examples:**
263
+
264
+ ❌ Bad: `achievements: ["changed files", "ran commands"]`
265
+
266
+ ✅ Good: `achievements: [
267
+ "Implemented AI-powered tweet suggestion engine with 4 strategies",
268
+ "Built hybrid manual/auto posting system",
269
+ "Fixed OAuth 403 errors by regenerating tokens with correct permissions",
270
+ "Shipped v0.3.0 with full context tracking"
271
+ ]`
272
+
273
+ Stay helpful, conversational, and make build-in-public feel effortless!
package/README.md CHANGED
@@ -24,7 +24,7 @@ This MCP server analyzes your coding sessions and generates intelligent tweet su
24
24
  ### Method 1: NPX (Recommended)
25
25
 
26
26
  ```bash
27
- claude mcp add --transport stdio build-in-public npx -y @lucianfialho/build-in-public-mcp
27
+ claude mcp add --transport stdio build-in-public npx @lucianfialho/build-in-public-mcp
28
28
  ```
29
29
 
30
30
  ### Method 2: Global Install
@@ -193,11 +193,11 @@ Check authentication status and show storage location.
193
193
  ## 🗺️ Roadmap
194
194
 
195
195
  - [x] v0.1.0 - Basic MCP server + STDIO transport
196
- - [x] v0.2.0 - Twitter OAuth + tweet posting + thread creation
197
- - [ ] v0.3.0 - MCP prompts + better error handling
196
+ - [x] v0.2.0 - Twitter OAuth + tweet posting + thread creation
197
+ - [x] v0.3.0 - AI-powered suggestions + retro mode + context tracking ✅
198
198
  - [ ] v1.0.0 - Production ready + comprehensive docs
199
- - [ ] v1.1.0 - Skill for automatic context tracking
200
- - [ ] v2.0.0 - Optional Apify backend for analytics
199
+ - [ ] v1.1.0 - Enhanced hooks for automatic context tracking
200
+ - [ ] v2.0.0 - Optional analytics and insights
201
201
 
202
202
  ## 🤝 Contributing
203
203
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucianfialho/build-in-public-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MCP server for Build in Public - automatically share your dev progress on Twitter with AI-powered suggestions",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {
@@ -28,6 +28,7 @@
28
28
  "files": [
29
29
  "dist",
30
30
  "server.json",
31
+ ".claude",
31
32
  "README.md",
32
33
  "LICENSE"
33
34
  ],