feat(linkedin): integrate state-updater.mjs across all commands and hooks
Replace manual YAML editing instructions with deterministic state-updater.mjs calls in 8 content commands (post, quick, react, pipeline, first-post, video, publish, carousel) and 2 hook prompts (state-update-reminder, post-creation-automation). Batch.md gets note that state updates happen at publish time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
aa5cca9cf6
commit
1474948ef8
11 changed files with 141 additions and 72 deletions
|
|
@ -145,13 +145,20 @@ Then present: "Post copied to clipboard. Go to linkedin.com, click 'Start a post
|
|||
|
||||
## Step 7: State Update
|
||||
|
||||
After finalizing:
|
||||
- Set `first_post_date` to today (YYYY-MM-DD) — this is the most important update
|
||||
- Set `last_post_date` to today
|
||||
- Set `last_post_topic` to the topic
|
||||
- Set `posts_this_week` to 1 (or increment if week matches)
|
||||
- Set `current_streak` to 1
|
||||
- Add entry to "## Recent Posts"
|
||||
After finalizing, update state deterministically (this also sets `first_post_date` automatically):
|
||||
```bash
|
||||
node --input-type=module -e "
|
||||
import { writeState, updatePostTracking } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/state-updater.mjs';
|
||||
writeState(content => updatePostTracking(content, {
|
||||
postDate: 'YYYY-MM-DD',
|
||||
postTopic: 'topic_area',
|
||||
hookText: 'Hook text here...',
|
||||
charCount: NNNN,
|
||||
format: 'post'
|
||||
}));
|
||||
"
|
||||
```
|
||||
Replace placeholders with actual post data. `first_post_date` is set automatically when null.
|
||||
|
||||
## Step 8: Next Steps
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue