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:
Kjell Tore Guttormsen 2026-04-11 00:42:17 +02:00
commit 1474948ef8
11 changed files with 141 additions and 72 deletions

View file

@ -182,13 +182,20 @@ After 48 hours, run `/linkedin:analyze` to review:
## State Update
After pipeline completes, update `~/.claude/linkedin-thought-leadership.local.md`:
- Set `last_post_date` to today
- Set `last_post_topic` to the topic
- Increment `posts_this_week`
- Update streak
- Add to Recent Posts
- Set `next_planned_topic` if discussed
After pipeline completes, update state deterministically:
```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: 'pipeline'
}));
"
```
Replace placeholders with actual post data. Set `next_planned_topic` manually if discussed.
## Reference Files