From 9f65daa2882322d22f47a6b52776d4ebf92f552e Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Sat, 30 May 2026 01:26:36 +0200 Subject: [PATCH] =?UTF-8?q?refactor(linkedin-studio):=20wire=20or=20delete?= =?UTF-8?q?=2011=20orphan=20agents=20(case-by-case)=20=E2=80=94=209=20here?= =?UTF-8?q?,=202=20in=20Steps=2014/16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves the orphan-agent audit finding by the locked default: wire all, no deletions, so the agent count stays 19. Per agent, added Task to the target command's allowed-tools and a coherent 'subagent_type: linkedin-studio:' delegation at a real point in the command's flow (not a token grep-match). Wired (agents 1-9 of 11): video-scripter -> video.md (Step 4); content-optimizer -> post.md (Step 7 refinement) + ab-test.md (2a.4 optimized challenger); analytics-interpreter -> report.md (Step 7, report mode) + analyze.md (Step 2, interpret mode); content-planner -> batch.md (Step 2) + pipeline.md (Step 1); trend-spotter -> batch.md (Step 1) + pipeline.md (Step 1); network-builder -> outreach.md (Step 3a); strategy-advisor -> strategy.md (Step 3); voice-trainer -> setup.md (Step 3a); post-feedback-monitor -> calendar.md (publish action, 48h monitor). Deferred to their dedicated steps: #10 differentiation-checker -> Step 14 (short-form de-AI gate), #11 engagement-coach -> Step 16 (first-hour command). Namespaced subagent_type form requires a session reload before the wired agents are invokable. Verify: each of the 9 has >=1 invocation in commands/; structural lint 61/61 (counts 19/26/25/6 intact); agent-fixtures 35/35; hook tests 62/62. Three-doc + version reconciliation deferred to Step 21 per the locked plan [skip-docs]. Co-Authored-By: Claude Opus 4.8 --- plugins/linkedin-studio/commands/ab-test.md | 3 +++ plugins/linkedin-studio/commands/analyze.md | 3 +++ plugins/linkedin-studio/commands/batch.md | 4 +++- plugins/linkedin-studio/commands/calendar.md | 3 ++- plugins/linkedin-studio/commands/outreach.md | 3 +++ plugins/linkedin-studio/commands/pipeline.md | 2 ++ plugins/linkedin-studio/commands/post.md | 3 +++ plugins/linkedin-studio/commands/report.md | 3 ++- plugins/linkedin-studio/commands/setup.md | 3 +++ plugins/linkedin-studio/commands/strategy.md | 3 ++- plugins/linkedin-studio/commands/video.md | 3 ++- 11 files changed, 28 insertions(+), 5 deletions(-) diff --git a/plugins/linkedin-studio/commands/ab-test.md b/plugins/linkedin-studio/commands/ab-test.md index 9c6dd44..fa81184 100644 --- a/plugins/linkedin-studio/commands/ab-test.md +++ b/plugins/linkedin-studio/commands/ab-test.md @@ -15,6 +15,7 @@ allowed-tools: - Write - Bash - AskUserQuestion + - Task --- # LinkedIn A/B Testing Command @@ -115,6 +116,8 @@ Document the test variant: - Ensure ONLY the target variable changes - Be concrete: "Provocative question hooks, e.g., 'What if AI readiness has nothing to do with technology?'" +When variant B is an *optimized* challenger to the control (rather than a simple variable swap), delegate the rewrite to the `content-optimizer` agent — invoke it via `Task` with `subagent_type: linkedin-studio:content-optimizer` (foreground, from this command layer), holding every dimension constant except the target variable so the test stays clean. + ### 2a.5: Plan Execution Generate a posting schedule that alternates A/B on comparable days: diff --git a/plugins/linkedin-studio/commands/analyze.md b/plugins/linkedin-studio/commands/analyze.md index 1d973ed..933eac4 100644 --- a/plugins/linkedin-studio/commands/analyze.md +++ b/plugins/linkedin-studio/commands/analyze.md @@ -9,6 +9,7 @@ description: | allowed-tools: - Read - AskUserQuestion + - Task --- # LinkedIn Performance Analysis & Troubleshooting @@ -37,6 +38,8 @@ Use AskUserQuestion to understand the situation: ## Step 2: Gather Data +If imported analytics data exists (`assets/analytics/`), delegate audience-pattern discovery to the `analytics-interpreter` agent (interpret mode) — invoke it via `Task` with `subagent_type: linkedin-studio:analytics-interpreter` (foreground, from this command layer) — to ground the diagnosis in what the data actually shows before relying on self-report. + Based on their answer, ask relevant follow-up questions: ### If Reach Dropped Suddenly diff --git a/plugins/linkedin-studio/commands/batch.md b/plugins/linkedin-studio/commands/batch.md index af0b825..ed491a6 100644 --- a/plugins/linkedin-studio/commands/batch.md +++ b/plugins/linkedin-studio/commands/batch.md @@ -40,10 +40,12 @@ Use AskUserQuestion: 3. **Use existing plan** — Follow the weekly plan already created 4. **Mix it up** — Diverse topics across pillars -If they choose a theme, help them identify 3-5 unique angles from `references/thought-leadership-angles.md`. +If they choose a theme, help them identify 3-5 unique angles from `references/thought-leadership-angles.md`. For timely angles, delegate to the `trend-spotter` agent — invoke it via `Task` with `subagent_type: linkedin-studio:trend-spotter` (foreground, from this command layer) — to surface trending topics and score their relevance against the user's pillars. ## Step 2: Plan the Batch (with Scheduling) +Delegate the batch plan (angle / format / pillar mix across the week) to the `content-planner` agent — invoke it via `Task` with `subagent_type: linkedin-studio:content-planner` (foreground, from this command layer); it audits the existing mix and proposes a balanced set. This command owns scheduling the result. + Read `${CLAUDE_PLUGIN_ROOT}/references/scheduling-strategy.md` for optimal posting slots. Calculate scheduled dates based on `weekly_goal` from state: diff --git a/plugins/linkedin-studio/commands/calendar.md b/plugins/linkedin-studio/commands/calendar.md index 42885f2..ed9ea23 100644 --- a/plugins/linkedin-studio/commands/calendar.md +++ b/plugins/linkedin-studio/commands/calendar.md @@ -13,6 +13,7 @@ allowed-tools: - Write - Edit - AskUserQuestion + - Task --- # LinkedIn Content Calendar @@ -148,7 +149,7 @@ First Hour: 48-Hour Check-In: - Run /linkedin:analyze after 48 hours to review performance -- Or use post-feedback-monitor agent for real-time tracking +- For real-time tracking, delegate to the `post-feedback-monitor` agent — invoke it via `Task` with `subagent_type: linkedin-studio:post-feedback-monitor` (foreground, from this command layer) to watch the post's first-48h engagement and flag anomalies early ``` **3f. Ask about more.** Use AskUserQuestion: diff --git a/plugins/linkedin-studio/commands/outreach.md b/plugins/linkedin-studio/commands/outreach.md index 0c2a026..bcf323a 100644 --- a/plugins/linkedin-studio/commands/outreach.md +++ b/plugins/linkedin-studio/commands/outreach.md @@ -19,6 +19,7 @@ allowed-tools: - WebFetch - AskUserQuestion - Write + - Task --- # LinkedIn Outreach Orchestrator (Collaborations + Speaking) @@ -168,6 +169,8 @@ Ask the user (via AskUserQuestion): 3. Someone recently engaged with my content 4. I want to build a collaboration network from scratch +For options 2 and 4 (finding partners or building a network from scratch), delegate discovery and prioritization to the `network-builder` agent — invoke it via `Task` with `subagent_type: linkedin-studio:network-builder` (foreground, from this command layer); it identifies niche-relevant connections and applies the scoring criteria below. + #### Partner Scoring Criteria For each potential partner, evaluate: diff --git a/plugins/linkedin-studio/commands/pipeline.md b/plugins/linkedin-studio/commands/pipeline.md index 360564f..7d13d1b 100644 --- a/plugins/linkedin-studio/commands/pipeline.md +++ b/plugins/linkedin-studio/commands/pipeline.md @@ -46,6 +46,8 @@ Otherwise, check state file for `next_planned_topic`: 1. I have an idea already 2. Generate ideas for me +To situate the post in the broader plan — does it fill a content-mix gap or repeat a recent pillar? — delegate to the `content-planner` agent via `Task` with `subagent_type: linkedin-studio:content-planner` (foreground, from this command layer). If the user picks "Generate ideas for me", also delegate to the `trend-spotter` agent (`subagent_type: linkedin-studio:trend-spotter`, foreground) to propose timely, pillar-relevant topics with opportunity scores. + ## Step 2: Draft Once topic is chosen, create the draft: diff --git a/plugins/linkedin-studio/commands/post.md b/plugins/linkedin-studio/commands/post.md index b7fee3c..7c517c2 100644 --- a/plugins/linkedin-studio/commands/post.md +++ b/plugins/linkedin-studio/commands/post.md @@ -13,6 +13,7 @@ allowed-tools: - WebFetch - Bash - AskUserQuestion + - Task --- # LinkedIn Post Creation Workflow @@ -156,6 +157,8 @@ Do NOT use AskUserQuestion here. Simply state: Wait for the user to respond naturally. Iterate until they're satisfied or they indicate the post is ready. +When a refinement calls for systematic optimization — hook strength, structure, or engagement mechanics rather than a one-line tweak — delegate to the `content-optimizer` agent: invoke it via `Task` with `subagent_type: linkedin-studio:content-optimizer` (foreground, from this command layer), then apply its suggestions to the draft. For light touch-ups, edit inline. + ## Step 8: Pre-Publish Reminder Before they post, remind them: diff --git a/plugins/linkedin-studio/commands/report.md b/plugins/linkedin-studio/commands/report.md index 61966cf..694c39b 100644 --- a/plugins/linkedin-studio/commands/report.md +++ b/plugins/linkedin-studio/commands/report.md @@ -11,6 +11,7 @@ allowed-tools: - Read - Glob - AskUserQuestion + - Task --- # LinkedIn Analytics Weekly Report @@ -303,7 +304,7 @@ Example recommendations: ## Step 7: Generate Actionable Recommendations -Based on the report data, provide 2-3 specific, actionable recommendations: +Delegate interpretation to the `analytics-interpreter` agent (report mode) — invoke it via `Task` with `subagent_type: linkedin-studio:analytics-interpreter` (foreground, from this command layer), passing the generated report data; it surfaces the patterns behind the numbers. Based on the report data and the agent's reading, provide 2-3 specific, actionable recommendations: **Framework for recommendations:** diff --git a/plugins/linkedin-studio/commands/setup.md b/plugins/linkedin-studio/commands/setup.md index 83d7717..39a6054 100644 --- a/plugins/linkedin-studio/commands/setup.md +++ b/plugins/linkedin-studio/commands/setup.md @@ -13,6 +13,7 @@ allowed-tools: - Glob - Write - AskUserQuestion + - Task --- # LinkedIn Plugin Setup & Personalization @@ -82,6 +83,8 @@ Based on their answer, run the corresponding sub-workflow below. **Goal:** Populate `assets/voice-samples/authentic-voice-samples.md` with real voice data. +**Delegate the analysis + profile construction to the `voice-trainer` agent** — invoke it via `Task` with `subagent_type: linkedin-studio:voice-trainer` (foreground, from this command layer). The agent performs the pattern detection and extraction (steps 2–3 below) and returns the structured voice profile; this command owns collecting the samples (step 1) and writing the profile back to disk (steps 4–6). + 1. Ask the user to paste 3-5 of their best LinkedIn posts (or any professional writing samples) 2. Analyze the samples for: - **Sentence structure:** Short/long, simple/complex, varied? diff --git a/plugins/linkedin-studio/commands/strategy.md b/plugins/linkedin-studio/commands/strategy.md index 860eab3..4248088 100644 --- a/plugins/linkedin-studio/commands/strategy.md +++ b/plugins/linkedin-studio/commands/strategy.md @@ -15,6 +15,7 @@ allowed-tools: - Grep - WebFetch - AskUserQuestion + - Task --- # LinkedIn Growth Strategy @@ -150,7 +151,7 @@ Based on follower count, place user in the right phase: ## Step 3: Provide Phase-Specific Strategy -Based on their phase, provide detailed guidance. +Delegate the growth recommendation to the `strategy-advisor` agent — invoke it via `Task` with `subagent_type: linkedin-studio:strategy-advisor` (foreground, from this command layer), passing the detected phase and trajectory; it matches the user to the right roadmap phase and prioritizes high-impact actions. Use its output to provide detailed guidance. ### For Phase 0-1 (Under 3,000) diff --git a/plugins/linkedin-studio/commands/video.md b/plugins/linkedin-studio/commands/video.md index bf2f8e3..6e26fda 100644 --- a/plugins/linkedin-studio/commands/video.md +++ b/plugins/linkedin-studio/commands/video.md @@ -12,6 +12,7 @@ allowed-tools: - Write - Bash - AskUserQuestion + - Task --- # LinkedIn Video Script Creation Workflow @@ -77,7 +78,7 @@ Follow the same flow as `/linkedin:post`: ## Step 4: Generate Script -Delegate to the `video-scripter` agent for script generation. The agent will: +Delegate script generation to the `video-scripter` agent — invoke it via `Task` with `subagent_type: linkedin-studio:video-scripter` (foreground, from this command layer). The agent will: 1. Calculate word budget based on selected length (duration × 2.5 wps) 2. Select the appropriate script template from `references/video-strategy-guide.md`