diff --git a/commands/calendar.md b/commands/calendar.md index 3ca7a94..661021a 100644 --- a/commands/calendar.md +++ b/commands/calendar.md @@ -39,8 +39,15 @@ console.log('=== OVERDUE ==='); console.log(queueFormatSummary(queueOverdue())); console.log('=== COUNTS ==='); console.log(JSON.stringify(queueCount(), null, 2)); +console.log('=== ENTRY RECORDS (internal — id / draft_path / character_count etc. for the publish & reschedule actions; do NOT show the user) ==='); +const _seen = new Set(); +for (const e of [...queueToday(), ...queueOverdue(), ...queueUpcoming(14)]) { + if (_seen.has(e.id)) continue; _seen.add(e.id); + console.log(JSON.stringify({ id: e.id, draft_path: e.draft_path, scheduled_date: e.scheduled_date, scheduled_time: e.scheduled_time, hook_preview: e.hook_preview, pillar: e.pillar, format: e.format, character_count: e.character_count })); +} " ``` +The `queueFormatSummary` blocks are the human-readable overview; the **ENTRY RECORDS** block is the agent's lookup table for the `id`, `draft_path`, and `character_count` that the action steps need (these fields are not in the readable summary). Also read state for context: - `~/.claude/linkedin-studio.local.md` for weekly goal and current progress @@ -110,7 +117,7 @@ No posts scheduled for today. - Run /linkedin:quick for an unplanned quick post ``` -**3b. Pick a post.** Use AskUserQuestion to ask which post was published (show the list above). +**3b. Pick a post.** Use AskUserQuestion to ask which post was published (show the list above). Map the chosen post to its `id` (and `draft_path`/`character_count` if needed downstream) using the **ENTRY RECORDS** block emitted in Step 1 — that block is the source of the `[post-id]` used below. **3c. Update queue status:** ```bash @@ -168,8 +175,8 @@ If they choose to reschedule: 2. Ask for the new date and time 3. Re-add the entry with the **same id** and new date/time — `queueAdd` replaces any existing entry with that id, so the post moves in place (no duplicate). Carry the - unchanged fields (draft_path, pillar, format, hook preview, char count) from the - entry shown in Step 2: + unchanged fields (id, draft_path, pillar, format, hook preview, char count) from the + **ENTRY RECORDS** block emitted in Step 1: ```bash node --input-type=module -e "import { queueAdd } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/queue-manager.mjs'; console.log(queueAdd('[post-id]', '[draft_path]', '[new-YYYY-MM-DD]', '[new-HH:MM]', '[pillar]', '[format]', '[hook preview]', [charCount]));" ``` diff --git a/commands/carousel.md b/commands/carousel.md index e607987..acc0095 100644 --- a/commands/carousel.md +++ b/commands/carousel.md @@ -208,9 +208,11 @@ CAPTION Then auto-copy the full deck to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Substitute `` with the assembled deck above — all slides' copy + the caption. Then confirm: "Full deck — [N] slides + caption — copied to clipboard." +Substitute `` between the heredoc markers with the assembled deck above — all slides' copy + the caption (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, confirm: "Full deck — [N] slides + caption — copied to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the deck above manually — do not claim it was copied. Offer refinement options as text (no interactive prompt): "Want to refine? Options: adjust slide text / change visual style / regenerate specific slide / different hook / ready for publishing." diff --git a/commands/first-post.md b/commands/first-post.md index 221b9ba..d629bda 100644 --- a/commands/first-post.md +++ b/commands/first-post.md @@ -138,10 +138,12 @@ Show the post with: Auto-copy the post text to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then present: "Post copied to clipboard. Go to linkedin.com, click 'Start a post', paste it, and hit Post." +Substitute `` with the exact post text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, present: "Post copied to clipboard. Go to linkedin.com, click 'Start a post', paste it, and hit Post." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. ## Step 7: State Update diff --git a/commands/firsthour.md b/commands/firsthour.md index bfdcd1d..d8fba78 100644 --- a/commands/firsthour.md +++ b/commands/firsthour.md @@ -69,10 +69,12 @@ Show, in this order: Auto-copy the self-comments + draft replies to clipboard silently (so they're one paste away): ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then confirm: "Copied your draft comments to clipboard." +Substitute `` with the exact comments block between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, confirm: "Copied your draft comments to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. ## Step 4: Persist the Plan to State diff --git a/commands/multiplatform.md b/commands/multiplatform.md index d46aa5f..639b2be 100644 --- a/commands/multiplatform.md +++ b/commands/multiplatform.md @@ -118,9 +118,11 @@ After creating the adaptation: - Save to `${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/drafts/multiplatform/[platform]-[slug].md` - Auto-copy the adapted content to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -- Present the content and confirm: "Copied to clipboard." +- Substitute `` with the exact adapted text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Present the content, and only if the helper prints `COPIED`, confirm: "Copied to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. - Note platform-specific publishing tips ## Reference Files diff --git a/commands/onboarding.md b/commands/onboarding.md index 99a31c2..9eaa8ad 100644 --- a/commands/onboarding.md +++ b/commands/onboarding.md @@ -218,9 +218,11 @@ Fix any miss before showing it. Show the post with its character count, the hook highlighted, and one alternative hook. Auto-copy the post text to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then say: "Post copied to clipboard. Go to linkedin.com, click 'Start a post', paste it, and hit Post." +Substitute `` with the exact post text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, say: "Post copied to clipboard. Go to linkedin.com, click 'Start a post', paste it, and hit Post." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. ### 3.5 — Record it diff --git a/commands/pipeline.md b/commands/pipeline.md index eff4b54..c19efea 100644 --- a/commands/pipeline.md +++ b/commands/pipeline.md @@ -136,7 +136,9 @@ Offer to help identify target profiles and draft comments. Auto-copy the final post text to clipboard silently before presenting: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` Present the final post as copy-paste ready content: diff --git a/commands/post.md b/commands/post.md index cfbd5b1..ebb60ee 100644 --- a/commands/post.md +++ b/commands/post.md @@ -150,9 +150,11 @@ Present ONE draft with: Auto-copy the final post text to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then confirm: "Copied to clipboard." +Substitute `` with the exact post text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, confirm: "Copied to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. Do NOT proactively offer alternative versions. Only generate alternatives if the user asks for them. diff --git a/commands/quick.md b/commands/quick.md index 614bbdf..fbb6942 100644 --- a/commands/quick.md +++ b/commands/quick.md @@ -159,9 +159,11 @@ Show the post with: Auto-copy the final post text to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then confirm: "Copied to clipboard." +Substitute `` with the exact post text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, confirm: "Copied to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. Do NOT proactively offer alternative versions. Only generate alternatives if the user asks. diff --git a/commands/react.md b/commands/react.md index 9772eb8..a750f8c 100644 --- a/commands/react.md +++ b/commands/react.md @@ -146,9 +146,11 @@ Show: Auto-copy the main draft text to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then confirm: "Copied to clipboard." +Substitute `` with the exact draft text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, confirm: "Copied to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. Do NOT use AskUserQuestion for refinement. Simply state: diff --git a/commands/report.md b/commands/report.md index f261c5b..0086390 100644 --- a/commands/report.md +++ b/commands/report.md @@ -10,6 +10,7 @@ allowed-tools: - Bash - Read - Glob + - Write - AskUserQuestion - Task --- @@ -69,7 +70,7 @@ Enter your choice: ``` **If monthly (option 2):** Ask for month (YYYY-MM format, default to current month), then jump to **Step 2b**. -**If heatmap (option 3):** Run the heatmap CLI command and jump to **Step 6c**. +**If heatmap (option 3):** Run the heatmap CLI command and jump to **Step 2c**. **If weekly (option 1 or default):** Continue below. ### Weekly: Determine Week diff --git a/commands/video.md b/commands/video.md index 47a2085..e64bb35 100644 --- a/commands/video.md +++ b/commands/video.md @@ -172,9 +172,11 @@ Style: [minimal / branded / text-heavy] Auto-copy the POST CAPTION text to clipboard silently: ```bash -printf '%s' '' | node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs +node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/clipboard-helper.mjs <<'__LINKEDIN_CLIP_EOF__' + +__LINKEDIN_CLIP_EOF__ ``` -Then confirm: "Post caption copied to clipboard." +Substitute `` with the exact caption text between the heredoc markers (a quoted heredoc keeps apostrophes, `%`, `$`, and backticks literal). Only if the helper prints `COPIED`, confirm: "Post caption copied to clipboard." If it prints `FAILED:`, tell the user no clipboard tool was found and to copy the text above manually — do not claim it was copied. ## Step 7: Refinement Cycle