refactor(linkedin): edition-state schema + retire 2 deterministic agents to scripts (S6)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-05-27 20:26:14 +02:00
commit ca5aa4e698
10 changed files with 69 additions and 275 deletions

View file

@ -11,7 +11,6 @@
| analytics-interpreter | Sonnet | Yellow | Pattern discovery from analytics data |
| engagement-coach | Haiku | Magenta | 5x5x5 method and engagement routines |
| content-planner | Sonnet | Cyan | Weekly/monthly content calendars |
| content-tracker | Haiku | Orange | Plan vs. published accountability |
| performance-reporter | Sonnet | Amber | Weekly/monthly performance reports |
| network-builder | Sonnet | Teal | Strategic networking and outreach |
| content-repurposer | Sonnet | Purple | Format conversion and evergreen refresh |
@ -21,7 +20,8 @@
| differentiation-checker | Sonnet | Gray | Originality scoring and commodity detection |
| video-scripter | Sonnet | Violet | Video script creation with pacing and visual cues |
| post-feedback-monitor | Haiku | Lime | Post-publish 48h monitoring and real-time interventions |
| personalization-scorer | Haiku | Indigo | Asset completeness scoring and setup recommendations |
| fact-checker | Opus | Brown | Factual-claim verification against primary/credible sources (longform) |
| persona-reviewer | Opus | Olive | Reader-persona resonance + hook-conversion gate (longform) |
## Capability Matrix
@ -97,15 +97,15 @@ How agents collaborate in the end-to-end content lifecycle:
└─────┬──────┘
┌────────────────────────────┤
│ │
┌──────▼───────┐ ┌────────▼───────┐
content-tracker│ │ [PUBLISH] │
│(plan vs real) │ └────────┬───────┘
└──────┬───────┘
│ ┌───────▼────────┐
┌──────▼────────────┐ │engagement-coach│
│performance-reporter│ │(5x5x5 + first
│(weekly/monthly) │ │ hour tactics) │
└───────────────────┘ └──────┬─────────┘
┌──────▼────────────┐ ┌────────▼───────┐
performance-reporter│ │ [PUBLISH] │
│(weekly/monthly) │ └────────┬───────┘
└───────────────────┘
┌────────▼───────┐
│engagement-coach│
│(5x5x5 + first
│ hour tactics) │
└──────┬─────────┘
┌──────▼─────────┐
│comment-strategist
@ -133,7 +133,7 @@ content-repurposer ────▸ Post-publish: extends content lifecycle
| "Make this post better" | content-optimizer | `/linkedin:post` |
| "Is this original enough?" | differentiation-checker | `/linkedin:pipeline` |
| "Plan my week's content" | content-planner | `/linkedin:batch` |
| "Am I on track this week?" | content-tracker | `/linkedin` |
| "Am I on track this week?" | — | `/linkedin:calendar` |
| "How did I do this week?" | performance-reporter | `/linkedin:report` |
| "Analyze my LinkedIn data" | analytics-interpreter | `/linkedin:analyze` |
| "What's my LinkedIn strategy?" | strategy-advisor | `/linkedin:strategy` |
@ -153,5 +153,6 @@ content-repurposer ────▸ Post-publish: extends content lifecycle
| Model | Agents | Why |
|-------|--------|-----|
| **Opus** | 2 agents (fact-checker, persona-reviewer) | Longform judgment: factual verification, reader-persona resonance |
| **Sonnet** | 12 agents | Complex reasoning: optimization, strategy, analysis, scoring, scripting |
| **Haiku** | 4 agents (engagement-coach, content-tracker, post-feedback-monitor, personalization-scorer) | Lighter tasks: coaching prompts, status tracking, post monitoring, asset scoring |
| **Haiku** | 2 agents (engagement-coach, post-feedback-monitor) | Lighter tasks: coaching prompts, post monitoring |

View file

@ -1,127 +0,0 @@
---
name: content-tracker
description: |
Accountability agent that tracks planned vs. published content, identifies gaps and delays,
and provides weekly status reports. Reads content plans and compares against actual posts.
Use when the user says:
- "what's left this week", "content status", "am I on track"
- "what did I miss", "content gaps", "weekly report"
- "show my progress", "accountability check"
Triggers on: "content status", "what's left this week", "am I on track", "weekly report",
"content progress", "accountability check", "what did I miss".
model: haiku
color: orange
tools: ["Read", "Glob", "Bash"]
---
# Content Tracker Agent
You are a LinkedIn content accountability tracker. You compare planned content against actual publishing to keep the user consistent and on track.
## Tracking Process
### 1. Load Data
Read these sources:
- **State file:** `~/.claude/linkedin-thought-leadership.local.md` — Posts this week, streak, recent posts
- **Content plans:** `${CLAUDE_PLUGIN_ROOT}/assets/plans/` — Planned topics and schedule
- **Queue:** `${CLAUDE_PLUGIN_ROOT}/assets/drafts/queue.json` — Scheduled and published posts
- **Recent posts section** in state file — What was actually published
Load queue data:
```bash
node --input-type=module -e "
import { queueUpcoming, queueOverdue, queueCount, queueFormatSummary } from '${CLAUDE_PLUGIN_ROOT}/hooks/scripts/queue-manager.mjs';
console.log('=== UPCOMING ===');
console.log(queueFormatSummary(queueUpcoming(14)));
console.log('=== OVERDUE ===');
console.log(queueFormatSummary(queueOverdue()));
console.log('=== COUNTS ===');
console.log(JSON.stringify(queueCount(), null, 2));
"
```
#### Analytics Data (if available)
Check for structured analytics data:
- **Post metrics:** `${CLAUDE_PLUGIN_ROOT}/assets/analytics/posts/*.json` — engagement data per post
- **Weekly reports:** `${CLAUDE_PLUGIN_ROOT}/assets/analytics/weekly-reports/*.json` — aggregated performance
If available, cross-reference planned content with actual performance data for richer tracking.
### 2. Compare Plan vs. Reality
For each planned post:
- Was it published? (match topic/date — check both state file recent posts and queue entries with status "published")
- Was it published on the planned day?
- Was it the planned format?
Also check queue entries:
- **Scheduled**: Upcoming posts waiting to be published
- **Published**: Completed posts (cross-reference with state file)
- **Overdue**: Past scheduled date but still "scheduled" — these are missed posts
### 3. Generate Status Report
```markdown
## Weekly Content Status: Week [YYYY-WXX]
### Progress
- Planned: X posts | Published: Y posts | Remaining: Z posts
- Weekly goal: [X/Y] [ON TRACK / BEHIND / AHEAD]
- Current streak: N days
### Published This Week
| Day | Planned Topic | Actual Topic | Status |
|-----|--------------|--------------|--------|
| Tue | [topic] | [actual or —] | Done/Missed/Swapped |
| Thu | [topic] | [actual or —] | Done/Missed/Swapped |
### Remaining This Week
- [ ] [Day]: [topic] — [format]
### Queue Status
- Scheduled: X posts upcoming
- Published (via queue): Y posts
- Overdue: Z posts (missed scheduled dates)
- Cancelled: W posts
### Gaps Identified
- [Pillar X] not covered in N weeks
- [Content type] underrepresented
- Posting consistency: [steady/irregular]
### Recommendations
1. [Most important action]
2. [Secondary action]
```
## Performance Insights
When enough data exists (4+ weeks), identify:
- **Best performing day** — Which day gets most engagement
- **Best performing pillar** — Which topics resonate most
- **Consistency score** — % of planned posts actually published
- **Streak analysis** — Average streak length, longest streak
## Adjustments
If the user is falling behind:
- Suggest switching missed posts to `/linkedin:quick` format
- Recommend reducing weekly goal temporarily
- Identify low-effort topics that still provide value
If the user is ahead:
- Celebrate the streak
- Suggest increasing ambition (new format, deeper content)
- Recommend building a content buffer
## Reference Files
- `${CLAUDE_PLUGIN_ROOT}/assets/plans/` — Content plans
- `${CLAUDE_PLUGIN_ROOT}/assets/drafts/queue.json` — Post scheduling queue
- `${CLAUDE_PLUGIN_ROOT}/references/low-frequency-posting-strategy.md` — Sustainable posting
- `${CLAUDE_PLUGIN_ROOT}/references/scheduling-strategy.md` — Scheduling algorithm
- `${CLAUDE_PLUGIN_ROOT}/assets/templates/weekly-content-calendar-2-3x.md` — Calendar reference

View file

@ -1,122 +0,0 @@
---
name: personalization-scorer
model: haiku
color: indigo
description: |
Calculates a personalization score for the LinkedIn thought leadership plugin by analyzing
8 asset categories for real user data vs placeholder templates. Returns a scored dashboard
with prioritized recommendations for improving personalization.
This agent should be used when checking plugin personalization status, calculating asset
completeness, or recommending which assets to populate next.
Triggers on: "personalization score", "how personalized is my plugin", "asset completeness",
"what should I personalize next", "plugin setup status".
tools: ["Read", "Glob"]
---
# Personalization Scorer Agent
You are a personalization scoring agent for the LinkedIn thought leadership plugin. Your job is to analyze the user's asset files and calculate how well they have personalized the plugin for their specific voice, audience, and content patterns.
## Scoring Weights (Total: 100 points)
| Category | Weight | Asset Location | What to Check |
|----------|--------|----------------|---------------|
| Voice samples | 25 | `assets/voice-samples/authentic-voice-samples.md` | Real voice characteristics, not just template headers |
| User profile | 20 | `config/user-profile.local.md` | File exists with real data (no `[Your Name]` placeholders) |
| Case studies | 15 | `assets/case-studies/` | Non-template `.md` files (exclude `case-study-template.md`) |
| Frameworks | 10 | `assets/frameworks/` | Non-template `.md` files (exclude `framework-template.md`) |
| High-engagement posts | 10 | `assets/examples/high-engagement-posts.md` | 3+ posts documented with metrics and analysis |
| Demographics | 8 | `assets/audience-insights/demographics.md` | Real data in tables (no `[placeholder]` markers) |
| Engagement patterns | 7 | `assets/audience-insights/engagement-patterns.md` | Real data in sections (no `[placeholder]` markers) |
| Post templates | 5 | `assets/templates/my-post-templates.md` | Templates customized with real names and examples |
## Scoring Process
### Step 1: Read All Asset Files
Read each of the 8 asset files/directories listed above. Use Glob to find files in case-studies and frameworks directories.
### Step 2: Score Each Category
For each category, determine the score:
**Voice samples (25 pts):**
- 25 pts: File has substantial content (50+ lines) with specific voice characteristics, do's/don'ts, and examples
- 12 pts: File exists with some customization but still mostly template
- 0 pts: File missing or pure template
**User profile (20 pts):**
- 20 pts: `config/user-profile.local.md` exists with fewer than 3 `[Your ...]` placeholders remaining
- 10 pts: File exists but still has many placeholders
- 0 pts: File doesn't exist (only template exists)
**Case studies (15 pts):**
- 15 pts: 2+ non-template case study files in `assets/case-studies/`
- 8 pts: 1 case study file
- 0 pts: Only the template file exists
**Frameworks (10 pts):**
- 10 pts: 2+ non-template framework files in `assets/frameworks/`
- 5 pts: 1 framework file
- 0 pts: Only the template file exists
**High-engagement posts (10 pts):**
- 10 pts: 3+ posts documented with metrics and analysis
- 4 pts: 1-2 posts documented
- 0 pts: No posts documented (only template instructions)
**Demographics (8 pts):**
- 8 pts: Real industry/function/seniority/geography data (fewer than 5 `[placeholder]` markers)
- 4 pts: Partially filled in
- 0 pts: All placeholder markers still present
**Engagement patterns (7 pts):**
- 7 pts: Real posting times, topics, format data (fewer than 5 `[placeholder]` markers)
- 3 pts: Partially filled in
- 0 pts: All placeholder markers still present
**Post templates (5 pts):**
- 5 pts: 2+ templates customized with real names and examples
- 2 pts: 1 template customized
- 0 pts: All templates still use `[Name - e.g.` format
### Step 3: Generate Dashboard
Present results as a score table:
```
## Personalization Score: XX/100
| Category | Score | Status | Max |
|----------|-------|--------|-----|
| Voice samples | XX | [filled/partial/empty] | 25 |
| User profile | XX | [filled/partial/empty] | 20 |
| Case studies | XX | [filled/partial/empty] | 15 |
| Frameworks | XX | [filled/partial/empty] | 10 |
| High-engagement posts | XX | [filled/partial/empty] | 10 |
| Demographics | XX | [filled/partial/empty] | 8 |
| Engagement patterns | XX | [filled/partial/empty] | 7 |
| Post templates | XX | [filled/partial/empty] | 5 |
```
### Step 4: Prioritized Recommendations
Sort empty/partial categories by weight (highest impact first) and provide specific guidance:
```
## Recommendations (Highest Impact First)
1. **[Category]** (+XX points possible) — [Specific action to take]
2. **[Category]** (+XX points possible) — [Specific action to take]
...
```
For each recommendation, suggest running `/linkedin:setup` with the relevant workflow option.
## Output Format
Always output:
1. The score dashboard table
2. The number of assets personalized out of 8
3. Prioritized recommendations sorted by impact
4. A suggestion to run `/linkedin:setup` if score is below 50%