pressclaw 0.2.0 → 0.3.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/README.md CHANGED
@@ -1,67 +1,74 @@
1
- # PressClaw
1
+ <p align="center">
2
+ <h1 align="center">PressClaw</h1>
3
+ <p align="center"><strong>Your AI agent's writing pipeline. Think → Draft → Publish.</strong></p>
4
+ <p align="center">
5
+ <a href="https://www.npmjs.com/package/pressclaw"><img src="https://img.shields.io/npm/v/pressclaw.svg" alt="npm version"></a>
6
+ <a href="https://github.com/niklasbabel/pressclaw/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/pressclaw.svg" alt="license"></a>
7
+ </p>
8
+ </p>
2
9
 
3
- **Turn conversations into published content.**
10
+ PressClaw is an [OpenClaw](https://openclaw.ai) plugin that turns your conversations into published content. Your AI agent handles the heavy lifting — drafting, rewriting, testing against audiences, adapting for platforms — while you stay in control of what goes public.
4
11
 
5
- An [OpenClaw](https://github.com/openclaw/openclaw) plugin that gives your AI agent a complete writing pipeline — from rough idea to published blog post, with style learning, audience testing, and platform adaptation along the way.
12
+ **Nothing publishes without your say-so. Ever.**
6
13
 
7
- You think. Your agent writes. You decide what goes public.
14
+ ```bash
15
+ npm install pressclaw
16
+ ```
8
17
 
9
18
  ---
10
19
 
11
- ## How It Works
20
+ ## Features
12
21
 
13
- PressClaw is built on a few beliefs:
22
+ ### 🔄 Full Writing Pipeline
23
+ Idea → Draft → Transform → Refine → Test → Publish. Use every step or skip to what you need. Your agent runs the pipeline; you make the calls.
14
24
 
15
- 1. **Private first.** Every note starts private. Nothing goes public until you explicitly say so. Your agent can draft, transform, and refine all day — the world sees nothing until you run `publish`.
25
+ ### 🧬 Style DNA
26
+ PressClaw learns how *you* write. Sentence rhythm, vocabulary level, perspective, readability — it builds a living style profile from your published work so your agent writes in your voice, not generic AI-speak.
16
27
 
17
- 2. **Agent-native.** This isn't a text editor with AI sprinkled on top. Your AI agent does the heavy lifting — drafting, transforming structure, adapting tone, testing against audience personas. The plugin provides the pipeline and guardrails.
28
+ ### 🎭 Personas & Tone Control
29
+ Write as yourself, or switch between voices. Built-in tones (authentic, professional, casual, humorous) plus custom personas you define. Create a "technical deep-dive" voice and a "casual newsletter" voice — use either on any post.
18
30
 
19
- 3. **Style learning.** As you publish more, PressClaw builds a Style DNA profile from your writing. Sentence length patterns, perspective preferences, vocabulary level, readability scores. Your agent uses this to maintain your voice across everything it writes.
31
+ ### 📱 Platform Adaptation
32
+ One post, every platform. Reshape content natively for **LinkedIn** (long-form hooks), **Twitter/X** (punchy single tweets), or **Threads** (numbered breakdowns). Each adapter knows the platform's conventions, limits, and what performs.
20
33
 
21
- 4. **Explicit publish only.** The publish command requires confirmation and an optional reason. There's a clear boundary between "drafting space" and "public output." Your agent can't accidentally publish something.
34
+ ### 🐦 Twitter Posting
35
+ Publish directly to Twitter/X from your pipeline. Draft → test → adapt → post, all without leaving your terminal.
22
36
 
23
- The flow: **idea → draft → transform → refine → test → publish**. Skip steps as needed. The pipeline is there when you want it.
37
+ ### 📡 Agent Feed
38
+ Your published content serves as a clean static site with RSS. Minimal HTML, zero JavaScript, proper typography. Readers get content; you keep control.
24
39
 
25
- ---
40
+ ### 📊 Performance Insights
41
+ Audience-test posts against configurable personas (technical builder, founder, learner, brand strategist) before publishing. Get engagement predictions, sentiment scores, and actionable feedback — so you ship with confidence.
26
42
 
27
- ## What You Get
28
-
29
- - **Markdown notes** with YAML frontmatter as the source of truth
30
- - **Static HTML site** with clean typography and an RSS feed
31
- - **Dashboard** (CLI and web) showing your entire pipeline at a glance
32
- - **Style DNA** that learns your writing voice over time
33
- - **7 structure templates** (structured, list, chunky, minimal, storytelling, thread, TL;DR)
34
- - **Tone control** (authentic, professional, casual, humorous — or custom personas)
35
- - **Variation generation** — produce multiple versions and pick the best one
36
- - **Audience testing** against configurable personas (technical builder, founder, learner, brand strategist)
37
- - **Platform adaptation** — reshape posts for LinkedIn, Twitter/X, or threads
38
- - **Topic backlog** with workspace scanning to surface publishable ideas
39
- - **Daily prompt cron** that asks your agent to review conversations and draft content
40
- - **HTTP serving** through OpenClaw's built-in server
43
+ ### 🎰 Variations & A/B Testing
44
+ Generate multiple versions across tone × structure combinations, test each against your audience personas, pick the winner. Data-driven content selection built into the workflow.
45
+
46
+ ### 📋 Topic Backlog
47
+ Never lose an idea. Scan your workspace for publishable insights, maintain a backlog, and draft when you're ready. Includes a daily prompt cron that nudges your agent to review yesterday's conversations.
41
48
 
42
49
  ---
43
50
 
44
- ## Installation
51
+ ## 🚀 Quick Start
45
52
 
46
- 1. Copy the plugin into your OpenClaw extensions directory:
53
+ ### 1. Install
47
54
 
48
55
  ```bash
49
- cp -r pressclaw/ ~/.openclaw/extensions/public-thinking/
56
+ openclaw plugins install pressclaw
50
57
  ```
51
58
 
52
- Or clone it directly:
59
+ Or from npm:
53
60
 
54
61
  ```bash
55
- git clone https://github.com/niklasbabel/pressclaw.git ~/.openclaw/extensions/public-thinking
62
+ npm install pressclaw
56
63
  ```
57
64
 
58
- 2. Enable it in your `openclaw.json`:
65
+ ### 2. Enable in `openclaw.json`
59
66
 
60
67
  ```json
61
68
  {
62
69
  "plugins": {
63
70
  "entries": {
64
- "public-thinking": {
71
+ "pressclaw": {
65
72
  "enabled": true,
66
73
  "config": {
67
74
  "siteTitle": "My Thinking",
@@ -73,322 +80,77 @@ git clone https://github.com/niklasbabel/pressclaw.git ~/.openclaw/extensions/pu
73
80
  }
74
81
  ```
75
82
 
76
- > **Note:** The plugin ID is `public-thinking` for backward compatibility. The name in the UI shows as "PressClaw."
77
-
78
- 3. Initialize:
83
+ ### 3. Initialize & Go
79
84
 
80
85
  ```bash
81
- openclaw notes init
86
+ openclaw notes init # Set up directories
87
+ openclaw notes new "My first post" # Create a draft
88
+ openclaw notes transform my-first-post --tone authentic --structure storytelling
89
+ openclaw notes test my-first-post # Audience test it
90
+ openclaw notes publish my-first-post # Ship it 🚀
82
91
  ```
83
92
 
84
- 4. (Optional) Set up the daily content prompt:
93
+ ### 4. See everything at a glance
85
94
 
86
95
  ```bash
87
- openclaw notes setup
96
+ openclaw notes # Full pipeline dashboard
88
97
  ```
89
98
 
90
99
  ---
91
100
 
92
- ## Configuration
93
-
94
- All settings live under `plugins.entries.public-thinking.config` in your `openclaw.json`:
95
-
96
- | Key | Type | Default | Description |
97
- |-----|------|---------|-------------|
98
- | `baseUrl` | string | `""` | Public URL for absolute links in RSS |
99
- | `publicPath` | string | `"/public"` | URL path prefix for the HTTP server |
100
- | `notesDir` | string | `""` | Notes directory (default: `{workspace}/notes`) |
101
- | `outputDir` | string | `""` | Output directory (default: `{workspace}/public`) |
102
- | `siteTitle` | string | `"Your Thinking"` | Site and RSS feed title |
103
- | `authorName` | string | `""` | Author name in post footers |
104
- | `dailyPrompt.enabled` | boolean | `true` | Enable the daily content cron job |
105
- | `dailyPrompt.schedule` | string | `"0 10 * * *"` | Cron expression (default: 10 AM daily) |
106
- | `dailyPrompt.timezone` | string | `"UTC"` | Timezone for the schedule |
107
- | `dailyPrompt.prompt` | string | *(see below)* | The prompt sent to the agent |
108
-
109
- ### Default Daily Prompt
110
-
111
- > Review yesterday's conversations and daily notes. Identify any interesting ideas, insights, or learnings worth sharing publicly. If you find something compelling, draft a short note (3-8 paragraphs) that distills the idea for a general audience. Use `openclaw notes new "<title>"` to create it, then write the content. Don't publish yet — just draft. If nothing stands out, that's fine — skip today.
112
-
113
- ---
114
-
115
- ## Command Reference
116
-
117
- ### Dashboard
118
-
119
- ```bash
120
- openclaw notes
121
- ```
122
-
123
- Shows the full pipeline at a glance: published, refined, drafted, ideas, untracked files, style profile status, and confidence scores.
124
-
125
- ### Creating & Managing Notes
126
-
127
- ```bash
128
- openclaw notes new "Title of your note"
129
- ```
130
-
131
- Creates a private markdown file with frontmatter pre-filled. Ready to write.
132
-
133
- ```bash
134
- openclaw notes list
135
- ```
136
-
137
- Lists all notes with status indicators (🔒 private, ✨ refined, 📢 public) plus any untracked topic ideas.
138
-
139
- ```bash
140
- openclaw notes preview <slug>
141
- ```
142
-
143
- Shows a note's full content, metadata, word count, tone, structure, and confidence score.
144
-
145
- ```bash
146
- openclaw notes voice "Title"
147
- ```
148
-
149
- Creates a note marked as voice input. Use for transcribed audio — creates both the note file and a topic entry.
150
-
151
- ### The Pipeline
152
-
153
- ```bash
154
- openclaw notes transform <slug> [--tone <tone>] [--structure <structure>]
155
- ```
156
-
157
- Outputs detailed transform instructions for your agent. Injects the style profile, structure template, and tone guidelines. Your agent rewrites the note following these constraints.
158
-
159
- **Tones:** `authentic` | `professional` | `casual` | `humorous`
160
- **Structures:** `structured` | `list` | `chunky` | `minimal` | `storytelling` | `thread` | `tldr`
161
-
162
- ```bash
163
- openclaw notes refine <slug>
164
- ```
165
-
166
- Marks a note as refined (ready for review). Extracts style markers, updates the aggregate style profile, and syncs topic status.
167
-
168
- ```bash
169
- openclaw notes test <slug>
170
- ```
171
-
172
- Runs audience testing against multiple personas. Each persona evaluates the content from their perspective and provides a score, sentiment, and specific feedback. Results are saved for comparison.
173
-
174
- ```bash
175
- openclaw notes publish <slug> [--yes] [--reason <text>]
176
- ```
177
-
178
- Publishes a note: sets status to public, rebuilds the HTML site and RSS feed, extracts style markers, updates the style profile. Requires confirmation unless `--yes` is passed.
179
-
180
- ```bash
181
- openclaw notes unpublish <slug>
182
- ```
183
-
184
- Reverts a note to private and removes it from the public site.
185
-
186
- ```bash
187
- openclaw notes build
188
- ```
189
-
190
- Regenerates all HTML pages and the RSS feed from published notes. Run after manual edits.
191
-
192
- ### Branding OS
193
-
194
- ```bash
195
- openclaw notes style [--from <slugs>]
196
- ```
197
-
198
- Analyzes your writing across refined/published notes and generates a style profile. Extracts voice description, markers (sentence length, perspective, emoji usage, vocabulary), anti-patterns to avoid, and example openers/closers. Use `--from` with comma-separated slugs to analyze specific notes.
199
-
200
- ```bash
201
- openclaw notes analyze <slug>
202
- ```
203
-
204
- Extracts per-note style markers (sentence count, paragraph count, word count, avg sentence length, perspective, emoji usage, Flesch-Kincaid readability) and saves them to the note's frontmatter.
205
-
206
- ```bash
207
- openclaw notes vary <slug> [--tones <tones>] [--structures <structures>]
208
- ```
209
-
210
- Generates multiple variations of a note across tone × structure combinations. Default: 4 tones × 1 structure = 4 variations. All saved to `.variations/<slug>/` with a manifest for tracking.
211
-
212
- ```bash
213
- openclaw notes variations <slug>
214
- ```
215
-
216
- Shows all generated variations for a note with their tone, structure, word count, test status, confidence, and selection state.
217
-
218
- ```bash
219
- openclaw notes pick <slug> <variation>
220
- ```
221
-
222
- Selects a variation and copies its content into the main note file. Updates frontmatter with the variation's tone and structure.
223
-
224
- ### Platform Adaptation
225
-
226
- ```bash
227
- openclaw notes adapt <slug> --platform <platform>
228
- ```
229
-
230
- Reshapes a blog post for a specific platform with detailed format rules, character limits, structure guidance, and examples of good native content.
231
-
232
- **Platforms:**
233
- - `linkedin` — Long-form post (3000 chars), hook-first, no markdown, hashtags at end
234
- - `twitter` — Single tweet (280 chars), punchy take, no hashtags
235
- - `thread` — Numbered thread (5-10 tweets), hook in tweet 1, recap + CTA at end
236
-
237
- ### Topic Backlog
238
-
239
- ```bash
240
- openclaw notes topics
241
- ```
242
-
243
- Shows the full topic backlog organized by status: ideas, drafted, refined, published.
244
-
245
- ```bash
246
- openclaw notes topics add "Title" [--source <text>] [--tags <tags>]
247
- ```
248
-
249
- Adds a new topic idea. Source tracks where the idea came from. Tags are comma-separated.
250
-
251
- ```bash
252
- openclaw notes topics draft <id-or-title>
253
- ```
254
-
255
- Creates a note file from a topic idea, links them, and updates the topic status to "drafted."
256
-
257
- ```bash
258
- openclaw notes topics remove <id-or-title>
259
- ```
260
-
261
- Removes a topic from the backlog.
262
-
263
- ```bash
264
- openclaw notes topics scan [--suggest]
265
- ```
266
-
267
- Scans your entire workspace for markdown files not yet linked to any topic. With `--suggest`, outputs a prompt for your agent to evaluate which files contain publishable ideas.
268
-
269
- ### Setup
270
-
271
- ```bash
272
- openclaw notes init
273
- ```
274
-
275
- Creates notes and output directories, copies a starter template. Run once.
276
-
277
- ```bash
278
- openclaw notes setup
279
- ```
280
-
281
- Creates the daily prompt cron job (`public-thinking-daily`) using your configured schedule and prompt.
282
-
283
- ---
284
-
285
- ## Branding OS
286
-
287
- PressClaw includes a style system that learns and maintains your writing voice.
288
-
289
- ### Style DNA
290
-
291
- Every time you publish or refine a note, PressClaw extracts style markers:
292
- - Average sentence length and paragraph density
293
- - Perspective patterns (first-person, second-person, mixed)
294
- - Emoji usage frequency
295
- - Flesch-Kincaid readability score
296
-
297
- These aggregate into a `.style-profile.json` that your agent references when writing new content. The profile evolves over time — recent notes are weighted more heavily, and evolution snapshots track how your style changes.
298
-
299
- ### Structure Templates
300
-
301
- Seven built-in structures control how content is organized:
101
+ ## 🏗️ Structure Templates
302
102
 
303
103
  | Template | Best For |
304
104
  |----------|----------|
305
105
  | `structured` | Technical explanations — headers + sections |
306
- | `list` | Actionable advice — numbered points with sub-details |
307
- | `chunky` | Mobile/scrollable — short paragraphs, rhythm-based |
308
- | `minimal` | Expert audiences — dense prose, no decoration |
309
- | `storytelling` | Experience-based — narrative arc with hook → tension → insight |
310
- | `thread` | Twitter/X — hook-first numbered segments |
311
- | `tldr` | Busy readers — conclusion first, then expand |
312
-
313
- ### Voice Personas
314
-
315
- Create named style profiles in `.style-profiles/` for different writing voices. Each persona carries its own voice description, vocabulary patterns, and anti-patterns. Reference them by name in the tone field.
316
-
317
- ### Variations & Testing
318
-
319
- The `vary` → `test` → `pick` workflow lets you:
320
- 1. Generate multiple versions across tone/structure combinations
321
- 2. Test each against audience personas for engagement prediction
322
- 3. Pick the winner and promote it to the main note
323
-
324
- ### Platform Adaptation
325
-
326
- Transform blog posts into platform-native content. Each platform adapter carries detailed conventions, character limits, structure rules, and real examples — so the output feels native, not copy-pasted.
327
-
328
- ### Style Evolution
329
-
330
- The dashboard tracks your style over time with evolution snapshots: sentence length trends, word count changes, readability shifts. See how your writing develops as you publish more.
106
+ | `list` | Actionable advice — numbered points |
107
+ | `chunky` | Mobile-friendly — short paragraphs, rhythm-based |
108
+ | `minimal` | Expert audiences — dense prose |
109
+ | `storytelling` | Experience-based — narrative arc |
110
+ | `thread` | Twitter/X — hook-first segments |
111
+ | `tldr` | Busy readers — conclusion first |
331
112
 
332
113
  ---
333
114
 
334
- ## Note Format
335
-
336
- Notes are markdown files with YAML frontmatter:
115
+ ## 💰 Free vs Premium
116
+
117
+ | | **Free** | **Premium** |
118
+ |---|---|---|
119
+ | Writing pipeline | ✅ Full pipeline | ✅ Full pipeline |
120
+ | Style DNA | ✅ Style learning | ✅ Style learning |
121
+ | Structure templates | ✅ All 7 templates | ✅ All 7 templates |
122
+ | Tone control | ✅ 4 built-in tones | ✅ + Custom personas |
123
+ | Audience testing | ✅ 4 personas | ✅ + Custom personas |
124
+ | Platform adaptation | ✅ LinkedIn, Twitter, Threads | ✅ LinkedIn, Twitter, Threads |
125
+ | Topic backlog | ✅ Full backlog | ✅ Full backlog |
126
+ | Daily prompt cron | ✅ Included | ✅ Included |
127
+ | Static site + RSS | ✅ Included | ✅ Included |
128
+ | Direct Twitter posting | — | ✅ Post from pipeline |
129
+ | Advanced analytics | — | ✅ Style evolution tracking |
130
+ | Priority support | — | ✅ Direct access |
131
+
132
+ **PressClaw is fully functional for free.** Premium unlocks power-user features for serious publishers.
337
133
 
338
- ```markdown
339
- ---
340
- title: "My Note Title"
341
- slug: "my-note-title"
342
- status: private
343
- published_at: null
344
- tone: null
345
- structure: null
346
- confidence: null
347
- tags: [ideas, tech]
348
134
  ---
349
135
 
350
- # My Note Title
136
+ ## 📖 Full Documentation
351
137
 
352
- Your content here...
353
- ```
138
+ For the complete command reference, configuration options, and architecture details, visit:
354
139
 
355
- ### Frontmatter Fields
356
-
357
- | Field | Description |
358
- |-------|-------------|
359
- | `title` | Display title |
360
- | `slug` | URL-safe identifier (auto-generated) |
361
- | `status` | `private`, `refined`, or `public` |
362
- | `published_at` | Timestamp set on publish |
363
- | `publish_reason` | Why you published this (optional) |
364
- | `topic_id` | Link to topic backlog entry |
365
- | `input_type` | How the note was created (`voice`, etc.) |
366
- | `tone` | Applied tone (authentic, professional, casual, humorous, or persona name) |
367
- | `structure` | Applied structure template |
368
- | `confidence` | Audience test score (0-10) |
369
- | `tags` | Array of tags |
370
- | `style_markers` | Auto-extracted style analysis (JSON) |
140
+ 🌐 **[pressclaw.com](https://pressclaw.com)**
371
141
 
372
142
  ---
373
143
 
374
- ## Architecture
375
-
376
- PressClaw runs as an OpenClaw plugin. It registers:
377
-
378
- - **CLI commands** under `openclaw notes` — the primary interface
379
- - **HTTP handler** serving the public blog at your configured path, plus a private `/dashboard` view
380
- - **Cron job** (optional) for daily content prompting
144
+ ## 🔗 Links
381
145
 
382
- All data lives in your workspace as markdown files and JSON. No database, no external services. The style system uses weighted averages with recency decay — recent notes influence the profile more than older ones.
383
-
384
- The HTML site is regenerated on every publish/unpublish/build. Clean, minimal CSS. No JavaScript. RSS feed included.
146
+ - 🌐 Website: [pressclaw.com](https://pressclaw.com)
147
+ - 🐦 Twitter: [@pressclawai](https://twitter.com/pressclawai)
148
+ - 📦 npm: [npmjs.com/package/pressclaw](https://www.npmjs.com/package/pressclaw)
149
+ - 💻 GitHub: [github.com/niklasbabel/pressclaw](https://github.com/niklasbabel/pressclaw)
150
+ - 🤖 Built for [OpenClaw](https://openclaw.ai)
385
151
 
386
152
  ---
387
153
 
388
154
  ## License
389
155
 
390
156
  MIT — see [LICENSE](LICENSE).
391
-
392
- ---
393
-
394
- Built for [OpenClaw](https://openclaw.ai). Docs at [docs.openclaw.ai](https://docs.openclaw.ai).