linkedin-studio/hooks/prompts/topic-rotation-gate.md
Kjell Tore Guttormsen 40986575b6 feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command
Add /ultraresearch-local for structured research combining local codebase
analysis with external knowledge via parallel agent swarms. Produces research
briefs with triangulation, confidence ratings, and source quality assessment.

New command: /ultraresearch-local with modes --quick, --local, --external, --fg.
New agents: research-orchestrator (opus), docs-researcher, community-researcher,
security-researcher, contrarian-researcher, gemini-bridge (all sonnet).
New template: research-brief-template.md.

Integration: --research flag in /ultraplan-local accepts pre-built research
briefs (up to 3), enriches the interview and exploration phases. Planning
orchestrator cross-references brief findings during synthesis.

Design principle: Context Engineering — right information to right agent at
right time. Research briefs are structured artifacts in the pipeline:
ultraresearch → brief → ultraplan --research → plan → ultraexecute.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 08:58:35 +02:00

2.5 KiB

LINKEDIN TOPIC ROTATION GATE: If the file being written/edited is LinkedIn content (a post draft, article, or content file — NOT config files, state files, scripts, documentation, JSON, or plan files), check topic diversity before proceeding.

Step 1: Read State Read ~/.claude/linkedin-thought-leadership.local.md and extract:

  • last_post_topic — the pillar of the most recent post
  • expertise_areas — the user's 5 content pillars
  • ## Recent Posts section — post history with topic_area tags

Step 2: Identify Current Pillar Determine which expertise_area the current post best matches. Use semantic matching — the post doesn't need to use the exact pillar name, but its core topic should clearly map to one of the 5 expertise_areas.

Step 3: Run Checks

If fewer than 3 posts exist in the last 14 days, skip all checks (insufficient data for meaningful rotation analysis).

Check 1 — Back-to-back repetition: If the current post's pillar matches last_post_topic, flag:

"TOPIC ROTATION WARNING: This post covers the same pillar ([pillar]) as your last post. Consider switching to an underrepresented pillar for better audience diversity and algorithmic reach."

Check 2 — 14-day balance: Count posts per pillar from the ## Recent Posts section (last 14 days only). If any single pillar accounts for more than 50% of posts in that window, flag:

"PILLAR BALANCE WARNING: [pillar] has [X] of [Y] posts ([Z]%) in the last 14 days. LinkedIn's algorithm rewards topic consistency across your niche, but over-concentration on one pillar signals narrowing expertise."

Check 3 — Off-topic: If the current post does not match ANY of the 5 expertise_areas, flag:

"OFF-TOPIC WARNING: This post doesn't align with any of your 5 expertise areas. Off-pillar posts weaken your 360Brew topical authority signal. Consider reframing to connect with [closest pillar]."

Step 4: Suggest Alternatives If any check flagged, suggest 2-3 underrepresented pillars with context:

"Underrepresented pillars to consider:

  • [Pillar A] — last posted [X] days ago ([N] posts in 14 days)
  • [Pillar B] — last posted [Y] days ago ([M] posts in 14 days)
  • [Pillar C] — last posted [Z] days ago ([P] posts in 14 days)"

This is a WARN-ONLY hook. Do not block content creation. Present the warning and let the user decide whether to adjust.

Skip this check if the file is a config file, state file (.local.md), script, hook, JSON, plan file, documentation, or any non-content file. Only apply to LinkedIn post drafts and articles.