docs(linkedin-studio): M0-15 — repoint remaining prose families + route ab-tests/plans

This commit is contained in:
Kjell Tore Guttormsen 2026-06-18 13:04:18 +02:00
commit 6bd263144f
35 changed files with 167 additions and 130 deletions

View file

@ -34,11 +34,11 @@ ${CLAUDE_PLUGIN_ROOT}/references/algorithm-signals-reference.md
Check for existing state and analytics data:
```bash
ls -1 ${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests/ 2>/dev/null | head -20
ls -1 ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/ 2>/dev/null | head -20
```
```bash
ls -1 ${CLAUDE_PLUGIN_ROOT}/assets/analytics/posts/ 2>/dev/null | grep -E '\.json$' | head -10
ls -1 ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/posts/ 2>/dev/null | grep -E '\.json$' | head -10
```
If `~/.claude/linkedin-studio.local.md` exists, read it for user context (posting frequency, follower level, topics).
@ -184,13 +184,13 @@ Present the complete test plan:
Create the ab-tests directory if it does not exist:
```bash
mkdir -p ${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests
mkdir -p ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests
```
Save the test plan as a markdown file:
```
${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests/[test-name].md
${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/[test-name].md
```
Use the test name slug (e.g., `hook-question-vs-statement.md`).
@ -206,7 +206,7 @@ Confirm to the user: "Test plan saved. When you publish your first post, come ba
Scan for active tests:
```bash
ls -1 ${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests/ 2>/dev/null | grep -E '\.md$'
ls -1 ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/ 2>/dev/null | grep -E '\.md$'
```
If no tests exist, tell the user: "No active tests found. Use option 1 to design a new test first."
@ -218,7 +218,7 @@ If tests exist, present them and ask which test to log for using AskUserQuestion
Read the selected test file:
```bash
cat ${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests/[test-name].md
cat ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/[test-name].md
```
### 2b.3: Collect Post Metrics
@ -267,7 +267,7 @@ If minimum sample size (3 per variant) is reached, suggest: "You have enough dat
List tests with sufficient data (3+ posts per variant):
```bash
ls -1 ${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests/ 2>/dev/null | grep -E '\.md$'
ls -1 ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/ 2>/dev/null | grep -E '\.md$'
```
Read each file and check if both variants have 3+ posts logged. Present only tests ready for analysis. If no tests have sufficient data, tell the user how many more posts are needed.
@ -281,10 +281,10 @@ Read the test file. For each variant:
### 2c.3: Cross-Reference Analytics Data
If analytics CLI data is available in `assets/analytics/posts/`, cross-reference the test period data with weekly reports for additional context (baseline comparison, trend alignment).
If analytics CLI data is available in `${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/posts/`, cross-reference the test period data with weekly reports for additional context (baseline comparison, trend alignment).
```bash
ls -1 ${CLAUDE_PLUGIN_ROOT}/assets/analytics/weekly-reports/ 2>/dev/null | grep -E '\.json$' | head -10
ls -1 ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/weekly-reports/ 2>/dev/null | grep -E '\.json$' | head -10
```
### 2c.4: Present Analysis
@ -349,7 +349,7 @@ Update the test file status from ACTIVE to COMPLETED. Add the conclusion and rec
### 2d.1: Scan All Tests
```bash
ls -1 ${CLAUDE_PLUGIN_ROOT}/assets/analytics/ab-tests/ 2>/dev/null | grep -E '\.md$'
ls -1 ${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/ 2>/dev/null | grep -E '\.md$'
```
If no tests exist: "No test history yet. Design your first test with option 1."
@ -396,8 +396,8 @@ Read each test file and extract: test name, variable tested, status, verdict, ke
Check what data is available:
1. **Test history:** Read `assets/analytics/ab-tests/` for completed tests
2. **Analytics data:** Check `assets/analytics/posts/` for performance data
1. **Test history:** Read `${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/` for completed tests
2. **Analytics data:** Check `${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/posts/` for performance data
3. **User context:** Read state file for posting patterns and goals
### 2e.2: Generate Suggestions
@ -472,7 +472,7 @@ After any action, offer relevant next steps:
## Error Handling
### No Tests Directory
If `assets/analytics/ab-tests/` does not exist and the user selects options 2-4:
If `${LINKEDIN_STUDIO_DATA:-$HOME/.claude/linkedin-studio}/analytics/ab-tests/` does not exist and the user selects options 2-4:
- Inform the user: "No tests found. The test directory will be created when you design your first test."
- Redirect to option 1 (Design) or option 5 (Suggestions).