ktg-plugin-marketplace/plugins/linkedin-thought-leadership/CLAUDE.md
Kjell Tore Guttormsen d5ee9d19fa refactor(linkedin): merge collab + speaking into outreach (S17)
Step 18 (fasit S17): merged commands/collab.md + commands/speaking.md
into a single commands/outreach.md covering both tracks under one
outreach/pitch paradigm. Structural twins: same outreach/pitch flow
(readiness → identify → score → format/abstract → outreach by
temperature → production/portfolio → engagement-pod warning →
pipeline tracker → network/progression → results dashboard) with
track-specific detail at each step.

Capability checklist: every function of both predecessors preserved:
- Collab: 5-item readiness, partner search + 25-pt rubric,
  12 formats across 4 maturity tiers, cold/warm/established outreach,
  DM amplification protocol, 5-phase co-creation workflow,
  shared drafting ground rules, pipeline board, health signals,
  Inner Circle tiers, long-term partnership framework.
- Speaking: 100-pt readiness scorecard, event/CFP search +
  research template, Nordic/European tech conference calendar,
  4 talk abstract templates, speaker positioning content calendar,
  demo reel strategy, speaker bio variants (50/100/200 words),
  CFP cover note + organizer outreach (cold/warm),
  post-speaking follow-up sequence, pipeline tracker,
  progression ladder (4 levels).
- Both: engagement-pod warning (post-Mar-2025), quarterly results
  dashboard with both tracks.

Removed commands/collab.md, commands/speaking.md.

Reconciled all 16 route-refs across plugin (collab 8, speaking 8):
- commands/linkedin.md: table row, priority list (items 16-17 → 16),
  routing rules (lines 177-178 → one rule), removed 'outreach' keyword
  from network-builder agent suggestion (now belongs to /linkedin:outreach).
- skills/linkedin-thought-leadership/SKILL.md: pillar table + all-commands
  table (lines 30, 140, 142).
- skills/linkedin-networking/SKILL.md: commands table (lines 29-30).
- CLAUDE.md: commands table (lines 63-64).
- README.md: feature bullet (line 68), commands table (lines 168-169),
  skills pillar table (line 289), ToS table (line 514).

Verify: corrected predicate (test ! -f X && test ! -f Y && ! grep -rqn)
exit 0. Literal Verify (plan.md:681) exit 1 due to the same exit-inversion
bug observed at Step 16/17 — logged for plan-pass at Step 21.

Manifest audit PASS: commands/outreach.md present; [Ss]peaking 40 hits;
min_file_count=1 satisfied; forbidden/bash checks vacuous.

Net commands/: 26 → 25 (matches plan).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 05:41:09 +02:00

106 lines
6.9 KiB
Markdown

# LinkedIn Thought Leadership Plugin (v1.2.0)
Build LinkedIn thought leadership with algorithmic understanding, strategic consistency, and authentic engagement. January 2026 360Brew algorithm update integrated.
## Architecture
- **State file:** `~/.claude/linkedin-thought-leadership.local.md` (YAML frontmatter, auto-initialized from `config/state-file.template.md`)
- **State updater:** `hooks/scripts/state-updater.mjs` — deterministic state mutations (post tracking, streak, content history pruning). Pure functions, tested, no AI involvement
- **Clipboard helper:** `hooks/scripts/clipboard-helper.mjs` — cross-platform clipboard integration (macOS `pbcopy`, Linux `xclip`/`xsel`, WSL `clip.exe`). All content commands auto-copy to clipboard
- **iCal generator:** `hooks/scripts/ical-generator.mjs` — RFC 5545 calendar file generation for batch scheduling. Standalone CLI + importable module
- **Post queue:** `assets/drafts/queue.json` (managed by `hooks/scripts/queue-manager.mjs`)
- **Analytics CLI:** `scripts/analytics/` (TypeScript, requires `tsx` and `npm install`)
- **Analytics data:** `assets/analytics/` (gitignored)
## Hooks
9 hooks across 7 events. All Node.js (.mjs). PreToolUse/PostToolUse hooks use parameterized `content-gatekeeper.mjs` with `isLinkedInContent()` check.
| Event | Purpose |
|-------|---------|
| `SessionStart` | Load state, REMEMBER.md, milestone tracker |
| `PreToolUse` (Write\|Edit) | Content quality gate, voice guardian, topic rotation gate |
| `Stop` | State update, pre-publish reminders, content history |
| `UserPromptSubmit` | LinkedIn context enrichment (three-tier matching) |
| `PostToolUse` (Write) | Post-creation automation (5x5x5, posting time) |
| `PreCompact` | Preserve LinkedIn context during compaction |
| `Notification` | Posting reminders (rate-limited 30min) |
**Session markers:** `/tmp/linkedin-hooks/session-active` (Stop hook gating, 12h staleness). **Shared modules:** `linkedin-content-filter.mjs`, `queue-manager.mjs`, `personalization-score.mjs`, `state-updater.mjs`, `clipboard-helper.mjs`.
**State updates:** Post tracking, streak management, and content history are handled deterministically by `state-updater.mjs` (called from Stop hook and commands). Content history entries older than 90 days are auto-pruned at session start.
**Hook editing:** Edit `hooks/hooks.template.json` + `hooks/prompts/*.md`, then run `python3 hooks/scripts/compile-hooks.py`. Do not edit `hooks.json` directly. Prompts are loaded at runtime by gatekeeper scripts; the compile step is only needed when adding `type: prompt` hooks.
## Commands (27)
All content commands (post, quick, react, pipeline, first-post, video, multiplatform, carousel) auto-copy output to clipboard via `clipboard-helper.mjs`. Interactive steps are minimized — angle, format, and post type are inferred from context, with max 2 questions per post.
| Command | Purpose |
|---------|---------|
| `/linkedin` | Router — status line + command menu |
| `/linkedin:onboarding` | Multi-step onboarding wizard (profile → setup → first-post) |
| `/linkedin:first-post` | First-post accelerator (10 min) |
| `/linkedin:setup` | Guided personalization setup |
| `/linkedin:react` | URL-to-post pipeline |
| `/linkedin:post` | Full post creation (10-15 min) |
| `/linkedin:quick` | 5-minute quick post (3-line formula) + 8 post-type templates |
| `/linkedin:pipeline` | Full end-to-end content pipeline |
| `/linkedin:batch` | Create a full week of content |
| `/linkedin:calendar` | View/manage post scheduling queue + publish action (mark scheduled posts as published) |
| `/linkedin:carousel` | Structured multi-slide carousel generator |
| `/linkedin:video` | Video script generator (30s-2min) |
| `/linkedin:multiplatform` | Adapt content for other platforms |
| `/linkedin:analyze` | Content/performance analysis |
| `/linkedin:audit` | Periodic content strategy audit |
| `/linkedin:import` | Import CSV export → structured JSON |
| `/linkedin:report` | Generate weekly performance report |
| `/linkedin:ab-test` | Design and manage A/B content tests |
| `/linkedin:strategy` | Growth strategy planning |
| `/linkedin:authority` | Systematic authority building |
| `/linkedin:competitive` | Competitive analysis of niche |
| `/linkedin:monetize` | Monetization strategy and funnels |
| `/linkedin:outreach` | Outreach orchestrator — collaborations + speaking opportunities |
| `/linkedin:profile` | 360Brew profile optimization |
## Agents (16)
| Agent | Model | Color | Responsibility |
|-------|-------|-------|----------------|
| `content-optimizer` | Sonnet | Blue | Optimize existing posts |
| `strategy-advisor` | Sonnet | Green | Growth recommendations |
| `analytics-interpreter` | Sonnet | Yellow | Audience pattern analysis |
| `engagement-coach` | Haiku | Magenta | 5x5x5 + first-hour tactics |
| `content-planner` | Sonnet | Cyan | Content audit + weekly/monthly plans |
| `performance-reporter` | Sonnet | Amber | Weekly/monthly performance reports |
| `network-builder` | Sonnet | Teal | Strategic networking + outreach |
| `content-repurposer` | Sonnet | Purple | Format conversion + evergreen refresh |
| `comment-strategist` | Sonnet | Red | CEA commenting + target selection |
| `trend-spotter` | Sonnet | White | Trending topics + opportunity scores |
| `voice-trainer` | Sonnet | Pink | Voice profile building + drift detection |
| `differentiation-checker` | Sonnet | Gray | Originality scoring + commodity detection |
| `post-feedback-monitor` | Haiku | Lime | Post-publish 48h monitoring |
| `video-scripter` | Sonnet | Violet | Video script creation with pacing |
| `fact-checker` | Opus | Brown | Factual-claim verification against primary sources (longform) |
| `persona-reviewer` | Opus | Olive | Reader-persona resonance + hook-conversion gate (longform) |
**Rule:** Always read `assets/voice-samples/` before generating content.
**Invocation form:** Commands invoke plugin agents by their **namespaced** type —
`subagent_type: linkedin-thought-leadership:<name>` — never the bare `<name>` (a bare
type does not resolve and the `Task` call fails).
**Reload requirement:** Adding a NEW agent file under `agents/` registers it only after
a Claude Code **session reload** — the plugin agent set is built at session start, so a
freshly-added agent (e.g. `fact-checker`, `persona-reviewer` when first added) is not
invokable until the session reloads. After adding an agent, reload before invoking it.
## Content Quality Rules
1. Hook: 110-140 characters (mobile cutoff)
2. Post length: 1,200-1,800 chars (standard), 150-500 chars (quick)
3. No external links in post body (40-50% reach suppression)
4. No corporate buzzwords: leverage, synergy, paradigm shift, thought leader, disruptive, value proposition, ecosystem, holistic approach
5. Topic must align with user's 5 core expertise areas (360Brew signal)
6. Topic rotation: no back-to-back same pillar, no pillar >50% in 14 days (warn-only)
7. Progressive onboarding: personalization score hidden until 3+ posts; voice guardian suppressed until 5+ voice samples